Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/
Date: Sun, 11 Oct 2020 20:45:17
Message-Id: 1602449107.e1fca14dc9bc8c71475f358b8410e1c551bb56ef.whissi@gentoo
1 commit: e1fca14dc9bc8c71475f358b8410e1c551bb56ef
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 11 20:44:24 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 20:45:07 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1fca14d
7
8 app-text/ghostscript-gpl: drop old
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 app-text/ghostscript-gpl/Manifest | 3 -
14 .../ghostscript-gpl/ghostscript-gpl-9.53.0.ebuild | 189 ---------------------
15 .../ghostscript-gpl/ghostscript-gpl-9.53.1.ebuild | 189 ---------------------
16 .../ghostscript-gpl/ghostscript-gpl-9.53.2.ebuild | 189 ---------------------
17 4 files changed, 570 deletions(-)
18
19 diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
20 index 89d82f3d489..38c9679d466 100644
21 --- a/app-text/ghostscript-gpl/Manifest
22 +++ b/app-text/ghostscript-gpl/Manifest
23 @@ -1,7 +1,4 @@
24 DIST ghostscript-9.52.tar.xz 39711040 BLAKE2B 317042ae7e2bfdeded2ae9d9a1bd1521422d1ce1dd6b9b2cdedf4c503cce1285684d5329663dc8ee7263591761c33254827d16b1a93f8c10aad4baab1d859f93 SHA512 4c4a33884e1138bad553eee61fac1a72158297ad5c2ce46a4b36150848dea8158affaf2b902f4ff03e4f72ebc8154c198b618112624f409230a610b7648faa67
25 -DIST ghostscript-9.53.0.tar.xz 41358720 BLAKE2B 9a8b5872dc799f14759033685c37890f2da28450b1e115fcc63a2a920bb22bfc02db078d3f39dc62778da2a2518b82c2fc91f349486e83914c88c70d1e15d7e8 SHA512 fa594ef99e58257074b651e4d078bd1025f7bc2c435cd2a5454ba59c2a98cc82e93339ccd1eaa4fe624275165aacefeabc6f8336476027946f56aeb02e93da30
26 -DIST ghostscript-9.53.1.tar.xz 41362600 BLAKE2B f4f3e9c067d120195cdcbd8ba3ecbb5618d668e0582408cc76b0e13627aca06c40064a7ae96d0ebe8c313ec282c4d3f5dddddabef3d0194ff9aaf98832b5a50c SHA512 5c78ed0a03983cbf9d55885c5ee8fbfc987db367b020ad0148b8861de42923e38c688447cfc6efcea5521121545ecfbea9690058fd3c4438629a43b5990800c5
27 -DIST ghostscript-9.53.2.tar.xz 41362364 BLAKE2B 1ff4d00661d28f7f9a14064928182147fa0b20b41accb287b779a40651fbc45047eefc8522242b7dd909324b6e3ebc15f421b351c69fb248fef2095210c81461 SHA512 fe430e96b67a082b58942d66193a89b8af042574929e8299e1f8b1ef2a7f71565ba5a96b72d26db38f4a05e70119a019c5fe73b842d51afd357d642d39d95320
28 DIST ghostscript-9.53.3.tar.xz 41368160 BLAKE2B 6b5840a420d7527c7155bfb707fe19b3412bdd3a6707f44d058c20f607e6695cfc878cf5df4c4528686c1c1f488b2dbdb81ef5fdf38b950eb15751d2ebafb0a9 SHA512 eb832c27eecd30f15e346408c592d7096fd23ef0a6fa59bd50ca327578915434530a4868e69249c2594def0910c527302e99d54f0877f726a8ca8bea6f0f17b7
29 DIST ghostscript-gpl-9.52-patchset-01.tar.xz 3292 BLAKE2B b6ac4f06c149301b07f57a5dd1f4507cc1e6d17ea60132b64177972ca58a29b2f6ff2f034b20b8ac083b60ea999f50ff75b74f86eec0cd73179741ed8a1486a8 SHA512 2498c5f396807a282727a7a9bd678e2008a1e4112722745aab48a12601661b08557c5d49f0a5ee67fb636f8c2b00c737640e894523b904ef3600f66d107999cb
30 DIST ghostscript-gpl-9.53-patchset-01.tar.xz 2340 BLAKE2B 55d82c88f1b57c084318839e1382ffa112461d074411b1f6586a5a9ace37772b144abdda9f742defd077ce937df590d63bd7a2306bad52438949d1036bb7900c SHA512 ab58485df9152bb32c6f0eb25bd45689089bd17ffb0323c54e1977c5f810ec5eb09f358637251c428591749bfb42c6f8489c74d4bd0a7ae5d696eb2346503c44
31
32 diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.0.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.0.ebuild
33 deleted file mode 100644
34 index 0d3acf4a9d1..00000000000
35 --- a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.0.ebuild
36 +++ /dev/null
37 @@ -1,189 +0,0 @@
38 -# Copyright 1999-2020 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=7
42 -
43 -inherit autotools flag-o-matic toolchain-funcs
44 -
45 -DESCRIPTION="Interpreter for the PostScript language and PDF"
46 -HOMEPAGE="https://ghostscript.com/"
47 -
48 -MY_PN=${PN/-gpl}
49 -MY_P="${MY_PN}-${PV/_}"
50 -PVM=$(ver_cut 1-2)
51 -PVM_S=$(ver_rs 1-2 "")
52 -
53 -MY_PATCHSET="ghostscript-gpl-9.53-patchset-01.tar.xz"
54 -
55 -SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVM_S}/${MY_P}.tar.xz"
56 -
57 -if [[ -n "${MY_PATCHSET}" ]] ; then
58 - SRC_URI+=" https://dev.gentoo.org/~whissi/dist/ghostscript-gpl/${MY_PATCHSET}"
59 -fi
60 -
61 -LICENSE="AGPL-3 CPL-1.0"
62 -SLOT="0"
63 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
64 -IUSE="cups dbus gtk l10n_de static-libs unicode X"
65 -
66 -LANGS="ja ko zh-CN zh-TW"
67 -for X in ${LANGS} ; do
68 - IUSE="${IUSE} l10n_${X}"
69 -done
70 -
71 -DEPEND="
72 - app-text/libpaper
73 - media-libs/fontconfig
74 - >=media-libs/freetype-2.4.9:2=
75 - >=media-libs/jbig2dec-0.19:=
76 - >=media-libs/lcms-2.6:2
77 - >=media-libs/libpng-1.6.2:0=
78 - >=media-libs/openjpeg-2.1.0:2=
79 - >=media-libs/tiff-4.0.1:0=
80 - >=sys-libs/zlib-1.2.7
81 - virtual/jpeg:0
82 - cups? ( >=net-print/cups-1.3.8 )
83 - dbus? ( sys-apps/dbus )
84 - gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
85 - unicode? ( net-dns/libidn:0= )
86 - X? ( x11-libs/libXt x11-libs/libXext )
87 -"
88 -BDEPEND="virtual/pkgconfig"
89 -RDEPEND="${DEPEND}
90 - app-text/poppler-data
91 - >=media-fonts/urw-fonts-2.4.9
92 - l10n_ja? ( media-fonts/kochi-substitute )
93 - l10n_ko? ( media-fonts/baekmuk-fonts )
94 - l10n_zh-CN? ( media-fonts/arphicfonts )
95 - l10n_zh-TW? ( media-fonts/arphicfonts )
96 -"
97 -
98 -S="${WORKDIR}/${MY_P}"
99 -
100 -src_prepare() {
101 - if [[ -n "${MY_PATCHSET}" ]] ; then
102 - # apply various patches, many borrowed from Fedora
103 - # https://src.fedoraproject.org/rpms/ghostscript
104 - # and Debian
105 - # https://salsa.debian.org/printing-team/ghostscript/tree/debian/master/debian/patches
106 - eapply "${WORKDIR}/patches/"*.patch
107 - fi
108 -
109 - default
110 -
111 - # remove internal copies of various libraries
112 - rm -r cups/libs || die
113 - rm -r freetype || die
114 - rm -r jbig2dec || die
115 - rm -r jpeg || die
116 - rm -r lcms2mt || die
117 - rm -r libpng || die
118 - rm -r tiff || die
119 - rm -r zlib || die
120 - rm -r openjpeg || die
121 - # remove internal CMaps (CMaps from poppler-data are used instead)
122 - rm -r Resource/CMap || die
123 -
124 - if ! use gtk ; then
125 - sed -e "s:\$(GSSOX)::" \
126 - -e "s:.*\$(GSSOX_XENAME)$::" \
127 - -i base/unix-dll.mak || die "sed failed"
128 - fi
129 -
130 - # Force the include dirs to a neutral location.
131 - sed -e "/^ZLIBDIR=/s:=.*:=${T}:" \
132 - -i configure.ac || die
133 - # Some files depend on zlib.h directly. Redirect them. #573248
134 - # Also make sure to not define OPJ_STATIC to avoid linker errors due to
135 - # hidden symbols (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203327#c1)
136 - sed -e '/^zlib_h/s:=.*:=:' \
137 - -e 's|-DOPJ_STATIC ||' \
138 - -i base/lib.mak || die
139 -
140 - # search path fix
141 - # put LDFLAGS after BINDIR, bug #383447
142 - sed -e "s:\$\(gsdatadir\)/lib:@datarootdir@/ghostscript/${PVM}/$(get_libdir):" \
143 - -e "s:exdir=.*:exdir=@datarootdir@/doc/${PF}/examples:" \
144 - -e "s:docdir=.*:docdir=@datarootdir@/doc/${PF}/html:" \
145 - -e "s:GS_DOCDIR=.*:GS_DOCDIR=@datarootdir@/doc/${PF}/html:" \
146 - -e 's:-L$(BINDIR):& $(LDFLAGS):g' \
147 - -i Makefile.in base/*.mak || die "sed failed"
148 -
149 - # remove incorrect symlink, bug 590384
150 - rm ijs/ltmain.sh || die
151 - eautoreconf
152 -
153 - cd ijs || die
154 - eautoreconf
155 -}
156 -
157 -src_configure() {
158 - local FONTPATH
159 - for path in \
160 - "${EPREFIX}"/usr/share/fonts/urw-fonts \
161 - "${EPREFIX}"/usr/share/fonts/Type1 \
162 - "${EPREFIX}"/usr/share/fonts \
163 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-CNS1 \
164 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-GB1 \
165 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan1 \
166 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan2 \
167 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Korea1
168 - do
169 - FONTPATH="$FONTPATH${FONTPATH:+:}${EPREFIX}$path"
170 - done
171 -
172 - PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) \
173 - econf \
174 - --enable-dynamic \
175 - --enable-freetype \
176 - --enable-fontconfig \
177 - --enable-openjpeg \
178 - --disable-compile-inits \
179 - --with-drivers=ALL \
180 - --with-fontpath="$FONTPATH" \
181 - --with-ijs \
182 - --with-jbig2dec \
183 - --with-libpaper \
184 - --with-system-libtiff \
185 - --without-luratech \
186 - $(use_enable cups) \
187 - $(use_enable dbus) \
188 - $(use_enable gtk) \
189 - $(use_with cups pdftoraster) \
190 - $(use_with unicode libidn) \
191 - $(use_with X x)
192 -
193 - cd "${S}/ijs" || die
194 - econf \
195 - --enable-shared \
196 - $(use_enable static-libs static)
197 -}
198 -
199 -src_compile() {
200 - emake so all
201 -
202 - cd ijs || die
203 - emake
204 -}
205 -
206 -src_install() {
207 - emake DESTDIR="${D}" install-so install
208 -
209 - # move gsc to gs, bug #343447
210 - # gsc collides with gambit, bug #253064
211 - mv -f "${ED}"/usr/bin/{gsc,gs} || die
212 -
213 - cd "${S}/ijs" || die
214 - emake DESTDIR="${D}" install
215 -
216 - # install the CMaps from poppler-data properly, bug #409361
217 - dosym ../../../poppler/cMaps "/usr/share/ghostscript/${PVM}/Resource/CMap"
218 -
219 - if ! use static-libs; then
220 - find "${ED}" -name '*.la' -delete || die
221 - fi
222 -
223 - if ! use l10n_de; then
224 - rm -r "${ED}"/usr/share/man/de || die
225 - fi
226 -}
227
228 diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.1.ebuild
229 deleted file mode 100644
230 index 0d3acf4a9d1..00000000000
231 --- a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.1.ebuild
232 +++ /dev/null
233 @@ -1,189 +0,0 @@
234 -# Copyright 1999-2020 Gentoo Authors
235 -# Distributed under the terms of the GNU General Public License v2
236 -
237 -EAPI=7
238 -
239 -inherit autotools flag-o-matic toolchain-funcs
240 -
241 -DESCRIPTION="Interpreter for the PostScript language and PDF"
242 -HOMEPAGE="https://ghostscript.com/"
243 -
244 -MY_PN=${PN/-gpl}
245 -MY_P="${MY_PN}-${PV/_}"
246 -PVM=$(ver_cut 1-2)
247 -PVM_S=$(ver_rs 1-2 "")
248 -
249 -MY_PATCHSET="ghostscript-gpl-9.53-patchset-01.tar.xz"
250 -
251 -SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVM_S}/${MY_P}.tar.xz"
252 -
253 -if [[ -n "${MY_PATCHSET}" ]] ; then
254 - SRC_URI+=" https://dev.gentoo.org/~whissi/dist/ghostscript-gpl/${MY_PATCHSET}"
255 -fi
256 -
257 -LICENSE="AGPL-3 CPL-1.0"
258 -SLOT="0"
259 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
260 -IUSE="cups dbus gtk l10n_de static-libs unicode X"
261 -
262 -LANGS="ja ko zh-CN zh-TW"
263 -for X in ${LANGS} ; do
264 - IUSE="${IUSE} l10n_${X}"
265 -done
266 -
267 -DEPEND="
268 - app-text/libpaper
269 - media-libs/fontconfig
270 - >=media-libs/freetype-2.4.9:2=
271 - >=media-libs/jbig2dec-0.19:=
272 - >=media-libs/lcms-2.6:2
273 - >=media-libs/libpng-1.6.2:0=
274 - >=media-libs/openjpeg-2.1.0:2=
275 - >=media-libs/tiff-4.0.1:0=
276 - >=sys-libs/zlib-1.2.7
277 - virtual/jpeg:0
278 - cups? ( >=net-print/cups-1.3.8 )
279 - dbus? ( sys-apps/dbus )
280 - gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
281 - unicode? ( net-dns/libidn:0= )
282 - X? ( x11-libs/libXt x11-libs/libXext )
283 -"
284 -BDEPEND="virtual/pkgconfig"
285 -RDEPEND="${DEPEND}
286 - app-text/poppler-data
287 - >=media-fonts/urw-fonts-2.4.9
288 - l10n_ja? ( media-fonts/kochi-substitute )
289 - l10n_ko? ( media-fonts/baekmuk-fonts )
290 - l10n_zh-CN? ( media-fonts/arphicfonts )
291 - l10n_zh-TW? ( media-fonts/arphicfonts )
292 -"
293 -
294 -S="${WORKDIR}/${MY_P}"
295 -
296 -src_prepare() {
297 - if [[ -n "${MY_PATCHSET}" ]] ; then
298 - # apply various patches, many borrowed from Fedora
299 - # https://src.fedoraproject.org/rpms/ghostscript
300 - # and Debian
301 - # https://salsa.debian.org/printing-team/ghostscript/tree/debian/master/debian/patches
302 - eapply "${WORKDIR}/patches/"*.patch
303 - fi
304 -
305 - default
306 -
307 - # remove internal copies of various libraries
308 - rm -r cups/libs || die
309 - rm -r freetype || die
310 - rm -r jbig2dec || die
311 - rm -r jpeg || die
312 - rm -r lcms2mt || die
313 - rm -r libpng || die
314 - rm -r tiff || die
315 - rm -r zlib || die
316 - rm -r openjpeg || die
317 - # remove internal CMaps (CMaps from poppler-data are used instead)
318 - rm -r Resource/CMap || die
319 -
320 - if ! use gtk ; then
321 - sed -e "s:\$(GSSOX)::" \
322 - -e "s:.*\$(GSSOX_XENAME)$::" \
323 - -i base/unix-dll.mak || die "sed failed"
324 - fi
325 -
326 - # Force the include dirs to a neutral location.
327 - sed -e "/^ZLIBDIR=/s:=.*:=${T}:" \
328 - -i configure.ac || die
329 - # Some files depend on zlib.h directly. Redirect them. #573248
330 - # Also make sure to not define OPJ_STATIC to avoid linker errors due to
331 - # hidden symbols (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203327#c1)
332 - sed -e '/^zlib_h/s:=.*:=:' \
333 - -e 's|-DOPJ_STATIC ||' \
334 - -i base/lib.mak || die
335 -
336 - # search path fix
337 - # put LDFLAGS after BINDIR, bug #383447
338 - sed -e "s:\$\(gsdatadir\)/lib:@datarootdir@/ghostscript/${PVM}/$(get_libdir):" \
339 - -e "s:exdir=.*:exdir=@datarootdir@/doc/${PF}/examples:" \
340 - -e "s:docdir=.*:docdir=@datarootdir@/doc/${PF}/html:" \
341 - -e "s:GS_DOCDIR=.*:GS_DOCDIR=@datarootdir@/doc/${PF}/html:" \
342 - -e 's:-L$(BINDIR):& $(LDFLAGS):g' \
343 - -i Makefile.in base/*.mak || die "sed failed"
344 -
345 - # remove incorrect symlink, bug 590384
346 - rm ijs/ltmain.sh || die
347 - eautoreconf
348 -
349 - cd ijs || die
350 - eautoreconf
351 -}
352 -
353 -src_configure() {
354 - local FONTPATH
355 - for path in \
356 - "${EPREFIX}"/usr/share/fonts/urw-fonts \
357 - "${EPREFIX}"/usr/share/fonts/Type1 \
358 - "${EPREFIX}"/usr/share/fonts \
359 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-CNS1 \
360 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-GB1 \
361 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan1 \
362 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan2 \
363 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Korea1
364 - do
365 - FONTPATH="$FONTPATH${FONTPATH:+:}${EPREFIX}$path"
366 - done
367 -
368 - PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) \
369 - econf \
370 - --enable-dynamic \
371 - --enable-freetype \
372 - --enable-fontconfig \
373 - --enable-openjpeg \
374 - --disable-compile-inits \
375 - --with-drivers=ALL \
376 - --with-fontpath="$FONTPATH" \
377 - --with-ijs \
378 - --with-jbig2dec \
379 - --with-libpaper \
380 - --with-system-libtiff \
381 - --without-luratech \
382 - $(use_enable cups) \
383 - $(use_enable dbus) \
384 - $(use_enable gtk) \
385 - $(use_with cups pdftoraster) \
386 - $(use_with unicode libidn) \
387 - $(use_with X x)
388 -
389 - cd "${S}/ijs" || die
390 - econf \
391 - --enable-shared \
392 - $(use_enable static-libs static)
393 -}
394 -
395 -src_compile() {
396 - emake so all
397 -
398 - cd ijs || die
399 - emake
400 -}
401 -
402 -src_install() {
403 - emake DESTDIR="${D}" install-so install
404 -
405 - # move gsc to gs, bug #343447
406 - # gsc collides with gambit, bug #253064
407 - mv -f "${ED}"/usr/bin/{gsc,gs} || die
408 -
409 - cd "${S}/ijs" || die
410 - emake DESTDIR="${D}" install
411 -
412 - # install the CMaps from poppler-data properly, bug #409361
413 - dosym ../../../poppler/cMaps "/usr/share/ghostscript/${PVM}/Resource/CMap"
414 -
415 - if ! use static-libs; then
416 - find "${ED}" -name '*.la' -delete || die
417 - fi
418 -
419 - if ! use l10n_de; then
420 - rm -r "${ED}"/usr/share/man/de || die
421 - fi
422 -}
423
424 diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.2.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.2.ebuild
425 deleted file mode 100644
426 index 0d3acf4a9d1..00000000000
427 --- a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.2.ebuild
428 +++ /dev/null
429 @@ -1,189 +0,0 @@
430 -# Copyright 1999-2020 Gentoo Authors
431 -# Distributed under the terms of the GNU General Public License v2
432 -
433 -EAPI=7
434 -
435 -inherit autotools flag-o-matic toolchain-funcs
436 -
437 -DESCRIPTION="Interpreter for the PostScript language and PDF"
438 -HOMEPAGE="https://ghostscript.com/"
439 -
440 -MY_PN=${PN/-gpl}
441 -MY_P="${MY_PN}-${PV/_}"
442 -PVM=$(ver_cut 1-2)
443 -PVM_S=$(ver_rs 1-2 "")
444 -
445 -MY_PATCHSET="ghostscript-gpl-9.53-patchset-01.tar.xz"
446 -
447 -SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVM_S}/${MY_P}.tar.xz"
448 -
449 -if [[ -n "${MY_PATCHSET}" ]] ; then
450 - SRC_URI+=" https://dev.gentoo.org/~whissi/dist/ghostscript-gpl/${MY_PATCHSET}"
451 -fi
452 -
453 -LICENSE="AGPL-3 CPL-1.0"
454 -SLOT="0"
455 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
456 -IUSE="cups dbus gtk l10n_de static-libs unicode X"
457 -
458 -LANGS="ja ko zh-CN zh-TW"
459 -for X in ${LANGS} ; do
460 - IUSE="${IUSE} l10n_${X}"
461 -done
462 -
463 -DEPEND="
464 - app-text/libpaper
465 - media-libs/fontconfig
466 - >=media-libs/freetype-2.4.9:2=
467 - >=media-libs/jbig2dec-0.19:=
468 - >=media-libs/lcms-2.6:2
469 - >=media-libs/libpng-1.6.2:0=
470 - >=media-libs/openjpeg-2.1.0:2=
471 - >=media-libs/tiff-4.0.1:0=
472 - >=sys-libs/zlib-1.2.7
473 - virtual/jpeg:0
474 - cups? ( >=net-print/cups-1.3.8 )
475 - dbus? ( sys-apps/dbus )
476 - gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
477 - unicode? ( net-dns/libidn:0= )
478 - X? ( x11-libs/libXt x11-libs/libXext )
479 -"
480 -BDEPEND="virtual/pkgconfig"
481 -RDEPEND="${DEPEND}
482 - app-text/poppler-data
483 - >=media-fonts/urw-fonts-2.4.9
484 - l10n_ja? ( media-fonts/kochi-substitute )
485 - l10n_ko? ( media-fonts/baekmuk-fonts )
486 - l10n_zh-CN? ( media-fonts/arphicfonts )
487 - l10n_zh-TW? ( media-fonts/arphicfonts )
488 -"
489 -
490 -S="${WORKDIR}/${MY_P}"
491 -
492 -src_prepare() {
493 - if [[ -n "${MY_PATCHSET}" ]] ; then
494 - # apply various patches, many borrowed from Fedora
495 - # https://src.fedoraproject.org/rpms/ghostscript
496 - # and Debian
497 - # https://salsa.debian.org/printing-team/ghostscript/tree/debian/master/debian/patches
498 - eapply "${WORKDIR}/patches/"*.patch
499 - fi
500 -
501 - default
502 -
503 - # remove internal copies of various libraries
504 - rm -r cups/libs || die
505 - rm -r freetype || die
506 - rm -r jbig2dec || die
507 - rm -r jpeg || die
508 - rm -r lcms2mt || die
509 - rm -r libpng || die
510 - rm -r tiff || die
511 - rm -r zlib || die
512 - rm -r openjpeg || die
513 - # remove internal CMaps (CMaps from poppler-data are used instead)
514 - rm -r Resource/CMap || die
515 -
516 - if ! use gtk ; then
517 - sed -e "s:\$(GSSOX)::" \
518 - -e "s:.*\$(GSSOX_XENAME)$::" \
519 - -i base/unix-dll.mak || die "sed failed"
520 - fi
521 -
522 - # Force the include dirs to a neutral location.
523 - sed -e "/^ZLIBDIR=/s:=.*:=${T}:" \
524 - -i configure.ac || die
525 - # Some files depend on zlib.h directly. Redirect them. #573248
526 - # Also make sure to not define OPJ_STATIC to avoid linker errors due to
527 - # hidden symbols (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203327#c1)
528 - sed -e '/^zlib_h/s:=.*:=:' \
529 - -e 's|-DOPJ_STATIC ||' \
530 - -i base/lib.mak || die
531 -
532 - # search path fix
533 - # put LDFLAGS after BINDIR, bug #383447
534 - sed -e "s:\$\(gsdatadir\)/lib:@datarootdir@/ghostscript/${PVM}/$(get_libdir):" \
535 - -e "s:exdir=.*:exdir=@datarootdir@/doc/${PF}/examples:" \
536 - -e "s:docdir=.*:docdir=@datarootdir@/doc/${PF}/html:" \
537 - -e "s:GS_DOCDIR=.*:GS_DOCDIR=@datarootdir@/doc/${PF}/html:" \
538 - -e 's:-L$(BINDIR):& $(LDFLAGS):g' \
539 - -i Makefile.in base/*.mak || die "sed failed"
540 -
541 - # remove incorrect symlink, bug 590384
542 - rm ijs/ltmain.sh || die
543 - eautoreconf
544 -
545 - cd ijs || die
546 - eautoreconf
547 -}
548 -
549 -src_configure() {
550 - local FONTPATH
551 - for path in \
552 - "${EPREFIX}"/usr/share/fonts/urw-fonts \
553 - "${EPREFIX}"/usr/share/fonts/Type1 \
554 - "${EPREFIX}"/usr/share/fonts \
555 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-CNS1 \
556 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-GB1 \
557 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan1 \
558 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan2 \
559 - "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Korea1
560 - do
561 - FONTPATH="$FONTPATH${FONTPATH:+:}${EPREFIX}$path"
562 - done
563 -
564 - PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) \
565 - econf \
566 - --enable-dynamic \
567 - --enable-freetype \
568 - --enable-fontconfig \
569 - --enable-openjpeg \
570 - --disable-compile-inits \
571 - --with-drivers=ALL \
572 - --with-fontpath="$FONTPATH" \
573 - --with-ijs \
574 - --with-jbig2dec \
575 - --with-libpaper \
576 - --with-system-libtiff \
577 - --without-luratech \
578 - $(use_enable cups) \
579 - $(use_enable dbus) \
580 - $(use_enable gtk) \
581 - $(use_with cups pdftoraster) \
582 - $(use_with unicode libidn) \
583 - $(use_with X x)
584 -
585 - cd "${S}/ijs" || die
586 - econf \
587 - --enable-shared \
588 - $(use_enable static-libs static)
589 -}
590 -
591 -src_compile() {
592 - emake so all
593 -
594 - cd ijs || die
595 - emake
596 -}
597 -
598 -src_install() {
599 - emake DESTDIR="${D}" install-so install
600 -
601 - # move gsc to gs, bug #343447
602 - # gsc collides with gambit, bug #253064
603 - mv -f "${ED}"/usr/bin/{gsc,gs} || die
604 -
605 - cd "${S}/ijs" || die
606 - emake DESTDIR="${D}" install
607 -
608 - # install the CMaps from poppler-data properly, bug #409361
609 - dosym ../../../poppler/cMaps "/usr/share/ghostscript/${PVM}/Resource/CMap"
610 -
611 - if ! use static-libs; then
612 - find "${ED}" -name '*.la' -delete || die
613 - fi
614 -
615 - if ! use l10n_de; then
616 - rm -r "${ED}"/usr/share/man/de || die
617 - fi
618 -}