kumquat-buildroot/package/bzip2/bzip2.mk
Bernd Kuhls 7ae14d201e package/bzip2: security bump version to 1.0.8
Switched to new maintainer source:
https://sourceware.org/ml/bzip2-devel/2019-q2/msg00022.html

Version 1.0.7 fixes CVE-2016-3189 & CVE-2019-12900

Version 1.0.8 fixes the fix for CVE-2019-12900 from 1.0.7:
https://sourceware.org/ml/bzip2-devel/2019-q3/msg00031.html

Rebased 0002-improve-build-system.patch.

Removed 0003-Make-sure-nSelectors-is-not-out-of-range.patch, applied
upstream:
https://sourceware.org/git/?p=bzip2.git;a=commitdiff;h=7ed62bfb46e87a9e878712603469440e6882b184
and reverted later on
https://sourceware.org/git/?p=bzip2.git;a=commitdiff;h=b07b105d1b66e32760095e3602261738443b9e13

Added upstream sha512 hash and updated license hash after upstream
commits:
https://sourceware.org/git/?p=bzip2.git;a=history;f=LICENSE;h=81a37eab7a5be1a34456f38adb74928cc9073e9b;hb=HEAD

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-08-03 23:03:10 +02:00

70 lines
1.8 KiB
Makefile

################################################################################
#
# bzip2
#
################################################################################
BZIP2_VERSION = 1.0.8
BZIP2_SITE = https://sourceware.org/pub/bzip2
BZIP2_INSTALL_STAGING = YES
BZIP2_LICENSE = bzip2 license
BZIP2_LICENSE_FILES = LICENSE
ifeq ($(BR2_STATIC_LIBS),)
define BZIP2_BUILD_SHARED_CMDS
$(TARGET_MAKE_ENV) \
$(MAKE) -C $(@D) -f Makefile-libbz2_so $(TARGET_CONFIGURE_OPTS)
endef
endif
define BZIP2_BUILD_CMDS
$(TARGET_MAKE_ENV) \
$(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover $(TARGET_CONFIGURE_OPTS)
$(BZIP2_BUILD_SHARED_CMDS)
endef
ifeq ($(BR2_STATIC_LIBS),)
define BZIP2_INSTALL_STAGING_SHARED_CMDS
$(TARGET_MAKE_ENV) $(MAKE) \
-f Makefile-libbz2_so PREFIX=$(STAGING_DIR)/usr -C $(@D) install
endef
endif
define BZIP2_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) \
PREFIX=$(STAGING_DIR)/usr -C $(@D) install
$(BZIP2_INSTALL_STAGING_SHARED_CMDS)
endef
ifeq ($(BR2_STATIC_LIBS),)
define BZIP2_INSTALL_TARGET_SHARED_CMDS
$(TARGET_MAKE_ENV) $(MAKE) \
-f Makefile-libbz2_so PREFIX=$(TARGET_DIR)/usr -C $(@D) install
endef
endif
# make sure busybox doesn't get overwritten by make install
define BZIP2_INSTALL_TARGET_CMDS
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,bzip2 bunzip2 bzcat)
$(TARGET_MAKE_ENV) $(MAKE) \
PREFIX=$(TARGET_DIR)/usr -C $(@D) install
$(BZIP2_INSTALL_TARGET_SHARED_CMDS)
endef
define HOST_BZIP2_BUILD_CMDS
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \
$(MAKE) -C $(@D) -f Makefile-libbz2_so
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \
$(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover
endef
define HOST_BZIP2_INSTALL_CMDS
$(HOST_MAKE_ENV) \
$(MAKE) PREFIX=$(HOST_DIR) -C $(@D) install
$(HOST_MAKE_ENV) \
$(MAKE) -f Makefile-libbz2_so PREFIX=$(HOST_DIR) -C $(@D) install
endef
$(eval $(generic-package))
$(eval $(host-generic-package))