elfutils: Copy missing libraries to staging and packages
[openwrt/openwrt.git] / package / libs / elfutils / Makefile
1 #
2 # Copyright (C) 2010-2014 OpenWrt.org
3 # Copyright (C) 2016-2017 Luiz Angelo Daros de Luca <luizluca@gmail.com>
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=elfutils
11 PKG_VERSION:=0.173
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
16 PKG_HASH:=b76d8c133f68dad46250f5c223482c8299d454a69430d9aa5c19123345a000ff
17 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
18 PKG_LICENSE:=GPL-3.0+
19 PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
20 PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
21 PKG_FIXUP:=autoreconf
22
23 PKG_INSTALL:=1
24 PKG_USE_MIPS16:=0
25
26 PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/nls.mk
30
31 define Package/elfutils/Default
32 SECTION:=libs
33 CATEGORY:=Libraries
34 TITLE:=ELF manipulation libraries
35 URL:=https://fedorahosted.org/elfutils/
36 endef
37
38 define Package/libasm
39 $(call Package/elfutils/Default)
40 TITLE+= (libasm)
41 DEPENDS:=libelf1 +libdw
42 endef
43
44 define Package/libdw
45 $(call Package/elfutils/Default)
46 DEPENDS:=libelf1 +libbz2
47 TITLE+= (libdw)
48 endef
49
50 define Package/libelf1
51 $(call Package/elfutils/Default)
52 DEPENDS:=$(INTL_DEPENDS) +zlib
53 TITLE+= (libelf)
54 endef
55
56 ifeq ($(CONFIG_BUILD_NLS),y)
57 TARGET_LDFLAGS += "-lintl"
58 endif
59
60 CONFIGURE_ARGS += \
61 --program-prefix=eu- \
62 --disable-nls \
63 --without-lzma
64
65 TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
66
67 define Build/InstallDev
68 $(INSTALL_DIR) $(1)/usr/include
69 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
74 endef
75
76 define Package/libasm/install
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.so* $(1)/usr/lib/
79 endef
80
81 define Package/libdw/install
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.so* $(1)/usr/lib/
84 endef
85
86 define Package/libelf1/install
87 $(INSTALL_DIR) $(1)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.so* $(1)/usr/lib/
89 endef
90
91 $(eval $(call BuildPackage,libasm))
92 $(eval $(call BuildPackage,libdw))
93 $(eval $(call BuildPackage,libelf1))