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 9271 - (hide annotations) (download)
Thu Nov 24 19:44:58 2011 UTC (12 years, 6 months ago) by niro
File size: 4467 byte(s)
auto added: ver bump to 9.04-r1
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     SRCFILE="${PNAME/-gpl/}-${PVER}.tar.bz2"
27     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     http://ghostscript.com/releases/${SRCFILE}
35     mirror://${PNAME}/${SRCFILE}
36     mirror://${PNAME}/${EXTRA_SRCFILE}
37     mirror://${PNAME}/${PNAME}-8.70-multilib.patch
38     mirror://${PNAME}/${PNAME}-9.00-scripts.patch
39     mirror://${PNAME}/${PNAME}-8.70-noopt.patch
40     mirror://${PNAME}/${PNAME}-9.00-fpic.patch
41     mirror://${PNAME}/${PNAME}-8.70-runlibfileifexists.patch
42     mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch
43     mirror://${PNAME}/${PNAME}-8.71-jbig2dec-nullderef.patch
44     mirror://${PNAME}/${PNAME}-8.71-jbig2-image-refcount.patch.patch
45     mirror://${PNAME}/${PNAME}-9.01-iccprofiles-initdir.patch
46     mirror://${PNAME}/${PNAME}-9.01-vsnprintf.patch
47     mirror://${PNAME}/${PNAME}-9.02-colord.patch
48     mirror://${PNAME}/${PNAME}-9.02-cups-filters.patch
49     mirror://${PNAME}/${PNAME}-9.02-pxl-landscape.patch
50     mirror://${PNAME}/${PNAME}-9.02-libpng15.patch
51     )
52    
53     UP2DATE="updatecmd_sourceforge ${PNAME/-gpl/} 'GPL Ghostscript' - ${PNAME/-gpl/}"
54    
55     src_prepare()
56     {
57     munpack ${SRCFILE} || die
58     munpack ${EXTRA_SRCFILE} || die
59     cd ${SRCDIR}
60    
61     # remove internal copies of expat, jasper, jpeg, libpng and zlib
62     rm -r expat || die
63     rm -r jasper || die
64     rm -r jpeg || die
65     rm -r libpng || die
66     rm -r zlib || die
67     # remove internal urw-fonts
68     rm -r Resource/Font || die
69    
70     # apply several fedora patches
71     mpatch ${PNAME}-8.70-multilib.patch || die
72     mpatch ${PNAME}-9.00-scripts.patch || die
73     mpatch ${PNAME}-8.70-noopt.patch || die
74     mpatch ${PNAME}-9.00-fpic.patch || die
75     mpatch ${PNAME}-8.70-runlibfileifexists.patch || die
76     mpatch ${PNAME}-8.70-pksmraw.patch || die
77     mpatch ${PNAME}-8.71-jbig2dec-nullderef.patch || die
78     mpatch ${PNAME}-8.71-jbig2-image-refcount.patch.patch || die
79     mpatch ${PNAME}-9.01-iccprofiles-initdir.patch || die
80     mpatch ${PNAME}-9.01-vsnprintf.patch || die
81     mpatch ${PNAME}-9.02-colord.patch || die
82     mpatch ${PNAME}-9.02-cups-filters.patch || die
83     mpatch ${PNAME}-9.02-pxl-landscape.patch || die
84     mpatch ${PNAME}-9.02-libpng15.patch || die
85    
86     # search path fix
87     #sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \
88     # -e 's:$(gsdir)/fonts:/usr/share/ghostscript/fonts:' \
89     # base/Makefile.in base/*.mak || die
90     sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \
91     base/Makefile.in base/*.mak || die
92    
93     # fix doc pathes
94     sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" \
95     -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" \
96     -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" \
97     base/Makefile.in base/*.mak || die
98    
99     # fix libtool issues
100     mlibtoolize || die
101    
102     # regen makefiles
103     autoreconf --install --force --verbose || die
104     cd ${SRCDIR}/ijs
105     # fix libtool issues
106     mlibtoolize || die
107     autoreconf --install --force --verbose || die
108     }
109    
110     src_compile()
111     {
112     cd ${SRCDIR}
113    
114     mconfigure \
115     --with-ijs \
116     --with-jbig2dec \
117     --with-omni \
118     --without-gimp-print \
119     --with-x \
120     --with-drivers=ALL \
121     --with-libpaper \
122     --enable-fontconfig \
123     --enable-cups \
124     --enable-dynamic \
125     --enable-gtk \
126     --enable-cairo \
127     --without-jasper \
128     --disable-compile-inits \
129     --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
130     || die
131    
132    
133     # does not like optimations
134     mmake -j1 so all || die
135    
136     # compile ijs
137     cd ${SRCDIR}/ijs
138     mconfigure || die
139     mmake -j1 || die
140     }
141    
142     src_install()
143     {
144     cd ${SRCDIR}
145    
146     # needed directories
147     minstalldir /usr/bin || die
148     minstalldir /usr/include || die
149     minstalldir /usr/$(mlibdir) || die
150    
151     mmake -j1 DESTDIR=${BINDIR} install || die
152     mmake -j1 DESTDIR=${BINDIR} soinstall || die
153    
154     # install extra_fonts
155     minstalldir /usr/share/ghostscript || die
156     cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die
157    
158     # install ijs
159     cd ${SRCDIR}/ijs
160     mmake DESTDIR=${BINDIR} install || die
161    
162     # docs
163     cd ${SRCDIR}
164     minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die
165     }