From 6851ab010d838b08687bed605a42c51eb59c6765 Mon Sep 17 00:00:00 2001 From: star9029 Date: Sun, 8 Sep 2024 10:28:11 +0800 Subject: [PATCH] microsoft-proxy: add 3.0.0 version (#5157) * microsoft-proxy: add 3.0.0 version * add check --- packages/m/microsoft-proxy/xmake.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/m/microsoft-proxy/xmake.lua b/packages/m/microsoft-proxy/xmake.lua index a73d98135..83f53deb5 100644 --- a/packages/m/microsoft-proxy/xmake.lua +++ b/packages/m/microsoft-proxy/xmake.lua @@ -1,5 +1,4 @@ package("microsoft-proxy") - set_kind("library", {headeronly = true}) set_homepage("https://github.com/microsoft/proxy") set_description("Proxy: Easy Polymorphism in C++") @@ -8,11 +7,23 @@ package("microsoft-proxy") add_urls("https://github.com/microsoft/proxy/archive/refs/tags/$(version).tar.gz", "https://github.com/microsoft/proxy.git") + add_versions("3.0.0", "7e073e217e5572bc4c17ed5893273c80ea34c87e1406c853beeb9ca9bdda9733") add_versions("2.4.0", "7eed973655938d681a90dcc0c200e6cc1330ea8611a9c1a9e1b30439514443cb") add_versions("2.3.0", "ff6f17c5360895776d29ce2b1235de7b42912468b52729810506431e352a78d0") add_versions("2.2.1", "096f0b2d793dffc54d41def2bca0ced594b6b8efe35ac5ae27db35802e742b96") add_versions("1.1.1", "6852b135f0bb6de4dc723f76724794cff4e3d0d5706d09d0b2a4f749f309055d") + if on_check then + on_check("windows", function (package) + if package:version():ge("3.0.0") then + import("core.base.semver") + + local vs_toolset = package:toolchain("msvc"):config("vs_toolset") + assert(vs_toolset and semver.new(vs_toolset):minor() >= 30, "package(microsoft-proxy): need vs_toolset >= v143") + end + end) + end + on_install(function (package) os.cp("proxy.h", package:installdir("include")) end)