1 |
vapier 12/01/02 05:42:56 |
2 |
|
3 |
Modified: gdb-9999.ebuild ChangeLog gdb-7.3.1-r1.ebuild |
4 |
Log: |
5 |
Merge live/non-live ebuilds, fix up USE="-client -server" behavior, and handle gdbserver better in unsupported configurations #396697 by Thomas Sachau. |
6 |
|
7 |
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.7 sys-devel/gdb/gdb-9999.ebuild |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/gdb-9999.ebuild?rev=1.7&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/gdb-9999.ebuild?rev=1.7&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/gdb-9999.ebuild?r1=1.6&r2=1.7 |
15 |
|
16 |
Index: gdb-9999.ebuild |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-9999.ebuild,v |
19 |
retrieving revision 1.6 |
20 |
retrieving revision 1.7 |
21 |
diff -u -r1.6 -r1.7 |
22 |
--- gdb-9999.ebuild 2 Dec 2011 21:08:12 -0000 1.6 |
23 |
+++ gdb-9999.ebuild 2 Jan 2012 05:42:56 -0000 1.7 |
24 |
@@ -1,6 +1,6 @@ |
25 |
-# Copyright 1999-2011 Gentoo Foundation |
26 |
+# Copyright 1999-2012 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-9999.ebuild,v 1.6 2011/12/02 21:08:12 vapier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-9999.ebuild,v 1.7 2012/01/02 05:42:56 vapier Exp $ |
30 |
|
31 |
EAPI="3" |
32 |
|
33 |
@@ -48,15 +48,14 @@ |
34 |
SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}" |
35 |
|
36 |
LICENSE="GPL-2 LGPL-2" |
37 |
-is_cross \ |
38 |
- && SLOT="${CTARGET}" \ |
39 |
- || SLOT="0" |
40 |
+SLOT="0" |
41 |
if [[ ${PV} != 9999* ]] ; then |
42 |
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~x64-macos ~x86-macos" |
43 |
+ 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" |
44 |
fi |
45 |
-IUSE="expat multitarget nls +python test vanilla" |
46 |
+IUSE="+client expat multitarget nls +python +server test vanilla" |
47 |
|
48 |
-RDEPEND=">=sys-libs/ncurses-5.2-r2 |
49 |
+RDEPEND="!dev-util/gdbserver |
50 |
+ >=sys-libs/ncurses-5.2-r2 |
51 |
sys-libs/readline |
52 |
expat? ( dev-libs/expat ) |
53 |
python? ( =dev-lang/python-2* )" |
54 |
@@ -85,18 +84,45 @@ |
55 |
|
56 |
src_configure() { |
57 |
strip-unsupported-flags |
58 |
- econf \ |
59 |
- --with-pkgversion="$(gdb_branding)" \ |
60 |
- --with-bugurl='http://bugs.gentoo.org/' \ |
61 |
- --disable-werror \ |
62 |
- --enable-64-bit-bfd \ |
63 |
- --with-system-readline \ |
64 |
- --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug \ |
65 |
- $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET}) \ |
66 |
- $(use_with expat) \ |
67 |
- $(use_enable nls) \ |
68 |
- $(use multitarget && echo --enable-targets=all) \ |
69 |
- $(use_with python python "${EPREFIX}/usr/bin/python2") |
70 |
+ |
71 |
+ local myconf=( |
72 |
+ --with-pkgversion="$(gdb_branding)" |
73 |
+ --with-bugurl='http://bugs.gentoo.org/' |
74 |
+ --disable-werror |
75 |
+ $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET}) |
76 |
+ ) |
77 |
+ |
78 |
+ if use server && ! use client ; then |
79 |
+ # just configure+build in the gdbserver subdir to speed things up |
80 |
+ cd gdb/gdbserver |
81 |
+ myconf+=( --program-transform-name='' ) |
82 |
+ else |
83 |
+ # gdbserver only works for native targets (CHOST==CTARGET). |
84 |
+ # it also doesn't support all targets, so rather than duplicate |
85 |
+ # the target list (which changes between versions), use the |
86 |
+ # "auto" value when things are turned on. |
87 |
+ is_cross \ |
88 |
+ && myconf+=( --disable-gdbserver ) \ |
89 |
+ || myconf+=( $(use_enable server gdbserver auto) ) |
90 |
+ fi |
91 |
+ |
92 |
+ if ! ( use server && ! use client ) ; then |
93 |
+ # if we are configuring in the top level, then use all |
94 |
+ # the additional global options |
95 |
+ myconf+=( |
96 |
+ --enable-64-bit-bfd |
97 |
+ --disable-install-libbfd |
98 |
+ --disable-install-libiberty |
99 |
+ --with-system-readline |
100 |
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug |
101 |
+ $(use_with expat) |
102 |
+ $(use_enable nls) |
103 |
+ $(use multitarget && echo --enable-targets=all) |
104 |
+ $(use_with python python "${EPREFIX}/usr/bin/python2") |
105 |
+ ) |
106 |
+ fi |
107 |
+ |
108 |
+ econf "${myconf[@]}" |
109 |
} |
110 |
|
111 |
src_test() { |
112 |
@@ -104,24 +130,34 @@ |
113 |
} |
114 |
|
115 |
src_install() { |
116 |
- emake \ |
117 |
- DESTDIR="${D}" \ |
118 |
- {include,lib}dir=/nukeme/pretty/pretty/please \ |
119 |
- install || die |
120 |
- rm -r "${D}"/nukeme || die |
121 |
+ use server && ! use client && cd gdb/gdbserver |
122 |
+ emake DESTDIR="${D}" install || die |
123 |
+ use client && { rm "${ED}"/usr/lib*/libiberty.a || die ; } |
124 |
+ cd "${S}" |
125 |
|
126 |
# Don't install docs when building a cross-gdb |
127 |
if [[ ${CTARGET} != ${CHOST} ]] ; then |
128 |
rm -r "${ED}"/usr/share |
129 |
return 0 |
130 |
fi |
131 |
+ # Install it by hand for now: |
132 |
+ # http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html |
133 |
+ # Only install if it exists due to the twisted behavior (see |
134 |
+ # notes in src_configure above). |
135 |
+ [[ -e gdb/gdbserver/gdbreplay ]] && { dobin gdb/gdbserver/gdbreplay || die ; } |
136 |
|
137 |
dodoc README |
138 |
- docinto gdb |
139 |
- dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ |
140 |
- gdb/NEWS gdb/ChangeLog gdb/PROBLEMS |
141 |
+ if use client ; then |
142 |
+ docinto gdb |
143 |
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ |
144 |
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS |
145 |
+ fi |
146 |
docinto sim |
147 |
- dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING |
148 |
+ dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} |
149 |
+ if use server ; then |
150 |
+ docinto gdbserver |
151 |
+ dodoc gdb/gdbserver/{ChangeLog,README} |
152 |
+ fi |
153 |
|
154 |
if [[ -n ${PATCH_VER} ]] ; then |
155 |
dodoc "${WORKDIR}"/extra/gdbinit.sample |
156 |
@@ -133,7 +169,7 @@ |
157 |
|
158 |
pkg_postinst() { |
159 |
# portage sucks and doesnt unmerge files in /etc |
160 |
- rm -vf "${ROOT}"/etc/skel/.gdbinit |
161 |
+ rm -vf "${EROOT}"/etc/skel/.gdbinit |
162 |
|
163 |
if use prefix && [[ ${CHOST} == *-darwin* ]] ; then |
164 |
ewarn "gdb is unable to get a mach task port when installed by Prefix" |
165 |
|
166 |
|
167 |
|
168 |
1.201 sys-devel/gdb/ChangeLog |
169 |
|
170 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/ChangeLog?rev=1.201&view=markup |
171 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/ChangeLog?rev=1.201&content-type=text/plain |
172 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/ChangeLog?r1=1.200&r2=1.201 |
173 |
|
174 |
Index: ChangeLog |
175 |
=================================================================== |
176 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v |
177 |
retrieving revision 1.200 |
178 |
retrieving revision 1.201 |
179 |
diff -u -r1.200 -r1.201 |
180 |
--- ChangeLog 1 Jan 2012 19:45:57 -0000 1.200 |
181 |
+++ ChangeLog 2 Jan 2012 05:42:56 -0000 1.201 |
182 |
@@ -1,6 +1,12 @@ |
183 |
# ChangeLog for sys-devel/gdb |
184 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
185 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.200 2012/01/01 19:45:57 grobian Exp $ |
186 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.201 2012/01/02 05:42:56 vapier Exp $ |
187 |
+ |
188 |
+ 02 Jan 2012; Mike Frysinger <vapier@g.o> gdb-7.3.1-r1.ebuild, |
189 |
+ gdb-9999.ebuild: |
190 |
+ Merge live/non-live ebuilds, fix up USE="-client -server" behavior, and |
191 |
+ handle gdbserver better in unsupported configurations #396697 by Thomas |
192 |
+ Sachau. |
193 |
|
194 |
01 Jan 2012; Fabian Groffen <grobian@g.o> gdb-7.3.1-r1.ebuild: |
195 |
Remove/check existing files (wrt Prefix offset) |
196 |
|
197 |
|
198 |
|
199 |
1.3 sys-devel/gdb/gdb-7.3.1-r1.ebuild |
200 |
|
201 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild?rev=1.3&view=markup |
202 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild?rev=1.3&content-type=text/plain |
203 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild?r1=1.2&r2=1.3 |
204 |
|
205 |
Index: gdb-7.3.1-r1.ebuild |
206 |
=================================================================== |
207 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild,v |
208 |
retrieving revision 1.2 |
209 |
retrieving revision 1.3 |
210 |
diff -u -r1.2 -r1.3 |
211 |
--- gdb-7.3.1-r1.ebuild 1 Jan 2012 19:45:57 -0000 1.2 |
212 |
+++ gdb-7.3.1-r1.ebuild 2 Jan 2012 05:42:56 -0000 1.3 |
213 |
@@ -1,6 +1,6 @@ |
214 |
# Copyright 1999-2012 Gentoo Foundation |
215 |
# Distributed under the terms of the GNU General Public License v2 |
216 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild,v 1.2 2012/01/01 19:45:57 grobian Exp $ |
217 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild,v 1.3 2012/01/02 05:42:56 vapier Exp $ |
218 |
|
219 |
EAPI="3" |
220 |
|
221 |
@@ -48,9 +48,7 @@ |
222 |
SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}" |
223 |
|
224 |
LICENSE="GPL-2 LGPL-2" |
225 |
-is_cross \ |
226 |
- && SLOT="${CTARGET}" \ |
227 |
- || SLOT="0" |
228 |
+SLOT="0" |
229 |
if [[ ${PV} != 9999* ]] ; then |
230 |
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" |
231 |
fi |
232 |
@@ -94,12 +92,23 @@ |
233 |
$(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET}) |
234 |
) |
235 |
|
236 |
- if use server ; then |
237 |
- use client || cd gdb/gdbserver |
238 |
+ if use server && ! use client ; then |
239 |
+ # just configure+build in the gdbserver subdir to speed things up |
240 |
+ cd gdb/gdbserver |
241 |
myconf+=( --program-transform-name='' ) |
242 |
+ else |
243 |
+ # gdbserver only works for native targets (CHOST==CTARGET). |
244 |
+ # it also doesn't support all targets, so rather than duplicate |
245 |
+ # the target list (which changes between versions), use the |
246 |
+ # "auto" value when things are turned on. |
247 |
+ is_cross \ |
248 |
+ && myconf+=( --disable-gdbserver ) \ |
249 |
+ || myconf+=( $(use_enable server gdbserver auto) ) |
250 |
fi |
251 |
|
252 |
- if use client ; then |
253 |
+ if ! ( use server && ! use client ) ; then |
254 |
+ # if we are configuring in the top level, then use all |
255 |
+ # the additional global options |
256 |
myconf+=( |
257 |
--enable-64-bit-bfd |
258 |
--disable-install-libbfd |
259 |
@@ -110,7 +119,6 @@ |
260 |
$(use_enable nls) |
261 |
$(use multitarget && echo --enable-targets=all) |
262 |
$(use_with python python "${EPREFIX}/usr/bin/python2") |
263 |
- $(use_enable server gdbserver) |
264 |
) |
265 |
fi |
266 |
|
267 |
@@ -132,8 +140,11 @@ |
268 |
rm -r "${ED}"/usr/share |
269 |
return 0 |
270 |
fi |
271 |
+ # Install it by hand for now: |
272 |
# http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html |
273 |
- use server && { dobin gdb/gdbserver/gdbreplay || die ; } |
274 |
+ # Only install if it exists due to the twisted behavior (see |
275 |
+ # notes in src_configure above). |
276 |
+ [[ -e gdb/gdbserver/gdbreplay ]] && { dobin gdb/gdbserver/gdbreplay || die ; } |
277 |
|
278 |
dodoc README |
279 |
if use client ; then |