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