mini_portile2 2.4.0 → 2.8.5

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: d6db14d6088d4c74bbc5d10fa15a32af4ba33beb9eb524be48015116e605cd2b
4
- data.tar.gz: f4b26f092c63df9cef6b0ef229285cc702c815ccdbf2a61d0a3c9567ba036b76
3
+ metadata.gz: 8f53843a25ac2651fd9970c34a44edf44de0904f99d9e63eadb3802f8dcd59bc
4
+ data.tar.gz: 075527f5c56f12de2ba5e3dfd72965a0093f62558eabb02571be5aee61cbe9f5
5
5
  SHA512:
6
- metadata.gz: 345a62f6f547189901abafa3d7fd2d48b0b600a2c8a3863151a42a5460ab2ea1f2168785cf0eeabaa1075d1c8e35559d9d3b69b8399ea79907988eabf2af4787
7
- data.tar.gz: 6b0a083c6044ffa76427338a11719fc71d1673dea51b21fc2533fdab216ebff5f9e45eb8a96edd0edf930b439ae7e58c2baa70cbdf659d53713539512f7e6b3a
6
+ metadata.gz: 0e251640701cf8ea166e1ce6725b8e7bf3d3dbf20a659a6b90ffe127667a80f908fab5b7f816f8a766edd4166464d5375c53a3c31c862a4a7a04e0e87929127d
7
+ data.tar.gz: 1d540e216342ef799de2188935d6de440b865606a244dd7ca6a27146a259bf5a1211c53b49668eee668187770e5e030d06508b4605779c4366999dcf831cc2b3
@@ -0,0 +1,2 @@
1
+ github: flavorjones
2
+ tidelift: rubygems/mini_portile2
@@ -0,0 +1,88 @@
1
+ name: Continuous Integration
2
+ concurrency:
3
+ group: "${{github.workflow}}-${{github.ref}}"
4
+ cancel-in-progress: true
5
+ on:
6
+ workflow_dispatch:
7
+ push:
8
+ branches:
9
+ - main
10
+ - v*.*.x
11
+ tags:
12
+ - v*.*.*
13
+ pull_request:
14
+ types: [opened, synchronize]
15
+ branches:
16
+ - "*"
17
+ schedule:
18
+ - cron: "0 8 * * 5" # At 08:00 on Friday # https://crontab.guru/#0_8_*_*_5
19
+
20
+ jobs:
21
+ test-unit:
22
+ env:
23
+ MAKEFLAGS: -j2
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
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"]
29
+ runs-on: ${{ matrix.platform }}
30
+ steps:
31
+ - name: configure git crlf on windows
32
+ if: matrix.platform == 'windows-latest'
33
+ run: |
34
+ git config --system core.autocrlf false
35
+ git config --system core.eol lf
36
+ - uses: actions/checkout@v3
37
+ - uses: MSP-Greg/setup-ruby-pkgs@v1
38
+ with:
39
+ apt-get: _update_ build-essential cmake
40
+ mingw: _upgrade_ cmake
41
+ ruby-version: ${{ matrix.ruby }}
42
+ bundler-cache: true
43
+ - run: bundle exec rake test:unit
44
+
45
+ test-examples:
46
+ env:
47
+ MAKEFLAGS: -j2
48
+ strategy:
49
+ fail-fast: false
50
+ matrix:
51
+ platform: [ubuntu-latest, windows-latest, macos-latest]
52
+ ruby: ["3.1"]
53
+ runs-on: ${{ matrix.platform }}
54
+ steps:
55
+ - name: configure git crlf on windows
56
+ if: matrix.platform == 'windows-latest'
57
+ run: |
58
+ git config --system core.autocrlf false
59
+ git config --system core.eol lf
60
+ - uses: actions/checkout@v3
61
+ - uses: MSP-Greg/setup-ruby-pkgs@v1
62
+ with:
63
+ apt-get: _update_ build-essential cmake
64
+ mingw: _upgrade_ cmake
65
+ ruby-version: ${{ matrix.ruby }}
66
+ bundler-cache: true
67
+ - uses: actions/cache@v3
68
+ with:
69
+ path: examples/ports/archives
70
+ key: examples-${{ hashFiles('examples/Rakefile') }}
71
+ - run: bundle exec rake test:examples
72
+
73
+ fedora: # see https://github.com/flavorjones/mini_portile/issues/118
74
+ runs-on: ubuntu-latest
75
+ container:
76
+ image: fedora:35
77
+ steps:
78
+ - run: |
79
+ dnf group install -y "C Development Tools and Libraries"
80
+ dnf install -y ruby ruby-devel libyaml-devel git-all patch cmake xz
81
+ - uses: actions/checkout@v3
82
+ - uses: actions/cache@v3
83
+ with:
84
+ path: examples/ports/archives
85
+ key: examples-${{ hashFiles('examples/Rakefile') }}
86
+ - run: bundle install
87
+ - run: bundle exec rake test:unit
88
+ - run: bundle exec rake test:examples
data/.gitignore CHANGED
@@ -1,7 +1,6 @@
1
- pkg
2
- tmp
3
- Gemfile.lock
4
1
  .bundle
