2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-01-14 04:30:00 +01:00
|
|
|
#
|
2015-11-27 18:38:00 +01:00
|
|
|
# zip
|
2013-01-14 04:30:00 +01:00
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
2015-11-27 18:38:00 +01:00
|
|
|
ZIP_VERSION = 30
|
|
|
|
ZIP_SOURCE = zip$(ZIP_VERSION).tgz
|
|
|
|
ZIP_SITE = ftp://ftp.info-zip.org/pub/infozip/src
|
|
|
|
ZIP_LICENSE = Info-ZIP
|
|
|
|
ZIP_LICENSE_FILES = LICENSE
|
2013-01-14 04:30:00 +01:00
|
|
|
|
2014-01-30 23:15:44 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
2015-11-27 18:38:00 +01:00
|
|
|
ZIP_DEPENDENCIES += bzip2
|
2014-01-30 23:15:44 +01:00
|
|
|
endif
|
|
|
|
|
2015-01-24 16:23:41 +01:00
|
|
|
# Infozip's default CFLAGS.
|
2015-11-27 18:38:00 +01:00
|
|
|
ZIP_CFLAGS = -I. -DUNIX
|
2015-01-24 16:23:41 +01:00
|
|
|
|
2015-01-24 16:23:42 +01:00
|
|
|
# Disable the support of 16-bit UIDs/GIDs, the test in unix/configure was
|
|
|
|
# removed since it can't work for cross-compilation.
|
2015-11-27 18:38:00 +01:00
|
|
|
ZIP_CFLAGS += -DUIDGID_NOT_16BIT
|
2015-01-24 16:23:42 +01:00
|
|
|
|
2015-01-24 16:23:44 +01:00
|
|
|
# infozip already defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE when
|
|
|
|
# necessary, redefining it on the command line causes some warnings.
|
2015-11-27 18:38:00 +01:00
|
|
|
ZIP_TARGET_CFLAGS = \
|
2015-01-24 16:23:44 +01:00
|
|
|
$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS))
|
|
|
|
|
2015-11-27 18:38:00 +01:00
|
|
|
define ZIP_BUILD_CMDS
|
2014-01-30 23:15:28 +01:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
|
2015-11-27 18:38:00 +01:00
|
|
|
CFLAGS="$(ZIP_TARGET_CFLAGS) $(ZIP_CFLAGS)" \
|
2014-01-30 23:15:28 +01:00
|
|
|
AS="$(TARGET_CC) -c" \
|
|
|
|
-f unix/Makefile generic
|
2013-01-14 04:30:00 +01:00
|
|
|
endef
|
|
|
|
|
2015-11-27 18:38:00 +01:00
|
|
|
define ZIP_INSTALL_TARGET_CMDS
|
2013-01-14 04:30:00 +01:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \
|
|
|
|
prefix=$(TARGET_DIR)/usr
|
|
|
|
endef
|
|
|
|
|
2015-11-27 18:38:00 +01:00
|
|
|
define HOST_ZIP_BUILD_CMDS
|
2014-04-02 00:24:38 +02:00
|
|
|
$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \
|
2015-11-27 18:38:00 +01:00
|
|
|
CFLAGS="$(HOST_CFLAGS) $(ZIP_CFLAGS)" \
|
2014-08-16 00:22:55 +02:00
|
|
|
AS="$(HOSTCC) -c" \
|
2014-04-02 00:24:38 +02:00
|
|
|
-f unix/Makefile generic
|
|
|
|
endef
|
|
|
|
|
2015-11-27 18:38:00 +01:00
|
|
|
define HOST_ZIP_INSTALL_CMDS
|
2014-04-02 00:24:38 +02:00
|
|
|
$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \
|
|
|
|
prefix=$(HOST_DIR)/usr
|
|
|
|
endef
|
|
|
|
|
2013-01-14 04:30:00 +01:00
|
|
|
$(eval $(generic-package))
|
2014-04-02 00:24:38 +02:00
|
|
|
$(eval $(host-generic-package))
|