summaryrefslogtreecommitdiff
path: root/user/protobuf/trim-rakefile.patch
diff options
context:
space:
mode:
authorDan Theisen <djt@hxx.in>2018-10-05 03:15:07 -0700
committerDan Theisen <djt@hxx.in>2018-10-05 03:15:07 -0700
commit2ba6865311296c8ed0aa7ffde55c12737ef0abf4 (patch)
tree4295cd53dc9d6267ecaed694ae2ca877cfd8e76f /user/protobuf/trim-rakefile.patch
parent1b0bf7092df10ea56033ce9f04a2eb6d6983ad75 (diff)
downloadpackages-2ba6865311296c8ed0aa7ffde55c12737ef0abf4.tar.gz
packages-2ba6865311296c8ed0aa7ffde55c12737ef0abf4.tar.bz2
packages-2ba6865311296c8ed0aa7ffde55c12737ef0abf4.tar.xz
packages-2ba6865311296c8ed0aa7ffde55c12737ef0abf4.zip
user/protobuf: new package from alpine, ugh
Diffstat (limited to 'user/protobuf/trim-rakefile.patch')
-rw-r--r--user/protobuf/trim-rakefile.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/user/protobuf/trim-rakefile.patch b/user/protobuf/trim-rakefile.patch
new file mode 100644
index 000000000..7f53d7099
--- /dev/null
+++ b/user/protobuf/trim-rakefile.patch
@@ -0,0 +1,72 @@
+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,51 +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|
+- unless RUBY_PLATFORM =~ /darwin/
+- # TODO: also set "no_native to true" for mac if possible. As is,
+- # "no_native" can only be set if the RUBY_PLATFORM doing
+- # cross-compilation is contained in the "ext.cross_platform" array.
+- ext.no_native = true
+- end
+- 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.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0"
+- end
+-
+- if RUBY_PLATFORM =~ /darwin/
+- task 'gem:native' do
+- system "rake genproto"
+- system "rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0:2.2.2:2.1.6: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"
+@@ -104,9 +57,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|