rcee_packaged_source 0.4.0 → 0.5.0.1
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 +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fa578d3ab5e1dc756c5f928741be71c589048b448555bbcc4979631908a2740
|
4
|
+
data.tar.gz: e9a0d886b9fa3355e194bb8b03a5102f2a797b8b0492e1a86b51477e65d057fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a65ddd9d5011ccdd537606097da41dea19457391b079f68127116c613cd90cab2643749780ba24f6b97e7db3de7c15cd1655c30b71fb9b848f055c0ffedb45e
|
7
|
+
data.tar.gz: 776a136e88d00bde022a7703a1c5add4618a4485307a45ebc47874b19e5091f4156e156133e6b96b06fabb19dd9f8f8bc8a2faa76a227b971b78d64a26ff89d8
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-01 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:
|
@@ -44,7 +44,7 @@ homepage: https://github.com/flavorjones/ruby-c-extensions-explained
|
|
44
44
|
licenses:
|
45
45
|
- MIT
|
46
46
|
metadata: {}
|
47
|
-
post_install_message:
|
47
|
+
post_install_message:
|
48
48
|
rdoc_options: []
|
49
49
|
require_paths:
|
50
50
|
- lib
|
@@ -59,8 +59,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
|
-
rubygems_version: 3.
|
63
|
-
signing_key:
|
62
|
+
rubygems_version: 3.4.19
|
63
|
+
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Example gem demonstrating a basic C extension.
|
66
66
|
test_files: []
|