mini_portile2 2.8.4 → 2.8.7

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: 999335cad76fefd8e0ec313bb0bd7260a0259ef37760a01ee34153754ea2661f
4
- data.tar.gz: 472586aad90ab8c61df7fffd60f6507206d3900fb71d505edef100ceef6e7e2f
3
+ metadata.gz: 70898a2aae18144f603247968314787f2bb4291ce43bab39e7d9f0236d1dcd16
4
+ data.tar.gz: be938e39466de9c5d731d261c7e2afa63a88e5ca20bdfd594b6f39761b250798
5
5
  SHA512:
6
- metadata.gz: c978de2664efdee0bd9b89a842d33844c7ab6ee5d9dce45baaa53e061ab04777fcfb0ecc4900b772e4a2cf64c80c615b727d1227f9d09e223e30834f1dbf5ddc
7
- data.tar.gz: 58a18c5ee2c34ab370dd0d30449aa2bf06e40d7e070ab1bd5e8fcf4226e8e390516718b2b6aed0e17ee3736aa04eea45917cee53a5a1b117b78ffcb12dc4bfd3
6
+ metadata.gz: 55d44167607aca34fee6fa086246d7f71146e500d77a79f128af9399cd057404ee44d9fb8a349f89928c6f21139826e785d2da23bc4ea656c93047fa1990a20a
7
+ data.tar.gz: bd0c5d6b654deb5325d1f5329ef0e93b1a47cfde7225ab4f8730dfb419ab27604eb4713d1ae3659dcd4fdf1697e00acbad020c06347b7456041f0121ae40bb05
@@ -25,7 +25,15 @@ jobs:
25
25
  fail-fast: false
26
26
  matrix:
27
27
  platform: [ubuntu-latest, windows-latest, macos-latest]
