1 |
commit: f8a6fa80e0d463b369defc387ba6e78f29cd67c7 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 13 22:10:48 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 13 22:20:24 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8a6fa80 |
7 |
|
8 |
sys-devel/gdb: add source-highlight depend, bug #680238 |
9 |
|
10 |
Found and diagnosed by Jeroen Roovers. Patch proposed upstream as: |
11 |
https://sourceware.org/ml/gdb-patches/2019-03/msg00285.html |
12 |
|
13 |
Reported-by: Jeroen Roovers |
14 |
Closes: https://bugs.gentoo.org/680238 |
15 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
16 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
17 |
|
18 |
.../gdb-8.3.50.20190312-source-highlight.patch | 136 +++++++++++++++++++++ |
19 |
...190312.ebuild => gdb-8.3.50.20190312-r1.ebuild} | 13 +- |
20 |
sys-devel/gdb/gdb-9999.ebuild | 9 +- |
21 |
sys-devel/gdb/metadata.xml | 1 + |
22 |
4 files changed, 155 insertions(+), 4 deletions(-) |
23 |
|
24 |
diff --git a/sys-devel/gdb/files/gdb-8.3.50.20190312-source-highlight.patch b/sys-devel/gdb/files/gdb-8.3.50.20190312-source-highlight.patch |
25 |
new file mode 100644 |
26 |
index 00000000000..6479efe572f |
27 |
--- /dev/null |
28 |
+++ b/sys-devel/gdb/files/gdb-8.3.50.20190312-source-highlight.patch |
29 |
@@ -0,0 +1,136 @@ |
30 |
+From d46304c605ff119bc6bae38b7841d64e7568b691 Mon Sep 17 00:00:00 2001 |
31 |
+From: Sergei Trofimovich <slyfox@g.o> |
32 |
+Date: Wed, 13 Mar 2019 21:15:13 +0000 |
33 |
+Subject: [PATCH] gdb/configure.ac: add --enable-source-highlight |
34 |
+ |
35 |
+Allow disabling source-highlight dependency autodetection even |
36 |
+it exists in the system. More details on problem of automatic |
37 |
+dependencies: |
38 |
+https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies |
39 |
+ |
40 |
+Noticed by Jeroen Roovers in https://bugs.gentoo.org/680238 |
41 |
+--- a/gdb/configure |
42 |
++++ b/gdb/configure |
43 |
+@@ -879,6 +879,7 @@ with_mpfr |
44 |
+ with_libmpfr_prefix |
45 |
+ with_python |
46 |
+ with_guile |
47 |
++enable_source_highlight |
48 |
+ enable_libmcheck |
49 |
+ with_intel_pt |
50 |
+ with_libipt_prefix |
51 |
+@@ -1554,6 +1555,8 @@ Optional Features: |
52 |
+ --enable-profiling enable profiling of GDB |
53 |
+ --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
54 |
+ --disable-rpath do not hardcode runtime library paths |
55 |
++ --enable-source-highlight |
56 |
++ enable source-highlight for source listings |
57 |
+ --enable-libmcheck Try linking with -lmcheck if available |
58 |
+ --enable-werror treat compile warnings as errors |
59 |
+ --enable-build-warnings enable build-time compiler warnings if gcc is used |
60 |
+@@ -11393,13 +11396,30 @@ fi |
61 |
+ |
62 |
+ SRCHIGH_LIBS= |
63 |
+ SRCHIGH_CFLAGS= |
64 |
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 |
65 |
++ |
66 |
++# Check whether --enable-source-highlight was given. |
67 |
++if test "${enable_source_highlight+set}" = set; then : |
68 |
++ enableval=$enable_source_highlight; case "${enableval}" in |
69 |
++ yes) enable_source_highlight=yes ;; |
70 |
++ no) enable_source_highlight=no ;; |
71 |
++ *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; |
72 |
++esac |
73 |
++else |
74 |
++ enable_source_highlight=auto |
75 |
++fi |
76 |
++ |
77 |
++ |
78 |
++if test "${enable_source_highlight}" != "no"; then |
79 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 |
80 |
+ $as_echo_n "checking for the source-highlight library... " >&6; } |
81 |
+-if test "${pkg_config_prog_path}" = "missing"; then |
82 |
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 |
83 |
++ if test "${pkg_config_prog_path}" = "missing"; then |
84 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 |
85 |
+ $as_echo "no - pkg-config not found" >&6; } |
86 |
+-else |
87 |
+- if ${pkg_config_prog_path} --exists source-highlight; then |
88 |
++ if test "${enable_source_highlight}" = "yes"; then |
89 |
++ as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 |
90 |
++ fi |
91 |
++ else |
92 |
++ if ${pkg_config_prog_path} --exists source-highlight; then |
93 |
+ SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` |
94 |
+ SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` |
95 |
+ |
96 |
+@@ -11407,10 +11427,14 @@ $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h |
97 |
+ |
98 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
99 |
+ $as_echo "yes" >&6; } |
100 |
+- else |
101 |
++ else |
102 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
103 |
+ $as_echo "no" >&6; } |
104 |
+- fi |
105 |
++ if test "${enable_source_highlight}" = "yes"; then |
106 |
++ as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 |
107 |
++ fi |
108 |
++ fi |
109 |
++ fi |
110 |
+ fi |
111 |
+ |
112 |
+ |
113 |
+diff --git a/gdb/configure.ac b/gdb/configure.ac |
114 |
+index 8ddd0fda61..1318c8d008 100644 |
115 |
+--- a/gdb/configure.ac |
116 |
++++ b/gdb/configure.ac |
117 |
+@@ -1220,19 +1220,38 @@ AM_CONDITIONAL(HAVE_GUILE, test "${have_libguile}" != no) |
118 |
+ |
119 |
+ SRCHIGH_LIBS= |
120 |
+ SRCHIGH_CFLAGS= |
121 |
+-AC_MSG_CHECKING([for the source-highlight library]) |
122 |
+-if test "${pkg_config_prog_path}" = "missing"; then |
123 |
+- AC_MSG_RESULT([no - pkg-config not found]) |
124 |
+-else |
125 |
+- if ${pkg_config_prog_path} --exists source-highlight; then |
126 |
++ |
127 |
++AC_ARG_ENABLE(source-highlight, |
128 |
++ AS_HELP_STRING([--enable-source-highlight], |
129 |
++ [enable source-highlight for source listings]), |
130 |
++ [case "${enableval}" in |
131 |
++ yes) enable_source_highlight=yes ;; |
132 |
++ no) enable_source_highlight=no ;; |
133 |
++ *) AC_MSG_ERROR(bad value ${enableval} for source-highlight option) ;; |
134 |
++esac], |
135 |
++[enable_source_highlight=auto]) |
136 |
++ |
137 |
++if test "${enable_source_highlight}" != "no"; then |
138 |
++ AC_MSG_CHECKING([for the source-highlight library]) |
139 |
++ if test "${pkg_config_prog_path}" = "missing"; then |
140 |
++ AC_MSG_RESULT([no - pkg-config not found]) |
141 |
++ if test "${enable_source_highlight}" = "yes"; then |
142 |
++ AC_MSG_ERROR([pkg-config was not found in your system]) |
143 |
++ fi |
144 |
++ else |
145 |
++ if ${pkg_config_prog_path} --exists source-highlight; then |
146 |
+ SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` |
147 |
+ SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` |
148 |
+ AC_DEFINE([HAVE_SOURCE_HIGHLIGHT], 1, |
149 |
+ [Define to 1 if the source-highlight library is available]) |
150 |
+ AC_MSG_RESULT([yes]) |
151 |
+- else |
152 |
++ else |
153 |
+ AC_MSG_RESULT([no]) |
154 |
+- fi |
155 |
++ if test "${enable_source_highlight}" = "yes"; then |
156 |
++ AC_MSG_ERROR([source-highlight was not found in your system]) |
157 |
++ fi |
158 |
++ fi |
159 |
++ fi |
160 |
+ fi |
161 |
+ AC_SUBST(SRCHIGH_LIBS) |
162 |
+ AC_SUBST(SRCHIGH_CFLAGS) |
163 |
+-- |
164 |
+2.21.0 |
165 |
+ |
166 |
|
167 |
diff --git a/sys-devel/gdb/gdb-8.3.50.20190312.ebuild b/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild |
168 |
similarity index 96% |
169 |
rename from sys-devel/gdb/gdb-8.3.50.20190312.ebuild |
170 |
rename to sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild |
171 |
index e1c1671379c..eda29eb876a 100644 |
172 |
--- a/sys-devel/gdb/gdb-8.3.50.20190312.ebuild |
173 |
+++ b/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild |
174 |
@@ -62,7 +62,7 @@ SLOT="0" |
175 |
if [[ ${PV} != 9999* ]] ; then |
176 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
177 |
fi |
178 |
-IUSE="+client lzma multitarget nls +python +server test vanilla xml" |
179 |
+IUSE="+client lzma multitarget nls +python +server source-highlight test vanilla xml" |
180 |
REQUIRED_USE=" |
181 |
python? ( ${PYTHON_REQUIRED_USE} ) |
182 |
|| ( client server ) |
183 |
@@ -78,7 +78,11 @@ RDEPEND=" |
184 |
python? ( ${PYTHON_DEPS} ) |
185 |
xml? ( dev-libs/expat ) |
186 |
sys-libs/zlib |
187 |
- )" |
188 |
+ ) |
189 |
+ source-highlight? ( |
190 |
+ dev-util/source-highlight |
191 |
+ ) |
192 |
+" |
193 |
DEPEND="${RDEPEND}" |
194 |
BDEPEND=" |
195 |
app-arch/xz-utils |
196 |
@@ -89,6 +93,10 @@ BDEPEND=" |
197 |
nls? ( sys-devel/gettext ) |
198 |
)" |
199 |
|
200 |
+PATCHES=( |
201 |
+ "${FILESDIR}"/${P}-source-highlight.patch |
202 |
+) |
203 |
+ |
204 |
S=${WORKDIR}/${PN}-${MY_PV} |
205 |
|
206 |
pkg_setup() { |
207 |
@@ -165,6 +173,7 @@ src_configure() { |
208 |
$(use_with xml expat) |
209 |
$(use_with lzma) |
210 |
$(use_enable nls) |
211 |
+ $(use_enable source-highlight) |
212 |
$(use multitarget && echo --enable-targets=all) |
213 |
$(use_with python python "${EPYTHON}") |
214 |
) |
215 |
|
216 |
diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild |
217 |
index 5141bb24147..f9e1edcd7cc 100644 |
218 |
--- a/sys-devel/gdb/gdb-9999.ebuild |
219 |
+++ b/sys-devel/gdb/gdb-9999.ebuild |
220 |
@@ -62,7 +62,7 @@ SLOT="0" |
221 |
if [[ ${PV} != 9999* ]] ; then |
222 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
223 |
fi |
224 |
-IUSE="+client lzma multitarget nls +python +server test vanilla xml" |
225 |
+IUSE="+client lzma multitarget nls +python +server source-highlight test vanilla xml" |
226 |
REQUIRED_USE=" |
227 |
python? ( ${PYTHON_REQUIRED_USE} ) |
228 |
|| ( client server ) |
229 |
@@ -78,7 +78,11 @@ RDEPEND=" |
230 |
python? ( ${PYTHON_DEPS} ) |
231 |
xml? ( dev-libs/expat ) |
232 |
sys-libs/zlib |
233 |
- )" |
234 |
+ ) |
235 |
+ source-highlight? ( |
236 |
+ dev-util/source-highlight |
237 |
+ ) |
238 |
+" |
239 |
DEPEND="${RDEPEND}" |
240 |
BDEPEND=" |
241 |
app-arch/xz-utils |
242 |
@@ -165,6 +169,7 @@ src_configure() { |
243 |
$(use_with xml expat) |
244 |
$(use_with lzma) |
245 |
$(use_enable nls) |
246 |
+ $(use_enable source-highlight) |
247 |
$(use multitarget && echo --enable-targets=all) |
248 |
$(use_with python python "${EPYTHON}") |
249 |
) |
250 |
|
251 |
diff --git a/sys-devel/gdb/metadata.xml b/sys-devel/gdb/metadata.xml |
252 |
index d11b1ea4a91..4940999342f 100644 |
253 |
--- a/sys-devel/gdb/metadata.xml |
254 |
+++ b/sys-devel/gdb/metadata.xml |
255 |
@@ -11,6 +11,7 @@ |
256 |
<flag name="multitarget">Support all known targets in one gdb binary</flag> |
257 |
<flag name="python">Enable support for the new internal scripting language, as well as extended pretty printers</flag> |
258 |
<flag name="server">Install the "gdbserver" program (useful for embedded/remote targets)</flag> |
259 |
+ <flag name="source-highlight">Enable listing highlighting via <pkg>dev-util/source-highlight</pkg></flag> |
260 |
<flag name="xml">Support parsing XML data files needed (at least) for cpu features, memory maps, and syscall tracing</flag> |
261 |
</use> |
262 |
<upstream> |