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: Wed, 20 Oct 2021 16:41:10
Message-Id: 1634747930.ac4002ffa297d8b97c498e23bd24c0367ec57137.whissi@gentoo
1 commit: ac4002ffa297d8b97c498e23bd24c0367ec57137
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 20 16:38:50 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 20 16:38:50 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac4002ff
7
8 app-text/ghostscript-gpl: bump to v9.55.0
9
10 Closes: https://bugs.gentoo.org/817941
11 Package-Manager: Portage-3.0.28, Repoman-3.0.3
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 app-text/ghostscript-gpl/Manifest | 2 +
15 .../ghostscript-gpl/ghostscript-gpl-9.55.0.ebuild | 189 +++++++++++++++++++++
16 2 files changed, 191 insertions(+)
17
18 diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
19 index 6bdcc0767c2..c4e41390ab8 100644
20 --- a/app-text/ghostscript-gpl/Manifest
21 +++ b/app-text/ghostscript-gpl/Manifest
22 @@ -1,6 +1,8 @@
23 DIST ghostscript-9.52.tar.xz 39711040 BLAKE2B 317042ae7e2bfdeded2ae9d9a1bd1521422d1ce1dd6b9b2cdedf4c503cce1285684d5329663dc8ee7263591761c33254827d16b1a93f8c10aad4baab1d859f93 SHA512 4c4a33884e1138bad553eee61fac1a72158297ad5c2ce46a4b36150848dea8158affaf2b902f4ff03e4f72ebc8154c198b618112624f409230a610b7648faa67
24 DIST ghostscript-9.53.3.tar.xz 41368160 BLAKE2B 6b5840a420d7527c7155bfb707fe19b3412bdd3a6707f44d058c20f607e6695cfc878cf5df4c4528686c1c1f488b2dbdb81ef5fdf38b950eb15751d2ebafb0a9 SHA512 eb832c27eecd30f15e346408c592d7096fd23ef0a6fa59bd50ca327578915434530a4868e69249c2594def0910c527302e99d54f0877f726a8ca8bea6f0f17b7
25 DIST ghostscript-9.54.0.tar.xz 56001768 BLAKE2B 4a98b1af74c4b4caf8d263cd5529059304a76884418c90401b0fc9a89e0f5de5417a439f6e08b95374e62158eec65528ef5f949497d5050a6408fb7c87e54aa9 SHA512 a3c96925f4dbf5e276fc543b88df185a0435c68166db15ac532094329ba8db314d739a292da18be7954daaafeeb290e641ea03edf888854d7e752998ec6062cc
26 +DIST ghostscript-9.55.0.tar.xz 67417724 BLAKE2B 87827856aa60c2c4a4ed209bc4203a837107df0404af036a48e5baa23fccfc945a97fe328a80b15c7357fc71acb82721d4b96e5f726d8c9d836fee031916aef7 SHA512 42c7e05ba72e9fdd626c5412187b13fc3c9459cae57dfe49ddd3011bf4e2cbd10bc88f09068a9f777c2ec6ae881cd737fd700ab62ec5108f2aca69152588f38e
27 DIST ghostscript-gpl-9.52-patchset-01.tar.xz 3292 BLAKE2B b6ac4f06c149301b07f57a5dd1f4507cc1e6d17ea60132b64177972ca58a29b2f6ff2f034b20b8ac083b60ea999f50ff75b74f86eec0cd73179741ed8a1486a8 SHA512 2498c5f396807a282727a7a9bd678e2008a1e4112722745aab48a12601661b08557c5d49f0a5ee67fb636f8c2b00c737640e894523b904ef3600f66d107999cb
28 DIST ghostscript-gpl-9.53-patchset-01.tar.xz 2340 BLAKE2B 55d82c88f1b57c084318839e1382ffa112461d074411b1f6586a5a9ace37772b144abdda9f742defd077ce937df590d63bd7a2306bad52438949d1036bb7900c SHA512 ab58485df9152bb32c6f0eb25bd45689089bd17ffb0323c54e1977c5f810ec5eb09f358637251c428591749bfb42c6f8489c74d4bd0a7ae5d696eb2346503c44
29 DIST ghostscript-gpl-9.54-patchset-01.tar.xz 2600 BLAKE2B e89f16f149ba3c46b1e81d774a3dca8345dfb60ec959249292cc0f3d8bc811ac169e232e3fb85de9d0ce65dd41453f90461798007b8b9fdd2c6e44d55e7a9d10 SHA512 0c49fbe6ece86b0c7729421cf06a6a210341fbe676efd89c0f97c96a426d3156e6a8ee596e050b8ee6a1af7a94ea8d1d54a6166f020a7d40fec95949cd7f3b12
30 +DIST ghostscript-gpl-9.55-patchset-01.tar.xz 2940 BLAKE2B 450498f0bd191d5936de1c2bdff659f075c39f7f7fefaf85b438f51967c4a8c294c6c887b36d5c0429d3677fb06e171e77da4b81ec911efea96df5b107d489dc SHA512 87411e68a078f77171128392962a9cd7a639bf6082447c658a50017cbf3f4e3ebce63af46eb9befdf2c1317de3a7a17e389f4de6e3aeae83d519b1c7b36de3c8
31
32 diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.55.0.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.55.0.ebuild
33 new file mode 100644
34 index 00000000000..b79047df112
35 --- /dev/null
36 +++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.55.0.ebuild
37 @@ -0,0 +1,189 @@
38 +# Copyright 1999-2021 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=8
42 +
43 +inherit autotools 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.55-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/$(ver_cut 1-2)"
63 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
64 +IUSE="cups dbus gtk +jpeg2k 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/tiff-4.0.1:0=
79 + >=sys-libs/zlib-1.2.7
80 + virtual/jpeg:0
81 + cups? ( >=net-print/cups-1.3.8 )
82 + dbus? ( sys-apps/dbus )
83 + gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
84 + jpeg2k? ( >=media-libs/openjpeg-2.1.0: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/latest/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/${PV}/$(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 + $(use_enable jpeg2k 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 + $(use_enable cups) \
186 + $(use_enable dbus) \
187 + $(use_enable gtk) \
188 + $(use_with cups pdftoraster) \
189 + $(use_with unicode libidn) \
190 + $(use_with X x) \
191 + DARWIN_LDFLAGS_SO_PREFIX="${EPREFIX}/usr/lib/"
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/${PV}/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 +}