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.4/
Date: Thu, 30 Mar 2017 05:42:40
Message-Id: 1490852547.f33ff4ba8a36a9a446d4c9e64c72c963a977ede9.graaff@gentoo
1 commit: f33ff4ba8a36a9a446d4c9e64c72c963a977ede9
2 Author: Hans de Graaff <hans <AT> degraaff <DOT> org>
3 AuthorDate: Thu Mar 30 05:42:27 2017 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 30 05:42:27 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/ruby-scripts.git/commit/?id=f33ff4ba
7
8 add 2.3.4 patchset
9
10 patchsets/patches-2.3.4/004_gfbsd7.patch | 37 +++++++++
11 patchsets/patches-2.3.4/005_no-undefined-ext.patch | 11 +++
12 patchsets/patches-2.3.4/009_no-gems.patch | 95 ++++++++++++++++++++++
13 3 files changed, 143 insertions(+)
14
15 diff --git a/patchsets/patches-2.3.4/004_gfbsd7.patch b/patchsets/patches-2.3.4/004_gfbsd7.patch
16 new file mode 100644
17 index 0000000..fa561b6
18 --- /dev/null
19 +++ b/patchsets/patches-2.3.4/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.4/005_no-undefined-ext.patch b/patchsets/patches-2.3.4/005_no-undefined-ext.patch
60 new file mode 100644
61 index 0000000..f279932
62 --- /dev/null
63 +++ b/patchsets/patches-2.3.4/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.4/009_no-gems.patch b/patchsets/patches-2.3.4/009_no-gems.patch
78 new file mode 100644
79 index 0000000..2da6b7d
80 --- /dev/null
81 +++ b/patchsets/patches-2.3.4/009_no-gems.patch
82 @@ -0,0 +1,95 @@
83 +--- tool/rbinstall.rb.~1~ 2017-03-27 17:18:38.000000000 +0200
84 ++++ tool/rbinstall.rb 2017-03-30 07:38:53.437332083 +0200
85 +@@ -696,90 +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 +- begin
158 +- File.umask(022)
159 +- Gem.install(gem, Gem::Requirement.default, options)
160 +- ensure
161 +- File.umask(0222)
162 +- end
163 +- gemname = File.basename(gem)
164 +- puts "#{" "*30}#{gemname}"
165 +- end
166 +- # fix directory permissions
167 +- # TODO: Gem.install should accept :dir_mode option or something
168 +- File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
169 +- # fix .gemspec permissions
170 +- File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
171 +- else
172 +- puts "skip installing bundle gems because of lacking zlib"
173 +- end
174 ++ # gems are unbundled in Gentoo
175 + end
176 +
177 + parse_args()