Magellan Linux

Contents of /branches/magellan-next/core/poppler/poppler-0.18.2-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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