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