aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xz
diff options
context:
space:
mode:
authorJames <>2015-11-04 11:49:21 +0000
committerJames <>2015-11-04 11:49:21 +0000
commit716ca530e1c4515d8683c9d5be3d56b301758b66 (patch)
tree700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /tools/xz
downloadtrunk-47381-master.tar.gz
trunk-47381-master.tar.bz2
trunk-47381-master.zip
trunk-47381HEADmaster
Diffstat (limited to 'tools/xz')
-rw-r--r--tools/xz/Makefile29
-rw-r--r--tools/xz/patches/100-freebsd-compat.patch11
2 files changed, 40 insertions, 0 deletions
diff --git a/tools/xz/Makefile b/tools/xz/Makefile
new file mode 100644
index 0000000..ce67acf
--- /dev/null
+++ b/tools/xz/Makefile
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=xz
+PKG_VERSION:=5.2.2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://tukaani.org/xz \
+ http://fossies.org/linux/misc
+PKG_MD5SUM:=f90c9a0c8b259aee2234c4e0d7fd70af
+
+HOST_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CONFIGURE_ARGS += \
+ --enable-static=yes \
+ --enable-shared=no \
+
+define Host/Install
+ +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) install xzlinks="unxz xzcat"
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/xz/patches/100-freebsd-compat.patch b/tools/xz/patches/100-freebsd-compat.patch
new file mode 100644
index 0000000..480a652
--- /dev/null
+++ b/tools/xz/patches/100-freebsd-compat.patch
@@ -0,0 +1,11 @@
+--- 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