new package: pigz

This commit is contained in:
Leonid Pliushch 2019-09-23 22:49:55 +03:00
parent cd3ce11c2c
commit 2813971934
3 changed files with 41 additions and 0 deletions

14
packages/pigz/build.sh Normal file
View File

@ -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
}

View File

@ -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

View File

@ -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);
}