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.00.ebuild
Date: Thu, 07 Oct 2010 23:03:14
Message-Id: 20101007222734.C819720051@flycatcher.gentoo.org
1 tgurr 10/10/07 22:27:34
2
3 Modified: ChangeLog
4 Added: ghostscript-gpl-9.00.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2_rc90/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.100 app-text/ghostscript-gpl/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?rev=1.100&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?rev=1.100&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ChangeLog?r1=1.99&r2=1.100
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v
20 retrieving revision 1.99
21 retrieving revision 1.100
22 diff -u -r1.99 -r1.100
23 --- ChangeLog 17 Aug 2010 18:18:25 -0000 1.99
24 +++ ChangeLog 7 Oct 2010 22:27:34 -0000 1.100
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-text/ghostscript-gpl
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.99 2010/08/17 18:18:25 tgurr Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.100 2010/10/07 22:27:34 tgurr Exp $
30 +
31 +*ghostscript-gpl-9.00 (07 Oct 2010)
32 +
33 + 07 Oct 2010; Timo Gurr <tgurr@g.o> +ghostscript-gpl-9.00.ebuild:
34 + Version bump.
35
36 *ghostscript-gpl-8.71-r6 (17 Aug 2010)
37
38
39
40
41 1.1 app-text/ghostscript-gpl/ghostscript-gpl-9.00.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.00.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.00.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ghostscript-gpl-9.00.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.00.ebuild,v 1.1 2010/10/07 22:27:34 tgurr Exp $
51
52 EAPI=3
53 inherit autotools eutils versionator flag-o-matic
54
55 DESCRIPTION="Ghostscript is an interpreter for the PostScript language and for PDF"
56 HOMEPAGE="http://ghostscript.com/"
57
58 MY_P=${P/-gpl}
59 GSDJVU_PV=1.4
60 PVM=$(get_version_component_range 1-2)
61 SRC_URI="!bindist? ( djvu? ( mirror://sourceforge/djvu/gsdjvu-${GSDJVU_PV}.tar.gz ) )
62 mirror://sourceforge/ghostscript/${MY_P}.tar.xz
63 mirror://gentoo/${P}-patchset-1.tar.bz2"
64
65 LICENSE="GPL-3 CPL-1.0"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
68 IUSE="bindist cups djvu gtk idn jpeg2k X"
69
70 COMMON_DEPEND="app-text/libpaper
71 media-libs/freetype:2
72 media-libs/fontconfig
73 >=media-libs/jpeg-6b
74 >=media-libs/libpng-1.2.42
75 >=media-libs/tiff-3.9.2
76 >=sys-libs/zlib-1.2.3
77 !bindist? ( djvu? ( app-text/djvu ) )
78 cups? ( >=net-print/cups-1.3.8 )
79 gtk? ( >=x11-libs/gtk+-2.0 )
80 idn? ( net-dns/libidn )
81 jpeg2k? ( media-libs/jasper )
82 X? ( x11-libs/libXt x11-libs/libXext )"
83
84 DEPEND="${COMMON_DEPEND}
85 app-arch/xz-utils
86 dev-util/pkgconfig"
87
88 RDEPEND="${COMMON_DEPEND}
89 >=media-fonts/urw-fonts-2.4.9
90 linguas_ja? ( media-fonts/kochi-substitute )
91 linguas_ko? ( media-fonts/baekmuk-fonts )
92 linguas_zh_CN? ( media-fonts/arphicfonts )
93 linguas_zh_TW? ( media-fonts/arphicfonts )"
94
95 S="${WORKDIR}/${MY_P}"
96
97 LANGS="ja ko zh_CN zh_TW"
98 for X in ${LANGS} ; do
99 IUSE="${IUSE} linguas_${X}"
100 done
101
102 pkg_setup() {
103 local p="/usr/share/fonts/default/ghostscript"
104 # die if path exists and is not a symbolic link so that
105 # installation of symbolic link doesn't fail, bug 311923
106 if [[ -e ${p} && ! -L ${p} ]]; then
107 eerror "The path ${p} exists and is not a"
108 eerror "symlink. It must be removed for ${CATEGORY}/${PN} to be installed."
109 eerror "Use the following command to check to which packages it belongs:"
110 eerror " emerge gentoolkit ; equery belongs ${p}"
111 eerror
112 eerror "And remove packages listed. If it doesn't belong to any package, remove"
113 eerror "it manually and then re-emerge ${CATEGORY}/${PN}."
114 eerror "See bug #311923 for more details."
115 eerror
116 die "Path ${p} is not a symlink"
117 fi
118
119 if use bindist && use djvu; then
120 ewarn "You have bindist in your USE, djvu support will NOT be compiled!"
121 ewarn "See http://djvu.sourceforge.net/gsdjvu/COPYING for details on licensing issues."
122 fi
123 }
124
125 src_prepare() {
126 # remove internal copies of various libraries
127 rm -rf "${S}/expat"
128 rm -rf "${S}/jasper"
129 rm -rf "${S}/jpeg"
130 rm -rf "${S}/libpng"
131 rm -rf "${S}/tiff"
132 rm -rf "${S}/zlib"
133 # remove internal urw-fonts
134 rm -rf "${S}/Resource/Font"
135
136 # apply various patches, many borrowed from Fedora
137 # http://pkgs.fedoraproject.org/gitweb/?p=ghostscript.git
138 EPATCH_SUFFIX="patch" EPATCH_FORCE="yes"
139 EPATCH_SOURCE="${WORKDIR}/patches/"
140 epatch
141
142 if ! use bindist && use djvu ; then
143 unpack gsdjvu-${GSDJVU_PV}.tar.gz
144 cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}"
145 cp gsdjvu-${GSDJVU_PV}/gdevdjvu.c "${S}/base"
146 epatch "${WORKDIR}/patches-gsdjvu/${PN}-8.64-gsdjvu-1.3.patch"
147 epatch "${WORKDIR}/patches-gsdjvu/gsdjvu-1.4-ghostscript-gpl-9.00-compatibility.patch"
148 epatch "${WORKDIR}/patches-gsdjvu/gsdjvu-1.4-parallel-buildfix.patch"
149 cp gsdjvu-${GSDJVU_PV}/ps2utf8.ps "${S}/lib"
150 cp "${S}/base/contrib.mak" "${S}/base/contrib.mak.gsdjvu"
151 grep -q djvusep "${S}/base/contrib.mak" || \
152 cat gsdjvu-${GSDJVU_PV}/gsdjvu.mak >> "${S}/base/contrib.mak"
153
154 # install ps2utf8.ps, bug #197818
155 sed -i -e '/$(EXTRA_INIT_FILES)/ a\ps2utf8.ps \\' "${S}/base/unixinst.mak" \
156 || die "sed failed"
157 fi
158
159 if ! use gtk ; then
160 sed -i "s:\$(GSSOX)::" base/*.mak || die "gsx sed failed"
161 sed -i "s:.*\$(GSSOX_XENAME)$::" base/*.mak || die "gsxso sed failed"
162 fi
163
164 # search path fix
165 sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
166 -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
167 -e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \
168 -e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \
169 -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \
170 base/Makefile.in base/*.mak || die "sed failed"
171
172 cd "${S}"
173 eautoreconf
174
175 cd "${S}/jbig2dec"
176 eautoreconf
177
178 cd "${S}/ijs"
179 eautoreconf
180 }
181
182 src_configure() {
183 econf \
184 $(use_enable cups) \
185 $(use_enable gtk) \
186 $(use_with cups pdftoraster) \
187 $(use_with idn libidn) \
188 $(use_with jpeg2k jasper) \
189 $(use_with X x) \
190 --disable-compile-inits \
191 --enable-dynamic \
192 --enable-freetype \
193 --enable-fontconfig \
194 --with-drivers=ALL \
195 --with-ijs \
196 --with-jbig2dec \
197 --with-libpaper
198
199 if ! use bindist && use djvu ; then
200 sed -i -e 's!$(DD)bbox.dev!& $(DD)djvumask.dev $(DD)djvusep.dev!g' Makefile
201 fi
202
203 cd "${S}/ijs"
204 econf
205 }
206
207 src_compile() {
208 emake -j1 so all || die "emake failed"
209
210 cd "${S}/ijs"
211 emake || die "ijs emake failed"
212 }
213
214 src_install() {
215 emake DESTDIR="${D}" install-so install || die "emake install failed"
216
217 if ! use bindist && use djvu ; then
218 dobin gsdjvu || die "dobin gsdjvu install failed"
219 fi
220
221 # remove gsc in favor of gambit, bug #253064
222 rm -rf "${D}/usr/bin/gsc"
223
224 rm -rf "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
225 dodoc doc/GS9_Color_Management.pdf || die "dodoc install failed"
226
227 cd "${S}/ijs"
228 emake DESTDIR="${D}" install || die "emake ijs install failed"
229
230 # rename the original cidfmap to cidfmap.GS
231 mv "${D}/usr/share/ghostscript/${PVM}/Resource/Init/cidfmap"{,.GS} || die
232
233 # install our own cidfmap to handle CJK fonts
234 insinto "/usr/share/ghostscript/${PVM}/Resource/Init"
235 doins "${WORKDIR}/fontmaps/CIDFnmap" || die "doins CIDFnmap failed"
236 doins "${WORKDIR}/fontmaps/cidfmap" || die "doins cidfmap failed"
237 for X in ${LANGS} ; do
238 if use linguas_${X} ; then
239 doins "${WORKDIR}/fontmaps/cidfmap.${X}" || die "doins cidfmap.${X} failed"
240 fi
241 done
242
243 dosym /usr/share/fonts/urw-fonts /usr/share/fonts/default/ghostscript || die
244 }