Magellan Linux

Contents of /trunk/core/ghostscript-gpl/ghostscript-gpl-8.70-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id