From 2813971934c8b03581d20b949ac369f58fe3ac7b Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Mon, 23 Sep 2019 22:49:55 +0300 Subject: [PATCH] new package: pigz --- packages/pigz/build.sh | 14 ++++++++++++++ packages/pigz/pigz-2.4_Makefile.patch | 15 +++++++++++++++ packages/pigz/pigz-2.4_yarn.c.patch | 12 ++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 packages/pigz/build.sh create mode 100644 packages/pigz/pigz-2.4_Makefile.patch create mode 100644 packages/pigz/pigz-2.4_yarn.c.patch diff --git a/packages/pigz/build.sh b/packages/pigz/build.sh new file mode 100644 index 000000000..721f5f8c6 --- /dev/null +++ b/packages/pigz/build.sh @@ -0,0 +1,14 @@ +TERMUX_PKG_HOMEPAGE=https://www.zlib.net/pigz +TERMUX_PKG_DESCRIPTION="Parallel implementation of the gzip file compressor" +TERMUX_PKG_LICENSE="ZLIB" +TERMUX_PKG_VERSION=2.4 +TERMUX_PKG_SRCURL=https://www.zlib.net/pigz/pigz-$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_SHA256=a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73 +TERMUX_PKG_DEPENDS="zlib" +TERMUX_PKG_BUILD_IN_SRC=true + +termux_step_make_install() { + install -Dm700 pigz $TERMUX_PREFIX/bin/pigz + ln -sfr $TERMUX_PREFIX/bin/pigz $TERMUX_PREFIX/bin/unpigz + install -Dm600 pigz.1 $TERMUX_PREFIX/share/man/man1/pigz.1 +} diff --git a/packages/pigz/pigz-2.4_Makefile.patch b/packages/pigz/pigz-2.4_Makefile.patch new file mode 100644 index 000000000..ff4d63eb5 --- /dev/null +++ b/packages/pigz/pigz-2.4_Makefile.patch @@ -0,0 +1,15 @@ +diff -uNr pigz-2.4/Makefile pigz-2.4.mod/Makefile +--- pigz-2.4/Makefile 2017-12-27 02:35:01.000000000 +0200 ++++ pigz-2.4.mod/Makefile 2019-09-23 22:45:25.088019565 +0300 +@@ -1,7 +1,7 @@ +-CC=gcc +-CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas +-LDFLAGS= +-LIBS=-lm -lpthread -lz ++CC?=gcc ++CFLAGS+=-Wall -Wextra -Wno-unknown-pragmas ++LDFLAGS?= ++LIBS=-lz -lm + ZOPFLI=zopfli/src/zopfli/ + ZOP=deflate.o blocksplitter.o tree.o lz77.o cache.o hash.o util.o squeeze.o katajainen.o + diff --git a/packages/pigz/pigz-2.4_yarn.c.patch b/packages/pigz/pigz-2.4_yarn.c.patch new file mode 100644 index 000000000..ef4628727 --- /dev/null +++ b/packages/pigz/pigz-2.4_yarn.c.patch @@ -0,0 +1,12 @@ +diff -uNr pigz-2.4/yarn.c pigz-2.4.mod/yarn.c +--- pigz-2.4/yarn.c 2015-01-20 06:12:31.000000000 +0200 ++++ pigz-2.4.mod/yarn.c 2019-09-23 22:45:59.981446648 +0300 +@@ -374,7 +374,7 @@ + { + int ret; + +- if ((ret = pthread_cancel(off_course->id)) != 0) ++ if ((ret = pthread_kill(off_course->id, 0)) != 0) + fail(ret); + join(off_course); + }