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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65ec4182d4e0efe5af98f1e847d32351daf73897850170f53e52ca6b9e3579c8
4
- data.tar.gz: 80e6b2c73398e25118fca1a04bc463673e59ceff3cbbd28255097134f56d2e3a
3
+ metadata.gz: 6ead7dff26f6b409d64513fd8477b29cb0a36fe8d63e5fb187258c3fb88df701
4
+ data.tar.gz: f33666e48716abc3a7cbc274d6d995e68fe00b861833876aa0d3083bf5c86565
5
5
  SHA512:
6
- metadata.gz: e6bf821c84b210395c451dbc508814aef4ab66e58e12b95a0ce42a8d6225cdf38833842d1f1794b6aae72e65d2890ce8bb54830afa7f0c1f9d5064299c2dc916
7
- data.tar.gz: d80b9ec59b0da36025ff2202c260d4efcfd5f882860e9230db2f9184291cfadaf8ab19fcdb4be8c37ec436ebfdd1c158f7694eb052037ae75f6e7e683c7508d8
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
- find_header("yaml.h")
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 since we're packing it and setting the include path manually). 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.
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
- find_header("yaml.h")
8
- have_header("config.h") # defines HAVE_CONFIG_H macro
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")
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RCEE
4
4
  module PackagedSource
5
- VERSION = "0.4.0"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
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.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: 2022-05-19 00:00:00.000000000 Z
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.3.5
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.