1 |
commit: 6790ee11d7e93abaac0b18e0d58e8949fba2cbb8 |
2 |
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> |
3 |
AuthorDate: Wed Apr 10 00:55:09 2019 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 10 00:55:09 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6790ee11 |
7 |
|
8 |
dev-util/trace-cmd: Clean up how flags are passed to the build system |
9 |
|
10 |
Copyright: Sony Interactive Entertainment Inc. |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
12 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
13 |
|
14 |
.../trace-cmd/files/trace-cmd-2.7-makefile.patch | 15 ++++++----- |
15 |
dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild | 31 ++++++++++++---------- |
16 |
dev-util/trace-cmd/trace-cmd-9999.ebuild | 31 ++++++++++++---------- |
17 |
3 files changed, 43 insertions(+), 34 deletions(-) |
18 |
|
19 |
diff --git a/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch b/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch |
20 |
index da1ca62e7c0..a9d7584dc62 100644 |
21 |
--- a/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch |
22 |
+++ b/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch |
23 |
@@ -1,7 +1,8 @@ |
24 |
-diff -ur trace-cmd-v2.7.orig/Makefile trace-cmd-v2.7/Makefile |
25 |
---- trace-cmd-v2.7.orig/Makefile 2018-02-01 23:35:28.000000000 +0100 |
26 |
-+++ trace-cmd-v2.7/Makefile 2018-09-16 16:42:58.445655156 +0200 |
27 |
-@@ -63,7 +63,7 @@ |
28 |
+diff --git a/Makefile b/Makefile |
29 |
+index a5d2c38..a99e5a4 100644 |
30 |
+--- a/Makefile |
31 |
++++ b/Makefile |
32 |
+@@ -63,7 +63,7 @@ python_dir = $(HOME)/.trace-cmd/python |
33 |
var_dir = $(HOME)/.trace-cmd/ |
34 |
else |
35 |
plugin_dir = $(libdir)/trace-cmd/plugins |
36 |
@@ -10,7 +11,7 @@ diff -ur trace-cmd-v2.7.orig/Makefile trace-cmd-v2.7/Makefile |
37 |
PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)" |
38 |
PYTHON_DIR = -DPYTHON_DIR="$(python_dir)" |
39 |
PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))' |
40 |
-@@ -119,8 +119,11 @@ |
41 |
+@@ -119,8 +119,13 @@ endif # NO_PYTHON |
42 |
test-build = $(if $(shell sh -c 'echo "$(1)" | \ |
43 |
$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y'), $2) |
44 |
|
45 |
@@ -19,11 +20,13 @@ diff -ur trace-cmd-v2.7.orig/Makefile trace-cmd-v2.7/Makefile |
46 |
-udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86) |
47 |
+udis86-flags := -DHAVE_UDIS86 |
48 |
+udis86-ldflags := -ludis86 |
49 |
++else |
50 |
++udis86-flags := -UHAVE_UDIS86 |
51 |
+endif # NO_UDIS86 |
52 |
|
53 |
define BLK_TC_FLUSH_SOURCE |
54 |
#include <linux/blktrace_api.h> |
55 |
-@@ -276,6 +279,7 @@ |
56 |
+@@ -276,6 +281,7 @@ endif |
57 |
# Append required CFLAGS |
58 |
override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) $(VAR_DIR) |
59 |
override CFLAGS += $(udis86-flags) $(blk-flags) |
60 |
|
61 |
diff --git a/dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild b/dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild |
62 |
index d38e2e55b21..f9a2adfa4f0 100644 |
63 |
--- a/dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild |
64 |
+++ b/dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild |
65 |
@@ -41,8 +41,8 @@ CONFIG_CHECK=" |
66 |
~BLK_DEV_IO_TRACE" |
67 |
|
68 |
PATCHES=( |
69 |
- "${FILESDIR}"/${PN}-2.7-makefile.patch |
70 |
- "${FILESDIR}"/${PN}-2.7-soname.patch |
71 |
+ "${FILESDIR}"/trace-cmd-2.7-makefile.patch |
72 |
+ "${FILESDIR}"/trace-cmd-2.7-soname.patch |
73 |
) |
74 |
|
75 |
pkg_setup() { |
76 |
@@ -51,30 +51,33 @@ pkg_setup() { |
77 |
} |
78 |
|
79 |
src_configure() { |
80 |
- MAKEOPTS+=" prefix=/usr |
81 |
- libdir=/usr/$(get_libdir) |
82 |
- CC=$(tc-getCC) |
83 |
- AR=$(tc-getAR) |
84 |
- $(usex audit '' '' 'NO_AUDIT=1')" |
85 |
+ EMAKE_FLAGS=( |
86 |
+ "prefix=/usr" |
87 |
+ "libdir=/usr/$(get_libdir)" |
88 |
+ "CC=$(tc-getCC)" |
89 |
+ "AR=$(tc-getAR)" |
90 |
+ $(usex audit '' '' 'NO_AUDIT=1') |
91 |
+ $(usex udis86 '' '' 'NO_UDIS86=1') |
92 |
+ ) |
93 |
|
94 |
if use python; then |
95 |
- MAKEOPTS+=" PYTHON_VERS=${EPYTHON//python/python-}" |
96 |
- MAKEOPTS+=" python_dir=$(python_get_sitedir)/${PN}" |
97 |
+ EMAKE_FLAGS+=( |
98 |
+ "PYTHON_VERS=${EPYTHON//python/python-}" |
99 |
+ "python_dir=$(python_get_sitedir)/${PN}" |
100 |
+ ) |
101 |
else |
102 |
- MAKEOPTS+=" NO_PYTHON=1" |
103 |
+ EMAKE_FLAGS+=("NO_PYTHON=1") |
104 |
fi |
105 |
- |
106 |
- use udis86 || MAKEOPTS+=" NO_UDIS86=1" |
107 |
} |
108 |
|
109 |
src_compile() { |
110 |
- emake V=1 all_cmd libs |
111 |
+ emake "${EMAKE_FLAGS[@]}" all_cmd libs |
112 |
use doc && emake doc |
113 |
|
114 |
} |
115 |
|
116 |
src_install() { |
117 |
- emake DESTDIR="${D}" V=1 install install_libs |
118 |
+ emake "${EMAKE_FLAGS[@]}" DESTDIR="${D}" V=1 install install_libs |
119 |
use doc && emake DESTDIR="${D}" install_doc |
120 |
|
121 |
} |
122 |
|
123 |
diff --git a/dev-util/trace-cmd/trace-cmd-9999.ebuild b/dev-util/trace-cmd/trace-cmd-9999.ebuild |
124 |
index d38e2e55b21..f9a2adfa4f0 100644 |
125 |
--- a/dev-util/trace-cmd/trace-cmd-9999.ebuild |
126 |
+++ b/dev-util/trace-cmd/trace-cmd-9999.ebuild |
127 |
@@ -41,8 +41,8 @@ CONFIG_CHECK=" |
128 |
~BLK_DEV_IO_TRACE" |
129 |
|
130 |
PATCHES=( |
131 |
- "${FILESDIR}"/${PN}-2.7-makefile.patch |
132 |
- "${FILESDIR}"/${PN}-2.7-soname.patch |
133 |
+ "${FILESDIR}"/trace-cmd-2.7-makefile.patch |
134 |
+ "${FILESDIR}"/trace-cmd-2.7-soname.patch |
135 |
) |
136 |
|
137 |
pkg_setup() { |
138 |
@@ -51,30 +51,33 @@ pkg_setup() { |
139 |
} |
140 |
|
141 |
src_configure() { |
142 |
- MAKEOPTS+=" prefix=/usr |
143 |
- libdir=/usr/$(get_libdir) |
144 |
- CC=$(tc-getCC) |
145 |
- AR=$(tc-getAR) |
146 |
- $(usex audit '' '' 'NO_AUDIT=1')" |
147 |
+ EMAKE_FLAGS=( |
148 |
+ "prefix=/usr" |
149 |
+ "libdir=/usr/$(get_libdir)" |
150 |
+ "CC=$(tc-getCC)" |
151 |
+ "AR=$(tc-getAR)" |
152 |
+ $(usex audit '' '' 'NO_AUDIT=1') |
153 |
+ $(usex udis86 '' '' 'NO_UDIS86=1') |
154 |
+ ) |
155 |
|
156 |
if use python; then |
157 |
- MAKEOPTS+=" PYTHON_VERS=${EPYTHON//python/python-}" |
158 |
- MAKEOPTS+=" python_dir=$(python_get_sitedir)/${PN}" |
159 |
+ EMAKE_FLAGS+=( |
160 |
+ "PYTHON_VERS=${EPYTHON//python/python-}" |
161 |
+ "python_dir=$(python_get_sitedir)/${PN}" |
162 |
+ ) |
163 |
else |
164 |
- MAKEOPTS+=" NO_PYTHON=1" |
165 |
+ EMAKE_FLAGS+=("NO_PYTHON=1") |
166 |
fi |
167 |
- |
168 |
- use udis86 || MAKEOPTS+=" NO_UDIS86=1" |
169 |
} |
170 |
|
171 |
src_compile() { |
172 |
- emake V=1 all_cmd libs |
173 |
+ emake "${EMAKE_FLAGS[@]}" all_cmd libs |
174 |
use doc && emake doc |
175 |
|
176 |
} |
177 |
|
178 |
src_install() { |
179 |
- emake DESTDIR="${D}" V=1 install install_libs |
180 |
+ emake "${EMAKE_FLAGS[@]}" DESTDIR="${D}" V=1 install install_libs |
181 |
use doc && emake DESTDIR="${D}" install_doc |
182 |
|
183 |
} |