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-2.0.0_p353-r2/
Date: Sun, 23 Feb 2014 10:22:07
Message-Id: 1393150874.5168cddaddcfe4a789576e7ac82509ae1225a2a5.graaff@gentoo
1 commit: 5168cddaddcfe4a789576e7ac82509ae1225a2a5
2 Author: Hans de Graaff <hans <AT> degraaff <DOT> org>
3 AuthorDate: Sun Feb 23 10:21:14 2014 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 23 10:21:14 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ruby-scripts.git;a=commit;h=5168cdda
7
8 Add patchset for ruby 2.0.0_p353-r2
9
10 This now includes uclibc patches as reported in
11 https://bugs.gentoo.org/show_bug.cgi?id=484534
12
13 ---
14 patchsets/patches-2.0.0_p353-r2/004_gfbsd7.patch | 37 +++++++++++++
15 .../005_no-undefined-ext.patch | 11 ++++
16 patchsets/patches-2.0.0_p353-r2/009_no-gems.patch | 63 ++++++++++++++++++++++
17 patchsets/patches-2.0.0_p353-r2/010_uclibc.patch | 45 ++++++++++++++++
18 4 files changed, 156 insertions(+)
19
20 diff --git a/patchsets/patches-2.0.0_p353-r2/004_gfbsd7.patch b/patchsets/patches-2.0.0_p353-r2/004_gfbsd7.patch
21 new file mode 100644
22 index 0000000..ed8f8a3
23 --- /dev/null
24 +++ b/patchsets/patches-2.0.0_p353-r2/004_gfbsd7.patch
25 @@ -0,0 +1,37 @@
26 +--- configure.in.orig 2013-05-05 19:36:02.800254192 +0200
27 ++++ configure.in 2013-05-05 19:37:56.573346196 +0200
28 +@@ -2156,7 +2156,7 @@
29 + fi
30 +
31 + AS_CASE(["$target_os"],
32 +-[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | nacl], [
33 ++[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | nacl | freebsd* | dragonfly*], [
34 + if test "$rb_cv_binary_elf" = no; then
35 + with_dln_a_out=yes
36 + else
37 +@@ -2249,7 +2249,7 @@
38 + [bsdi3*], [ AS_CASE(["$CC"],
39 + [*shlicc*], [ : ${LDSHARED='$(CC) -r'}
40 + rb_cv_dlopen=yes])],
41 +- [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [
42 ++ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | freebsd7*], [
43 + : ${LDSHARED='$(CC) -shared'}
44 + if test "$rb_cv_binary_elf" = yes; then
45 + LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
46 +@@ -2262,7 +2262,6 @@
47 + [freebsd*|dragonfly*], [
48 + : ${LDSHARED='$(CC) -shared'}
49 + if test "$rb_cv_binary_elf" = yes; then
50 +- LDFLAGS="$LDFLAGS -rdynamic"
51 + DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
52 + else
53 + test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable'
54 +@@ -2638,7 +2637,7 @@
55 + [sunos4*], [
56 + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
57 + ],
58 +- [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu], [
59 ++ [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | freebsd7*], [
60 + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR"
61 + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
62 + if test "$load_relative" = yes; then
63
64 diff --git a/patchsets/patches-2.0.0_p353-r2/005_no-undefined-ext.patch b/patchsets/patches-2.0.0_p353-r2/005_no-undefined-ext.patch
65 new file mode 100644
66 index 0000000..f279932
67 --- /dev/null
68 +++ b/patchsets/patches-2.0.0_p353-r2/005_no-undefined-ext.patch
69 @@ -0,0 +1,11 @@
70 +--- ruby-1.9.3-preview1.orig/configure.in
71 ++++ ruby-1.9.3-preview1/configure.in
72 +@@ -2038,7 +2038,7 @@ if test "$with_dln_a_out" != yes; then
73 + [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [
74 + : ${LDSHARED='$(CC) -shared'}
75 + if test "$rb_cv_binary_elf" = yes; then
76 +- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
77 ++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined"
78 + fi
79 + rb_cv_dlopen=yes],
80 + [interix*], [ : ${LDSHARED='$(CC) -shared'}
81
82 diff --git a/patchsets/patches-2.0.0_p353-r2/009_no-gems.patch b/patchsets/patches-2.0.0_p353-r2/009_no-gems.patch
83 new file mode 100644
84 index 0000000..a9271af
85 --- /dev/null
86 +++ b/patchsets/patches-2.0.0_p353-r2/009_no-gems.patch
87 @@ -0,0 +1,63 @@
88 +--- tool/rbinstall.rb.orig 2013-05-05 19:40:15.417797767 +0200
89 ++++ tool/rbinstall.rb 2013-05-05 19:41:08.064452389 +0200
90 +@@ -685,59 +685,7 @@
91 + # :startdoc:
92 +
93 + install?(:ext, :comm, :gem) do
94 +- $:.unshift(File.join(srcdir, "lib"))
95 +- require("rubygems.rb")
96 +- gem_dir = Gem.default_dir
97 +- # Gem.ensure_gem_subdirectories makes subdirectories group-writable.
98 +- directories = Gem::REPOSITORY_SUBDIRECTORIES
99 +- prepare "default gems", gem_dir, directories
100 +-
101 +- spec_dir = File.join(gem_dir, directories.grep(/^spec/)[0])
102 +- default_spec_dir = "#{spec_dir}/default"
103 +- makedirs(default_spec_dir)
104 +-
105 +- gems = {}
106 +- File.foreach(File.join(srcdir, "defs/default_gems")) do |line|
107 +- line.chomp!
108 +- line.sub!(/\s*#.*/, '')
109 +- next if line.empty?
110 +- words = []
111 +- line.scan(/\G\s*([^\[\]\s]+|\[([^\[\]]*)\])/) do
112 +- words << ($2 ? $2.split : $1)
113 +- end
114 +- name, base_dir, src, execs = *words
115 +- next unless name and base_dir and src
116 +-
117 +- src = File.join(srcdir, src)
118 +- base_dir = File.join(srcdir, base_dir)
119 +- specgen = RbInstall::Specs::Generator.new(name, base_dir, src, execs || [])
120 +- gems[name] ||= specgen
121 +- end
122 +-
123 +- Dir.glob(srcdir+"/{lib,ext}/**/*.gemspec").each do |src|
124 +- specgen = RbInstall::Specs::Reader.new(src)
125 +- gems[specgen.gemspec.name] ||= specgen
126 +- end
127 +-
128 +- gems.sort.each do |name, specgen|
129 +- gemspec = specgen.gemspec
130 +- base_dir = specgen.src.sub(/\A#{Regexp.escape(srcdir)}\//, "")
131 +- full_name = "#{gemspec.name}-#{gemspec.version}"
132 +-
133 +- puts "#{" "*30}#{gemspec.name} #{gemspec.version}"
134 +- gemspec_path = File.join(default_spec_dir, "#{full_name}.gemspec")
135 +- open_for_install(gemspec_path, $data_mode) do
136 +- specgen.spec_source
137 +- end
138 +-
139 +- unless gemspec.executables.empty? then
140 +- bin_dir = File.join(gem_dir, 'gems', full_name, 'bin')
141 +- makedirs(bin_dir)
142 +-
143 +- execs = gemspec.executables.map {|exec| File.join(srcdir, 'bin', exec)}
144 +- install(execs, bin_dir, :mode => $prog_mode)
145 +- end
146 +- end
147 ++# gems are unbundled
148 + end
149 +
150 + parse_args()
151
152 diff --git a/patchsets/patches-2.0.0_p353-r2/010_uclibc.patch b/patchsets/patches-2.0.0_p353-r2/010_uclibc.patch
153 new file mode 100644
154 index 0000000..c2cf6ee
155 --- /dev/null
156 +++ b/patchsets/patches-2.0.0_p353-r2/010_uclibc.patch
157 @@ -0,0 +1,45 @@
158 +diff -urp ruby-2.0.0-p353/missing/isinf.c ruby-2.0.0-p353-uclibc/missing/isinf.c
159 +--- ruby-2.0.0-p353/missing/isinf.c 2011-05-15 07:55:52.000000000 -0400
160 ++++ ruby-2.0.0-p353-uclibc/missing/isinf.c 2014-02-01 09:19:31.000000000 -0500
161 +@@ -52,6 +52,7 @@ static double zero(void) { return 0.0; }
162 + static double one (void) { return 1.0; }
163 + static double inf (void) { return one() / zero(); }
164 +
165 ++#ifndef isinf
166 + int
167 + isinf(double n)
168 + {
169 +@@ -67,3 +68,4 @@ isinf(double n)
170 + }
171 + #endif
172 + #endif
173 ++#endif
174 +diff -urp ruby-2.0.0-p353/missing/isnan.c ruby-2.0.0-p353-uclibc/missing/isnan.c
175 +--- ruby-2.0.0-p353/missing/isnan.c 2010-07-28 04:12:01.000000000 -0400
176 ++++ ruby-2.0.0-p353-uclibc/missing/isnan.c 2014-01-31 22:12:44.000000000 -0500
177 +@@ -2,6 +2,20 @@
178 +
179 + #include "ruby/missing.h"
180 +
181 ++/*
182 ++ * isnan() may be a macro, a function or both.
183 ++ * (The C99 standard defines that isnan() is a macro, though.)
184 ++ * http://www.gnu.org/software/automake/manual/autoconf/Function-Portability.html
185 ++ *
186 ++ * macro only: uClibc
187 ++ * both: GNU libc
188 ++ *
189 ++ * This file is compile if no isnan() function is available.
190 ++ * (autoconf AC_REPLACE_FUNCS detects only the function.)
191 ++ * The macro is detected by following #ifndef.
192 ++ */
193 ++
194 ++#ifndef isnan
195 + static int double_ne(double n1, double n2);
196 +
197 + int
198 +@@ -15,3 +29,4 @@ double_ne(double n1, double n2)
199 + {
200 + return n1 != n2;
201 + }
202 ++#endif