rcee_packaged_source 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -2
- data/ext/packaged_source/extconf.rb +12 -2
- data/lib/rcee/packaged_source/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ead7dff26f6b409d64513fd8477b29cb0a36fe8d63e5fb187258c3fb88df701
|
4
|
+
data.tar.gz: f33666e48716abc3a7cbc274d6d995e68fe00b861833876aa0d3083bf5c86565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4bcf58294825fed14a80ace417c4cc3e04240e2e15728c3260d732eaa2904f48037ff5f0072cd9379a8c8aa93d856e5cd0c11dc2bad96c3f297c9dc476b5597
|
7
|
+
data.tar.gz: d3468392524da99869d48008b2dff212cb452960c4676ca6a049794b3b0f5461b3d9d3845e9e76143ccd77f5adb916167a1b64b2409d0c209f02028e8e6c38e2
|
data/README.md
CHANGED
@@ -37,15 +37,25 @@ ext/
|
|
37
37
|
The `extconf.rb` contains some new code:
|
38
38
|
|
39
39
|
``` ruby
|
40
|
+
# $VPATH is used as the Makefile's $(VPATH) variable
|
41
|
+
# see https://www.gnu.org/software/make/manual/html_node/General-Search.html
|
40
42
|
$VPATH << "$(srcdir)/yaml"
|
43
|
+
|
44
|
+
# $srcs is normally set to the list of C files in the extension directory,
|
45
|
+
# but we need to append the libyaml files to it.
|
41
46
|
$srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map { |n| File.basename(n) }.sort
|
47
|
+
|
48
|
+
# and make sure that the C preprocessor includes the yaml directory in its search path
|
42
49
|
append_cppflags("-I$(srcdir)/yaml")
|
43
50
|
|
44
|
-
|
51
|
+
# assert that we can find the yaml.h header file
|
52
|
+
abort("could not find yaml.h") unless find_header("yaml.h")
|
53
|
+
|
54
|
+
# defines HAVE_CONFIG_H macro
|
45
55
|
have_header("config.h")
|
46
56
|
```
|
47
57
|
|
48
|
-
It first configures `MakeMakefile` to pay attention to the `./yaml` directory as well as the C and header files. It then verifies that `yaml.h` can be found (we could skip this
|
58
|
+
It first configures `MakeMakefile` to pay attention to the `./yaml` directory as well as the C and header files. It then verifies that `yaml.h` can be found (though we could probably skip this step). Finally, a libyaml-specific action is taken which is to make sure `config.h` can be found and that the `HAVE_CONFIG_H` macro is set so that `yaml.h` is compiled properly.
|
49
59
|
|
50
60
|
The `Makefile` recipe looks something like:
|
51
61
|
|
@@ -1,10 +1,20 @@
|
|
1
1
|
require "mkmf"
|
2
2
|
|
3
|
+
# $VPATH is used as the Makefile's $(VPATH) variable
|
4
|
+
# see https://www.gnu.org/software/make/manual/html_node/General-Search.html
|
3
5
|
$VPATH << "$(srcdir)/yaml"
|
6
|
+
|
7
|
+
# $srcs is normally set to the list of C files in the extension directory,
|
8
|
+
# but we need to append the libyaml files to it.
|
4
9
|
$srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map { |n| File.basename(n) }.sort
|
10
|
+
|
11
|
+
# and make sure that the C preprocessor includes the yaml directory in its search path
|
5
12
|
append_cppflags("-I$(srcdir)/yaml")
|
6
13
|
|
7
|
-
|
8
|
-
|
14
|
+
# assert that we can find the yaml.h header file
|
15
|
+
abort("could not find yaml.h") unless find_header("yaml.h")
|
16
|
+
|
17
|
+
# defines HAVE_CONFIG_H macro
|
18
|
+
have_header("config.h")
|
9
19
|
|
10
20
|
create_makefile("rcee/packaged_source/packaged_source")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcee_packaged_source
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Part of a project to explain how Ruby C extensions work.
|
14
14
|
email:
|
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
|
-
rubygems_version: 3.
|
62
|
+
rubygems_version: 3.4.19
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Example gem demonstrating a basic C extension.
|