bcm53xx: fix ASUS firmwares to use vendor format
[openwrt/staging/jogo.git] / package / devel / strace / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=strace
12 PKG_VERSION:=5.5
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
17 PKG_HASH:=9f58958c8e59ea62293d907d10572e352b582bd7948ed21aa28ebb47e5bf30ff
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
20 PKG_LICENSE:=LGPL-2.1-or-later
21 PKG_LICENSE_FILES:=COPYING
22 PKG_CPE_ID:=cpe:/a:paul_kranenburg:strace
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26
27 PKG_CONFIG_DEPENDS := \
28 CONFIG_STRACE_LIBDW \
29 CONFIG_STRACE_LIBUNWIND
30
31 include $(INCLUDE_DIR)/package.mk
32
33 HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
34
35 ifeq ($(ARCH),aarch64)
36 CONFIGURE_ARGS += --enable-mpers=check
37 endif
38
39 CONFIGURE_VARS+= \
40 LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
41 CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
42 CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
43 CC_FOR_BUILD="$(HOST_CC)"
44
45 define Package/strace
46 SECTION:=utils
47 CATEGORY:=Utilities
48 TITLE:=System call tracer
49 URL:=https://strace.io/
50 DEPENDS:=+STRACE_LIBDW:libdw +STRACE_LIBUNWIND:libunwind
51 endef
52
53 define Package/strace/description
54 A useful diagnostic, instructional, and debugging tool. Allows you to track what
55 system calls a program makes while it is running.
56 endef
57
58 define Package/strace/config
59 choice
60 prompt "stack tracing support"
61 default STRACE_NONE
62
63 config STRACE_NONE
64 bool "None"
65
66 config STRACE_LIBDW
67 bool "libdw"
68
69 config STRACE_LIBUNWIND
70 bool "libunwind (experimental)"
71 endchoice
72 endef
73
74 CONFIGURE_ARGS += \
75 --with-libdw=$(if $(CONFIG_STRACE_LIBDW),yes,no) \
76 --with-libunwind=$(if $(CONFIG_STRACE_LIBUNWIND),yes,no)
77
78 MAKE_FLAGS := \
79 CCOPT="$(TARGET_CFLAGS)"
80
81 define Package/strace/install
82 $(INSTALL_DIR) $(1)/usr/bin
83 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
84 endef
85
86 $(eval $(call BuildPackage,strace))