Gentoo Archives: gentoo-commits

From: "Timo Gurr (tgurr)" <tgurr@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/ghostscript-gpl: ChangeLog ghostscript-gpl-8.54-r1.ebuild ghostscript-gpl-8.57-r1.ebuild ghostscript-gpl-8.60-r1.ebuild ghostscript-gpl-8.57.ebuild
Date: Fri, 02 Nov 2007 20:39:28
Message-Id: E1Io3IT-00016C-QL@stork.gentoo.org
1 tgurr 07/11/02 20:39:17
2
3 Modified: ChangeLog
4 Added: ghostscript-gpl-8.54-r1.ebuild
5 ghostscript-gpl-8.57-r1.ebuild
6 ghostscript-gpl-8.60-r1.ebuild
7 Removed: ghostscript-gpl-8.57.ebuild
8 Log:
9 Revbump adding the patch to fix CVE-2007-2721 in all available versions, see bug #196860. Also fix bug #197818, thanks Sven for reporting.
10 (Portage version: 2.1.3.16)
11
12 Revision Changes Path
13 1.22 app-text/ghostscript-gpl/ChangeLog
14
15 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?rev=1.22&view=markup
16 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?rev=1.22&content-type=text/plain
17 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?r1=1.21&r2=1.22
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v
22 retrieving revision 1.21
23 retrieving revision 1.22
24 diff -u -r1.21 -r1.22
25 --- ChangeLog 1 Nov 2007 13:13:58 -0000 1.21
26 +++ ChangeLog 2 Nov 2007 20:39:17 -0000 1.22
27 @@ -1,6 +1,17 @@
28 # ChangeLog for app-text/ghostscript-gpl
29 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.21 2007/11/01 13:13:58 opfer Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.22 2007/11/02 20:39:17 tgurr Exp $
32 +
33 +*ghostscript-gpl-8.60-r1 (02 Nov 2007)
34 +*ghostscript-gpl-8.57-r1 (02 Nov 2007)
35 +*ghostscript-gpl-8.54-r1 (02 Nov 2007)
36 +
37 + 02 Nov 2007; Timo Gurr <tgurr@g.o>
38 + +files/ghostscript-CVE-2007-2721.patch, +ghostscript-gpl-8.54-r1.ebuild,
39 + -ghostscript-gpl-8.57.ebuild, +ghostscript-gpl-8.57-r1.ebuild,
40 + +ghostscript-gpl-8.60-r1.ebuild:
41 + Revbump adding the patch to fix CVE-2007-2721 in all available versions, see
42 + bug #196860. Also fix bug #197818, thanks Sven for reporting.
43
44 01 Nov 2007; Christian Faulhammer <opfer@g.o>
45 ghostscript-gpl-8.60.ebuild:
46
47
48
49 1.1 app-text/ghostscript-gpl/ghostscript-gpl-8.54-r1.ebuild
50
51 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.54-r1.ebuild?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.54-r1.ebuild?rev=1.1&content-type=text/plain
53
54 Index: ghostscript-gpl-8.54-r1.ebuild
55 ===================================================================
56 # Copyright 1999-2007 Gentoo Foundation
57 # Distributed under the terms of the GNU General Public License v2
58 # $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.54-r1.ebuild,v 1.1 2007/11/02 20:39:17 tgurr Exp $
59
60 WANT_AUTOMAKE=1.6
61
62 inherit autotools elisp-common eutils versionator flag-o-matic
63
64 DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed"
65 HOMEPAGE="http://www.cs.wisc.edu/~ghost/"
66
67 GSDJVU_PV=1.1
68 CUPS_PV=1.1.23
69 MY_P=ghostscript-${PV}-gpl
70 PVM=$(get_version_component_range 1-2)
71 SRC_URI="cjk? ( ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200406.tar.gz
72 ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz )
73 djvu? ( mirror://sourceforge/djvu/gsdjvu-${GSDJVU_PV}.tar.gz )
74 cups? ( mirror://gentoo/cups-${CUPS_PV}-source.tar.bz2 )
75 mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
76 mirror://gentoo/gdevhl12.c.gz"
77
78 LICENSE="GPL-2"
79 SLOT="0"
80 KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86 ~x86-fbsd"
81 IUSE="X cups cjk gtk djvu jpeg2k"
82
83 DEP="virtual/libc
84 >=media-libs/jpeg-6b
85 >=media-libs/libpng-1.2.5
86 >=sys-libs/zlib-1.1.4
87 >=media-libs/tiff-3.7
88 X? ( x11-libs/libXt x11-libs/libXext )
89 djvu? ( app-text/djvu )
90 gtk? ( >=x11-libs/gtk+-2.0 )
91 cups? ( >=net-print/cups-1.1.20 )
92 jpeg2k? ( media-libs/jasper )
93 !app-text/ghostscript-esp
94 !app-text/ghostscript-gnu"
95
96 RDEPEND="${DEP}
97 cjk? ( media-fonts/arphicfonts
98 media-fonts/kochi-substitute
99 media-fonts/baekmuk-fonts )
100 media-fonts/gnu-gs-fonts-std"
101
102 DEPEND="${DEP}
103 dev-util/pkgconfig"
104
105 S=${WORKDIR}/${MY_P}
106
107 src_unpack() {
108 unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
109 if use cjk; then
110 cat "${FILESDIR}/ghostscript-esp-8.15.2-cidfmap.cjk" >> "${S}/lib/cidfmap"
111 cat "${FILESDIR}/ghostscript-esp-8.15.2-FAPIcidfmap.cjk" >> "${S}/lib/FAPIcidfmap"
112 cd "${S}/Resource"
113 unpack adobe-cmaps-200406.tar.gz
114 unpack acro5-cmaps-2001.tar.gz
115 cd "${WORKDIR}"
116 fi
117
118 # cups support
119 if use cups; then
120 cp -r cups-${CUPS_PV}/pstoraster "${S}"
121 cd "${S}/pstoraster"
122 sed -e 's:@prefix@:/usr:' -e 's:@exec_prefix@:${prefix}:' -e \
123 's:@bindir@:${exec_prefix}/bin:' -e 's:@GS@:gs:' \
124 pstopxl.in > pstopxl || die "pstopxlsed failed"
125 sed -i -e 's:OUTPUTFILE="%stdout" $profile $6$:\0 -:' \
126 -e 's:/usr/local:/usr:' pstoraster || die "pstorastersed failed"
127 sed -i -e "s:pstopcl6:pstopxl:" cups.mak || die "cupssed failed"
128 cd ..
129 epatch "${FILESDIR}/gdevcups.patch"
130 epatch "${FILESDIR}/ghostscript-afpl-8.54-cups-destdir.diff"
131
132 echo 'include pstoraster/cups.mak' >> src/Makefile.in
133 sed -i -e 's:DEVICE_DEVS17=:\0$(DD)cups.dev:' src/Makefile.in || die "sed failed"
134 sed -i -e 's:EXTRALIBS=.*:\0 -lcups -lcupsimage:' src/Makefile.in || die "sed failed"
135 fi
136 cd "${S}"
137
138 if use djvu; then
139 unpack gsdjvu-${GSDJVU_PV}.tar.gz
140 cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}"
141 cp gsdjvu-${GSDJVU_PV}/gdevdjvu.c "${S}/src"
142 epatch "${FILESDIR}/djvu-gs-gpl.patch"
143 cp gsdjvu-${GSDJVU_PV}/ps2utf8.ps "${S}/lib"
144 cp "${S}/src/contrib.mak" "${S}/src/contrib.mak.gsdjvu"
145 grep -q djvusep "${S}/src/contrib.mak" || \
146 cat gsdjvu-${GSDJVU_PV}/gsdjvu.mak >> "${S}/src/contrib.mak"
147 fi
148
149 epatch "${FILESDIR}/ghostscript-afpl-8.54-cups-lib.patch"
150 epatch "${FILESDIR}/ghostscript-afpl-8.54-big-cmap-post.patch"
151
152 # enable cfax device (bug #56704) and rinkj device
153 sed -i -e 's:DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev:\0 $(DD)cfax.dev $(DD)rinkj.dev:' "${S}/src/Makefile.in" || die "sed failed"
154
155 # http://www.linuxprinting.org/download/printing/ghostscript-8.x/drivers/hl1250
156 # http://bugs.ghostscript.com/show_bug.cgi?id=687484
157 cp "${WORKDIR}/gdevhl12.c" "${S}/src/gdevhl12.c" || die
158 cat "${FILESDIR}/gdevhl12-hl1250.mak" >> "${S}/src/contrib.mak" || die
159 sed -e 's#^\(DEVICE_DEVS6=.*\)$#\1 $(DD)hl1240.dev $(DD)hl1250.dev#' \
160 -i "${S}/src/Makefile.in" || die
161 sed -i -e "s:#if 1:#if 0:" "${S}/src/gdevhl12.c" || die
162
163 # #128650, #128645, http://bugs.ghostscript.com/show_bug.cgi?id=688703
164 epatch "${FILESDIR}/ghostscript-afpl-8.54-ps2epsi-afpl.diff"
165 epatch "${FILESDIR}/ghostscript-afpl-8.54-rinkj.patch"
166 epatch "${FILESDIR}/ghostscript-afpl-8.54-destdir.diff"
167
168 # already fixed inSVN, http://bugs.ghostscript.com/show_bug.cgi?id=688702
169 epatch "${FILESDIR}/ghostscript-afpl-8.54-gtk2.patch"
170 if ! use gtk; then
171 sed -i "s:\$(GSSOX)::" src/*.mak || die "gsx sed failed"
172 sed -i "s:.*\$(GSSOX_XENAME)$::" src/*.mak || die "gsxso sed failed"
173 fi
174
175 # fixed inSVN http://bugs.ghostscript.com/show_bug.cgi?id=688721
176 epatch "${FILESDIR}/ghostscript-afpl-8.54-segfault.patch"
177
178 epatch "${FILESDIR}/ghostscript-CVE-2007-2721.patch"
179
180 # search path fix
181 sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
182 -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
183 -e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \
184 -e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \
185 -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \
186 src/Makefile.in src/*.mak || die "sed failed"
187 }
188
189 src_compile() {
190 econf $(use_with X x) \
191 $(use_with jpeg2k jasper) \
192 --with-ijs \
193 --with-jbig2dec || die "econf failed"
194
195 if use djvu; then
196 sed -i -e 's!$(DD)bbox.dev!& $(DD)djvumask.dev $(DD)djvusep.dev!g' Makefile
197 sed -i -e 's:(/\(Resource/[a-zA-Z/]*\)):(\1) findlibfile {pop} {pop &}
198 ifelse:' lib/gs_res.ps
199 fi
200
201 emake -j1 so all || die "emake failed"
202
203 cd ijs
204 econf || die "ijs econf failed"
205 emake || die "ijs emake failed"
206 }
207
208 src_install() {
209 emake DESTDIR="${D}" install soinstall || die "emake install failed"
210
211 use djvu && dobin gsdjvu
212
213 rm -fr "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
214 dodoc doc/README
215
216 cd "${S}/ijs"
217 emake DESTDIR="${D}" install || die "emake ijs install failed"
218 }
219
220
221
222 1.1 app-text/ghostscript-gpl/ghostscript-gpl-8.57-r1.ebuild
223
224 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.57-r1.ebuild?rev=1.1&view=markup
225 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.57-r1.ebuild?rev=1.1&content-type=text/plain
226
227 Index: ghostscript-gpl-8.57-r1.ebuild
228 ===================================================================
229 # Copyright 1999-2007 Gentoo Foundation
230 # Distributed under the terms of the GNU General Public License v2
231 # $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.57-r1.ebuild,v 1.1 2007/11/02 20:39:17 tgurr Exp $
232
233 WANT_AUTOMAKE=1.9
234
235 inherit autotools elisp-common eutils versionator flag-o-matic
236
237 DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed"
238 HOMEPAGE="http://ghostscript.com"
239
240 GSDJVU_PV=1.1
241 CUPS_PV=1.1.23
242 PVM=$(get_version_component_range 1-2)
243 SRC_URI="cjk? ( ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200406.tar.gz
244 ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz )
245 !bindist? ( djvu? ( mirror://sourceforge/djvu/gsdjvu-${GSDJVU_PV}.tar.gz ) )
246 cups? ( mirror://gentoo/cups-${CUPS_PV}-source.tar.bz2 )
247 mirror://sourceforge/ghostscript/${P/-gpl}.tar.bz2
248 mirror://gentoo/gdevhl12.c.gz"
249
250 LICENSE="GPL-2 CPL-1.0"
251 SLOT="0"
252 KEYWORDS="~amd64 ~arm ~ppc ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
253 IUSE="X bindist cups cjk djvu gtk jpeg2k"
254
255 DEP="virtual/libc
256 >=media-libs/jpeg-6b
257 >=media-libs/libpng-1.2.5
258 >=sys-libs/zlib-1.1.4
259 >=media-libs/tiff-3.7
260 X? ( x11-libs/libXt x11-libs/libXext )
261 !bindist? ( djvu? ( app-text/djvu ) )
262 gtk? ( >=x11-libs/gtk+-2.0 )
263 cups? ( >=net-print/cups-1.1.20 )
264 jpeg2k? ( media-libs/jasper )
265 !app-text/ghostscript-esp
266 !app-text/ghostscript-gnu"
267
268 RDEPEND="${DEP}
269 cjk? ( media-fonts/arphicfonts
270 media-fonts/kochi-substitute
271 media-fonts/baekmuk-fonts )
272 media-fonts/gnu-gs-fonts-std"
273
274 DEPEND="${DEP}
275 dev-util/pkgconfig"
276
277 S=${WORKDIR}/${P/-gpl}
278
279 src_unpack() {
280 unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
281 if use cjk; then
282 cat "${FILESDIR}/ghostscript-esp-8.15.2-cidfmap.cjk" >> "${S}/lib/cidfmap"
283 cat "${FILESDIR}/ghostscript-esp-8.15.2-FAPIcidfmap.cjk" >> "${S}/lib/FAPIcidfmap"
284 cd "${S}/Resource"
285 unpack adobe-cmaps-200406.tar.gz
286 unpack acro5-cmaps-2001.tar.gz
287 cd "${WORKDIR}"
288 fi
289
290 # cups support
291 if use cups; then
292 cp -r cups-${CUPS_PV}/pstoraster "${S}"
293 cd "${S}/pstoraster"
294 sed -e 's:@prefix@:/usr:' -e 's:@exec_prefix@:${prefix}:' -e \
295 's:@bindir@:${exec_prefix}/bin:' -e 's:@GS@:gs:' \
296 pstopxl.in > pstopxl || die "pstopxlsed failed"
297 sed -i -e 's:OUTPUTFILE="%stdout" $profile $6$:\0 -:' \
298 -e 's:/usr/local:/usr:' pstoraster || die "pstorastersed failed"
299 sed -i -e "s:pstopcl6:pstopxl:" cups.mak || die "cupssed failed"
300 cd ..
301 epatch "${FILESDIR}/gdevcups.patch"
302 epatch "${FILESDIR}/ghostscript-afpl-8.54-cups-destdir.diff"
303
304 echo 'include pstoraster/cups.mak' >> src/Makefile.in
305 sed -i -e 's:DEVICE_DEVS17=:\0$(DD)cups.dev:' src/Makefile.in || die "sed failed"
306 sed -i -e 's:EXTRALIBS=.*:\0 -lcups -lcupsimage:' src/Makefile.in || die "sed failed"
307 fi
308 cd "${S}"
309
310 if use bindist && use djvu ; then
311 ewarn "You have bindist in your USE, djvu support will NOT be compiled!"
312 ewarn "See http://djvu.sourceforge.net/gsdjvu/COPYING for details on licensing issues."
313 fi
314
315 if ! use bindist && use djvu; then
316 unpack gsdjvu-${GSDJVU_PV}.tar.gz
317 cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}"
318 cp gsdjvu-${GSDJVU_PV}/gdevdjvu.c "${S}/src"
319 epatch "${FILESDIR}/djvu-gs-gpl.patch"
320 cp gsdjvu-${GSDJVU_PV}/ps2utf8.ps "${S}/lib"
321 cp "${S}/src/contrib.mak" "${S}/src/contrib.mak.gsdjvu"
322 grep -q djvusep "${S}/src/contrib.mak" || \
323 cat gsdjvu-${GSDJVU_PV}/gsdjvu.mak >> "${S}/src/contrib.mak"
324 fi
325
326 epatch "${FILESDIR}/ghostscript-afpl-8.57-cups-lib.patch"
327
328 # enable cfax device (bug #56704) and rinkj device
329 sed -i -e 's:DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev:\0 $(DD)cfax.dev $(DD)rinkj.dev:' \
330 "${S}/src/Makefile.in" || die "sed failed"
331
332 # http://www.linuxprinting.org/download/printing/ghostscript-8.x/drivers/hl1250
333 # http://bugs.ghostscript.com/show_bug.cgi?id=687484
334 cp "${WORKDIR}/gdevhl12.c" "${S}/src/gdevhl12.c" || die
335 cat "${FILESDIR}/gdevhl12-hl1250.mak" >> "${S}/src/contrib.mak" || die
336 sed -e 's#^\(DEVICE_DEVS6=.*\)$#\1 $(DD)hl1240.dev $(DD)hl1250.dev#' \
337 -i "${S}/src/Makefile.in" || die
338 sed -i -e "s:#if 1:#if 0:" "${S}/src/gdevhl12.c" || die
339
340 epatch "${FILESDIR}/ghostscript-afpl-8.54-rinkj.patch"
341 epatch "${FILESDIR}/ghostscript-CVE-2007-2721.patch"
342
343 if ! use gtk; then
344 sed -i "s:\$(GSSOX)::" src/*.mak || die "gsx sed failed"
345 sed -i "s:.*\$(GSSOX_XENAME)$::" src/*.mak || die "gsxso sed failed"
346 fi
347
348 # search path fix
349 sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
350 -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
351 -e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \
352 -e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \
353 -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \
354 src/Makefile.in src/*.mak || die "sed failed"
355 }
356
357 src_compile() {
358 econf $(use_with X x) \
359 $(use_with jpeg2k jasper) \
360 --with-ijs \
361 --with-jbig2dec || die "econf failed"
362
363 if ! use bindist && use djvu; then
364 sed -i -e 's!$(DD)bbox.dev!& $(DD)djvumask.dev $(DD)djvusep.dev!g' Makefile
365 sed -i -e 's:(/\(Resource/[a-zA-Z/]*\)):(\1) findlibfile {pop} {pop &}
366 ifelse:' lib/gs_res.ps
367 fi
368
369 emake -j1 so all || die "emake failed"
370
371 cd ijs
372 econf || die "ijs econf failed"
373 emake || die "ijs emake failed"
374 }
375
376 src_install() {
377 emake DESTDIR="${D}" install || die "emake install failed"
378 # emake DESTDIR="${D}" soinstall || die "emake soinstall failed"
379
380 if ! use bindist && use djvu ; then
381 dobin gsdjvu
382 fi
383
384 rm -fr "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
385 dodoc doc/README
386
387 cd "${S}/ijs"
388 emake DESTDIR="${D}" install || die "emake ijs install failed"
389 }
390
391
392
393 1.1 app-text/ghostscript-gpl/ghostscript-gpl-8.60-r1.ebuild
394
395 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.60-r1.ebuild?rev=1.1&view=markup
396 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.60-r1.ebuild?rev=1.1&content-type=text/plain
397
398 Index: ghostscript-gpl-8.60-r1.ebuild
399 ===================================================================
400 # Copyright 1999-2007 Gentoo Foundation
401 # Distributed under the terms of the GNU General Public License v2
402 # $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.60-r1.ebuild,v 1.1 2007/11/02 20:39:17 tgurr Exp $
403
404 inherit autotools elisp-common eutils versionator flag-o-matic
405
406 DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed"
407 HOMEPAGE="http://ghostscript.com"
408
409 MY_P=${P/-gpl}
410 GSDJVU_PV=1.2
411 PVM=$(get_version_component_range 1-2)
412 SRC_URI="cjk? ( ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200406.tar.gz
413 ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz )
414 !bindist? ( djvu? ( mirror://sourceforge/djvu/gsdjvu-${GSDJVU_PV}.tar.gz ) )
415 mirror://sourceforge/ghostscript/${MY_P}.tar.bz2"
416
417 LICENSE="GPL-2 CPL-1.0"
418 SLOT="0"
419 KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sh ~sparc ~x86 ~x86-fbsd"
420 IUSE="bindist cjk cups djvu gtk jpeg2k X"
421
422 COMMON_DEPEND="media-libs/fontconfig
423 >=media-libs/jpeg-6b
424 >=media-libs/libpng-1.2.5
425 >=media-libs/tiff-3.7
426 >=sys-libs/zlib-1.1.4
427 !bindist? ( djvu? ( app-text/djvu ) )
428 cups? ( >=net-print/cups-1.1.20 )
429 gtk? ( >=x11-libs/gtk+-2.0 )
430 jpeg2k? ( media-libs/jasper )
431 X? ( x11-libs/libXt x11-libs/libXext )
432 !app-text/ghostscript-esp
433 !app-text/ghostscript-gnu"
434
435 DEPEND="${COMMON_DEPEND}
436 dev-util/pkgconfig"
437
438 RDEPEND="${COMMON_DEPEND}
439 cjk? ( media-fonts/arphicfonts
440 media-fonts/kochi-substitute
441 media-fonts/baekmuk-fonts )
442 media-fonts/gnu-gs-fonts-std"
443
444 S="${WORKDIR}/${MY_P}"
445
446 src_unpack() {
447 unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
448 if use cjk ; then
449 cat "${FILESDIR}/ghostscript-esp-8.15.2-cidfmap.cjk" >> "${S}/lib/cidfmap"
450 cat "${FILESDIR}/ghostscript-esp-8.15.2-FAPIcidfmap.cjk" >> "${S}/lib/FAPIcidfmap"
451 cd "${S}/Resource"
452 unpack adobe-cmaps-200406.tar.gz
453 unpack acro5-cmaps-2001.tar.gz
454 cd "${WORKDIR}"
455 fi
456
457 cd "${S}"
458
459 # Fedora patches
460 # upstream bug http://bugs.ghostscript.com/show_bug.cgi?id=689393
461 epatch "${FILESDIR}/ghostscript-8.60-ijs-krgb.patch"
462 epatch "${FILESDIR}/ghostscript-8.60-fPIC.patch"
463 epatch "${FILESDIR}/ghostscript-8.60-multilib.patch"
464 epatch "${FILESDIR}/ghostscript-8.60-noopt.patch"
465 epatch "${FILESDIR}/ghostscript-8.60-scripts.patch"
466
467 # additional Gentoo patches
468 epatch "${FILESDIR}/ghostscript-afpl-8.54-rinkj.patch"
469
470 # Already fixed upstream for the next release
471 epatch "${FILESDIR}/ghostscript-8.60-include.patch"
472 epatch "${FILESDIR}/ghostscript-CVE-2007-2721.patch"
473
474 if use bindist && use djvu ; then
475 ewarn "You have bindist in your USE, djvu support will NOT be compiled!"
476 ewarn "See http://djvu.sourceforge.net/gsdjvu/COPYING for details on licensing issues."
477 fi
478
479 if ! use bindist && use djvu ; then
480 unpack gsdjvu-${GSDJVU_PV}.tar.gz
481 cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}"
482 cp gsdjvu-${GSDJVU_PV}/gdevdjvu.c "${S}/src"
483 epatch "${FILESDIR}/djvu-gs-gpl-8.60.patch"
484 cp gsdjvu-${GSDJVU_PV}/ps2utf8.ps "${S}/lib"
485 cp "${S}/src/contrib.mak" "${S}/src/contrib.mak.gsdjvu"
486 grep -q djvusep "${S}/src/contrib.mak" || \
487 cat gsdjvu-${GSDJVU_PV}/gsdjvu.mak >> "${S}/src/contrib.mak"
488
489 # install ps2utf8.ps, bug #197818
490 sed -i -e '/$(EXTRA_INIT_FILES)/aps2utf8.ps \\' \
491 "${S}/src/unixinst.mak" || die "sed failed"
492 fi
493
494 if ! use gtk ; then
495 sed -i "s:\$(GSSOX)::" src/*.mak || die "gsx sed failed"
496 sed -i "s:.*\$(GSSOX_XENAME)$::" src/*.mak || die "gsxso sed failed"
497 fi
498
499 # search path fix
500 sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
501 -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
502 -e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \
503 -e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \
504 -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \
505 src/Makefile.in src/*.mak || die "sed failed"
506
507 cd "${S}"
508 eautoreconf
509 }
510
511 src_compile() {
512 econf \
513 $(use_enable cups) \
514 $(use_enable gtk) \
515 $(use_with jpeg2k jasper) \
516 $(use_with X x) \
517 --enable-dynamic \
518 --enable-fontconfig \
519 --with-drivers=ALL,rinkj \
520 --with-ijs \
521 --with-jbig2dec \
522 || die "econf failed"
523
524 if ! use bindist && use djvu ; then
525 sed -i -e 's!$(DD)bbox.dev!& $(DD)djvumask.dev $(DD)djvusep.dev!g' Makefile
526 sed -i -e 's:(/\(Resource/[a-zA-Z/]*\)):(\1) findlibfile {pop} {pop &}
527 ifelse:' lib/gs_res.ps
528 fi
529
530 emake -j1 so all || die "emake failed"
531
532 cd "${S}/ijs"
533 econf || die "ijs econf failed"
534 emake || die "ijs emake failed"
535 }
536
537 src_install() {
538 emake DESTDIR="${D}" install-so install || die "emake install failed"
539
540 if ! use bindist && use djvu ; then
541 dobin gsdjvu || die "dobin gsdjvu install failed"
542 fi
543
544 rm -rf "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
545 dodoc doc/README || die "dodoc install failed"
546
547 cd "${S}/ijs"
548 emake DESTDIR="${D}" install || die "emake ijs install failed"
549 }
550
551
552
553 --
554 gentoo-commits@g.o mailing list