From 07c576e6c9d091dfa24ba11a407ab54749530507 Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 27 Oct 2025 19:30:32 +0300 Subject: [PATCH 1/7] criterion: add version 2.4.3 --- packages/c/criterion/xmake.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/c/criterion/xmake.lua b/packages/c/criterion/xmake.lua index 902a56232c4..7fbc093cbce 100644 --- a/packages/c/criterion/xmake.lua +++ b/packages/c/criterion/xmake.lua @@ -6,6 +6,7 @@ package("criterion") add_urls("https://github.com/Snaipe/Criterion/archive/refs/tags/$(version).tar.gz", "https://github.com/Snaipe/Criterion.git") + add_versions("v2.4.3", "6d924ee5eeaaaed7762ab968f560b9ff543fc3473aa949bf53ac56a2a1a9416c") add_versions("v2.4.2", "83e1a39c8c519fbef0d64057dc61c8100b3a5741595788c9f094bba2eeeef0df") add_configs("i18n", {description = "Enable i18n", default = false, type = "boolean"}) From 4eaee0128c21867df0ba816991bb79a4332f9f01 Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 27 Oct 2025 20:19:10 +0300 Subject: [PATCH 2/7] criterion: update dependencies to use pkg-config for libgit2, openssl, pcre2, and llhttp --- packages/c/criterion/patch.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/c/criterion/patch.lua b/packages/c/criterion/patch.lua index 4a182de0f7d..dc49a19f3ac 100644 --- a/packages/c/criterion/patch.lua +++ b/packages/c/criterion/patch.lua @@ -7,9 +7,17 @@ function main(package) [[nanopb = dependency('nanopb', required: get_option('wrap_mode') == 'nofallback', method: 'cmake',]], [[nanopb = dependency('nanopb', method: 'pkg-config')]], {plain = true}) io.replace("meson.build", "modules: ['nanopb::protobuf-nanopb-static'])", "", {plain = true}) - io.replace("meson.build", - [[libgit2 = dependency('libgit2', required: get_option('wrap_mode') == 'nofallback')]], - [[libgit2 = dependency('libgit2', method: 'pkg-config')]], {plain = true}) + io.replace("meson.build", [[libgit2 = dependency('libgit2', required: get_option('wrap_mode') == 'nofallback')]], + [[libgit2 = dependency('libgit2', method: 'pkg-config') + openssl = dependency('openssl', method: 'pkg-config') + pcre2 = dependency('pcre2-8', 'libpcre2-8', method: 'pkg-config') + llhttp = dependency('llhttp', 'libllhttp', method: 'pkg-config')]], {plain = true}) + io.replace("meson.build", [[ libgit2, + nanomsg,]], [[ libgit2, + openssl, + pcre2, + llhttp, + nanomsg,]], {plain = true}) if package:is_plat("windows", "mingw") then io.replace("src/compat/path.c", "defined (HAVE_GETCWD)", "0", {plain = true}) io.replace("src/compat/path.c", "defined (HAVE_GETCURRENTDIRECTORY)", "1", {plain = true}) From 965a1c779a5c83db4655c7620206d2a9c804805c Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 27 Oct 2025 20:40:14 +0300 Subject: [PATCH 3/7] Update patch.lua --- packages/c/criterion/patch.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/c/criterion/patch.lua b/packages/c/criterion/patch.lua index dc49a19f3ac..1b485ddd31e 100644 --- a/packages/c/criterion/patch.lua +++ b/packages/c/criterion/patch.lua @@ -9,7 +9,7 @@ function main(package) io.replace("meson.build", "modules: ['nanopb::protobuf-nanopb-static'])", "", {plain = true}) io.replace("meson.build", [[libgit2 = dependency('libgit2', required: get_option('wrap_mode') == 'nofallback')]], [[libgit2 = dependency('libgit2', method: 'pkg-config') - openssl = dependency('openssl', method: 'pkg-config') + openssl = dependency('openssl', 'openssl3', method: 'pkg-config') pcre2 = dependency('pcre2-8', 'libpcre2-8', method: 'pkg-config') llhttp = dependency('llhttp', 'libllhttp', method: 'pkg-config')]], {plain = true}) io.replace("meson.build", [[ libgit2, From 2bd82c276e644cddf2aff223d42880f5b55fac0f Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 27 Oct 2025 21:02:21 +0300 Subject: [PATCH 4/7] criterion: update openssl dependency method to default --- packages/c/criterion/patch.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/c/criterion/patch.lua b/packages/c/criterion/patch.lua index 1b485ddd31e..2f45dc949b8 100644 --- a/packages/c/criterion/patch.lua +++ b/packages/c/criterion/patch.lua @@ -9,7 +9,7 @@ function main(package) io.replace("meson.build", "modules: ['nanopb::protobuf-nanopb-static'])", "", {plain = true}) io.replace("meson.build", [[libgit2 = dependency('libgit2', required: get_option('wrap_mode') == 'nofallback')]], [[libgit2 = dependency('libgit2', method: 'pkg-config') - openssl = dependency('openssl', 'openssl3', method: 'pkg-config') + openssl = dependency('openssl', 'openssl3') pcre2 = dependency('pcre2-8', 'libpcre2-8', method: 'pkg-config') llhttp = dependency('llhttp', 'libllhttp', method: 'pkg-config')]], {plain = true}) io.replace("meson.build", [[ libgit2, From 28363e3da821466acae6bc6630c36ca556ddd1ef Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 27 Oct 2025 21:52:52 +0300 Subject: [PATCH 5/7] remove Fedora-specific OpenSSL version adjustment in libgit2 installation --- packages/l/libgit2/xmake.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/l/libgit2/xmake.lua b/packages/l/libgit2/xmake.lua index 6073fed6e5d..9e3d3d99b0d 100644 --- a/packages/l/libgit2/xmake.lua +++ b/packages/l/libgit2/xmake.lua @@ -148,10 +148,6 @@ package("libgit2") table.insert(configs, "-DDLLTOOL=" .. dlltool) end import("package.tools.cmake").install(package, configs, opt) - if package:is_plat("linux") and linuxos.name() == "fedora" then - io.replace(path.join(package:installdir("lib/pkgconfig"), "libgit2.pc"), - "Requires.private: openssl ", "Requires.private: openssl3 ", {plain = true}) - end end) on_test(function (package) From 76127d24d40b5a50561144757c29064b97c9fac8 Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 27 Oct 2025 22:45:10 +0300 Subject: [PATCH 6/7] Try to pass OpenSSL3 next to Windows OS host --- packages/c/criterion/xmake.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/c/criterion/xmake.lua b/packages/c/criterion/xmake.lua index 7fbc093cbce..e374714bf7c 100644 --- a/packages/c/criterion/xmake.lua +++ b/packages/c/criterion/xmake.lua @@ -23,7 +23,8 @@ package("criterion") else add_deps("pkg-config") end - add_deps("debugbreak", "klib", "libffi", "nanopb", "nanomsg", "libgit2") + add_deps("debugbreak", "klib", "libffi", "nanopb", "nanomsg") + add_deps("libgit2", {configs = {https = "openssl3"}}) on_load(function (package) if package:is_plat("bsd") and package:config("shared") then From 6bddd1bc41e6699530d74a4809960710cf8d9e64 Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 27 Oct 2025 23:28:56 +0300 Subject: [PATCH 7/7] refactor: update dependency management for libgit2 and related packages --- packages/c/criterion/patch.lua | 24 +++++++++++++----------- packages/c/criterion/xmake.lua | 3 +-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/c/criterion/patch.lua b/packages/c/criterion/patch.lua index 2f45dc949b8..39a0baf7171 100644 --- a/packages/c/criterion/patch.lua +++ b/packages/c/criterion/patch.lua @@ -7,17 +7,19 @@ function main(package) [[nanopb = dependency('nanopb', required: get_option('wrap_mode') == 'nofallback', method: 'cmake',]], [[nanopb = dependency('nanopb', method: 'pkg-config')]], {plain = true}) io.replace("meson.build", "modules: ['nanopb::protobuf-nanopb-static'])", "", {plain = true}) - io.replace("meson.build", [[libgit2 = dependency('libgit2', required: get_option('wrap_mode') == 'nofallback')]], - [[libgit2 = dependency('libgit2', method: 'pkg-config') - openssl = dependency('openssl', 'openssl3') - pcre2 = dependency('pcre2-8', 'libpcre2-8', method: 'pkg-config') - llhttp = dependency('llhttp', 'libllhttp', method: 'pkg-config')]], {plain = true}) - io.replace("meson.build", [[ libgit2, - nanomsg,]], [[ libgit2, - openssl, - pcre2, - llhttp, - nanomsg,]], {plain = true}) + if not package:is_plat("windows", "mingw") then + io.replace("meson.build", [[libgit2 = dependency('libgit2', required: get_option('wrap_mode') == 'nofallback')]], + [[libgit2 = dependency('libgit2', method: 'pkg-config') + openssl = dependency('openssl', 'openssl3') + pcre2 = dependency('pcre2-8', 'libpcre2-8', method: 'pkg-config') + llhttp = dependency('llhttp', 'libllhttp', method: 'pkg-config')]], {plain = true}) + io.replace("meson.build", [[ libgit2, + nanomsg,]], [[ libgit2, + openssl, + pcre2, + llhttp, + nanomsg,]], {plain = true}) + end if package:is_plat("windows", "mingw") then io.replace("src/compat/path.c", "defined (HAVE_GETCWD)", "0", {plain = true}) io.replace("src/compat/path.c", "defined (HAVE_GETCURRENTDIRECTORY)", "1", {plain = true}) diff --git a/packages/c/criterion/xmake.lua b/packages/c/criterion/xmake.lua index e374714bf7c..7fbc093cbce 100644 --- a/packages/c/criterion/xmake.lua +++ b/packages/c/criterion/xmake.lua @@ -23,8 +23,7 @@ package("criterion") else add_deps("pkg-config") end - add_deps("debugbreak", "klib", "libffi", "nanopb", "nanomsg") - add_deps("libgit2", {configs = {https = "openssl3"}}) + add_deps("debugbreak", "klib", "libffi", "nanopb", "nanomsg", "libgit2") on_load(function (package) if package:is_plat("bsd") and package:config("shared") then