blob: 7bd3c5ac176a84b79258caaf1ffb04ed72110ed3 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
2# Copyright (C) 2008-2013 OpenWrt.org
3# Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
4#
5# This is free software, licensed under the GNU General Public License v2.
6# See /LICENSE for more information.
7#
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=libunwind
12PKG_VERSION:=1.8.1
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
17PKG_HASH:=ddf0e32dd5fafe5283198d37e4bf9decf7ba1770b6e7e006c33e6df79e6a6157
18
19PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
20PKG_LICENSE:=X11
21PKG_LICENSE_FILES:=LICENSE
22PKG_CPE_ID:=cpe:/a:libunwind_project:libunwind
23
24PKG_FIXUP:=autoreconf
25PKG_INSTALL:=1
26PKG_BUILD_PARALLEL:=1
27
28include $(INCLUDE_DIR)/package.mk
29
30define Package/libunwind
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE:=The libunwind project
34 URL:=http://www.nongnu.org/libunwind/
35 DEPENDS:=@((mips||mipsel||mips64||powerpc64||x86_64||arm||aarch64||loongarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib
36 ABI_VERSION:=8
37endef
38
39define Package/libunwind/description
40 Libunwind defines a portable and efficient C programming interface (API) to determine the call-chain of a program.
41endef
42
43CONFIGURE_ARGS += \
44 --disable-documentation \
45 --disable-tests \
46 --disable-minidebuginfo
47
48TARGET_LDFLAGS += $(if $(CONFIG_USE_MUSL),-lssp_nonshared)
49
50define Package/libunwind/install
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunwin*.so.* $(1)/usr/lib/
53endef
54
55define Build/InstallDev
56 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunwin*.so* $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
60endef
61
62$(eval $(call BuildPackage,libunwind))