[source] tools: xz: use .bz2 archive

LEDE Commits lede-commits at lists.infradead.org
Thu Oct 6 05:13:24 PDT 2016


jow pushed a commit to source.git, branch master:
https://git.lede-project.org/e68c0a1325f86a757d33d252e687ee7c9f74a8b7

commit e68c0a1325f86a757d33d252e687ee7c9f74a8b7
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Thu Oct 6 12:25:29 2016 +0200

    tools: xz: use .bz2 archive
    
    In order to build XZ itself we cannot assume that XZ support is available,
    so fetch the bz2 archive variant of its sources instead.
    
    Also drop the FreeBSD portability patch and apply it at prepare time using
    sed, to avoid a dependency on GNU patch which in turn depends on XZ support.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 tools/xz/Makefile                         | 12 ++++++++++--
 tools/xz/patches/100-freebsd-compat.patch | 11 -----------
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/tools/xz/Makefile b/tools/xz/Makefile
index 1bccbdb..d08d6f8 100644
--- a/tools/xz/Makefile
+++ b/tools/xz/Makefile
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=xz
 PKG_VERSION:=5.2.2
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/lzmautils \
 		http://tukaani.org/xz
-PKG_MD5SUM:=f341b1906ebcdde291dd619399ae944600edc9193619dd0c0110a5f05bfcc89e
+PKG_MD5SUM:=6ff5f57a4b9167155e35e6da8b529de69270efb2b4cf3fbabf41a4ee793840b5
 
 HOST_BUILD_PARALLEL:=1
 
@@ -22,6 +22,14 @@ HOST_CONFIGURE_ARGS += \
 	--enable-static=yes \
 	--enable-shared=no \
 
+define Host/Prepare
+	$(call Host/Prepare/Default)
+
+	# FreeBSD portability fix
+	sed -i -e 's|#if defined(HAVE_BYTESWAP_H)|& \&\& !defined(__FreeBSD__)|' \
+		$(HOST_BUILD_DIR)/src/common/tuklib_integer.h
+endef
+
 define Host/Install
 	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) install xzlinks="unxz xzcat"
 endef
diff --git a/tools/xz/patches/100-freebsd-compat.patch b/tools/xz/patches/100-freebsd-compat.patch
deleted file mode 100644
index 480a652..0000000
--- a/tools/xz/patches/100-freebsd-compat.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/common/tuklib_integer.h
-+++ b/src/common/tuklib_integer.h
-@@ -48,7 +48,7 @@
- // Operating system specific features //
- ////////////////////////////////////////
- 
--#if defined(HAVE_BYTESWAP_H)
-+#if defined(HAVE_BYTESWAP_H) && !defined(__FreeBSD__)
- 	// glibc, uClibc, dietlibc
- #	include <byteswap.h>
- #	ifdef HAVE_BSWAP_16



More information about the lede-commits mailing list