Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/mono-debugger/files: mono-debugger-2.6-system-bfd.patch mono-debugger-2.6-respect-cflags.patch mono-debugger-2.6-system-libedit.patch
Date: Sun, 21 Feb 2010 12:41:47
Message-Id: E1NjB85-0001zz-8K@stork.gentoo.org
1 patrick 10/02/21 12:41:45
2
3 Added: mono-debugger-2.6-system-bfd.patch
4 mono-debugger-2.6-respect-cflags.patch
5 mono-debugger-2.6-system-libedit.patch
6 Log:
7 Bump, thanks to Priit Laes for porting the patches. Tests fail.
8 (Portage version: 2.2_rc63/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 dev-util/mono-debugger/files/mono-debugger-2.6-system-bfd.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/mono-debugger/files/mono-debugger-2.6-system-bfd.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/mono-debugger/files/mono-debugger-2.6-system-bfd.patch?rev=1.1&content-type=text/plain
15
16 Index: mono-debugger-2.6-system-bfd.patch
17 ===================================================================
18 From d9c203a8680e2e7088b29540fe64de08966bd86d Mon Sep 17 00:00:00 2001
19 From: Priit Laes <plaes@×××××.org>
20 Date: Sun, 21 Feb 2010 14:18:43 +0200
21 Subject: [PATCH 3/3] Add option to use system bfd.
22
23 ---
24 backend/os/Makefile.am | 13 +++++++++++--
25 backend/os/bfdglue.c | 8 +++++++-
26 configure.in | 14 ++++++++++++++
27 3 files changed, 32 insertions(+), 3 deletions(-)
28
29 diff --git a/backend/os/Makefile.am b/backend/os/Makefile.am
30 index 2a9f019..b4ca82c 100644
31 --- a/backend/os/Makefile.am
32 +++ b/backend/os/Makefile.am
33 @@ -1,15 +1,24 @@
34 +if !SYSTEM_LIBBFD
35 SUBDIRS = bfd
36
37 +libbfd_libs = bfd/opcodes/libopcodes.la bfd/libbfd.la
38 +libbfd_includes = -I$(srcdir)/bfd -I$(srcdir)/bfd/include -I$(srcdir)/bfd/opcodes
39 +else
40 +libbfd_libs = -lopcodes -lbfd
41 +libbfd_includes =
42 +endif
43 +
44 +
45 noinst_LTLIBRARIES = libmonodebuggerbfdglue.la
46
47 libmonodebuggerbfdglue_la_SOURCES = \
48 bfdglue.c \
49 bfdglue.h
50
51 -libmonodebuggerbfdglue_la_LIBADD = bfd/opcodes/libopcodes.la bfd/libbfd.la @BASE_DEPENDENCIES_LIBS@
52 +libmonodebuggerbfdglue_la_LIBADD = $(libbfd_libs) @BASE_DEPENDENCIES_LIBS@
53 libmonodebuggerbfdglue_la_LDFLAGS = -no-undefined -module -export-dynamic -shared
54
55 -INCLUDES = -I$(srcdir)/bfd -I$(srcdir)/bfd/include -I$(srcdir)/bfd/opcodes @BASE_DEPENDENCIES_CFLAGS@
56 +INCLUDES = $(libbfd_includes) @BASE_DEPENDENCIES_CFLAGS@
57
58 CLEANFILES = lib*.a lib*.dll
59
60 diff --git a/backend/os/bfdglue.c b/backend/os/bfdglue.c
61 index 9a741ac..e2138e7 100644
62 --- a/backend/os/bfdglue.c
63 +++ b/backend/os/bfdglue.c
64 @@ -1,3 +1,5 @@
65 +#include <config.h>
66 +
67 #include <bfdglue.h>
68 #include <signal.h>
69 #include <string.h>
70 @@ -246,7 +248,11 @@ bfd_glue_get_errormsg (void)
71 guint32
72 bfd_glue_get_section_size (asection *p)
73 {
74 +#ifdef HAVE_ASECTION_RAWSIZE
75 + return p->rawsize ? p->rawsize : p->size;
76 +#else
77 return p->_raw_size;
78 +#endif
79 }
80
81 BfdGlueSectionFlags
82 @@ -350,4 +356,4 @@ guint64
83 bfd_glue_get_start_address (bfd *abfd)
84 {
85 return bfd_get_start_address (abfd);
86 -}
87 \ No newline at end of file
88 +}
89 diff --git a/configure.in b/configure.in
90 index ce0b609..6df7f05 100644
91 --- a/configure.in
92 +++ b/configure.in
93 @@ -64,6 +64,20 @@ case "$host" in
94 esac
95 AC_MSG_RESULT(ok)
96
97 +AC_ARG_WITH([system-libbfd],
98 + AS_HELP_STRING([--with-system-libbfd], [Use the system copy of libbfd and libopcodes.]))
99 +
100 +AS_IF([test "x$with_system_libbfd" = "xyes"],
101 + [
102 + AC_CHECK_HEADERS([bfd.h], [], [AC_MSG_ERROR([Missing bfd.h header])])
103 + AC_CHECK_LIB([bfd], [bfd_init], [:], [AC_MSG_ERROR([Missing libbfd library])])
104 + AC_CHECK_LIB([opcodes], [init_disassemble_info], [:], [AC_MSG_ERROR([Missing libopcodes library])])
105 + AC_CHECK_MEMBERS([asection.rawsize], [], [], [[#include <bfd.h>]])
106 + ])
107 +
108 +AM_CONDITIONAL([SYSTEM_LIBBFD], [test "x$with_system_libbfd" = "xyes"])
109 +
110 +
111 AC_ARG_WITH(bfd-target,
112 [ --with-bfd-target Manually override the BFD target],
113 if test x$with_bfd_target != "x"; then
114 --
115 1.7.0
116
117
118
119
120 1.1 dev-util/mono-debugger/files/mono-debugger-2.6-respect-cflags.patch
121
122 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/mono-debugger/files/mono-debugger-2.6-respect-cflags.patch?rev=1.1&view=markup
123 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/mono-debugger/files/mono-debugger-2.6-respect-cflags.patch?rev=1.1&content-type=text/plain
124
125 Index: mono-debugger-2.6-respect-cflags.patch
126 ===================================================================
127 From c396504c34d0e1648f7842c457b1db681b3b1b0b Mon Sep 17 00:00:00 2001
128 From: Priit Laes <plaes@×××××.org>
129 Date: Sun, 21 Feb 2010 14:04:48 +0200
130 Subject: [PATCH 2/3] Respect cflags
131
132 ---
133 configure.in | 4 ++--
134 1 files changed, 2 insertions(+), 2 deletions(-)
135
136 diff --git a/configure.in b/configure.in
137 index e8ec185..ce0b609 100644
138 --- a/configure.in
139 +++ b/configure.in
140 @@ -106,7 +106,7 @@ AM_PROG_LIBTOOL
141 # not 64 bit clean in cross-compile
142 AC_CHECK_SIZEOF(void *, 4)
143
144 -CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -fno-strict-aliasing'
145 +CFLAGS="-g ${CFLAGS} -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -fno-strict-aliasing"
146
147 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
148 if test "x$PKG_CONFIG" = "xno"; then
149 @@ -301,7 +301,7 @@ AM_CONDITIONAL(HAVE_XSP, test "x$with_xsp" = "xyes")
150 #not sure why, but I cannot get this test to pass on OS X.
151 if test x$platform != xi386darwin ; then
152 AC_MSG_CHECKING([Whether your Mono is working])
153 -old_CFLAGS=$cflags
154 +old_CFLAGS=$CFLAGS
155 CFLAGS=$WRAPPER_CFLAGS
156 AC_TRY_COMPILE([#include <mono/metadata/mono-debug.h>
157 #include <mono/metadata/debug-mono-symfile.h>
158 --
159 1.7.0
160
161
162
163
164 1.1 dev-util/mono-debugger/files/mono-debugger-2.6-system-libedit.patch
165
166 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/mono-debugger/files/mono-debugger-2.6-system-libedit.patch?rev=1.1&view=markup
167 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/mono-debugger/files/mono-debugger-2.6-system-libedit.patch?rev=1.1&content-type=text/plain
168
169 Index: mono-debugger-2.6-system-libedit.patch
170 ===================================================================
171 From a857a6fb50605d6f3dddf814081dbbff59d64ba7 Mon Sep 17 00:00:00 2001
172 From: Priit Laes <plaes@×××××.org>
173 Date: Sun, 21 Feb 2010 14:01:49 +0200
174 Subject: [PATCH 1/3] Use system-wide libedit library when requested.
175
176 ---
177 configure.in | 15 ++++++++++++++-
178 frontend/libedit/Makefile.am | 11 +++++++++--
179 frontend/libedit/mono-debugger-readline.h | 10 +++++++++-
180 3 files changed, 32 insertions(+), 4 deletions(-)
181
182 diff --git a/configure.in b/configure.in
183 index 256afa9..e8ec185 100644
184 --- a/configure.in
185 +++ b/configure.in
186 @@ -262,7 +262,20 @@ AC_HEADER_DIRENT
187 AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
188 AC_CHECK_FUNCS(strlcpy strlcat fgetln)
189
190 -CHECK_READLINE
191 +AC_ARG_WITH([system-libedit],
192 + AS_HELP_STRING([--with-system-libedit], [Use the system copy of libedit.]))
193 +
194 +AS_IF([test "x$with_system_libedit" = "xyes"],
195 + [
196 + AC_CHECK_HEADERS([editline/readline.h libedit/readline.h], [found_libedit_header=yes; break;])
197 + AS_IF([test "$found_libedit_header" != "yes"], [AC_MSG_ERROR([Missing libedit/readline.h header])])
198 + AC_CHECK_LIB([edit], [el_init], [:], [AC_MSG_ERROR([Missing libedit library])])
199 + ], [
200 + CHECK_READLINE
201 + ])
202 +
203 +AM_CONDITIONAL([SYSTEM_LIBEDIT], [test "x$with_system_libedit" = "xyes"])
204 +
205
206 min_mono_version=72
207 symfile_major_version=50
208 diff --git a/frontend/libedit/Makefile.am b/frontend/libedit/Makefile.am
209 index 9e03757..100cb88 100644
210 --- a/frontend/libedit/Makefile.am
211 +++ b/frontend/libedit/Makefile.am
212 @@ -1,14 +1,21 @@
213 lib_LTLIBRARIES = libmonodebuggerreadline.la
214
215 libmonodebuggerreadline_la_SOURCES = \
216 - mono-debugger-readline.c mono-debugger-readline.h readline.c readline.h \
217 + mono-debugger-readline.c mono-debugger-readline.h
218 +
219 +if SYSTEM_LIBEDIT
220 +libedit_libs = -ledit
221 +else
222 +libedit_libs = @READLINE_DEPLIBS@
223 +libmonodebuggerreadline_la_SOURCES += readline.c readline.h \
224 chared.c common.c el.c emacs.c fcns.c help.c hist.c history.c key.c map.c \
225 parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c vis.c unvis.c \
226 strlcpy.c strlcat.c chared.h common.h el.h emacs.h fcns.h help.h histedit.h hist.h \
227 key.h map.h parse.h prompt.h read.h refresh.h search.h sig.h sys.h term.h tty.h \
228 vi.h vis.h el_term.h filecomplete.h tokenizer.c filecomplete.c
229 +endif
230
231 -libmonodebuggerreadline_la_LIBADD = @BASE_DEPENDENCIES_LIBS@ @READLINE_DEPLIBS@
232 +libmonodebuggerreadline_la_LIBADD = @BASE_DEPENDENCIES_LIBS@ $(libedit_libs)
233 if PLATFORM_X86_DARWIN
234 libmonodebuggerreadline_la_LDFLAGS = -no-undefined -shared -Wl
235 else
236 diff --git a/frontend/libedit/mono-debugger-readline.h b/frontend/libedit/mono-debugger-readline.h
237 index c547c75..1a854cc 100644
238 --- a/frontend/libedit/mono-debugger-readline.h
239 +++ b/frontend/libedit/mono-debugger-readline.h
240 @@ -1,9 +1,17 @@
241 #ifndef __MONO_DEBUGGER_READLINE_H__
242 #define __MONO_DEBUGGER_READLINE_H__
243
244 +#include <config.h>
245 +
246 #include <glib.h>
247 #include <stdio.h>
248 -#include <readline.h>
249 +#if defined(HAVE_LIBEDIT_READLINE_H)
250 +# include <libedit/readline.h>
251 +#elif defined(HAVE_LIBEDIT_READLINE_H)
252 +# include <libedit/readline.h>
253 +#else
254 +# include "readline.h"
255 +#endif
256
257 G_BEGIN_DECLS
258
259 --
260 1.7.0