2
+ Gemfile.lock
3
+ pkg
5
4
  ports
6
- concourse/private.yml
7
- concourse/mini_portile.final.yml
5
+ tmp
6
+ mkmf.log
data/CHANGELOG.md CHANGED
@@ -1,3 +1,120 @@
1
+ ## mini_portile changelog
2
+
3
+ ### 2.8.5 / 2023-10-22
4
+
5
+ #### Added
6
+
7
+ - New methods `#lib_path` and `#include_path` which point at the installed directories under `ports`. (by @flavorjones)
8
+ - Add config param for CMAKE_BUILD_TYPE, which now defaults to `Release`. (#136 by @Watson1978)
9
+
10
+ #### Experimental
11
+
12
+ 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)
13
+
14
+ - With no arguments, will set up just `$INCFLAGS`, `$libs`, and `$LIBPATH`.
15
+ - Optionally, if provided a pkg-config file, will use that config to more precisely set `$INCFLAGS`, `$libs`, `$LIBPATH`, and `$CFLAGS`/`$CXXFLAGS`.
16
+ - Optionally, if provided the name of a static archive, will rewrite linker flags to ensure correct linkage.
17
+
18
+ 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.
19
+
20
+
21
+ ### 2.8.4 / 2023-07-18
22
+
23
+ - 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!)
24
+
25
+
26
+ ### 2.8.3 / 2023-07-18
27
+
28
+ #### Fixed
29
+
30
+ - cmake: only use MSYS/NMake generators when available. [#129] (Thanks, @stanhu!)
31
+
32
+
33
+ ### 2.8.2 / 2023-04-30
34
+
35
+ #### Fixed
36
+
37
+ - Ensure that the `source_directory` option will work when given a Windows path to an autoconf directory. [#126]
38
+
39
+
40
+ ### 2.8.1 / 2022-12-24
41
+
42
+ #### Fixed
43
+
44
+ - Support applying patches via `git apply` even when the working directory resembles a git directory. [#119] (Thanks, @h0tw1r3!)
45
+
46
+
47
+ ### 2.8.0 / 2022-02-20
48
+
49
+ #### Added
50
+
51
+ - Support xz-compressed archives (recognized by an `.xz` file extension).
52
+ - When downloading a source archive, default open_timeout and read_timeout to 10 seconds, but allow configuration via open_timeout and read_timeout config parameters.
53
+
54
+
55
+ ### 2.7.1 / 2021-10-20
56
+
57
+ #### Packaging
58
+
59
+ A test artifact that has been included in the gem was being flagged by some users' security scanners because it wasn't a real tarball. That artifact has been updated to be a real tarball. [#108]
60
+
61
+
62
+ ### 2.7.0 / 2021-08-31
63
+
64
+ #### Added
65
+
66
+ The commands used for "make", "compile", and "cmake" are configurable via keyword arguments. [#107] (Thanks, @cosmo0920!)
67
+
68
+
69
+ ### 2.6.1 / 2021-05-31
70
+
71
+ #### Dependencies
72
+
73
+ Make `net-ftp` an optional dependency, since requiring it as a hard dependency in v2.5.2 caused warnings to be emitted by Ruby 2.7 and earlier. A warning message is emitted if FTP functionality is called and `net-ftp` isn't available; this should only happen in Ruby 3.1 and later.
74
+
75
+
76
+ ### 2.5.3 / 2021-05-31
77
+
78
+ #### Dependencies
79
+
80
+ Make `net-ftp` an optional dependency, since requiring it as a hard dependency in v2.5.2 caused warnings to be emitted by Ruby 2.7 and earlier. A warning message is emitted if FTP functionality is called and `net-ftp` isn't available; this should only happen in Ruby 3.1 and later.
81
+
82
+
83
+ ### 2.6.0 / 2021-05-31
84
+
85
+ ### Added
86
+
87
+ Recipes may build against a local directory by specifying `source_directory` instead of `files`. In
88
+ particular, this may be useful for debugging problems with the upstream dependency (e.g., use `git
89
+ bisect` in a local clone) or for continuous integration with upstream HEAD.
90
+
91
+
92
+ ### 2.5.2 / 2021-05-28
93
+
94
+ #### Dependencies
95
+
96
+ Add `net-ftp` as an explicit dependency to accommodate the upcoming Ruby 3.1 changes that move this and other gems out of the "default" gem set and into the "bundled" gem set. See https://bugs.ruby-lang.org/issues/17873 [#101]
97
+
98
+
99
+ ### 2.5.1 / 2021-04-28
100
+
101
+ #### Dependencies
102
+
103
+ This release ends support for ruby < 2.3.0. If you're on 2.2.x or earlier, we strongly suggest that you find the time to upgrade, because [official support for Ruby 2.2 ended on 2018-03-31](https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/).
104
+
105
+ #### Enhancements
106
+
107
+ * `MiniPortile.execute` now takes an optional `:env` hash, which is merged into the environment variables for the subprocess. Likely this is only useful for specialized use cases. [#99]
108
+ * Experimental support for cmake-based projects extended to Windows. (Thanks, @larskanis!)
109
+
110
+
111
+ ### 2.5.0 / 2020-02-24
112
+
113
+ #### Enhancements
114
+
115
+ * When verifying GPG signatures, remove all imported pubkeys from keyring [#90] (Thanks, @hanazuki!)
116
+
117
+
1
118
  ### 2.4.0 / 2018-12-02
2
119
 
3
120
  #### Enhancements
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
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
+
3
5
  # Specify your gem's dependencies in mini_portile2.gemspec
4
6
  gemspec
data/README.md CHANGED
@@ -5,8 +5,8 @@ renamed to `mini_portile2`. For mini_portile versions 0.6.x and
5
5
  previous, please visit
6
6
  [the v0.6.x branch](https://github.com/flavorjones/mini_portile/tree/v0.6.x).
7
7
 
8
- [![travis status](https://travis-ci.org/flavorjones/mini_portile.svg?branch=master)](https://travis-ci.org/flavorjones/mini_portile?branch=master)
9
- [![appveyor status](https://ci.appveyor.com/api/projects/status/509669xx1qlhqqab/branch/master?svg=true)](https://ci.appveyor.com/project/flavorjones/mini-portile/branch/master)
8
+ [![Continuous Integration](https://github.com/flavorjones/mini_portile/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/flavorjones/mini_portile/actions/workflows/ci.yml)
9
+ [![Tidelift dependencies](https://tidelift.com/badges/package/rubygems/mini_portile2)](https://tidelift.com/subscription/pkg/rubygems-mini.portile2?utm_source=undefined&utm_medium=referral&utm_campaign=readme)
10
10
 
11
11
  * Documentation: http://www.rubydoc.info/github/flavorjones/mini_portile
12
12
  * Source Code: https://github.com/flavorjones/mini_portile
@@ -83,11 +83,95 @@ library into a namespaced structure.
83
83
  `#activate` ensures GCC will find this library and prefer it over a
84
84
  system-wide installation.
85
85
 
86
+ Some keyword arguments can be passed to the constructor to configure the commands used:
87
+
88
+ #### `gcc_command`
89
+
90
+ The compiler command that is used is configurable, and in order of preference will use:
91
+
92
+ - the `CC` environment variable (if present)
93
+ - the `gcc_command` value passed in to the constructor
94
+ - `RbConfig::CONFIG["CC"]`
95
+ - `"gcc"`
96
+
97
+ You can pass it in like so:
98
+
99
+ ``` ruby
100
+ MiniPortile.new("libiconv", "1.13.1", gcc_command: "cc")
101
+ ```
102
+
103
+ #### `make_command`
104
+
105
+ The configuration/make command that is used is configurable, and in order of preference will use:
106
+
107
+ - the `MAKE` environment variable (if present)
108
+ - the `make_command` value passed in to the constructor
109
+ - the `make` environment variable (if present)
110
+ - `"make"`
111
+
112
+ You can pass it in like so:
113
+
114
+ ``` ruby
115
+ MiniPortile.new("libiconv", "1.13.1", make_command: "nmake")
116
+ ```
117
+
118
+ #### `open_timeout`, `read_timeout`
119
+
120
+ By default, when downloading source archives, MiniPortile will use a timeout value of 10
121
+ seconds. This can be overridden by passing a different value (in seconds):
122
+
123
+ ``` ruby
124
+ MiniPortile.new("libiconv", "1.13.1", open_timeout: 99, read_timeout: 2)
125
+ ```
126
+
86
127
 
87
128
  ### How to use (for cmake projects)
88
129
 
89
130
  Same as above, but instead of `MiniPortile.new`, call `MiniPortileCMake.new`.
90
131
 
132
+ #### `make_command`
133
+
134
+ This is configurable as above, except for Windows systems where it's hardcoded to `"nmake"`.
135
+
136
+ #### `cmake_command`
137
+
138
+ The cmake command used is configurable, and in order of preference will use:
139
+
140
+ - the `CMAKE` environment variable (if present)
141
+ - the `:cmake_command` keyword argument passed into the constructor
142
+ - `"cmake"` (the default)
143
+
144
+ You can pass it in like so:
145
+
146
+ ``` ruby
147
+ MiniPortileCMake.new("libfoobar", "1.3.5", cmake_command: "cmake3")
148
+ ```
149
+
150
+ #### `cmake_build_type`
151
+
152
+ The cmake build type is configurable as of v2.8.5, and in order of preference will use:
153
+
154
+ - the `CMAKE_BUILD_TYPE` environment variable (if present)
155
+ - the `:cmake_build_type` keyword argument passed into the constructor
156
+ - `"Release"` (the default)
157
+
158
+ You can pass it in like so:
159
+
160
+ ``` ruby
161
+ MiniPortileCMake.new("libfoobar", "1.3.5", cmake_build_type: "Debug")
162
+ ```
163
+
164
+ ### Local source directories
165
+
166
+ Instead of downloading a remote file, you can also point mini_portile2 at a local source
167
+ directory. In particular, this may be useful for testing or debugging:
168
+
169
+ ``` ruby
170
+ gem "mini_portile2", "~> 2.0.0" # NECESSARY if used in extconf.rb. see below.
171
+ require "mini_portile2"
172
+ recipe = MiniPortile.new("libiconv", "1.13.1")
173
+ recipe.source_directory = "/path/to/local/source/for/library-1.2.3"
174
+ ```
91
175
 
92
176
  ### Directory Structure Conventions
93
177
 
@@ -240,6 +324,22 @@ toolchain. This has been tested against Ubuntu, OSX and even Windows
240
324
  (RubyInstaller with DevKit)
241
325
 
242
326
 
327
+ ## Support
328
+
329
+ The bug tracker is available here:
330
+
331
+ * https://github.com/flavorjones/mini_portile/issues
332
+
333
+ Consider subscribing to [Tidelift][tidelift] which provides license assurances and timely security notifications for your open source dependencies, including Loofah. [Tidelift][tidelift] subscriptions also help the Loofah maintainers fund our [automated testing](https://ci.nokogiri.org) which in turn allows us to ship releases, bugfixes, and security updates more often.
334
+
335
+ [tidelift]: https://tidelift.com/subscription/pkg/rubygems-mini.portile2?utm_source=rubygems-mini.portile2&utm_medium=referral&utm_campaign=enterprise
336
+
337
+
338
+ ## Security
339
+
340
+ See [`SECURITY.md`](SECURITY.md) for vulnerability reporting details.
341
+
342
+
243
343
  ## License
244
344
 
245
345
  This library is licensed under MIT license. Please see LICENSE.txt for details.
data/Rakefile CHANGED
@@ -1,11 +1,10 @@
1
1
  require "rake/clean"
2
- require 'bundler/gem_tasks'
3
- require 'concourse'
2
+ require "bundler/gem_tasks"
4
3
 
5
4
  namespace :test do
6
5
  desc "Test MiniPortile by running unit tests"
7
6
  task :unit do
8
- sh "ruby -w -W2 -I. -Ilib -e \"#{Dir["test/test_*.rb"].map{|f| "require '#{f}';"}.join}\" -- #{ENV['TESTOPTS']} -v"
7
+ sh "ruby -w -W2 -I. -Ilib -e \"#{Dir["test/test_*.rb"].map { |f| "require '#{f}';" }.join}\" -- #{ENV["TESTOPTS"]} -v"
9
8
  end
10
9
 
11
10
  desc "Test MiniPortile by compiling examples"
@@ -24,6 +23,3 @@ desc "Run all tests"
24
23
  task :test => ["test:unit", "test:examples"]
25
24
 
26
25
  task :default => [:test]
27
-
28
-
29
- Concourse.new("mini_portile").create_tasks!
data/SECURITY.md ADDED
@@ -0,0 +1,13 @@
1
+ # Security and Vulnerability Reporting
2
+
3
+ The mini_portile core contributors take security very seriously and investigate all reported vulnerabilities.
4
+
5
+ If you would like to report a vulnerablity or have a security concern regarding mini_portile, please [report it via Tidelift](https://tidelift.com/security).
6
+
7
+ Your report will be acknowledged within 48 hours, and you'll receive a more detailed response within 96 hours indicating next steps in handling your report.
8
+
9
+ If you have not received a reply to your submission within 96 hours, Contact the current security coordinator, Mike Dalessio <mike.dalessio@gmail.com>.
10
+
11
+ The information you share with the mini_portile core contributors as part of this process will be kept confidential within the team, unless or until we need to share information upstream with our dependent libraries' core teams, at which point we will notify you.
12
+
13
+ If a vulnerability is first reported by you, we will credit you with the discovery in the public disclosure.