Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/
Date: Mon, 23 Jan 2017 21:05:54
Message-Id: 1485204382.12a77d5d49a5a44595693c13d7eef693d2405060.vapier@gentoo
1 commit: 12a77d5d49a5a44595693c13d7eef693d2405060
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 23 18:36:44 2017 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 23 20:46:22 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12a77d5d
7
8 sys-devel/gdb: version bump to 7.12.1
9
10 sys-devel/gdb/Manifest | 1 +
11 sys-devel/gdb/gdb-7.12.1.ebuild | 234 ++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 235 insertions(+)
13
14 diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
15 index 71ec003..e8e3081 100644
16 --- a/sys-devel/gdb/Manifest
17 +++ b/sys-devel/gdb/Manifest
18 @@ -1,5 +1,6 @@
19 DIST gdb-7.10.1.tar.xz 18531436 SHA256 25c72f3d41c7c8554d61cacbeacd5f40993276d2ccdec43279ac546e3993d6d5 SHA512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010 WHIRLPOOL 02936f59d3f3f8a57966c72402f1da128dd8e10e686097ffdb3a2741cc0c1831ef27f97daa047fa006ff2ae9f79ae0480f6f0dc2d3f5904190a1dade0590c837
20 DIST gdb-7.11.1.tar.xz 18947760 SHA256 e9216da4e3755e9f414c1aa0026b626251dfc57ffe572a266e98da4f6988fc70 SHA512 f80ec6c8a0f0b54c8b945666e875809174402b7e121efb378ebac931a91f9a1cc0048568f8e2f42ae8ae2392ff8d144c2e51d41c7398935017450aaf29838360 WHIRLPOOL f8df80983ed23a8b02b2420e2a73303dfc6b85bf46f519a4e8d8035b68ab440d9f298b2c0e48cd11d98a89fe5761260d8f4e8a14667cb385cf80767a9e3d5f0b
21 DIST gdb-7.11.tar.xz 18934392 SHA256 7a434116cb630d77bb40776e8f5d3937bed11dea56bafebb4d2bc5dd389fe5c1 SHA512 eadd2a59a1e48b1484eb2bea85256d6b1912926bc8b690793d02babf2639608bd22a0f2de77d4f60092da3b1dafeaa6d75a7cff3e84bd4e22fc46364b68e5e9f WHIRLPOOL 9ae283b05b278ec2844aa3cf54193d9fd5735508e2eb60c0d741f719f1598b4e374dab6d4ee48d78323b0b8038715969d20435f1b8ce20775f2b3f072759c994
22 +DIST gdb-7.12.1.tar.xz 19225392 SHA256 4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186 SHA512 0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7704251289cababbfaaf9e075550cdf741a54d6cd9ca3433d910efcd8 WHIRLPOOL 1da1d9680639531000f2518fb6e01551f7d35091065b933a25381339f7d78d64486b7ce54dd9815f7e82884133ccd6868950a15c27fb5a7b9b13243e99eba697
23 DIST gdb-7.12.tar.xz 19219556 SHA256 834ff3c5948b30718343ea57b11cbc3235d7995c6a4f3a5cecec8c8114164f94 SHA512 f610338b3a24dfb387c295431d806a0c1375e8ce51b8dd8bbfd2efc4612d0c0ed40ad4393508afca0071eca70688f62bc4f199da5e75ad16f64d91c3bc046033 WHIRLPOOL 9b4c903b27bba530cb5db722abc6358d3785e0b1f1067abaf8487c7e2b3e7cfe546f5ad16071ad29e34a27fd902a7f74171d4c7afec219ba69faae96c911cb27
24 DIST gdb-7.9.1.tar.xz 17867692 SHA256 cd9c543a411a05b2b647dd38936034b68c2b5d6f10e0d51dc168c166c973ba40 SHA512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414 WHIRLPOOL fe7afb392f453fa5aab290da3b74118c4e3bbae6f4e276f2efd7f978e3987e031d92ecd90d35e0531901f1cf68b04a313df050b25bb3b632d1b6e62360acd591
25
26 diff --git a/sys-devel/gdb/gdb-7.12.1.ebuild b/sys-devel/gdb/gdb-7.12.1.ebuild
27 new file mode 100644
28 index 00000000..c99e14e
29 --- /dev/null
30 +++ b/sys-devel/gdb/gdb-7.12.1.ebuild
31 @@ -0,0 +1,234 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="5"
36 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
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=""
83 +DESCRIPTION="GNU debugger"
84 +HOMEPAGE="https://sourceware.org/gdb/"
85 +SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
86 +
87 +LICENSE="GPL-2 LGPL-2"
88 +SLOT="0"
89 +if [[ ${PV} != 9999* ]] ; then
90 + # alpha #562128
91 + KEYWORDS="-alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
92 +fi
93 +IUSE="+client lzma multitarget nls +python +server test vanilla xml"
94 +REQUIRED_USE="
95 + python? ( ${PYTHON_REQUIRED_USE} )
96 + || ( client server )
97 +"
98 +
99 +RDEPEND="server? ( !dev-util/gdbserver )
100 + client? (
101 + >=sys-libs/ncurses-5.2-r2:0=
102 + sys-libs/readline:0=
103 + lzma? ( app-arch/xz-utils )
104 + python? ( ${PYTHON_DEPS} )
105 + xml? ( dev-libs/expat )
106 + sys-libs/zlib
107 + )"
108 +DEPEND="${RDEPEND}
109 + app-arch/xz-utils
110 + client? (
111 + virtual/yacc
112 + test? ( dev-util/dejagnu )
113 + nls? ( sys-devel/gettext )
114 + )"
115 +
116 +S=${WORKDIR}/${PN}-${MY_PV}
117 +
118 +pkg_setup() {
119 + use python && python-single-r1_pkg_setup
120 +}
121 +
122 +src_prepare() {
123 + [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
124 + ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
125 + epatch_user
126 + strip-linguas -u bfd/po opcodes/po
127 +}
128 +
129 +gdb_branding() {
130 + printf "Gentoo ${PV} "
131 + if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
132 + printf "p${PATCH_VER}"
133 + else
134 + printf "vanilla"
135 + fi
136 + [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}"
137 +}
138 +
139 +src_configure() {
140 + strip-unsupported-flags
141 +
142 + local myconf=(
143 + --with-pkgversion="$(gdb_branding)"
144 + --with-bugurl='https://bugs.gentoo.org/'
145 + --disable-werror
146 + # Disable modules that are in a combined binutils/gdb tree. #490566
147 + --disable-{binutils,etc,gas,gold,gprof,ld}
148 + )
149 + local sysroot="${EPREFIX}/usr/${CTARGET}"
150 + is_cross && myconf+=(
151 + --with-sysroot="${sysroot}"
152 + --includedir="${sysroot}/usr/include"
153 + --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
154 + )
155 +
156 + if use server && ! use client ; then
157 + # just configure+build in the gdbserver subdir to speed things up
158 + cd gdb/gdbserver
159 + myconf+=( --program-transform-name='' )
160 + else
161 + # gdbserver only works for native targets (CHOST==CTARGET).
162 + # it also doesn't support all targets, so rather than duplicate
163 + # the target list (which changes between versions), use the
164 + # "auto" value when things are turned on.
165 + is_cross \
166 + && myconf+=( --disable-gdbserver ) \
167 + || myconf+=( $(use_enable server gdbserver auto) )
168 + fi
169 +
170 + if ! ( use server && ! use client ) ; then
171 + # if we are configuring in the top level, then use all
172 + # the additional global options
173 + myconf+=(
174 + --enable-64-bit-bfd
175 + --disable-install-libbfd
176 + --disable-install-libiberty
177 + # Disable guile for now as it requires guile-2.x #562902
178 + --without-guile
179 + # This only disables building in the readline subdir.
180 + # For gdb itself, it'll use the system version.
181 + --disable-readline
182 + --with-system-readline
183 + # This only disables building in the zlib subdir.
184 + # For gdb itself, it'll use the system version.
185 + --without-zlib
186 + --with-system-zlib
187 + --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
188 + $(use_with xml expat)
189 + $(use_with lzma)
190 + $(use_enable nls)
191 + $(use multitarget && echo --enable-targets=all)
192 + $(use_with python python "${EPYTHON}")
193 + )
194 + fi
195 +
196 + econf "${myconf[@]}"
197 +}
198 +
199 +src_test() {
200 + nonfatal emake check || ewarn "tests failed"
201 +}
202 +
203 +src_install() {
204 + use server && ! use client && cd gdb/gdbserver
205 + default
206 + use client && find "${ED}"/usr -name libiberty.a -delete
207 + cd "${S}"
208 +
209 + # Delete translations that conflict with binutils-libs. #528088
210 + # Note: Should figure out how to store these in an internal gdb dir.
211 + if use nls ; then
212 + find "${ED}" \
213 + -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
214 + -delete
215 + fi
216 +
217 + # Don't install docs when building a cross-gdb
218 + if [[ ${CTARGET} != ${CHOST} ]] ; then
219 + rm -r "${ED}"/usr/share/{doc,info,locale}
220 + local f
221 + for f in "${ED}"/usr/share/man/*/* ; do
222 + if [[ ${f##*/} != ${CTARGET}-* ]] ; then
223 + mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
224 + fi
225 + done
226 + return 0
227 + fi
228 + # Install it by hand for now:
229 + # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
230 + # Only install if it exists due to the twisted behavior (see
231 + # notes in src_configure above).
232 + [[ -e gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
233 +
234 + if use client ; then
235 + docinto gdb
236 + dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
237 + gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
238 + fi
239 + docinto sim
240 + dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
241 + if use server ; then
242 + docinto gdbserver
243 + dodoc gdb/gdbserver/{ChangeLog,README}
244 + fi
245 +
246 + if [[ -n ${PATCH_VER} ]] ; then
247 + dodoc "${WORKDIR}"/extra/gdbinit.sample
248 + fi
249 +
250 + # Remove shared info pages
251 + rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
252 +}
253 +
254 +pkg_postinst() {
255 + # portage sucks and doesnt unmerge files in /etc
256 + rm -vf "${EROOT}"/etc/skel/.gdbinit
257 +
258 + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
259 + ewarn "gdb is unable to get a mach task port when installed by Prefix"
260 + ewarn "Portage, unprivileged. To make gdb fully functional you'll"
261 + ewarn "have to perform the following steps:"
262 + ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
263 + ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
264 + fi
265 +}