summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <a3li@gentoo.org>2010-08-24 18:35:57 +0200
committerAlex Legler <a3li@gentoo.org>2010-08-24 18:35:57 +0200
commit47d70eee28370726e80dc0f83bfb109fc262133a (patch)
treec4e02a4eddda597e4a870ad5fa9ed85eea31337d /patchsets/patches-1.8.7_p302
parentAdd 1.8.6-p399 patchset (diff)
downloadruby-scripts-47d70eee28370726e80dc0f83bfb109fc262133a.tar.gz
ruby-scripts-47d70eee28370726e80dc0f83bfb109fc262133a.tar.bz2
ruby-scripts-47d70eee28370726e80dc0f83bfb109fc262133a.zip
Add 1.8.7_p302 patchsetpatches-1.8.7_p302
Diffstat (limited to 'patchsets/patches-1.8.7_p302')
-rw-r--r--patchsets/patches-1.8.7_p302/001_memory_leak.patch59
-rw-r--r--patchsets/patches-1.8.7_p302/002_mkconfig.patch16
-rw-r--r--patchsets/patches-1.8.7_p302/003_mkmf-parallel-install.patch16
-rw-r--r--patchsets/patches-1.8.7_p302/004_berkdb-5.0.patch13
-rw-r--r--patchsets/patches-1.8.7_p302/007_no-undefined-ext.patch13
-rw-r--r--patchsets/patches-1.8.7_p302/series5
6 files changed, 122 insertions, 0 deletions
diff --git a/patchsets/patches-1.8.7_p302/001_memory_leak.patch b/patchsets/patches-1.8.7_p302/001_memory_leak.patch
new file mode 100644
index 0000000..98edae0
--- /dev/null
+++ b/patchsets/patches-1.8.7_p302/001_memory_leak.patch
@@ -0,0 +1,59 @@
+Index: ruby-1.8.7-p299/ext/dl/handle.c
+===================================================================
+--- ruby-1.8.7-p299.orig/ext/dl/handle.c
++++ ruby-1.8.7-p299/ext/dl/handle.c
+@@ -10,9 +10,12 @@ VALUE rb_cDLHandle;
+ void
+ dlhandle_free(struct dl_handle *dlhandle)
+ {
++ if (!dlhandle)
++ return;
+ if (dlhandle->ptr && dlhandle->open && dlhandle->enable_close) {
+ dlclose(dlhandle->ptr);
+ }
++ dlfree(dlhandle);
+ }
+
+ VALUE
+Index: ruby-1.8.7-p299/ext/dl/ptr.c
+===================================================================
+--- ruby-1.8.7-p299.orig/ext/dl/ptr.c
++++ ruby-1.8.7-p299/ext/dl/ptr.c
+@@ -45,6 +45,8 @@ rb_dlmem_aref(void *ptr)
+ void
+ dlptr_free(struct ptr_data *data)
+ {
++ if (!data)
++ return;
+ if (data->ptr) {
+ DEBUG_CODE({
+ printf("dlptr_free(): removing the pointer `0x%x' from the MemorySpace\n",
+@@ -61,6 +63,7 @@ dlptr_free(struct ptr_data *data)
+ if (data->stype) dlfree(data->stype);
+ if (data->ssize) dlfree(data->ssize);
+ if (data->ids) dlfree(data->ids);
++ dlfree(data);
+ }
+
+ void
+Index: ruby-1.8.7-p299/ext/dl/sym.c
+===================================================================
+--- ruby-1.8.7-p299.orig/ext/dl/sym.c
++++ ruby-1.8.7-p299/ext/dl/sym.c
+@@ -57,6 +57,8 @@ char2type(int ch)
+ void
+ dlsym_free(struct sym_data *data)
+ {
++ if(!data)
++ return;
+ if( data->name ){
+ DEBUG_CODE({
+ printf("dlsym_free(): free(data->name:%s)\n",data->name);
+@@ -69,6 +71,7 @@ dlsym_free(struct sym_data *data)
+ });
+ free(data->type);
+ }
++ dlfree(data);
+ }
+
+ VALUE
diff --git a/patchsets/patches-1.8.7_p302/002_mkconfig.patch b/patchsets/patches-1.8.7_p302/002_mkconfig.patch
new file mode 100644
index 0000000..52631e0
--- /dev/null
+++ b/patchsets/patches-1.8.7_p302/002_mkconfig.patch
@@ -0,0 +1,16 @@
+Fix for mkconfig to be able to handle empty continued lines.
+Patch from [ruby-core:20420] via bug 234877.
+
+Index: ruby-1.8.7-p299/mkconfig.rb
+===================================================================
+--- ruby-1.8.7-p299.orig/mkconfig.rb
++++ ruby-1.8.7-p299/mkconfig.rb
+@@ -55,7 +55,7 @@ File.foreach "config.status" do |line|
+ continued_name = name
+ next
+ end
+- when /^"(.+)"\s*(\\)?$/
++ when /^"(.*)"\s*(\\)?$/
+ if continued_line
+ continued_line << $1
+ unless $2
diff --git a/patchsets/patches-1.8.7_p302/003_mkmf-parallel-install.patch b/patchsets/patches-1.8.7_p302/003_mkmf-parallel-install.patch
new file mode 100644
index 0000000..9ecdc9b
--- /dev/null
+++ b/patchsets/patches-1.8.7_p302/003_mkmf-parallel-install.patch
@@ -0,0 +1,16 @@
+ Patch for bug 239101 by Matsuu Takuto, via Redmine issue 1337 (yes, really).
+ Backported for 1.8.* by Alex Legler.
+
+Index: ruby-1.8.7-p299/lib/mkmf.rb
+===================================================================
+--- ruby-1.8.7-p299.orig/lib/mkmf.rb
++++ ruby-1.8.7-p299/lib/mkmf.rb
+@@ -1523,7 +1523,7 @@ static: $(STATIC_LIB)#{$extout ? " inst
+ dest = "#{dir}/#{f}"
+ mfile.puts dir, "install-so: #{dest}"
+ unless $extout
+- mfile.print "#{dest}: #{f}\n"
++ mfile.print "#{dest}: #{dir} #{f}\n"
+ if (sep = config_string('BUILD_FILE_SEPARATOR'))
+ f.gsub!("/", sep)
+ dir.gsub!("/", sep)
diff --git a/patchsets/patches-1.8.7_p302/004_berkdb-5.0.patch b/patchsets/patches-1.8.7_p302/004_berkdb-5.0.patch
new file mode 100644
index 0000000..2516cd3
--- /dev/null
+++ b/patchsets/patches-1.8.7_p302/004_berkdb-5.0.patch
@@ -0,0 +1,13 @@
+Index: ruby-1.8.7-p299/ext/dbm/extconf.rb
+===================================================================
+--- ruby-1.8.7-p299.orig/ext/dbm/extconf.rb
++++ ruby-1.8.7-p299/ext/dbm/extconf.rb
+@@ -26,7 +26,7 @@ def headers.db_check(db)
+ case db
+ when /^db2?$/
+ db_prefix = "__db_n"
+- hsearch = "-DDB_DBM_HSEARCH "
++ hsearch = "-DDB_DBM_HSEARCH -DHAVE_DBM "
+ when "gdbm"
+ have_gdbm = true
+ when "gdbm_compat"
diff --git a/patchsets/patches-1.8.7_p302/007_no-undefined-ext.patch b/patchsets/patches-1.8.7_p302/007_no-undefined-ext.patch
new file mode 100644
index 0000000..41a7ddb
--- /dev/null
+++ b/patchsets/patches-1.8.7_p302/007_no-undefined-ext.patch
@@ -0,0 +1,13 @@
+Index: ruby-1.8.7-p299/configure.in
+===================================================================
+--- ruby-1.8.7-p299.orig/configure.in
++++ ruby-1.8.7-p299/configure.in
+@@ -1223,7 +1223,7 @@ if test "$with_dln_a_out" != yes; then
+ linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi*)
+ : ${LDSHARED='${CC} -shared'}
+ if test "$rb_cv_binary_elf" = yes; then
+- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined"
+ fi
+ rb_cv_dlopen=yes ;;
+ interix*) : ${LDSHARED="$CC -shared"}
diff --git a/patchsets/patches-1.8.7_p302/series b/patchsets/patches-1.8.7_p302/series
new file mode 100644
index 0000000..3456f19
--- /dev/null
+++ b/patchsets/patches-1.8.7_p302/series
@@ -0,0 +1,5 @@
+001_memory_leak.patch
+002_mkconfig.patch
+003_mkmf-parallel-install.patch
+004_berkdb-5.0.patch
+007_no-undefined-ext.patch