Magellan Linux

Contents of /branches/magellan-next/core/poppler/poppler-0.18.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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