#!/bin/bash # Slackware build script for GraphicsMagick # Originally written by Giovanne Castro . # Updated by B. Watson , as the original author is # MIA. Original version had no license; I'm licensing the update under the # terms of the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # 20260803: bkw: # - fix long-standing issue where GraphicsMagick would fail to build if # an old version was already installed. At least, I *think* it's fixed. # 20260731 bkw: update for v1.3.48. # 20251216 bkw: update for v1.3.46. # 20240908 bkw: update for v1.3.45. # 20240822 bkw: update for v1.3.44. # 20231108 bkw: update for v1.3.42. # 20230710 bkw: update for v1.3.40. # 20230105 bkw: update for v1.3.39, using sourceforge link again. # 20210910 bkw: update for v1.3.36. # 20201019 bkw: update for v1.3.35. # 20200111 bkw: update for v1.3.34, quit using sourceforge dl link. # 20191130 bkw: update for v1.3.33. # 20181201 bkw: update for v1.3.31 (BUILD=1 again). # 20181126 bkw: # - fix the perl module. at one point it really did work, but lately # people (including me) were getting 'undefined symbol' errors when # trying to load the perl module (e.g. by running findimagedupes). # Thanks to Kevin Smallman for a very helpful bug report. # - update find/chmod stuff to my personal template. # - BUILD=2 # 20180627 bkw: # - updated for v1.3.30. # - get rid of the need to build/install/build again for the Tcl bindings. # - actually install the damn perl module (when did *that* break?) # - get rid of static tcl/tk libs # - get rid of --disable-openmp (but add OPENMP=no just in case) # 20180123 bkw: updated for v1.3.28 # 20171219 bkw: updated for v1.3.27, added last few missing delegates # 20170708 bkw: updated for v1.3.26 # 20161016 bkw: updated for v1.3.25 # 20151127 bkw: fix build on -current, in anticipation of 14.2 # 20150803 bkw: # - updated for v1.3.21 # - install docs to /usr/doc/$PRGNAM-$VERSION, not /usr/share/doc # - build perl bindings (PerlMagick) # - build Tcl bindings (TclMagick) # - document optional deps in README cd $(dirname $0) ; CWD=$(pwd) PRGNAM=GraphicsMagick VERSION=${VERSION:-1.3.48} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi set -e complain() { local rv="$?" if pkg-config --silence-errors --modversion $PRGNAM; then cat < /dev/null || true find $PKG -name perllocal.pod \ -o -name ".packlist" \ -o -name "*.bs" | \ xargs rm -rf || true PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKGDOC cp -a ChangeLog *.txt $PKGDOC cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install sed \ -e "s,@WITHOMP@,$WITHOMP," \ -e "s,@WITHTCL@,$WITHTCL," \ -e "s,@WITHPERL@,$WITHPERL," \ $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE