Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23668 - (hide annotations) (download)
Thu Jul 10 03:14:21 2014 UTC (9 years, 10 months ago) by niro
Original Path: trunk/extras/poppler/poppler-0.30.0-r1.smage2
File size: 5016 byte(s)
auto added: ver bump to 0.30.0-r1
1 niro 23666 # $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 niro 23668 >= x11-libs/cairo-1.14
20 niro 23666 >= 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     || die
94    
95     # disable qt4-multilib build on multilib systems
96     if [[ $(mlibdir) != lib ]]
97     then
98     only-m32 'sed -i "s/^qt4_subdir =.*/qt4_subdir =/" ${SRCDIR}-${abi}/Makefile || die'
99     only-m32 'sed -i "s/^qt4_pc_file =.*/qt4_pc_file =/" ${SRCDIR}-${abi}/Makefile || die'
100     fi
101    
102     mmake || die
103     }
104    
105     src_install_poppler()
106     {
107     # do not install glib, qt4
108     mmake \
109     glib_subdir="" glib_pc_file="" \
110     qt4_subdir="" qt4_pc_file="" \
111     DESTDIR=${BINDIR} install || die
112     }
113    
114     src_install_poppler-glib()
115     {
116     # libtool tries to relink libpoppler-glib.la and libtool will not find -lpoppler
117     # so we install the poppler libraries first and remove them after install of poppler-glib
118     mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die
119    
120     mmake -C glib DESTDIR=${BINDIR} install || die
121    
122     # remove poppler libraries
123     mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die
124    
125     # install missing pkgconfig file
126     all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
127     all-abis 'minstallfile poppler-glib.pc /usr/$(mlibdir)/pkgconfig/ || die'
128     }
129    
130     src_install_poppler-qt4()
131     {
132     # disable qt4-multilib build on multilib systems
133     if [[ $(mlibdir) != lib ]]
134     then
135     # libtool tries to relink libpoppler-qt4.la and libtool will not find -lpoppler
136     # so we install the poppler libraries first and remove them after install of poppler-qt4
137     only-m64 'mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die'
138     only-m64 'mmake -C qt4 DESTDIR=${BINDIR} install || die'
139     # remove poppler libraries
140     only-m64 'mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die'
141     # install missing pkgconfig file
142     only-m64 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
143     only-m64 'minstallfile poppler-qt4.pc /usr/$(mlibdir)/pkgconfig/ || die'
144     else
145     # libtool tries to relink libpoppler-qt4.la and libtool will not find -lpoppler
146     # so we install the poppler libraries first and remove them after install of poppler-qt4
147     mmake -C poppler DESTDIR=${BINDIR} install-libLTLIBRARIES || die
148     mmake -C qt4 DESTDIR=${BINDIR} install || die
149     # remove poppler libraries
150     mmake -C poppler DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die
151     # install missing pkgconfig file
152     all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig || die'
153     all-abis 'minstallfile poppler-qt4.pc /usr/$(mlibdir)/pkgconfig/ || die'
154     fi
155     }
156    
157     preinstall()
158     {
159     if [[ ! -z $(magequery -n poppler-cairo) ]]
160     then
161     echo -e ${COLRED}
162     echo -e "Error: app-text/poppler-cairo is installed!!"
163     echo -e "poppler-cairo is now provided by poppler and doesn't need an extra package anymore."
164     echo -e "Please uninstall app-text/poppler-cairo first!"
165     echo -e ${COLDEFAULT}
166     die "app-text/poppler-cairo found!"
167     fi
168    
169     if [[ ! -z $(magequery -n poppler-qt3) ]]
170     then
171     echo -e ${COLRED}
172     echo -e "Error: app-text/poppler-qt3 is installed!!"
173     echo -e "poppler-qt3 is now obsolete and the package does not exist anymore."
174     echo -e "Please uninstall app-text/poppler-qt3 first!"
175     echo -e ${COLDEFAULT}
176     die "app-text/poppler-qt3 found!"
177     fi
178     }