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.3.0/
Date: Sun, 27 Dec 2015 08:46:24
Message-Id: 1451205951.5db23d6448bf6a0db3fa0d2e532d58b802f05710.graaff@gentoo
1 commit: 5db23d6448bf6a0db3fa0d2e532d58b802f05710
2 Author: Hans de Graaff <hans <AT> degraaff <DOT> org>
3 AuthorDate: Sun Dec 27 08:45:51 2015 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 27 08:45:51 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/ruby-scripts.git/commit/?id=5db23d64
7
8 Patchset for ruby 2.3.0
9
10 patchsets/patches-2.3.0/004_gfbsd7.patch | 37 +++++++++
11 patchsets/patches-2.3.0/005_no-undefined-ext.patch | 11 +++
12 patchsets/patches-2.3.0/009_no-gems.patch | 90 ++++++++++++++++++++++
13 3 files changed, 138 insertions(+)
14
15 diff --git a/patchsets/patches-2.3.0/004_gfbsd7.patch b/patchsets/patches-2.3.0/004_gfbsd7.patch
16 new file mode 100644
17 index 0000000..fa561b6
18 --- /dev/null
19 +++ b/patchsets/patches-2.3.0/004_gfbsd7.patch
20 @@ -0,0 +1,37 @@
21 +--- configure.in.orig 2013-05-05 19:36:02.800254192 +0200
22 ++++ configure.in 2013-05-05 19:37:56.573346196 +0200
23 +@@ -2156,7 +2156,7 @@
24 + fi
25 +
26 + AS_CASE(["$target_os"],
27 +-[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | nacl], [
28 ++[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | nacl | freebsd* | dragonfly*], [
29 + if test "$rb_cv_binary_elf" = no; then
30 + with_dln_a_out=yes
31 + else
32 +@@ -2249,7 +2249,7 @@
33 + [bsdi3*], [ AS_CASE(["$CC"],
34 + [*shlicc*], [ : ${LDSHARED='$(CC) -r'}
35 + rb_cv_dlopen=yes])],
36 +- [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku*], [
37 ++ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku* | freebsd7*], [
38 + : ${LDSHARED='$(CC) -shared'}
39 + if test "$rb_cv_binary_elf" = yes; then
40 + LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
41 +@@ -2262,7 +2262,6 @@
42 + [freebsd*|dragonfly*], [
43 + : ${LDSHARED='$(CC) -shared'}
44 + if test "$rb_cv_binary_elf" = yes; then
45 +- LDFLAGS="$LDFLAGS -rdynamic"
46 + DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$@'
47 + else
48 + test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable'
49 +@@ -2638,7 +2637,7 @@
50 + [sunos4*], [
51 + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
52 + ],
53 +- [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | haiku*], [
54 ++ [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | haiku* | freebsd7*], [
55 + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR"
56 + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
57 + if test "$load_relative" = yes; then
58
59 diff --git a/patchsets/patches-2.3.0/005_no-undefined-ext.patch b/patchsets/patches-2.3.0/005_no-undefined-ext.patch
60 new file mode 100644
61 index 0000000..f279932
62 --- /dev/null
63 +++ b/patchsets/patches-2.3.0/005_no-undefined-ext.patch
64 @@ -0,0 +1,11 @@
65 +--- ruby-1.9.3-preview1.orig/configure.in
66 ++++ ruby-1.9.3-preview1/configure.in
67 +@@ -2038,7 +2038,7 @@ if test "$with_dln_a_out" != yes; then
68 + [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [
69 + : ${LDSHARED='$(CC) -shared'}
70 + if test "$rb_cv_binary_elf" = yes; then
71 +- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
72 ++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined"
73 + fi
74 + rb_cv_dlopen=yes],
75 + [interix*], [ : ${LDSHARED='$(CC) -shared'}
76
77 diff --git a/patchsets/patches-2.3.0/009_no-gems.patch b/patchsets/patches-2.3.0/009_no-gems.patch
78 new file mode 100644
79 index 0000000..d7400b0
80 --- /dev/null
81 +++ b/patchsets/patches-2.3.0/009_no-gems.patch
82 @@ -0,0 +1,90 @@
83 +--- tool/rbinstall.rb.~1~ 2015-11-16 07:33:17.000000000 +0100
84 ++++ tool/rbinstall.rb 2015-12-26 08:03:56.946795673 +0100
85 +@@ -696,85 +696,11 @@
86 + # :startdoc:
87 +
88 + install?(:ext, :comm, :gem) do
89 +- gem_dir = Gem.default_dir
90 +- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
91 +- prepare "default gems", gem_dir, directories
92 +-
93 +- spec_dir = File.join(gem_dir, directories.grep(/^spec/)[0])
94 +- default_spec_dir = "#{spec_dir}/default"
95 +- makedirs(default_spec_dir)
96 +-
97 +- gems = {}
98 +-
99 +- Dir.glob(srcdir+"/{lib,ext}/**/*.gemspec").each do |src|
100 +- specgen = RbInstall::Specs::Reader.new(src)
101 +- gems[specgen.gemspec.name] ||= specgen
102 +- end
103 +-
104 +- gems.sort.each do |name, specgen|
105 +- gemspec = specgen.gemspec
106 +- full_name = "#{gemspec.name}-#{gemspec.version}"
107 +-
108 +- puts "#{" "*30}#{gemspec.name} #{gemspec.version}"
109 +- gemspec_path = File.join(default_spec_dir, "#{full_name}.gemspec")
110 +- open_for_install(gemspec_path, $data_mode) do
111 +- specgen.spec_source
112 +- end
113 +-
114 +- unless gemspec.executables.empty? then
115 +- bin_dir = File.join(gem_dir, 'gems', full_name, 'bin')
116 +- makedirs(bin_dir)
117 +-
118 +- execs = gemspec.executables.map {|exec| File.join(srcdir, 'bin', exec)}
119 +- install(execs, bin_dir, :mode => $script_mode)
120 +- end
121 +- end
122 ++ # gems are unbundled in Gentoo.
123 + end
124 +
125 + install?(:ext, :comm, :gem) do
126 +- gem_dir = Gem.default_dir
127 +- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
128 +- prepare "bundle gems", gem_dir, directories
129 +- install_dir = with_destdir(gem_dir)
130 +- installed_gems = {}
131 +- options = {
132 +- :install_dir => install_dir,
133 +- :bin_dir => with_destdir(bindir),
134 +- :domain => :local,
135 +- :ignore_dependencies => true,
136 +- :dir_mode => $dir_mode,
137 +- :data_mode => $data_mode,
138 +- :prog_mode => $prog_mode,
139 +- :wrappers => true,
140 +- :format_executable => true,
141 +- }
142 +- Gem::Specification.each_spec([srcdir+'/gems/*']) do |spec|
143 +- ins = RbInstall::UnpackedInstaller.new(spec, options)
144 +- puts "#{" "*30}#{spec.name} #{spec.version}"
145 +- ins.install
146 +- File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec"))
147 +- installed_gems[spec.full_name] = true
148 +- end
149 +- installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| installed_gems.key?(File.basename(gem, '.gem'))}
150 +- unless installed_gems.empty?
151 +- install installed_gems, gem_dir+"/cache"
152 +- end
153 +- next if gems.empty?
154 +- if defined?(Zlib)
155 +- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name)))
156 +- gems.each do |gem|
157 +- Gem.install(gem, Gem::Requirement.default, options)
158 +- gemname = File.basename(gem)
159 +- puts "#{" "*30}#{gemname}"
160 +- end
161 +- # fix directory permissions
162 +- # TODO: Gem.install should accept :dir_mode option or something
163 +- File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
164 +- # fix .gemspec permissions
165 +- File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
166 +- else
167 +- puts "skip installing bundle gems because of lacking zlib"
168 +- end
169 ++ # gems are unbundled in Gentoo.
170 + end
171 +
172 + parse_args()