Gentoo Archives: gentoo-commits

From: Alex Legler <a3li@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/ruby-scripts:master commit in: patchsets/distfiles/, patchsets/patches-1.9.2_p290/
Date: Tue, 30 Aug 2011 19:07:18
Message-Id: 70339f559fe42d543cc6b4d6a44e967c8cc97b40.a3li@gentoo
1 commit: 70339f559fe42d543cc6b4d6a44e967c8cc97b40
2 Author: Alex Legler <alex <AT> a3li <DOT> li>
3 AuthorDate: Tue Aug 30 19:06:21 2011 +0000
4 Commit: Alex Legler <a3li <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 30 19:06:21 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ruby-scripts.git;a=commit;h=70339f55
7
8 Add 1.9.2_p290 patchset
9
10 ---
11 .../distfiles/ruby-patches-1.9.2_p290.tar.bz2 | Bin 0 -> 2246 bytes
12 patchsets/patches-1.9.2_p290/004_gfbsd7.patch | 39 +++++++++++++++++++
13 .../patches-1.9.2_p290/005_no-undefined-ext.patch | 13 ++++++
14 patchsets/patches-1.9.2_p290/007_berkdb-5.0.patch | 31 +++++++++++++++
15 patchsets/patches-1.9.2_p290/009_no-gems.patch | 41 ++++++++++++++++++++
16 patchsets/patches-1.9.2_p290/series | 6 +++
17 6 files changed, 130 insertions(+), 0 deletions(-)
18
19 diff --git a/patchsets/distfiles/ruby-patches-1.9.2_p290.tar.bz2 b/patchsets/distfiles/ruby-patches-1.9.2_p290.tar.bz2
20 new file mode 100644
21 index 0000000..c205467
22 Binary files /dev/null and b/patchsets/distfiles/ruby-patches-1.9.2_p290.tar.bz2 differ
23
24 diff --git a/patchsets/patches-1.9.2_p290/004_gfbsd7.patch b/patchsets/patches-1.9.2_p290/004_gfbsd7.patch
25 new file mode 100644
26 index 0000000..d5c2fea
27 --- /dev/null
28 +++ b/patchsets/patches-1.9.2_p290/004_gfbsd7.patch
29 @@ -0,0 +1,39 @@
30 +Index: ruby-1.9.2-rc2/configure.in
31 +===================================================================
32 +--- ruby-1.9.2-rc2.orig/configure.in
33 ++++ ruby-1.9.2-rc2/configure.in
34 +@@ -1683,7 +1683,7 @@ if test "$rb_cv_binary_elf" = yes; then
35 + fi
36 +
37 + AS_CASE(["$target_os"],
38 +-[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu], [
39 ++[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | freebsd* | dragonfly*], [
40 + if test "$rb_cv_binary_elf" = no; then
41 + with_dln_a_out=yes
42 + else
43 +@@ -1772,7 +1772,7 @@ if test "$with_dln_a_out" != yes; then
44 + [bsdi3*], [ AS_CASE(["$CC"],
45 + [*shlicc*], [ : ${LDSHARED='$(CC) -r'}
46 + rb_cv_dlopen=yes])],
47 +- [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [
48 ++ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | freebsd7*], [
49 + : ${LDSHARED='$(CC) -shared'}
50 + if test "$rb_cv_binary_elf" = yes; then
51 + LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
52 +@@ -1785,7 +1785,6 @@ if test "$with_dln_a_out" != yes; then
53 + [freebsd*|dragonfly*], [
54 + : ${LDSHARED='$(CC) -shared'}
55 + if test "$rb_cv_binary_elf" = yes; then
56 +- LDFLAGS="$LDFLAGS -rdynamic"
57 + DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
58 + else
59 + test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
60 +@@ -2066,7 +2065,7 @@ if test "$enable_shared" = 'yes'; then
61 + [sunos4*], [
62 + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
63 + ],
64 +- [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu], [
65 ++ [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | freebsd7*], [
66 + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
67 + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
68 + ],
69
70 diff --git a/patchsets/patches-1.9.2_p290/005_no-undefined-ext.patch b/patchsets/patches-1.9.2_p290/005_no-undefined-ext.patch
71 new file mode 100644
72 index 0000000..1a4ca31
73 --- /dev/null
74 +++ b/patchsets/patches-1.9.2_p290/005_no-undefined-ext.patch
75 @@ -0,0 +1,13 @@
76 +Index: ruby-1.9.2-rc2/configure.in
77 +===================================================================
78 +--- ruby-1.9.2-rc2.orig/configure.in
79 ++++ ruby-1.9.2-rc2/configure.in
80 +@@ -1775,7 +1775,7 @@ if test "$with_dln_a_out" != yes; then
81 + [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | freebsd7*], [
82 + : ${LDSHARED='$(CC) -shared'}
83 + if test "$rb_cv_binary_elf" = yes; then
84 +- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
85 ++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined"
86 + fi
87 + rb_cv_dlopen=yes],
88 + [interix*], [ : ${LDSHARED='$(CC) -shared'}
89
90 diff --git a/patchsets/patches-1.9.2_p290/007_berkdb-5.0.patch b/patchsets/patches-1.9.2_p290/007_berkdb-5.0.patch
91 new file mode 100644
92 index 0000000..bc32020
93 --- /dev/null
94 +++ b/patchsets/patches-1.9.2_p290/007_berkdb-5.0.patch
95 @@ -0,0 +1,31 @@
96 +Index: ruby-1.9.2-rc2/ext/dbm/extconf.rb
97 +===================================================================
98 +--- ruby-1.9.2-rc2.orig/ext/dbm/extconf.rb
99 ++++ ruby-1.9.2-rc2/ext/dbm/extconf.rb
100 +@@ -21,12 +21,12 @@ headers = {
101 + def headers.db_check(db)
102 + db_prefix = nil
103 + have_gdbm = false
104 +- hsearch = nil
105 ++ db_defs = nil
106 +
107 + case db
108 + when /^db2?$/
109 + db_prefix = "__db_n"
110 +- hsearch = "-DDB_DBM_HSEARCH "
111 ++ db_defs = %w[-DDB_DBM_HSEARCH -DHAVE_DBM]
112 + when "gdbm"
113 + have_gdbm = true
114 + when "gdbm_compat"
115 +@@ -36,9 +36,9 @@ def headers.db_check(db)
116 + db_prefix ||= ""
117 +
118 + if (have_library(db, db_prefix+"dbm_open") || have_func(db_prefix+"dbm_open")) and
119 +- hdr = self.fetch(db, ["ndbm.h"]).find {|h| have_type("DBM", h, hsearch)}
120 ++ hdr = self.fetch(db, ["ndbm.h"]).find {|h| have_type("DBM", h, db_defs.join(" "))}
121 + have_func(db_prefix+"dbm_clearerr") unless have_gdbm
122 +- $defs << hsearch if hsearch
123 ++ $defs += db_defs if db_defs
124 + $defs << '-DDBM_HDR="<'+hdr+'>"'
125 + true
126 + else
127
128 diff --git a/patchsets/patches-1.9.2_p290/009_no-gems.patch b/patchsets/patches-1.9.2_p290/009_no-gems.patch
129 new file mode 100644
130 index 0000000..82b7f7e
131 --- /dev/null
132 +++ b/patchsets/patches-1.9.2_p290/009_no-gems.patch
133 @@ -0,0 +1,41 @@
134 +diff -Naur ruby-1.9.2-p290.orig/tool/rbinstall.rb ruby-1.9.2-p290/tool/rbinstall.rb
135 +--- ruby-1.9.2-p290.orig/tool/rbinstall.rb 2011-01-16 14:18:57.000000000 +0100
136 ++++ ruby-1.9.2-p290/tool/rbinstall.rb 2011-08-29 11:20:23.365904481 +0200
137 +@@ -492,36 +492,7 @@
138 + end
139 +
140 + install?(:ext, :comm, :gem) do
141 +- directories = []
142 +- IO.foreach(File.join(srcdir, "lib/rubygems.rb")) do |line|
143 +- if /^\s*DIRECTORIES\s*=\s*%w\[(.*?)\]/ =~ line
144 +- directories = $1.split
145 +- break
146 +- end
147 +- end
148 +- gpath = CONFIG["sitelibdir"].sub(%r'/site_ruby/(?=[^/]+)', '/gems/')
149 +- prepare "default gems", gpath, directories
150 +-
151 +- destdir = File.join(gpath, directories.grep(/^spec/)[0])
152 +- default_gems = [
153 +- ['rake', 'rake.rb'],
154 +- ['rdoc', 'rdoc.rb'],
155 +- ['minitest', 'minitest/unit.rb'],
156 +- ]
157 +- default_gems.each do |name, src|
158 +- src = File.join(srcdir, "lib", src)
159 +- version = open(src) {|f| f.find {|s| /^\s*\w*VERSION\s*=(?!=)/ =~ s}} or next
160 +- version = version.split(%r"=\s*", 2)[1].strip[/\A([\'\"])(.*?)\1/, 2]
161 +- puts "#{" "*30}#{name} #{version}"
162 +- gemspec = <<-GEMSPEC
163 +-Gem::Specification.new do |s|
164 +- s.name = #{name.dump}
165 +- s.version = #{version.dump}
166 +- s.summary = "This #{name} is bundled with Ruby"
167 +-end
168 +- GEMSPEC
169 +- open_for_install(File.join(destdir, "#{name}-#{version}.gemspec"), $data_mode) { gemspec }
170 +- end
171 ++ # gems are unbundled
172 + end
173 +
174 + parse_args()
175
176 diff --git a/patchsets/patches-1.9.2_p290/series b/patchsets/patches-1.9.2_p290/series
177 new file mode 100644
178 index 0000000..7cb11b8
179 --- /dev/null
180 +++ b/patchsets/patches-1.9.2_p290/series
181 @@ -0,0 +1,6 @@
182 +004_gfbsd7.patch
183 +005_no-undefined-ext.patch
184 +006_no-rake.patch
185 +007_berkdb-5.0.patch
186 +008_CVE-2010-0541.patch
187 +009_no-gems.patch