Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8993 - (show annotations) (download)
Mon Sep 12 16:46:41 2011 UTC (12 years, 8 months ago) by niro
File size: 3693 byte(s)
-abort build, when an old poppler version was found
1 # $Id$
2
3 PNAME="poppler"
4 PVER="0.17.4"
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 if [[ -n $(magequery -n poppler) ]]
69 then
70 die "Uninstall all old poppler versions first!"
71 fi
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 mmake -C glib DESTDIR=${BINDIR} install || die
114
115 # install missing pkgconfig file
116 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
117 all-abis 'minstallfile poppler-glib.pc /usr/$(mlibdir)/pkgconfig/ || die'
118 }
119
120 src_install_poppler-qt4()
121 {
122 # disable qt4-multilib build on multilib systems
123 if [[ $(mlibdir) != lib ]]
124 then
125 only-m64 'mmake -C qt4 DESTDIR=${BINDIR} install || die'
126 only-m64 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
127 only-m64 'minstallfile poppler-qt4.pc /usr/$(mlibdir)/pkgconfig/ || die'
128 else
129 mmake -C qt4 DESTDIR=${BINDIR} install || die
130 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
131 all-abis 'minstallfile poppler-qt4.pc /usr/$(mlibdir)/pkgconfig/ || die'
132 fi
133 }
134
135 preinstall()
136 {
137 if [[ ! -z $(magequery -n poppler-cairo) ]]
138 then
139 echo -e ${COLRED}
140 echo -e "Error: app-text/poppler-cairo is installed!!"
141 echo -e "poppler-cairo is now provided by poppler and doesn't need an extra package anymore."
142 echo -e "Please uninstall app-text/poppler-cairo first!"
143 echo -e ${COLDEFAULT}
144 die "app-text/poppler-cairo found!"
145 fi
146
147 if [[ ! -z $(magequery -n poppler-qt3) ]]
148 then
149 echo -e ${COLRED}
150 echo -e "Error: app-text/poppler-qt3 is installed!!"
151 echo -e "poppler-qt3 is now obsolete and the package does not exist anymore."
152 echo -e "Please uninstall app-text/poppler-qt3 first!"
153 echo -e ${COLDEFAULT}
154 die "app-text/poppler-qt3 found!"
155 fi
156 }