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 +5 -5
- data/ext/charlock_holmes/extconf.rb +19 -34
- data/lib/charlock_holmes/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 63323878cbd6ae16be524e46cd02c593003b954a26f8b381595fdd8e4355d651
|
4
|
+
data.tar.gz: 7f8a02a33b2d9c3d0e3800ff2728a9f95b7a2e07692b2ca01b44953ae9cb54ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
#
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
'
|
36
|
-
|
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'
|
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.
|
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:
|
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
|
-
|
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: []
|