24 |
SDEPEND=">= net-print/cups-1.4 |
SDEPEND=">= net-print/cups-1.4 |
25 |
>= dev-util/pkgconfig-0.23" |
>= dev-util/pkgconfig-0.23" |
26 |
|
|
27 |
SRCFILE="${PNAME}-${PVER}.tar.bz2" |
SRCFILE="${PNAME/-gpl/}-${PVER}.tar.bz2" |
28 |
EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz" |
EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz" |
29 |
|
|
30 |
SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
SRCDIR="${BUILDDIR}/${PNAME/-gpl/}-${PVER}" |
31 |
|
|
32 |
sminclude mtools |
sminclude mtools |
33 |
|
|
34 |
SRC_URI=( |
SRC_URI=( |
35 |
http://ghostscript.com/releases/${SRCFILE} |
sourceforge://${PNAME/-gpl/}/${SRCFILE} |
36 |
mirror://${PNAME}/${SRCFILE} |
mirror://${PNAME}/${SRCFILE} |
37 |
mirror://${PNAME}/${EXTRA_SRCFILE} |
mirror://${PNAME}/${EXTRA_SRCFILE} |
38 |
mirror://${PNAME}/${PNAME}-${PVER}-multilib.patch |
mirror://${PNAME}/${PNAME}-${PVER}-multilib.patch |
46 |
mirror://${PNAME}/${PNAME}-${PVER}-respect-gsc-ldflags.patch |
mirror://${PNAME}/${PNAME}-${PVER}-respect-gsc-ldflags.patch |
47 |
) |
) |
48 |
|
|
49 |
|
UP2DATE="updatecmd_sourceforge ${PNAME/-gpl/}" |
50 |
|
|
51 |
src_prepare() |
src_prepare() |
52 |
{ |
{ |
53 |
munpack ${SRCFILE} || die |
munpack ${SRCFILE} || die |
76 |
mpatch ${PNAME}-${PVER}-respect-gsc-ldflags.patch || die |
mpatch ${PNAME}-${PVER}-respect-gsc-ldflags.patch || die |
77 |
|
|
78 |
# search path fix |
# search path fix |
79 |
sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \ |
sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \ |
|
-e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \ |
|
|
-e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \ |
|
|
-e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \ |
|
|
-e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \ |
|
|
base/Makefile.in base/*.mak || die "sed failed" |
|
|
|
|
|
|
|
|
# search path fix |
|
|
sed -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER:0:4}/$(mlibdir):" \ |
|
80 |
-e 's:$(gsdir)/fonts:/usr/share/ghostscript/fonts:' \ |
-e 's:$(gsdir)/fonts:/usr/share/ghostscript/fonts:' \ |
81 |
base/Makefile.in base/*.mak || die |
base/Makefile.in base/*.mak || die |
82 |
|
|
83 |
# fix doc pathes |
# fix doc pathes |
84 |
sed -i "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" Makefile.in || die |
sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" \ |
85 |
-e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \ |
-e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" \ |
86 |
-e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \ |
-e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" \ |
87 |
base/Makefile.in base/*.mak || die |
base/Makefile.in base/*.mak || die |
88 |
|
|
89 |
|
# fix libtool issues |
90 |
|
mlibtoolize || die |
91 |
|
|
92 |
# regen makefiles |
# regen makefiles |
93 |
autoreconf --install --force --verbose || die |
autoreconf --install --force --verbose || die |
94 |
cd ${SRCDIR}/ijs |
cd ${SRCDIR}/ijs |
95 |
|
# fix libtool issues |
96 |
|
mlibtoolize || die |
97 |
autoreconf --install --force --verbose || die |
autoreconf --install --force --verbose || die |
98 |
} |
} |
99 |
|
|
137 |
minstalldir /usr/include || die |
minstalldir /usr/include || die |
138 |
minstalldir /usr/$(mlibdir) || die |
minstalldir /usr/$(mlibdir) || die |
139 |
|
|
140 |
mmake install_prefix=${BINDIR} install || die |
mmake -j1 DESTDIR=${BINDIR} install || die |
141 |
mmake install_prefix=${BINDIR} soinstall || die |
mmake -j1 DESTDIR=${BINDIR} soinstall || die |
142 |
|
|
143 |
# install extra_fonts |
# install extra_fonts |
144 |
|
minstalldir /usr/share/ghostscript || die |
145 |
cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die |
cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die |
146 |
|
|
147 |
# install ijs |
# install ijs |
154 |
|
|
155 |
# cleanup |
# cleanup |
156 |
rm -r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/html/README || die |
rm -r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/html/README || die |
|
rm -r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/html/PUBLIC || die |
|
157 |
minstalldoc doc/README || die |
minstalldoc doc/README || die |
158 |
} |
} |