Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/poppler-data/
Date: Sat, 01 Oct 2022 06:56:30
Message-Id: 1664607123.f7d3daf96af5d450b3f983df77129c5aeac3c376.sam@gentoo
1 commit: f7d3daf96af5d450b3f983df77129c5aeac3c376
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 1 06:49:48 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 1 06:52:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7d3daf9
7
8 app-text/poppler-data: add additional cMaps files needed by ghostscript
9
10 Quoting John from the Bug;
11 >Ghostscript's official binary is built with bundled CMaps; on Gentoo, these are unbundled
12 >in favor of those provided by app-text/poppler-data. Ghostscript's CMaps include 3 files
13 >missing from poppler-data: Identity-H, Identity-V, and Identity-UTF16-H (CMap
14 >resources for the special-purpose Adobe Identity-0 ROS), and the lack of these files is causing this issue.
15 >
16 >Fedora and Arch avoid this problem by using GS-bundled CMaps, while Debian
17 >(and older versions of Fedora) relies on CMaps from poppler-data (like Gentoo does)
18 >and includes the missing files in their poppler-data package, installing them to
19 >/usr/share/poppler/cMap. (According to Debian, upstream poppler-data refuses to include them.)
20 >
21 >Two of these files are provided by Adobe Type Tools:
22 >https://github.com/adobe-type-tools/cmap-resources/tree/master/Adobe-Identity-0/CMap
23 >
24 >and the third is from Artifex themselves:
25 >http://git.ghostscript.com/?p=ghostpdl.git;a=blob;f=Resource/CMap/Identity-UTF16-H;hb=HEAD
26 >
27 >You can copy these 3 files to /usr/share/poppler/cMaps for a quick-and-dirty verification that
28 >they resolve the issue; by doing so, I was able to produce a match for gs-fail-good.jpg and
29 >pass the WeasyPrint test suite using ghostscript-gpl-9.56.1 (and 10.0). Including
30 >these files with poppler-data seems like the best approach. (As noted in
31 >Ghostscript's LICENSE file, Identity-UTF16-H is licensed under AGPL-3+.)
32
33 Bug: https://bugs.gentoo.org/844115
34 Thanks-to: John Wudrick <prochronism <AT> gmail.com>
35 Signed-off-by: Sam James <sam <AT> gentoo.org>
36
37 app-text/poppler-data/Manifest | 1 +
38 .../poppler-data/poppler-data-0.4.11-r1.ebuild | 27 ++++++++++++++++++++++
39 2 files changed, 28 insertions(+)
40
41 diff --git a/app-text/poppler-data/Manifest b/app-text/poppler-data/Manifest
42 index 3fe0df6c9ad8..9c070bc8218f 100644
43 --- a/app-text/poppler-data/Manifest
44 +++ b/app-text/poppler-data/Manifest
45 @@ -1 +1,2 @@
46 +DIST poppler-data-0.4.11-extra.tar.xz 3092 BLAKE2B 37d54a15a3725d4fe8c78ac2cb18cb4cc43cc65929822b6e4ac5e17c70f97dd3f4b144c34b4cb1c2439e58d379a61b6b348bc93304a1b730a6e37dd304c763ad SHA512 639dd5467cb06cb417dc1b09ca9db1f7233f902a54220899be3199a1081b91c69ff063f133080175312098ac8078ab8e2c4c91c89b460e8b92e6192f18395531
47 DIST poppler-data-0.4.11.tar.gz 4497282 BLAKE2B 01f0f9f3d933f45683a702c4d538d8fc59874512290f199b601c16f98f9b596ff249fbc992574d046931cc80f3685f94733248450d3a54f2f961951cdeda7c39 SHA512 a5b7ace28d1677e12f7500ab6345b277dc22cd48ace8d472c083933416879edf4da4efe8217b0e11f75a3387ed98d832fe50567884095b6c0e09ebd8802b0f32
48
49 diff --git a/app-text/poppler-data/poppler-data-0.4.11-r1.ebuild b/app-text/poppler-data/poppler-data-0.4.11-r1.ebuild
50 new file mode 100644
51 index 000000000000..c65bde103305
52 --- /dev/null
53 +++ b/app-text/poppler-data/poppler-data-0.4.11-r1.ebuild
54 @@ -0,0 +1,27 @@
55 +# Copyright 1999-2022 Gentoo Authors
56 +# Distributed under the terms of the GNU General Public License v2
57 +
58 +EAPI=8
59 +
60 +POPPLER_DATA_EXTRA_VERSION="0.4.11"
61 +DESCRIPTION="Data files for poppler to support uncommon encodings without xpdfrc"
62 +HOMEPAGE="https://poppler.freedesktop.org/"
63 +SRC_URI="https://poppler.freedesktop.org/${P}.tar.gz"
64 +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${POPPLER_DATA_EXTRA_VERSION}-extra.tar.xz"
65 +
66 +# AGPL-3+ for the extra files needed by ghostscript, bug #844115
67 +LICENSE="AGPL-3+ BSD GPL-2 MIT"
68 +SLOT="0"
69 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
70 +
71 +src_install() {
72 + emake prefix="${EPREFIX}"/usr DESTDIR="${D}" install
73 +
74 + # We need to include extra cMaps for ghostscript, bug #844115
75 + cp "${WORKDIR}"/${PN}-${POPPLER_DATA_EXTRA_VERSION}-extra/Identity-* "${ED}"/usr/share/poppler/cMap || die
76 +
77 + # bug #409361
78 + dodir /usr/share/poppler/cMaps
79 + cd "${ED}"/usr/share/poppler/cMaps || die
80 + find ../cMap -type f -exec ln -s {} . \; || die
81 +}