Package-Name: unzip
Gentoo-Package: app-arch/unzip
Homepage: http://www.info-zip.org/pub/infozip/
#Source: ftp://ftp.info-zip.org/pub/infozip/src/unzip(\d+)(\d\d).tar.gz $1.$2
Source: sourceforge:///infozip/unzip(\d+)(\d\d).tar.gz $1.$2
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
Compile:
	make -f unix/Makefile linux LOC="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
	make install prefix="$(PREFIX)"
	cp -p BUGS LICENSE README WHERE "$(PREFIX)"/
Install:
	$(MAKE) instbin BIN="funzip unzip unzipsfx zipgrep zipinfo"
	$(MAKE) instman SECTION=1 MAN="funzip unzip unzipsfx zipgrep zipinfo"
Patch: <<EOT
######## begin disable-filename-translation.diff
--- ../unzip-5.52-orig/unzpriv.h	2005-02-04 08:26:42 +0900
+++ unzpriv.h	2007-06-21 12:04:13 +0900
@@ -2411,10 +2411,12 @@
  *    macro.
  */
 
+#undef foreign
 #ifndef foreign
 #  define foreign(c)  (c)
 #endif
 
+#undef native
 #ifndef native
 #  define native(c)   (c)
 #  define A_TO_N(str1)
@@ -2450,6 +2452,8 @@
  *  ISO-8859-1 [ISO Latin 1, Win Ansi,...]) into the internal "native"
  *  code page.  As with A_TO_N(), conversion is done in place.
  */
+#define _ISO_INTERN(str1)
+#define _OEM_INTERN(str1)
 #ifndef _ISO_INTERN
 #  ifdef CRTL_CP_IS_OEM
 #    ifndef IZ_ISO2OEM_ARRAY
######## end disable-filename-translation.diff
EOT

/pkg/unzip/
/usr/bin/funzip
/usr/bin/unzip
/usr/bin/unzipsfx
/usr/bin/zipgrep
/usr/bin/zipinfo
/usr/man/man1/funzip.1.gz
/usr/man/man1/unzip.1.gz
/usr/man/man1/unzipsfx.1.gz
/usr/man/man1/zipgrep.1.gz
/usr/man/man1/zipinfo.1.gz
