From 7eb8da7cd19d9d884446e915b7c6bf323ce6db3a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 17 Jul 2023 07:17:16 -0700 Subject: [PATCH] Update to mini_portile2 v2.8.3 This pulls in https://github.com/flavorjones/mini_portile/pull/129. When cross-compiling Windows targets with cmake in a Linux environment, the MSYS generator may not be available. Supplying -G MSYS will cause the build to fail. --- ext/re2/extconf.rb | 19 +------------------ re2.gemspec | 2 +- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/ext/re2/extconf.rb b/ext/re2/extconf.rb index cd8a508..a88222c 100644 --- a/ext/re2/extconf.rb +++ b/ext/re2/extconf.rb @@ -8,7 +8,7 @@ PACKAGE_ROOT_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) -REQUIRED_MINI_PORTILE_VERSION = "~> 2.8.2" # keep this version in sync with the one in the gemspec +REQUIRED_MINI_PORTILE_VERSION = "~> 2.8.3" # keep this version in sync with the one in the gemspec RE2_HELP_MESSAGE = <<~HELP USAGE: ruby #{$0} [options] @@ -135,22 +135,6 @@ def cmake_compile_flags(host) ] end -# By default, mini_portile2 might add an unnecessary option: -# https://github.com/flavorjones/mini_portile/blob/5084a2aeab12076f534cf0cabc81a4d5f84b5c25/lib/mini_portile2/mini_portile_cmake.rb#L17 -# See https://github.com/flavorjones/mini_portile/issues/127. -def delete_cmake_generator_option!(options) - indices = [] - - options.each_with_index do |element, index| - if element == '-G' && index + 1 < options.length - indices << index - indices << index + 1 - end - end - - indices.reverse_each { |index| options.delete_at(index) } -end - # # main # @@ -277,7 +261,6 @@ def process_recipe(name, version) '-DCMAKE_INSTALL_LIBDIR=lib' ] recipe.configure_options += cmake_compile_flags(recipe.host) - delete_cmake_generator_option!(recipe.configure_options) yield recipe diff --git a/re2.gemspec b/re2.gemspec index 9248960..8c442b0 100644 --- a/re2.gemspec +++ b/re2.gemspec @@ -32,5 +32,5 @@ Gem::Specification.new do |s| s.add_development_dependency "rake-compiler", "~> 1.2.1" s.add_development_dependency "rake-compiler-dock", "~> 1.3.0" s.add_development_dependency("rspec", "~> 3.2") - s.add_runtime_dependency("mini_portile2", "~> 2.8.2") # keep version in sync with extconf.rb + s.add_runtime_dependency("mini_portile2", "~> 2.8.3") # keep version in sync with extconf.rb end