charlock_holmes 0.7.6 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ext/charlock_holmes/extconf.rb +20 -33
- data/lib/charlock_holmes/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ffcc4d41329191f1628b957954b867ad22194140fa079bafd589298549a44799
|
4
|
+
data.tar.gz: e7c548cdf2cda18295cd6481a83ecfb0cee198e521feb18066055e46ac7cd6c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbe404468074f6abbd41829f231ef2100d88a5977d8a6f6224d4fa1a51cde13bd1e73a709dacd86e40d1fb7aaae375c901e1a816c16f34a04b9cad58218c31ca
|
7
|
+
data.tar.gz: 747277c704835f42878628885a988b463f0adcf0e3e13e8d0678a3f275794bb41922811a8790b7a0462db8559d289f0ca141c26739ea6ec591641d9d6d60b843
|
@@ -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,26 +12,29 @@ end
|
|
21
12
|
# ICU dependency
|
22
13
|
#
|
23
14
|
|
24
|
-
|
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
|
28
|
+
end
|
29
|
+
end
|
25
30
|
|
26
|
-
|
31
|
+
dir_config 'icu', cppflags, ldflags
|
27
32
|
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
33
|
+
pkg_config("icu-i18n")
|
34
|
+
pkg_config("icu-io")
|
35
|
+
pkg_config("icu-uc")
|
37
36
|
|
38
|
-
|
39
|
-
$INCFLAGS << " -I#{icu4c}/include "
|
40
|
-
$LDFLAGS << " -L#{icu4c}/lib "
|
41
|
-
icuconfig = "#{icu4c}/bin/icu-config"
|
42
|
-
end
|
43
|
-
end
|
37
|
+
$CXXFLAGS << ' -std=c++11'
|
44
38
|
|
45
39
|
unless have_library 'icui18n' and have_header 'unicode/ucnv.h'
|
46
40
|
STDERR.puts "\n\n"
|
@@ -54,14 +48,7 @@ have_library 'z' or abort 'libz missing'
|
|
54
48
|
have_library 'icuuc' or abort 'libicuuc missing'
|
55
49
|
have_library 'icudata' or abort 'libicudata missing'
|
56
50
|
|
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
51
|
$CFLAGS << ' -Wall -funroll-loops'
|
64
52
|
$CFLAGS << ' -Wextra -O0 -ggdb3' if ENV['DEBUG']
|
65
53
|
|
66
|
-
ENV['RUBYOPT'] = rubyopt
|
67
54
|
create_makefile 'charlock_holmes/charlock_holmes'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: charlock_holmes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.7
|
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:
|
12
|
+
date: 2019-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
@@ -91,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.6.11
|
94
|
+
rubygems_version: 3.1.0.pre1
|
96
95
|
signing_key:
|
97
96
|
specification_version: 4
|
98
97
|
summary: Character encoding detection, brought to you by ICU
|