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-9.10-r1.ebuild
Date: Sun, 09 Feb 2014 20:24:56
Message-Id: 20140209202451.7F4C62004C@flycatcher.gentoo.org
1 tgurr 14/02/09 20:24:51
2
3 Modified: ChangeLog
4 Added: ghostscript-gpl-9.10-r1.ebuild
5 Log:
6 Revbump fixing security bug #437654 (CVE-2012-4405). Also include two upsteam patches fixing segfaults.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 5270BA51)
9
10 Revision Changes Path
11 1.161 app-text/ghostscript-gpl/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?rev=1.161&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?rev=1.161&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?r1=1.160&r2=1.161
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v
20 retrieving revision 1.160
21 retrieving revision 1.161
22 diff -u -r1.160 -r1.161
23 --- ChangeLog 22 Oct 2013 15:42:47 -0000 1.160
24 +++ ChangeLog 9 Feb 2014 20:24:51 -0000 1.161
25 @@ -1,6 +1,12 @@
26 # ChangeLog for app-text/ghostscript-gpl
27 -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.160 2013/10/22 15:42:47 dilfridge Exp $
29 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.161 2014/02/09 20:24:51 tgurr Exp $
31 +
32 +*ghostscript-gpl-9.10-r1 (09 Feb 2014)
33 +
34 + 09 Feb 2014; Timo Gurr <tgurr@g.o> +ghostscript-gpl-9.10-r1.ebuild:
35 + Revbump fixing security bug #437654 (CVE-2012-4405). Also include two upsteam
36 + patches fixing segfaults.
37
38 22 Oct 2013; Andreas K. Huettel <dilfridge@g.o>
39 ghostscript-gpl-9.04-r4.ebuild, ghostscript-gpl-9.05-r1.ebuild:
40
41
42
43 1.1 app-text/ghostscript-gpl/ghostscript-gpl-9.10-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.10-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.10-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: ghostscript-gpl-9.10-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.10-r1.ebuild,v 1.1 2014/02/09 20:24:51 tgurr Exp $
53
54 EAPI=5
55
56 inherit autotools eutils multilib versionator flag-o-matic
57
58 DESCRIPTION="Ghostscript is an interpreter for the PostScript language and for PDF"
59 HOMEPAGE="http://ghostscript.com/"
60
61 MY_P=${P/-gpl}
62 GSDJVU_PV=1.6
63 PVM=$(get_version_component_range 1-2)
64 SRC_URI="
65 mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
66 mirror://gentoo/${PN}-9.10-patchset-1.tar.bz2
67 !bindist? ( djvu? ( mirror://sourceforge/djvu/gsdjvu-${GSDJVU_PV}.tar.gz ) )"
68
69 LICENSE="AGPL-3 CPL-1.0"
70 SLOT="0"
71 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
72 IUSE="bindist cups dbus djvu gtk idn linguas_de static-libs X"
73
74 COMMON_DEPEND="
75 app-text/libpaper
76 media-libs/fontconfig
77 >=media-libs/freetype-2.4.9:2=
78 media-libs/jbig2dec
79 >=media-libs/lcms-2.5:2
80 >=media-libs/libpng-1.6.2:0=
81 >=media-libs/tiff-4.0.1:0=
82 >=sys-libs/zlib-1.2.7:=
83 virtual/jpeg:0
84 !bindist? ( djvu? ( app-text/djvu ) )
85 cups? ( >=net-print/cups-1.3.8 )
86 dbus? ( sys-apps/dbus )
87 gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
88 idn? ( net-dns/libidn )
89 X? ( x11-libs/libXt x11-libs/libXext )
90 "
91
92 DEPEND="${COMMON_DEPEND}
93 virtual/pkgconfig
94 "
95
96 RDEPEND="${COMMON_DEPEND}
97 >=app-text/poppler-data-0.4.5-r1
98 >=media-fonts/urw-fonts-2.4.9
99 linguas_ja? ( media-fonts/kochi-substitute )
100 linguas_ko? ( media-fonts/baekmuk-fonts )
101 linguas_zh_CN? ( media-fonts/arphicfonts )
102 linguas_zh_TW? ( media-fonts/arphicfonts )
103 !!media-fonts/gnu-gs-fonts-std
104 !!media-fonts/gnu-gs-fonts-other
105 !<net-print/cups-filters-1.0.36-r2
106 "
107
108 S="${WORKDIR}/${MY_P}"
109
110 LANGS="ja ko zh_CN zh_TW"
111 for X in ${LANGS} ; do
112 IUSE="${IUSE} linguas_${X}"
113 done
114
115 pkg_setup() {
116 if use bindist && use djvu; then
117 ewarn "You have bindist in your USE, djvu support will NOT be compiled!"
118 ewarn "See http://djvu.sourceforge.net/gsdjvu/COPYING for details on licensing issues."
119 fi
120 }
121
122 src_prepare() {
123 # remove internal copies of various libraries
124 rm -rf "${S}"/cups/libs
125 rm -rf "${S}"/expat
126 rm -rf "${S}"/freetype
127 rm -rf "${S}"/icclib
128 rm -rf "${S}"/jbig2dec
129 rm -rf "${S}"/jpeg{,xr}
130 rm -rf "${S}"/lcms{,2}
131 rm -rf "${S}"/libpng
132 rm -rf "${S}"/tiff
133 rm -rf "${S}"/zlib
134 # remove internal urw-fonts
135 rm -rf "${S}"/Resource/Font
136 # remove internal CMaps (CMaps from poppler-data are used instead)
137 rm -rf "${S}"/Resource/CMap
138
139 # apply various patches, many borrowed from Fedora
140 # http://pkgs.fedoraproject.org/gitweb/?p=ghostscript.git
141 EPATCH_SUFFIX="patch" EPATCH_FORCE="yes"
142 EPATCH_SOURCE="${WORKDIR}/patches/"
143 epatch
144
145 if ! use bindist && use djvu ; then
146 unpack gsdjvu-${GSDJVU_PV}.tar.gz
147 cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}"
148 cp gsdjvu-${GSDJVU_PV}/gdevdjvu.c "${S}"/base
149 epatch "${WORKDIR}"/patches-gsdjvu/gsdjvu-1.3-${PN}-8.64.patch
150 cp "${S}"/contrib/contrib.mak "${S}"/base/contrib.mak.gsdjvu
151 grep -q djvusep "${S}"/contrib/contrib.mak || \
152 cat gsdjvu-${GSDJVU_PV}/gsdjvu.mak >> "${S}"/contrib/contrib.mak
153
154 # install ps2utf8.ps, bug #197818
155 cp gsdjvu-${GSDJVU_PV}/ps2utf8.ps "${S}"/lib
156 sed -i -e '/$(EXTRA_INIT_FILES)/ a\ps2utf8.ps \\' \
157 "${S}"/base/unixinst.mak || die "sed failed"
158 fi
159
160 if ! use gtk ; then
161 sed -i -e "s:\$(GSSOX)::" \
162 -e "s:.*\$(GSSOX_XENAME)$::" \
163 "${S}"/base/unix-dll.mak || die "sed failed"
164 fi
165
166 # search path fix
167 sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
168 -e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \
169 -e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \
170 -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \
171 -e 's:-L$(BINDIR):$(LDFLAGS) &:g' \
172 "${S}"/Makefile.in "${S}"/base/*.mak || die "sed failed"
173
174 cd "${S}"
175 eautoreconf
176
177 cd "${S}/ijs"
178 eautoreconf
179 }
180
181 src_configure() {
182 local FONTPATH
183 for path in \
184 /usr/share/fonts/urw-fonts \
185 /usr/share/fonts/Type1 \
186 /usr/share/fonts \
187 /usr/share/poppler/cMap/Adobe-CNS1 \
188 /usr/share/poppler/cMap/Adobe-GB1 \
189 /usr/share/poppler/cMap/Adobe-Japan1 \
190 /usr/share/poppler/cMap/Adobe-Japan2 \
191 /usr/share/poppler/cMap/Adobe-Korea1
192 do
193 FONTPATH="$FONTPATH${FONTPATH:+:}$path"
194 done
195
196 econf \
197 --enable-dynamic \
198 --enable-freetype \
199 --enable-fontconfig \
200 --enable-openjpeg \
201 --disable-compile-inits \
202 --with-drivers=ALL \
203 --with-fontpath="$FONTPATH" \
204 --with-ijs \
205 --with-jbig2dec \
206 --with-libpaper \
207 --with-system-libtiff \
208 --without-lcms \
209 --without-luratech \
210 $(use_enable cups) \
211 $(use_enable dbus) \
212 $(use_enable gtk) \
213 $(use_with cups pdftoraster) \
214 $(use_with idn libidn) \
215 $(use_with X x)
216
217 if ! use bindist && use djvu ; then
218 sed -i -e 's!$(DD)bbox.dev!& $(DD)djvumask.dev $(DD)djvusep.dev!g' \
219 "${S}"/Makefile || die "sed failed"
220 fi
221
222 cd "${S}/ijs"
223 econf \
224 --enable-shared \
225 $(use_enable static-libs static)
226 }
227
228 src_compile() {
229 # workaround: -j1 -> see bug #234378
230 emake -j1 so all
231
232 cd "${S}/ijs"
233 emake
234 }
235
236 src_install() {
237 # workaround: -j1 -> see bug #356303
238 emake -j1 DESTDIR="${D}" install-so install
239
240 if ! use bindist && use djvu ; then
241 dobin gsdjvu
242 fi
243
244 # remove gsc in favor of gambit, bug #253064
245 rm -rf "${D}/usr/bin/gsc"
246
247 cd "${S}/ijs"
248 emake DESTDIR="${D}" install
249
250 # rename the original cidfmap to cidfmap.GS
251 mv "${D}/usr/share/ghostscript/${PVM}/Resource/Init/cidfmap"{,.GS} || die
252
253 # install our own cidfmap to handle CJK fonts
254 insinto "/usr/share/ghostscript/${PVM}/Resource/Init"
255 doins "${WORKDIR}/fontmaps/CIDFnmap"
256 doins "${WORKDIR}/fontmaps/cidfmap"
257 for X in ${LANGS} ; do
258 if use linguas_${X} ; then
259 doins "${WORKDIR}/fontmaps/cidfmap.${X}"
260 fi
261 done
262
263 # install the CMaps from poppler-data properly, bug 409361
264 dosym /usr/share/poppler/cMaps /usr/share/ghostscript/${PVM}/Resource/CMap
265
266 use static-libs || find "${D}" -name '*.la' -delete
267
268 use linguas_de || rm -r "${D}"/usr/share/man/de
269 }