From 3eda24351e85709e610550d1cf8a95c2858f40d2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 21 Jan 2020 18:54:23 -0800 Subject: [PATCH] zip: remove host build This is conflicting with tools/zip where the HostBuild is specified. This should allow the zip package to show up. Several cleanups were also performed for consistency between packages. Added PKG_BUILD_PARALLEL:=1 for faster compilation. Remove PKG_CHECK_FORMAT_SECURITY. Patched the issue instead. Signed-off-by: Rosen Penev --- utils/zip/Makefile | 39 +++++++++--------------------- utils/zip/patches/020-format.patch | 22 +++++++++++++++++ 2 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 utils/zip/patches/020-format.patch diff --git a/utils/zip/Makefile b/utils/zip/Makefile index c87f1ed84..cdd6212f6 100644 --- a/utils/zip/Makefile +++ b/utils/zip/Makefile @@ -10,27 +10,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zip PKG_REV:=30 PKG_VERSION:=3.0 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz PKG_SOURCE_URL:=@SF/infozip PKG_HASH:=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 -PKG_MAINTAINER:=Álvaro Fernández Rojas +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV) +PKG_MAINTAINER:=Álvaro Fernández Rojas PKG_LICENSE:=BSD-4-Clause PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV) -PKG_CHECK_FORMAT_SECURITY:=0 +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk define Package/zip SECTION:=utils CATEGORY:=Utilities - DEPENDS:= TITLE:=Archiver for .zip files URL:=http://infozip.sourceforge.net/Zip.html SUBMENU:=Compression @@ -43,31 +41,16 @@ define Package/zip/description but the methods differ. endef -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \ - prefix="$(PKG_INSTALL_DIR)/usr" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX $(TARGET_LDFLAGS)" \ - IZ_BZIP2="no" \ - install -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 -define Host/Compile - +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) -I. -f unix/Makefile generic -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/zip $(STAGING_DIR_HOSTPKG)/bin/ -endef - -$(eval $(call HostBuild)) $(eval $(call BuildPackage,zip)) diff --git a/utils/zip/patches/020-format.patch b/utils/zip/patches/020-format.patch new file mode 100644 index 000000000..6b371a62e --- /dev/null +++ b/utils/zip/patches/020-format.patch @@ -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 */