From 2f69ff1c01cf0b47b0dc12515ef017dcd760df7a Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 14 Oct 2014 14:43:55 +0200 Subject: [PATCH] Add recipe for ncompress. This is an updated version of what we currently have in haiku tree for compress. It was renamed to ncompress to avoid confusion with the BSD implementation. --- app-arch/ncompress/ncompress-4.2.4.4.recipe | 53 ++++++++ .../patches/ncompress-4.2.4.4.patchset | 113 ++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 app-arch/ncompress/ncompress-4.2.4.4.recipe create mode 100644 app-arch/ncompress/patches/ncompress-4.2.4.4.patchset diff --git a/app-arch/ncompress/ncompress-4.2.4.4.recipe b/app-arch/ncompress/ncompress-4.2.4.4.recipe new file mode 100644 index 000000000..7fb17a28d --- /dev/null +++ b/app-arch/ncompress/ncompress-4.2.4.4.recipe @@ -0,0 +1,53 @@ +SUMMARY="A fast, simple LZW file compressor." +DESCRIPTION="Compress is a fast, simple LZW file compressor. Compress does not \ +have the highest compression rate, but it is one of the fastest programs to \ +compress data. Compress is the defacto standard in the UNIX community for \ +compressing files." +LICENSE="Public Domain" +COPYRIGHT="Mike Frysinger + Spencer W. Thomas + Jim McKie + Steve Davies + Ken Turkowski + James A. Woods + Joe Orost + Dave Mack + Peter Jannesen" +HOMEPAGE="http://ncompress.sourceforge.net/" +ARCHITECTURES="x86_gcc2" +REVISION="1" + +SRC_URI="http://sourceforge.net/projects/ncompress/files/ncompress-4.2.4.4.tar.gz" +CHECKSUM_SHA256="b00ba28d3f332b38aa75478a15c1b789957aa6c02d6453471f452c0ec3e6517a" +PATCHES="ncompress-$portVersion.patchset" + +PROVIDES=" + ncompress = $portVersion + cmd:compress + cmd:zcat + cmd:zmore +" + +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + cmd:awk + cmd:cpio + cmd:find + cmd:gcc + cmd:sh +" + +BUILD() +{ + echo -e "1\n$binDir\n$manDir\n7\n-DNOFUNCDEF=1\nc\n\nq"|sh build +} + +INSTALL() +{ + echo -e "1\n$binDir\n$manDir\n7\n-DNOFUNCDEF=1\ni\n\n\nq"|sh build +} + +TEST() +{ + echo -e "1\n$binDir\n$manDir\n7\n-DNOFUNCDEF=1\nt\n\n\nq"|sh build +} diff --git a/app-arch/ncompress/patches/ncompress-4.2.4.4.patchset b/app-arch/ncompress/patches/ncompress-4.2.4.4.patchset new file mode 100644 index 000000000..f53f89552 --- /dev/null +++ b/app-arch/ncompress/patches/ncompress-4.2.4.4.patchset @@ -0,0 +1,113 @@ +From a5cc6167a1fc7195f43828613970826658fc35f8 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Tue, 14 Oct 2014 14:42:10 +0200 +Subject: Make build script work on haiku + +* Compiler default output is not a.out +* Include dir is not /usr/include + +diff --git a/build b/build +index 647373d..d00cbf9 100755 +--- a/build ++++ b/build +@@ -275,9 +275,9 @@ do + CCOPT='-O' + LBOPT= + EXTRA= +- [ -f /usr/include/sys/dir.h ] && { SYSDIR=yes; } +- [ -f /usr/include/dirent.h ] && { DIRENT=yes; } +- [ -f /usr/include/utime.h ] && { UTIME_H=yes; } ++ [ -f `finddir B_SYSTEM_HEADERS_DIRECTORY`/posix/sys/dir.h ] && { SYSDIR=yes; } ++ [ -f `finddir B_SYSTEM_HEADERS_DIRECTORY`/posix/dirent.h ] && { DIRENT=yes; } ++ [ -f `finddir B_SYSTEM_HEADERS_DIRECTORY`/posix/utime.h ] && { UTIME_H=yes; } + [ -d /usr/local/bin ] && { BINDIR=/usr/local/bin; } + [ -d /usr/local/man ] && { BINDIR=/usr/local/man/man1; } + [ -f /usr/bin/compress ] && { BINDIR=/usr/bin; } +@@ -322,7 +322,7 @@ do + return 0; + } + ! +- ${CC} /tmp/sh$$.c && IBUFSIZ=`./a.out` ++ ${CC} -o a.out /tmp/sh$$.c && IBUFSIZ=`./a.out` + rm -f /tmp/sh$$.c a.out + OBUFSIZ=${IBUFSIZ} + echo "${IBUFSIZ}" +@@ -339,7 +339,7 @@ do + return 0; + } + ! +- ${CC} /tmp/sh$$.c && BYTEORDER=`./a.out` ++ ${CC} -o a.out /tmp/sh$$.c && BYTEORDER=`./a.out` + BYTEORDER="${BYTEORDER:-0000}" + echo ${BYTEORDER} + rm -f /tmp/sh$$.c a.out +@@ -374,7 +374,7 @@ do + return 0; + } + ! +- ${CC} /tmp/sh$$.c && NOALLIGN=`( ./a.out ) 2>/dev/null` ++ ${CC} -o a.out /tmp/sh$$.c && NOALLIGN=`( ./a.out ) 2>/dev/null` + NOALLIGN="${NOALLIGN:-yes}" + echo ${NOALLIGN} + rm -f /tmp/sh$$.c a.out core +@@ -410,7 +410,7 @@ do + exit(0); + } + ! +- cc /tmp/sh$$.c && REGISTERS=`./a.out` ++ cc -o a.out /tmp/sh$$.c && REGISTERS=`./a.out` + REGISTERS=${REGISTERS:-2}; + echo ${REGISTERS} + rm -f a.out /tmp/sh$$.c +@@ -424,7 +424,7 @@ do + return errno; + } + ! +- if cc /tmp/sh$$.c ++ if cc -o a.out /tmp/sh$$.c + then + echo "Yes" + else +@@ -443,11 +443,11 @@ do + } + ! + LSTAT=no +- ${CC} /tmp/sh$$.c >/dev/null 2>&1 && LSTAT=yes ++ ${CC} -o a.out /tmp/sh$$.c >/dev/null 2>&1 && LSTAT=yes + echo "${LSTAT}" + rm -f a.out /tmp/sh$$.c + +- echo ${n} "Test availble memory${c}" ++ echo ${n} "Test available memory${c}" + for size in 75000 130000 230000 440000 800000 + do + cat >/tmp/sh$$.c </dev/null 2>&1 || break ++ ${CC} -o a.out /tmp/sh$$.c >/dev/null 2>&1 || break + ./a.out || break + rm a.out /tmp/sh$$.c + USERMEM=${size} + echo ${n} " ${size}${c}" + done + +- rm a.out /tmp/sh$$.c ++ rm -f a.out /tmp/sh$$.c + + echo "" + +@@ -509,7 +509,7 @@ do + main() {return 0;} + ! + rm -f ./a.out +- if ${CC} /tmp/sh$$.c >/dev/null 2>&1 ++ if ${CC} -o a.out /tmp/sh$$.c >/dev/null 2>&1 + then + : + else +-- +1.8.3.4 +