Magellan Linux

Contents of /trunk/core/poppler/poppler-0.18.2-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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