static_holmes 0.7.8 → 0.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3761cc87cbc21e60cff21b320ab71334f3ebd810ff0d0a510b20575f05277d7a
4
- data.tar.gz: b2087ac3570f6a49d20182fbf50c6400fd4508af604848023ca556234244b62a
3
+ metadata.gz: 4803d1e6d567e2543704fa2ce8b6f6875673c219ca66b5516944e62e800dc3ee
4
+ data.tar.gz: 642edc241c50450f4ca662e6da35898d02a3ca77997eb8f5ce6a1c7f36a7bb84
5
5
  SHA512:
6
- metadata.gz: 26bbf7bc330a9e39ab8fe5bdf2ea01e3d28e60d9db6e0865ff371f0d62bbf2e273d61a42db9e94eb8223fb9dc09ba7416687aba3eaafcde724a982c068de5288
7
- data.tar.gz: 6143a73000eb85087f1eeaa0f0683c2e964839b8d0957a28643efa40eea3f685c8a61b451ce148b36c2e9ebec8fe45649d1ad4b3067eff8aefa01463bf30635c
6
+ metadata.gz: cfb381f812968124e1c8221c99087b1f0bfef4fb73e9517dce95ed599a1e8132b72b51265d97ae701a4f0583cb497fd6899c336fd2ea8b9bc1b22d2354a54052
7
+ data.tar.gz: effc2e698dfd70a5eef40e8265a098ed52847d18fcfde7261b8a37c3b4a2ab277e23003c1916162cc2440de03368b2f398ed957ccc1832d1b5c475cb49a9cf2e
@@ -34,8 +34,6 @@ pkg_config("icu-i18n")
34
34
  pkg_config("icu-io")
35
35
  pkg_config("icu-uc")
36
36
 
37
- $CXXFLAGS << ' -std=c++11' unless $CXXFLAGS.include?("-std=")
38
-
39
37
  unless have_library 'icui18n' and have_header 'unicode/ucnv.h'
40
38
  STDERR.puts "\n\n"
41
39
  STDERR.puts "***************************************************************************************"
@@ -51,6 +49,32 @@ have_library 'icudata' or abort 'libicudata missing'
51
49
  $CFLAGS << ' -Wall -funroll-loops'
52
50
  $CFLAGS << ' -Wextra -O0 -ggdb3' if ENV['DEBUG']
53
51
 
52
+ minimal_program = <<~SRC
53
+ #include <unicode/translit.h>
54
+ int main() { return 0; }
55
+ SRC
56
+
57
+ # Pass -x c++ to force gcc to compile the test program
58
+ # as C++ (as it will end in .c by default).
59
+ compile_options = +"-x c++"
60
+
61
+ icu_requires_version_flag = checking_for("icu that requires explicit C++ version flag") do
62
+ !try_compile(minimal_program, compile_options)
63
+ end
64
+
65
+ if icu_requires_version_flag
66
+ abort "Cannot compile icu with your compiler: recent versions require C++17 support." unless %w[c++20 c++17 c++11 c++0x].any? do |std|
67
+ checking_for("icu that compiles with #{std} standard") do
68
+ if try_compile(minimal_program, compile_options + " -std=#{std}")
69
+ compile_options << " -std=#{std}"
70
+ $CPPFLAGS << " -std=#{std}"
71
+
72
+ true
73
+ end
74
+ end
75
+ end
76
+ end
77
+
54
78
  def libflag_to_filename(ldflag)
55
79
  case ldflag
56
80
  when /\A-l(.+)/
@@ -1,3 +1,3 @@
1
1
  module CharlockHolmes
2
- VERSION = "0.7.8"
2
+ VERSION = "0.7.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: static_holmes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.8
4
+ version: 0.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Lopez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-06-18 00:00:00.000000000 Z
12
+ date: 2024-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.5.13
94
+ rubygems_version: 3.5.14
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Character encoding detection, brought to you by ICU