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