28
- ruby: ["2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "head"]
28
+ ruby: ["2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "head"]
29
+ exclude:
30
+ # I can't figure out how to install these on macos through setup-ruby
31
+ - ruby: "2.3"
32
+ platform: "macos-latest"
33
+ - ruby: "2.4"
34
+ platform: "macos-latest"
35
+ - ruby: "2.5"
36
+ platform: "macos-latest"
29
37
  runs-on: ${{ matrix.platform }}
30
38
  steps:
31
39
  - name: configure git crlf on windows
@@ -33,7 +41,7 @@ jobs:
33
41
  run: |
34
42
  git config --system core.autocrlf false
35
43
  git config --system core.eol lf
36
- - uses: actions/checkout@v3
44
+ - uses: actions/checkout@v4
37
45
  - uses: MSP-Greg/setup-ruby-pkgs@v1
38
46
  with:
39
47
  apt-get: _update_ build-essential cmake
@@ -48,7 +56,8 @@ jobs:
48
56
  strategy:
49
57
  fail-fast: false
50
58
  matrix:
51
- platform: [ubuntu-latest, windows-latest, macos-latest]
59
+ # use macos-13 (not 14) because libyaml 0.2.5 doesn't have up-to-date config.guess and config.sub
60
+ platform: [ubuntu-latest, windows-latest, macos-13]
52
61
  ruby: ["3.1"]
53
62
  runs-on: ${{ matrix.platform }}
54
63
  steps:
@@ -57,15 +66,98 @@ jobs:
57
66
  run: |
58
67
  git config --system core.autocrlf false
59
68
  git config --system core.eol lf
60
- - uses: actions/checkout@v3
69
+ - uses: actions/checkout@v4
61
70
  - uses: MSP-Greg/setup-ruby-pkgs@v1
62
71
  with:
63
72
  apt-get: _update_ build-essential cmake
64
73
  mingw: _upgrade_ cmake
65
74
  ruby-version: ${{ matrix.ruby }}
66
75
  bundler-cache: true
67
- - uses: actions/cache@v3
76
+ - uses: actions/cache@v4
68
77
  with:
69
78
  path: examples/ports/archives
70
- key: ${{ matrix.platform }}-examples-${{ hashFiles('examples/Rakefile') }}
79
+ key: examples-${{ hashFiles('examples/Rakefile') }}
71
80
  - run: bundle exec rake test:examples
81
+
82
+ fedora: # see https://github.com/flavorjones/mini_portile/issues/118
83
+ strategy:
84
+ fail-fast: false
85
+ matrix:
86
+ task: ["test:unit", "test:examples"]
87
+ runs-on: ubuntu-latest
88
+ container:
89
+ image: fedora:35
90
+ steps:
91
+ - run: |
92
+ dnf group install -y "C Development Tools and Libraries"
93
+ dnf install -y ruby ruby-devel libyaml-devel git-all patch cmake xz
94
+ - uses: actions/checkout@v4
95
+ - uses: actions/cache@v4
96
+ with:
97
+ path: examples/ports/archives
98
+ key: examples-${{ hashFiles('examples/Rakefile') }}
99
+ - run: bundle install
100
+ - run: bundle exec rake ${{ matrix.task }}
101
+
102
+ freebsd:
103
+ strategy:
104
+ fail-fast: false
105
+ matrix:
106
+ task: ["test:unit", "test:examples"]
107
+ runs-on: ubuntu-latest
108
+ env:
109
+ MAKE: gmake
110
+ steps:
111
+ - uses: actions/checkout@v4
112
+ - uses: actions/cache@v4
113
+ with:
114
+ path: examples/ports/archives
115
+ key: examples-${{ hashFiles('examples/Rakefile') }}
116
+ - uses: vmactions/freebsd-vm@v1
117
+ with:
118
+ envs: MAKE
119
+ usesh: true
120
+ copyback: false
121
+ prepare: pkg install -y ruby devel/ruby-gems pkgconf git cmake devel/gmake textproc/libyaml security/gnupg
122
+ run: |
123
+ git config --global --add safe.directory /home/runner/work/mini_portile/mini_portile
124
+ gem install bundler
125
+ bundle install
126
+ bundle exec rake ${{ matrix.task }}
127
+
128
+ openbsd:
129
+ strategy:
130
+ fail-fast: false
131
+ matrix:
132
+ task: ["test:unit", "test:examples"]
133
+ runs-on: ubuntu-latest
134
+ env:
135
+ MAKE: gmake
136
+ steps:
137
+ - uses: actions/checkout@v4
138
+ - uses: vmactions/openbsd-vm@v1
139
+ with:
140
+ envs: MAKE
141
+ usesh: true
142
+ copyback: false
143
+ prepare: |
144
+ pkg_add ruby%3.1 gmake cmake git pkgconf security/gnupg
145
+ ln -sf /usr/local/bin/ruby31 /usr/local/bin/ruby
146
+ ln -sf /usr/local/bin/bundle31 /usr/local/bin/bundle
147
+ ln -sf /usr/local/bin/bundler31 /usr/local/bin/bundler
148
+ ln -sf /usr/local/bin/erb31 /usr/local/bin/erb
149
+ ln -sf /usr/local/bin/gem31 /usr/local/bin/gem
150
+ ln -sf /usr/local/bin/irb31 /usr/local/bin/irb
151
+ ln -sf /usr/local/bin/racc31 /usr/local/bin/racc
152
+ ln -sf /usr/local/bin/rake31 /usr/local/bin/rake
153
+ ln -sf /usr/local/bin/rbs31 /usr/local/bin/rbs
154
+ ln -sf /usr/local/bin/rdbg31 /usr/local/bin/rdbg
155
+ ln -sf /usr/local/bin/rdoc31 /usr/local/bin/rdoc
156
+ ln -sf /usr/local/bin/ri31 /usr/local/bin/ri
157
+ ln -sf /usr/local/bin/syntax_suggest31 /usr/local/bin/syntax_suggest
158
+ ln -sf /usr/local/bin/typeprof31 /usr/local/bin/typeprof
159
+ run: |
160
+ git config --global --add safe.directory /home/runner/work/mini_portile/mini_portile
161
+ gem install bundler
162
+ bundle install
163
+ bundle exec rake ${{ matrix.task }}
@@ -0,0 +1,66 @@
1
+ name: downstream
2
+ concurrency:
3
+ group: "${{github.workflow}}-${{github.ref}}"
4
+ cancel-in-progress: true
5
+ on:
6
+ workflow_dispatch:
7
+ schedule:
8
+ - cron: "0 7 * * 1,3,5" # At 07:00 on Monday, Wednesday, and Friday # https://crontab.guru/#0_7_*_*_1,3,5
9
+ push:
10
+ branches:
11
+ - main
12
+ - "v*.*.x"
13
+ tags:
14
+ - v*.*.*
15
+ pull_request:
16
+ types: [opened, synchronize]
17
+ branches:
18
+ - '*'
19
+
20
+ jobs:
21
+ downstream:
22
+ name: downstream-${{matrix.name}}-${{matrix.platform}}
23
+ strategy:
24
+ fail-fast: false
25
+ matrix:
26
+ name: [re2, nokogiri, sqlite3]
27
+ platform: [ubuntu-latest, windows-latest, macos-latest]
28
+ include:
29
+ - name: re2
30
+ url: https://github.com/mudge/re2
31
+ command: "bundle exec rake compile spec"
32
+ ruby: "3.3"
33
+ - name: nokogiri
34
+ url: https://github.com/sparklemotion/nokogiri
35
+ command: "bundle exec rake compile test"
36
+ ruby: "3.3"
37
+ - name: sqlite3
38
+ url: https://github.com/sparklemotion/sqlite3-ruby
39
+ command: "bundle exec rake compile test"
40
+ ruby: "3.3"
41
+ runs-on: ${{matrix.platform}}
42
+ steps:
43
+ - name: configure git crlf
44
+ if: ${{ startsWith(matrix.platform, 'windows') }}
45
+ run: |
46
+ git config --system core.autocrlf false
47
+ git config --system core.eol lf
48
+ - uses: actions/checkout@v4
49
+ - uses: ruby/setup-ruby@v1
50
+ with:
51
+ ruby-version: ${{matrix.ruby}}
52
+ bundler-cache: true
53
+ bundler: latest
54
+ - run: git clone --depth=1 ${{matrix.url}} ${{matrix.name}}
55
+ - uses: actions/cache@v4
56
+ with:
57
+ path: ${{matrix.name}}/ports/archives
58
+ key: tarballs-${{matrix.name}}
59
+ enableCrossOsArchive: true
60
+ - name: ${{matrix.name}} test suite
61
+ working-directory: ${{matrix.name}}
62
+ run: |
63
+ bundle remove mini_portile2 || true
64
+ bundle add mini_portile2 --path=".."
65
+ bundle install --local || bundle install
66
+ ${{matrix.command}}
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ Gemfile.lock
3
3
  pkg
4
4
  ports
5
5
  tmp
6
+ mkmf.log
data/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  ## mini_portile changelog
2
2
 
3
+ ### 2.8.7 / 2024-05-31
4
+
5
+ #### Added
6
+
7
+ - When setting the C compiler through the `MiniPortile` constructor, the preferred keyword argument is now `:cc_command`. The original `:gcc_command` is still supported. (#144 by @flavorjones)
8
+ - Add support for extracting xz-compressed tarballs on OpenBSD. (#141 by @postmodern)
9
+ - Add OpenBSD support to the experimental method `MakeMakefile#mkmf_config`. (#141 by @flavorjones)
10
+
11
+
12
+ #### Changed
13
+
14
+ - `MiniPortileCMake` now detects the C and C++ compiler the same way `MiniPortile` does: by examining environment variables, then using kwargs, then looking in RbConfig (in that order). (#144 by @flavorjones)
15
+ - GPG file verification error messages are captured in the raised exception. Previously these errors went to `stderr`. (#145 by @flavorjones)
16
+
17
+
18
+ ### 2.8.6 / 2024-04-14
19
+
20
+ #### Added
21
+
22
+ - When using CMake on FreeBSD, default to clang's "cc" and "c++" compilers. (#139 by @mudge)
23
+
24
+
25
+ ### 2.8.5 / 2023-10-22
26
+
27
+ #### Added
28
+
29
+ - New methods `#lib_path` and `#include_path` which point at the installed directories under `ports`. (by @flavorjones)
30
+ - Add config param for CMAKE_BUILD_TYPE, which now defaults to `Release`. (#136 by @Watson1978)
31
+
32
+ #### Experimental
33
+
34
+ Introduce experimental support for `MiniPortile#mkmf_config` which sets up MakeMakefile variables to properly link against the recipe. This should make it easier for C extensions to package third-party libraries. (by @flavorjones)
35
+
36
+ - With no arguments, will set up just `$INCFLAGS`, `$libs`, and `$LIBPATH`.
37
+ - Optionally, if provided a pkg-config file, will use that config to more precisely set `$INCFLAGS`, `$libs`, `$LIBPATH`, and `$CFLAGS`/`$CXXFLAGS`.
38
+ - Optionally, if provided the name of a static archive, will rewrite linker flags to ensure correct linkage.
39
+
40
+ Note that the behavior may change slightly before official support is announced. Please comment on [#118](https://github.com/flavorjones/mini_portile/issues/118) if you have feedback.
41
+
42
+
3
43
  ### 2.8.4 / 2023-07-18
4
44
 
5
45
  - cmake: set CMAKE compile flags to configure cross-compilation similarly to `autotools` `--host` flag: `SYSTEM_NAME`, `SYSTEM_PROCESSOR`, `C_COMPILER`, and `CXX_COMPILER`. [#130] (Thanks, @stanhu!)
data/README.md CHANGED
@@ -85,21 +85,30 @@ system-wide installation.
85
85
 
86
86
  Some keyword arguments can be passed to the constructor to configure the commands used:
87
87
 
88
- #### `gcc_command`
88
+ #### `cc_command` and `cxx_command`
89
89
 
90
- The compiler command that is used is configurable, and in order of preference will use:
90
+ The C compiler command that is used is configurable, and in order of preference will use:
91
91
 
92
92
  - the `CC` environment variable (if present)
93
- - the `gcc_command` value passed in to the constructor
93
+ - the `:cc_command` keyword argument passed in to the constructor
94
94
  - `RbConfig::CONFIG["CC"]`
95
95
  - `"gcc"`
96
96
 
97
- You can pass it in like so:
97
+ The C++ compiler is similarly configuratble, and in order of preference will use:
98
+
99
+ - the `CXX` environment variable (if present)
100
+ - the `:cxx_command` keyword argument passed in to the constructor
101
+ - `RbConfig::CONFIG["CXX"]`
102
+ - `"g++"`
103
+
104
+ You can pass your compiler commands to the MiniPortile constructor:
98
105
 
99
106
  ``` ruby
100
- MiniPortile.new("libiconv", "1.13.1", gcc_command: "cc")
107
+ MiniPortile.new("libiconv", "1.13.1", cc_command: "clang", cxx_command: "clang++")
101
108
  ```
102
109
 
110
+ (For backwards compatibility, the constructor also supports a keyword argument `:gcc_command` for the C compiler.)
111
+
103
112
  #### `make_command`
104
113
 
105
114
  The configuration/make command that is used is configurable, and in order of preference will use:
@@ -138,8 +147,8 @@ This is configurable as above, except for Windows systems where it's hardcoded t
138
147
  The cmake command used is configurable, and in order of preference will use:
139
148
 
140
149
  - the `CMAKE` environment variable (if present)
141
- - the `cmake_command` value passed in to the constructor
142
- - `"cmake"`
150
+ - the `:cmake_command` keyword argument passed into the constructor
151
+ - `"cmake"` (the default)
143
152
 
144
153
  You can pass it in like so:
145
154
 
@@ -147,6 +156,19 @@ You can pass it in like so:
147
156
  MiniPortileCMake.new("libfoobar", "1.3.5", cmake_command: "cmake3")
148
157
  ```
149
158
 
159
+ #### `cmake_build_type`
160
+
161
+ The cmake build type is configurable as of v2.8.5, and in order of preference will use:
162
+
163
+ - the `CMAKE_BUILD_TYPE` environment variable (if present)
164
+ - the `:cmake_build_type` keyword argument passed into the constructor
165
+ - `"Release"` (the default)
166
+
167
+ You can pass it in like so:
168
+
169
+ ``` ruby
170
+ MiniPortileCMake.new("libfoobar", "1.3.5", cmake_build_type: "Debug")
171
+ ```
150
172
 
151
173
  ### Local source directories
152
174
 
data/Rakefile CHANGED
@@ -1,12 +1,10 @@
1
1
  require "rake/clean"
2
2
  require "bundler/gem_tasks"
3
+ require "rake/testtask"
3
4
 
4
- namespace :test do
5
- desc "Test MiniPortile by running unit tests"
6
- task :unit do
7
- sh "ruby -w -W2 -I. -Ilib -e \"#{Dir["test/test_*.rb"].map { |f| "require '#{f}';" }.join}\" -- #{ENV["TESTOPTS"]} -v"
8
- end
5
+ Rake::TestTask.new("test:unit")
9
6
 
7
+ namespace :test do
10
8
  desc "Test MiniPortile by compiling examples"
11
9
  task :examples do
12
10
  Dir.chdir("examples") do