aboutsummaryrefslogtreecommitdiffstats
path: root/main/protobuf/trim-rakefile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/protobuf/trim-rakefile.patch')
-rw-r--r--main/protobuf/trim-rakefile.patch14
1 files changed, 10 insertions, 4 deletions
diff --git a/main/protobuf/trim-rakefile.patch b/main/protobuf/trim-rakefile.patch
index e20d7b4a0e..c71810ca2f 100644
--- a/main/protobuf/trim-rakefile.patch
+++ b/main/protobuf/trim-rakefile.patch
@@ -9,7 +9,7 @@ index 2aa7743..b70c625 100644
require "rake/testtask"
spec = Gem::Specification.load("google-protobuf.gemspec")
-@@ -39,56 +37,6 @@ unless ENV['IN_DOCKER'] == 'true'
+@@ -39,62 +37,12 @@
end
end
@@ -25,6 +25,12 @@ index 2aa7743..b70c625 100644
- system("mvn --batch-mode package")
- end
-else
+ unless ENV['IN_DOCKER'] == 'true'
+ # We need wyhash in-tree.
+ FileUtils.mkdir_p("ext/google/protobuf_c/third_party/wyhash")
+ FileUtils.cp("../third_party/wyhash/wyhash.h", "ext/google/protobuf_c/third_party/wyhash/wyhash.h")
+ end
+
- 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,
@@ -47,7 +53,7 @@ index 2aa7743..b70c625 100644
- ['x86-mingw32', 'x64-mingw32', 'x86_64-linux', 'x86-linux'].each do |plat|
- RakeCompilerDock.sh <<-"EOT", platform: plat
- bundle && \
-- IN_DOCKER=true rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem RUBY_CC_VERSION=2.7.0:2.6.0:2.5.0:2.4.0:2.3.0
+- IN_DOCKER=true rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem RUBY_CC_VERSION=3.0.0:2.7.0:2.6.0:2.5.0:2.4.0:2.3.0
- EOT
- end
- end
@@ -55,7 +61,7 @@ index 2aa7743..b70c625 100644
- if RUBY_PLATFORM =~ /darwin/
- task 'gem:native' do
- system "rake genproto"
-- system "rake cross native gem RUBY_CC_VERSION=2.7.0:2.6.0:2.5.1:2.4.0:2.3.0"
+- system "rake cross native gem RUBY_CC_VERSION=3.0.0:2.7.0:2.6.0:2.5.1:2.4.0:2.3.0"
- end
- else
- task 'gem:native' => [:genproto, 'gem:windows']
@@ -66,7 +72,7 @@ index 2aa7743..b70c625 100644
# Proto for tests.
genproto_output << "tests/generated_code.rb"
genproto_output << "tests/generated_code_proto2.rb"
-@@ -139,9 +87,7 @@ task :genproto => genproto_output
+@@ -151,9 +99,7 @@
task :clean do
sh "rm -f #{genproto_output.join(' ')}"