-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from fontist/maxirmx-next-gen
feat: manage libraries' versions through configuration file
- Loading branch information
Showing
9 changed files
with
119 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
libraries: | ||
zlib: | ||
all: | ||
version: "1.3.1" | ||
url: "http://zlib.net/fossils/zlib-1.3.1.tar.gz" | ||
sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" | ||
libexpat: | ||
all: | ||
version: "2.6.4" | ||
url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat-2.6.4.tar.gz" | ||
sha256: "fd03b7172b3bd7427a3e7a812063f74754f24542429b634e0db6511b53fb2278" | ||
# openssl: | ||
# version 3.x.y requires pod2man, that is not easily available on Windows | ||
openssl: | ||
windows: | ||
version: "1.1.1w" | ||
url: "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz" | ||
sha256: "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8" | ||
all: | ||
version: "3.3.2" | ||
url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz" | ||
sha256: "2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" | ||
# xz: | ||
# versions > 5.2.4 get crazy on MinGW | ||
# versions <= 5.2.5 do not support arm64-apple-darwin target | ||
# version 5.2.7 could not be linked statically to libarchive | ||
xz: | ||
windows: | ||
version: "5.2.4" | ||
url: "https://tukaani.org/xz/xz-5.2.4.tar.gz" | ||
sha256: "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145" | ||
all: | ||
version: "5.2.6" | ||
url: "https://tukaani.org/xz/xz-5.2.6.tar.gz" | ||
sha256: "a2105abee17bcd2ebd15ced31b4f5eda6e17efd6b10f921a01cda4a44c91b3a0" | ||
libarchive: | ||
all: | ||
version: "3.7.7" | ||
url: "https://www.libarchive.org/downloads/libarchive-3.7.7.tar.gz" | ||
sha256: "4cc540a3e9a1eebdefa1045d2e4184831100667e6d7d5b315bb1cbc951f8ddff" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require "psych" | ||
require "yaml" | ||
|
||
module LibarchiveBinary | ||
def self.libraries | ||
configuration_file = File.join(File.dirname(__FILE__), "..", "..", "ext", "configuration.yml") | ||
@@libraries ||= ::YAML.load_file(configuration_file)["libraries"] || {} | ||
rescue Psych::SyntaxError => e | ||
puts "Warning: The configuration file '#{configuration_file}' contains invalid YAML syntax." | ||
puts e.message | ||
exit 1 | ||
rescue StandardError => e | ||
puts "An unexpected error occurred while loading the configuration file '#{configuration_file}'." | ||
puts e.message | ||
exit 1 | ||
end | ||
|
||
def self.library_for(libname) | ||
if MiniPortile::windows? | ||
libraries[libname]["windows"] || libraries[libname]["all"] | ||
else | ||
libraries[libname]["all"] | ||
end | ||
rescue StandardError => e | ||
puts "Failed to load library configuration for '#{libname}'." | ||
puts e.message | ||
exit 1 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module LibarchiveBinary | ||
VERSION = "0.3.4" | ||
VERSION = "0.4.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters