Lines 4-12
Link Here
|
4 |
|
4 |
|
5 |
inherit flag-o-matic eutils gcc |
5 |
inherit flag-o-matic eutils gcc |
6 |
|
6 |
|
|
|
7 |
PATCHVER="1" |
8 |
PATCHES="ghostscript-patches-${PATCHVER}" |
9 |
|
7 |
DESCRIPTION="ESP Ghostscript -- an enhanced version of GNU Ghostscript with better printer support" |
10 |
DESCRIPTION="ESP Ghostscript -- an enhanced version of GNU Ghostscript with better printer support" |
8 |
HOMEPAGE="http://www.cups.org/ghostscript.php" |
11 |
HOMEPAGE="http://www.cups.org/ghostscript.php" |
9 |
SRC_URI="mirror://sourceforge/espgs/espgs-${PV}-source.tar.bz2 |
12 |
SRC_URI="mirror://sourceforge/espgs/espgs-${PV}-source.tar.bz2 |
|
|
13 |
mirror://gentoo/${PATCHES}.tar.bz2 |
10 |
cjk? ( http://www.matsusaka-u.ac.jp/mirror/gs-cjk/adobe-cmaps-200204.tar.gz |
14 |
cjk? ( http://www.matsusaka-u.ac.jp/mirror/gs-cjk/adobe-cmaps-200204.tar.gz |
11 |
http://www.matsusaka-u.ac.jp/mirror/gs-cjk/acro5-cmaps-2001.tar.gz)" |
15 |
http://www.matsusaka-u.ac.jp/mirror/gs-cjk/acro5-cmaps-2001.tar.gz)" |
12 |
|
16 |
|
Lines 41-127
Link Here
|
41 |
|
45 |
|
42 |
src_unpack() { |
46 |
src_unpack() { |
43 |
unpack espgs-${PV}-source.tar.bz2 |
47 |
unpack espgs-${PV}-source.tar.bz2 |
|
|
48 |
unpack ${PATCHES}.tar.bz2 |
44 |
|
49 |
|
45 |
cd ${S} |
50 |
cd ${S} |
46 |
|
51 |
|
47 |
if use cjk ; then |
52 |
EPATCH_SUFFIX="patch" |
48 |
epatch ${FILESDIR}/gs7.07.1-cjk.diff.bz2 |
53 |
EPATCH_EXCLUDE="01_all_fontconfig-rh-2.patch 09_all_krgb.patch" |
49 |
epatch ${FILESDIR}/gs7.05.6-kochi-substitute.patch |
54 |
|
50 |
fi |
55 |
use cjk && epatch ${WORKDIR}/${PATCHES}/cjk/ |
|
|
56 |
epatch ${WORKDIR}/${PATCHES}/all/ |
51 |
|
57 |
|
52 |
# add fontconfig support (this patch is broken) |
|
|
53 |
# epatch ${FILESDIR}/gs7.07.1-fontconfig-rh.patch.2.bz2 |
58 |
# epatch ${FILESDIR}/gs7.07.1-fontconfig-rh.patch.2.bz2 |
54 |
|
59 |
|
55 |
# man page patch from absinthe@pobox.com (Dylan Carlson) bug #14150 |
|
|
56 |
epatch ${FILESDIR}/ghostscript-7.05.6.man.patch |
57 |
|
58 |
# ijs fPIC patch |
59 |
epatch ${FILESDIR}/gs${PV}-ijs.patch |
60 |
|
61 |
# pxl dash patch |
62 |
epatch ${FILESDIR}/gs7.05.6-gdevpx.patch |
63 |
|
64 |
# Makefile.in fixes for DESTDIR support in libijs because |
65 |
# einstall borks on multilib systems -- eradicator |
66 |
epatch ${FILESDIR}/gs${PV}-destdir.patch |
67 |
epatch ${FILESDIR}/gs${PV}-ijsdestdir.patch |
68 |
|
69 |
# search path fix |
60 |
# search path fix |
70 |
sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/7.07/$(get_libdir):"\ |
61 |
sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/7.07/$(get_libdir): ; |
71 |
Makefile.in || die "sed failed" |
62 |
s:$\(gsdir\)/fonts:/usr/share/fonts/default/ghostscript/:" \ |
72 |
sed -i -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \ |
63 |
Makefile.in || die "sed failed" |
73 |
Makefile.in || die "sed failed" |
|
|
74 |
|
75 |
# insecure tempfile handling |
76 |
epatch ${FILESDIR}/gs${PV}-tempfile.patch |
77 |
|
78 |
# krgb support (currently broken) |
79 |
#( cd src; epatch ${FILESDIR}/gs7.07.1-krgb.patch.gz ) |
80 |
|
81 |
# Fix the garbage collector on ia64 and ppc |
82 |
epatch ${FILESDIR}/gs-fix-gc.patch |
83 |
|
84 |
# bug #63435 |
85 |
epatch ${FILESDIR}/gs${PV}-ps2ps.patch |
86 |
|
64 |
|
87 |
# fix dynamic build |
65 |
# fix dynamic build |
88 |
echo '#include "png.h"' >> src/png_.h |
66 |
echo '#include "png.h"' >> src/png_.h |
89 |
|
67 |
|
90 |
# fix for building with gtk2 instead of gtk1 |
68 |
# fix for building with gtk2 instead of gtk1 |
91 |
if use gtk; then |
69 |
if use gtk; then |
92 |
sed -i -e "s:gmodule:gmodule-2.0:" configure.ac |
70 |
sed -i -e "s:gmodule:gmodule-2.0: ; |
93 |
sed -i -e "s:glib-config:pkgconfig:" configure.ac |
71 |
s:glib-config:pkgconfig:" configure.ac |
|
|
72 |
|
94 |
sed -i -e "s:gtk-config:pkg-config gtk+-2.0:g" src/unix-dll.mak |
73 |
sed -i -e "s:gtk-config:pkg-config gtk+-2.0:g" src/unix-dll.mak |
95 |
sed -i -e "s:CFLAGS_SO=-fPIC:CFLAGS_SO=-fPIC -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include:" Makefile.in |
74 |
sed -i -e "s:CFLAGS_SO=-fPIC:CFLAGS_SO=-fPIC -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include:" Makefile.in |
96 |
else |
75 |
else |
97 |
epatch ${FILESDIR}/gs${PV}-nogtk2.patch |
76 |
epatch ${WORKDIR}/${PATCHES}/gs${PV}-nogtk2.patch |
98 |
fi |
77 |
fi |
|
|
78 |
|
79 |
autoconf |
99 |
} |
80 |
} |
100 |
|
81 |
|
101 |
src_compile() { |
82 |
src_compile() { |
102 |
local myconf |
83 |
local myconf |
103 |
myconf="--with-ijs --without-gimp-print" |
84 |
local fontpaths |
104 |
use gtk && myconf="${myconf} --with-omni" || myconf="${myconf} --without-omni" |
85 |
|
105 |
|
86 |
fontpaths="/usr/share/fonts:/usr/share/fonts/truetype:/usr/share/fonts/ttf/zh_TW:/usr/share/fonts/ttf/zh_CN:/usr/share/fonts/arphicfonts:/usr/share/fonts/ttf/korean/baekmuk:/usr/share/fonts/baekmuk-fonts:/usr/share/fonts/kochi-substitute" |
106 |
# bug #56998, only compiled-in fontpath is searched when running |
87 |
|
107 |
# gs -DPARANOIDSAFER out.ps |
|
|
108 |
myconf="${myconf} --with-fontconfig --with-fontpath=/usr/share/fonts:/usr/share/fonts/ttf/zh_TW:/usr/share/fonts/ttf/zh_CN:/usr/share/fonts/arphicfonts:/usr/share/fonts/ttf/korean/baekmuk:/usr/share/fonts/baekmuk-fonts:/usr/X11R6/lib/X11/fonts/truetype:/usr/share/fonts/kochi-substitute" |
109 |
|
110 |
use X && myconf="${myconf} --with-x" \ |
111 |
|| myconf="${myconf} --without-x" |
112 |
|
113 |
use cups && myconf="${myconf} --enable-cups" \ |
114 |
|| myconf="${myconf} --disable-cups" |
115 |
|
116 |
# -O3 will make ghostscript fail when compiling with gcc 3.4 |
88 |
# -O3 will make ghostscript fail when compiling with gcc 3.4 |
117 |
if [ "`gcc-major-version`" -eq "3" ] && [ "`gcc-minor-version`" -eq "4" ] |
89 |
if [ "`gcc-major-version`" -eq "3" ] && [ "`gcc-minor-version`" -eq "4" ]; then |
118 |
then |
|
|
119 |
strip-flags |
90 |
strip-flags |
120 |
replace-flags -O? -O2 |
91 |
replace-flags -O? -O2 |
121 |
fi |
92 |
fi |
122 |
|
93 |
|
123 |
autoconf |
94 |
# bug #56998, only compiled-in fontpath is searched when running |
124 |
econf ${myconf} || die "econf failed" |
95 |
econf \ |
|
|
96 |
$(use_with X x) \ |
97 |
$(use_enable cups) \ |
98 |
$(use_with gtk omni) \ |
99 |
--with-ijs \ |
100 |
--without-gimp-print \ |
101 |
--with-fontconfig \ |
102 |
--with-fontpath=${fontpaths} \ |
103 |
${myconf} || die "econf failed" |
104 |
|
125 |
emake -j1 || die "make failed" |
105 |
emake -j1 || die "make failed" |
126 |
emake so -j1 || die "make failed" |
106 |
emake so -j1 || die "make failed" |
127 |
|
107 |
|