ffi-hydrogen 0.1.3 → 0.1.5

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
2
  SHA256:
3
- metadata.gz: 4b354f8b31c13a98f4e2b428460c3e500b69ad7950d262c3f52289ce7be980e2
4
- data.tar.gz: c514a4652a44f06e7f9ce0b05dafe0e9e4af77d35eb74c3510aaf7ad17d5df3e
3
+ metadata.gz: 5693c5443a1feb5c0dfde157d2a8326b6782af82188d46ce883cb927f51ed37c
4
+ data.tar.gz: cd1897b6d5b90cac758e8cb9114e74bb88bde276adfb43a98b459367a6409b2d
5
5
  SHA512:
6
- metadata.gz: 7f4b4c58a020a134abb56fd2ac9560696e4e0ab2a51e1e49568d107f3bc539632e3ac8652e511bf7dba6e4137663ab636e006c766a875b3c5367f2b2e4a41865
7
- data.tar.gz: 7a9fcb191ff8304d783c01aeb263f1e81e8f05ae69097ad8e853f5e36b442faca9d49cb3344ebe79395052687bf93fd6ab406ebdfd5751b3369ce2d8bb1c3122
6
+ metadata.gz: 7097f080d73ce5529bfe35c444f6223d53dd581bf1a08bbc4497c2135459042b0b85895d0ba69e44378f2eb21ed4c78ecf9ba1301d164e72aa862c757ce55d42
7
+ data.tar.gz: 96be9b30ccad26efe0bee4d19dc9be478e609c7793fb629174396a11400f8cc890d7f967de738405de89e458bb03f8db374a7febc01908194cd1b6c93087619e
@@ -15,7 +15,15 @@ task :compile_shared do
15
15
  " -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wswitch-enum"\
16
16
  " -Wno-type-limits"
17
17
 
18
- cflags = "-O3 -march=native -fPIC -fno-exceptions #{wflags}"
18
+ rbconfig = RbConfig::CONFIG
19
+
20
+ cpuflag = if rbconfig["host_cpu"] =~ /arm64/ && rbconfig["host_os"] =~ /darwin/
21
+ "-mcpu=apple-m1"
22
+ else
23
+ "-march=native"
24
+ end
25
+
26
+ cflags = "-O3 #{cpuflag} -fPIC -fno-exceptions #{wflags}"
19
27
  cwd = ::File.expand_path(::File.dirname(__FILE__))
20
28
 
21
29
  ::Dir.chdir(cwd) do
@@ -24,7 +32,7 @@ task :compile_shared do
24
32
  sys("cc -c #{cflags} main.c -o main.o")
25
33
 
26
34
  # main.dylib: main.o
27
- # $(CC) $< -shared -o $@
35
+ # $(CC) $< -shared -o $@
28
36
  sys("cc main.o -shared -o main.#{::FFI::Platform::LIBSUFFIX}")
29
37
  end
30
38
  end
data/ffi-hydrogen.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "ffi-hydrogen"
6
- spec.version = "0.1.3"
6
+ spec.version = "0.1.5"
7
7
  spec.authors = ["Marcos Minond"]
8
8
  spec.email = ["marcos.minond@mx.com"]
9
9
 
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency "ffi"
24
24
 
25
25
  spec.add_development_dependency "benchmark-ips", "~> 2.7.2"
26
- spec.add_development_dependency "bundler", "~> 1.16"
26
+ spec.add_development_dependency "bundler"
27
27
  spec.add_development_dependency "mad_rubocop"
28
28
  spec.add_development_dependency "pry"
29
29
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-hydrogen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Minond
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-03 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.16'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.16'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mad_rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +136,7 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- description:
139
+ description:
140
140
  email:
141
141
  - marcos.minond@mx.com
142
142
  executables: []
@@ -304,7 +304,7 @@ files:
304
304
  homepage: https://github.com/minond/ffi-hydrogen
305
305
  licenses: []
306
306
  metadata: {}
307
- post_install_message:
307
+ post_install_message:
308
308
  rdoc_options: []
309
309
  require_paths:
310
310
  - lib
@@ -319,9 +319,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  - !ruby/object:Gem::Version
320
320
  version: '0'
321
321
  requirements: []
322
- rubyforge_project:
323
- rubygems_version: 2.7.8
324
- signing_key:
322
+ rubygems_version: 3.3.7
323
+ signing_key:
325
324
  specification_version: 4
326
325
  summary: libhydrogen + encoding = cryptographically sound, URL safe string = libhydrogen
327
326
  + encoding