Magellan Linux

Contents of /branches/R11-unstable/extras/poppler/poppler-0.30.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25725 - (show annotations) (download)
Tue Nov 25 04:13:23 2014 UTC (9 years, 5 months ago) by niro
File size: 5042 byte(s)
-release branches/R11-unstable
1 # $Id$
2
3 PNAME="poppler"
4 PVER="0.30.0"
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.5
13 >= media-libs/fontconfig-2.11
14 >= media-libs/libjpeg-8
15 >= media-libs/libtiff-4
16 >= media-libs/lcms2-2.6
17 >= sys-libs/zlib-1
18 >= sys-libs/libstdc++-4.8
19 >= x11-libs/cairo-1.14
20 >= app-text/poppler-data-0.4.7"
21
22 GLIB_DEPEND=">= dev-libs/glib2-2.42"
23
24 QT4_DEPEND=">= x11-libs/qt4-core-4.8
25 >= x11-libs/qt4-gui-4.8"
26
27 SDEPEND="${POPPLER_DEPEND}
28 ${GLIB_DEPEND}
29 ${QT4_DEPEND}
30 >= x11-libs/qt4-test-4.8
31 >= dev-libs/gobject-introspection-1.42
32 >= dev-util/pkgconfig-0.25
33 >= sys-dev/automake-4
34 >= sys-dev/autoconf-5"
35
36 SRCFILE="${PNAME}-${PVER}.tar.xz"
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 xz"
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 # disable gtk test propgrams to drop loop deps with poppler->gtk2->cups->poppler
84 mconfigure \
85 --enable-introspection \
86 --enable-xpdf-headers \
87 --enable-libjpeg \
88 --enable-zlib \
89 --enable-poppler-qt4 \
90 --enable-poppler-glib \
91 --enable-cairo-output \
92 --disable-gtk-test \
93 --disable-libopenjpeg \
94 || die
95
96 # disable qt4-multilib build on multilib systems
97 if [[ $(mlibdir) != lib ]]
98 then
99 only-m32 'sed -i "s/^qt4_subdir =.*/qt4_subdir =/" ${SRCDIR}-${abi}/Makefile || die'
100 only-m32 'sed -i "s/^qt4_pc_file =.*/qt4_pc_file =/" ${SRCDIR}-${abi}/Makefile || die'
101 fi
102
103 mmake || die
104 }
105
106 src_install_poppler()
107 {
108 # do not install glib, qt4
109 mmake \
110 glib_subdir="" glib_pc_file="" \
111 qt4_subdir="" qt4_pc_file="" \
112 DESTDIR=${BINDIR} install || die
113 }
114
115 src_install_poppler-glib()
116 {
117 # libtool tries to relink libpoppler-glib.la and libtool will not find -lpoppler
118 # so we install the poppler libraries first and remove them after install of poppler-glib
119 mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die
120
121 mmake -C glib DESTDIR=${BINDIR} install || die
122
123 # remove poppler libraries
124 mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die
125
126 # install missing pkgconfig file
127 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
128 all-abis 'minstallfile poppler-glib.pc /usr/$(mlibdir)/pkgconfig/ || die'
129 }
130
131 src_install_poppler-qt4()
132 {
133 # disable qt4-multilib build on multilib systems
134 if [[ $(mlibdir) != lib ]]
135 then
136 # libtool tries to relink libpoppler-qt4.la and libtool will not find -lpoppler
137 # so we install the poppler libraries first and remove them after install of poppler-qt4
138 only-m64 'mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die'
139 only-m64 'mmake -C qt4 DESTDIR=${BINDIR} install || die'
140 # remove poppler libraries
141 only-m64 'mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die'
142 # install missing pkgconfig file
143 only-m64 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
144 only-m64 'minstallfile poppler-qt4.pc /usr/$(mlibdir)/pkgconfig/ || die'
145 else
146 # libtool tries to relink libpoppler-qt4.la and libtool will not find -lpoppler
147 # so we install the poppler libraries first and remove them after install of poppler-qt4
148 mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die
149 mmake -C qt4 DESTDIR=${BINDIR} install || die
150 # remove poppler libraries
151 mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die
152 # install missing pkgconfig file
153 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
154 all-abis 'minstallfile poppler-qt4.pc /usr/$(mlibdir)/pkgconfig/ || die'
155 fi
156 }
157
158 preinstall()
159 {
160 if [[ ! -z $(magequery -n poppler-cairo) ]]
161 then
162 echo -e ${COLRED}
163 echo -e "Error: app-text/poppler-cairo is installed!!"
164 echo -e "poppler-cairo is now provided by poppler and doesn't need an extra package anymore."
165 echo -e "Please uninstall app-text/poppler-cairo first!"
166 echo -e ${COLDEFAULT}
167 die "app-text/poppler-cairo found!"
168 fi
169
170 if [[ ! -z $(magequery -n poppler-qt3) ]]
171 then
172 echo -e ${COLRED}
173 echo -e "Error: app-text/poppler-qt3 is installed!!"
174 echo -e "poppler-qt3 is now obsolete and the package does not exist anymore."
175 echo -e "Please uninstall app-text/poppler-qt3 first!"
176 echo -e ${COLDEFAULT}
177 die "app-text/poppler-qt3 found!"
178 fi
179 }