xot 0.2.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release-gem.yml +1 -1
- data/.github/workflows/test.yml +3 -0
- data/ChangeLog.md +10 -0
- data/Gemfile.lock +1 -1
- data/LICENSE +1 -1
- data/Rakefile +0 -1
- data/VERSION +1 -1
- data/include/xot/windows.h +15 -0
- data/include/xot.h +2 -0
- data/lib/xot/extconf.rb +3 -3
- data/lib/xot/rake/util.rb +15 -8
- data/lib/xot/rake.rb +4 -1
- data/src/exception.cpp +1 -3
- data/src/string.cpp +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ebe7556be35dc2f7ae7d8eb1143845db27027a947e66dc782cc8b1d2fc9ce20
|
4
|
+
data.tar.gz: 7599cff806e863128eeab7426810dbedd4b5472e29fa15c9d50d4eebff9fee7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fc03885e3503cfd761408e4b4cf17a9b46f903c9dcb65251d18a8125b03e6cae6a25fe2ed8c56c9ed43b46c53640c01797b836e408d2e8657d2efaea5990783
|
7
|
+
data.tar.gz: 48847d41602008727fbd66bf990f9c2b81e21e46239ab19352bb47decc8040a910d5f961b5cd462f46f2ea4fdadd5de74493671dd26696f65dbec298260299c0
|
data/.github/workflows/test.yml
CHANGED
data/ChangeLog.md
CHANGED
data/Gemfile.lock
CHANGED
data/LICENSE
CHANGED
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.1
|
data/include/xot.h
CHANGED
data/lib/xot/extconf.rb
CHANGED
@@ -29,8 +29,8 @@ module Xot
|
|
29
29
|
|
30
30
|
extensions.each do |ext|
|
31
31
|
name = ext.name.downcase
|
32
|
-
headers
|
33
|
-
|
32
|
+
headers << "#{name}.h"
|
33
|
+
local_libs << name
|
34
34
|
end
|
35
35
|
|
36
36
|
ldflags = $LDFLAGS.dup
|
@@ -45,7 +45,7 @@ module Xot
|
|
45
45
|
$CFLAGS = make_cflags $CFLAGS + ' -x c++'
|
46
46
|
$CXXFLAGS = make_cflags $CXXFLAGS + ' -x c++' if $CXXFLAGS
|
47
47
|
$LDFLAGS = make_ldflags ldflags, lib_dirs, frameworks
|
48
|
-
$LOCAL_LIBS << local_libs.map {|s| " -l#{s}"}.join
|
48
|
+
$LOCAL_LIBS << local_libs.reverse.map {|s| " -l#{s}"}.join
|
49
49
|
end
|
50
50
|
|
51
51
|
def create_makefile(*args)
|
data/lib/xot/rake/util.rb
CHANGED
@@ -55,7 +55,10 @@ module Xot
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def inc_dirs()
|
58
|
-
env_array
|
58
|
+
dirs = env_array :INCDIRS, []
|
59
|
+
dirs += extensions.reverse.map {|m| m.inc_dir}.flatten
|
60
|
+
dirs << "#{env :MINGW_PREFIX}/include" if mingw?
|
61
|
+
dirs
|
59
62
|
end
|
60
63
|
|
61
64
|
def src_dirs()
|
@@ -170,11 +173,15 @@ module Xot
|
|
170
173
|
|
171
174
|
def make_cppflags_defs(defs = [])
|
172
175
|
a = defs.dup
|
173
|
-
a << $~[0].upcase if RUBY_PLATFORM =~ /mswin|ming|cygwin|darwin/i
|
174
176
|
a << (debug? ? '_DEBUG' : 'NDEBUG')
|
175
|
-
a <<
|
176
|
-
a <<
|
177
|
-
a << '
|
177
|
+
a << target.name.upcase
|
178
|
+
a << $~[0].upcase if RUBY_PLATFORM =~ /mswin|mingw|cygwin|darwin/i
|
179
|
+
a << 'WIN32' if win32?
|
180
|
+
a << 'OSX' if osx?
|
181
|
+
a << 'IOS' if ios?
|
182
|
+
a << 'GCC' if gcc?
|
183
|
+
a << 'CLANG' if clang?
|
184
|
+
a << '_USE_MATH_DEFINES' if gcc?
|
178
185
|
a
|
179
186
|
end
|
180
187
|
|
@@ -192,11 +199,11 @@ module Xot
|
|
192
199
|
end
|
193
200
|
|
194
201
|
def make_cflags(flags = '')
|
195
|
-
warning_opts
|
196
|
-
|
202
|
+
warning_opts = %w[no-unknown-pragmas]
|
203
|
+
warning_opts += %w[
|
197
204
|
no-deprecated-register
|
198
205
|
no-reserved-user-defined-literal
|
199
|
-
]
|
206
|
+
] if clang?
|
200
207
|
s = flags.dup
|
201
208
|
s << warning_opts.map {|s| " -W#{s}"}.join
|
202
209
|
s << " -arch arm64" if RUBY_PLATFORM =~ /arm64-darwin/
|
data/lib/xot/rake.rb
CHANGED
@@ -276,7 +276,7 @@ module Xot
|
|
276
276
|
desc "install packages"
|
277
277
|
task :packages do
|
278
278
|
case
|
279
|
-
when osx?
|
279
|
+
when osx? && osx.size > 0
|
280
280
|
sh %( brew install #{osx.join ' '} )
|
281
281
|
when win32? && win32.size > 0
|
282
282
|
prefix = 'MINGW_PACKAGE_PREFIX'
|
@@ -359,6 +359,9 @@ module Xot
|
|
359
359
|
end
|
360
360
|
|
361
361
|
def define_placeholder_tasks()
|
362
|
+
desc "install all external packages"
|
363
|
+
alias_task :packages
|
364
|
+
|
362
365
|
desc "setup all external libraries"
|
363
366
|
alias_task :vendor
|
364
367
|
|
data/src/exception.cpp
CHANGED
data/src/string.cpp
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This library include some useful utility classes and functions for development
|
14
14
|
with C++.
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- include/xot/string.h
|
42
42
|
- include/xot/time.h
|
43
43
|
- include/xot/util.h
|
44
|
+
- include/xot/windows.h
|
44
45
|
- lib/xot.rb
|
45
46
|
- lib/xot/bit_flag.rb
|
46
47
|
- lib/xot/bit_flag_accessor.rb
|