Use MAKE or make from ENV to override rbconfig's make.

Backported from 2.1: f2bad74dda

ok landry@, jeremy@ (maintainer)
This commit is contained in:
dcoppa 2014-11-07 15:18:56 +00:00
parent a3367cbdfe
commit 822c603545
4 changed files with 36 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.47 2014/11/01 04:56:09 jeremy Exp $
# $OpenBSD: Makefile,v 1.48 2014/11/07 15:18:56 dcoppa Exp $
BROKEN-alpha = miniruby abort trap when generating rdoc
@ -19,6 +19,8 @@ PKGNAME-dbm = ruby-dbm-${VERSION}.${PATCHLEVEL}
PKGNAME-tk = ruby-tk-${VERSION}.${PATCHLEVEL}
PKGNAME-ri_docs = ruby-ri_docs-${VERSION}.${PATCHLEVEL}
REVISION-main = 0
PKG_ARCH-ri_docs = *
WANTLIB-ri_docs = # empty

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-lib_rubygems_ext_builder_rb,v 1.2 2012/10/24 22:49:05 jeremy Exp $
$OpenBSD: patch-lib_rubygems_ext_builder_rb,v 1.3 2014/11/07 15:18:56 dcoppa Exp $
Ugly hack to make --user-install option work. Without this, when
a user uses gem install --user-install, it calls
@ -8,9 +8,12 @@ This removes the -o root -g bin, so it can succeed as a regular user.
Gem::Installer.path_warning is only set if --user-install is used,
according to a grep of the sources.
--- lib/rubygems/ext/builder.rb.orig Wed Oct 6 10:27:31 2010
+++ lib/rubygems/ext/builder.rb Wed Oct 6 10:28:16 2010
@@ -19,6 +19,7 @@ class Gem::Ext::Builder
Use MAKE or make from ENV over rbconfig's make.
https://github.com/rubygems/rubygems/commit/f2bad74dda8d8e463a092905f29c943c962d5e68
--- lib/rubygems/ext/builder.rb.orig Wed Jul 27 04:04:03 2011
+++ lib/rubygems/ext/builder.rb Fri Nov 7 12:35:55 2014
@@ -19,12 +19,13 @@ class Gem::Ext::Builder
mf = File.read('Makefile')
mf = mf.gsub(/^RUBYARCHDIR\s*=\s*\$[^$]*/, "RUBYARCHDIR = #{dest_path}")
mf = mf.gsub(/^RUBYLIBDIR\s*=\s*\$[^$]*/, "RUBYLIBDIR = #{dest_path}")
@ -18,3 +21,10 @@ according to a grep of the sources.
File.open('Makefile', 'wb') {|f| f.print mf}
# try to find make program from Ruby configure arguments first
RbConfig::CONFIG['configure_args'] =~ /with-make-prog\=(\w+)/
- make_program = $1 || ENV['make']
+ make_program = ENV['MAKE'] || ENV['make'] || $1
unless make_program then
make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make'
end

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.16 2014/11/01 04:54:43 jeremy Exp $
# $OpenBSD: Makefile,v 1.17 2014/11/07 15:18:56 dcoppa Exp $
COMMENT-main = object oriented script language with threads
COMMENT-gdbm = gdbm interface for ruby
@ -16,6 +16,8 @@ PKGNAME-gdbm = ruby20-gdbm-${VERSION}.${PATCHLEVEL}
PKGNAME-tk = ruby20-tk-${VERSION}.${PATCHLEVEL}
PKGNAME-ri_docs = ruby20-ri_docs-${VERSION}.${PATCHLEVEL}
REVISION-main = 0
PKG_ARCH-ri_docs = *
WANTLIB-ri_docs = # empty

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-lib_rubygems_ext_builder_rb,v 1.3 2014/11/07 15:18:56 dcoppa Exp $
Use MAKE or make from ENV over rbconfig's make.
https://github.com/rubygems/rubygems/commit/f2bad74dda8d8e463a092905f29c943c962d5e68
--- lib/rubygems/ext/builder.rb.orig Fri Nov 7 12:39:45 2014
+++ lib/rubygems/ext/builder.rb Fri Nov 7 12:39:55 2014
@@ -18,7 +18,7 @@ class Gem::Ext::Builder
# try to find make program from Ruby configure arguments first
RbConfig::CONFIG['configure_args'] =~ /with-make-prog\=(\w+)/
- make_program = $1 || ENV['MAKE'] || ENV['make']
+ make_program = ENV['MAKE'] || ENV['make'] || $1
unless make_program then
make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make'
end