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: Fri, 28 Aug 2015 22:13:49
Message-Id: 1440799991.67440d809893201bd0011da9a9d060a2538cbd42.vapier@gentoo
1 commit: 67440d809893201bd0011da9a9d060a2538cbd42
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 28 22:13:11 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 28 22:13:11 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67440d80
7
8 sys-devel/gdb: version bump to 7.10
9
10 sys-devel/gdb/Manifest | 1 +
11 sys-devel/gdb/gdb-7.10.ebuild | 221 ++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 222 insertions(+)
13
14 diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
15 index 1be2a1d..9602503 100644
16 --- a/sys-devel/gdb/Manifest
17 +++ b/sys-devel/gdb/Manifest
18 @@ -1,3 +1,4 @@
19 +DIST gdb-7.10.tar.xz 18540820 SHA256 7ebdaa44f9786ce0c142da4e36797d2020c55fa091905ac5af1846b5756208a8 SHA512 4d9d7b536ad46f881689fca9f3f0b60268ff413c7900115fed5030d81d1d794793cc51d51510584ea1a63fe5891d006a9867ba36981b86b50806d469b717457d WHIRLPOOL b245ab66171c5bc04fc828a94a7c532ab18c358ee865993cd6e934aba22a45a254ed4b5942a1c5ddb60b5a5fcf81cb493fc275d8a5782d3b32b15b23339b4e43
20 DIST gdb-7.6.2-patches-1.tar.xz 14136 SHA256 aeb45e64c4d1f70cf97cd89e66dfe72d219b140e583f602720f29b5fa6ea5145 SHA512 d56e8a613ca0f33ebe203aa85a39881b10a0a15c56ea51c7633b6f032628e207d31d1adfc8f0b7e83754da729baead0acbc83893f1d480c41ce02cad38b6b4ff WHIRLPOOL e9f5482619653c54ad95f4c9eb5310320345ef3b825e373b629b320b9d11f6acfe88e5d713faf98927da77f05d5a37edef61bfce09a4a3990c20135945930a2c
21 DIST gdb-7.6.2.tar.bz2 24269334 SHA256 2f6a0e2ce1c66c9dedeb7f58a8d1298ad602ddcdaf15d23104e1f7832b96d0e8 SHA512 e72e9c2abb58cc08c38841380270fe783f26baf62798171d21cf0843e6c9a81d285f424dc6229ea7b1c6c957d999c8aa75c2bd15076817abb9caab28c4eb7666 WHIRLPOOL bff0c9b33401b5efdf9c87408b4e4ee635509b536f371b4104895844a86256451d684412d0fab6dfb8e5ea2108ac2e4e383a33f2966ed2a32c4dbbbf54a280f4
22 DIST gdb-7.7.1-patches-1.tar.xz 8600 SHA256 336cdcb2c90da0ca970dc21dc0285a8cb1fbcf81af63c49ee3f3d45c0aef7200 SHA512 427aba554e77ccfe9cdf5b0a833a1d64f1882e8f9e37d1288c5f2510cc63d154b4c22054a2a653d156e37044d7655937dee4a1a9cd0f9768abaafc8c34ae1cc0 WHIRLPOOL d5db4b874475724ac62bae9f1b33c566192570dd68195fe1c2065b7502a36b06f5a64079a88c63a965392d87e9b7a8eb0c709578297d6692fdce1ee933a867f4
23
24 diff --git a/sys-devel/gdb/gdb-7.10.ebuild b/sys-devel/gdb/gdb-7.10.ebuild
25 new file mode 100644
26 index 0000000..5cd44b4
27 --- /dev/null
28 +++ b/sys-devel/gdb/gdb-7.10.ebuild
29 @@ -0,0 +1,221 @@
30 +# Copyright 1999-2015 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI="5"
35 +PYTHON_COMPAT=( python{2_7,3_3,3_4} )
36 +
37 +inherit flag-o-matic eutils python-single-r1
38 +
39 +export CTARGET=${CTARGET:-${CHOST}}
40 +if [[ ${CTARGET} == ${CHOST} ]] ; then
41 + if [[ ${CATEGORY} == cross-* ]] ; then
42 + export CTARGET=${CATEGORY#cross-}
43 + fi
44 +fi
45 +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
46 +
47 +RPM=
48 +MY_PV=${PV}
49 +case ${PV} in
50 +9999*)
51 + # live git tree
52 + EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
53 + inherit git-2
54 + SRC_URI=""
55 + ;;
56 +*.*.50.2???????)
57 + # weekly snapshots
58 + SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz"
59 + ;;
60 +*.*.*.*.*.*)
61 + # fedora versions; note we swap the rpm & fedora core versions.
62 + # gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild
63 + # gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild
64 + inherit versionator rpm
65 + gvcr() { get_version_component_range "$@"; }
66 + parse_fedora_ver() {
67 + set -- $(get_version_components)
68 + MY_PV=$(gvcr 1-$(( $# - 2 )))
69 + RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm"
70 + }
71 + parse_fedora_ver
72 + SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}"
73 + ;;
74 +*)
75 + # Normal upstream release
76 + SRC_URI="mirror://gnu/gdb/${P}.tar.xz
77 + ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
78 + ;;
79 +esac
80 +
81 +PATCH_VER=""
82 +DESCRIPTION="GNU debugger"
83 +HOMEPAGE="http://sourceware.org/gdb/"
84 +SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
85 +
86 +LICENSE="GPL-2 LGPL-2"
87 +SLOT="0"
88 +if [[ ${PV} != 9999* ]] ; then
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 zlib"
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 + zlib? ( 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 + # This only disables building in the readline subdir.
176 + # For gdb itself, it'll use the system version.
177 + --disable-readline
178 + --with-system-readline
179 + --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
180 + $(use_with expat)
181 + $(use_with lzma)
182 + $(use_enable nls)
183 + $(use multitarget && echo --enable-targets=all)
184 + $(use_with python python "${EPYTHON}")
185 + $(use_with zlib)
186 + )
187 + fi
188 +
189 + econf "${myconf[@]}"
190 +}
191 +
192 +src_test() {
193 + nonfatal emake check || ewarn "tests failed"
194 +}
195 +
196 +src_install() {
197 + use server && ! use client && cd gdb/gdbserver
198 + default
199 + use client && find "${ED}"/usr -name libiberty.a -delete
200 + cd "${S}"
201 +
202 + # Don't install docs when building a cross-gdb
203 + if [[ ${CTARGET} != ${CHOST} ]] ; then
204 + rm -r "${ED}"/usr/share/{doc,info,locale}
205 + local f
206 + for f in "${ED}"/usr/share/man/*/* ; do
207 + if [[ ${f##*/} != ${CTARGET}-* ]] ; then
208 + mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
209 + fi
210 + done
211 + return 0
212 + fi
213 + # Install it by hand for now:
214 + # http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
215 + # Only install if it exists due to the twisted behavior (see
216 + # notes in src_configure above).
217 + [[ -e gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
218 +
219 + if use client ; then
220 + docinto gdb
221 + dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
222 + gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
223 + fi
224 + docinto sim
225 + dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
226 + if use server ; then
227 + docinto gdbserver
228 + dodoc gdb/gdbserver/{ChangeLog,README}
229 + fi
230 +
231 + if [[ -n ${PATCH_VER} ]] ; then
232 + dodoc "${WORKDIR}"/extra/gdbinit.sample
233 + fi
234 +
235 + # Remove shared info pages
236 + rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
237 +}
238 +
239 +pkg_postinst() {
240 + # portage sucks and doesnt unmerge files in /etc
241 + rm -vf "${EROOT}"/etc/skel/.gdbinit
242 +
243 + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
244 + ewarn "gdb is unable to get a mach task port when installed by Prefix"
245 + ewarn "Portage, unprivileged. To make gdb fully functional you'll"
246 + ewarn "have to perform the following steps:"
247 + ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
248 + ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
249 + fi
250 +}