diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-05-19 15:14:09 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-08-16 02:06:54 +0200 |
commit | 248bccd60f78e84c7c6f2c9b2c9733ba19e3fc61 (patch) | |
tree | 7e0b5b7c0b1a1179ab117a724006c255a495a6a7 /main/protobuf/trim-rakefile.patch | |
parent | 9b268d50f7b4c460a3014eb5fd38e88635879894 (diff) | |
download | aports-248bccd60f78e84c7c6f2c9b2c9733ba19e3fc61.tar.bz2 aports-248bccd60f78e84c7c6f2c9b2c9733ba19e3fc61.tar.xz |
main/protobuf: add subpackage ruby-google-protobuf
Diffstat (limited to 'main/protobuf/trim-rakefile.patch')
-rw-r--r-- | main/protobuf/trim-rakefile.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/main/protobuf/trim-rakefile.patch b/main/protobuf/trim-rakefile.patch new file mode 100644 index 0000000000..f03bf92684 --- /dev/null +++ b/main/protobuf/trim-rakefile.patch @@ -0,0 +1,66 @@ +Remove code that we don't use to avoid installing additional dependencies. +--- a/ruby/Rakefile ++++ b/ruby/Rakefile +@@ -1,6 +1,4 @@ + require "rubygems" +-require "rubygems/package_task" +-require "rake/extensiontask" unless RUBY_PLATFORM == "java" + require "rake/testtask" + + spec = Gem::Specification.load("google-protobuf.gemspec") +@@ -39,45 +37,6 @@ + end + end + +-if RUBY_PLATFORM == "java" +- if `which mvn` == '' +- raise ArgumentError, "maven needs to be installed" +- end +- task :clean do +- system("mvn --batch-mode clean") +- end +- +- task :compile do +- system("mvn --batch-mode package") +- end +-else +- Rake::ExtensionTask.new("protobuf_c", spec) do |ext| +- ext.ext_dir = "ext/google/protobuf_c" +- ext.lib_dir = "lib/google" +- ext.cross_compile = true +- ext.cross_platform = [ +- 'x86-mingw32', 'x64-mingw32', +- 'x86_64-linux', 'x86-linux', +- 'universal-darwin' +- ] +- end +- +- task 'gem:windows' do +- require 'rake_compiler_dock' +- RakeCompilerDock.sh "bundle && IN_DOCKER=true rake cross native gem RUBY_CC_VERSION=2.4.0:2.3.0:2.2.2:2.1.5:2.0.0" +- end +- +- if RUBY_PLATFORM =~ /darwin/ +- task 'gem:native' do +- system "rake genproto" +- system "rake cross native gem RUBY_CC_VERSION=2.4.0:2.3.0:2.2.2:2.1.5:2.0.0" +- end +- else +- task 'gem:native' => [:genproto, 'gem:windows'] +- end +-end +- +- + # Proto for tests. + genproto_output << "tests/generated_code.rb" + genproto_output << "tests/test_import.rb" +@@ -93,9 +52,6 @@ + + task :clean do + sh "rm -f #{genproto_output.join(' ')}" +-end +- +-Gem::PackageTask.new(spec) do |pkg| + end + + Rake::TestTask.new(:test => :build) do |t| |