charlock_holmes 0.7.6 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7500e422c42f6d71a4c5f9636aacd33b08b18e6b
4
- data.tar.gz: e5b90461b236138f959f2f228c507ecab06f06da
2
+ SHA256:
3
+ metadata.gz: 63323878cbd6ae16be524e46cd02c593003b954a26f8b381595fdd8e4355d651
4
+ data.tar.gz: 7f8a02a33b2d9c3d0e3800ff2728a9f95b7a2e07692b2ca01b44953ae9cb54ed
5
5
  SHA512:
6
- metadata.gz: a29314ed7ad3d8afa68c461d08ef3b6cc09f73d590b35f90200ad93f675288890f40a0d24f7c4d54a8e99792891b58e76d36aa6e476a392b378182fb8dd32537
7
- data.tar.gz: a12c6bc1823c037a6b7b2a2fba7f1531072fc192e5411aa14de8eda041a1e5e92057b81b6344d27fd44f8dc63d81fceb092b1b9ab407ae2c04a158dcd3f87958
6
+ metadata.gz: d1e8235025a81e5dd289e52bcf1696c86ceaa7f39e6fa627fb2625a24a613e86868247bf2caedd5e837b1aea1db73f2259031093c668710cdd7498fea9b93b65
7
+ data.tar.gz: 7e60283edcbd9795185ea95717407361e02ec7b98114759a32924217231439edb45048890e210d2bda7a5408559ab05d65af9df13569be4a3699858aa2b1fcf8
@@ -1,14 +1,5 @@
1
1
  require 'mkmf'
2
2
 
3
- CWD = File.expand_path(File.dirname(__FILE__))
4
- def sys(cmd)
5
- puts " -- #{cmd}"
6
- unless ret = xsystem(cmd)
7
- raise "#{cmd} failed, please report issue on https://github.com/brianmario/charlock_holmes"
8
- end
9
- ret
10
- end
11
-
12
3
  if `which make`.strip.empty?
13
4
  STDERR.puts "\n\n"
14
5
  STDERR.puts "***************************************************************************************"
@@ -21,27 +12,28 @@ end
21
12
  # ICU dependency
22
13
  #
23
14
 
24
- dir_config 'icu'
25
-
26
- rubyopt = ENV.delete("RUBYOPT")
27
-
28
- icuconfig = ""
29
- icu4c = "/usr"
30
- # detect homebrew installs
31
- if !have_library 'icui18n'
32
- base = if !`which brew`.empty?
33
- `brew --cellar`.strip
34
- elsif File.exists?("/usr/local/Cellar/icu4c")
35
- '/usr/local/Cellar'
36
- end
37
-
38
- if base and icu4c = Dir[File.join(base, 'icu4c/*')].sort.last
39
- $INCFLAGS << " -I#{icu4c}/include "
40
- $LDFLAGS << " -L#{icu4c}/lib "
41
- icuconfig = "#{icu4c}/bin/icu-config"
15
+ ldflags = cppflags = nil
16
+
17
+ if RbConfig::CONFIG["host_os"] =~ /darwin/
18
+ begin
19
+ brew_prefix = `brew --prefix icu4c`.chomp
20
+ ldflags = "#{brew_prefix}/lib"
21
+ cppflags = "#{brew_prefix}/include"
22
+ pkg_conf = "#{brew_prefix}/lib/pkgconfig"
23
+ # pkg_config should be less error prone than parsing compiler
24
+ # commandline options, but we need to set default ldflags and cpp flags
25
+ # in case the user doesn't have pkg-config installed
26
+ ENV['PKG_CONFIG_PATH'] ||= pkg_conf
27
+ rescue
42
28
  end
43
29
  end
44
30
 
31
+ dir_config 'icu', cppflags, ldflags
32
+
33
+ pkg_config("icu-i18n")
34
+ pkg_config("icu-io")
35
+ pkg_config("icu-uc")
36
+
45
37
  unless have_library 'icui18n' and have_header 'unicode/ucnv.h'
46
38
  STDERR.puts "\n\n"
47
39
  STDERR.puts "***************************************************************************************"
@@ -54,14 +46,7 @@ have_library 'z' or abort 'libz missing'
54
46
  have_library 'icuuc' or abort 'libicuuc missing'
55
47
  have_library 'icudata' or abort 'libicudata missing'
56
48
 
57
- # icu4c might be built in C++11 mode, but it also might not have been
58
- icuconfig = `which icu-config`.chomp if icuconfig.empty?
59
- if File.exist?(icuconfig) && `#{icuconfig} --cxxflags`.include?("c++11")
60
- $CXXFLAGS << ' -std=c++11'
61
- end
62
-
63
49
  $CFLAGS << ' -Wall -funroll-loops'
64
50
  $CFLAGS << ' -Wextra -O0 -ggdb3' if ENV['DEBUG']
65
51
 
66
- ENV['RUBYOPT'] = rubyopt
67
52
  create_makefile 'charlock_holmes/charlock_holmes'
@@ -1,3 +1,3 @@
1
1
  module CharlockHolmes
2
- VERSION = "0.7.6"
2
+ VERSION = "0.7.8"
3
3
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charlock_holmes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Lopez
8
8
  - Vicent Martí
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2018-03-29 00:00:00.000000000 Z
11
+ date: 2024-06-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake-compiler
@@ -75,7 +74,6 @@ homepage: https://github.com/brianmario/charlock_holmes
75
74
  licenses:
76
75
  - MIT
77
76
  metadata: {}
78
- post_install_message:
79
77
  rdoc_options:
80
78
  - "--charset=UTF-8"
81
79
  require_paths:
@@ -91,9 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
89
  - !ruby/object:Gem::Version
92
90
  version: '0'
93
91
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.6.11
96
- signing_key:
92
+ rubygems_version: 3.6.0.dev
97
93
  specification_version: 4
98
94
  summary: Character encoding detection, brought to you by ICU
99
95
  test_files: []