aboutsummaryrefslogtreecommitdiff
path: root/graphics/pngquant
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-07-01 20:54:54 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-07-08 16:42:05 +0700
commit252722ac4fd231a82c9d5ab58b7566d3eb600646 (patch)
tree7684d9c89465494dc94e2b73c1374a148c716231 /graphics/pngquant
parent0bfbf7e6c1bb96efcc3969da0aaf2ff5933161cb (diff)
graphics/pngquant: Strip binary and shared lib.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/pngquant')
-rw-r--r--graphics/pngquant/README3
-rw-r--r--graphics/pngquant/pngquant.SlackBuild35
2 files changed, 29 insertions, 9 deletions
diff --git a/graphics/pngquant/README b/graphics/pngquant/README
index 780f4ae13976c..e96226c5cd9a7 100644
--- a/graphics/pngquant/README
+++ b/graphics/pngquant/README
@@ -6,3 +6,6 @@ browsers, and have better fallback in IE6 than 24-bit PNGs.
Optional features:
OPENMP=yes|no (default: no) Enables parallelized batch jobs.
+
+Note: OPENMP=yes builds are currently broken. If this bothers
+you, please send a patch to fix it.
diff --git a/graphics/pngquant/pngquant.SlackBuild b/graphics/pngquant/pngquant.SlackBuild
index 818b86d61df3e..93aeb3cee67f6 100644
--- a/graphics/pngquant/pngquant.SlackBuild
+++ b/graphics/pngquant/pngquant.SlackBuild
@@ -25,11 +25,26 @@
# 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}
@@ -41,9 +56,6 @@ 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -53,7 +65,7 @@ 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"
@@ -80,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
@@ -93,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