From c58894eb832b0c80e1d0a5f9e9034fe3ebdec983 Mon Sep 17 00:00:00 2001 From: fbrosson Date: Wed, 27 Apr 2016 14:21:02 +0000 Subject: [PATCH] gzip: add recipe for version 1.8. * Add recipe for 1.8 and use a mirror redirector for SOURCE_URI. * Sort cmd:* in PROVIDES and BUILD_PREREQUIRES and add cmd:less to the latter since less(1) is required for "make check". * Add TEST() with "make check". Test results: PASS = TOTAL = 18. * Drop removal of lib/charset.alias as it has disappeared. --- app-arch/gzip/gzip-1.8.recipe | 68 +++++++++++++++++++++++++ app-arch/gzip/patches/gzip-1.8.patchset | 48 +++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 app-arch/gzip/gzip-1.8.recipe create mode 100644 app-arch/gzip/patches/gzip-1.8.patchset diff --git a/app-arch/gzip/gzip-1.8.recipe b/app-arch/gzip/gzip-1.8.recipe new file mode 100644 index 000000000..c3d2fee69 --- /dev/null +++ b/app-arch/gzip/gzip-1.8.recipe @@ -0,0 +1,68 @@ +SUMMARY="The gzip compression utilities" +DESCRIPTION="gzip (GNU zip) is a compression utility designed to be a \ +replacement for compress. Its main advantages over compress are much \ +better compression and freedom from patented algorithms. It has been \ +adopted by the GNU project and is now relatively popular on the Internet." +HOMEPAGE="https://www.gnu.org/software/gzip/" +COPYRIGHT="1992-1993 Jean-loup Gailly + 1999-2016 Free Software Foundation, Inc." +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="http://ftpmirror.gnu.org/gzip/gzip-$portVersion.tar.xz" +CHECKSUM_SHA256="ff1767ec444f71e5daf8972f6f8bf68cfcca1d2f76c248eb18e8741fc91dbbd3" +PATCHES="gzip-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64 arm ppc" + +PROVIDES=" + gzip = $portVersion + cmd:gunzip = $portVersion + cmd:gzip = $portVersion + cmd:gzexe = $portVersion + cmd:uncompress = $portVersion + cmd:zcat = $portVersion + cmd:zcmp = $portVersion + cmd:zdiff = $portVersion + cmd:zegrep = $portVersion + cmd:zfgrep = $portVersion + cmd:zforce = $portVersion + cmd:zgrep = $portVersion + cmd:zless = $portVersion + cmd:zmore = $portVersion + cmd:znew = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:awk + cmd:gcc + cmd:libtoolize + cmd:make + cmd:less + " + +BUILD() +{ + export CFLAGS="-Wno-error" + autoreconf -fi + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install +} + +TEST() +{ + make check +} diff --git a/app-arch/gzip/patches/gzip-1.8.patchset b/app-arch/gzip/patches/gzip-1.8.patchset new file mode 100644 index 000000000..eaaaf9ff5 --- /dev/null +++ b/app-arch/gzip/patches/gzip-1.8.patchset @@ -0,0 +1,48 @@ +From 39ee8c0d94879bde10822f2b95caedde3d6842fb Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 16 Dec 2014 21:50:24 +0000 +Subject: [PATCH] gzexe: Fallback on file copying for backup + +BFS doesn't support hard links. + +Signed-off-by: Timothy Gu + +diff --git a/gzexe.in b/gzexe.in +index e458563..45e1900 100644 +--- a/gzexe.in ++++ b/gzexe.in +@@ -212,7 +212,7 @@ EOF + echo >&2 "$0: $tmp: cannot chmod" + continue + } +- ln -f "$file" "$file~" || { ++ ln -f "$file" "$file~" || cp -f "$file" "${file}~" || { + res=$? + echo >&2 "$0: cannot backup $i as $i~" + continue +-- +1.8.3.4 + + +From 67f0045113c5be938d6912969f84ab2b541a9807 Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Tue, 26 Apr 2016 21:03:14 +0000 +Subject: Do not try to create hard links. + + +diff --git a/Makefile.am b/Makefile.am +index 738c63c..665974f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -145,7 +145,7 @@ install-exec-hook remove-installed-links: + rm -f "$$dest" && \ + case $@ in \ + install-exec-hook) \ +- ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \ ++ $(LN_S) "$$source" "$$dest";; \ + esac \ + ) || exit; \ + done; \ +-- +2.7.0 +