mini_portile2 2.8.5.rc2 → 2.8.5
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 +4 -4
- data/CHANGELOG.md +13 -6
- data/README.md +15 -2
- data/lib/mini_portile2/mini_portile.rb +2 -2
- data/lib/mini_portile2/mini_portile_cmake.rb +7 -1
- data/lib/mini_portile2/version.rb +1 -1
- data/mini_portile2.gemspec +7 -6
- data/test/test_cmake.rb +17 -3
- metadata +9 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f53843a25ac2651fd9970c34a44edf44de0904f99d9e63eadb3802f8dcd59bc
|
|
4
|
+
data.tar.gz: 075527f5c56f12de2ba5e3dfd72965a0093f62558eabb02571be5aee61cbe9f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e251640701cf8ea166e1ce6725b8e7bf3d3dbf20a659a6b90ffe127667a80f908fab5b7f816f8a766edd4166464d5375c53a3c31c862a4a7a04e0e87929127d
|
|
7
|
+
data.tar.gz: 1d540e216342ef799de2188935d6de440b865606a244dd7ca6a27146a259bf5a1211c53b49668eee668187770e5e030d06508b4605779c4366999dcf831cc2b3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
## mini_portile changelog
|
|
2
2
|
|
|
3
|
-
### 2.8.5
|
|
3
|
+
### 2.8.5 / 2023-10-22
|
|
4
4
|
|
|
5
5
|
#### Added
|
|
6
6
|
|
|
7
|
-
- New
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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.
|
|
12
19
|
|
|
13
20
|
|
|
14
21
|
### 2.8.4 / 2023-07-18
|
data/README.md
CHANGED
|
@@ -138,8 +138,8 @@ This is configurable as above, except for Windows systems where it's hardcoded t
|
|
|
138
138
|
The cmake command used is configurable, and in order of preference will use:
|
|
139
139
|
|
|
140
140
|
- the `CMAKE` environment variable (if present)
|
|
141
|
-
- the
|
|
142
|
-
- `"cmake"`
|
|
141
|
+
- the `:cmake_command` keyword argument passed into the constructor
|
|
142
|
+
- `"cmake"` (the default)
|
|
143
143
|
|
|
144
144
|
You can pass it in like so:
|
|
145
145
|
|
|
@@ -147,6 +147,19 @@ You can pass it in like so:
|
|
|
147
147
|
MiniPortileCMake.new("libfoobar", "1.3.5", cmake_command: "cmake3")
|
|
148
148
|
```
|
|
149
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
|
+
```
|
|
150
163
|
|
|
151
164
|
### Local source directories
|
|
152
165
|
|
|
@@ -32,9 +32,9 @@ $MINI_PORTILE_STATIC_LIBS = {}
|
|
|
32
32
|
class MiniPortile
|
|
33
33
|
DEFAULT_TIMEOUT = 10
|
|
34
34
|
|
|
35
|
-
attr_reader :name, :version, :original_host
|
|
35
|
+
attr_reader :name, :version, :original_host, :source_directory
|
|
36
36
|
attr_writer :configure_options
|
|
37
|
-
attr_accessor :host, :files, :patch_files, :target, :logger
|
|
37
|
+
attr_accessor :host, :files, :patch_files, :target, :logger
|
|
38
38
|
|
|
39
39
|
def self.windows?
|
|
40
40
|
target_os =~ /mswin|mingw/
|
|
@@ -11,6 +11,7 @@ class MiniPortileCMake < MiniPortile
|
|
|
11
11
|
def initialize(name, version, **kwargs)
|
|
12
12
|
super(name, version, **kwargs)
|
|
13
13
|
@cmake_command = kwargs[:cmake_command]
|
|
14
|
+
@cmake_build_type = kwargs[:cmake_build_type]
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
def configure_defaults
|
|
@@ -49,6 +50,10 @@ class MiniPortileCMake < MiniPortile
|
|
|
49
50
|
(ENV["CMAKE"] || @cmake_command || "cmake").dup
|
|
50
51
|
end
|
|
51
52
|
|
|
53
|
+
def cmake_build_type
|
|
54
|
+
(ENV["CMAKE_BUILD_TYPE"] || @cmake_build_type || "Release").dup
|
|
55
|
+
end
|
|
56
|
+
|
|
52
57
|
private
|
|
53
58
|
|
|
54
59
|
def generator_defaults
|
|
@@ -69,7 +74,8 @@ class MiniPortileCMake < MiniPortile
|
|
|
69
74
|
"-DCMAKE_SYSTEM_NAME=#{cmake_system_name}",
|
|
70
75
|
"-DCMAKE_SYSTEM_PROCESSOR=#{cpu_type}",
|
|
71
76
|
"-DCMAKE_C_COMPILER=#{c_compiler}",
|
|
72
|
-
"-DCMAKE_CXX_COMPILER=#{cxx_compiler}"
|
|
77
|
+
"-DCMAKE_CXX_COMPILER=#{cxx_compiler}",
|
|
78
|
+
"-DCMAKE_BUILD_TYPE=#{cmake_build_type}",
|
|
73
79
|
]
|
|
74
80
|
end
|
|
75
81
|
|
data/mini_portile2.gemspec
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require "mini_portile2/version"
|
|
1
|
+
require_relative "lib/mini_portile2/version"
|
|
5
2
|
|
|
6
3
|
Gem::Specification.new do |spec|
|
|
7
4
|
spec.name = "mini_portile2"
|
|
@@ -10,8 +7,12 @@ Gem::Specification.new do |spec|
|
|
|
10
7
|
spec.authors = ["Luis Lavena", "Mike Dalessio", "Lars Kanis"]
|
|
11
8
|
spec.email = "mike.dalessio@gmail.com"
|
|
12
9
|
|
|
13
|
-
spec.summary = "
|
|
14
|
-
spec.description =
|
|
10
|
+
spec.summary = "Simple autoconf and cmake builder for developers"
|
|
11
|
+
spec.description = <<~TEXT
|
|
12
|
+
Simple autoconf and cmake builder for developers. It provides a standard way to compile against
|
|
13
|
+
dependency libraries without requiring system-wide installation. It also simplifies
|
|
14
|
+
vendoring and cross-compilation by providing a consistent build interface.
|
|
15
|
+
TEXT
|
|
15
16
|
|
|
16
17
|
spec.homepage = "https://github.com/flavorjones/mini_portile"
|
|
17
18
|
spec.licenses = ["MIT"]
|
data/test/test_cmake.rb
CHANGED
|
@@ -96,7 +96,8 @@ class TestCMakeConfig < TestCMake
|
|
|
96
96
|
"-DCMAKE_SYSTEM_NAME=Darwin",
|
|
97
97
|
"-DCMAKE_SYSTEM_PROCESSOR=arm64",
|
|
98
98
|
"-DCMAKE_C_COMPILER=some-host-clang",
|
|
99
|
-
"-DCMAKE_CXX_COMPILER=some-host-clang++"
|
|
99
|
+
"-DCMAKE_CXX_COMPILER=some-host-clang++",
|
|
100
|
+
"-DCMAKE_BUILD_TYPE=Release"
|
|
100
101
|
],
|
|
101
102
|
recipe.configure_defaults)
|
|
102
103
|
end
|
|
@@ -119,7 +120,8 @@ class TestCMakeConfig < TestCMake
|
|
|
119
120
|
"-DCMAKE_SYSTEM_NAME=Custom",
|
|
120
121
|
"-DCMAKE_SYSTEM_PROCESSOR=x86_64",
|
|
121
122
|
"-DCMAKE_C_COMPILER=gcc",
|
|
122
|
-
"-DCMAKE_CXX_COMPILER=g++"
|
|
123
|
+
"-DCMAKE_CXX_COMPILER=g++",
|
|
124
|
+
"-DCMAKE_BUILD_TYPE=Release"
|
|
123
125
|
],
|
|
124
126
|
recipe.configure_defaults)
|
|
125
127
|
end
|
|
@@ -194,6 +196,17 @@ class TestCMakeConfig < TestCMake
|
|
|
194
196
|
end
|
|
195
197
|
end
|
|
196
198
|
|
|
199
|
+
def test_cmake_build_type_configuration
|
|
200
|
+
without_env("CMAKE_BUILD_TYPE") do
|
|
201
|
+
assert_equal("Release", MiniPortileCMake.new("test", "1.0.0").cmake_build_type)
|
|
202
|
+
assert_equal("xyzzy", MiniPortileCMake.new("test", "1.0.0", cmake_build_type: "xyzzy").cmake_build_type)
|
|
203
|
+
end
|
|
204
|
+
with_env("CMAKE_BUILD_TYPE"=>"Debug") do
|
|
205
|
+
assert_equal("Debug", MiniPortileCMake.new("test", "1.0.0").cmake_build_type)
|
|
206
|
+
assert_equal("Debug", MiniPortileCMake.new("test", "1.0.0", cmake_build_type: "xyzzy").cmake_build_type)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
197
210
|
private
|
|
198
211
|
|
|
199
212
|
def with_stubbed_target(os: 'linux', cpu: 'x86_64')
|
|
@@ -227,7 +240,8 @@ class TestCMakeConfig < TestCMake
|
|
|
227
240
|
"-DCMAKE_SYSTEM_NAME=Linux",
|
|
228
241
|
"-DCMAKE_SYSTEM_PROCESSOR=x86_64",
|
|
229
242
|
"-DCMAKE_C_COMPILER=gcc",
|
|
230
|
-
"-DCMAKE_CXX_COMPILER=g++"
|
|
243
|
+
"-DCMAKE_CXX_COMPILER=g++",
|
|
244
|
+
"-DCMAKE_BUILD_TYPE=Release"
|
|
231
245
|
]
|
|
232
246
|
end
|
|
233
247
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mini_portile2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.8.5
|
|
4
|
+
version: 2.8.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luis Lavena
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2023-
|
|
13
|
+
date: 2023-10-22 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|
|
@@ -96,9 +96,10 @@ dependencies:
|
|
|
96
96
|
- - "~>"
|
|
97
97
|
- !ruby/object:Gem::Version
|
|
98
98
|
version: '1.7'
|
|
99
|
-
description:
|
|
100
|
-
and
|
|
101
|
-
system.
|
|
99
|
+
description: |
|
|
100
|
+
Simple autoconf and cmake builder for developers. It provides a standard way to compile against
|
|
101
|
+
dependency libraries without requiring system-wide installation. It also simplifies
|
|
102
|
+
vendoring and cross-compilation by providing a consistent build interface.
|
|
102
103
|
email: mike.dalessio@gmail.com
|
|
103
104
|
executables: []
|
|
104
105
|
extensions: []
|
|
@@ -155,14 +156,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
155
156
|
version: 2.3.0
|
|
156
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
158
|
requirements:
|
|
158
|
-
- - "
|
|
159
|
+
- - ">="
|
|
159
160
|
- !ruby/object:Gem::Version
|
|
160
|
-
version:
|
|
161
|
+
version: '0'
|
|
161
162
|
requirements: []
|
|
162
163
|
rubygems_version: 3.4.19
|
|
163
164
|
signing_key:
|
|
164
165
|
specification_version: 4
|
|
165
|
-
summary:
|
|
166
|
+
summary: Simple autoconf and cmake builder for developers
|
|
166
167
|
test_files:
|
|
167
168
|
- test/assets/git/config
|
|
168
169
|
- test/assets/gpg-fixtures/data
|