1################################################################################ 2# 3# zip 4# 5################################################################################ 6 7ZIP_VERSION = 3.0 8# The version is really 3.0, but the tarball is named zip30.tar.gz 9ZIP_SOURCE = zip$(subst .,,$(ZIP_VERSION)).tar.gz 10ZIP_SITE = https://sourceforge.net/projects/infozip/files/Zip%203.x%20%28latest%29/$(ZIP_VERSION) 11ZIP_LICENSE = Info-ZIP 12ZIP_LICENSE_FILES = LICENSE 13ZIP_CPE_ID_VENDOR = info-zip_project 14 15ifeq ($(BR2_PACKAGE_BZIP2),y) 16ZIP_DEPENDENCIES += bzip2 17endif 18 19# Infozip's default CFLAGS. 20ZIP_CFLAGS = -I. -DUNIX 21 22# Disable the support of 16-bit UIDs/GIDs, the test in unix/configure was 23# removed since it can't work for cross-compilation. 24ZIP_CFLAGS += -DUIDGID_NOT_16BIT 25 26# infozip already defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE when 27# necessary, redefining it on the command line causes some warnings. 28ZIP_TARGET_CFLAGS = \ 29 $(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS)) 30 31define ZIP_BUILD_CMDS 32 $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ 33 CFLAGS="$(ZIP_TARGET_CFLAGS) $(ZIP_CFLAGS)" \ 34 CC="$(TARGET_CC) -std=gnu89" AS="$(TARGET_CC) -c" \ 35 -f unix/Makefile generic 36endef 37 38define ZIP_INSTALL_TARGET_CMDS 39 $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ 40 prefix=$(TARGET_DIR)/usr 41endef 42 43define HOST_ZIP_BUILD_CMDS 44 $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \ 45 CFLAGS="$(HOST_CFLAGS) $(ZIP_CFLAGS)" \ 46 CC="$(HOSTCC) -std=gnu89" AS="$(HOSTCC) -c" \ 47 -f unix/Makefile generic 48endef 49 50define HOST_ZIP_INSTALL_CMDS 51 $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ 52 prefix=$(HOST_DIR) 53endef 54 55$(eval $(generic-package)) 56$(eval $(host-generic-package)) 57