From 6c0702d57cf9a73d5cc65cfb2e35254ee981af1c Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 21 Apr 2023 11:10:57 +0900 Subject: [PATCH 01/10] jsonnet: add version 0.20.0, support conan v2 --- recipes/jsonnet/all/conandata.yml | 13 ++- recipes/jsonnet/all/conanfile.py | 110 +++++++++--------- .../all/patches/0.17.0/0002-cmake-fixes.patch | 77 ++++++------ .../patches/0.17.0/0003-std-uint32_t.patch | 63 ++++++++++ .../all/patches/0.18.0/0002-cmake-fixes.patch | 20 +++- .../jsonnet/all/test_package/CMakeLists.txt | 13 +-- recipes/jsonnet/all/test_package/conanfile.py | 22 ++-- .../all/test_v1_package/CMakeLists.txt | 8 ++ .../jsonnet/all/test_v1_package/conanfile.py | 18 +++ recipes/jsonnet/config.yml | 2 + 10 files changed, 233 insertions(+), 113 deletions(-) create mode 100644 recipes/jsonnet/all/patches/0.17.0/0003-std-uint32_t.patch create mode 100644 recipes/jsonnet/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/jsonnet/all/test_v1_package/conanfile.py diff --git a/recipes/jsonnet/all/conandata.yml b/recipes/jsonnet/all/conandata.yml index af6fab5053143..a837c862b1810 100644 --- a/recipes/jsonnet/all/conandata.yml +++ b/recipes/jsonnet/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.20.0": + url: "https://github.com/google/jsonnet/archive/v0.20.0.tar.gz" + sha256: "77bd269073807731f6b11ff8d7c03e9065aafb8e4d038935deb388325e52511b" "0.19.1": url: "https://github.com/google/jsonnet/archive/v0.19.1.tar.gz" sha256: "f5a20f2dc98fdebd5d42a45365f52fa59a7e6b174e43970fea4f9718a914e887" @@ -9,18 +12,16 @@ sources: url: "https://github.com/google/jsonnet/archive/v0.17.0.tar.gz" sha256: "076b52edf888c01097010ad4299e3b2e7a72b60a41abbc65af364af1ed3c8dbe" patches: + "0.20.0": + - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" + - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" "0.19.1": - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" - base_path: "source_subfolder" - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" - base_path: "source_subfolder" "0.18.0": - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" - base_path: "source_subfolder" - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" - base_path: "source_subfolder" "0.17.0": - patch_file: "patches/0.17.0/0001-fix-nlohmann-include.patch" - base_path: "source_subfolder" - patch_file: "patches/0.17.0/0002-cmake-fixes.patch" - base_path: "source_subfolder" + - patch_file: "patches/0.17.0/0003-std-uint32_t.patch" diff --git a/recipes/jsonnet/all/conanfile.py b/recipes/jsonnet/all/conanfile.py index ff9c2346a3e5f..d77a32f9b5a0f 100644 --- a/recipes/jsonnet/all/conanfile.py +++ b/recipes/jsonnet/all/conanfile.py @@ -1,19 +1,23 @@ -import functools -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -from conan.tools.microsoft import is_msvc, msvc_runtime_flag - -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc, msvc_runtime_flag +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.build import check_min_cppstd, cross_building, stdcpp_library +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os +required_conan_version = ">=1.53.0" class JsonnetConan(ConanFile): name = "jsonnet" description = "Jsonnet - The data templating language" - topics = ("config", "json", "functional", "configuration") license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/jsonnet" + topics = ("config", "json", "functional", "configuration") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,15 +26,13 @@ class JsonnetConan(ConanFile): "shared": False, "fPIC": True, } - generators = "cmake", "cmake_find_package" @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 11 - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -38,70 +40,70 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - # This is a workround. - # If jsonnet is shared, rapidyaml must be built as shared, - # or the c4core functions that rapidyaml depends on will not be able to be found. - # This seems to be a issue of rapidyaml. - # https://github.com/conan-io/conan-center-index/pull/9786#discussion_r829887879 - if tools.Version(self.version) >= "0.18.0": - self.options["rapidyaml"].shared = True + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("nlohmann_json/3.10.5") - if tools.Version(self.version) >= "0.18.0": - self.requires("rapidyaml/0.4.1") + self.requires("nlohmann_json/3.11.2") + if Version(self.version) >= "0.18.0": + self.requires("rapidyaml/0.5.0") def validate(self): - if hasattr(self, "settings_build") and tools.cross_building(self, skip_x64_x86=True): - raise ConanInvalidConfiguration("jsonnet does not support cross building") + if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): + raise ConanInvalidConfiguration(f"{self.ref} does not support cross building") if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, "11") + check_min_cppstd(self, self._min_cppstd) if self.options.shared and is_msvc(self) and "d" in msvc_runtime_flag(self): - raise ConanInvalidConfiguration("shared {} is not supported with MTd/MDd runtime".format(self.name)) + raise ConanInvalidConfiguration(f"shared {self.ref} is not supported with MTd/MDd runtime") - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + # This is a workround. + # If jsonnet is shared, rapidyaml must be built as shared, + # or the c4core functions that rapidyaml depends on will not be able to be found. + # This seems to be a issue of rapidyaml. + # https://github.com/conan-io/conan-center-index/pull/9786#discussion_r829887879 + if self.options.shared and Version(self.version) >= "0.18.0" and self.dependencies["rapidyml"].options.shared == False: + raise ConanInvalidConfiguration(f"shared {self.ref} requires rapidyaml to be built as shared") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["BUILD_TESTS"] = False - cmake.definitions["BUILD_STATIC_LIBS"] = not self.options.shared - cmake.definitions["BUILD_SHARED_BINARIES"] = False - cmake.definitions["BUILD_JSONNET"] = False - cmake.definitions["BUILD_JSONNETFMT"] = False - cmake.definitions["USE_SYSTEM_JSON"] = True - cmake.configure(build_folder=self._build_subfolder) - return cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTS"] = False + tc.variables["BUILD_STATIC_LIBS"] = not self.options.shared + tc.variables["BUILD_SHARED_BINARIES"] = False + tc.variables["BUILD_JSONNET"] = False + tc.variables["BUILD_JSONNETFMT"] = False + tc.variables["USE_SYSTEM_JSON"] = True + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.generate() + + deps = CMakeDeps(self) + deps.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.components["libjsonnet"].libs = ["jsonnet"] self.cpp_info.components["libjsonnet"].requires = ["nlohmann_json::nlohmann_json"] - if tools.Version(self.version) >= "0.18.0": + if Version(self.version) >= "0.18.0": self.cpp_info.components["libjsonnet"].requires.append("rapidyaml::rapidyaml") - if tools.stdcpp_library(self): - self.cpp_info.components["libjsonnet"].system_libs.append(tools.stdcpp_library(self)) + if stdcpp_library(self): + self.cpp_info.components["libjsonnet"].system_libs.append(stdcpp_library(self)) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libjsonnet"].system_libs.append("m") diff --git a/recipes/jsonnet/all/patches/0.17.0/0002-cmake-fixes.patch b/recipes/jsonnet/all/patches/0.17.0/0002-cmake-fixes.patch index 6d8e892eb89a7..887943f82c372 100644 --- a/recipes/jsonnet/all/patches/0.17.0/0002-cmake-fixes.patch +++ b/recipes/jsonnet/all/patches/0.17.0/0002-cmake-fixes.patch @@ -1,32 +1,44 @@ -- install headers -- optionally disable shared build -- add md5 objects to c library -- allow MSVC ---- core/CMakeLists.txt -+++ core/CMakeLists.txt -@@ -16,8 +16,8 @@ set(LIBJSONNET_HEADERS - string_utils.h +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 385ea82..34b1c63 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,7 +40,7 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++11 -fPIC ${OPT}") + else() + # TODO: Windows support. +- message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") ++ message(WARNING "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") + endif() + + set(CMAKE_CXX_STANDARD 11) +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index e8ad830..7d87527 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -17,7 +17,8 @@ set(LIBJSONNET_HEADERS unicode.h vm.h) -- + -set(LIBJSONNET_SOURCE +install(FILES ../include/libjsonnet.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +set(LIBJSONNET_SOURCE $ desugarer.cpp formatter.cpp lexer.cpp -@@ -27,7 +27,7 @@ set(LIBJSONNET_SOURCE - static_analysis.cpp +@@ -28,6 +29,7 @@ set(LIBJSONNET_SOURCE string_utils.cpp vm.cpp) -- + +if (NOT BUILD_STATIC_LIBS) add_library(libjsonnet SHARED ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) add_dependencies(libjsonnet md5 stdlib) target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json) -@@ -50,7 +50,7 @@ install(TARGETS libjsonnet +@@ -47,10 +49,10 @@ set_target_properties(libjsonnet PROPERTIES OUTPUT_NAME jsonnet + install(TARGETS libjsonnet + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") -+ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") target_include_directories(libjsonnet INTERFACE $) - @@ -34,9 +46,11 @@ if (BUILD_STATIC_LIBS) # Static library for jsonnet command-line tool. add_library(libjsonnet_static STATIC ${LIBJSONNET_SOURCE}) ---- cpp/CMakeLists.txt -+++ cpp/CMakeLists.txt -@@ -3,11 +3,11 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 5549902..3091a9c 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -3,14 +3,14 @@ set(LIBJSONNETPP_HEADERS ../include/libjsonnet++.h ) @@ -51,7 +65,13 @@ add_dependencies(libjsonnet++ jsonnet) -# target_link_libraries(libjsonnet libjsonnet) +target_link_libraries(libjsonnet++ libjsonnet) -@@ -24,7 +24,7 @@ + + # CMake prepends CMAKE_SHARED_LIBRARY_PREFIX to shared libraries, so without + # this step the output would be |liblibjsonnet|. +@@ -21,10 +21,10 @@ set_target_properties(libjsonnet++ PROPERTIES OUTPUT_NAME jsonnet++ + install(TARGETS libjsonnet++ + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") target_include_directories(libjsonnet++ INTERFACE @@ -61,20 +81,11 @@ if (BUILD_STATIC_LIBS) # Static library for jsonnet command-line tool. add_library(libjsonnet++_static STATIC ${LIBJSONNETPP_SOURCE}) ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -40,7 +40,7 @@ - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++11 -fPIC ${OPT}") - else() - # TODO: Windows support. -- message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") -+ message(WARNING "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") - endif() - - set(CMAKE_CXX_STANDARD 11) ---- stdlib/CMakeLists.txt -+++ stdlib/CMakeLists.txt -@@ -5,7 +5,7 @@ +diff --git a/stdlib/CMakeLists.txt b/stdlib/CMakeLists.txt +index a481d9f..00ff502 100644 +--- a/stdlib/CMakeLists.txt ++++ b/stdlib/CMakeLists.txt +@@ -5,7 +5,7 @@ add_executable(to_c_array to_c_array.cpp) # Custom command that will only build stdlib when it changes. add_custom_command( OUTPUT ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h @@ -83,5 +94,3 @@ ${PROJECT_SOURCE_DIR}/stdlib/std.jsonnet ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h DEPENDS to_c_array std.jsonnet) - - diff --git a/recipes/jsonnet/all/patches/0.17.0/0003-std-uint32_t.patch b/recipes/jsonnet/all/patches/0.17.0/0003-std-uint32_t.patch new file mode 100644 index 0000000000000..e78d1a83b325a --- /dev/null +++ b/recipes/jsonnet/all/patches/0.17.0/0003-std-uint32_t.patch @@ -0,0 +1,63 @@ +diff --git a/cpp/libjsonnet++.cpp b/cpp/libjsonnet++.cpp +index 085a3d1..697ef53 100644 +--- a/cpp/libjsonnet++.cpp ++++ b/cpp/libjsonnet++.cpp +@@ -38,12 +38,12 @@ bool Jsonnet::init() + return vm_ != nullptr; + } + +-void Jsonnet::setMaxStack(uint32_t depth) ++void Jsonnet::setMaxStack(std::uint32_t depth) + { + ::jsonnet_max_stack(vm_, static_cast(depth)); + } + +-void Jsonnet::setGcMinObjects(uint32_t objects) ++void Jsonnet::setGcMinObjects(std::uint32_t objects) + { + ::jsonnet_gc_min_objects(vm_, static_cast(objects)); + } +@@ -63,7 +63,7 @@ void Jsonnet::addImportPath(const std::string& path) + ::jsonnet_jpath_add(vm_, path.c_str()); + } + +-void Jsonnet::setMaxTrace(uint32_t lines) ++void Jsonnet::setMaxTrace(std::uint32_t lines) + { + ::jsonnet_max_trace(vm_, static_cast(lines)); + } +diff --git a/include/libjsonnet++.h b/include/libjsonnet++.h +index 5d68719..c2dd7a5 100644 +--- a/include/libjsonnet++.h ++++ b/include/libjsonnet++.h +@@ -18,6 +18,7 @@ limitations under the License. + #define CPP_JSONNET_H_ + + #include ++#include + #include + #include + #include +@@ -46,11 +47,11 @@ class Jsonnet { + bool init(); + + /// Sets the maximum stack depth. +- void setMaxStack(uint32_t depth); ++ void setMaxStack(std::uint32_t depth); + + /// Sets the number of objects required before a garbage collection cycle is + /// allowed. +- void setGcMinObjects(uint32_t objects); ++ void setGcMinObjects(std::uint32_t objects); + + /// Run the garbage collector after this amount of growth in the number of + /// objects. +@@ -60,7 +61,7 @@ class Jsonnet { + void setStringOutput(bool string_output); + + /// Set the number of lines of stack trace to display (0 to display all). +- void setMaxTrace(uint32_t lines); ++ void setMaxTrace(std::uint32_t lines); + + /// Add to the default import callback's library search path. + void addImportPath(const std::string& path); diff --git a/recipes/jsonnet/all/patches/0.18.0/0002-cmake-fixes.patch b/recipes/jsonnet/all/patches/0.18.0/0002-cmake-fixes.patch index 505ce96c21e93..58b0135ca2153 100644 --- a/recipes/jsonnet/all/patches/0.18.0/0002-cmake-fixes.patch +++ b/recipes/jsonnet/all/patches/0.18.0/0002-cmake-fixes.patch @@ -20,7 +20,7 @@ index 5df20ca..c14c93c 100644 add_subdirectory(cpp) add_subdirectory(cmd) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt -index e62a858..c0389f8 100644 +index e62a858..f0fb69f 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -17,7 +17,8 @@ set(LIBJSONNET_HEADERS @@ -33,15 +33,21 @@ index e62a858..c0389f8 100644 desugarer.cpp formatter.cpp lexer.cpp -@@ -28,6 +29,7 @@ set(LIBJSONNET_SOURCE +@@ -28,9 +29,12 @@ set(LIBJSONNET_SOURCE string_utils.cpp vm.cpp) ++find_package(ryml REQUIRED CONFIG) ++ +if (NOT BUILD_STATIC_LIBS) add_library(libjsonnet SHARED ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) add_dependencies(libjsonnet md5 stdlib) - target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json ryml) -@@ -47,10 +49,10 @@ set_target_properties(libjsonnet PROPERTIES OUTPUT_NAME jsonnet +-target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json ryml) ++target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json ryml::ryml) + + file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/../include/libjsonnet.h JSONNET_VERSION_DEF + REGEX "[#]define[ \t]+LIB_JSONNET_VERSION[ \t]+") +@@ -47,15 +51,15 @@ set_target_properties(libjsonnet PROPERTIES OUTPUT_NAME jsonnet install(TARGETS libjsonnet LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" @@ -54,6 +60,12 @@ index e62a858..c0389f8 100644 if (BUILD_STATIC_LIBS) # Static library for jsonnet command-line tool. add_library(libjsonnet_static STATIC ${LIBJSONNET_SOURCE}) + add_dependencies(libjsonnet_static md5 stdlib) +- target_link_libraries(libjsonnet_static md5 nlohmann_json::nlohmann_json ryml) ++ target_link_libraries(libjsonnet_static md5 nlohmann_json::nlohmann_json ryml::ryml) + set_target_properties(libjsonnet_static PROPERTIES OUTPUT_NAME jsonnet) + install(TARGETS libjsonnet_static DESTINATION "${CMAKE_INSTALL_LIBDIR}") + target_include_directories(libjsonnet_static INTERFACE diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index eb7686c..cbf21bb 100644 --- a/cpp/CMakeLists.txt diff --git a/recipes/jsonnet/all/test_package/CMakeLists.txt b/recipes/jsonnet/all/test_package/CMakeLists.txt index b1f60f164ad79..409bbb01e007e 100644 --- a/recipes/jsonnet/all/test_package/CMakeLists.txt +++ b/recipes/jsonnet/all/test_package/CMakeLists.txt @@ -1,14 +1,11 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES C CXX) find_package(jsonnet CONFIG REQUIRED) add_executable(${PROJECT_NAME}_c test_package.c) -target_link_libraries(${PROJECT_NAME}_c jsonnet::libjsonnet) +target_link_libraries(${PROJECT_NAME}_c PRIVATE jsonnet::libjsonnet) add_executable(${PROJECT_NAME}_cxx test_package.cpp) -target_link_libraries(${PROJECT_NAME}_cxx jsonnet::libjsonnetpp) -set_property(TARGET ${PROJECT_NAME}_cxx PROPERTY CXX_STANDARD 11) +target_link_libraries(${PROJECT_NAME}_cxx PRIVATE jsonnet::libjsonnetpp) +target_compile_features(${PROJECT_NAME}_cxx PRIVATE cxx_std_11) diff --git a/recipes/jsonnet/all/test_package/conanfile.py b/recipes/jsonnet/all/test_package/conanfile.py index 1460ef0546803..7f7fcbab40166 100644 --- a/recipes/jsonnet/all/test_package/conanfile.py +++ b/recipes/jsonnet/all/test_package/conanfile.py @@ -1,10 +1,18 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os - class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +20,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - self.run(os.path.join("bin", "test_package_c"), run_environment=True) - self.run(os.path.join("bin", "test_package_cxx"), run_environment=True) + if can_run(self): + self.run(os.path.join(self.cpp.build.bindir, "test_package_c"), env="conanrun") + self.run(os.path.join(self.cpp.build.bindir, "test_package_cxx"), env="conanrun") diff --git a/recipes/jsonnet/all/test_v1_package/CMakeLists.txt b/recipes/jsonnet/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..be00a8c7f57c7 --- /dev/null +++ b/recipes/jsonnet/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/jsonnet/all/test_v1_package/conanfile.py b/recipes/jsonnet/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..25fbcb7a6d066 --- /dev/null +++ b/recipes/jsonnet/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +class TestPackageV1Conan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + self.run(os.path.join("bin", "test_package_c"), run_environment=True) + self.run(os.path.join("bin", "test_package_cxx"), run_environment=True) diff --git a/recipes/jsonnet/config.yml b/recipes/jsonnet/config.yml index d98d76db4349a..be300c9c5c2b0 100644 --- a/recipes/jsonnet/config.yml +++ b/recipes/jsonnet/config.yml @@ -1,4 +1,6 @@ versions: + "0.20.0": + folder: all "0.19.1": folder: all "0.18.0": From 3d648486ea8e84ecc97e49114d8d11734ebdc61f Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 21 Apr 2023 11:59:05 +0900 Subject: [PATCH 02/10] add patch_description --- recipes/jsonnet/all/conandata.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/recipes/jsonnet/all/conandata.yml b/recipes/jsonnet/all/conandata.yml index a837c862b1810..573dac3e9b487 100644 --- a/recipes/jsonnet/all/conandata.yml +++ b/recipes/jsonnet/all/conandata.yml @@ -14,14 +14,32 @@ sources: patches: "0.20.0": - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" + patch_description: "fix include path to use cci package" + patch_type: "conan" - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" + patch_description: "fix rapidyaml name, add installation" + patch_type: "conan" "0.19.1": - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" + patch_description: "fix include path to use cci package" + patch_type: "conan" - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" + patch_description: "fix rapidyaml name, add installation" + patch_type: "conan" "0.18.0": - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" + patch_description: "fix include path to use cci package" + patch_type: "conan" - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" + patch_description: "fix rapidyaml name, add installation" + patch_type: "conan" "0.17.0": - patch_file: "patches/0.17.0/0001-fix-nlohmann-include.patch" + patch_description: "fix include path to use cci package" + patch_type: "conan" - patch_file: "patches/0.17.0/0002-cmake-fixes.patch" + patch_description: "fix rapidyaml name, add installation" + patch_type: "conan" - patch_file: "patches/0.17.0/0003-std-uint32_t.patch" + patch_description: "make uint32_t to std::uint32_t" + patch_type: "portability" From 0eeffc25f7a75d5c9191d069578e06f49f36ba36 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 21 Apr 2023 13:27:31 +0900 Subject: [PATCH 03/10] fix typo --- recipes/jsonnet/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/jsonnet/all/conanfile.py b/recipes/jsonnet/all/conanfile.py index d77a32f9b5a0f..742c02d6c9cb4 100644 --- a/recipes/jsonnet/all/conanfile.py +++ b/recipes/jsonnet/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc, msvc_runtime_flag +from conan.tools.microsoft import is_msvc, msvc_runtime_flag from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy from conan.tools.build import check_min_cppstd, cross_building, stdcpp_library from conan.tools.scm import Version @@ -65,7 +65,7 @@ def validate(self): # or the c4core functions that rapidyaml depends on will not be able to be found. # This seems to be a issue of rapidyaml. # https://github.com/conan-io/conan-center-index/pull/9786#discussion_r829887879 - if self.options.shared and Version(self.version) >= "0.18.0" and self.dependencies["rapidyml"].options.shared == False: + if self.options.shared and Version(self.version) >= "0.18.0" and self.dependencies["rapidyaml"].options.shared == False: raise ConanInvalidConfiguration(f"shared {self.ref} requires rapidyaml to be built as shared") def source(self): From 51d3ff7c0227b000a431c522f08cb2b00d26d067 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 23 Apr 2023 02:58:29 +0900 Subject: [PATCH 04/10] use C++17 in 0.20.0 --- recipes/jsonnet/all/CMakeLists.txt | 9 -------- recipes/jsonnet/all/conandata.yml | 3 +++ recipes/jsonnet/all/conanfile.py | 23 ++++++++++++++++++- .../all/patches/0.20.0/0003-use-cpp17.patch | 13 +++++++++++ .../jsonnet/all/test_package/CMakeLists.txt | 6 ++++- 5 files changed, 43 insertions(+), 11 deletions(-) delete mode 100644 recipes/jsonnet/all/CMakeLists.txt create mode 100644 recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch diff --git a/recipes/jsonnet/all/CMakeLists.txt b/recipes/jsonnet/all/CMakeLists.txt deleted file mode 100644 index 881b1cb39250b..0000000000000 --- a/recipes/jsonnet/all/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -add_subdirectory(source_subfolder) diff --git a/recipes/jsonnet/all/conandata.yml b/recipes/jsonnet/all/conandata.yml index 573dac3e9b487..af1f45aff01c6 100644 --- a/recipes/jsonnet/all/conandata.yml +++ b/recipes/jsonnet/all/conandata.yml @@ -19,6 +19,9 @@ patches: - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" patch_description: "fix rapidyaml name, add installation" patch_type: "conan" + - patch_file: "patches/0.20.0/0003-use-cpp17.patch" + patch_description: "use C++17" + patch_type: "portability" "0.19.1": - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" patch_description: "fix include path to use cci package" diff --git a/recipes/jsonnet/all/conanfile.py b/recipes/jsonnet/all/conanfile.py index 742c02d6c9cb4..087aff251108f 100644 --- a/recipes/jsonnet/all/conanfile.py +++ b/recipes/jsonnet/all/conanfile.py @@ -29,7 +29,19 @@ class JsonnetConan(ConanFile): @property def _min_cppstd(self): - return 11 + return "11" if Version(self) < "0.20.0" else "17" + + @property + def _compilers_minimum_version(self): + return { + "17": { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + }, + }.get(self._min_cppstd, {}) def export_sources(self): export_conandata_patches(self) @@ -45,6 +57,15 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def validate(self): + if self.settings.compiler.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 requirements(self): self.requires("nlohmann_json/3.11.2") if Version(self.version) >= "0.18.0": diff --git a/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch new file mode 100644 index 0000000000000..60b0becabfdca --- /dev/null +++ b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c14c93c..b1cb1b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,7 +43,7 @@ else() + message(WARNING "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") + endif() + +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 17) + + + # Include external googletest project. This runs a CMake sub-script diff --git a/recipes/jsonnet/all/test_package/CMakeLists.txt b/recipes/jsonnet/all/test_package/CMakeLists.txt index 409bbb01e007e..ad42d5d0faada 100644 --- a/recipes/jsonnet/all/test_package/CMakeLists.txt +++ b/recipes/jsonnet/all/test_package/CMakeLists.txt @@ -8,4 +8,8 @@ target_link_libraries(${PROJECT_NAME}_c PRIVATE jsonnet::libjsonnet) add_executable(${PROJECT_NAME}_cxx test_package.cpp) target_link_libraries(${PROJECT_NAME}_cxx PRIVATE jsonnet::libjsonnetpp) -target_compile_features(${PROJECT_NAME}_cxx PRIVATE cxx_std_11) +if(jsonnet_VERSION VERSION_LESS "0.20.0") + target_compile_features(${PROJECT_NAME}_cxx PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME}_cxx PRIVATE cxx_std_17) +endif() From f03c9e6c3b7592c2233e37e593fd895836eda0d3 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 23 Apr 2023 20:03:01 +0900 Subject: [PATCH 05/10] fix typo --- recipes/jsonnet/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/jsonnet/all/conanfile.py b/recipes/jsonnet/all/conanfile.py index 087aff251108f..2d38b3662bb12 100644 --- a/recipes/jsonnet/all/conanfile.py +++ b/recipes/jsonnet/all/conanfile.py @@ -29,7 +29,7 @@ class JsonnetConan(ConanFile): @property def _min_cppstd(self): - return "11" if Version(self) < "0.20.0" else "17" + return "11" if Version(self.version) < "0.20.0" else "17" @property def _compilers_minimum_version(self): From 78f6fb9076a204b4afbbd0f425a3aa9a3bb15b20 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 24 Apr 2023 01:36:05 +0900 Subject: [PATCH 06/10] remove duplicated validate --- recipes/jsonnet/all/conanfile.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/recipes/jsonnet/all/conanfile.py b/recipes/jsonnet/all/conanfile.py index 2d38b3662bb12..2ed1e56918e99 100644 --- a/recipes/jsonnet/all/conanfile.py +++ b/recipes/jsonnet/all/conanfile.py @@ -66,18 +66,9 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - def requirements(self): - self.requires("nlohmann_json/3.11.2") - if Version(self.version) >= "0.18.0": - self.requires("rapidyaml/0.5.0") - - def validate(self): if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): raise ConanInvalidConfiguration(f"{self.ref} does not support cross building") - if self.settings.compiler.cppstd: - check_min_cppstd(self, self._min_cppstd) - if self.options.shared and is_msvc(self) and "d" in msvc_runtime_flag(self): raise ConanInvalidConfiguration(f"shared {self.ref} is not supported with MTd/MDd runtime") @@ -89,6 +80,11 @@ def validate(self): if self.options.shared and Version(self.version) >= "0.18.0" and self.dependencies["rapidyaml"].options.shared == False: raise ConanInvalidConfiguration(f"shared {self.ref} requires rapidyaml to be built as shared") + def requirements(self): + self.requires("nlohmann_json/3.11.2") + if Version(self.version) >= "0.18.0": + self.requires("rapidyaml/0.5.0") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 6e01740a92f45606af9541a37e30242234b440ff Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 27 Jun 2023 01:42:15 +0900 Subject: [PATCH 07/10] disable force C++17 patch for 0.20.0 and 0.17.0 (from review comments) --- recipes/jsonnet/all/conandata.yml | 6 -- recipes/jsonnet/all/conanfile.py | 5 +- .../patches/0.17.0/0003-std-uint32_t.patch | 63 ------------------- .../all/patches/0.20.0/0003-use-cpp17.patch | 13 ---- 4 files changed, 4 insertions(+), 83 deletions(-) delete mode 100644 recipes/jsonnet/all/patches/0.17.0/0003-std-uint32_t.patch delete mode 100644 recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch diff --git a/recipes/jsonnet/all/conandata.yml b/recipes/jsonnet/all/conandata.yml index af1f45aff01c6..398bb40557f8d 100644 --- a/recipes/jsonnet/all/conandata.yml +++ b/recipes/jsonnet/all/conandata.yml @@ -19,9 +19,6 @@ patches: - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" patch_description: "fix rapidyaml name, add installation" patch_type: "conan" - - patch_file: "patches/0.20.0/0003-use-cpp17.patch" - patch_description: "use C++17" - patch_type: "portability" "0.19.1": - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" patch_description: "fix include path to use cci package" @@ -43,6 +40,3 @@ patches: - patch_file: "patches/0.17.0/0002-cmake-fixes.patch" patch_description: "fix rapidyaml name, add installation" patch_type: "conan" - - patch_file: "patches/0.17.0/0003-std-uint32_t.patch" - patch_description: "make uint32_t to std::uint32_t" - patch_type: "portability" diff --git a/recipes/jsonnet/all/conanfile.py b/recipes/jsonnet/all/conanfile.py index 2ed1e56918e99..0581568a5b5ce 100644 --- a/recipes/jsonnet/all/conanfile.py +++ b/recipes/jsonnet/all/conanfile.py @@ -58,7 +58,7 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.settings.compiler.cppstd: + 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: @@ -66,6 +66,9 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) == "0.17.0" and Version(self.settings.compiler.get_safe("cppstd")) > "17": + raise ConanInvalidConfiguration(f"{self.ref} does not support C++{self.settings.compiler.cppstd}") + if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): raise ConanInvalidConfiguration(f"{self.ref} does not support cross building") diff --git a/recipes/jsonnet/all/patches/0.17.0/0003-std-uint32_t.patch b/recipes/jsonnet/all/patches/0.17.0/0003-std-uint32_t.patch deleted file mode 100644 index e78d1a83b325a..0000000000000 --- a/recipes/jsonnet/all/patches/0.17.0/0003-std-uint32_t.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/cpp/libjsonnet++.cpp b/cpp/libjsonnet++.cpp -index 085a3d1..697ef53 100644 ---- a/cpp/libjsonnet++.cpp -+++ b/cpp/libjsonnet++.cpp -@@ -38,12 +38,12 @@ bool Jsonnet::init() - return vm_ != nullptr; - } - --void Jsonnet::setMaxStack(uint32_t depth) -+void Jsonnet::setMaxStack(std::uint32_t depth) - { - ::jsonnet_max_stack(vm_, static_cast(depth)); - } - --void Jsonnet::setGcMinObjects(uint32_t objects) -+void Jsonnet::setGcMinObjects(std::uint32_t objects) - { - ::jsonnet_gc_min_objects(vm_, static_cast(objects)); - } -@@ -63,7 +63,7 @@ void Jsonnet::addImportPath(const std::string& path) - ::jsonnet_jpath_add(vm_, path.c_str()); - } - --void Jsonnet::setMaxTrace(uint32_t lines) -+void Jsonnet::setMaxTrace(std::uint32_t lines) - { - ::jsonnet_max_trace(vm_, static_cast(lines)); - } -diff --git a/include/libjsonnet++.h b/include/libjsonnet++.h -index 5d68719..c2dd7a5 100644 ---- a/include/libjsonnet++.h -+++ b/include/libjsonnet++.h -@@ -18,6 +18,7 @@ limitations under the License. - #define CPP_JSONNET_H_ - - #include -+#include - #include - #include - #include -@@ -46,11 +47,11 @@ class Jsonnet { - bool init(); - - /// Sets the maximum stack depth. -- void setMaxStack(uint32_t depth); -+ void setMaxStack(std::uint32_t depth); - - /// Sets the number of objects required before a garbage collection cycle is - /// allowed. -- void setGcMinObjects(uint32_t objects); -+ void setGcMinObjects(std::uint32_t objects); - - /// Run the garbage collector after this amount of growth in the number of - /// objects. -@@ -60,7 +61,7 @@ class Jsonnet { - void setStringOutput(bool string_output); - - /// Set the number of lines of stack trace to display (0 to display all). -- void setMaxTrace(uint32_t lines); -+ void setMaxTrace(std::uint32_t lines); - - /// Add to the default import callback's library search path. - void addImportPath(const std::string& path); diff --git a/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch deleted file mode 100644 index 60b0becabfdca..0000000000000 --- a/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c14c93c..b1cb1b3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -43,7 +43,7 @@ else() - message(WARNING "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") - endif() - --set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD 17) - - - # Include external googletest project. This runs a CMake sub-script From 9021fcc360c2b60e11d1fc679e46f527bdd2442a Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 28 Jun 2023 00:06:43 +0900 Subject: [PATCH 08/10] force C++17 on 0.20.0 --- recipes/jsonnet/all/conandata.yml | 4 ++++ .../jsonnet/all/patches/0.20.0/0003-use-cpp17.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch diff --git a/recipes/jsonnet/all/conandata.yml b/recipes/jsonnet/all/conandata.yml index 398bb40557f8d..260d7031fb23c 100644 --- a/recipes/jsonnet/all/conandata.yml +++ b/recipes/jsonnet/all/conandata.yml @@ -19,6 +19,10 @@ patches: - patch_file: "patches/0.18.0/0002-cmake-fixes.patch" patch_description: "fix rapidyaml name, add installation" patch_type: "conan" + - patch_file: "patches/0.20.0/0003-use-cpp17.patch" + patch_description: "use C++17" + patch_type: "portability" + patch_source: "https://github.com/google/jsonnet/pull/1076" "0.19.1": - patch_file: "patches/0.18.0/0001-fix-nlohmann-include.patch" patch_description: "fix include path to use cci package" diff --git a/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch new file mode 100644 index 0000000000000..416c1e1a0ef9c --- /dev/null +++ b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch @@ -0,0 +1,13 @@ +iff --git a/CMakeLists.txt b/CMakeLists.txt +index c14c93c..b1cb1b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,7 +43,7 @@ else() + message(WARNING "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") + endif() + +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 17) + + + # Include external googletest project. This runs a CMake sub-script From fb693b7e4c07fa9c61511b0a10e6cbaaf1dce0b5 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 28 Jun 2023 14:40:33 +0200 Subject: [PATCH 09/10] Update recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch --- recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch index 416c1e1a0ef9c..3fd0be7fe806d 100644 --- a/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch +++ b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch @@ -7,6 +7,7 @@ index c14c93c..b1cb1b3 100644 endif() -set(CMAKE_CXX_STANDARD 11) ++# FIXME: This is a temporary workaround, necessary in MSVC only for version 0.20 and Conan 1.X +set(CMAKE_CXX_STANDARD 17) From cffb2fe6076d8a878df6a7f49614a9807da438d2 Mon Sep 17 00:00:00 2001 From: memsharded Date: Wed, 28 Jun 2023 17:05:21 +0200 Subject: [PATCH 10/10] fix patch --- recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch index 3fd0be7fe806d..6735bb58adc58 100644 --- a/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch +++ b/recipes/jsonnet/all/patches/0.20.0/0003-use-cpp17.patch @@ -2,7 +2,7 @@ iff --git a/CMakeLists.txt b/CMakeLists.txt index c14c93c..b1cb1b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -43,7 +43,7 @@ else() +@@ -43,7 +43,8 @@ else() message(WARNING "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") endif()