Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/ruby-scripts:master commit in: patchsets/patches-1.8.7_p370/
Date: Sat, 07 Jul 2012 07:02:52
Message-Id: 1341644189.a6af831967019f2cb61e103493683d37a8343fae.graaff@gentoo
1 commit: a6af831967019f2cb61e103493683d37a8343fae
2 Author: Hans de Graaff <hans <AT> degraaff <DOT> org>
3 AuthorDate: Sat Jul 7 06:56:29 2012 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 7 06:56:29 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ruby-scripts.git;a=commit;h=a6af8319
7
8 Add patchset for ruby 1.8.7_p370
9
10 ---
11 patchsets/patches-1.8.7_p370/001_memory_leak.patch | 59 ++++++++++++++++++++
12 .../003_mkmf-parallel-install.patch | 16 +++++
13 patchsets/patches-1.8.7_p370/004_berkdb-5.0.patch | 13 ++++
14 .../patches-1.8.7_p370/007_no-undefined-ext.patch | 13 ++++
15 patchsets/patches-1.8.7_p370/015-as-dir.patch | 13 ++++
16 patchsets/patches-1.8.7_p370/series | 5 ++
17 6 files changed, 119 insertions(+), 0 deletions(-)
18
19 diff --git a/patchsets/patches-1.8.7_p370/001_memory_leak.patch b/patchsets/patches-1.8.7_p370/001_memory_leak.patch
20 new file mode 100644
21 index 0000000..98edae0
22 --- /dev/null
23 +++ b/patchsets/patches-1.8.7_p370/001_memory_leak.patch
24 @@ -0,0 +1,59 @@
25 +Index: ruby-1.8.7-p299/ext/dl/handle.c
26 +===================================================================
27 +--- ruby-1.8.7-p299.orig/ext/dl/handle.c
28 ++++ ruby-1.8.7-p299/ext/dl/handle.c
29 +@@ -10,9 +10,12 @@ VALUE rb_cDLHandle;
30 + void
31 + dlhandle_free(struct dl_handle *dlhandle)
32 + {
33 ++ if (!dlhandle)
34 ++ return;
35 + if (dlhandle->ptr && dlhandle->open && dlhandle->enable_close) {
36 + dlclose(dlhandle->ptr);
37 + }
38 ++ dlfree(dlhandle);
39 + }
40 +
41 + VALUE
42 +Index: ruby-1.8.7-p299/ext/dl/ptr.c
43 +===================================================================
44 +--- ruby-1.8.7-p299.orig/ext/dl/ptr.c
45 ++++ ruby-1.8.7-p299/ext/dl/ptr.c
46 +@@ -45,6 +45,8 @@ rb_dlmem_aref(void *ptr)
47 + void
48 + dlptr_free(struct ptr_data *data)
49 + {
50 ++ if (!data)
51 ++ return;
52 + if (data->ptr) {
53 + DEBUG_CODE({
54 + printf("dlptr_free(): removing the pointer `0x%x' from the MemorySpace\n",
55 +@@ -61,6 +63,7 @@ dlptr_free(struct ptr_data *data)
56 + if (data->stype) dlfree(data->stype);
57 + if (data->ssize) dlfree(data->ssize);
58 + if (data->ids) dlfree(data->ids);
59 ++ dlfree(data);
60 + }
61 +
62 + void
63 +Index: ruby-1.8.7-p299/ext/dl/sym.c
64 +===================================================================
65 +--- ruby-1.8.7-p299.orig/ext/dl/sym.c
66 ++++ ruby-1.8.7-p299/ext/dl/sym.c
67 +@@ -57,6 +57,8 @@ char2type(int ch)
68 + void
69 + dlsym_free(struct sym_data *data)
70 + {
71 ++ if(!data)
72 ++ return;
73 + if( data->name ){
74 + DEBUG_CODE({
75 + printf("dlsym_free(): free(data->name:%s)\n",data->name);
76 +@@ -69,6 +71,7 @@ dlsym_free(struct sym_data *data)
77 + });
78 + free(data->type);
79 + }
80 ++ dlfree(data);
81 + }
82 +
83 + VALUE
84
85 diff --git a/patchsets/patches-1.8.7_p370/003_mkmf-parallel-install.patch b/patchsets/patches-1.8.7_p370/003_mkmf-parallel-install.patch
86 new file mode 100644
87 index 0000000..9ecdc9b
88 --- /dev/null
89 +++ b/patchsets/patches-1.8.7_p370/003_mkmf-parallel-install.patch
90 @@ -0,0 +1,16 @@
91 + Patch for bug 239101 by Matsuu Takuto, via Redmine issue 1337 (yes, really).
92 + Backported for 1.8.* by Alex Legler.
93 +
94 +Index: ruby-1.8.7-p299/lib/mkmf.rb
95 +===================================================================
96 +--- ruby-1.8.7-p299.orig/lib/mkmf.rb
97 ++++ ruby-1.8.7-p299/lib/mkmf.rb
98 +@@ -1523,7 +1523,7 @@ static: $(STATIC_LIB)#{$extout ? " inst
99 + dest = "#{dir}/#{f}"
100 + mfile.puts dir, "install-so: #{dest}"
101 + unless $extout
102 +- mfile.print "#{dest}: #{f}\n"
103 ++ mfile.print "#{dest}: #{dir} #{f}\n"
104 + if (sep = config_string('BUILD_FILE_SEPARATOR'))
105 + f.gsub!("/", sep)
106 + dir.gsub!("/", sep)
107
108 diff --git a/patchsets/patches-1.8.7_p370/004_berkdb-5.0.patch b/patchsets/patches-1.8.7_p370/004_berkdb-5.0.patch
109 new file mode 100644
110 index 0000000..2516cd3
111 --- /dev/null
112 +++ b/patchsets/patches-1.8.7_p370/004_berkdb-5.0.patch
113 @@ -0,0 +1,13 @@
114 +Index: ruby-1.8.7-p299/ext/dbm/extconf.rb
115 +===================================================================
116 +--- ruby-1.8.7-p299.orig/ext/dbm/extconf.rb
117 ++++ ruby-1.8.7-p299/ext/dbm/extconf.rb
118 +@@ -26,7 +26,7 @@ def headers.db_check(db)
119 + case db
120 + when /^db2?$/
121 + db_prefix = "__db_n"
122 +- hsearch = "-DDB_DBM_HSEARCH "
123 ++ hsearch = "-DDB_DBM_HSEARCH -DHAVE_DBM "
124 + when "gdbm"
125 + have_gdbm = true
126 + when "gdbm_compat"
127
128 diff --git a/patchsets/patches-1.8.7_p370/007_no-undefined-ext.patch b/patchsets/patches-1.8.7_p370/007_no-undefined-ext.patch
129 new file mode 100644
130 index 0000000..41a7ddb
131 --- /dev/null
132 +++ b/patchsets/patches-1.8.7_p370/007_no-undefined-ext.patch
133 @@ -0,0 +1,13 @@
134 +Index: ruby-1.8.7-p299/configure.in
135 +===================================================================
136 +--- ruby-1.8.7-p299.orig/configure.in
137 ++++ ruby-1.8.7-p299/configure.in
138 +@@ -1223,7 +1223,7 @@ if test "$with_dln_a_out" != yes; then
139 + linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi*)
140 + : ${LDSHARED='${CC} -shared'}
141 + if test "$rb_cv_binary_elf" = yes; then
142 +- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
143 ++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined"
144 + fi
145 + rb_cv_dlopen=yes ;;
146 + interix*) : ${LDSHARED="$CC -shared"}
147
148 diff --git a/patchsets/patches-1.8.7_p370/015-as-dir.patch b/patchsets/patches-1.8.7_p370/015-as-dir.patch
149 new file mode 100644
150 index 0000000..8b86e60
151 --- /dev/null
152 +++ b/patchsets/patches-1.8.7_p370/015-as-dir.patch
153 @@ -0,0 +1,13 @@
154 +diff --git a/configure.in b/configure.in
155 +index 0c9db02..b44625a 100644
156 +--- a/configure.in
157 ++++ b/configure.in
158 +@@ -243,7 +243,7 @@ AC_MINIX
159 +
160 + AC_SUBST(RM, ['rm -f'])
161 + AC_SUBST(CP, ['cp'])
162 +-if $as_mkdir_p; then
163 ++if eval $as_mkdir_p; then
164 + AC_SUBST(MAKEDIRS, ['mkdir -p'])
165 + else
166 + AC_SUBST(MAKEDIRS, ['install -d'])
167
168 diff --git a/patchsets/patches-1.8.7_p370/series b/patchsets/patches-1.8.7_p370/series
169 new file mode 100644
170 index 0000000..f454c2f
171 --- /dev/null
172 +++ b/patchsets/patches-1.8.7_p370/series
173 @@ -0,0 +1,5 @@
174 +001_memory_leak.patch
175 +003_mkmf-parallel-install.patch
176 +004_berkdb-5.0.patch
177 +007_no-undefined-ext.patch
178 +015-as-dir.patch