From 8a9e9a27eb18a4f380b2d9143cb3c89249fa680a Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 23 Feb 2024 03:17:50 +0900 Subject: [PATCH 01/15] miniscript: add version 1.6.2 --- recipes/miniscript/all/CMakeLists.txt | 42 +++++++++++++++---- recipes/miniscript/all/conandata.yml | 8 ++++ recipes/miniscript/all/conanfile.py | 42 +++++++++++++++++-- .../all/patches/1.6.2-0001-fix-install.patch | 21 ++++++++++ .../all/test_package/CMakeLists.txt | 7 +++- .../all/test_package/test_package.cpp | 21 ++++++++++ recipes/miniscript/config.yml | 2 + 7 files changed, 130 insertions(+), 13 deletions(-) create mode 100644 recipes/miniscript/all/patches/1.6.2-0001-fix-install.patch diff --git a/recipes/miniscript/all/CMakeLists.txt b/recipes/miniscript/all/CMakeLists.txt index b203ccd24f5f1..699119e7a5e7b 100644 --- a/recipes/miniscript/all/CMakeLists.txt +++ b/recipes/miniscript/all/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(miniscript LANGUAGES CXX) +project(Miniscript LANGUAGES C CXX) set(MINISCRIPT_SRC ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/MiniScript/Dictionary.cpp @@ -40,25 +40,51 @@ set(MINISCRIPT_INC ) -add_library(miniscript ${MINISCRIPT_SRC}) -target_include_directories(miniscript PRIVATE ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src) -set_target_properties(miniscript PROPERTIES +add_library(miniscript-cpp ${MINISCRIPT_SRC}) +target_include_directories(miniscript-cpp PRIVATE ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src) +set_target_properties(miniscript-cpp PROPERTIES PUBLIC_HEADER "${MINISCRIPT_INC}" WINDOWS_EXPORT_ALL_SYMBOLS ON C_EXTENSIONS OFF ) -target_compile_features(miniscript PRIVATE cxx_std_11) +target_compile_features(miniscript-cpp PRIVATE cxx_std_11) if(MSVC) - target_compile_options(miniscript PRIVATE /EHsc /wd4068) + target_compile_options(miniscript-cpp PRIVATE /EHsc /wd4068) endif() find_library(LIBM m) -target_link_libraries(miniscript PRIVATE $<$:${LIBM}>) +target_link_libraries(miniscript-cpp PRIVATE $<$:${LIBM}>) + + +set(MINICMD_HEADERS + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/OstreamSupport.h + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/ShellIntrinsics.h + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/editline/editline.h + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/editline/unix.h +) + +if(NOT WIN32) + set(EDITLINE_SRC + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/editline/complete.c + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/editline/editline.c + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/editline/sysunix.c + ) +endif() + +add_executable(minicmd + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/main.cpp + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/OstreamSupport.cpp + ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/ShellIntrinsics.cpp + ${EDITLINE_SRC} + ${MINICMD_HEADERS} +) +target_include_directories(minicmd PRIVATE ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/editline) +target_link_libraries(minicmd PRIVATE miniscript-cpp) include(GNUInstallDirs) install( - TARGETS miniscript + TARGETS miniscript-cpp minicmd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/recipes/miniscript/all/conandata.yml b/recipes/miniscript/all/conandata.yml index bafad0fb939fc..2cae631265068 100644 --- a/recipes/miniscript/all/conandata.yml +++ b/recipes/miniscript/all/conandata.yml @@ -1,4 +1,12 @@ sources: + "1.6.2": + url: "https://github.com/JoeStrout/miniscript/archive/refs/tags/v1.6.2.tar.gz" + sha256: "62df0ce8faca21db588ed5f0abe020a41602c8fc02376f6b2385869863acbefd" "1.5.1": url: "https://github.com/JoeStrout/miniscript/archive/172bea8e762c96b1b2a5ea743228ff6a58702cc3.tar.gz" sha256: "a82ac634621657e14f046b6fd08dbc624e8e9890b646573edef454a2e540a1e2" +patches: + "1.6.2": + - patch_file: "patches/1.6.2-0001-fix-install.patch" + patch_description: "fix install destinations" + patch_type: "portability" \ No newline at end of file diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index d85d56bf3dc9b..edfee1fc87e84 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -1,7 +1,9 @@ from conan import ConanFile -from conan.tools.files import get, copy +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout - +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -24,6 +26,23 @@ class MiniscriptConan(ConanFile): } exports_sources = ["CMakeLists.txt"] + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == 'Windows': del self.options.fPIC @@ -35,6 +54,17 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def validate(self): + if Version(self.version) < "1.6.2": + return + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -44,8 +74,12 @@ def generate(self): tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) - cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + if Version(self.version) >= "1.6.2": + cmake.configure() + else: + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() def package(self): @@ -54,7 +88,7 @@ def package(self): cmake.install() def package_info(self): - self.cpp_info.libs = ["miniscript"] + self.cpp_info.libs = ["miniscript-cpp"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") self.cpp_info.system_libs.append("pthread") diff --git a/recipes/miniscript/all/patches/1.6.2-0001-fix-install.patch b/recipes/miniscript/all/patches/1.6.2-0001-fix-install.patch new file mode 100644 index 0000000000000..ee6363d99e585 --- /dev/null +++ b/recipes/miniscript/all/patches/1.6.2-0001-fix-install.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0d00a90..5984c15 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -131,4 +131,14 @@ if(MINISCRIPT_BUILD_TESTING) + endif() + endif() + +-install(TARGETS miniscript-cpp minicmd) ++include(GNUInstallDirs) ++install( ++ TARGETS miniscript-cpp minicmd ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++install( ++ FILES ${MINISCRIPT_HEADERS} ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/MiniScript ++) +\ No newline at end of file diff --git a/recipes/miniscript/all/test_package/CMakeLists.txt b/recipes/miniscript/all/test_package/CMakeLists.txt index 677b1ee8fe710..33ae0355a8548 100644 --- a/recipes/miniscript/all/test_package/CMakeLists.txt +++ b/recipes/miniscript/all/test_package/CMakeLists.txt @@ -5,4 +5,9 @@ find_package(miniscript REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE miniscript::miniscript) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +if(miniscript_VERSION VERSION_GREATER_EQUAL "1.6.2") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) + target_compile_definitions(${PROJECT_NAME} PRIVATE MINISCRIPT_1_6) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/miniscript/all/test_package/test_package.cpp b/recipes/miniscript/all/test_package/test_package.cpp index 91d25c569fcf6..4dafbfd87c152 100644 --- a/recipes/miniscript/all/test_package/test_package.cpp +++ b/recipes/miniscript/all/test_package/test_package.cpp @@ -9,6 +9,25 @@ #include "MiniScript/MiniscriptParser.h" #include "MiniScript/MiniscriptInterpreter.h" +#ifdef MINISCRIPT_1_6 + +int main() { + MiniScript::Interpreter interp; + + interp.standardOutput = [](MiniScript::String s, bool lineBreak=true) { std::cout << s.c_str() << std::endl; }; + interp.errorOutput = [](MiniScript::String s, bool lineBreak=true) { std::cerr << s.c_str() << std::endl; }; + interp.implicitOutput = [](MiniScript::String s, bool lineBreak=true) { std::cout << s.c_str() << std::endl; }; + + interp.REPL("x = 5"); + interp.REPL("print \"x = \" + x"); + interp.REPL("y = 5 + x"); + interp.REPL("print \"y = \" + y"); + + return 0; +} + +#else + int main() { MiniScript::Interpreter interp; @@ -23,3 +42,5 @@ int main() { return 0; } + +#endif diff --git a/recipes/miniscript/config.yml b/recipes/miniscript/config.yml index f1c5e3d313178..9583d73d43da2 100644 --- a/recipes/miniscript/config.yml +++ b/recipes/miniscript/config.yml @@ -1,3 +1,5 @@ versions: + "1.6.2": + folder: all "1.5.1": folder: all From ed8a2ffc626e4e9a00a610654e4d5773274ef2ed Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 23 Feb 2024 11:39:56 +0900 Subject: [PATCH 02/15] add end line --- recipes/miniscript/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/miniscript/all/conandata.yml b/recipes/miniscript/all/conandata.yml index 2cae631265068..d82168d9143b3 100644 --- a/recipes/miniscript/all/conandata.yml +++ b/recipes/miniscript/all/conandata.yml @@ -9,4 +9,4 @@ patches: "1.6.2": - patch_file: "patches/1.6.2-0001-fix-install.patch" patch_description: "fix install destinations" - patch_type: "portability" \ No newline at end of file + patch_type: "portability" From f8214452ac97f12d6a5cdfd9dabf26da8915bad9 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 23 Feb 2024 15:00:06 +0900 Subject: [PATCH 03/15] update c++20 since 1.6.2 --- recipes/miniscript/all/conanfile.py | 16 ++++++++-------- .../miniscript/all/test_package/CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index edfee1fc87e84..c76d20ff80f6e 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -28,18 +28,18 @@ class MiniscriptConan(ConanFile): @property def _min_cppstd(self): - return 14 + return 20 @property def _compilers_minimum_version(self): return { - "gcc": "6", - "clang": "5", - "apple-clang": "10", - "Visual Studio": "15", - "msvc": "191", - } - + "gcc": "11", + "clang": "12", + "apple-clang": "13", + "Visual Studio": "16", + "msvc": "192", + } + def export_sources(self): export_conandata_patches(self) diff --git a/recipes/miniscript/all/test_package/CMakeLists.txt b/recipes/miniscript/all/test_package/CMakeLists.txt index 33ae0355a8548..5172294b30473 100644 --- a/recipes/miniscript/all/test_package/CMakeLists.txt +++ b/recipes/miniscript/all/test_package/CMakeLists.txt @@ -6,7 +6,7 @@ find_package(miniscript REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE miniscript::miniscript) if(miniscript_VERSION VERSION_GREATER_EQUAL "1.6.2") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) target_compile_definitions(${PROJECT_NAME} PRIVATE MINISCRIPT_1_6) else() target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) From c4ef4ef067f5d64f9b3bacfc2589c79f881962e8 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 23 Feb 2024 15:35:28 +0900 Subject: [PATCH 04/15] use C++11 on minicmd --- recipes/miniscript/all/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/miniscript/all/CMakeLists.txt b/recipes/miniscript/all/CMakeLists.txt index 699119e7a5e7b..0e1ecf170face 100644 --- a/recipes/miniscript/all/CMakeLists.txt +++ b/recipes/miniscript/all/CMakeLists.txt @@ -56,7 +56,6 @@ endif() find_library(LIBM m) target_link_libraries(miniscript-cpp PRIVATE $<$:${LIBM}>) - set(MINICMD_HEADERS ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/OstreamSupport.h ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/ShellIntrinsics.h @@ -81,6 +80,7 @@ add_executable(minicmd ) target_include_directories(minicmd PRIVATE ${MINISCRIPT_SRC_DIR}/MiniScript-cpp/src/editline) target_link_libraries(minicmd PRIVATE miniscript-cpp) +target_compile_features(minicmd PRIVATE cxx_std_11) include(GNUInstallDirs) install( From b5924de86754df9de6d81470f58db920ac1c99bc Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 23 Feb 2024 21:23:21 +0900 Subject: [PATCH 05/15] export all symbols in 1.6.2 --- recipes/miniscript/all/conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index c76d20ff80f6e..f8cdaa8bc6079 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -70,7 +70,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["MINISCRIPT_SRC_DIR"] = self.source_folder.replace("\\", "/") + if Version(self.version) >= "1.6.2": + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + else: + tc.variables["MINISCRIPT_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.generate() def build(self): From 4ec4f302b17fc28cd2f5167c0426495355a0952d Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 26 Feb 2024 22:27:13 +0900 Subject: [PATCH 06/15] drop support msvc shared build --- recipes/miniscript/all/conanfile.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index f8cdaa8bc6079..d78eeeffdc67c 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -4,6 +4,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.53.0" @@ -39,7 +40,7 @@ def _compilers_minimum_version(self): "Visual Studio": "16", "msvc": "192", } - + def export_sources(self): export_conandata_patches(self) @@ -64,6 +65,11 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + # miniscript <= 1.6.2 doesn't declare export symbols with __declspec. + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} doesn't support msvc shared build.(yet)" + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 67174d57b5c92f800f8204019e155a22ac22ae0c Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 28 Feb 2024 22:34:43 +0900 Subject: [PATCH 07/15] fix validation --- recipes/miniscript/all/conanfile.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index d78eeeffdc67c..caabd8aae9df7 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -56,6 +56,13 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): + # miniscript doesn't declare export symbols with __declspec. + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} doesn't support msvc shared build.(yet)" + ) + + # miniscript < 1.6.2 doesn't require C++xx if Version(self.version) < "1.6.2": return if self.settings.compiler.get_safe("cppstd"): @@ -65,11 +72,6 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - # miniscript <= 1.6.2 doesn't declare export symbols with __declspec. - if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration( - f"{self.ref} doesn't support msvc shared build.(yet)" - ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 37a47c47cec636d35b907cfc5ec94886b4a6e8a7 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 5 Mar 2024 22:01:53 +0900 Subject: [PATCH 08/15] support C++14 and later --- recipes/miniscript/all/conanfile.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index caabd8aae9df7..499b02cc84582 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -29,16 +29,16 @@ class MiniscriptConan(ConanFile): @property def _min_cppstd(self): - return 20 + return 14 @property def _compilers_minimum_version(self): return { - "gcc": "11", - "clang": "12", - "apple-clang": "13", - "Visual Studio": "16", - "msvc": "192", + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", } def export_sources(self): From e8cf7b69c186a08b7f04f37f1fb4110b26298069 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Mar 2024 02:19:21 +0900 Subject: [PATCH 09/15] 1.5.1 requires C++11, 1.6.2 requires C++20 --- recipes/miniscript/all/conanfile.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index 499b02cc84582..29a3f3818ac5d 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -17,6 +17,7 @@ class MiniscriptConan(ConanFile): homepage = "https://github.com/JoeStrout/miniscript" topics = ("script", "embedded", "programming-language") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -29,16 +30,18 @@ class MiniscriptConan(ConanFile): @property def _min_cppstd(self): - return 14 + return "11" if Version(self.version) < "1.6.2" else "20" @property def _compilers_minimum_version(self): return { - "gcc": "6", - "clang": "5", - "apple-clang": "10", - "Visual Studio": "15", - "msvc": "191", + "20": { + "gcc": "11", + "clang": "12", + "apple-clang": "13", + "Visual Studio": "16", + "msvc": "192", + }, } def export_sources(self): @@ -62,9 +65,6 @@ def validate(self): f"{self.ref} doesn't support msvc shared build.(yet)" ) - # miniscript < 1.6.2 doesn't require C++xx - if Version(self.version) < "1.6.2": - return if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) From bbc9ebcfedb60d67c1229be10391d9251de77ec0 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 6 Mar 2024 02:55:04 +0900 Subject: [PATCH 10/15] fix compilers_minimum_version --- recipes/miniscript/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index 29a3f3818ac5d..58e5317b2a4c4 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -42,7 +42,7 @@ def _compilers_minimum_version(self): "Visual Studio": "16", "msvc": "192", }, - } + }.get(self._min_cppstd, {}) def export_sources(self): export_conandata_patches(self) From a573187148f47ae020bb6a2bdfb8744a759db9af Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 18 Mar 2024 03:46:06 +0900 Subject: [PATCH 11/15] support C++17 --- recipes/miniscript/all/conandata.yml | 3 +++ recipes/miniscript/all/conanfile.py | 12 ++++++------ .../all/patches/1.6.2-0002-remove-bit.patch | 13 +++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 recipes/miniscript/all/patches/1.6.2-0002-remove-bit.patch diff --git a/recipes/miniscript/all/conandata.yml b/recipes/miniscript/all/conandata.yml index d82168d9143b3..f6e5fb61ff5f7 100644 --- a/recipes/miniscript/all/conandata.yml +++ b/recipes/miniscript/all/conandata.yml @@ -10,3 +10,6 @@ patches: - patch_file: "patches/1.6.2-0001-fix-install.patch" patch_description: "fix install destinations" patch_type: "portability" + - patch_file: "patches/1.6.2-0002-remove-bit.patch" + patch_description: "remove unused bit header" + patch_type: "portability" diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index 58e5317b2a4c4..1b9c10c5a3e35 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches, replace_in_file from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd @@ -30,15 +30,15 @@ class MiniscriptConan(ConanFile): @property def _min_cppstd(self): - return "11" if Version(self.version) < "1.6.2" else "20" + return "11" if Version(self.version) < "1.6.2" else "17" @property def _compilers_minimum_version(self): return { - "20": { - "gcc": "11", - "clang": "12", - "apple-clang": "13", + "17": { + "gcc": "8", + "clang": "7", + "apple-clang": "12", "Visual Studio": "16", "msvc": "192", }, diff --git a/recipes/miniscript/all/patches/1.6.2-0002-remove-bit.patch b/recipes/miniscript/all/patches/1.6.2-0002-remove-bit.patch new file mode 100644 index 0000000000000..414f7575cb0fd --- /dev/null +++ b/recipes/miniscript/all/patches/1.6.2-0002-remove-bit.patch @@ -0,0 +1,13 @@ +diff --git a/MiniScript-cpp/src/MiniScript/MiniscriptTypes.cpp b/MiniScript-cpp/src/MiniScript/MiniscriptTypes.cpp +index c406663..696dacf 100644 +--- a/MiniScript-cpp/src/MiniScript/MiniscriptTypes.cpp ++++ b/MiniScript-cpp/src/MiniScript/MiniscriptTypes.cpp +@@ -15,7 +15,7 @@ + + #include + #include +-#include ++ + + namespace MiniScript { + From 697091d5ea08ce542d17a41b9943b975bb3bb104 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 18 Mar 2024 22:55:11 +0900 Subject: [PATCH 12/15] remove unused function --- recipes/miniscript/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index 1b9c10c5a3e35..0be40696c9972 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches, replace_in_file +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd From 6b5baf122203d3b2eb2730191097421655baa8a8 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 18 Mar 2024 22:55:30 +0900 Subject: [PATCH 13/15] add patch_source --- recipes/miniscript/all/conandata.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/miniscript/all/conandata.yml b/recipes/miniscript/all/conandata.yml index f6e5fb61ff5f7..63101dfe5523f 100644 --- a/recipes/miniscript/all/conandata.yml +++ b/recipes/miniscript/all/conandata.yml @@ -13,3 +13,4 @@ patches: - patch_file: "patches/1.6.2-0002-remove-bit.patch" patch_description: "remove unused bit header" patch_type: "portability" + patch_source: "https://github.com/JoeStrout/miniscript/pull/145" From 1a58545490a5946685cf09f9bc09afa95800f21b Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 11 Sep 2024 01:07:37 +0900 Subject: [PATCH 14/15] add patch_source Co-authored-by: Uilian Ries --- recipes/miniscript/all/conandata.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/miniscript/all/conandata.yml b/recipes/miniscript/all/conandata.yml index 63101dfe5523f..3d75c2a6adb07 100644 --- a/recipes/miniscript/all/conandata.yml +++ b/recipes/miniscript/all/conandata.yml @@ -10,6 +10,7 @@ patches: - patch_file: "patches/1.6.2-0001-fix-install.patch" patch_description: "fix install destinations" patch_type: "portability" + patch_source: "https://github.com/JoeStrout/miniscript/pull/184" - patch_file: "patches/1.6.2-0002-remove-bit.patch" patch_description: "remove unused bit header" patch_type: "portability" From 5dc6d39037d9ebb0c20b05400bfe956bd8db9caa Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 11 Oct 2024 18:44:05 +0900 Subject: [PATCH 15/15] Update recipes/miniscript/all/conanfile.py Co-authored-by: Uilian Ries --- recipes/miniscript/all/conanfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/miniscript/all/conanfile.py b/recipes/miniscript/all/conanfile.py index 0be40696c9972..3a00d6386a95a 100644 --- a/recipes/miniscript/all/conanfile.py +++ b/recipes/miniscript/all/conanfile.py @@ -78,9 +78,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - if Version(self.version) >= "1.6.2": - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True - else: + if Version(self.version) < "1.6.2": tc.variables["MINISCRIPT_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.generate()