Gentoo Archives: gentoo-commits

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