Add recipe for unzip 6.10c11.

While this is not a stable release from unzip, it includes the Haiku
changes we upstreamed in 2011. It is better to use this than to backport
those changes to 6.0 again.
This commit is contained in:
Adrien Destugues
2014-10-14 20:37:37 +02:00
parent 75aed9c368
commit e92262243a
2 changed files with 139 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
From 9f375ee32a8c453386ee463f26604d445fe68dfc Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Tue, 14 Oct 2014 20:22:25 +0200
Subject: Make it build on Haiku again
* Fix installation dir for binaries and docs
* Define UNICODE_SUPPORT
* Fix source dir for docs and manpages
diff --git a/beos/Makefile b/beos/Makefile
index 9e86a3d..7f674ac 100644
--- a/beos/Makefile
+++ b/beos/Makefile
@@ -91,18 +91,18 @@ UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H)
INSTALL = install
# on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate
manext = 1
-prefix = /boot/home/config
-BINDIR = $(prefix)/bin# where to install executables
-MANDIR = $(prefix)/man/man$(manext)# where to install man pages
+prefix ?= /boot/home/config
+BINDIR ?= $(prefix)/bin# where to install executables
+MANDIR ?= $(prefix)/man/ # where to install man pages
INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/zipinfo$E $(BINDIR)/unzipsfx$E \
$(BINDIR)/unzip$E
-INSTALLEDMAN = $(MANDIR)/unzip.$(manext) $(MANDIR)/funzip.$(manext) \
- $(MANDIR)/unzipsfx.$(manext) $(MANDIR)/zipinfo.$(manext)
+INSTALLEDMAN = $(MANDIR)/man1/unzip.$(manext) $(MANDIR)/man1/funzip.$(manext) \
+ $(MANDIR)/man1/unzipsfx.$(manext) $(MANDIR)/man1/zipinfo.$(manext)
#
UNZIPS = unzip$E funzip$E unzipsfx$E zipinfo$E
# this is a little ugly...well, no, it's a lot ugly:
-MANS = man/unzip.1 man/unzipsfx.1 man/zipinfo.1 man/funzip.1 man/zipgrep.1
-DOCS = unzip.txt unzipsfx.txt zipinfo.txt funzip.txt zipgrep.txt
+MANS = man/man1/unzip.1 man/man1/unzipsfx.1 man/man1/zipinfo.1 man/man1/funzip.1 man/man1/zipgrep.1
+DOCS = docs/unzip.txt docs/unzipsfx.txt docs/zipinfo.txt docs/funzip.txt docs/zipgrep.txt
######################################################################
# Things that change:
@@ -371,11 +371,11 @@ install: all
$(LN) unzip$E $(BINDIR)/zipinfo$E
$(RM) $(BINDIR)/zipgrep$E
$(INSTALL) -m 755 unix/zipgrep $(BINDIR)/zipgrep$E
- $(INSTALL) -m 644 man/unzip.1 $(MANDIR)/unzip.$(manext)
- $(INSTALL) -m 644 man/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext)
- $(INSTALL) -m 644 man/zipinfo.1 $(MANDIR)/zipinfo.$(manext)
- $(INSTALL) -m 644 man/funzip.1 $(MANDIR)/funzip.$(manext)
- $(INSTALL) -m 644 man/zipgrep.1 $(MANDIR)/zipgrep.$(manext)
+ $(INSTALL) -m 644 man/man1/unzip.1 $(MANDIR)/man1/unzip.$(manext)
+ $(INSTALL) -m 644 man/man1/unzipsfx.1 $(MANDIR)/man1/unzipsfx.$(manext)
+ $(INSTALL) -m 644 man/man1/zipinfo.1 $(MANDIR)/man1/zipinfo.$(manext)
+ $(INSTALL) -m 644 man/man1/funzip.1 $(MANDIR)/man1/funzip.$(manext)
+ $(INSTALL) -m 644 man/man1/zipgrep.1 $(MANDIR)/man1/zipgrep.$(manext)
$(INSTALL) -m 644 $(DOCS) $(MANDIR)
# alternatively, could use zip method: -cd $(BINDIR); rm -f $(UNZIPS) [etc.]
diff --git a/beos/beocfg.h b/beos/beocfg.h
index 68584ed..02744c4 100644
--- a/beos/beocfg.h
+++ b/beos/beocfg.h
@@ -68,6 +68,7 @@
/* ISO/OEM (iconv) character conversion. */
+#define UNICODE_SUPPORT
#define ICONV_MAPPING /* part of vanilla Haiku distribution */
#ifdef ICONV_MAPPING
diff --git a/fileio.c b/fileio.c
index 3884ee2..0e17e54 100644
--- a/fileio.c
+++ b/fileio.c
@@ -62,6 +62,7 @@
#define __FILEIO_C /* identifies this source module */
#define UNZIP_INTERNAL
#include "unzip.h"
+
#ifdef DLL
# include "api.h"
#endif /* def DLL */
--
1.8.3.4

View File

@@ -0,0 +1,56 @@
SUMMARY="Extraction utility for zip archives."
DESCRIPTION="
UnZip is an extraction utility for archives compressed in \
.zip format (zipfiles). UnZip can list or extract files from an archive \
or test its integrity.
"
HOMEPAGE="http://www.info-zip.org/UnZip.html"
REVISION="1"
ARCHITECTURES="x86_gcc2"
SRC_URI="http://antinode.info/ftp/info-zip/unzip610c11.zip"
CHECKSUM_SHA256="13d92580d89e7c4199ba9a883957cc3676f0235dcac6f701f8f951b015c8d4c8"
SOURCE_DIR="unzip610c11"
PATCHES="unzip-$portVersion.patchset"
PROVIDES="
unzip = $portVersion
cmd:funzip
cmd:unzip
cmd:unzipsfx
cmd:zipgrep
cmd:zipinfo
"
REQUIRES="
haiku >= $haikuVersion
lib:libiconv
"
BUILD_REQUIRES="
devel:libiconv
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:gcc
cmd:make
"
BUILD()
{
make -f beos/Makefile \
prefix=$prefix MANDIR=$manDir BINDIR=$binDir
}
INSTALL()
{
mkdir -p $binDir
mkdir -p $manDir/man1
make -f beos/Makefile install \
prefix=$prefix MANDIR=$manDir BINDIR=$binDir
}
LICENSE="Info-ZIP"
COPYRIGHT="1995-2014 Greg Roelofs"