Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-devel/gdb: metadata.xml ChangeLog gdb-7.3.1-r1.ebuild
Date: Sat, 31 Dec 2011 09:43:28
Message-Id: 20111231094319.244E82004B@flycatcher.gentoo.org
1 vapier 11/12/31 09:43:19
2
3 Modified: metadata.xml ChangeLog
4 Added: gdb-7.3.1-r1.ebuild
5 Log:
6 Add USE=client/server support, and fix up the install of helper libraries.
7
8 (Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.9 sys-devel/gdb/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/metadata.xml?rev=1.9&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/metadata.xml?rev=1.9&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/metadata.xml?r1=1.8&r2=1.9
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-devel/gdb/metadata.xml,v
20 retrieving revision 1.8
21 retrieving revision 1.9
22 diff -u -r1.8 -r1.9
23 --- metadata.xml 2 Dec 2011 21:08:12 -0000 1.8
24 +++ metadata.xml 31 Dec 2011 09:43:19 -0000 1.9
25 @@ -3,7 +3,9 @@
26 <pkgmetadata>
27 <herd>toolchain</herd>
28 <use>
29 + <flag name='client'>Install the main "gdb" program (most people want this)</flag>
30 <flag name='multitarget'>Support all known targets in one gdb binary</flag>
31 <flag name='python'>Enable support for the new internal scripting language, as well as extended pretty printers</flag>
32 + <flag name='server'>Install the "gdbserver" program (useful for embedded/remote targets)</flag>
33 </use>
34 </pkgmetadata>
35
36
37
38 1.199 sys-devel/gdb/ChangeLog
39
40 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/ChangeLog?rev=1.199&view=markup
41 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/ChangeLog?rev=1.199&content-type=text/plain
42 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/ChangeLog?r1=1.198&r2=1.199
43
44 Index: ChangeLog
45 ===================================================================
46 RCS file: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v
47 retrieving revision 1.198
48 retrieving revision 1.199
49 diff -u -r1.198 -r1.199
50 --- ChangeLog 29 Dec 2011 18:48:27 -0000 1.198
51 +++ ChangeLog 31 Dec 2011 09:43:19 -0000 1.199
52 @@ -1,6 +1,12 @@
53 # ChangeLog for sys-devel/gdb
54 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
55 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.198 2011/12/29 18:48:27 jer Exp $
56 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.199 2011/12/31 09:43:19 vapier Exp $
57 +
58 +*gdb-7.3.1-r1 (31 Dec 2011)
59 +
60 + 31 Dec 2011; Mike Frysinger <vapier@g.o> +gdb-7.3.1-r1.ebuild,
61 + metadata.xml:
62 + Add USE=client/server support, and fix up the install of helper libraries.
63
64 29 Dec 2011; Jeroen Roovers <jer@g.o> gdb-7.3.1.ebuild:
65 Stable for HPPA (bug #395017).
66
67
68
69 1.1 sys-devel/gdb/gdb-7.3.1-r1.ebuild
70
71 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild?rev=1.1&view=markup
72 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild?rev=1.1&content-type=text/plain
73
74 Index: gdb-7.3.1-r1.ebuild
75 ===================================================================
76 # Copyright 1999-2011 Gentoo Foundation
77 # Distributed under the terms of the GNU General Public License v2
78 # $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild,v 1.1 2011/12/31 09:43:19 vapier Exp $
79
80 EAPI="3"
81
82 inherit flag-o-matic eutils
83
84 export CTARGET=${CTARGET:-${CHOST}}
85 if [[ ${CTARGET} == ${CHOST} ]] ; then
86 if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
87 export CTARGET=${CATEGORY/cross-}
88 fi
89 fi
90 is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
91
92 RPM=
93 MY_PV=${PV}
94 case ${PV} in
95 *.*.*.*.*.*)
96 # fedora version: gdb-6.8.50.20090302-8.fc11.src.rpm
97 inherit versionator rpm
98 gvcr() { get_version_component_range "$@"; }
99 MY_PV=$(gvcr 1-4)
100 RPM="${PN}-${MY_PV}-$(gvcr 5).fc$(gvcr 6).src.rpm"
101 SRC_URI="mirror://fedora/development/source/SRPMS/${RPM}"
102 ;;
103 *.*.50.*)
104 # weekly snapshots
105 SRC_URI="ftp://sources.redhat.com/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.bz2"
106 ;;
107 9999*)
108 # live git tree
109 EGIT_REPO_URI="git://sourceware.org/git/gdb.git"
110 inherit git-2
111 SRC_URI=""
112 ;;
113 *)
114 # Normal upstream release
115 SRC_URI="http://ftp.gnu.org/gnu/gdb/${P}.tar.bz2
116 ftp://sources.redhat.com/pub/gdb/releases/${P}.tar.bz2"
117 ;;
118 esac
119
120 PATCH_VER="2"
121 DESCRIPTION="GNU debugger"
122 HOMEPAGE="http://sourceware.org/gdb/"
123 SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
124
125 LICENSE="GPL-2 LGPL-2"
126 is_cross \
127 && SLOT="${CTARGET}" \
128 || SLOT="0"
129 if [[ ${PV} != 9999* ]] ; then
130 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
131 fi
132 IUSE="+client expat multitarget nls +python +server test vanilla"
133
134 RDEPEND="!dev-util/gdbserver
135 >=sys-libs/ncurses-5.2-r2
136 sys-libs/readline
137 expat? ( dev-libs/expat )
138 python? ( =dev-lang/python-2* )"
139 DEPEND="${RDEPEND}
140 app-arch/xz-utils
141 virtual/yacc
142 test? ( dev-util/dejagnu )
143 nls? ( sys-devel/gettext )"
144
145 S=${WORKDIR}/${PN}-${MY_PV}
146
147 src_prepare() {
148 [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
149 use vanilla || [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
150 strip-linguas -u bfd/po opcodes/po
151 }
152
153 gdb_branding() {
154 printf "Gentoo ${PV} "
155 if [[ -n ${PATCH_VER} ]] ; then
156 printf "p${PATCH_VER}"
157 else
158 printf "vanilla"
159 fi
160 }
161
162 src_configure() {
163 strip-unsupported-flags
164
165 local myconf=(
166 --with-pkgversion="$(gdb_branding)"
167 --with-bugurl='http://bugs.gentoo.org/'
168 --disable-werror
169 $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET})
170 )
171
172 if use server ; then
173 use client || cd gdb/gdbserver
174 myconf+=( --program-transform-name='' )
175 fi
176
177 if use client ; then
178 myconf+=(
179 --enable-64-bit-bfd
180 --disable-install-libbfd
181 --disable-install-libiberty
182 --with-system-readline
183 --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
184 $(use_with expat)
185 $(use_enable nls)
186 $(use multitarget && echo --enable-targets=all)
187 $(use_with python python "${EPREFIX}/usr/bin/python2")
188 $(use_enable server gdbserver)
189 )
190 fi
191
192 econf "${myconf[@]}"
193 }
194
195 src_test() {
196 emake check || ewarn "tests failed"
197 }
198
199 src_install() {
200 use server && ! use client && cd gdb/gdbserver
201 emake DESTDIR="${D}" install || die
202 use client && { rm "${D}"/usr/lib*/libiberty.a || die ; }
203 cd "${S}"
204
205 # Don't install docs when building a cross-gdb
206 if [[ ${CTARGET} != ${CHOST} ]] ; then
207 rm -r "${ED}"/usr/share
208 return 0
209 fi
210 # http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
211 use server && { dobin gdb/gdbserver/gdbreplay || die ; }
212
213 dodoc README
214 if use client ; then
215 docinto gdb
216 dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
217 gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
218 fi
219 docinto sim
220 dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
221 if use server ; then
222 docinto gdbserver
223 dodoc gdb/gdbserver/{ChangeLog,README}
224 fi
225
226 if [[ -n ${PATCH_VER} ]] ; then
227 dodoc "${WORKDIR}"/extra/gdbinit.sample
228 fi
229
230 # Remove shared info pages
231 rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
232 }
233
234 pkg_postinst() {
235 # portage sucks and doesnt unmerge files in /etc
236 rm -vf "${ROOT}"/etc/skel/.gdbinit
237
238 if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
239 ewarn "gdb is unable to get a mach task port when installed by Prefix"
240 ewarn "Portage, unprivileged. To make gdb fully functional you'll"
241 ewarn "have to perform the following steps:"
242 ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
243 ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
244 fi
245 }