Browse Source

ruby: Patches for shebangs on installed gems

android-5
Fredrik Fornwall 8 years ago
parent
commit
be9907f772
  1. 1
      packages/ruby/build.sh
  2. 14
      packages/ruby/lib-rubygems-defaults.rb.patch
  3. 12
      packages/ruby/lib-rubygems-install_update_options.rb.patch
  4. 12
      packages/ruby/lib-rubygems-installer.rb.patch

1
packages/ruby/build.sh

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.ruby-lang.org/
TERMUX_PKG_DESCRIPTION="Dynamic programming language with a focus on simplicity and productivity"
_MAJOR_VERSION=2.4
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://cache.ruby-lang.org/pub/ruby/${_MAJOR_VERSION}/ruby-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=3a87fef45cba48b9322236be60c455c13fd4220184ce7287600361319bb63690
# libbffi is used by the fiddle extension module:

14
packages/ruby/lib-rubygems-defaults.rb.patch

@ -0,0 +1,14 @@
diff -u -r ../ruby-2.4.0/lib/rubygems/defaults.rb ./lib/rubygems/defaults.rb
--- ../ruby-2.4.0/lib/rubygems/defaults.rb 2016-06-24 06:13:11.000000000 +0200
+++ ./lib/rubygems/defaults.rb 2017-01-31 22:53:59.125074751 +0100
@@ -191,6 +191,9 @@
# end
def self.platform_defaults
- {}
+ {
+ 'install' => '--no-rdoc --no-ri --env-shebang',
+ 'update' => '--no-rdoc --no-ri --env-shebang'
+ }
end
end

12
packages/ruby/lib-rubygems-install_update_options.rb.patch

@ -0,0 +1,12 @@
diff -u -r ../ruby-2.4.0/lib/rubygems/install_update_options.rb ./lib/rubygems/install_update_options.rb
--- ../ruby-2.4.0/lib/rubygems/install_update_options.rb 2016-04-06 08:01:14.000000000 +0200
+++ ./lib/rubygems/install_update_options.rb 2017-01-31 22:48:03.877466602 +0100
@@ -232,7 +232,7 @@
# Default options for the gem install command.
def install_update_defaults_str
- '--document=rdoc,ri --wrappers'
+ '--document=rdoc,ri --wrappers,--env-shebang'
end
end

12
packages/ruby/lib-rubygems-installer.rb.patch

@ -0,0 +1,12 @@
diff -u -r ../ruby-2.4.0/lib/rubygems/installer.rb ./lib/rubygems/installer.rb
--- ../ruby-2.4.0/lib/rubygems/installer.rb 2016-09-28 03:16:43.000000000 +0200
+++ ./lib/rubygems/installer.rb 2017-01-31 22:49:11.992624578 +0100
@@ -31,7 +31,7 @@
# Paths where env(1) might live. Some systems are broken and have it in
# /bin
- ENV_PATHS = %w[/usr/bin/env /bin/env]
+ ENV_PATHS = %w[@TERMUX_PREFIX@/bin/env /usr/bin/env]
##
# Deprecated in favor of Gem::Ext::BuildError
Loading…
Cancel
Save