Update to rake-compiler 1.2.0
Remove use of SUBST_CMD, no longer needed. Remove test code, as tests now have dependencies not in ports. Remove cross compiling support as mingw was removed last year. Add patch to remove chown/chgrp use when not running as root, similar to how Ruby is patched.
This commit is contained in:
parent
962973c019
commit
bfb46444bd
|
@ -1,10 +1,9 @@
|
|||
COMMENT = build and package Ruby extensions using Rake as glue
|
||||
|
||||
DISTNAME = rake-compiler-0.7.9
|
||||
REVISION = 6
|
||||
DISTNAME = rake-compiler-1.2.0
|
||||
CATEGORIES = devel
|
||||
|
||||
HOMEPAGE = https://github.com/luislavena/rake-compiler
|
||||
HOMEPAGE = https://github.com/rake-compiler/rake-compiler
|
||||
|
||||
MAINTAINER = Jeremy Evans <jeremy@openbsd.org>
|
||||
|
||||
|
@ -15,14 +14,4 @@ MODULES = lang/ruby
|
|||
|
||||
CONFIGURE_STYLE = ruby gem
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} -DMAKE_PROGRAM=${MAKE_PROGRAM} \
|
||||
${WRKSRC}/lib/rake/extensiontask.rb \
|
||||
${WRKSRC}/tasks/bin/cross-ruby.rake
|
||||
rm ${WRKSRC}/lib/rake/extensiontask.rb.beforesubst \
|
||||
${WRKSRC}/tasks/bin/cross-ruby.rake.beforesubst
|
||||
|
||||
TEST_DEPENDS = devel/ruby-isolate,${MODRUBY_FLAVOR}
|
||||
MODRUBY_TEST = rake rspec
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SHA256 (rake-compiler-0.7.9.gem) = iEhKAhaDiF6mUqeUKaC8hw4gWGvdAGo43IzYLsckpqw=
|
||||
SIZE (rake-compiler-0.7.9.gem) = 31232
|
||||
SHA256 (rake-compiler-1.2.0.gem) = 4CvPVtLz2Ay4eLdgJo6PE9yOQlHJ+6CA3td5sWeub/U=
|
||||
SIZE (rake-compiler-1.2.0.gem) = 38912
|
||||
|
|
|
@ -1,27 +1,43 @@
|
|||
Include the mingw directory in the PATH if cross compiling.
|
||||
Do not try to chown/chgrp when installing unless running
|
||||
as root. This is done for the same reasons as the patch for
|
||||
lib/rubygems/ext/ext_conf_builder.rb in the Ruby port.
|
||||
|
||||
Don't have it accidently use gmake, because the makefiles
|
||||
created can use BSD make extensions.
|
||||
|
||||
--- lib/rake/extensiontask.rb.orig Wed Dec 31 16:00:00 1969
|
||||
+++ lib/rake/extensiontask.rb Wed Nov 30 04:25:41 2011
|
||||
@@ -70,6 +70,8 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/nativ
|
||||
# only define cross platform functionality when enabled
|
||||
return unless @cross_compile
|
||||
|
||||
+ ENV['PATH'] = "${LOCALBASE}/mingw32/bin:#{ENV['PATH']}"
|
||||
+
|
||||
if cross_platform.is_a?(Array) then
|
||||
cross_platform.each { |platf| define_cross_platform_tasks(platf) }
|
||||
else
|
||||
@@ -359,9 +361,7 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/nativ
|
||||
if RUBY_PLATFORM =~ /mswin/ then
|
||||
'nmake'
|
||||
else
|
||||
- ENV['MAKE'] || %w[gmake make].find { |c|
|
||||
- system("#{c} -v >> #{dev_null} 2>&1")
|
||||
- }
|
||||
+ ENV['MAKE'] || 'make'
|
||||
end
|
||||
Index: lib/rake/extensiontask.rb
|
||||
--- lib/rake/extensiontask.rb.orig
|
||||
+++ lib/rake/extensiontask.rb
|
||||
@@ -157,7 +157,9 @@ module Rake
|
||||
task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_path, tmp_binary_path, "#{tmp_path}/Makefile"] do
|
||||
# install in lib for native platform only
|
||||
unless for_platform
|
||||
- sh "#{make} install target_prefix=", chdir: tmp_path
|
||||
+ command = "#{make} install target_prefix="
|
||||
+ command += " INSTALL_PROG='/usr/bin/install -c -m 0755'" unless Process.uid == 0
|
||||
+ sh command, chdir: tmp_path
|
||||
end
|
||||
end
|
||||
@make
|
||||
# copy binary from temporary location to staging directory
|
||||
@@ -502,20 +504,7 @@ Java extension should be preferred.
|
||||
end
|
||||
|
||||
def make
|
||||
- unless @make
|
||||
- @make =
|
||||
- if RUBY_PLATFORM =~ /mswin/ then
|
||||
- 'nmake'
|
||||
- else
|
||||
- ENV['MAKE'] || find_make
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- unless @make
|
||||
- raise "Couldn't find a suitable `make` tool. Use `MAKE` env to set an alternative."
|
||||
- end
|
||||
-
|
||||
- @make
|
||||
+ @make ||= ENV['MAKE'] || 'make'
|
||||
end
|
||||
|
||||
def find_make
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
Include the mingw directory in the PATH as this file is only used
|
||||
for cross-compilation.
|
||||
|
||||
Add the j flag to tar as all downloaded files are .tar.bz2.
|
||||
|
||||
--- tasks/bin/cross-ruby.rake.orig Wed Dec 31 16:00:00 1969
|
||||
+++ tasks/bin/cross-ruby.rake Wed Nov 30 04:23:04 2011
|
||||
@@ -17,6 +17,8 @@
|
||||
# for cross-compilation.
|
||||
#
|
||||
|
||||
+ENV['PATH'] = "${LOCALBASE}/mingw32/bin:#{ENV['PATH']}"
|
||||
+
|
||||
require 'rake'
|
||||
require 'rake/clean'
|
||||
|
||||
@@ -84,7 +86,7 @@ end
|
||||
source_file = RUBY_SOURCE ? RUBY_SOURCE.split('/').last : "#{RUBY_CC_VERSION}.tar.bz2"
|
||||
file "#{USER_HOME}/sources/#{RUBY_CC_VERSION}" => ["#{USER_HOME}/sources/#{source_file}"] do |t|
|
||||
chdir File.dirname(t.name) do
|
||||
- t.prerequisites.each { |f| sh "tar xf #{File.basename(f)}" }
|
||||
+ t.prerequisites.each { |f| sh "tar jxf #{File.basename(f)}" }
|
||||
end
|
||||
end
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
${GEM_BIN}/rake-compiler${GEM_BIN_SUFFIX}
|
||||
${GEM_LIB}/cache/${DISTNAME}.gem
|
||||
${GEM_LIB}/gems/${DISTNAME}/
|
||||
${GEM_LIB}/gems/${DISTNAME}/History.txt
|
||||
${GEM_LIB}/gems/${DISTNAME}/Isolate
|
||||
${GEM_LIB}/gems/${DISTNAME}/Gemfile
|
||||
${GEM_LIB}/gems/${DISTNAME}/History.md
|
||||
${GEM_LIB}/gems/${DISTNAME}/LICENSE.txt
|
||||
${GEM_LIB}/gems/${DISTNAME}/README.rdoc
|
||||
${GEM_LIB}/gems/${DISTNAME}/README.md
|
||||
${GEM_LIB}/gems/${DISTNAME}/Rakefile
|
||||
${GEM_LIB}/gems/${DISTNAME}/appveyor.yml
|
||||
${GEM_LIB}/gems/${DISTNAME}/bin/
|
||||
${GEM_LIB}/gems/${DISTNAME}/bin/rake-compiler
|
||||
${GEM_LIB}/gems/${DISTNAME}/cucumber.yml
|
||||
|
@ -52,7 +53,5 @@ ${GEM_LIB}/gems/${DISTNAME}/tasks/bootstrap.rake
|
|||
${GEM_LIB}/gems/${DISTNAME}/tasks/common.rake
|
||||
${GEM_LIB}/gems/${DISTNAME}/tasks/cucumber.rake
|
||||
${GEM_LIB}/gems/${DISTNAME}/tasks/gem.rake
|
||||
${GEM_LIB}/gems/${DISTNAME}/tasks/news.rake
|
||||
${GEM_LIB}/gems/${DISTNAME}/tasks/release.rake
|
||||
${GEM_LIB}/gems/${DISTNAME}/tasks/rspec.rake
|
||||
${GEM_LIB}/specifications/${DISTNAME}.gemspec
|
||||
|
|
Loading…
Reference in New Issue