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: Fri, 11 Sep 2020 19:40:56
Message-Id: 1599853135.504289cf7fdfcb646cbaac6cf5c40866a391fd33.whissi@gentoo
1 commit: 504289cf7fdfcb646cbaac6cf5c40866a391fd33
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 11 18:16:59 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 11 19:38:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=504289cf
7
8 app-text/ghostscript-gpl: bump to v9.53.0
9
10 TIFF support is no longer optional [Link 1].
11
12 Link 1: https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=3ff82b33f24ed54c2d3bb88ec31da7d2f9fd2765
13 Package-Manager: Portage-3.0.6, Repoman-3.0.1
14 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
15
16 app-text/ghostscript-gpl/Manifest | 2 +
17 .../ghostscript-gpl/ghostscript-gpl-9.53.0.ebuild | 189 +++++++++++++++++++++
18 2 files changed, 191 insertions(+)
19
20 diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
21 index 9f440620d33..829de82eead 100644
22 --- a/app-text/ghostscript-gpl/Manifest
23 +++ b/app-text/ghostscript-gpl/Manifest
24 @@ -1,2 +1,4 @@
25 DIST ghostscript-9.52.tar.xz 39711040 BLAKE2B 317042ae7e2bfdeded2ae9d9a1bd1521422d1ce1dd6b9b2cdedf4c503cce1285684d5329663dc8ee7263591761c33254827d16b1a93f8c10aad4baab1d859f93 SHA512 4c4a33884e1138bad553eee61fac1a72158297ad5c2ce46a4b36150848dea8158affaf2b902f4ff03e4f72ebc8154c198b618112624f409230a610b7648faa67
26 +DIST ghostscript-9.53.0.tar.xz 41358720 BLAKE2B 9a8b5872dc799f14759033685c37890f2da28450b1e115fcc63a2a920bb22bfc02db078d3f39dc62778da2a2518b82c2fc91f349486e83914c88c70d1e15d7e8 SHA512 fa594ef99e58257074b651e4d078bd1025f7bc2c435cd2a5454ba59c2a98cc82e93339ccd1eaa4fe624275165aacefeabc6f8336476027946f56aeb02e93da30
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
30 diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.0.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.0.ebuild
31 new file mode 100644
32 index 00000000000..0d3acf4a9d1
33 --- /dev/null
34 +++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.0.ebuild
35 @@ -0,0 +1,189 @@
36 +# Copyright 1999-2020 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +inherit autotools flag-o-matic toolchain-funcs
42 +
43 +DESCRIPTION="Interpreter for the PostScript language and PDF"
44 +HOMEPAGE="https://ghostscript.com/"
45 +
46 +MY_PN=${PN/-gpl}
47 +MY_P="${MY_PN}-${PV/_}"
48 +PVM=$(ver_cut 1-2)
49 +PVM_S=$(ver_rs 1-2 "")
50 +
51 +MY_PATCHSET="ghostscript-gpl-9.53-patchset-01.tar.xz"
52 +
53 +SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVM_S}/${MY_P}.tar.xz"
54 +
55 +if [[ -n "${MY_PATCHSET}" ]] ; then
56 + SRC_URI+=" https://dev.gentoo.org/~whissi/dist/ghostscript-gpl/${MY_PATCHSET}"
57 +fi
58 +
59 +LICENSE="AGPL-3 CPL-1.0"
60 +SLOT="0"
61 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
62 +IUSE="cups dbus gtk l10n_de static-libs unicode X"
63 +
64 +LANGS="ja ko zh-CN zh-TW"
65 +for X in ${LANGS} ; do
66 + IUSE="${IUSE} l10n_${X}"
67 +done
68 +
69 +DEPEND="
70 + app-text/libpaper
71 + media-libs/fontconfig
72 + >=media-libs/freetype-2.4.9:2=
73 + >=media-libs/jbig2dec-0.19:=
74 + >=media-libs/lcms-2.6:2
75 + >=media-libs/libpng-1.6.2:0=
76 + >=media-libs/openjpeg-2.1.0:2=
77 + >=media-libs/tiff-4.0.1:0=
78 + >=sys-libs/zlib-1.2.7
79 + virtual/jpeg:0
80 + cups? ( >=net-print/cups-1.3.8 )
81 + dbus? ( sys-apps/dbus )
82 + gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
83 + unicode? ( net-dns/libidn:0= )
84 + X? ( x11-libs/libXt x11-libs/libXext )
85 +"
86 +BDEPEND="virtual/pkgconfig"
87 +RDEPEND="${DEPEND}
88 + app-text/poppler-data
89 + >=media-fonts/urw-fonts-2.4.9
90 + l10n_ja? ( media-fonts/kochi-substitute )
91 + l10n_ko? ( media-fonts/baekmuk-fonts )
92 + l10n_zh-CN? ( media-fonts/arphicfonts )
93 + l10n_zh-TW? ( media-fonts/arphicfonts )
94 +"
95 +
96 +S="${WORKDIR}/${MY_P}"
97 +
98 +src_prepare() {
99 + if [[ -n "${MY_PATCHSET}" ]] ; then
100 + # apply various patches, many borrowed from Fedora
101 + # https://src.fedoraproject.org/rpms/ghostscript
102 + # and Debian
103 + # https://salsa.debian.org/printing-team/ghostscript/tree/debian/master/debian/patches
104 + eapply "${WORKDIR}/patches/"*.patch
105 + fi
106 +
107 + default
108 +
109 + # remove internal copies of various libraries
110 + rm -r cups/libs || die
111 + rm -r freetype || die
112 + rm -r jbig2dec || die
113 + rm -r jpeg || die
114 + rm -r lcms2mt || die
115 + rm -r libpng || die
116 + rm -r tiff || die
117 + rm -r zlib || die
118 + rm -r openjpeg || die
119 + # remove internal CMaps (CMaps from poppler-data are used instead)
120 + rm -r Resource/CMap || die
121 +
122 + if ! use gtk ; then
123 + sed -e "s:\$(GSSOX)::" \
124 + -e "s:.*\$(GSSOX_XENAME)$::" \
125 + -i base/unix-dll.mak || die "sed failed"
126 + fi
127 +
128 + # Force the include dirs to a neutral location.
129 + sed -e "/^ZLIBDIR=/s:=.*:=${T}:" \
130 + -i configure.ac || die
131 + # Some files depend on zlib.h directly. Redirect them. #573248
132 + # Also make sure to not define OPJ_STATIC to avoid linker errors due to
133 + # hidden symbols (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203327#c1)
134 + sed -e '/^zlib_h/s:=.*:=:' \
135 + -e 's|-DOPJ_STATIC ||' \
136 + -i base/lib.mak || die
137 +
138 + # search path fix
139 + # put LDFLAGS after BINDIR, bug #383447
140 + sed -e "s:\$\(gsdatadir\)/lib:@datarootdir@/ghostscript/${PVM}/$(get_libdir):" \
141 + -e "s:exdir=.*:exdir=@datarootdir@/doc/${PF}/examples:" \
142 + -e "s:docdir=.*:docdir=@datarootdir@/doc/${PF}/html:" \
143 + -e "s:GS_DOCDIR=.*:GS_DOCDIR=@datarootdir@/doc/${PF}/html:" \
144 + -e 's:-L$(BINDIR):& $(LDFLAGS):g' \
145 + -i Makefile.in base/*.mak || die "sed failed"
146 +
147 + # remove incorrect symlink, bug 590384
148 + rm ijs/ltmain.sh || die
149 + eautoreconf
150 +
151 + cd ijs || die
152 + eautoreconf
153 +}
154 +
155 +src_configure() {
156 + local FONTPATH
157 + for path in \
158 + "${EPREFIX}"/usr/share/fonts/urw-fonts \
159 + "${EPREFIX}"/usr/share/fonts/Type1 \
160 + "${EPREFIX}"/usr/share/fonts \
161 + "${EPREFIX}"/usr/share/poppler/cMap/Adobe-CNS1 \
162 + "${EPREFIX}"/usr/share/poppler/cMap/Adobe-GB1 \
163 + "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan1 \
164 + "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan2 \
165 + "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Korea1
166 + do
167 + FONTPATH="$FONTPATH${FONTPATH:+:}${EPREFIX}$path"
168 + done
169 +
170 + PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) \
171 + econf \
172 + --enable-dynamic \
173 + --enable-freetype \
174 + --enable-fontconfig \
175 + --enable-openjpeg \
176 + --disable-compile-inits \
177 + --with-drivers=ALL \
178 + --with-fontpath="$FONTPATH" \
179 + --with-ijs \
180 + --with-jbig2dec \
181 + --with-libpaper \
182 + --with-system-libtiff \
183 + --without-luratech \
184 + $(use_enable cups) \
185 + $(use_enable dbus) \
186 + $(use_enable gtk) \
187 + $(use_with cups pdftoraster) \
188 + $(use_with unicode libidn) \
189 + $(use_with X x)
190 +
191 + cd "${S}/ijs" || die
192 + econf \
193 + --enable-shared \
194 + $(use_enable static-libs static)
195 +}
196 +
197 +src_compile() {
198 + emake so all
199 +
200 + cd ijs || die
201 + emake
202 +}
203 +
204 +src_install() {
205 + emake DESTDIR="${D}" install-so install
206 +
207 + # move gsc to gs, bug #343447
208 + # gsc collides with gambit, bug #253064
209 + mv -f "${ED}"/usr/bin/{gsc,gs} || die
210 +
211 + cd "${S}/ijs" || die
212 + emake DESTDIR="${D}" install
213 +
214 + # install the CMaps from poppler-data properly, bug #409361
215 + dosym ../../../poppler/cMaps "/usr/share/ghostscript/${PVM}/Resource/CMap"
216 +
217 + if ! use static-libs; then
218 + find "${ED}" -name '*.la' -delete || die
219 + fi
220 +
221 + if ! use l10n_de; then
222 + rm -r "${ED}"/usr/share/man/de || die
223 + fi
224 +}