Fresh pull from upstream
[librecmc/librecmc.git] / tools / xz / Makefile
1
2 # Copyright (C) 2006-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=xz
10 PKG_VERSION:=5.2.3
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
13 PKG_SOURCE_URL:=@SF/lzmautils \
14                 http://tukaani.org/xz
15 PKG_HASH:=fd9ca16de1052aac899ad3495ad20dfa906c27b4a5070102a2ec35ca3a4740c1
16
17 HOST_BUILD_PARALLEL:=1
18
19 include $(INCLUDE_DIR)/host-build.mk
20
21 HOSTCC := $(HOSTCC_NOCACHE)
22 HOSTCXX := $(HOSTCXX_NOCACHE)
23
24 HOST_CONFIGURE_ARGS += \
25         --enable-static=yes \
26         --enable-shared=no \
27
28 define Host/Prepare
29         $(call Host/Prepare/Default)
30
31         # FreeBSD portability fix
32         sed -i -e 's|#if defined(HAVE_BYTESWAP_H)|& \&\& !defined(__FreeBSD__)|' \
33                 $(HOST_BUILD_DIR)/src/common/tuklib_integer.h
34 endef
35
36 define Host/Install
37         +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) install xzlinks="unxz xzcat"
38 endef
39
40 $(eval $(call HostBuild))