gem-ext-zig_builder 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gem/ext/zig_builder/version.rb +1 -1
- data/lib/gem/ext/zig_builder.rb +8 -22
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfa1cdba6ede4366c9bbc5fd0973a1ff102e5284b25aafc5d18c6af6ab7d967e
|
4
|
+
data.tar.gz: 3fb02e99621c79b78df6a7fe8d61e08b316bbdefb97f10941116d4a198946995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e55584a1a5e0997645c978d21b308d0a3c0f69158eddfd7c84300d6f457a1f11e0c7d231eb41449f09d2f603fb745ca9cd1d38bd3e99e8fa43c5c6a820705db
|
7
|
+
data.tar.gz: 2e8f94cf078dd2b0a571feaa8a4f983eb485e09c730469820ffbc40066dda7bf9e2dd04c2e9e0b538891376ea9d304b13e271a70de058530d351ab04bf41daed
|
data/lib/gem/ext/zig_builder.rb
CHANGED
@@ -5,30 +5,13 @@ require 'rubygems/command'
|
|
5
5
|
require 'shellwords'
|
6
6
|
require 'rbconfig'
|
7
7
|
|
8
|
-
class Gem::Ext::Builder
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
Gem::Ext::ExtConfBuilder
|
13
|
-
when /configure/ then
|
14
|
-
Gem::Ext::ConfigureBuilder
|
15
|
-
when /rakefile/i, /mkrf_conf/i then
|
16
|
-
@ran_rake = true
|
17
|
-
Gem::Ext::RakeBuilder
|
18
|
-
when /CMakeLists.txt/ then
|
19
|
-
Gem::Ext::CmakeBuilder
|
20
|
-
when /build.zig/ then
|
21
|
-
Gem::Ext::ZigBuilder
|
22
|
-
else
|
23
|
-
extension_dir = File.join @gem_dir, File.dirname(extension)
|
24
|
-
|
25
|
-
message = "No builder for extension '#{extension}'"
|
26
|
-
build_error extension_dir, message
|
8
|
+
class Gem::Ext::ZigBuilder < Gem::Ext::Builder
|
9
|
+
module PatchBuilderLookup
|
10
|
+
def builder_for(extension)
|
11
|
+
/build.zig/ === extension ? Gem::Ext::ZigBuilder : super
|
27
12
|
end
|
28
13
|
end
|
29
|
-
end
|
30
14
|
|
31
|
-
class Gem::Ext::ZigBuilder < Gem::Ext::Builder
|
32
15
|
def self.build(extension, dest_path, results, args=[], lib_dir=nil, extension_dir=nil)
|
33
16
|
# older versions of ruby do not support the 5th `env` argument to run,
|
34
17
|
# so pollute the global ENV as a cheap workaround
|
@@ -39,7 +22,6 @@ class Gem::Ext::ZigBuilder < Gem::Ext::Builder
|
|
39
22
|
[].tap {|c|
|
40
23
|
c << 'zig' << 'build' << '-Doptimize=ReleaseSafe'
|
41
24
|
c << '--prefix-lib-dir' << dest_path
|
42
|
-
c << Gem::Command.build_args unless Gem::Command.build_args.empty?
|
43
25
|
c << 'test' << 'install'
|
44
26
|
},
|
45
27
|
results,
|
@@ -50,3 +32,7 @@ class Gem::Ext::ZigBuilder < Gem::Ext::Builder
|
|
50
32
|
results
|
51
33
|
end
|
52
34
|
end
|
35
|
+
|
36
|
+
class Gem::Ext::Builder
|
37
|
+
prepend Gem::Ext::ZigBuilder::PatchBuilderLookup
|
38
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-ext-zig_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank J. Cameron
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ''
|
14
14
|
email:
|