summaryrefslogtreecommitdiffstats
path: root/graphics/pngquant/pngquant.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pngquant/pngquant.SlackBuild')
-rw-r--r--graphics/pngquant/pngquant.SlackBuild45
1 files changed, 36 insertions, 9 deletions
diff --git a/graphics/pngquant/pngquant.SlackBuild b/graphics/pngquant/pngquant.SlackBuild
index 776d7bf170..93aeb3cee6 100644
--- a/graphics/pngquant/pngquant.SlackBuild
+++ b/graphics/pngquant/pngquant.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for pngquant
@@ -25,10 +25,28 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230701 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - strip binary and shared lib.
+# - remove INSTALL from doc dir (compile instructions only).
+# - add README note saying OPENMP=yes is broken.
+#
+# Note: upstream switched from C to Rust. The last C release was
+# 2.18.0 (Feb 3, 2023), which this build should probably be updated
+# for (assuming it doesn't break imgmin or tuxpaint, which depend on
+# this).
+#
+# The 3.0.x releases don't look like they're API compatible. I would
+# rather stab myself in the eye with a rusty fork than deal with Rust,
+# but someone might want to look into 3.0.x (possibly as a separate
+# SlackBuild, leaving this one at 2.18.0).
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pngquant
VERSION=${VERSION:-2.9.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
@@ -38,12 +56,16 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
-DOCS="CHANGELOG COPYRIGHT INSTALL README.md"
+DOCS="CHANGELOG COPYRIGHT README.md"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
@@ -70,6 +92,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go-w,a+rX-st .
+# 20230701 bkw: building with OPENMP=yes is broken on Slackware 15.0,
+# which I suppose is why this was disabled by default. I thought using
+# CC=clang might help, but it doesn't.
if [ "${OPENMP:-no}" != "no" ]; then
openmp="--with-openmp"
fi
@@ -83,13 +108,15 @@ sed -i -e 's#share/man#man#' Makefile
make
make -C lib shared
+strip $PRGNAM
make PREFIX=$PKG/usr install
+
# manual installation of libraries:
-install -D -m0755 lib/libimagequant.so.0 $PKG/usr/lib${LIBDIRSUFFIX}/libimagequant.so.0
-install -D -m0644 lib/libimagequant.a $PKG/usr/lib${LIBDIRSUFFIX}/libimagequant.a
-install -D -m0644 lib/libimagequant.h $PKG/usr/include/libimagequant.h
+install -s -D -m0755 lib/libimagequant.so.0 $PKG/usr/lib${LIBDIRSUFFIX}/libimagequant.so.0
+install -D -m0644 lib/libimagequant.a $PKG/usr/lib${LIBDIRSUFFIX}/libimagequant.a
+install -D -m0644 lib/libimagequant.h $PKG/usr/include/libimagequant.h
-find $PKG/usr/man -type f -exec gzip -9 {} +
+gzip -9 $PKG/usr/man/man*/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
@@ -99,4 +126,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE