mini_portile2 2.8.2 → 2.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8c3bc43ff4324b2780fdac7f1832759fe3933330155380eeb4d3be23a55ac25
4
- data.tar.gz: 4b9ed8985c6ae4b827b1cd9791a97a8a708fca9f02dd2bc0854e241d05ce71bf
3
+ metadata.gz: da44cd16eb77e7123cd04099a6899343cec373a2343041b99da0156a6db5f254
4
+ data.tar.gz: 345bf22bfd3d5679dd7b49a67ab1219e3aa470ba60ed66b934709824f173289a
5
5
  SHA512:
6
- metadata.gz: f29569cacecfd0ade1fc031add7f0e1bb7bccf3a180f260b17541d4493de809f7c4b53180ed47d159a01956318c67c16df810984e974718d0b0eeee42d789a52
7
- data.tar.gz: b93d7d34b54e9f6e3083642bc11d14720c566eac2dd745ad99004961f6a37d770349a5f4c99cd2e4ed084246025d26ca8e2fdf434d4b1837c59ae02c7173aa60
6
+ metadata.gz: e9524d1a10295307873889f41bf74ecb1ac121b926227379f6c82fecc2dba748bda6b03f2c3923777e86f7990a479c11a2dcc31c68def02ce77344ccec40244d
7
+ data.tar.gz: 81f1e88d8218d79a0296018ef338f9f86682f90b5b1bfb864a0a065668e00beaa19120be05f22b8ffeb86a9ca22a9c6f751747e6ab7eede83b48d4f92f2db920
@@ -1,4 +1,4 @@
1
- name: Continuous Integration
1
+ name: ci
2
2
  concurrency:
3
3
  group: "${{github.workflow}}-${{github.ref}}"
4
4
  cancel-in-progress: true
@@ -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", "3.4"]
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
@@ -45,10 +53,12 @@ jobs:
45
53
  test-examples:
46
54
  env:
47
55
  MAKEFLAGS: -j2
56
+ LDFLAGS: "-L/usr/local/opt/libiconv/lib" # for macos-13, sigh
48
57
  strategy:
49
58
  fail-fast: false
50
59
  matrix:
51
- platform: [ubuntu-latest, windows-latest, macos-latest]
60
+ # use macos-13 (not 14) because libyaml 0.2.5 doesn't have up-to-date config.guess and config.sub
61
+ platform: [ubuntu-latest, windows-latest, macos-13]
52
62
  ruby: ["3.1"]
53
63
  runs-on: ${{ matrix.platform }}
54
64
  steps:
@@ -57,15 +67,99 @@ jobs:
57
67
  run: |
58
68
  git config --system core.autocrlf false
59
69
  git config --system core.eol lf
60
- - uses: actions/checkout@v3
70
+ - uses: actions/checkout@v4
61
71
  - uses: MSP-Greg/setup-ruby-pkgs@v1
62
72
  with:
63
73
  apt-get: _update_ build-essential cmake
64
74
  mingw: _upgrade_ cmake
75
+ brew: libiconv
65
76
  ruby-version: ${{ matrix.ruby }}
66
77
  bundler-cache: true
67
- - uses: actions/cache@v3
78
+ - uses: actions/cache@v4
68
79
  with:
69
80
  path: examples/ports/archives
70
- key: ${{ matrix.platform }}-examples-${{ hashFiles('examples/Rakefile') }}
81
+ key: examples-${{ hashFiles('examples/Rakefile') }}
71
82
  - run: bundle exec rake test:examples
83
+
84
+ fedora: # see https://github.com/flavorjones/mini_portile/issues/118
85
+ strategy:
86
+ fail-fast: false
87
+ matrix:
88
+ task: ["test:unit", "test:examples"]
89
+ runs-on: ubuntu-latest
90
+ container:
91
+ image: fedora:35
92
+ steps:
93
+ - run: |
94
+ dnf group install -y "C Development Tools and Libraries"
95
+ dnf install -y ruby ruby-devel libyaml-devel git-all patch cmake xz
96
+ - uses: actions/checkout@v4
97
+ - uses: actions/cache@v4
98
+ with:
99
+ path: examples/ports/archives
100
+ key: examples-${{ hashFiles('examples/Rakefile') }}
101
+ - run: bundle install
102
+ - run: bundle exec rake ${{ matrix.task }}
103
+
104
+ freebsd:
105
+ strategy:
106
+ fail-fast: false
107
+ matrix:
108
+ task: ["test:unit", "test:examples"]
109
+ runs-on: ubuntu-latest
110
+ env:
111
+ MAKE: gmake
112
+ steps:
113
+ - uses: actions/checkout@v4
114
+ - uses: actions/cache@v4
115
+ with:
116
+ path: examples/ports/archives
117
+ key: examples-${{ hashFiles('examples/Rakefile') }}
118
+ - uses: vmactions/freebsd-vm@v1
119
+ with:
120
+ envs: MAKE
121
+ usesh: true
122
+ copyback: false
123
+ prepare: pkg install -y ruby devel/ruby-gems pkgconf git cmake devel/gmake textproc/libyaml security/gnupg
124
+ run: |
125
+ git config --global --add safe.directory /home/runner/work/mini_portile/mini_portile
126
+ gem install bundler
127
+ bundle install
128
+ bundle exec rake ${{ matrix.task }}
129
+
130
+ openbsd:
131
+ strategy:
132
+ fail-fast: false
133
+ matrix:
134
+ task: ["test:unit", "test:examples"]
135
+ runs-on: ubuntu-latest
136
+ env:
137
+ MAKE: gmake
138
+ steps:
139
+ - uses: actions/checkout@v4
140
+ - uses: vmactions/openbsd-vm@v1
141
+ with:
142
+ envs: MAKE
143
+ usesh: true
144
+ copyback: false
145
+ prepare: |
146
+ pkg_add ruby%3.4 gmake cmake git pkgconf security/gnupg
147
+ ln -sf /usr/local/bin/ruby34 /usr/local/bin/ruby
148
+ ln -sf /usr/local/bin/bundle34 /usr/local/bin/bundle
149
+ ln -sf /usr/local/bin/bundler34 /usr/local/bin/bundler
150
+ ln -sf /usr/local/bin/erb34 /usr/local/bin/erb
151
+ ln -sf /usr/local/bin/gem34 /usr/local/bin/gem
152
+ ln -sf /usr/local/bin/irb34 /usr/local/bin/irb
153
+ ln -sf /usr/local/bin/racc34 /usr/local/bin/racc
154
+ ln -sf /usr/local/bin/rake34 /usr/local/bin/rake
155
+ ln -sf /usr/local/bin/rbs34 /usr/local/bin/rbs
156
+ ln -sf /usr/local/bin/rdbg34 /usr/local/bin/rdbg
157
+ ln -sf /usr/local/bin/rdoc34 /usr/local/bin/rdoc
158
+ ln -sf /usr/local/bin/ri34 /usr/local/bin/ri
159
+ ln -sf /usr/local/bin/syntax_suggest34 /usr/local/bin/syntax_suggest
160
+ ln -sf /usr/local/bin/typeprof34 /usr/local/bin/typeprof
161
+ run: |
162
+ git config --global --add safe.directory /home/runner/work/mini_portile/mini_portile
163
+ gem install bundler
164
+ bundle install
165
+ 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}}
@@ -0,0 +1,39 @@
1
+ name: upstream
2
+ concurrency:
3
+ group: "${{github.workflow}}-${{github.ref}}"
4
+ cancel-in-progress: true
5
+ on:
6
+ workflow_dispatch:
7
+ schedule:
8
+ - cron: "0 8 * * 5" # At 08:00 on Friday # https://crontab.guru/#0_8_*_*_5
9
+ pull_request:
10
+ types: [opened, synchronize]
11
+ branches:
12
+ - "*"
13
+ paths:
14
+ - .github/workflows/upstream.yml # this file
15
+
16
+ jobs:
17
+ test-unit:
18
+ env:
19
+ MAKEFLAGS: -j2
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ platform: [ubuntu-latest, windows-latest, macos-latest]
24
+ ruby: ["head"]
25
+ runs-on: ${{ matrix.platform }}
26
+ steps:
27
+ - name: configure git crlf on windows
28
+ if: matrix.platform == 'windows-latest'
29
+ run: |
30
+ git config --system core.autocrlf false
31
+ git config --system core.eol lf
32
+ - uses: actions/checkout@v4
33
+ - uses: MSP-Greg/setup-ruby-pkgs@v1
34
+ with:
35
+ apt-get: _update_ build-essential cmake
36
+ mingw: _upgrade_ cmake
37
+ ruby-version: ${{ matrix.ruby }}
38
+ bundler-cache: true
39
+ - run: bundle exec rake test:unit
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,71 @@
1
1
  ## mini_portile changelog
2
2
 
3
+ ### 2.8.9 / 2025-05-12
4
+
5
+ ### Ruby support
6
+
7
+ * Import only what's needed from `cgi`, for supporting Ruby 3.5. #160 @Earlopain
8
+
9
+
10
+ ### 2.8.8 / 2024-11-14
11
+
12
+ #### Improved
13
+
14
+ - Raise an exception with a clear error message when `xzcat` is needed but is not installed. (#152) @flavorjones
15
+
16
+
17
+ ### 2.8.7 / 2024-05-31
18
+
19
+ #### Added
20
+
21
+ - 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)
22
+ - Add support for extracting xz-compressed tarballs on OpenBSD. (#141 by @postmodern)
23
+ - Add OpenBSD support to the experimental method `MakeMakefile#mkmf_config`. (#141 by @flavorjones)
24
+
25
+
26
+ #### Changed
27
+
28
+ - `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)
29
+ - GPG file verification error messages are captured in the raised exception. Previously these errors went to `stderr`. (#145 by @flavorjones)
30
+
31
+
32
+ ### 2.8.6 / 2024-04-14
33
+
34
+ #### Added
35
+
36
+ - When using CMake on FreeBSD, default to clang's "cc" and "c++" compilers. (#139 by @mudge)
37
+
38
+
39
+ ### 2.8.5 / 2023-10-22
40
+
41
+ #### Added
42
+
43
+ - New methods `#lib_path` and `#include_path` which point at the installed directories under `ports`. (by @flavorjones)
44
+ - Add config param for CMAKE_BUILD_TYPE, which now defaults to `Release`. (#136 by @Watson1978)
45
+
46
+ #### Experimental
47
+
48
+ 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)
49
+
50
+ - With no arguments, will set up just `$INCFLAGS`, `$libs`, and `$LIBPATH`.
51
+ - Optionally, if provided a pkg-config file, will use that config to more precisely set `$INCFLAGS`, `$libs`, `$LIBPATH`, and `$CFLAGS`/`$CXXFLAGS`.
52
+ - Optionally, if provided the name of a static archive, will rewrite linker flags to ensure correct linkage.
53
+
54
+ 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.
55
+
56
+
57
+ ### 2.8.4 / 2023-07-18
58
+
59
+ - 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!)
60
+
61
+
62
+ ### 2.8.3 / 2023-07-18
63
+
64
+ #### Fixed
65
+
66
+ - cmake: only use MSYS/NMake generators when available. [#129] (Thanks, @stanhu!)
67
+
68
+
3
69
  ### 2.8.2 / 2023-04-30
4
70
 
5
71
  #### Fixed
data/Gemfile CHANGED
@@ -1,6 +1,18 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "net-ftp" if Gem::Requirement.new("> 3.1.0.dev").satisfied_by?(Gem::Version.new(RUBY_VERSION))
4
-
5
- # Specify your gem's dependencies in mini_portile2.gemspec
6
3
  gemspec
4
+
5
+ group :development do
6
+ gem "minitar", "0.9"
7
+ gem "minitest", "~> 5.15" # open range for ruby 2.3 support
8
+ gem "minitest-hooks", "1.5.2"
9
+ gem "rake", "13.2.1"
10
+ if RUBY_VERSION >= "3.4"
11
+ gem "webrick", git: "https://github.com/ruby/webrick" # shouldn't be necessary to pin once webrick 1.8.2 or 1.9.0 is released
12
+ else
13
+ gem "webrick"
14
+ end
15
+
16
+ gem "net-ftp" if Gem::Requirement.new("> 3.1.0.dev").satisfied_by?(Gem::Version.new(RUBY_VERSION))
17
+ gem "logger", "1.6.5" if Gem::Requirement.new("> 3.5.0.dev").satisfied_by?(Gem::Version.new(RUBY_VERSION))
18
+ end
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