1 |
commit: 59dc49301f08c83f8494ca2111795acf715809c9 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 24 11:37:29 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 24 11:37:46 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59dc4930 |
7 |
|
8 |
sys-devel/gdb: bump up to 9.2 |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
12 |
|
13 |
sys-devel/gdb/Manifest | 1 + |
14 |
sys-devel/gdb/gdb-9.2.ebuild | 281 +++++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 282 insertions(+) |
16 |
|
17 |
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest |
18 |
index 5c3fc0f0d88..48f7572853e 100644 |
19 |
--- a/sys-devel/gdb/Manifest |
20 |
+++ b/sys-devel/gdb/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST gdb-9.1.tar.xz 20980824 BLAKE2B b84b1dc627d7ba697dfd76ba7c0f4f88f1725e1e1b83134d08cf53bf867ebfa07e1d01eff2acd9a57d22a779077bf6ed95d6098e8a58c4d86eaed034ca62ac30 SHA512 84cdd408d80a3fc5779de459c5b26154d31b329ebde7e3aa78799fb1eb245d8b64b8c8ee7242382a1dbd95b4e6f9d84fef41d12a0646aa75d3dee4709ea1f6e7 |
23 |
+DIST gdb-9.2.tar.xz 20979436 BLAKE2B e83468f2d2fdcf4a7eb2943564750c7e9e9fa19b00bd832a9c149ad06b199cc7d6e7b8808d552e5f0e9e4f701a9262faf6b0b46ed4e0b4ecd3a0303d873d6d9a SHA512 73635f00f343117aa5e2436f1e1597099e2bfb31ef7bb162b273fa1ea282c3fa9b0f52762e70bfc7ad0334addb8d159e9ac7cbe5998ca4f755ea8cf90714d274 |
24 |
|
25 |
diff --git a/sys-devel/gdb/gdb-9.2.ebuild b/sys-devel/gdb/gdb-9.2.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..704ce614906 |
28 |
--- /dev/null |
29 |
+++ b/sys-devel/gdb/gdb-9.2.ebuild |
30 |
@@ -0,0 +1,281 @@ |
31 |
+# Copyright 1999-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+PYTHON_COMPAT=( python{3_6,3_7,3_8} ) |
36 |
+ |
37 |
+inherit eutils flag-o-matic python-single-r1 toolchain-funcs |
38 |
+ |
39 |
+export CTARGET=${CTARGET:-${CHOST}} |
40 |
+if [[ ${CTARGET} == ${CHOST} ]] ; then |
41 |
+ if [[ ${CATEGORY} == cross-* ]] ; then |
42 |
+ export CTARGET=${CATEGORY#cross-} |
43 |
+ fi |
44 |
+fi |
45 |
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
46 |
+ |
47 |
+case ${PV} in |
48 |
+9999*) |
49 |
+ # live git tree |
50 |
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" |
51 |
+ inherit git-r3 |
52 |
+ SRC_URI="" |
53 |
+ ;; |
54 |
+*.*.50.2???????) |
55 |
+ # weekly snapshots |
56 |
+ SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz" |
57 |
+ ;; |
58 |
+*) |
59 |
+ # Normal upstream release |
60 |
+ SRC_URI="mirror://gnu/gdb/${P}.tar.xz |
61 |
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz" |
62 |
+ ;; |
63 |
+esac |
64 |
+ |
65 |
+PATCH_VER="" |
66 |
+PATCH_DEV="" |
67 |
+DESCRIPTION="GNU debugger" |
68 |
+HOMEPAGE="https://sourceware.org/gdb/" |
69 |
+SRC_URI="${SRC_URI} |
70 |
+ ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz} |
71 |
+ ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} |
72 |
+" |
73 |
+ |
74 |
+LICENSE="GPL-2 LGPL-2" |
75 |
+SLOT="0" |
76 |
+if [[ ${PV} != 9999* ]] ; then |
77 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
78 |
+fi |
79 |
+IUSE="+client lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" |
80 |
+REQUIRED_USE=" |
81 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
82 |
+ || ( client server ) |
83 |
+" |
84 |
+ |
85 |
+# ia64 kernel crashes when gdb testsuite is running |
86 |
+# hppa kernel crashes when gdb testsuite is running |
87 |
+RESTRICT=" |
88 |
+ hppa? ( test ) |
89 |
+ ia64? ( test ) |
90 |
+ |
91 |
+ !test? ( test ) |
92 |
+" |
93 |
+ |
94 |
+RDEPEND=" |
95 |
+ client? ( |
96 |
+ dev-libs/mpfr:0= |
97 |
+ >=sys-libs/ncurses-5.2-r2:0= |
98 |
+ >=sys-libs/readline-7:0= |
99 |
+ lzma? ( app-arch/xz-utils ) |
100 |
+ python? ( ${PYTHON_DEPS} ) |
101 |
+ xml? ( dev-libs/expat ) |
102 |
+ sys-libs/zlib |
103 |
+ ) |
104 |
+ source-highlight? ( |
105 |
+ dev-util/source-highlight |
106 |
+ ) |
107 |
+ xxhash? ( |
108 |
+ dev-libs/xxhash |
109 |
+ ) |
110 |
+" |
111 |
+DEPEND="${RDEPEND}" |
112 |
+BDEPEND=" |
113 |
+ app-arch/xz-utils |
114 |
+ sys-apps/texinfo |
115 |
+ client? ( |
116 |
+ virtual/yacc |
117 |
+ test? ( dev-util/dejagnu ) |
118 |
+ nls? ( sys-devel/gettext ) |
119 |
+ )" |
120 |
+ |
121 |
+PATCHES=( |
122 |
+ "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch |
123 |
+ "${FILESDIR}"/${PN}-9.1-ia64.patch |
124 |
+) |
125 |
+ |
126 |
+GDB_BUILD_DIR="${WORKDIR}"/${P}-build |
127 |
+ |
128 |
+pkg_setup() { |
129 |
+ use python && python-single-r1_pkg_setup |
130 |
+} |
131 |
+ |
132 |
+src_prepare() { |
133 |
+ default |
134 |
+ |
135 |
+ strip-linguas -u bfd/po opcodes/po |
136 |
+} |
137 |
+ |
138 |
+gdb_branding() { |
139 |
+ printf "Gentoo ${PV} " |
140 |
+ if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then |
141 |
+ printf "p${PATCH_VER}" |
142 |
+ else |
143 |
+ printf "vanilla" |
144 |
+ fi |
145 |
+ [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}" |
146 |
+} |
147 |
+ |
148 |
+src_configure() { |
149 |
+ strip-unsupported-flags |
150 |
+ |
151 |
+ local myconf=( |
152 |
+ # portage's econf() does not detect presence of --d-d-t |
153 |
+ # because it greps only top-level ./configure. But not |
154 |
+ # gnulib's or gdb's configure. |
155 |
+ --disable-dependency-tracking |
156 |
+ |
157 |
+ --with-pkgversion="$(gdb_branding)" |
158 |
+ --with-bugurl='https://bugs.gentoo.org/' |
159 |
+ --disable-werror |
160 |
+ # Disable modules that are in a combined binutils/gdb tree. #490566 |
161 |
+ --disable-{binutils,etc,gas,gold,gprof,ld} |
162 |
+ ) |
163 |
+ local sysroot="${EPREFIX}/usr/${CTARGET}" |
164 |
+ is_cross && myconf+=( |
165 |
+ --with-sysroot="${sysroot}" |
166 |
+ --includedir="${sysroot}/usr/include" |
167 |
+ --with-gdb-datadir="\${datadir}/gdb/${CTARGET}" |
168 |
+ ) |
169 |
+ |
170 |
+ if use server && ! use client ; then |
171 |
+ # just configure+build in the gdbserver subdir to speed things up |
172 |
+ cd gdb/gdbserver |
173 |
+ myconf+=( --program-transform-name='' ) |
174 |
+ else |
175 |
+ # gdbserver only works for native targets (CHOST==CTARGET). |
176 |
+ # it also doesn't support all targets, so rather than duplicate |
177 |
+ # the target list (which changes between versions), use the |
178 |
+ # "auto" value when things are turned on. |
179 |
+ is_cross \ |
180 |
+ && myconf+=( --disable-gdbserver ) \ |
181 |
+ || myconf+=( $(use_enable server gdbserver auto) ) |
182 |
+ fi |
183 |
+ |
184 |
+ if ! ( use server && ! use client ) ; then |
185 |
+ # if we are configuring in the top level, then use all |
186 |
+ # the additional global options |
187 |
+ myconf+=( |
188 |
+ --enable-64-bit-bfd |
189 |
+ --disable-install-libbfd |
190 |
+ --disable-install-libiberty |
191 |
+ # Disable guile for now as it requires guile-2.x #562902 |
192 |
+ --without-guile |
193 |
+ # This only disables building in the readline subdir. |
194 |
+ # For gdb itself, it'll use the system version. |
195 |
+ --disable-readline |
196 |
+ --with-system-readline |
197 |
+ # This only disables building in the zlib subdir. |
198 |
+ # For gdb itself, it'll use the system version. |
199 |
+ --without-zlib |
200 |
+ --with-system-zlib |
201 |
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug |
202 |
+ $(use_with xml expat) |
203 |
+ $(use_with lzma) |
204 |
+ $(use_enable nls) |
205 |
+ $(use_enable source-highlight) |
206 |
+ $(use multitarget && echo --enable-targets=all) |
207 |
+ $(use_with python python "${EPYTHON}") |
208 |
+ $(use_with xxhash) |
209 |
+ ) |
210 |
+ fi |
211 |
+ if use sparc-solaris || use x86-solaris ; then |
212 |
+ # disable largefile support |
213 |
+ # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html |
214 |
+ myconf+=( --disable-largefile ) |
215 |
+ fi |
216 |
+ |
217 |
+ # source-highlight is detected with pkg-config: bug #716558 |
218 |
+ export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" |
219 |
+ |
220 |
+ mkdir "${GDB_BUILD_DIR}" || die |
221 |
+ pushd "${GDB_BUILD_DIR}" || die |
222 |
+ ECONF_SOURCE=${S} |
223 |
+ econf "${myconf[@]}" |
224 |
+ popd |
225 |
+} |
226 |
+ |
227 |
+src_compile() { |
228 |
+ emake -C "${GDB_BUILD_DIR}" |
229 |
+} |
230 |
+ |
231 |
+src_test() { |
232 |
+ emake -C "${GDB_BUILD_DIR}" check |
233 |
+} |
234 |
+ |
235 |
+src_install() { |
236 |
+ if use server && ! use client; then |
237 |
+ emake -C "${GDB_BUILD_DIR}"/gdb/gdbserver DESTDIR="${D}" install |
238 |
+ else |
239 |
+ emake -C "${GDB_BUILD_DIR}" DESTDIR="${D}" install |
240 |
+ fi |
241 |
+ |
242 |
+ if use client; then |
243 |
+ find "${ED}"/usr -name libiberty.a -delete || die |
244 |
+ fi |
245 |
+ |
246 |
+ # Delete translations that conflict with binutils-libs. #528088 |
247 |
+ # Note: Should figure out how to store these in an internal gdb dir. |
248 |
+ if use nls ; then |
249 |
+ find "${ED}" \ |
250 |
+ -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \ |
251 |
+ -delete || die |
252 |
+ fi |
253 |
+ |
254 |
+ # Don't install docs when building a cross-gdb |
255 |
+ if [[ ${CTARGET} != ${CHOST} ]] ; then |
256 |
+ rm -rf "${ED}"/usr/share/{doc,info,locale} || die |
257 |
+ local f |
258 |
+ for f in "${ED}"/usr/share/man/*/* ; do |
259 |
+ if [[ ${f##*/} != ${CTARGET}-* ]] ; then |
260 |
+ mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die |
261 |
+ fi |
262 |
+ done |
263 |
+ return 0 |
264 |
+ fi |
265 |
+ # Install it by hand for now: |
266 |
+ # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html |
267 |
+ # Only install if it exists due to the twisted behavior (see |
268 |
+ # notes in src_configure above). |
269 |
+ [[ -e "${GDB_BUILD_DIR}"/gdb/gdbserver/gdbreplay ]] && dobin "${GDB_BUILD_DIR}"/gdb/gdbserver/gdbreplay |
270 |
+ |
271 |
+ if use client ; then |
272 |
+ docinto gdb |
273 |
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ |
274 |
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS |
275 |
+ fi |
276 |
+ docinto sim |
277 |
+ dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} |
278 |
+ if use server ; then |
279 |
+ docinto gdbserver |
280 |
+ dodoc gdb/gdbserver/{ChangeLog,README} |
281 |
+ fi |
282 |
+ |
283 |
+ if [[ -n ${PATCH_VER} ]] ; then |
284 |
+ dodoc "${WORKDIR}"/extra/gdbinit.sample |
285 |
+ fi |
286 |
+ |
287 |
+ # Remove shared info pages |
288 |
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* |
289 |
+ |
290 |
+ # gcore is part of ubin on freebsd |
291 |
+ if [[ ${CHOST} == *-freebsd* ]]; then |
292 |
+ rm "${ED}"/usr/bin/gcore || die |
293 |
+ fi |
294 |
+ |
295 |
+ if use python; then |
296 |
+ python_optimize "${ED}"/usr/share/gdb/python/gdb |
297 |
+ fi |
298 |
+} |
299 |
+ |
300 |
+pkg_postinst() { |
301 |
+ # portage sucks and doesnt unmerge files in /etc |
302 |
+ rm -vf "${EROOT}"/etc/skel/.gdbinit |
303 |
+ |
304 |
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then |
305 |
+ ewarn "gdb is unable to get a mach task port when installed by Prefix" |
306 |
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll" |
307 |
+ ewarn "have to perform the following steps:" |
308 |
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb" |
309 |
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb" |
310 |
+ fi |
311 |
+} |