rcee_packaged_source 0.4.0 → 0.5.1

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: 7048cf3c94ee5271b1464c602b45eeee7190b5b362aa439b015c5f5fa13557a7
4
+ data.tar.gz: 84300372e090ae181cd5227d9bab395338070eeed2cf5180cd8b27475d47051f
5
5
  SHA512:
6
- metadata.gz: e6bf821c84b210395c451dbc508814aef4ab66e58e12b95a0ce42a8d6225cdf38833842d1f1794b6aae72e65d2890ce8bb54830afa7f0c1f9d5064299c2dc916
7
- data.tar.gz: d80b9ec59b0da36025ff2202c260d4efcfd5f882860e9230db2f9184291cfadaf8ab19fcdb4be8c37ec436ebfdd1c158f7694eb052037ae75f6e7e683c7508d8
6
+ metadata.gz: 0b21525fd50019ced30f8525b070b5b9a0672a2722680d8aea3bdd90840f7c67753d1a7aa688c4cd8c3a2d0df1b513dfb1c1218d0a008881df722ae06348b0e7
7
+ data.tar.gz: 1df757e266ca7a532783c7534479106cdf70981ce6bfb80a0e0d35ab6e3fc666c7837c77495a6acd52c471a7d004402a1e537566d7c18edc8a4e3f1f24f26007
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.1"
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.1
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-28 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.