1 |
commit: d104bd3ac4b0a63f10e4c52ab1d8bd161063fa16 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 31 21:15:28 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 31 21:15:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d104bd3a |
7 |
|
8 |
sys-devel/gdb: bump up to 8.1.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.44, Repoman-2.3.10 |
11 |
|
12 |
sys-devel/gdb/Manifest | 1 + |
13 |
sys-devel/gdb/gdb-8.1.1.ebuild | 256 +++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 257 insertions(+) |
15 |
|
16 |
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest |
17 |
index 471bfc87b96..66c4613b07d 100644 |
18 |
--- a/sys-devel/gdb/Manifest |
19 |
+++ b/sys-devel/gdb/Manifest |
20 |
@@ -5,4 +5,5 @@ DIST gdb-8.0.1-patches-1.tar.xz 8620 BLAKE2B 8595017a881c41cbe78846fae9f50460aa6 |
21 |
DIST gdb-8.0.1.tar.xz 19583920 BLAKE2B c22e314a0fe3ccb84cef6eca66c51af60914160ac9760cbe517628079dfb15ec73a623badf070b3162d4bd9e44937f717fd44e1d569edba4532853c82b31ac1d SHA512 5eb328910033f0918058be2f92caebf1e8dfc6caa3c730d99d621627e53de3c1b43761c2f683d53555893253c2f06768cbf56cdea051a3d291ffb6cfae87b5e1 |
22 |
DIST gdb-8.0.tar.xz 19588616 BLAKE2B 148965e33a42787b5fa39650c2b6c48e28895930e36f11b44e8391366be1cc3bd4265ea7df932a7d650291fb20e3f66956c7dff1923025f889e5c035d3bf4207 SHA512 e4044bdd162cbf95044ec1eaa44d2fa62a33e051bdbbacbc97afd4dfb07bae1bea514381fc1966aede89d6796ef2377a15748a93d95e2ad494c8497db489e886 |
23 |
DIST gdb-8.1-patches-1.tar.xz 8768 BLAKE2B 792ceddcb8eafd028db23d69ad5d9eb00223722520c6ff0a23a24fee1a33dceb02f05e61a1d6c3700835c480b38d66f43f71ef3c4af406d4ae1147eaaf8f311e SHA512 87a5c9d9207817245e1ffd07fdad2cb566de4fc11725aa0e49e58268c3ab1ae3b4b9f4b9faa55acc8cb4c3c7cb5a3875ea7da02abeb8f775953a8aed2e2c6403 |
24 |
+DIST gdb-8.1.1.tar.xz 20064728 BLAKE2B bd17a27a3974a34b94aa5898a97cf26dba9e91b815f25e6a0d67a7b4bc718ed2701a38cddbbfddce087c5d2d24c596daee4f06ea1acfe662f47a909409815311 SHA512 7dcd5e8c90de92f577834d887b5f54edb93a07083bfe661bc46c270a6cc4919f0b348e7e2fe8ae4511298a570ef150eeefdc667ef7cf527f0cf60943177ab6c9 |
25 |
DIST gdb-8.1.tar.xz 20095080 BLAKE2B 9332058b8b723261ba215124f42a2d6ba916219efdfb3c23ae1f48fecf131c801bbd31b345f2c8339b23d74da690be0260ac31f8f2e79549b62f0880199bfdec SHA512 ffd82f415d7652d62dad1716c307836f594217a363429609beb7d70239e8bf06b73b393345b0e000796228e56681ed7656ac3c8be05e91d6d652ab0d5b1dc357 |
26 |
|
27 |
diff --git a/sys-devel/gdb/gdb-8.1.1.ebuild b/sys-devel/gdb/gdb-8.1.1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..3b7c354c460 |
30 |
--- /dev/null |
31 |
+++ b/sys-devel/gdb/gdb-8.1.1.ebuild |
32 |
@@ -0,0 +1,256 @@ |
33 |
+# Copyright 1999-2018 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
38 |
+ |
39 |
+inherit epatch eutils flag-o-matic python-single-r1 |
40 |
+ |
41 |
+export CTARGET=${CTARGET:-${CHOST}} |
42 |
+if [[ ${CTARGET} == ${CHOST} ]] ; then |
43 |
+ if [[ ${CATEGORY} == cross-* ]] ; then |
44 |
+ export CTARGET=${CATEGORY#cross-} |
45 |
+ fi |
46 |
+fi |
47 |
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
48 |
+ |
49 |
+RPM= |
50 |
+MY_PV=${PV} |
51 |
+case ${PV} in |
52 |
+9999*) |
53 |
+ # live git tree |
54 |
+ EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git" |
55 |
+ inherit git-r3 |
56 |
+ SRC_URI="" |
57 |
+ ;; |
58 |
+*.*.50.2???????) |
59 |
+ # weekly snapshots |
60 |
+ SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz" |
61 |
+ ;; |
62 |
+*.*.*.*.*.*) |
63 |
+ # fedora versions; note we swap the rpm & fedora core versions. |
64 |
+ # gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild |
65 |
+ # gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild |
66 |
+ inherit versionator rpm |
67 |
+ gvcr() { get_version_component_range "$@"; } |
68 |
+ parse_fedora_ver() { |
69 |
+ set -- $(get_version_components) |
70 |
+ MY_PV=$(gvcr 1-$(( $# - 2 ))) |
71 |
+ RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm" |
72 |
+ } |
73 |
+ parse_fedora_ver |
74 |
+ SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}" |
75 |
+ ;; |
76 |
+*) |
77 |
+ # Normal upstream release |
78 |
+ SRC_URI="mirror://gnu/gdb/${P}.tar.xz |
79 |
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz" |
80 |
+ ;; |
81 |
+esac |
82 |
+ |
83 |
+PATCH_VER="1" |
84 |
+PATCH_DEV="slyfox" |
85 |
+DESCRIPTION="GNU debugger" |
86 |
+HOMEPAGE="https://sourceware.org/gdb/" |
87 |
+SRC_URI="${SRC_URI} |
88 |
+ ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz} |
89 |
+ ${PATCH_VER:+mirror://gentoo/${PN}-8.1-patches-${PATCH_VER}.tar.xz} |
90 |
+" |
91 |
+ |
92 |
+LICENSE="GPL-2 LGPL-2" |
93 |
+SLOT="0" |
94 |
+if [[ ${PV} != 9999* ]] ; then |
95 |
+ 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 ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
96 |
+fi |
97 |
+IUSE="+client lzma multitarget nls +python +server test vanilla xml" |
98 |
+REQUIRED_USE=" |
99 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
100 |
+ || ( client server ) |
101 |
+" |
102 |
+ |
103 |
+RDEPEND=" |
104 |
+ server? ( !dev-util/gdbserver ) |
105 |
+ client? ( |
106 |
+ dev-libs/mpfr:0= |
107 |
+ >=sys-libs/ncurses-5.2-r2:0= |
108 |
+ sys-libs/readline:0= |
109 |
+ lzma? ( app-arch/xz-utils ) |
110 |
+ python? ( ${PYTHON_DEPS} ) |
111 |
+ xml? ( dev-libs/expat ) |
112 |
+ sys-libs/zlib |
113 |
+ )" |
114 |
+DEPEND="${RDEPEND} |
115 |
+ app-arch/xz-utils |
116 |
+ sys-apps/texinfo |
117 |
+ client? ( |
118 |
+ virtual/yacc |
119 |
+ test? ( dev-util/dejagnu ) |
120 |
+ nls? ( sys-devel/gettext ) |
121 |
+ )" |
122 |
+ |
123 |
+S=${WORKDIR}/${PN}-${MY_PV} |
124 |
+ |
125 |
+pkg_setup() { |
126 |
+ use python && python-single-r1_pkg_setup |
127 |
+} |
128 |
+ |
129 |
+src_prepare() { |
130 |
+ [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec |
131 |
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch |
132 |
+ |
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 |
+ --with-pkgversion="$(gdb_branding)" |
153 |
+ --with-bugurl='https://bugs.gentoo.org/' |
154 |
+ --disable-werror |
155 |
+ # Disable modules that are in a combined binutils/gdb tree. #490566 |
156 |
+ --disable-{binutils,etc,gas,gold,gprof,ld} |
157 |
+ ) |
158 |
+ local sysroot="${EPREFIX}/usr/${CTARGET}" |
159 |
+ is_cross && myconf+=( |
160 |
+ --with-sysroot="${sysroot}" |
161 |
+ --includedir="${sysroot}/usr/include" |
162 |
+ --with-gdb-datadir="\${datadir}/gdb/${CTARGET}" |
163 |
+ ) |
164 |
+ |
165 |
+ if use server && ! use client ; then |
166 |
+ # just configure+build in the gdbserver subdir to speed things up |
167 |
+ cd gdb/gdbserver |
168 |
+ myconf+=( --program-transform-name='' ) |
169 |
+ else |
170 |
+ # gdbserver only works for native targets (CHOST==CTARGET). |
171 |
+ # it also doesn't support all targets, so rather than duplicate |
172 |
+ # the target list (which changes between versions), use the |
173 |
+ # "auto" value when things are turned on. |
174 |
+ is_cross \ |
175 |
+ && myconf+=( --disable-gdbserver ) \ |
176 |
+ || myconf+=( $(use_enable server gdbserver auto) ) |
177 |
+ fi |
178 |
+ |
179 |
+ if ! ( use server && ! use client ) ; then |
180 |
+ # if we are configuring in the top level, then use all |
181 |
+ # the additional global options |
182 |
+ myconf+=( |
183 |
+ --enable-64-bit-bfd |
184 |
+ --disable-install-libbfd |
185 |
+ --disable-install-libiberty |
186 |
+ # Disable guile for now as it requires guile-2.x #562902 |
187 |
+ --without-guile |
188 |
+ # This only disables building in the readline subdir. |
189 |
+ # For gdb itself, it'll use the system version. |
190 |
+ --disable-readline |
191 |
+ --with-system-readline |
192 |
+ # This only disables building in the zlib subdir. |
193 |
+ # For gdb itself, it'll use the system version. |
194 |
+ --without-zlib |
195 |
+ --with-system-zlib |
196 |
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug |
197 |
+ $(use_with xml expat) |
198 |
+ $(use_with lzma) |
199 |
+ $(use_enable nls) |
200 |
+ $(use multitarget && echo --enable-targets=all) |
201 |
+ $(use_with python python "${EPYTHON}") |
202 |
+ ) |
203 |
+ fi |
204 |
+ if use sparc-solaris || use x86-solaris ; then |
205 |
+ # disable largefile support |
206 |
+ # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html |
207 |
+ myconf+=( --disable-largefile ) |
208 |
+ fi |
209 |
+ |
210 |
+ econf "${myconf[@]}" |
211 |
+} |
212 |
+ |
213 |
+src_test() { |
214 |
+ nonfatal emake check || ewarn "tests failed" |
215 |
+} |
216 |
+ |
217 |
+src_install() { |
218 |
+ if use server && ! use client; then |
219 |
+ cd gdb/gdbserver || die |
220 |
+ fi |
221 |
+ default |
222 |
+ if use client; then |
223 |
+ find "${ED}"/usr -name libiberty.a -delete || die |
224 |
+ fi |
225 |
+ cd "${S}" || die |
226 |
+ |
227 |
+ # Delete translations that conflict with binutils-libs. #528088 |
228 |
+ # Note: Should figure out how to store these in an internal gdb dir. |
229 |
+ if use nls ; then |
230 |
+ find "${ED}" \ |
231 |
+ -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \ |
232 |
+ -delete || die |
233 |
+ fi |
234 |
+ |
235 |
+ # Don't install docs when building a cross-gdb |
236 |
+ if [[ ${CTARGET} != ${CHOST} ]] ; then |
237 |
+ rm -rf "${ED}"/usr/share/{doc,info,locale} || die |
238 |
+ local f |
239 |
+ for f in "${ED}"/usr/share/man/*/* ; do |
240 |
+ if [[ ${f##*/} != ${CTARGET}-* ]] ; then |
241 |
+ mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die |
242 |
+ fi |
243 |
+ done |
244 |
+ return 0 |
245 |
+ fi |
246 |
+ # Install it by hand for now: |
247 |
+ # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html |
248 |
+ # Only install if it exists due to the twisted behavior (see |
249 |
+ # notes in src_configure above). |
250 |
+ [[ -e gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay |
251 |
+ |
252 |
+ if use client ; then |
253 |
+ docinto gdb |
254 |
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ |
255 |
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS |
256 |
+ fi |
257 |
+ docinto sim |
258 |
+ dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} |
259 |
+ if use server ; then |
260 |
+ docinto gdbserver |
261 |
+ dodoc gdb/gdbserver/{ChangeLog,README} |
262 |
+ fi |
263 |
+ |
264 |
+ if [[ -n ${PATCH_VER} ]] ; then |
265 |
+ dodoc "${WORKDIR}"/extra/gdbinit.sample |
266 |
+ fi |
267 |
+ |
268 |
+ # Remove shared info pages |
269 |
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* |
270 |
+ |
271 |
+ # gcore is part of ubin on freebsd |
272 |
+ if [[ ${CHOST} == *-freebsd* ]]; then |
273 |
+ rm "${ED}"/usr/bin/gcore || die |
274 |
+ fi |
275 |
+} |
276 |
+ |
277 |
+pkg_postinst() { |
278 |
+ # portage sucks and doesnt unmerge files in /etc |
279 |
+ rm -vf "${EROOT}"/etc/skel/.gdbinit |
280 |
+ |
281 |
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then |
282 |
+ ewarn "gdb is unable to get a mach task port when installed by Prefix" |
283 |
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll" |
284 |
+ ewarn "have to perform the following steps:" |
285 |
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb" |
286 |
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb" |
287 |
+ fi |
288 |
+} |