From a49eead9d75216e48c4eb85fd3dfe10445762020 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 20 Jul 2023 23:16:24 +0300 Subject: [PATCH 01/38] libjxl: migrate to Conan v2 --- recipes/libjxl/all/CMakeLists.txt | 7 - recipes/libjxl/all/conandata.yml | 4 - recipes/libjxl/all/conanfile.py | 134 +++++++++--------- .../patches/0002-fix-dependencies-v0.5.patch | 7 +- .../patches/0002-fix-dependencies-v0.6.patch | 7 +- .../libjxl/all/test_package/CMakeLists.txt | 7 +- recipes/libjxl/all/test_package/conanfile.py | 21 ++- .../libjxl/all/test_package/test_package.c | 2 +- .../libjxl/all/test_v1_package/CMakeLists.txt | 8 ++ .../libjxl/all/test_v1_package/conanfile.py | 18 +++ 10 files changed, 121 insertions(+), 94 deletions(-) delete mode 100644 recipes/libjxl/all/CMakeLists.txt 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/conandata.yml b/recipes/libjxl/all/conandata.yml index 8a3abcae1301c..dd6e894d8f2d3 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -8,11 +8,7 @@ sources: 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..2a524bfb6e12b 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -1,9 +1,13 @@ -from conans import ConanFile, CMake, tools +import glob import os import shutil -import glob -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.build import cross_building, stdcpp_library +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir + +required_conan_version = ">=1.53.0" class LibjxlConan(ConanFile): @@ -14,17 +18,19 @@ 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} + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + 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" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -32,65 +38,66 @@ def config_options(self): 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("lcms/2.14") 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): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["JPEGXL_STATIC"] = not self.options.shared + tc.variables["JPEGXL_ENABLE_BENCHMARK"] = False + tc.variables["JPEGXL_ENABLE_EXAMPLES"] = False + tc.variables["JPEGXL_ENABLE_MANPAGES"] = False + tc.variables["JPEGXL_ENABLE_SJPEG"] = False + tc.variables["JPEGXL_ENABLE_OPENEXR"] = False + tc.variables["JPEGXL_ENABLE_SKCMS"] = False + tc.variables["JPEGXL_ENABLE_TCMALLOC"] = False + if cross_building(self): + tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) + tc.generate() + tc = CMakeDeps(self) + tc.generate() 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 + apply_conandata_patches(self) 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", src=self.source_folder, dst=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") + rm(self, "*.a", libs_dir, recursive=True) + rm(self, "*-static.lib", libs_dir, recursive=True) if self.settings.os == "Windows": - self.copy("jxl_dec.dll", src="bin", dst="bin") - self.copy("jxl_dec.lib", src="lib", dst="lib") + copy(self, "jxl_dec.dll", src="bin", dst=os.path.join(self.package_folder, "bin")) + copy(self, "jxl_dec.lib", src="lib", dst=os.path.join(self.package_folder, "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))) + 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") + copy(self, "libjxl_dec.*", src="lib", dst=os.path.join(self.package_folder, "lib")) def _lib_name(self, name): if not self.options.shared and self.settings.os == "Windows": @@ -99,29 +106,20 @@ def _lib_name(self, name): def package_info(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"] # jxl_dec - self.cpp_info.components["jxl_dec"].names["pkg_config"] = "libjxl_dec" + 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"] + self.cpp_info.components["jxl_dec"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] # 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")] + 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 == "Linux": 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 and stdcpp_library(self): + self.cpp_info.components["jxl"].system_libs.append(stdcpp_library(self)) + self.cpp_info.components["jxl_dec"].system_libs.append(stdcpp_library(self)) + self.cpp_info.components["jxl_threads"].system_libs.append(stdcpp_library(self)) diff --git a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch index 8ec6fc1cb0d9d..8a4eaab568854 100644 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch +++ b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch @@ -1,11 +1,14 @@ --- a/lib/jxl.cmake +++ b/lib/jxl.cmake -@@ -328,7 +328,7 @@ if (JPEGXL_ENABLE_SKCMS) +@@ -328,7 +328,10 @@ 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}) ++ find_package(lcms REQUIRED CONFIG) ++ find_package(brotli REQUIRED CONFIG) ++ find_package(highway REQUIRED CONFIG) ++ link_libraries(lcms::lcms highway::highway brotli::brotli) endif () if (NOT JPEGXL_ENABLE_TRANSCODE_JPEG) diff --git a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch index b4ff403da499f..53353f8d6d0c5 100644 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch +++ b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch @@ -1,11 +1,14 @@ --- a/lib/jxl.cmake +++ b/lib/jxl.cmake -@@ -334,7 +334,7 @@ if (JPEGXL_ENABLE_SKCMS) +@@ -334,7 +334,10 @@ 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}) ++ find_package(lcms REQUIRED CONFIG) ++ find_package(brotli REQUIRED CONFIG) ++ find_package(highway REQUIRED CONFIG) ++ link_libraries(lcms::lcms highway::highway brotli::brotli) endif () if (NOT JPEGXL_ENABLE_TRANSCODE_JPEG) 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..3c3501d3211c2 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" + 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,7 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") img_path = os.path.join(self.source_folder, "test.jxl") - self.run(bin_path + " " + img_path, run_environment=True) + self.run(f"{bin_path} {img_path}", env="conanrun") diff --git a/recipes/libjxl/all/test_package/test_package.c b/recipes/libjxl/all/test_package/test_package.c index 2cb652aa9249a..bde283b229764 100644 --- a/recipes/libjxl/all/test_package/test_package.c +++ b/recipes/libjxl/all/test_package/test_package.c @@ -44,7 +44,7 @@ static int ReadFile(const char filename[], uint8_t *data[], size_t *size) int main(int argc, char *argv[]) { int ret = EXIT_FAILURE; - + if (argc < 2) { fprintf(stderr, "Need at least one argument\n"); return ret; diff --git a/recipes/libjxl/all/test_v1_package/CMakeLists.txt b/recipes/libjxl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libjxl/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/libjxl/all/test_v1_package/conanfile.py b/recipes/libjxl/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..c34493a6b9fdb --- /dev/null +++ b/recipes/libjxl/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + 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) From e9fff9e8090477a7fed6eed972731e434c5d23a1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 26 Jul 2023 23:23:28 +0300 Subject: [PATCH 02/38] libjxl: restore VirtualRunEnv in test_package --- recipes/libjxl/all/conanfile.py | 2 +- recipes/libjxl/all/test_package/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 2a524bfb6e12b..2cd3cf0a4d9b4 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -116,7 +116,7 @@ def package_info(self): # jxl_threads 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 == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["jxl_threads"].system_libs = ["pthread"] if not self.options.shared and stdcpp_library(self): diff --git a/recipes/libjxl/all/test_package/conanfile.py b/recipes/libjxl/all/test_package/conanfile.py index 3c3501d3211c2..c3c63d4a37de0 100644 --- a/recipes/libjxl/all/test_package/conanfile.py +++ b/recipes/libjxl/all/test_package/conanfile.py @@ -6,7 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" def requirements(self): From c731280f998fa6fcb6813c1b27858816c39cd4fe Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 12 Sep 2023 23:13:17 +0300 Subject: [PATCH 03/38] libjxl: bump deps --- recipes/libjxl/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 2cd3cf0a4d9b4..00540eebda653 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -44,8 +44,8 @@ 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("brotli/1.1.0") + self.requires("highway/0.12.2") # newer versions are not compatible self.requires("lcms/2.14") def source(self): From 5d6c63ab35639134ba01479e733c49803bc56868 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Oct 2023 13:56:30 +0300 Subject: [PATCH 04/38] libjxl: fix shared build --- recipes/libjxl/all/conanfile.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 00540eebda653..48514a16d8598 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -66,6 +66,9 @@ def generate(self): tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) tc.generate() tc = CMakeDeps(self) + tc.set_property("brotli::brotlicommon", "cmake_target_name", "brotlicommon-static") + tc.set_property("brotli::brotlienc", "cmake_target_name", "brotlienc-static") + tc.set_property("brotli::brotlidec", "cmake_target_name", "brotlidec-static") tc.generate() def _patch_sources(self): @@ -90,14 +93,12 @@ def package(self): rm(self, "*-static.lib", libs_dir, recursive=True) if self.settings.os == "Windows": - copy(self, "jxl_dec.dll", src="bin", dst=os.path.join(self.package_folder, "bin")) - copy(self, "jxl_dec.lib", src="lib", dst=os.path.join(self.package_folder, "lib")) + copy(self, "jxl_dec.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) + copy(self, "jxl_dec.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) 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)) - ) + shutil.move(dll_path, os.path.join(self.package_folder, "bin", os.path.basename(dll_path))) else: - copy(self, "libjxl_dec.*", src="lib", dst=os.path.join(self.package_folder, "lib")) + copy(self, "libjxl_dec.so*", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) def _lib_name(self, name): if not self.options.shared and self.settings.os == "Windows": From 83b4d1b811ab22caa4fa67799f42e717d971fa59 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Oct 2023 14:42:10 +0300 Subject: [PATCH 05/38] libjxl: simplify patching --- recipes/libjxl/all/conandata.yml | 11 +- recipes/libjxl/all/conanfile.py | 19 ++- .../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 | 109 --------------- .../patches/0002-fix-dependencies-v0.6.patch | 129 ------------------ 6 files changed, 16 insertions(+), 326 deletions(-) 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 diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index dd6e894d8f2d3..12c2c8e0208e6 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -1,14 +1,7 @@ sources: - "0.5.0": - url: "https://github.com/libjxl/libjxl/archive/v0.5.zip" - sha256: "a208be41542c6f81f10a82c6bb4bc75d3eceb9d4f7ecb6ea0ad2f2d236694c4b" "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" - - patch_file: "patches/0002-fix-dependencies-v0.5.patch" - "0.6.1": - - patch_file: "patches/0001-clean-targets-v0.6.patch" - - patch_file: "patches/0002-fix-dependencies-v0.6.patch" + url: "https://github.com/libjxl/libjxl/archive/v0.5.zip" + sha256: "a208be41542c6f81f10a82c6bb4bc75d3eceb9d4f7ecb6ea0ad2f2d236694c4b" diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 48514a16d8598..2de839857876c 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -5,7 +5,7 @@ from conan import ConanFile from conan.tools.build import cross_building, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.files import replace_in_file, copy, get, rm, rmdir, save required_conan_version = ">=1.53.0" @@ -29,9 +29,6 @@ class LibjxlConan(ConanFile): "fPIC": True, } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -65,14 +62,26 @@ def generate(self): if cross_building(self): tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) tc.generate() + tc = CMakeDeps(self) tc.set_property("brotli::brotlicommon", "cmake_target_name", "brotlicommon-static") tc.set_property("brotli::brotlienc", "cmake_target_name", "brotlienc-static") tc.set_property("brotli::brotlidec", "cmake_target_name", "brotlidec-static") + tc.set_property("highway", "cmake_target_name", "hwy") + tc.set_property("lcms", "cmake_target_name", "lcms2") tc.generate() def _patch_sources(self): - apply_conandata_patches(self) + save(self, os.path.join(self.source_folder, "tools", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "lib", "jxl_extras.cmake"), "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(third_party)", + ("find_package(lcms REQUIRED CONFIG)\n" + "find_package(brotli REQUIRED CONFIG)\n" + "find_package(highway REQUIRED CONFIG)\n" + "include_directories(${lcms_INCLUDE_DIRS} ${highway_INCLUDE_DIRS} ${brotli_INCLUDE_DIRS})\n" + "link_libraries(brotli::brotli)\n") + ) def build(self): self._patch_sources() 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 8a4eaab568854..0000000000000 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch +++ /dev/null @@ -1,109 +0,0 @@ ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -328,7 +328,10 @@ 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) -+ find_package(lcms REQUIRED CONFIG) -+ find_package(brotli REQUIRED CONFIG) -+ find_package(highway REQUIRED CONFIG) -+ link_libraries(lcms::lcms highway::highway brotli::brotli) - 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 53353f8d6d0c5..0000000000000 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch +++ /dev/null @@ -1,129 +0,0 @@ ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -334,7 +334,10 @@ if (JPEGXL_ENABLE_SKCMS) - list(APPEND JPEGXL_INTERNAL_LIBS skcms) - endif () - else () -- list(APPEND JPEGXL_INTERNAL_LIBS lcms2) -+ find_package(lcms REQUIRED CONFIG) -+ find_package(brotli REQUIRED CONFIG) -+ find_package(highway REQUIRED CONFIG) -+ link_libraries(lcms::lcms highway::highway brotli::brotli) - 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") From b28d312fb34413bd2896c03602c4bbf4ee58f8e0 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Oct 2023 14:45:33 +0300 Subject: [PATCH 06/38] libjxl: add v0.8.2, v0.7 --- recipes/libjxl/all/conandata.yml | 6 ++++++ recipes/libjxl/all/conanfile.py | 6 +++++- recipes/libjxl/config.yml | 6 +++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index 12c2c8e0208e6..7753490f85acb 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.8.2": + url: "https://github.com/libjxl/libjxl/archive/v0.8.2.zip" + sha256: "1f2ccc06f07c4f6cf4aa6c7763ba0598f12a7544d597f02beb07f615eb08ccf0" + "0.7.0": + url: "https://github.com/libjxl/libjxl/archive/v0.7.0.zip" + sha256: "e729ff2612846cb774e646f65bf60c242bdc5ab45572885cda63f0400cfa145e" "0.6.1": url: "https://github.com/libjxl/libjxl/archive/v0.6.1.zip" sha256: "3e4877daef07724aa6f490bf80c45ada804f35fe3cce59c27e89c5ae3099535a" diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 2de839857876c..658935b37dd4a 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.build import cross_building, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import replace_in_file, copy, get, rm, rmdir, save +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -42,7 +43,10 @@ def layout(self): def requirements(self): self.requires("brotli/1.1.0") - self.requires("highway/0.12.2") # newer versions are not compatible + if Version(self.version) >= "0.7": + self.requires("highway/1.0.7") + else: + self.requires("highway/0.12.2") self.requires("lcms/2.14") def source(self): diff --git a/recipes/libjxl/config.yml b/recipes/libjxl/config.yml index c79a1af3be31f..5c9e331017a10 100644 --- a/recipes/libjxl/config.yml +++ b/recipes/libjxl/config.yml @@ -1,5 +1,9 @@ versions: - "0.5.0": + "0.8.2": + folder: all + "0.7.0": folder: all "0.6.1": folder: all + "0.5.0": + folder: all From 1ec09820a0be55fffc551c8f228ff7a95c715bb8 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Oct 2023 14:46:54 +0300 Subject: [PATCH 07/38] libjxl: fix test_v1_package --- recipes/libjxl/all/test_v1_package/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libjxl/all/test_v1_package/conanfile.py b/recipes/libjxl/all/test_v1_package/conanfile.py index c34493a6b9fdb..9baad8fd8f245 100644 --- a/recipes/libjxl/all/test_v1_package/conanfile.py +++ b/recipes/libjxl/all/test_v1_package/conanfile.py @@ -14,5 +14,5 @@ def build(self): 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") + img_path = os.path.join(self.source_folder, os.pardir, "test_package", "test.jxl") self.run(bin_path + " " + img_path, run_environment=True) From 9b1df9dfd2c225adb1e5df2fb8e061c2aff2c8be Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Oct 2023 15:20:27 +0300 Subject: [PATCH 08/38] 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. --- recipes/libjxl/all/conanfile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 658935b37dd4a..3e79804f98195 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -83,9 +83,12 @@ def _patch_sources(self): ("find_package(lcms REQUIRED CONFIG)\n" "find_package(brotli REQUIRED CONFIG)\n" "find_package(highway REQUIRED CONFIG)\n" - "include_directories(${lcms_INCLUDE_DIRS} ${highway_INCLUDE_DIRS} ${brotli_INCLUDE_DIRS})\n" - "link_libraries(brotli::brotli)\n") + "link_libraries(brotli::brotli hwy lcms2)\n") ) + replace_in_file(self, os.path.join(self.source_folder, "lib", "jxl.cmake"), + '"$ Date: Fri, 3 Nov 2023 13:31:57 +0200 Subject: [PATCH 09/38] libjxl: fix linking issues with brotli --- recipes/libjxl/all/conanfile.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 3e79804f98195..6deeda0fd7bd1 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -68,27 +68,33 @@ def generate(self): tc.generate() tc = CMakeDeps(self) - tc.set_property("brotli::brotlicommon", "cmake_target_name", "brotlicommon-static") - tc.set_property("brotli::brotlienc", "cmake_target_name", "brotlienc-static") - tc.set_property("brotli::brotlidec", "cmake_target_name", "brotlidec-static") - tc.set_property("highway", "cmake_target_name", "hwy") - tc.set_property("lcms", "cmake_target_name", "lcms2") tc.generate() def _patch_sources(self): + # Disable tools and extras save(self, os.path.join(self.source_folder, "tools", "CMakeLists.txt"), "") save(self, os.path.join(self.source_folder, "lib", "jxl_extras.cmake"), "") + # Inject Conan dependencies replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(third_party)", ("find_package(lcms REQUIRED CONFIG)\n" "find_package(brotli REQUIRED CONFIG)\n" "find_package(highway REQUIRED CONFIG)\n" - "link_libraries(brotli::brotli hwy lcms2)\n") - ) - replace_in_file(self, os.path.join(self.source_folder, "lib", "jxl.cmake"), - '"$ Date: Sun, 3 Dec 2023 19:54:41 +0200 Subject: [PATCH 10/38] libjxl: drop old versions --- recipes/libjxl/all/conandata.yml | 9 --------- recipes/libjxl/all/conanfile.py | 6 +----- recipes/libjxl/config.yml | 6 ------ 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index 7753490f85acb..5a8b9551da6b4 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -2,12 +2,3 @@ sources: "0.8.2": url: "https://github.com/libjxl/libjxl/archive/v0.8.2.zip" sha256: "1f2ccc06f07c4f6cf4aa6c7763ba0598f12a7544d597f02beb07f615eb08ccf0" - "0.7.0": - url: "https://github.com/libjxl/libjxl/archive/v0.7.0.zip" - sha256: "e729ff2612846cb774e646f65bf60c242bdc5ab45572885cda63f0400cfa145e" - "0.6.1": - url: "https://github.com/libjxl/libjxl/archive/v0.6.1.zip" - sha256: "3e4877daef07724aa6f490bf80c45ada804f35fe3cce59c27e89c5ae3099535a" - "0.5.0": - url: "https://github.com/libjxl/libjxl/archive/v0.5.zip" - sha256: "a208be41542c6f81f10a82c6bb4bc75d3eceb9d4f7ecb6ea0ad2f2d236694c4b" diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 6deeda0fd7bd1..5743c3d6c8e1b 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -6,7 +6,6 @@ from conan.tools.build import cross_building, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import replace_in_file, copy, get, rm, rmdir, save -from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -43,10 +42,7 @@ def layout(self): def requirements(self): self.requires("brotli/1.1.0") - if Version(self.version) >= "0.7": - self.requires("highway/1.0.7") - else: - self.requires("highway/0.12.2") + self.requires("highway/1.0.7") self.requires("lcms/2.14") def source(self): diff --git a/recipes/libjxl/config.yml b/recipes/libjxl/config.yml index 5c9e331017a10..bed1cdd9bb5b1 100644 --- a/recipes/libjxl/config.yml +++ b/recipes/libjxl/config.yml @@ -1,9 +1,3 @@ versions: "0.8.2": folder: all - "0.7.0": - folder: all - "0.6.1": - folder: all - "0.5.0": - folder: all From 840ecbf399c6a62370422b05d4a3c85c93481975 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sun, 3 Dec 2023 23:31:48 +0200 Subject: [PATCH 11/38] libjxl: fix MSVC build --- recipes/libjxl/all/conanfile.py | 68 ++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 5743c3d6c8e1b..e5eae119d9d32 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -1,11 +1,9 @@ -import glob import os -import shutil from conan import ConanFile from conan.tools.build import cross_building, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import replace_in_file, copy, get, rm, rmdir, save +from conan.tools.files import replace_in_file, copy, get, rmdir, save required_conan_version = ">=1.53.0" @@ -50,21 +48,29 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["BUILD_TESTING"] = False - tc.variables["JPEGXL_STATIC"] = not self.options.shared - tc.variables["JPEGXL_ENABLE_BENCHMARK"] = False - tc.variables["JPEGXL_ENABLE_EXAMPLES"] = False - tc.variables["JPEGXL_ENABLE_MANPAGES"] = False - tc.variables["JPEGXL_ENABLE_SJPEG"] = False - tc.variables["JPEGXL_ENABLE_OPENEXR"] = False - tc.variables["JPEGXL_ENABLE_SKCMS"] = False - tc.variables["JPEGXL_ENABLE_TCMALLOC"] = False + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.cache_variables["BUILD_TESTING"] = False + tc.cache_variables["JPEGXL_STATIC"] = not self.options.shared # applies to tools only + tc.cache_variables["JPEGXL_ENABLE_BENCHMARK"] = False + tc.cache_variables["JPEGXL_ENABLE_EXAMPLES"] = False + tc.cache_variables["JPEGXL_ENABLE_MANPAGES"] = False + tc.cache_variables["JPEGXL_ENABLE_SJPEG"] = False + tc.cache_variables["JPEGXL_ENABLE_OPENEXR"] = False + tc.cache_variables["JPEGXL_ENABLE_SKCMS"] = False + tc.cache_variables["JPEGXL_ENABLE_TCMALLOC"] = False + tc.cache_variables["JPEGXL_FORCE_SYSTEM_BROTLI"] = True + tc.cache_variables["JPEGXL_FORCE_SYSTEM_LCMS2"] = True + tc.cache_variables["JPEGXL_FORCE_SYSTEM_HWY"] = True + tc.cache_variables["JPEGXL_FORCE_SYSTEM_GTEST"] = True if cross_building(self): tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) tc.generate() - tc = CMakeDeps(self) - 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() def _patch_sources(self): # Disable tools and extras @@ -73,9 +79,9 @@ def _patch_sources(self): # Inject Conan dependencies replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(third_party)", - ("find_package(lcms REQUIRED CONFIG)\n" - "find_package(brotli REQUIRED CONFIG)\n" - "find_package(highway REQUIRED CONFIG)\n" + ("find_package(LCMS2 REQUIRED CONFIG)\n" + "find_package(Brotli REQUIRED CONFIG)\n" + "find_package(HWY REQUIRED CONFIG)\n" "link_libraries(brotli::brotli highway::highway lcms::lcms)\n") ) # Do not link directly against libraries @@ -105,19 +111,6 @@ def package(self): copy(self, "LICENSE", src=self.source_folder, dst=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") - rm(self, "*.a", libs_dir, recursive=True) - rm(self, "*-static.lib", libs_dir, recursive=True) - - if self.settings.os == "Windows": - copy(self, "jxl_dec.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) - copy(self, "jxl_dec.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - 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: - copy(self, "libjxl_dec.so*", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - def _lib_name(self, name): if not self.options.shared and self.settings.os == "Windows": return name + "-static" @@ -128,17 +121,24 @@ def package_info(self): 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"] + # jxl_dec - 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 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"] + # jxl_threads 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 stdcpp_library(self): + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_STATIC_DEFINE") + self.cpp_info.components["jxl_threads"].defines.append("JXL_THREADS_STATIC_DEFINE") + + if stdcpp_library(self): self.cpp_info.components["jxl"].system_libs.append(stdcpp_library(self)) self.cpp_info.components["jxl_dec"].system_libs.append(stdcpp_library(self)) self.cpp_info.components["jxl_threads"].system_libs.append(stdcpp_library(self)) From 9c39923a81f4b9c06f5eb2577bba7ac9b4e09e3b Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 4 Dec 2023 09:30:41 +0200 Subject: [PATCH 12/38] libjxl: package only shared or static --- recipes/libjxl/all/conanfile.py | 45 ++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index e5eae119d9d32..da83302828229 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -3,7 +3,7 @@ from conan import ConanFile from conan.tools.build import cross_building, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import replace_in_file, copy, get, rmdir, save +from conan.tools.files import replace_in_file, copy, get, rmdir, save, rm required_conan_version = ">=1.53.0" @@ -85,16 +85,22 @@ def _patch_sources(self): "link_libraries(brotli::brotli highway::highway lcms::lcms)\n") ) # Do not link directly against libraries - jxl_cmake = os.path.join(self.source_folder, "lib", "jxl.cmake") - for lib, replacement in [ - ("hwy", "highway::highway"), - ("brotlicommon-static", "brotli::brotli"), - ("brotlienc-static", "brotli::brotli"), - ("brotlidec-static", "brotli::brotli"), - ("lcms2", "lcms::lcms"), + for cmake in [ + self.source_path.joinpath("lib", "jxl.cmake"), + self.source_path.joinpath("lib", "jpegli.cmake"), ]: - replace_in_file(self, jxl_cmake, lib, replacement) + content = cmake.read_text(encoding="utf8") + for lib, replacement in [ + ("hwy", "highway::highway"), + ("brotlicommon-static", "brotli::brotli"), + ("brotlienc-static", "brotli::brotli"), + ("brotlidec-static", "brotli::brotli"), + ("lcms2", "lcms::lcms"), + ]: + content = content.replace(lib, replacement) + cmake.write_text(content, encoding="utf8") # Avoid "INTERFACE_LIBRARY targets may only have whitelisted properties" error with Conan v1 + jxl_cmake = os.path.join(self.source_folder, "lib", "jxl.cmake") replace_in_file(self, jxl_cmake, '"$ Date: Mon, 4 Dec 2023 15:26:34 +0200 Subject: [PATCH 13/38] libjxl: add check_min_cppstd --- recipes/libjxl/all/conanfile.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index da83302828229..92b219c5ff038 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -1,7 +1,8 @@ import os -from conan import ConanFile -from conan.tools.build import cross_building, stdcpp_library +from conan import ConanFile, conan_version +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.files import replace_in_file, copy, get, rmdir, save, rm @@ -43,6 +44,10 @@ def requirements(self): self.requires("highway/1.0.7") self.requires("lcms/2.14") + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 753e8669e80d4a2405f14089e1e9a7e1418664c8 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 4 Dec 2023 15:27:04 +0200 Subject: [PATCH 14/38] libjxl: disable libc++ on Conan v1 --- recipes/libjxl/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 92b219c5ff038..e5600856d29a2 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -47,6 +47,8 @@ def requirements(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) + if conan_version.major == 1 and str(self.settings.compiler.libcxx) == "libc++": + raise ConanInvalidConfiguration("libc++ is not compatible with by libjxl due to limited std::atomic support") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 178fef9a84dd0f56c95065a6a3dddcaef419ca2a Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 8 Dec 2023 14:55:59 +0200 Subject: [PATCH 15/38] libidn: fix workaround check --- recipes/libjxl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index e5600856d29a2..33b05403619e3 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -47,7 +47,7 @@ def requirements(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) - if conan_version.major == 1 and str(self.settings.compiler.libcxx) == "libc++": + if conan_version.major == 1 and self.settings.get_safe("compiler.libcxx") == "libc++": raise ConanInvalidConfiguration("libc++ is not compatible with by libjxl due to limited std::atomic support") def source(self): From df9c130fc29230b523ee5da8cc89e0c4cbce0f28 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 13 Dec 2023 13:46:05 +0200 Subject: [PATCH 16/38] libjxl: fix -latomic detection --- recipes/libjxl/all/conanfile.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 33b05403619e3..82ad988fe36e8 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -1,7 +1,6 @@ import os -from conan import ConanFile, conan_version -from conan.errors import ConanInvalidConfiguration +from conan import ConanFile 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.files import replace_in_file, copy, get, rmdir, save, rm @@ -47,8 +46,6 @@ def requirements(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) - if conan_version.major == 1 and self.settings.get_safe("compiler.libcxx") == "libc++": - raise ConanInvalidConfiguration("libc++ is not compatible with by libjxl due to limited std::atomic support") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -79,6 +76,10 @@ def generate(self): deps.set_property("lcms", "cmake_file_name", "LCMS2") deps.generate() + @property + def _atomic_required(self): + return self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"] + def _patch_sources(self): # Disable tools and extras save(self, os.path.join(self.source_folder, "tools", "CMakeLists.txt"), "") @@ -110,6 +111,12 @@ def _patch_sources(self): jxl_cmake = os.path.join(self.source_folder, "lib", "jxl.cmake") replace_in_file(self, jxl_cmake, '"$ Date: Sat, 13 Jan 2024 18:54:32 +0200 Subject: [PATCH 17/38] jxl: add v0.9.1, v0.6.1, simplify patching --- recipes/libjxl/all/conan_deps.cmake | 22 +++++++ recipes/libjxl/all/conandata.yml | 9 ++- recipes/libjxl/all/conanfile.py | 94 +++++++++++++---------------- recipes/libjxl/config.yml | 4 +- 4 files changed, 74 insertions(+), 55 deletions(-) create mode 100644 recipes/libjxl/all/conan_deps.cmake diff --git a/recipes/libjxl/all/conan_deps.cmake b/recipes/libjxl/all/conan_deps.cmake new file mode 100644 index 0000000000000..59be04884b0ae --- /dev/null +++ b/recipes/libjxl/all/conan_deps.cmake @@ -0,0 +1,22 @@ +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(brotlicommon-static ALIAS brotlicommon) +add_library(brotlienc-static ALIAS brotlicommon) +add_library(brotlidec-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 5a8b9551da6b4..4ffbfb16a4cc3 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -1,4 +1,7 @@ sources: - "0.8.2": - url: "https://github.com/libjxl/libjxl/archive/v0.8.2.zip" - sha256: "1f2ccc06f07c4f6cf4aa6c7763ba0598f12a7544d597f02beb07f615eb08ccf0" + "0.9.1": + url: "https://github.com/libjxl/libjxl/archive/v0.9.1.zip" + sha256: "fb6ea3e8182499ef35f838e67551aa3804625cfd76f65c7f7287ed2c52f5ba79" + "0.6.1": + url: "https://github.com/libjxl/libjxl/archive/v0.6.1.zip" + sha256: "3e4877daef07724aa6f490bf80c45ada804f35fe3cce59c27e89c5ae3099535a" diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 82ad988fe36e8..78454a8e0b0a2 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -3,7 +3,9 @@ from conan import ConanFile 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.files import replace_in_file, copy, get, rmdir, save, rm +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, save, rm, replace_in_file +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -27,6 +29,9 @@ class LibjxlConan(ConanFile): "fPIC": True, } + 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 @@ -40,34 +45,48 @@ def layout(self): def requirements(self): self.requires("brotli/1.1.0") - self.requires("highway/1.0.7") - self.requires("lcms/2.14") + if Version(self.version) >= "0.7": + self.requires("highway/1.0.7") + else: + self.requires("highway/0.12.2") + self.requires("lcms/2.16") def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) + def build_requirements(self): + if Version(self.version) >= "0.9": + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + VirtualBuildEnv(self).generate() + tc = CMakeToolchain(self) - tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.cache_variables["BUILD_TESTING"] = False - tc.cache_variables["JPEGXL_STATIC"] = not self.options.shared # applies to tools only - tc.cache_variables["JPEGXL_ENABLE_BENCHMARK"] = False - tc.cache_variables["JPEGXL_ENABLE_EXAMPLES"] = False - tc.cache_variables["JPEGXL_ENABLE_MANPAGES"] = False - tc.cache_variables["JPEGXL_ENABLE_SJPEG"] = False - tc.cache_variables["JPEGXL_ENABLE_OPENEXR"] = False - tc.cache_variables["JPEGXL_ENABLE_SKCMS"] = False - tc.cache_variables["JPEGXL_ENABLE_TCMALLOC"] = False - tc.cache_variables["JPEGXL_FORCE_SYSTEM_BROTLI"] = True - tc.cache_variables["JPEGXL_FORCE_SYSTEM_LCMS2"] = True - tc.cache_variables["JPEGXL_FORCE_SYSTEM_HWY"] = True - tc.cache_variables["JPEGXL_FORCE_SYSTEM_GTEST"] = True + 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_ENABLE_BENCHMARK"] = False + tc.variables["JPEGXL_ENABLE_EXAMPLES"] = False + tc.variables["JPEGXL_ENABLE_MANPAGES"] = False + tc.variables["JPEGXL_ENABLE_SJPEG"] = False + tc.variables["JPEGXL_ENABLE_OPENEXR"] = False + tc.variables["JPEGXL_ENABLE_SKCMS"] = False + tc.variables["JPEGXL_ENABLE_TCMALLOC"] = False + tc.variables["JPEGXL_FORCE_SYSTEM_BROTLI"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_LCMS2"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_HWY"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_GTEST"] = True 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_FOUND"] = True + tc.variables["ATOMICS_LIBRARIES"] = "atomic" if self._atomic_required else "" tc.generate() deps = CMakeDeps(self) @@ -81,42 +100,15 @@ def _atomic_required(self): return self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"] def _patch_sources(self): - # Disable tools and extras + # 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, "lib", "jxl_extras.cmake"), "") - # Inject Conan dependencies - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "add_subdirectory(third_party)", - ("find_package(LCMS2 REQUIRED CONFIG)\n" - "find_package(Brotli REQUIRED CONFIG)\n" - "find_package(HWY REQUIRED CONFIG)\n" - "link_libraries(brotli::brotli highway::highway lcms::lcms)\n") - ) - # Do not link directly against libraries - for cmake in [ - self.source_path.joinpath("lib", "jxl.cmake"), - self.source_path.joinpath("lib", "jpegli.cmake"), - ]: - content = cmake.read_text(encoding="utf8") - for lib, replacement in [ - ("hwy", "highway::highway"), - ("brotlicommon-static", "brotli::brotli"), - ("brotlienc-static", "brotli::brotli"), - ("brotlidec-static", "brotli::brotli"), - ("lcms2", "lcms::lcms"), - ]: - content = content.replace(lib, replacement) - cmake.write_text(content, encoding="utf8") - # Avoid "INTERFACE_LIBRARY targets may only have whitelisted properties" error with Conan v1 - jxl_cmake = os.path.join(self.source_folder, "lib", "jxl.cmake") - replace_in_file(self, jxl_cmake, '"$ Date: Sat, 13 Jan 2024 19:17:44 +0200 Subject: [PATCH 18/38] jxl: add jxl_cms component --- recipes/libjxl/all/conanfile.py | 35 +++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 78454a8e0b0a2..83755b1afbc7d 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -87,6 +87,10 @@ def generate(self): # Skip the buggy custom FindAtomic and force the use of atomic library directly for libstdc++ tc.variables["ATOMICS_FOUND"] = True tc.variables["ATOMICS_LIBRARIES"] = "atomic" if self._atomic_required else "" + if Version(self.version) >= "0.8": + # TODO: add support for jpegli JPEG encoder library + tc.variables["JPEGXL_ENABLE_JPEGLI"] = False + tc.variables["JPEGXL_ENABLE_JPEGLI_LIBJPEG"] = False tc.generate() deps = CMakeDeps(self) @@ -131,31 +135,42 @@ def _lib_name(self, name): return name def package_info(self): + libcxx = stdcpp_library(self) + # jxl 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"] - if stdcpp_library(self): - self.cpp_info.components["jxl"].system_libs.append(stdcpp_library(self)) 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 = ["jxl", "lcms::lcms", "highway::highway"] + if libcxx: + self.cpp_info.components["jxl_cms"].system_libs.append(libcxx) # jxl_dec - 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 stdcpp_library(self): - self.cpp_info.components["jxl_dec"].system_libs.append(stdcpp_library(self)) + 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"].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 stdcpp_library(self): - self.cpp_info.components["jxl_threads"].system_libs.append(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) From a3c0d4f9e88bdbf99dd062c09a96d83558de2f58 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 13 Jan 2024 19:50:51 +0200 Subject: [PATCH 19/38] jxl: always require newer CMake --- recipes/libjxl/all/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 83755b1afbc7d..334dc4bddab23 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -56,8 +56,9 @@ def validate(self): check_min_cppstd(self, 11) def build_requirements(self): - if Version(self.version) >= "0.9": - self.tool_requires("cmake/[>=3.16 <4]") + # 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): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 4c66090e5bffade71e5469451320a120db9ba265 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 13 Jan 2024 20:41:00 +0200 Subject: [PATCH 20/38] jxl: Fix --exclude-libs detection on apple-clang --- recipes/libjxl/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 334dc4bddab23..03647497a7dfa 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -92,6 +92,9 @@ def generate(self): # TODO: add support for jpegli JPEG encoder library tc.variables["JPEGXL_ENABLE_JPEGLI"] = False tc.variables["JPEGXL_ENABLE_JPEGLI_LIBJPEG"] = False + # Fix --exclude-libs detection on apple-clang + # https://github.com/libjxl/libjxl/blob/v0.9.1/lib/jxl.cmake#L212-L217 + tc.variables["LINKER_SUPPORT_EXCLUDE_LIBS"] = self.settings.compiler in ["gcc", "clang"] tc.generate() deps = CMakeDeps(self) From 44d6e24dde42447cfc1ffbc325e12ffab51dee1f Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 13 Jan 2024 20:41:11 +0200 Subject: [PATCH 21/38] jxl: add more target aliases --- recipes/libjxl/all/conan_deps.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/libjxl/all/conan_deps.cmake b/recipes/libjxl/all/conan_deps.cmake index 59be04884b0ae..e62d6fec8071b 100644 --- a/recipes/libjxl/all/conan_deps.cmake +++ b/recipes/libjxl/all/conan_deps.cmake @@ -7,9 +7,11 @@ 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(brotlienc-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) From dc310408c486794f0bff1e80d8e5f8d51c3b60a3 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 13 Jan 2024 22:21:37 +0200 Subject: [PATCH 22/38] jxl: fix --exclude-libs on v0.6.1 --- recipes/libjxl/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 03647497a7dfa..a4a736732e246 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -92,9 +92,6 @@ def generate(self): # TODO: add support for jpegli JPEG encoder library tc.variables["JPEGXL_ENABLE_JPEGLI"] = False tc.variables["JPEGXL_ENABLE_JPEGLI_LIBJPEG"] = False - # Fix --exclude-libs detection on apple-clang - # https://github.com/libjxl/libjxl/blob/v0.9.1/lib/jxl.cmake#L212-L217 - tc.variables["LINKER_SUPPORT_EXCLUDE_LIBS"] = self.settings.compiler in ["gcc", "clang"] tc.generate() deps = CMakeDeps(self) @@ -117,6 +114,9 @@ def _patch_sources(self): 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() From 0a75227bce43fbbf9d2e9c82711a7ebb398e5ce0 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 13 Jan 2024 23:13:28 +0200 Subject: [PATCH 23/38] jxl: disable FindAtomics.cmake --- recipes/libjxl/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index a4a736732e246..cefc8d8661fc3 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -86,7 +86,6 @@ def generate(self): # 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_FOUND"] = True tc.variables["ATOMICS_LIBRARIES"] = "atomic" if self._atomic_required else "" if Version(self.version) >= "0.8": # TODO: add support for jpegli JPEG encoder library @@ -109,6 +108,8 @@ def _patch_sources(self): save(self, os.path.join(self.source_folder, "tools", "CMakeLists.txt"), "") save(self, os.path.join(self.source_folder, "lib", "jxl_extras.cmake"), "") 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"), "") if Version(self.version) < "0.7": replace_in_file(self, os.path.join(self.source_folder, "lib", "jxl.cmake"), From 87c520010fc3302845bfe5789c0d2e3e7a738405 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 15 Jan 2024 09:12:11 +0200 Subject: [PATCH 24/38] jxl: improve fPIC handling --- recipes/libjxl/all/conanfile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index cefc8d8661fc3..05df4db76f788 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -111,6 +111,12 @@ def _patch_sources(self): # 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 + for cmake_file in ["jxl.cmake", "jxl_threads.cmake", "jxl_cms.cmake"]: + path = os.path.join(self.source_folder, "lib", cmake_file) + if os.path.exists(path): + replace_in_file(self, path, "POSITION_INDEPENDENT_CODE ON", "POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE}") + if Version(self.version) < "0.7": replace_in_file(self, os.path.join(self.source_folder, "lib", "jxl.cmake"), " DESTINATION ${CMAKE_INSTALL_LIBDIR}", From dc02c7eaf55e79673cb528669518a275e97ea2ea Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 15 Jan 2024 09:12:28 +0200 Subject: [PATCH 25/38] jxl: -static suffix is no longer added on Windows --- recipes/libjxl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 05df4db76f788..761846de0ccf3 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -141,7 +141,7 @@ def package(self): 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 From 5d9761b67af2ca67be023444d0b8f512b991496b Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 15 Jan 2024 09:15:00 +0200 Subject: [PATCH 26/38] jxl: more fPIC fixes --- recipes/libjxl/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 761846de0ccf3..3454808f1b171 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -112,7 +112,9 @@ def _patch_sources(self): save(self, os.path.join(self.source_folder, "cmake", "FindAtomics.cmake"), "") # Allow fPIC to be set by Conan - for cmake_file in ["jxl.cmake", "jxl_threads.cmake", "jxl_cms.cmake"]: + 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): replace_in_file(self, path, "POSITION_INDEPENDENT_CODE ON", "POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE}") From b8f8a56564cd1a69bbb83edbb5678b0f9adc05f6 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 15 Jan 2024 14:12:55 +0200 Subject: [PATCH 27/38] jxl: add with_tcmalloc option, set all v0.9.1 CMake vars --- recipes/libjxl/all/conanfile.py | 48 ++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 3454808f1b171..e2eb64a7f7329 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -5,6 +5,7 @@ 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.scm import Version required_conan_version = ">=1.53.0" @@ -23,10 +24,20 @@ class LibjxlConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "avx512": [True, False], + "avx512_spr": [True, False], + "avx512_zen4": [True, False], + "force_neon": [True, False], + "with_tcmalloc": [True, False], } default_options = { "shared": False, "fPIC": True, + "avx512": False, + "avx512_spr": False, + "avx512_zen4": False, + "force_neon": False, + "with_tcmalloc": False, } def export_sources(self): @@ -35,6 +46,12 @@ def export_sources(self): 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 + if not str(self.settings.arch).startswith("arm"): + del self.options.force_neon def configure(self): if self.options.shared: @@ -50,6 +67,8 @@ def requirements(self): else: self.requires("highway/0.12.2") self.requires("lcms/2.16") + if self.options.with_tcmalloc: + self.requires("gperftools/2.13.0") def validate(self): if self.settings.compiler.cppstd: @@ -70,17 +89,27 @@ def generate(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_SJPEG"] = 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"] = False + tc.variables["JPEGXL_ENABLE_TCMALLOC"] = self.options.with_tcmalloc + tc.variables["JPEGXL_ENABLE_VIEWERS"] = False tc.variables["JPEGXL_FORCE_SYSTEM_BROTLI"] = True - tc.variables["JPEGXL_FORCE_SYSTEM_LCMS2"] = True - tc.variables["JPEGXL_FORCE_SYSTEM_HWY"] = 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_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) + tc.variables["JPEGXL_FORCE_NEON"] = self.options.get_safe("force_neon", False) if cross_building(self): tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) # Allow non-cache_variables to be used @@ -88,7 +117,7 @@ def generate(self): # 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 jpegli JPEG encoder library + # TODO: add support for the jpegli JPEG encoder library tc.variables["JPEGXL_ENABLE_JPEGLI"] = False tc.variables["JPEGXL_ENABLE_JPEGLI_LIBJPEG"] = False tc.generate() @@ -99,6 +128,10 @@ def generate(self): 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"] @@ -117,7 +150,8 @@ def _patch_sources(self): 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): - replace_in_file(self, path, "POSITION_INDEPENDENT_CODE ON", "POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE}") + 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"), @@ -154,6 +188,8 @@ def package_info(self): 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"] + 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: From 387fc1774aea7d9b23c1548c045611712e93b8f0 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 15 Jan 2024 14:16:05 +0200 Subject: [PATCH 28/38] jxl: match the tcmalloc setting in the project --- recipes/libjxl/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index e2eb64a7f7329..385d31048d6f6 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -52,6 +52,9 @@ def config_options(self): del self.options.avx512_zen4 if not str(self.settings.arch).startswith("arm"): del self.options.force_neon + # 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: From 283be32c464fb8b2116e41a37d687b12a85214b6 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 23 Jan 2024 15:50:49 +0200 Subject: [PATCH 29/38] libjxl: fix Debug build --- recipes/libjxl/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 385d31048d6f6..15105bc325634 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -6,6 +6,7 @@ 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" @@ -123,6 +124,10 @@ def generate(self): # 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) From 3739eb9ac68d3c7c17548436203766343ee84c66 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 23 Jan 2024 20:02:22 +0200 Subject: [PATCH 30/38] libjxl: disable MSVC Debug build for v0.6.1 --- recipes/libjxl/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 15105bc325634..d2cf823bea145 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -1,6 +1,7 @@ import os 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 @@ -77,6 +78,9 @@ def requirements(self): 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.settings.build_type == "Debug": + # Fails with a missing DLL error in test_package + raise ConanInvalidConfiguration(f"{self.ref} does not support Debug builds with MSVC") def build_requirements(self): # Require newer CMake, which allows INCLUDE_DIRECTORIES to be set on INTERFACE targets From d0a113449e28383923a85c70b9d4f681691d1358 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 24 Jan 2024 13:45:03 +0200 Subject: [PATCH 31/38] libjxl: add DLL define for jxl_cms --- recipes/libjxl/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index d2cf823bea145..eb699665d83c5 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -213,7 +213,9 @@ def package_info(self): 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 = ["jxl", "lcms::lcms", "highway::highway"] + 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) From 98623b7e0cd0169bde2d3f86e31546f4b36c645c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 22 Mar 2024 16:14:33 +0200 Subject: [PATCH 32/38] libjxl: bump to v0.10.2 --- recipes/libjxl/all/conandata.yml | 6 +++--- recipes/libjxl/config.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index 4ffbfb16a4cc3..e6532c20ad0c3 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -1,7 +1,7 @@ sources: - "0.9.1": - url: "https://github.com/libjxl/libjxl/archive/v0.9.1.zip" - sha256: "fb6ea3e8182499ef35f838e67551aa3804625cfd76f65c7f7287ed2c52f5ba79" + "0.10.2": + url: "https://github.com/libjxl/libjxl/archive/v0.10.2.zip" + sha256: "910ab4245eebe0fba801a057f5fbc4fe96dad7c9979880bb49ad3e2623a911a2" "0.6.1": url: "https://github.com/libjxl/libjxl/archive/v0.6.1.zip" sha256: "3e4877daef07724aa6f490bf80c45ada804f35fe3cce59c27e89c5ae3099535a" diff --git a/recipes/libjxl/config.yml b/recipes/libjxl/config.yml index 3079d7be5b995..d6e3fa6278408 100644 --- a/recipes/libjxl/config.yml +++ b/recipes/libjxl/config.yml @@ -1,5 +1,5 @@ versions: - "0.9.1": + "0.10.2": folder: all "0.6.1": folder: all From a61a47a58eed84851eef0e956d48593401aec815 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 22 Mar 2024 16:15:35 +0200 Subject: [PATCH 33/38] libjxl: bump deps --- recipes/libjxl/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index eb699665d83c5..53ef0ad63cfd8 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -68,12 +68,12 @@ def layout(self): def requirements(self): self.requires("brotli/1.1.0") if Version(self.version) >= "0.7": - self.requires("highway/1.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.13.0") + self.requires("gperftools/2.15") def validate(self): if self.settings.compiler.cppstd: From a3d8f5afb718a307230c70b46d0f951743329b34 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 22 Mar 2024 20:29:47 +0200 Subject: [PATCH 34/38] libjxl: disable MSVC shared build for v0.6.1 --- recipes/libjxl/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 53ef0ad63cfd8..446f8471c44f8 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -78,9 +78,9 @@ def requirements(self): 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.settings.build_type == "Debug": + 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 Debug builds with MSVC") + 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 From ab8e5c4236c0b65487f5abafe9afda6b614df8c8 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 26 Mar 2024 16:42:39 +0200 Subject: [PATCH 35/38] libjxl: add v0.8.2 for GDAL --- 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 e6532c20ad0c3..431db14e7df51 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -2,6 +2,9 @@ sources: "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" diff --git a/recipes/libjxl/config.yml b/recipes/libjxl/config.yml index d6e3fa6278408..e16cb400c4480 100644 --- a/recipes/libjxl/config.yml +++ b/recipes/libjxl/config.yml @@ -1,5 +1,7 @@ versions: "0.10.2": folder: all + "0.8.2": + folder: all "0.6.1": folder: all From d8d8f0c1953ed2c8a49f5a60cf479e884e80c290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Tue, 30 Apr 2024 14:37:39 +0200 Subject: [PATCH 36/38] Test From dffafd2b7af2cae63775e71cc1ef3c7192856725 Mon Sep 17 00:00:00 2001 From: Ernesto de Gracia Herranz Date: Tue, 30 Apr 2024 14:39:28 +0200 Subject: [PATCH 37/38] libjxl: refactor test_package --- recipes/libjxl/all/test_package/conanfile.py | 3 +- recipes/libjxl/all/test_package/test.jxl | Bin 21274 -> 0 bytes .../libjxl/all/test_package/test_package.c | 84 ++---------------- .../libjxl/all/test_v1_package/conanfile.py | 3 +- 4 files changed, 8 insertions(+), 82 deletions(-) delete mode 100644 recipes/libjxl/all/test_package/test.jxl diff --git a/recipes/libjxl/all/test_package/conanfile.py b/recipes/libjxl/all/test_package/conanfile.py index c3c63d4a37de0..ef5d7042163ec 100644 --- a/recipes/libjxl/all/test_package/conanfile.py +++ b/recipes/libjxl/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindir, "test_package") - img_path = os.path.join(self.source_folder, "test.jxl") - self.run(f"{bin_path} {img_path}", env="conanrun") + 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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~*ERvZg|(APpIghRS$R*wqOPj*w$HdHW^&s^51O@j z^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 10:04:15 +0200 Subject: [PATCH 38/38] Disable tools via config and remove neon Signed-off-by: Uilian Ries --- recipes/libjxl/all/conanfile.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index 446f8471c44f8..1f4b5564868a0 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -29,7 +29,6 @@ class LibjxlConan(ConanFile): "avx512": [True, False], "avx512_spr": [True, False], "avx512_zen4": [True, False], - "force_neon": [True, False], "with_tcmalloc": [True, False], } default_options = { @@ -38,7 +37,6 @@ class LibjxlConan(ConanFile): "avx512": False, "avx512_spr": False, "avx512_zen4": False, - "force_neon": False, "with_tcmalloc": False, } @@ -52,8 +50,6 @@ def config_options(self): del self.options.avx512 del self.options.avx512_spr del self.options.avx512_zen4 - if not str(self.settings.arch).startswith("arm"): - del self.options.force_neon # 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 @@ -109,15 +105,16 @@ def generate(self): 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) - tc.variables["JPEGXL_FORCE_NEON"] = self.options.get_safe("force_neon", False) if cross_building(self): tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) # Allow non-cache_variables to be used @@ -151,7 +148,6 @@ def _atomic_required(self): def _patch_sources(self): # 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, "lib", "jxl_extras.cmake"), "") 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"), "")