Annotation of /branches/R11-stable/extras/poppler/poppler-0.22.5-r1.smage2
Parent Directory | Revision Log
Revision 18010 -
(hide annotations)
(download)
Thu Jun 27 06:44:01 2013 UTC (11 years, 2 months ago) by niro
File size: 4931 byte(s)
Thu Jun 27 06:44:01 2013 UTC (11 years, 2 months ago) by niro
File size: 4931 byte(s)
-release branches/R11-stable
1 | niro | 17697 | # $Id$ |
2 | |||
3 | PNAME="poppler" | ||
4 | PVER="0.22.5" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | SPLIT_PACKAGES="poppler poppler-glib poppler-qt4" | ||
8 | |||
9 | PCAT="app-text" | ||
10 | HOMEPAGE="http://poppler.freedesktop.org/" | ||
11 | |||
12 | POPPLER_DEPEND=">= media-libs/freetype-2.4 | ||
13 | >= media-libs/fontconfig-2.10 | ||
14 | >= media-libs/libjpeg-8 | ||
15 | >= media-libs/libtiff-4 | ||
16 | >= media-libs/lcms-1.19 | ||
17 | >= sys-libs/zlib-1 | ||
18 | >= sys-libs/libstdc++-4.7 | ||
19 | >= x11-libs/cairo-1.10 | ||
20 | >= app-text/poppler-data-0.4.5" | ||
21 | |||
22 | GLIB_DEPEND=">= dev-libs/glib2-2.36 | ||
23 | >= x11-libs/gtk2+-2.24" | ||
24 | |||
25 | QT4_DEPEND=">= x11-libs/qt4-core-4.8 | ||
26 | >= x11-libs/qt4-gui-4.8" | ||
27 | |||
28 | SDEPEND="${POPPLER_DEPEND} | ||
29 | ${GLIB_DEPEND} | ||
30 | ${QT4_DEPEND} | ||
31 | >= dev-libs/gobject-introspection-1.36 | ||
32 | >= dev-util/pkgconfig-0.25 | ||
33 | >= sys-dev/automake-4 | ||
34 | >= sys-dev/autoconf-5" | ||
35 | |||
36 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
37 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
38 | |||
39 | sminclude mtools multilib qt4 | ||
40 | msetfeature "!check" | ||
41 | |||
42 | SRC_URI=( | ||
43 | http://poppler.freedesktop.org/${SRCFILE} | ||
44 | mirror://${PNAME}/${SRCFILE} | ||
45 | mirror://${PNAME}/${PNAME}-0.16.0-fix-includes.patch | ||
46 | ) | ||
47 | |||
48 | UP2DATE="updatecmd -listonly ${HOMEPAGE}/releases.html | firsttarball gz" | ||
49 | |||
50 | split_info_poppler() | ||
51 | { | ||
52 | DESCRIPTION="Poppler is a PDF rendering library based on the xpdf-3.0 code base." | ||
53 | DEPEND="${POPPLER_DEPEND}" | ||
54 | } | ||
55 | |||
56 | split_info_poppler-glib() | ||
57 | { | ||
58 | DESCRIPTION="Poppler bindings for glib2 and gtk2+." | ||
59 | DEPEND="== app-text/poppler-${PVER} | ||
60 | ${GLIB_DEPEND}" | ||
61 | } | ||
62 | |||
63 | split_info_poppler-qt4() | ||
64 | { | ||
65 | DESCRIPTION="Poppler bindings for QT4." | ||
66 | DEPEND="== app-text/poppler-${PVER} | ||
67 | ${QT4_DEPEND}" | ||
68 | } | ||
69 | |||
70 | src_prepare() | ||
71 | { | ||
72 | # check for older versions | ||
73 | [[ -e /usr/$(mlibdir)/libpoppler.so ]] && die "Uninstall *all* old versions of ${PNAME} first ..." | ||
74 | |||
75 | munpack ${SRCFILE} || die | ||
76 | |||
77 | # fix missing includes | ||
78 | mpatch ${PNAME}-0.16.0-fix-includes.patch || die | ||
79 | } | ||
80 | |||
81 | src_compile() | ||
82 | { | ||
83 | mconfigure \ | ||
84 | --enable-introspection \ | ||
85 | --enable-xpdf-headers \ | ||
86 | --enable-libjpeg \ | ||
87 | --enable-zlib \ | ||
88 | --enable-poppler-qt4 \ | ||
89 | --enable-poppler-glib \ | ||
90 | --enable-cairo-output \ | ||
91 | --disable-gtk-test \ | ||
92 | || die | ||
93 | |||
94 | # disable qt4-multilib build on multilib systems | ||
95 | if [[ $(mlibdir) != lib ]] | ||
96 | then | ||
97 | only-m32 'sed -i "s/^qt4_subdir =.*/qt4_subdir =/" ${SRCDIR}-${abi}/Makefile || die' | ||
98 | only-m32 'sed -i "s/^qt4_pc_file =.*/qt4_pc_file =/" ${SRCDIR}-${abi}/Makefile || die' | ||
99 | fi | ||
100 | |||
101 | mmake || die | ||
102 | } | ||
103 | |||
104 | src_install_poppler() | ||
105 | { | ||
106 | # do not install glib, qt4 | ||
107 | mmake \ | ||
108 | glib_subdir="" glib_pc_file="" \ | ||
109 | qt4_subdir="" qt4_pc_file="" \ | ||
110 | DESTDIR=${BINDIR} install || die | ||
111 | } | ||
112 | |||
113 | src_install_poppler-glib() | ||
114 | { | ||
115 | # libtool tries to relink libpoppler-glib.la and libtool will not find -lpoppler | ||
116 | # so we install the poppler libraries first and remove them after install of poppler-glib | ||
117 | mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die | ||
118 | |||
119 | mmake -C glib DESTDIR=${BINDIR} install || die | ||
120 | |||
121 | # remove poppler libraries | ||
122 | mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die | ||
123 | |||
124 | # install missing pkgconfig file | ||
125 | all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig || die' | ||
126 | all-abis 'minstallfile poppler-glib.pc /usr/$(mlibdir)/pkgconfig/ || die' | ||
127 | } | ||
128 | |||
129 | src_install_poppler-qt4() | ||
130 | { | ||
131 | # disable qt4-multilib build on multilib systems | ||
132 | if [[ $(mlibdir) != lib ]] | ||
133 | then | ||
134 | # libtool tries to relink libpoppler-qt4.la and libtool will not find -lpoppler | ||
135 | # so we install the poppler libraries first and remove them after install of poppler-qt4 | ||
136 | only-m64 'mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die' | ||
137 | only-m64 'mmake -C qt4 DESTDIR=${BINDIR} install || die' | ||
138 | # remove poppler libraries | ||
139 | only-m64 'mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die' | ||
140 | # install missing pkgconfig file | ||
141 | only-m64 'minstalldir /usr/$(mlibdir)/pkgconfig || die' | ||
142 | only-m64 'minstallfile poppler-qt4.pc /usr/$(mlibdir)/pkgconfig/ || die' | ||
143 | else | ||
144 | # libtool tries to relink libpoppler-qt4.la and libtool will not find -lpoppler | ||
145 | # so we install the poppler libraries first and remove them after install of poppler-qt4 | ||
146 | mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die | ||
147 | mmake -C qt4 DESTDIR=${BINDIR} install || die | ||
148 | # remove poppler libraries | ||
149 | mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die | ||
150 | # install missing pkgconfig file | ||
151 | all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig || die' | ||
152 | all-abis 'minstallfile poppler-qt4.pc /usr/$(mlibdir)/pkgconfig/ || die' | ||
153 | fi | ||
154 | } | ||
155 | |||
156 | preinstall() | ||
157 | { | ||
158 | if [[ ! -z $(magequery -n poppler-cairo) ]] | ||
159 | then | ||
160 | echo -e ${COLRED} | ||
161 | echo -e "Error: app-text/poppler-cairo is installed!!" | ||
162 | echo -e "poppler-cairo is now provided by poppler and doesn't need an extra package anymore." | ||
163 | echo -e "Please uninstall app-text/poppler-cairo first!" | ||
164 | echo -e ${COLDEFAULT} | ||
165 | die "app-text/poppler-cairo found!" | ||
166 | fi | ||
167 | |||
168 | if [[ ! -z $(magequery -n poppler-qt3) ]] | ||
169 | then | ||
170 | echo -e ${COLRED} | ||
171 | echo -e "Error: app-text/poppler-qt3 is installed!!" | ||
172 | echo -e "poppler-qt3 is now obsolete and the package does not exist anymore." | ||
173 | echo -e "Please uninstall app-text/poppler-qt3 first!" | ||
174 | echo -e ${COLDEFAULT} | ||
175 | die "app-text/poppler-qt3 found!" | ||
176 | fi | ||
177 | } |