From b5f76d14c5aff0e95d156cee0edf51b1c5b810d4 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Sun, 25 Aug 2024 22:21:13 +0200 Subject: [PATCH 01/11] OpenJPH: Add recipe for new library --- recipes/openjph/all/conandata.yml | 4 ++ recipes/openjph/all/conanfile.py | 87 +++++++++++++++++++++++++++++++ recipes/openjph/config.yml | 3 ++ 3 files changed, 94 insertions(+) create mode 100644 recipes/openjph/all/conandata.yml create mode 100644 recipes/openjph/all/conanfile.py create mode 100644 recipes/openjph/config.yml diff --git a/recipes/openjph/all/conandata.yml b/recipes/openjph/all/conandata.yml new file mode 100644 index 0000000000000..699ebfcc5e765 --- /dev/null +++ b/recipes/openjph/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.15.0": + url: "https://github.com/aous72/OpenJPH/archive/0.15.0.tar.gz" + sha256: "36601fbd3b4e1fe54eef5e6fa51ac0eca7be94b2a3d7c0967e3c8da66687ff2c" diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py new file mode 100644 index 0000000000000..c75880ee20537 --- /dev/null +++ b/recipes/openjph/all/conanfile.py @@ -0,0 +1,87 @@ +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout + +required_conan_version = ">=1.53.0" + +class OpenJPH(ConanFile): + name = "openjph" + description = "Open-source implementation of JPEG2000 Part-15 (or JPH or HTJ2K)" + license = "BSD-2-Clause" + homepage = "https://github.com/aous72/OpenJPH" + url = "https://github.com/conan-io/conan-center-index" + topics = ("ht-j2k", "jpeg2000", "jp2", "openjph", "image", "multimedia", "format", "graphics") + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_tiff": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_tiff": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_tiff: + self.requires("libtiff/4.6.0") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 14) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.11 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["OJPH_ENABLE_TIFF_SUPPORT"] = self.options.with_tiff + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + def build(self): + self._patch_sources() + + cm = CMake(self) + cm.configure() + cm.build() + + def package(self): + cm = CMake(self) + cm.install() + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "openjph") + self.cpp_info.set_property("cmake_target_name", "openjph::openjph") + self.cpp_info.set_property("pkg_config_name", "openjph") + + self.cpp_info.libs = ["openjph"] + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.names["cmake_find_package"] = "openjph" + self.cpp_info.names["cmake_find_package_multi"] = "openjph" + self.cpp_info.names["pkg_config"] = "openjph" diff --git a/recipes/openjph/config.yml b/recipes/openjph/config.yml new file mode 100644 index 0000000000000..e3fd6190a5166 --- /dev/null +++ b/recipes/openjph/config.yml @@ -0,0 +1,3 @@ +versions: + "0.15.0": + folder: all From 9b7e5071d2e2e34eb7dedf6abab952cff51671bc Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Sun, 25 Aug 2024 22:43:38 +0200 Subject: [PATCH 02/11] Add test package --- .../openjph/all/test_package/CMakeLists.txt | 7 +++++ recipes/openjph/all/test_package/conanfile.py | 26 +++++++++++++++++++ .../openjph/all/test_package/test_package.cpp | 13 ++++++++++ 3 files changed, 46 insertions(+) create mode 100644 recipes/openjph/all/test_package/CMakeLists.txt create mode 100644 recipes/openjph/all/test_package/conanfile.py create mode 100644 recipes/openjph/all/test_package/test_package.cpp diff --git a/recipes/openjph/all/test_package/CMakeLists.txt b/recipes/openjph/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f0b6210c6ae20 --- /dev/null +++ b/recipes/openjph/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.11) +project(test_package LANGUAGES CXX) + +find_package(openjph REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE openjph::openjph) diff --git a/recipes/openjph/all/test_package/conanfile.py b/recipes/openjph/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/openjph/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openjph/all/test_package/test_package.cpp b/recipes/openjph/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8ea54e19b7552 --- /dev/null +++ b/recipes/openjph/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include + +#include + + +int main() { + // Print the version number but also do an API call to check the library + std::cout << "OpenJPH Version: " << OPENJPH_VERSION_MAJOR << '.' << OPENJPH_VERSION_MINOR << '.' << OPENJPH_VERSION_PATCH << std::endl; + std::cout << "CPU Extension level: " << ojph::get_cpu_ext_level() << std::endl; + + return EXIT_SUCCESS; +} From fdeb934e96c15562b6a2f3a517b25fd730647c48 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Mon, 26 Aug 2024 19:23:58 +0200 Subject: [PATCH 03/11] Copy license & cleanup pkgconfig --- recipes/openjph/all/conanfile.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py index c75880ee20537..4f015008ac28e 100644 --- a/recipes/openjph/all/conanfile.py +++ b/recipes/openjph/all/conanfile.py @@ -1,7 +1,9 @@ from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir + +import os required_conan_version = ">=1.53.0" @@ -71,9 +73,14 @@ def build(self): cm.build() def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cm = CMake(self) cm.install() + # Cleanup package own pkgconfig + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + def package_info(self): self.cpp_info.set_property("cmake_file_name", "openjph") self.cpp_info.set_property("cmake_target_name", "openjph::openjph") From 8baa84e9560f7390ae8d592e9bd81e06865704e4 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Mon, 26 Aug 2024 19:27:56 +0200 Subject: [PATCH 04/11] Prevent failing gcc 5 in legacy pipeline --- recipes/openjph/all/conanfile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py index 4f015008ac28e..09e4a0448811a 100644 --- a/recipes/openjph/all/conanfile.py +++ b/recipes/openjph/all/conanfile.py @@ -1,7 +1,9 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.scm import Version import os @@ -48,6 +50,10 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 14) + if self.settings.compiler == "gcc" and \ + Version(self.settings.compiler.version) < "6.0": + raise ConanInvalidConfiguration(f"{self.ref} requires gcc >= 6.0") + def build_requirements(self): self.tool_requires("cmake/[>=3.11 <4]") From 592a7c46031346639be1e8e27612a0365b93eca9 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Mon, 26 Aug 2024 20:10:32 +0200 Subject: [PATCH 05/11] Add patch for windows library naming --- recipes/openjph/all/conandata.yml | 5 +++++ ...0_cmake-remove-libversion-suffix-win.patch | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 recipes/openjph/all/patches/0.15.0_cmake-remove-libversion-suffix-win.patch diff --git a/recipes/openjph/all/conandata.yml b/recipes/openjph/all/conandata.yml index 699ebfcc5e765..c687b92360c28 100644 --- a/recipes/openjph/all/conandata.yml +++ b/recipes/openjph/all/conandata.yml @@ -2,3 +2,8 @@ sources: "0.15.0": url: "https://github.com/aous72/OpenJPH/archive/0.15.0.tar.gz" sha256: "36601fbd3b4e1fe54eef5e6fa51ac0eca7be94b2a3d7c0967e3c8da66687ff2c" +patches: + "0.15.0": + - patch_file: "patches/0.15.0_cmake-remove-libversion-suffix-win.patch" + patch_description: "Ensure that the library isn't suffixed with the version name for better compatibility" + patch_type: "conan" diff --git a/recipes/openjph/all/patches/0.15.0_cmake-remove-libversion-suffix-win.patch b/recipes/openjph/all/patches/0.15.0_cmake-remove-libversion-suffix-win.patch new file mode 100644 index 0000000000000..681a8bef69129 --- /dev/null +++ b/recipes/openjph/all/patches/0.15.0_cmake-remove-libversion-suffix-win.patch @@ -0,0 +1,19 @@ +diff --git src/core/CMakeLists.txt src/core/CMakeLists.txt +index 555de0e..f8db1f0 100644 +--- src/core/CMakeLists.txt ++++ src/core/CMakeLists.txt +@@ -122,10 +122,10 @@ target_include_directories(openjph PUBLIC common) + target_compile_definitions(openjph PUBLIC _FILE_OFFSET_BITS=64) + + if (MSVC) +- set(OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") +- set_target_properties(openjph +- PROPERTIES +- OUTPUT_NAME "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") ++ set(OJPH_LIB_NAME_STRING "openjph") ++ #set_target_properties(openjph ++ # PROPERTIES ++ # OUTPUT_NAME "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") + else() + set(OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") + set_target_properties(openjph From daef00fc6d40a5192c7aa434ddef1fe74236af9c Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Mon, 26 Aug 2024 23:12:02 +0200 Subject: [PATCH 06/11] Remove patch & add library version suffix to package info libs entry --- recipes/openjph/all/conandata.yml | 5 ----- recipes/openjph/all/conanfile.py | 8 +++++++- ...0_cmake-remove-libversion-suffix-win.patch | 19 ------------------- 3 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 recipes/openjph/all/patches/0.15.0_cmake-remove-libversion-suffix-win.patch diff --git a/recipes/openjph/all/conandata.yml b/recipes/openjph/all/conandata.yml index c687b92360c28..699ebfcc5e765 100644 --- a/recipes/openjph/all/conandata.yml +++ b/recipes/openjph/all/conandata.yml @@ -2,8 +2,3 @@ sources: "0.15.0": url: "https://github.com/aous72/OpenJPH/archive/0.15.0.tar.gz" sha256: "36601fbd3b4e1fe54eef5e6fa51ac0eca7be94b2a3d7c0967e3c8da66687ff2c" -patches: - "0.15.0": - - patch_file: "patches/0.15.0_cmake-remove-libversion-suffix-win.patch" - patch_description: "Ensure that the library isn't suffixed with the version name for better compatibility" - patch_type: "conan" diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py index 09e4a0448811a..23784ba00a4ef 100644 --- a/recipes/openjph/all/conanfile.py +++ b/recipes/openjph/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -92,7 +93,12 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "openjph::openjph") self.cpp_info.set_property("pkg_config_name", "openjph") - self.cpp_info.libs = ["openjph"] + version_suffix = "" + if is_msvc(self): + v = Version(self.version) + version_suffix = f".{v.major}.{v.minor}" + print('Lib Version', version_suffix) + self.cpp_info.libs = ["openjph" + version_suffix] # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed self.cpp_info.names["cmake_find_package"] = "openjph" diff --git a/recipes/openjph/all/patches/0.15.0_cmake-remove-libversion-suffix-win.patch b/recipes/openjph/all/patches/0.15.0_cmake-remove-libversion-suffix-win.patch deleted file mode 100644 index 681a8bef69129..0000000000000 --- a/recipes/openjph/all/patches/0.15.0_cmake-remove-libversion-suffix-win.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git src/core/CMakeLists.txt src/core/CMakeLists.txt -index 555de0e..f8db1f0 100644 ---- src/core/CMakeLists.txt -+++ src/core/CMakeLists.txt -@@ -122,10 +122,10 @@ target_include_directories(openjph PUBLIC common) - target_compile_definitions(openjph PUBLIC _FILE_OFFSET_BITS=64) - - if (MSVC) -- set(OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") -- set_target_properties(openjph -- PROPERTIES -- OUTPUT_NAME "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") -+ set(OJPH_LIB_NAME_STRING "openjph") -+ #set_target_properties(openjph -+ # PROPERTIES -+ # OUTPUT_NAME "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") - else() - set(OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") - set_target_properties(openjph From 75ec4547dcadd323eceee461018318ea0501e8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Tue, 27 Aug 2024 11:47:25 +0200 Subject: [PATCH 07/11] Update recipes/openjph/all/conanfile.py --- recipes/openjph/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py index 23784ba00a4ef..55d33c77a6beb 100644 --- a/recipes/openjph/all/conanfile.py +++ b/recipes/openjph/all/conanfile.py @@ -97,7 +97,6 @@ def package_info(self): if is_msvc(self): v = Version(self.version) version_suffix = f".{v.major}.{v.minor}" - print('Lib Version', version_suffix) self.cpp_info.libs = ["openjph" + version_suffix] # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed From e4ffc4e32722e7a88b4128788a1c6ea3e94cfe45 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Tue, 27 Aug 2024 18:30:14 +0200 Subject: [PATCH 08/11] Update recipes/openjph/all/conanfile.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Abril Rincón Blanco --- recipes/openjph/all/conanfile.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py index 55d33c77a6beb..46b3796b80edf 100644 --- a/recipes/openjph/all/conanfile.py +++ b/recipes/openjph/all/conanfile.py @@ -55,9 +55,6 @@ def validate(self): Version(self.settings.compiler.version) < "6.0": raise ConanInvalidConfiguration(f"{self.ref} requires gcc >= 6.0") - def build_requirements(self): - self.tool_requires("cmake/[>=3.11 <4]") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 7e405783931d547b46670d50db8568777217daf4 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Tue, 27 Aug 2024 18:47:47 +0200 Subject: [PATCH 09/11] Review comment based changes --- recipes/openjph/all/conandata.yml | 5 ++++ recipes/openjph/all/conanfile.py | 16 ++++++++++-- .../patches/0.15.0_cmake-cxx-standard.patch | 26 +++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 recipes/openjph/all/patches/0.15.0_cmake-cxx-standard.patch diff --git a/recipes/openjph/all/conandata.yml b/recipes/openjph/all/conandata.yml index 699ebfcc5e765..1a7fca64dc995 100644 --- a/recipes/openjph/all/conandata.yml +++ b/recipes/openjph/all/conandata.yml @@ -2,3 +2,8 @@ sources: "0.15.0": url: "https://github.com/aous72/OpenJPH/archive/0.15.0.tar.gz" sha256: "36601fbd3b4e1fe54eef5e6fa51ac0eca7be94b2a3d7c0967e3c8da66687ff2c" +patches: + "0.15.0": + - patch_file: "patches/0.15.0_cmake-cxx-standard.patch" + patch_description: "Remove setting of CXX standard to a fixed value overriding the toolchain provided by Conan" + patch_type: "conan" diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py index 46b3796b80edf..8cdf75a50ed0e 100644 --- a/recipes/openjph/all/conanfile.py +++ b/recipes/openjph/all/conanfile.py @@ -21,12 +21,18 @@ class OpenJPH(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_executables": [True, False], "with_tiff": [True, False], + "with_stream_expand_tool": [True, False], + "disable_simd": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_executables": True, "with_tiff": True, + "with_stream_expand_tool": False, + "disable_simd": False, } def export_sources(self): @@ -44,12 +50,15 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if self.options.with_tiff: + if self.options.with_executables and self.options.with_tiff: self.requires("libtiff/4.6.0") def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 14) + required_cpp_version = 11 + if self.options.with_stream_expand_tool: + required_conan_version = 14 + check_min_cppstd(self, required_cpp_version) if self.settings.compiler == "gcc" and \ Version(self.settings.compiler.version) < "6.0": @@ -60,7 +69,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + tc.variables["OJPH_BUILD_EXECUTABLES"] = self.options.with_executables tc.variables["OJPH_ENABLE_TIFF_SUPPORT"] = self.options.with_tiff + tc.variables["OJPH_BUILD_STREAM_EXPAND"] = self.options.with_stream_expand_tool + tc.variables["OJPH_DISABLE_SIMD"] = self.options.disable_simd tc.generate() deps = CMakeDeps(self) diff --git a/recipes/openjph/all/patches/0.15.0_cmake-cxx-standard.patch b/recipes/openjph/all/patches/0.15.0_cmake-cxx-standard.patch new file mode 100644 index 0000000000000..336b23fc9542c --- /dev/null +++ b/recipes/openjph/all/patches/0.15.0_cmake-cxx-standard.patch @@ -0,0 +1,26 @@ +diff --git CMakeLists.txt CMakeLists.txt +index cfa70ea..7e761db 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -93,7 +93,7 @@ message(STATUS "Building ${CMAKE_BUILD_TYPE}") + + ## C++ version and flags + # C++14 is needed for gtest, otherwise, C++11 is sufficient for the library +-set(CMAKE_CXX_STANDARD 14) ++#set(CMAKE_CXX_STANDARD 14) + if (MSVC) + add_compile_definitions(_CRT_SECURE_NO_WARNINGS) + endif() +diff --git src/apps/ojph_stream_expand/CMakeLists.txt src/apps/ojph_stream_expand/CMakeLists.txt +index 5aea342..e21bdd9 100644 +--- src/apps/ojph_stream_expand/CMakeLists.txt ++++ src/apps/ojph_stream_expand/CMakeLists.txt +@@ -5,7 +5,7 @@ if (OJPH_BUILD_STREAM_EXPAND) + + include_directories(../common) + include_directories(../../core/common) +- set(CMAKE_CXX_STANDARD 14) ++ #set(CMAKE_CXX_STANDARD 14) + + file(GLOB OJPH_STREAM_EXPAND "*.cpp" "*.h") + file(GLOB OJPH_SOCKETS "../others/ojph_sockets.cpp") From 4af8294cb027c92e7ebd97066f8a6eb6d128b145 Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Fri, 6 Sep 2024 11:03:38 +0200 Subject: [PATCH 10/11] Apply proposed workaround for CMAKE_CXX_STANDARD --- recipes/openjph/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py index 8cdf75a50ed0e..5fbc137182012 100644 --- a/recipes/openjph/all/conanfile.py +++ b/recipes/openjph/all/conanfile.py @@ -73,6 +73,11 @@ def generate(self): tc.variables["OJPH_ENABLE_TIFF_SUPPORT"] = self.options.with_tiff tc.variables["OJPH_BUILD_STREAM_EXPAND"] = self.options.with_stream_expand_tool tc.variables["OJPH_DISABLE_SIMD"] = self.options.disable_simd + + # Workaround for Conan 1 where the CXX standard version isn't set to a fallback to gnu98 happens + if not self.settings.get_safe("compiler.cppstd"): + tc.cache_variables["CMAKE_CXX_STANDARD"] = 14 if self.options.with_stream_expand_tool else 11 + tc.generate() deps = CMakeDeps(self) From 80daf92ab1f4c21c174ecb5a19db949678c2bc5f Mon Sep 17 00:00:00 2001 From: Ingmar Rieger Date: Thu, 12 Sep 2024 21:15:58 +0200 Subject: [PATCH 11/11] Add newly released version 0.16.0 --- recipes/openjph/all/conandata.yml | 7 +++++++ recipes/openjph/config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/recipes/openjph/all/conandata.yml b/recipes/openjph/all/conandata.yml index 1a7fca64dc995..7c3d00b5587d9 100644 --- a/recipes/openjph/all/conandata.yml +++ b/recipes/openjph/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "0.16.0": + url: "https://github.com/aous72/OpenJPH/archive/0.16.0.tar.gz" + sha256: "94bea4d7057f7a5dcb3f8eee3f854955ce153d98dad99602dd0ba50a560d7cf6" "0.15.0": url: "https://github.com/aous72/OpenJPH/archive/0.15.0.tar.gz" sha256: "36601fbd3b4e1fe54eef5e6fa51ac0eca7be94b2a3d7c0967e3c8da66687ff2c" patches: + "0.16.0": + - patch_file: "patches/0.15.0_cmake-cxx-standard.patch" + patch_description: "Remove setting of CXX standard to a fixed value overriding the toolchain provided by Conan" + patch_type: "conan" "0.15.0": - patch_file: "patches/0.15.0_cmake-cxx-standard.patch" patch_description: "Remove setting of CXX standard to a fixed value overriding the toolchain provided by Conan" diff --git a/recipes/openjph/config.yml b/recipes/openjph/config.yml index e3fd6190a5166..9a7ed90db6509 100644 --- a/recipes/openjph/config.yml +++ b/recipes/openjph/config.yml @@ -1,3 +1,5 @@ versions: + "0.16.0": + folder: all "0.15.0": folder: all