tools/elfutils: disable bzlib support
[openwrt/staging/jow.git] / tools / elfutils / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=elfutils
6 PKG_VERSION:=0.189
7 PKG_RELEASE:=1
8
9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
10 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
11 PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8
12
13 PKG_LICENSE:=GPL-3.0-or-later
14 PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
15 PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
16
17 PKG_FIXUP:=autoreconf
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/host-build.mk
21
22 ifeq ($(HOST_OS),Darwin)
23 HOST_CFLAGS += -I/opt/homebrew/include
24 endif
25
26 HOST_CFLAGS += -Wno-error -fPIC
27
28 HOST_CONFIGURE_ARGS += \
29 --without-libintl-prefix \
30 --without-libiconv-prefix \
31 --disable-debuginfod \
32 --disable-libdebuginfod \
33 --disable-nls \
34 --disable-shared \
35 --enable-static \
36 --without-lzma \
37 --without-bzlib \
38 --without-zstd
39
40 ifeq ($(HOST_OS),Darwin)
41 HOST_CONFIGURE_ARGS += --disable-symbol-versioning
42 endif
43
44 Hooks/HostConfigure/Pre := Host/Gnulib $(Hooks/HostConfigure/Pre)
45 define Host/Gnulib
46 cd $(HOST_BUILD_DIR); $(STAGING_DIR_HOST)/bin/gnulib-tool --libtool --source-base=libgnu --import argp obstack fts strchrnul progname tsearch;
47 ln -sf ../lib/eu-config.h $(HOST_BUILD_DIR)/libgnu/;
48 endef
49
50 define Host/Uninstall
51 -$(call Host/Compile/Default,uninstall)
52 endef
53
54 $(eval $(call HostBuild))