From 0249a3dc2f3522ed725c875e8a6f2be94adddadb Mon Sep 17 00:00:00 2001 From: jiayuehua <3423893+jiayuehua@users.noreply.github.com> Date: Sat, 19 Oct 2024 14:03:34 +0800 Subject: [PATCH] fix SCN_HAS_STD_REGEX_MULTILINE marco --- ...ix-SCN_HAS_STD_REGEX_MULTILINE-marco.patch | 21 +++++++++++++++++++ ports/scnlib/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/s-/scnlib.json | 5 +++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ports/scnlib/fix-SCN_HAS_STD_REGEX_MULTILINE-marco.patch diff --git a/ports/scnlib/fix-SCN_HAS_STD_REGEX_MULTILINE-marco.patch b/ports/scnlib/fix-SCN_HAS_STD_REGEX_MULTILINE-marco.patch new file mode 100644 index 00000000000000..9ec99b17e03055 --- /dev/null +++ b/ports/scnlib/fix-SCN_HAS_STD_REGEX_MULTILINE-marco.patch @@ -0,0 +1,21 @@ +diff --git a/include/scn/fwd.h b/include/scn/fwd.h +index 9b4892f..018a4f4 100644 +--- a/include/scn/fwd.h ++++ b/include/scn/fwd.h +@@ -739,11 +739,11 @@ SCN_GCC_POP + #endif + + // Detect std::regex_constants::multiline: +-// libc++ 15 and later, or libstdc++ 11.4 or later +-// (2021-09-29 is the date of the commit introducing `multiline`, +-// libstdc++ doesn't support checking for minor versions) +-#if SCN_STDLIB_LIBCPP >= 15000 || SCN_STDLIB_GLIBCXX >= 12 || \ +- (SCN_STDLIB_GLIBCXX == 11 && __GLIBCXX__ >= 20210929L) ++// libc++ 15 and later, or libstdc++ 12 or later ++ ++ ++#if SCN_STDLIB_LIBCPP >= 15000 || SCN_STDLIB_GLIBCXX >= 12 ++ + #define SCN_HAS_STD_REGEX_MULTILINE 1 + #else + #define SCN_HAS_STD_REGEX_MULTILINE 0 diff --git a/ports/scnlib/vcpkg.json b/ports/scnlib/vcpkg.json index 988e53f36e4d2f..2b4a2907b823fa 100644 --- a/ports/scnlib/vcpkg.json +++ b/ports/scnlib/vcpkg.json @@ -1,6 +1,7 @@ { "name": "scnlib", "version": "3.0.1", + "port-version": 1, "description": "scnlib is a modern C++ library for replacing scanf and std::istream", "homepage": "https://scnlib.dev/", "license": "Apache-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index bc5cd6adb92291..065d8e992cb2c7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8106,7 +8106,7 @@ }, "scnlib": { "baseline": "3.0.1", - "port-version": 0 + "port-version": 1 }, "scope-guard": { "baseline": "1.1.0", diff --git a/versions/s-/scnlib.json b/versions/s-/scnlib.json index dc1e776c2b1897..e863b456000e36 100644 --- a/versions/s-/scnlib.json +++ b/versions/s-/scnlib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ead098e5e91b1454aa1e8570a2b11c5a52416989", + "version": "3.0.1", + "port-version": 1 + }, { "git-tree": "cbbd6d359bd0838808caa2ffd0982f87c8587fab", "version": "3.0.1",