2012-05-16 15:32:41 +02:00
|
|
|
# Template file for 'ghostscript'
|
|
|
|
pkgname=ghostscript
|
2015-04-01 10:10:18 +02:00
|
|
|
version=9.16
|
2015-04-08 16:40:26 +02:00
|
|
|
revision=2
|
2012-05-16 15:32:41 +02:00
|
|
|
short_desc="An interpreter for the PostScript language"
|
2015-04-10 09:16:30 +02:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2012-05-16 15:32:41 +02:00
|
|
|
homepage="http://www.ghostscript.com/"
|
2014-11-14 13:33:55 +01:00
|
|
|
license="AGPL-3, CPL-1.0"
|
2012-06-12 21:44:11 +02:00
|
|
|
distfiles="http://downloads.ghostscript.com/public/$pkgname-$version.tar.bz2"
|
2015-04-01 10:10:18 +02:00
|
|
|
checksum=3e2d44f925aabb4764b985a966880eafca2fd63a6998491308604d16a75cb86d
|
2012-06-12 21:44:11 +02:00
|
|
|
|
2013-04-03 16:56:36 +02:00
|
|
|
hostmakedepends="automake libtool pkg-config"
|
2014-11-14 13:33:55 +01:00
|
|
|
makedepends="
|
2015-03-27 10:50:40 +01:00
|
|
|
zlib-devel dbus-devel libXext-devel libXt-devel libpng-devel
|
2014-03-14 13:58:06 +01:00
|
|
|
fontconfig-devel jasper-devel tiff-devel lcms2-devel jbig2dec-devel
|
2015-04-08 16:40:26 +02:00
|
|
|
cups-devel libpaper-devel"
|
2014-01-01 16:10:11 +01:00
|
|
|
depends="gsfonts"
|
2012-05-16 15:32:41 +02:00
|
|
|
|
|
|
|
pre_configure() {
|
|
|
|
# force it to use system libs.
|
2015-04-01 10:10:18 +02:00
|
|
|
rm -rf jpeg{,xr} libpng jasper expat tiff lcms{,2} freetype cups/libs jbig2dec
|
2014-04-07 19:44:36 +02:00
|
|
|
cd ijs
|
|
|
|
autoreconf -fi
|
2012-05-16 15:32:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
2014-04-07 19:44:36 +02:00
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
mips) configure_args+=" --enable-big-endian";;
|
|
|
|
*) configure_args+=" --enable-little-endian";;
|
|
|
|
esac
|
|
|
|
|
2014-11-14 13:33:55 +01:00
|
|
|
cd ${wrksrc}
|
2012-05-16 15:32:41 +02:00
|
|
|
# configure ghostscript
|
2013-05-26 10:41:55 +02:00
|
|
|
./configure ${configure_args} --enable-dynamic --with-ijs \
|
2012-05-16 15:32:41 +02:00
|
|
|
--with-jbig2dec --with-omni --with-x --with-drivers=ALL \
|
|
|
|
--with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
|
2014-11-14 13:33:55 +01:00
|
|
|
--enable-fontconfig --enable-freetype --without-luratech \
|
|
|
|
--without-omni --with-system-libtiff --disable-compile-inits
|
2012-05-16 15:32:41 +02:00
|
|
|
|
|
|
|
# configure libijs
|
2013-04-30 11:02:42 +02:00
|
|
|
cd ijs
|
2013-05-26 10:41:55 +02:00
|
|
|
./configure ${configure_args} --enable-shared --disable-static
|
2012-05-16 15:32:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
2014-04-07 19:44:36 +02:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
# Build host utils.
|
2014-04-08 17:01:41 +02:00
|
|
|
cp -f Makefile Makefile.orig
|
|
|
|
sed "/GCFLAGS/s,${CFLAGS},,g" -i Makefile
|
|
|
|
make CC=cc CCLD=cc base/genarch base/genconf base/echogs
|
|
|
|
mv -f Makefile.orig Makefile
|
2014-04-07 19:44:36 +02:00
|
|
|
mkdir -p obj/aux soobj/aux
|
|
|
|
cp base/{echogs,genarch,genconf} obj/aux
|
|
|
|
cp base/{echogs,genarch,genconf} soobj/aux
|
|
|
|
fi
|
2012-05-16 15:32:41 +02:00
|
|
|
# build ghostscript
|
2014-04-07 19:44:36 +02:00
|
|
|
make ${makejobs}
|
|
|
|
make ${makejobs} so
|
2012-05-16 15:32:41 +02:00
|
|
|
# build libijs
|
2013-04-30 11:02:42 +02:00
|
|
|
cd ijs
|
2014-04-07 19:44:36 +02:00
|
|
|
make ${makejobs}
|
2012-05-16 15:32:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
# install ghostscript
|
|
|
|
make DESTDIR=${DESTDIR} cups_serverroot=${DESTDIR}/etc/cups \
|
2014-04-07 19:44:36 +02:00
|
|
|
cups_serverbin=${DESTDIR}/usr/lib/cups install install-so
|
2012-05-16 15:32:41 +02:00
|
|
|
# install missing doc files # http://bugs.archlinux.org/task/18023
|
|
|
|
install -m644 doc/{Ps2ps2.htm,gs-vms.hlp,gsdoc.el,pscet_status.txt} \
|
|
|
|
${DESTDIR}/usr/share/ghostscript/$version/doc/
|
|
|
|
# install license
|
|
|
|
vinstall LICENSE 644 usr/share/licenses/${pkgname}
|
2014-03-14 13:58:06 +01:00
|
|
|
|
|
|
|
# remove unwanted localized man-pages
|
|
|
|
rm -rf ${DESTDIR}/usr/share/man/[^man1]*
|
|
|
|
|
2012-05-16 15:32:41 +02:00
|
|
|
# install libijs
|
2013-04-30 11:02:42 +02:00
|
|
|
cd ijs
|
|
|
|
make DESTDIR=${DESTDIR} install
|
2014-03-14 13:58:06 +01:00
|
|
|
|
|
|
|
# Remove conflicting files with cups-filters.
|
|
|
|
rm -f ${DESTDIR}/usr/lib/cups/filter/{gstopxl,gstoraster}
|
2012-05-16 15:32:41 +02:00
|
|
|
}
|
|
|
|
|
2013-04-12 13:13:49 +02:00
|
|
|
|
|
|
|
libgs_package() {
|
2014-03-14 13:58:06 +01:00
|
|
|
short_desc+=" - runtime shared library"
|
2013-04-12 13:13:49 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/libgs.so*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libijs_package() {
|
2014-03-14 13:58:06 +01:00
|
|
|
short_desc+=" - IJS runtime shared library"
|
2013-04-12 13:13:49 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/libijs*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ghostscript-devel_package() {
|
2014-03-14 13:58:06 +01:00
|
|
|
depends="libijs>=${version}_${revision} libgs>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
2013-04-12 13:13:49 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/pkgconfig
|
|
|
|
vmove usr/bin/ijs-config
|
|
|
|
vmove usr/share/man/man1/ijs-config.1
|
|
|
|
}
|
|
|
|
}
|