From dd2bc323b61ed6f36d57a713c9c9c62e4b988f6e Mon Sep 17 00:00:00 2001 From: Vishal Biswas Date: Sat, 2 Dec 2017 16:43:12 +0000 Subject: [PATCH] pngquant: add package (#1888) --- packages/pngquant/build.sh | 20 ++++++++++++++++++++ packages/pngquant/configure.patch | 15 +++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 packages/pngquant/build.sh create mode 100644 packages/pngquant/configure.patch diff --git a/packages/pngquant/build.sh b/packages/pngquant/build.sh new file mode 100644 index 000000000..7dbdb409f --- /dev/null +++ b/packages/pngquant/build.sh @@ -0,0 +1,20 @@ +TERMUX_PKG_HOMEPAGE=https://pngquant.org +TERMUX_PKG_VERSION=2.11.4 +TERMUX_PKG_SRCURL=https://github.com/pornel/pngquant/archive/$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_SHA256=c45816daccf63e0910fdd31033f489fd153603082eea5ce7f28f62c000384446 +TERMUX_PKG_DEPENDS="libpng" +TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" +TERMUX_PKG_BUILD_IN_SRC=true +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-sse" + +termux_step_post_extract_package () { + local LIBIMAGEQUANT_SRC_FOLDER=libimagequant-$TERMUX_PKG_VERSION + termux_download \ + https://github.com/ImageOptim/libimagequant/archive/$TERMUX_PKG_VERSION.tar.gz \ + $TERMUX_PKG_CACHEDIR/$LIBIMAGEQUANT_SRC_FOLDER.tar.gz \ + a6b7552cc6161c8092638e9d5c889b4344264ca5d0d12211fafdcb03b93bc943 + + tar -xf $TERMUX_PKG_CACHEDIR/$LIBIMAGEQUANT_SRC_FOLDER.tar.gz -C $TERMUX_PKG_SRCDIR + rmdir $TERMUX_PKG_SRCDIR/lib + mv $TERMUX_PKG_SRCDIR/$LIBIMAGEQUANT_SRC_FOLDER $TERMUX_PKG_SRCDIR/lib +} diff --git a/packages/pngquant/configure.patch b/packages/pngquant/configure.patch new file mode 100644 index 000000000..489e27e11 --- /dev/null +++ b/packages/pngquant/configure.patch @@ -0,0 +1,15 @@ +--- ./configure 2017-11-27 20:45:47.000000000 +0530 ++++ ../configure 2017-12-02 10:42:46.176674068 +0530 +@@ -358,12 +358,6 @@ + DIRS+=("$LIQSRCDIR" "$LIQSRCDIR") # local libimagequant + fi + +-DIRS+=( +- "/usr/local/include /usr/local/lib" +- "/usr/include /usr/lib64" +- "/usr/include /usr/lib" +- "/opt/local/include /opt/local/lib" # macports +- ) + + if [[ "$OSTYPE" =~ "darwin" ]]; then + SOLIBSUFFIX=dylib