Skip to content

Commit

Permalink
gzip: add recipe for version 1.8.
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
fbrosson committed Apr 27, 2016
1 parent 2444cd0 commit c58894e
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
68 changes: 68 additions & 0 deletions app-arch/gzip/gzip-1.8.recipe
Original file line number Diff line number Diff line change
@@ -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
}
48 changes: 48 additions & 0 deletions app-arch/gzip/patches/gzip-1.8.patchset
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 39ee8c0d94879bde10822f2b95caedde3d6842fb Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
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 <timothygu99@gmail.com>

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

0 comments on commit c58894e

Please sign in to comment.