Magellan Linux

Annotation of /branches/magellan-next/core/ghostscript-gpl/ghostscript-gpl-9.04-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9273 - (hide annotations) (download)
Thu Nov 24 19:51:40 2011 UTC (12 years, 6 months ago) by niro
File size: 4518 byte(s)
-fixed patches
1 niro 9271 # $Id$
2    
3     PNAME="ghostscript-gpl"
4     PVER="9.04"
5     PBUILD="r1"
6    
7     PCATEGORIE="app-text"
8    
9     DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed."
10     HOMEPAGE="http://ghostscript.com/"
11    
12     DEPEND=">= media-libs/libjpeg-8
13     >= media-libs/libpng-1.5
14     >= media-libs/libtiff-3.9
15     >= sys-libs/zlib-1.2
16     >= x11-libs/gtk2+-2.28
17     >= x11-libs/libXt-1
18     >= x11-libs/libXext-1
19     >= media-libs/fontconfig-2.8
20     >= app-text/libpaper-1.1.24
21     >= x11-libs/cairo-1.10"
22    
23     SDEPEND=">= net-print/cups-1.4
24     >= dev-util/pkgconfig-0.25"
25    
26 niro 9272 SRCFILE="${PNAME/-gpl/}-${PVER}.tar.gz"
27 niro 9271 EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz"
28    
29     SRCDIR="${BUILDDIR}/${PNAME/-gpl/}-${PVER}"
30    
31     sminclude mtools
32    
33     SRC_URI=(
34 niro 9272 http://downloads.ghostscript.com/public/${SRCFILE}
35 niro 9271 http://ghostscript.com/releases/${SRCFILE}
36     mirror://${PNAME}/${SRCFILE}
37     mirror://${PNAME}/${EXTRA_SRCFILE}
38     mirror://${PNAME}/${PNAME}-8.70-multilib.patch
39 niro 9273 mirror://${PNAME}/${PNAME}-9.04-scripts.patch
40 niro 9271 mirror://${PNAME}/${PNAME}-8.70-noopt.patch
41     mirror://${PNAME}/${PNAME}-9.00-fpic.patch
42     mirror://${PNAME}/${PNAME}-8.70-runlibfileifexists.patch
43     mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch
44     mirror://${PNAME}/${PNAME}-8.71-jbig2dec-nullderef.patch
45     mirror://${PNAME}/${PNAME}-8.71-jbig2-image-refcount.patch.patch
46     mirror://${PNAME}/${PNAME}-9.01-iccprofiles-initdir.patch
47     mirror://${PNAME}/${PNAME}-9.01-vsnprintf.patch
48     mirror://${PNAME}/${PNAME}-9.02-colord.patch
49     mirror://${PNAME}/${PNAME}-9.02-cups-filters.patch
50     mirror://${PNAME}/${PNAME}-9.02-pxl-landscape.patch
51     mirror://${PNAME}/${PNAME}-9.02-libpng15.patch
52     )
53    
54     UP2DATE="updatecmd_sourceforge ${PNAME/-gpl/} 'GPL Ghostscript' - ${PNAME/-gpl/}"
55    
56     src_prepare()
57     {
58     munpack ${SRCFILE} || die
59     munpack ${EXTRA_SRCFILE} || die
60     cd ${SRCDIR}
61    
62     # remove internal copies of expat, jasper, jpeg, libpng and zlib
63     rm -r expat || die
64     rm -r jasper || die
65     rm -r jpeg || die
66     rm -r libpng || die
67     rm -r zlib || die
68     # remove internal urw-fonts
69     rm -r Resource/Font || die
70    
71     # apply several fedora patches
72     mpatch ${PNAME}-8.70-multilib.patch || die
73 niro 9273 mpatch ${PNAME}-9.04-scripts.patch || die
74 niro 9271 mpatch ${PNAME}-8.70-noopt.patch || die
75     mpatch ${PNAME}-9.00-fpic.patch || die
76     mpatch ${PNAME}-8.70-runlibfileifexists.patch || die
77     mpatch ${PNAME}-8.70-pksmraw.patch || die
78     mpatch ${PNAME}-8.71-jbig2dec-nullderef.patch || die
79     mpatch ${PNAME}-8.71-jbig2-image-refcount.patch.patch || die
80     mpatch ${PNAME}-9.01-iccprofiles-initdir.patch || die
81     mpatch ${PNAME}-9.01-vsnprintf.patch || die
82     mpatch ${PNAME}-9.02-colord.patch || die
83     mpatch ${PNAME}-9.02-cups-filters.patch || die
84     mpatch ${PNAME}-9.02-pxl-landscape.patch || die
85     mpatch ${PNAME}-9.02-libpng15.patch || die
86    
87     # search path fix
88     #sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \
89     # -e 's:$(gsdir)/fonts:/usr/share/ghostscript/fonts:' \
90     # base/Makefile.in base/*.mak || die
91     sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \
92     base/Makefile.in base/*.mak || die
93    
94     # fix doc pathes
95     sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" \
96     -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" \
97     -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" \
98     base/Makefile.in base/*.mak || die
99    
100     # fix libtool issues
101     mlibtoolize || die
102    
103     # regen makefiles
104     autoreconf --install --force --verbose || die
105     cd ${SRCDIR}/ijs
106     # fix libtool issues
107     mlibtoolize || die
108     autoreconf --install --force --verbose || die
109     }
110    
111     src_compile()
112     {
113     cd ${SRCDIR}
114    
115     mconfigure \
116     --with-ijs \
117     --with-jbig2dec \
118     --with-omni \
119     --without-gimp-print \
120     --with-x \
121     --with-drivers=ALL \
122     --with-libpaper \
123     --enable-fontconfig \
124     --enable-cups \
125     --enable-dynamic \
126     --enable-gtk \
127     --enable-cairo \
128     --without-jasper \
129     --disable-compile-inits \
130     --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
131     || die
132    
133    
134     # does not like optimations
135     mmake -j1 so all || die
136    
137     # compile ijs
138     cd ${SRCDIR}/ijs
139     mconfigure || die
140     mmake -j1 || die
141     }
142    
143     src_install()
144     {
145     cd ${SRCDIR}
146    
147     # needed directories
148     minstalldir /usr/bin || die
149     minstalldir /usr/include || die
150     minstalldir /usr/$(mlibdir) || die
151    
152     mmake -j1 DESTDIR=${BINDIR} install || die
153     mmake -j1 DESTDIR=${BINDIR} soinstall || die
154    
155     # install extra_fonts
156     minstalldir /usr/share/ghostscript || die
157     cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die
158    
159     # install ijs
160     cd ${SRCDIR}/ijs
161     mmake DESTDIR=${BINDIR} install || die
162    
163     # docs
164     cd ${SRCDIR}
165     minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die
166     }