From 646a5c1cbfd95873950a87b5f75d52073a967023 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 28 May 2018 19:12:29 +0000 Subject: Mon May 28 19:12:29 UTC 2018 a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded. --- source/ap/ghostscript/ghostscript.SlackBuild | 90 +++++++++++++++++----------- 1 file changed, 55 insertions(+), 35 deletions(-) (limited to 'source/ap/ghostscript/ghostscript.SlackBuild') diff --git a/source/ap/ghostscript/ghostscript.SlackBuild b/source/ap/ghostscript/ghostscript.SlackBuild index 7007cc21c..947524911 100755 --- a/source/ap/ghostscript/ghostscript.SlackBuild +++ b/source/ap/ghostscript/ghostscript.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2016 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,13 +20,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) PKGNAM=ghostscript -if [ -r gnu-ghostscript-*.tar.xz ]; then +if [ -r gnu-ghostscript-*.tar.?z ]; then SRCPREFIX="gnu-" fi -VERSION=${VERSION:-$(echo $SRCPREFIX$PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +VERSION=${VERSION:-$(echo $SRCPREFIX$PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-3} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -38,9 +39,16 @@ if [ -z "$ARCH" ]; then esac fi +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-${PKGNAM} rm -rf $PKG @@ -62,8 +70,8 @@ fi cd $TMP rm -rf ${SRCPREFIX}${PKGNAM}-${VERSION} -tar xvf $CWD/${SRCPREFIX}${PKGNAM}-$VERSION.tar.xz || exit 1 -cd ${SRCPREFIX}${PKGNAM}-$VERSION +tar xvf $CWD/${SRCPREFIX}${PKGNAM}-$VERSION.tar.?z || exit 1 +cd ${SRCPREFIX}${PKGNAM}-$VERSION || exit 1 # Remove unmaintained garbage: rm -rf freetype jpeg lcms2 libpng libtiff png tiff zlib @@ -93,7 +101,7 @@ find . \ --enable-static=no \ --program-prefix= \ --program-suffix= \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 make install || exit 1 make install DESTDIR=$PKG || exit 1 @@ -106,6 +114,7 @@ CFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --mandir=/usr/man \ + --docdir=/usr/share/ghostscript/$VERSION/tmpdoc \ --with-fontpath=/usr/share/fonts/TTF \ --with-ijs \ --disable-compile-inits \ @@ -114,7 +123,7 @@ CFLAGS="$SLKCFLAGS" \ --enable-cups \ --program-prefix= \ --program-suffix= \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 # Build and install: make $NUMJOBS || make || exit 1 @@ -123,6 +132,11 @@ make clean || exit 1 make $NUMJOBS so || make so || exit 1 make soinstall DESTDIR=$PKG || exit 1 +# Add back ijs-config, which is needed by at least gutenprint to find IJS +# and produce a ghostscript driver: +cat $CWD/ijs-config | sed -e "s/lib64/lib${LIBDIRSUFFIX}/g" > $PKG/usr/bin/ijs-config +chmod 755 $PKG/usr/bin/ijs-config + # Replace the default cidfmap with one containing additional # support for CJK printing: @@ -132,34 +146,25 @@ if [ -r $PKG/usr/share/ghostscript/*.*/Resource/Init/cidfmap ]; then zcat $CWD/cidfmap.gz > $PKG/usr/share/ghostscript/${SHARE_VERSION}/Resource/Init/cidfmap.new fi -### Moved to cups-filters... -## Many programs expect to find this filter with the old name: -#( cd $PKG/usr/lib${LIBDIRSUFFIX}/cups/filter -# if [ ! -e pstoraster ]; then -# ln -sf gstoraster pstoraster -# fi -#) - # Strip binaries: ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) -# Compress and link manpages, if any: -if [ -d $PKG/usr/man ]; then - ( cd $PKG/usr/man - for manpagedir in $(find . -type d -name "man*") ; do - ( cd $manpagedir - for eachpage in $( find . -type l -maxdepth 1) ; do - ln -s $( readlink $eachpage ).gz $eachpage.gz - rm $eachpage - done - gzip -9 *.* - ) - done - ) -fi +# Don't ship .la files: +pushd $PKG + for lafile in usr/lib${LIBDIRSUFFIX}/*.la ; do + rm -f ${lafile} /${lafile} + done +popd + +# Compress manual pages: +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do + ln -s $( readlink $i ).gz $i.gz + rm $i +done # Compress info files, if any: if [ -d $PKG/usr/info ]; then @@ -169,6 +174,16 @@ if [ -d $PKG/usr/info ]; then ) fi +# gs9.23 fails if you try to have --docdir put things in the proper place. +# Not much choice but to have things put in the wrong place and then move them. +# First, remove broken symlinks: +rm -f $PKG/usr/share/ghostscript/$VERSION/doc $PKG/usr/share/ghostscript/$VERSION/tmpdoc/$VERSION/$VERSION +# Then, move the docs to the proper location: +mv $PKG/usr/share/ghostscript/$VERSION/tmpdoc/$VERSION $PKG/usr/share/ghostscript/$VERSION/doc +# Remove this (probably empty) directory: +rm -rf $PKG/usr/share/ghostscript/$VERSION/tmpdoc +# And finally, pray for upstream to quit drinking while coding. ;-) + # Add a documentation directory: mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION ( cd doc @@ -187,17 +202,22 @@ mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION History*.htm \ $PKG/usr/share/ghostscript/$VERSION/doc rm -f $PKG/usr/share/ghostscript/$VERSION/doc/History{1,2,3,4,5,6,7,8}.htm + # More cruft: + rm -f $PKG/usr/share/ghostscript/$VERSION/doc/Details{1,2,3,4,5,6,7,8}.htm + # This is also bloat: + rm -f $PKG/usr/share/ghostscript/$VERSION/doc/*.pdf chown root:root $PKG/usr/share/ghostscript/$VERSION/doc/History*htm chmod 644 $PKG/usr/share/ghostscript/$VERSION/doc/History*htm ) -cd $TMP -cp -a ${PKGNAM}-${VERSION}/examples/cjk $PKG/usr/share/ghostscript/${VERSION}/examples/ +# Install example files: +rm -rf $PKG/usr/share/ghostscript/${VERSION}/examples +cp -a $TMP/${PKGNAM}-${VERSION}/examples $PKG/usr/share/ghostscript/${VERSION} mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat << EOF > $PKG/install/doinst.sh -#!/bin/sh +#!/bin/bash config() { NEW="\$1" OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" -- cgit v1.2.3