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