zip: rename package to infozip to avoid name collision with tools 11202/head
authorHannu Nyman <hannu.nyman@iki.fi>
Sat, 1 Feb 2020 08:18:54 +0000 (10:18 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 1 Feb 2020 08:23:16 +0000 (10:23 +0200)
Rename "zip" to "infozip" to avoid name collision, as the same
zip package has been introduces to the build tools as zip.
Buildbot does not like that.

Reference to #10985 and #11089 as well as
https://github.com/openwrt/openwrt/commit/ad8c2d6099a7da5192ee6e2c52a8303642271877

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
utils/infozip/Makefile [new file with mode: 0644]
utils/infozip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch [new file with mode: 0644]
utils/infozip/patches/010-remove-build-date.patch [new file with mode: 0644]
utils/infozip/patches/020-format.patch [new file with mode: 0644]
utils/zip/Makefile [deleted file]
utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch [deleted file]
utils/zip/patches/010-remove-build-date.patch [deleted file]
utils/zip/patches/020-format.patch [deleted file]

diff --git a/utils/infozip/Makefile b/utils/infozip/Makefile
new file mode 100644 (file)
index 0000000..f15e635
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=infozip
+PKG_REV:=30
+PKG_VERSION:=3.0
+PKG_RELEASE:=5
+
+PKG_SOURCE:=zip$(PKG_REV).tar.gz
+PKG_SOURCE_URL:=@SF/infozip
+PKG_HASH:=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV)
+
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_LICENSE:=BSD-4-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/infozip
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Archiver for .zip files
+  URL:=http://infozip.sourceforge.net/Zip.html
+  SUBMENU:=Compression
+endef
+
+define Package/infozip/description
+       This is InfoZIP's zip program. It produces files that are fully
+       compatible with the popular PKZIP program; however, the command line
+       options are not identical. In other words, the end result is the same,
+       but the methods differ.
+endef
+
+MAKE_FLAGS += \
+       -f unix/Makefile \
+       prefix="$(PKG_INSTALL_DIR)/usr" \
+       CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I. -DUNIX" \
+       LDFLAGS2="$(TARGET_LDFLAGS)" \
+       IZ_BZIP2="no"
+
+define Package/infozip/install
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,infozip))
diff --git a/utils/infozip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch b/utils/infozip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch
new file mode 100644 (file)
index 0000000..892540b
--- /dev/null
@@ -0,0 +1,90 @@
+From fc392c939b9a18959482f588aff0afc29dd6d30a Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour at openwide.fr>
+Date: Fri, 23 Jan 2015 22:20:18 +0100
+Subject: [PATCH 6/6] unix/configure: borrow the LFS test from autotools.
+
+Infozip's LFS check can't work for cross-compilation
+since it try to run a target's binary on the host system.
+
+Instead, use to LFS test used by autotools which is a
+compilation test.
+(see autotools/lib/autoconf/specific.m4)
+
+Reported-by: Richard Genoud <richard.genoud at gmail.com>
+Signed-off-by: Romain Naour <romain.naour at openwide.fr>
+---
+ configure |   46 +++++++++++++++-------------------------------
+ 1 file changed, 15 insertions(+), 31 deletions(-)
+
+diff --rupN a/unix/configure b/unix/configure
+--- a/unix/configure
++++ b/unix/configure
+@@ -399,9 +399,8 @@ else
+ fi
+-# Now we set the 64-bit file environment and check the size of off_t
+-# Added 11/4/2003 EG
+-# Revised 8/12/2004 EG
++# LFS check borrowed from autotools sources
++# lib/autoconf/specific.m4
+ echo Check for Large File Support
+ cat > conftest.c << _EOF_
+@@ -410,23 +409,19 @@ cat > conftest.c << _EOF_
+ # define _FILE_OFFSET_BITS 64       /* select default interface as 64 bit */
+ # define _LARGE_FILES        /* some OSes need this for 64-bit off_t */
+ #include <sys/types.h>
+-#include <sys/stat.h>
+-#include <unistd.h>
+-#include <stdio.h>
++
++ /* Check that off_t can represent 2**63 - 1 correctly.
++    We can't simply define LARGE_OFF_T to be 9223372036854775807,
++    since some C++ compilers masquerading as C compilers
++    incorrectly reject 9223372036854775807.  */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++                     && LARGE_OFF_T % 2147483647 == 1)
++                    ? 1 : -1];
++
+ int main()
+ {
+-  off_t offset;
+-  struct stat s;
+-  /* see if have 64-bit off_t */
+-  if (sizeof(offset) < 8)
+-    return 1;
+-  printf("  off_t is %d bytes\n", sizeof(off_t));
+-  /* see if have 64-bit stat */
+-  if (sizeof(s.st_size) < 8) {
+-    printf("  s.st_size is %d bytes\n", sizeof(s.st_size));
+-    return 2;
+-  }
+-  return 3;
++  return 0;
+ }
+ _EOF_
+ # compile it
+@@ -434,19 +429,8 @@ $CC -o conftest conftest.c >/dev/null 2>
+ if [ $? -ne 0 ]; then
+   echo -- no Large File Support
+ else
+-# run it
+-  ./conftest
+-  r=$?
+-  if [ $r -eq 1 ]; then
+-    echo -- no Large File Support - no 64-bit off_t
+-  elif [ $r -eq 2 ]; then
+-    echo -- no Large File Support - no 64-bit stat
+-  elif [ $r -eq 3 ]; then
+-    echo -- yes we have Large File Support!
+-    CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT"
+-  else
+-    echo -- no Large File Support - conftest returned $r
+-  fi
++  echo -- yes we have Large File Support!
++  CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT"
+ fi
diff --git a/utils/infozip/patches/010-remove-build-date.patch b/utils/infozip/patches/010-remove-build-date.patch
new file mode 100644 (file)
index 0000000..d7165cd
--- /dev/null
@@ -0,0 +1,15 @@
+From: Santiago Vila <sanvila@debian.org>
+Subject: Remove (optional) build date to make the build reproducible
+Bug-Debian: http://bugs.debian.org/779042
+
+--- a/unix/unix.c
++++ b/unix/unix.c
+@@ -1020,7 +1020,7 @@
+ /* Define the compile date string */
+-#ifdef __DATE__
++#if 0
+ #  define COMPILE_DATE " on " __DATE__
+ #else
+ #  define COMPILE_DATE ""
diff --git a/utils/infozip/patches/020-format.patch b/utils/infozip/patches/020-format.patch
new file mode 100644 (file)
index 0000000..6b371a6
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/zip.c
++++ b/zip.c
+@@ -1028,8 +1028,7 @@ local void help_extended()
+   for (i = 0; i < sizeof(text)/sizeof(char *); i++)
+   {
+-    printf(text[i]);
+-    putchar('\n');
++    puts(text[i]);
+   }
+ #ifdef DOS
+   check_for_windows("Zip");
+@@ -1225,8 +1224,7 @@ local void version_info()
+             CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE);
+   for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++)
+   {
+-    printf(cryptnote[i]);
+-    putchar('\n');
++    puts(cryptnote[i]);
+   }
+   ++i;  /* crypt support means there IS at least one compilation option */
+ #endif /* CRYPT */
diff --git a/utils/zip/Makefile b/utils/zip/Makefile
deleted file mode 100644 (file)
index cdd6212..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=zip
-PKG_REV:=30
-PKG_VERSION:=3.0
-PKG_RELEASE:=5
-
-PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz
-PKG_SOURCE_URL:=@SF/infozip
-PKG_HASH:=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV)
-
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
-PKG_LICENSE:=BSD-4-Clause
-PKG_LICENSE_FILES:=LICENSE
-
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/zip
-  SECTION:=utils
-  CATEGORY:=Utilities
-  TITLE:=Archiver for .zip files
-  URL:=http://infozip.sourceforge.net/Zip.html
-  SUBMENU:=Compression
-endef
-
-define Package/zip/description
-       This is InfoZIP's zip program. It produces files that are fully
-       compatible with the popular PKZIP program; however, the command line
-       options are not identical. In other words, the end result is the same,
-       but the methods differ.
-endef
-
-MAKE_FLAGS += \
-       -f unix/Makefile \
-       prefix="$(PKG_INSTALL_DIR)/usr" \
-       CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I. -DUNIX" \
-       LDFLAGS2="$(TARGET_LDFLAGS)" \
-       IZ_BZIP2="no"
-
-define Package/zip/install
-       $(INSTALL_DIR) $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
-endef
-
-$(eval $(call BuildPackage,zip))
diff --git a/utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch b/utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch
deleted file mode 100644 (file)
index 892540b..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From fc392c939b9a18959482f588aff0afc29dd6d30a Mon Sep 17 00:00:00 2001
-From: Romain Naour <romain.naour at openwide.fr>
-Date: Fri, 23 Jan 2015 22:20:18 +0100
-Subject: [PATCH 6/6] unix/configure: borrow the LFS test from autotools.
-
-Infozip's LFS check can't work for cross-compilation
-since it try to run a target's binary on the host system.
-
-Instead, use to LFS test used by autotools which is a
-compilation test.
-(see autotools/lib/autoconf/specific.m4)
-
-Reported-by: Richard Genoud <richard.genoud at gmail.com>
-Signed-off-by: Romain Naour <romain.naour at openwide.fr>
----
- configure |   46 +++++++++++++++-------------------------------
- 1 file changed, 15 insertions(+), 31 deletions(-)
-
-diff --rupN a/unix/configure b/unix/configure
---- a/unix/configure
-+++ b/unix/configure
-@@ -399,9 +399,8 @@ else
- fi
--# Now we set the 64-bit file environment and check the size of off_t
--# Added 11/4/2003 EG
--# Revised 8/12/2004 EG
-+# LFS check borrowed from autotools sources
-+# lib/autoconf/specific.m4
- echo Check for Large File Support
- cat > conftest.c << _EOF_
-@@ -410,23 +409,19 @@ cat > conftest.c << _EOF_
- # define _FILE_OFFSET_BITS 64       /* select default interface as 64 bit */
- # define _LARGE_FILES        /* some OSes need this for 64-bit off_t */
- #include <sys/types.h>
--#include <sys/stat.h>
--#include <unistd.h>
--#include <stdio.h>
-+
-+ /* Check that off_t can represent 2**63 - 1 correctly.
-+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-+    since some C++ compilers masquerading as C compilers
-+    incorrectly reject 9223372036854775807.  */
-+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-+                     && LARGE_OFF_T % 2147483647 == 1)
-+                    ? 1 : -1];
-+
- int main()
- {
--  off_t offset;
--  struct stat s;
--  /* see if have 64-bit off_t */
--  if (sizeof(offset) < 8)
--    return 1;
--  printf("  off_t is %d bytes\n", sizeof(off_t));
--  /* see if have 64-bit stat */
--  if (sizeof(s.st_size) < 8) {
--    printf("  s.st_size is %d bytes\n", sizeof(s.st_size));
--    return 2;
--  }
--  return 3;
-+  return 0;
- }
- _EOF_
- # compile it
-@@ -434,19 +429,8 @@ $CC -o conftest conftest.c >/dev/null 2>
- if [ $? -ne 0 ]; then
-   echo -- no Large File Support
- else
--# run it
--  ./conftest
--  r=$?
--  if [ $r -eq 1 ]; then
--    echo -- no Large File Support - no 64-bit off_t
--  elif [ $r -eq 2 ]; then
--    echo -- no Large File Support - no 64-bit stat
--  elif [ $r -eq 3 ]; then
--    echo -- yes we have Large File Support!
--    CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT"
--  else
--    echo -- no Large File Support - conftest returned $r
--  fi
-+  echo -- yes we have Large File Support!
-+  CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT"
- fi
diff --git a/utils/zip/patches/010-remove-build-date.patch b/utils/zip/patches/010-remove-build-date.patch
deleted file mode 100644 (file)
index d7165cd..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-From: Santiago Vila <sanvila@debian.org>
-Subject: Remove (optional) build date to make the build reproducible
-Bug-Debian: http://bugs.debian.org/779042
-
---- a/unix/unix.c
-+++ b/unix/unix.c
-@@ -1020,7 +1020,7 @@
- /* Define the compile date string */
--#ifdef __DATE__
-+#if 0
- #  define COMPILE_DATE " on " __DATE__
- #else
- #  define COMPILE_DATE ""
diff --git a/utils/zip/patches/020-format.patch b/utils/zip/patches/020-format.patch
deleted file mode 100644 (file)
index 6b371a6..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/zip.c
-+++ b/zip.c
-@@ -1028,8 +1028,7 @@ local void help_extended()
-   for (i = 0; i < sizeof(text)/sizeof(char *); i++)
-   {
--    printf(text[i]);
--    putchar('\n');
-+    puts(text[i]);
-   }
- #ifdef DOS
-   check_for_windows("Zip");
-@@ -1225,8 +1224,7 @@ local void version_info()
-             CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE);
-   for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++)
-   {
--    printf(cryptnote[i]);
--    putchar('\n');
-+    puts(cryptnote[i]);
-   }
-   ++i;  /* crypt support means there IS at least one compilation option */
- #endif /* CRYPT */