Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/trace-cmd/files/, dev-util/trace-cmd/
Date: Sat, 20 Jul 2019 02:04:08
Message-Id: 1563588237.40cbcbd9b3cacd2d90576080d9a2d806320f71d7.chutzpah@gentoo
1 commit: 40cbcbd9b3cacd2d90576080d9a2d806320f71d7
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Sat Jul 20 02:03:35 2019 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 20 02:03:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40cbcbd9
7
8 dev-util/trace-cmd: Revbump, soname fix and install missing headers
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.69, Repoman-2.3.16
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 .../trace-cmd/files/trace-cmd-2.8-makefile.patch | 48 ++++++++++++++++++++++
15 .../trace-cmd/files/trace-cmd-2.8-soname.patch | 6 +--
16 ...-cmd-2.8.2.ebuild => trace-cmd-2.8.2-r1.ebuild} | 8 ++--
17 3 files changed, 55 insertions(+), 7 deletions(-)
18
19 diff --git a/dev-util/trace-cmd/files/trace-cmd-2.8-makefile.patch b/dev-util/trace-cmd/files/trace-cmd-2.8-makefile.patch
20 new file mode 100644
21 index 00000000000..f95ffc3b18c
22 --- /dev/null
23 +++ b/dev-util/trace-cmd/files/trace-cmd-2.8-makefile.patch
24 @@ -0,0 +1,48 @@
25 +diff --git a/Makefile b/Makefile
26 +index ad74a96..3bab851 100644
27 +--- a/Makefile
28 ++++ b/Makefile
29 +@@ -64,7 +64,7 @@ python_dir = $(HOME)/.trace-cmd/python
30 + var_dir = $(HOME)/.trace-cmd/
31 + else
32 + plugin_dir = $(libdir)/trace-cmd/plugins
33 +-python_dir = $(libdir)/trace-cmd/python
34 ++python_dir ?= $(libdir)/trace-cmd/python
35 + PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)"
36 + PYTHON_DIR = -DPYTHON_DIR="$(python_dir)"
37 + PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
38 +@@ -136,8 +136,13 @@ export NO_PYTHON
39 + test-build = $(if $(shell sh -c 'echo "$(1)" | \
40 + $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y'), $2)
41 +
42 ++ifndef NO_UDIS86
43 + # have udis86 disassembler library?
44 +-udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86)
45 ++udis86-flags := -DHAVE_UDIS86
46 ++udis86-ldflags := -ludis86
47 ++else
48 ++udis86-flags := -UHAVE_UDIS86
49 ++endif # NO_UDIS86
50 +
51 + define BLK_TC_FLUSH_SOURCE
52 + #include <linux/blktrace_api.h>
53 +@@ -237,6 +242,7 @@ endif
54 + # Append required CFLAGS
55 + override CFLAGS += $(INCLUDES) $(PLUGIN_DIR_SQ) $(VAR_DIR)
56 + override CFLAGS += $(udis86-flags) $(blk-flags)
57 ++override LDFLAGS += $(udis86-ldflags)
58 +
59 + CMD_TARGETS = trace-cmd $(BUILD_PYTHON)
60 +
61 +@@ -339,8 +345,10 @@ install_gui: install_cmd gui
62 + install_libs: libs
63 + $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ))
64 + $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ))
65 +- $(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ))
66 ++ $(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ)/traceevent)
67 ++ $(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(includedir_SQ)/traceevent)
68 + $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ))
69 ++ $(Q)$(call do_install,$(src)/include/trace-cmd/trace-filter-hash.h,$(includedir_SQ))
70 +
71 + doc:
72 + $(MAKE) -C $(src)/Documentation all
73
74 diff --git a/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch b/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch
75 index 523f2d44467..b869080fb01 100644
76 --- a/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch
77 +++ b/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch
78 @@ -3,11 +3,11 @@ index 260023a..9eb127d 100644
79 --- a/scripts/utils.mk
80 +++ b/scripts/utils.mk
81 @@ -54,7 +54,7 @@ do_build_static_lib = \
82 -
83 +
84 do_compile_shared_library = \
85 ($(print_shared_lib_compile) \
86 - $(CC) --shared $^ -o $@)
87 -+ $(CC) --shared $^ -Wl,-soname,$@ -o $@)
88 -
89 ++ $(CC) --shared $^ -Wl,-soname,$(@F) -o $@)
90 +
91 do_compile_plugin_obj = \
92 ($(print_plugin_obj_compile) \
93
94 diff --git a/dev-util/trace-cmd/trace-cmd-2.8.2.ebuild b/dev-util/trace-cmd/trace-cmd-2.8.2-r1.ebuild
95 similarity index 94%
96 rename from dev-util/trace-cmd/trace-cmd-2.8.2.ebuild
97 rename to dev-util/trace-cmd/trace-cmd-2.8.2-r1.ebuild
98 index 33ae834f1ac..5fdce8d46d5 100644
99 --- a/dev-util/trace-cmd/trace-cmd-2.8.2.ebuild
100 +++ b/dev-util/trace-cmd/trace-cmd-2.8.2-r1.ebuild
101 @@ -20,7 +20,7 @@ else
102 fi
103
104 LICENSE="GPL-2+ LGPL-2.1+"
105 -SLOT="0"
106 +SLOT="0/${PV}"
107 IUSE="+audit doc python udis86"
108 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
109
110 @@ -42,7 +42,7 @@ CONFIG_CHECK="
111 ~BLK_DEV_IO_TRACE"
112
113 PATCHES=(
114 - "${FILESDIR}/trace-cmd-2.7-makefile.patch"
115 + "${FILESDIR}/trace-cmd-2.8-makefile.patch"
116 "${FILESDIR}/trace-cmd-2.8-python-pkgconfig-name.patch"
117 "${FILESDIR}/trace-cmd-2.8-soname.patch"
118 )
119 @@ -53,8 +53,8 @@ pkg_setup() {
120
121 src_configure() {
122 EMAKE_FLAGS=(
123 - "prefix=/usr"
124 - "libdir=/usr/$(get_libdir)"
125 + "prefix=${EPREFIX}/usr"
126 + "libdir=${EPREFIX}/usr/$(get_libdir)"
127 "CC=$(tc-getCC)"
128 "AR=$(tc-getAR)"
129 $(usex audit '' '' '' 'NO_AUDIT=1')