Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into add-mocknetworkaccessmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDelille authored Mar 4, 2024
2 parents f0170d2 + 9de3a90 commit 031299d
Show file tree
Hide file tree
Showing 33 changed files with 1,010 additions and 133 deletions.
5 changes: 5 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1293,3 +1293,8 @@ authorized_users:
- metalMajor
- joergbrech
- dagon666
- elvisdukaj
- vok1980
- camm73
- crstzh
- gagoi
8 changes: 4 additions & 4 deletions .github/workflows/alert-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- uses: ./.github/actions/alert-community
with:
files: "recipes/boost/*/*"
reviewers: "@grafikrobot @Hopobcn @jwillikers"
reviewers: "@grafikrobot @Hopobcn @jwillikers @paulharris"

- uses: ./.github/actions/alert-community
with:
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
- uses: ./.github/actions/alert-community
with:
files: "recipes/libsodium/*/*"
reviewers: "@Hopobcn"
reviewers: "@Hopobcn @paulharris"

- uses: ./.github/actions/alert-community
with:
Expand All @@ -304,7 +304,7 @@ jobs:
- uses: ./.github/actions/alert-community
with:
files: "recipes/llvm-core/*/*"
reviewers: "@Hopobcn"
reviewers: "@Hopobcn @paulharris"

- uses: ./.github/actions/alert-community
with:
Expand Down Expand Up @@ -379,7 +379,7 @@ jobs:
- uses: ./.github/actions/alert-community
with:
files: "recipes/qt/*/*"
reviewers: "@ericLemanissier @jwillikers @MartinDelille"
reviewers: "@ericLemanissier @jwillikers @MartinDelille @paulharris"

- uses: ./.github/actions/alert-community
with:
Expand Down
6 changes: 6 additions & 0 deletions recipes/cuda-api-wrappers/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
sources:
"0.7.0-b2":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.7.0-b2.tar.gz"
sha256: "9439cb2250dd3045a05d43c4ca66b5d49535eeba123b05a2e49169354fdb3123"
"0.7-b1":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/0.7b1.tar.gz"
sha256: "1ed5912d8f602ccd176865b824de17f462cb57142eb2a685d7cc034831e54a71"
"0.6.8":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.6.8.tar.gz"
sha256: "a0d1b062dbe41c99d06df4ae7885a053c2ae3815d6fe12df0458bc5277d08ed7"
"0.6.3":
url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.6.3.tar.gz"
sha256: "45d896136dbb4df6c75c36071899b9fe47df9a03629c95208c2d5bda979d109e"
4 changes: 4 additions & 0 deletions recipes/cuda-api-wrappers/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
versions:
"0.7.0-b2":
folder: all
"0.7-b1":
folder: all
"0.6.8":
folder: all
"0.6.3":
folder: all
10 changes: 10 additions & 0 deletions recipes/dcmtk/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
sources:
"3.6.8":
url: "https://dicom.offis.de/download/dcmtk/dcmtk368/dcmtk-3.6.8.tar.gz"
sha256: "232076655503138debf2f624109f1799e539354f186ce4e04b27cf82a9d8720f"
"3.6.7":
url: "https://dicom.offis.de/download/dcmtk/dcmtk367/dcmtk-3.6.7.tar.gz"
sha256: "7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a"
patches:
"3.6.8":
- patch_file: "patches/3.6.8-0001-cmake-robust-deps-handling.patch"
patch_description: "CMake: robust discovery with find_package() and use imported targets"
patch_type: conan
- patch_file: "patches/3.6.8-0002-cmake-check-openssl-symbol.patch"
patch_description: "CMake: fix OpenSSL compatibility checks"
patch_type: conan
"3.6.7":
- patch_file: "patches/3.6.7-0001-cmake-robust-deps-handling.patch"
patch_description: "CMake: robust discovery with find_package() and use imported targets"
Expand Down
42 changes: 31 additions & 11 deletions recipes/dcmtk/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import cross_building
from conan.tools.build import cross_building, 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, replace_in_file, rmdir, save
from conan.tools.microsoft import is_msvc, is_msvc_static_runtime
from conan.tools.scm import Version

required_conan_version = ">=1.54.0"

Expand Down Expand Up @@ -114,10 +115,11 @@ def package_id(self):
del self.info.options.external_dictionary

def validate(self):
if hasattr(self, "settings_build") and cross_building(self) and \
self.settings.os == "Macos" and self.settings.arch == "armv8":
if self.settings.compiler.cppstd:
check_min_cppstd(self, 11)
if hasattr(self, "settings_build") and cross_building(self) and self.settings.os == "Macos":
# FIXME: Probable issue with flags, build includes header 'mmintrin.h'
raise ConanInvalidConfiguration("Cross building to Macos M1 is not supported (yet)")
raise ConanInvalidConfiguration("Cross building on Macos is not supported (yet)")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down Expand Up @@ -287,7 +289,7 @@ def tcpwrappers():
def xml2():
return ["libxml2::libxml2"] if self.options.with_libxml2 else []

return {
components = {
"ofstd" : charset_conversion(),
"oflog" : ["ofstd"],
"dcmdata" : ["ofstd", "oflog"] + zlib(),
Expand All @@ -314,7 +316,15 @@ def xml2():
"dcmseg" : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"],
"dcmtract": ["dcmiod", "dcmdata", "ofstd", "oflog"],
"dcmpmap" : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"],
"dcmect" : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"],
}
if Version(self.version) >= "3.6.8":
components["dcmxml"] = ["dcmdata", "ofstd", "oflog"] + zlib() + xml2()
components["oficonv"] = []
components["dcmpstat"] += ["dcmiod"]
components["i2d"] += ["dcmxml"]
components["ofstd"] += ["oficonv"]
return components

@property
def _dcm_datadictionary_path(self):
Expand All @@ -326,7 +336,7 @@ def package_info(self):

for target_lib, requires in self._dcmtk_components.items():
self.cpp_info.components[target_lib].set_property("cmake_target_name", f"DCMTK::{target_lib}")
# Before 3.6.7, targets were not namespaced, therefore they are also exposed for conveniency
# Before 3.6.7, targets were not namespaced, therefore they are also exposed for convenience
self.cpp_info.components[target_lib].set_property("cmake_target_aliases", [target_lib])

self.cpp_info.components[target_lib].libs = [target_lib]
Expand All @@ -337,14 +347,24 @@ def package_info(self):
self.cpp_info.components[target_lib].build_modules["cmake_find_package"] = [self._module_file_rel_path]
self.cpp_info.components[target_lib].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path]

if is_msvc(self):
# Required for the __cplusplus check at
# https://github.com/DCMTK/dcmtk/blob/DCMTK-3.6.8/config/include/dcmtk/config/osconfig.h.in#L1489
self.cpp_info.components[target_lib].cxxflags.append("/Zc:__cplusplus")

system_libs = []
if self.settings.os == "Windows":
self.cpp_info.components["ofstd"].system_libs.extend([
"iphlpapi", "ws2_32", "netapi32", "wsock32"
])
system_libs = ["iphlpapi", "ws2_32", "netapi32", "wsock32"]
elif self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components["ofstd"].system_libs.append("m")
system_libs = ["m", "nsl"]
if self.options.with_multithreading:
self.cpp_info.components["ofstd"].system_libs.append("pthread")
system_libs.append("pthread")
if Version(self.version) >= "3.6.8":
system_libs.append("rt")
if Version(self.version) >= "3.6.8":
self.cpp_info.components["oficonv"].system_libs = system_libs
else:
self.cpp_info.components["ofstd"].system_libs = system_libs

if self.options.default_dict == "external":
dcmdictpath = os.path.join(self._dcm_datadictionary_path, "dcmtk", "dicom.dic")
Expand Down
158 changes: 158 additions & 0 deletions recipes/dcmtk/all/patches/3.6.8-0001-cmake-robust-deps-handling.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
--- CMake/3rdparty.cmake
+++ CMake/3rdparty.cmake
@@ -25,7 +25,7 @@
if(DCMTK_USE_FIND_PACKAGE)
# Find TIFF
if(DCMTK_WITH_TIFF)
- find_package(TIFF QUIET)
+ find_package(TIFF REQUIRED)
# turn off library if it could not be found
if(NOT TIFF_FOUND)
message(STATUS "Warning: TIFF support will be disabled because libtiff was not found.")
@@ -34,21 +34,13 @@
else()
set(WITH_LIBTIFF 1)
# libtiff can be compiled with libjpeg support; if available, add libjpeg to library and include path
- find_package(JPEG QUIET)
- if(NOT JPEG_FOUND)
- message(STATUS "Info: DCMTK TIFF support will be enabled (but without JPEG)")
- include_directories(${TIFF_INCLUDE_DIR})
- else()
- message(STATUS "Info: DCMTK TIFF support will be enabled")
- include_directories(${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
- endif()
- set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${TIFF_EXTRA_LIBS_STATIC} ${JPEG_LIBRARY})
+ set(LIBTIFF_LIBS TIFF::TIFF)
endif()
endif()

# Find PNG
if(DCMTK_WITH_PNG)
- find_package(PNG QUIET)
+ find_package(PNG REQUIRED)
if(NOT PNG_FOUND)
set(DCMTK_WITH_PNG OFF CACHE BOOL "" FORCE)
message(STATUS "Warning: PNG support will be disabled because libpng was not found.")
@@ -57,13 +49,13 @@
message(STATUS "Info: DCMTK PNG support will be enabled")
set(WITH_LIBPNG 1)
include_directories(${PNG_INCLUDE_DIR})
- set(LIBPNG_LIBS ${PNG_LIBRARY})
+ set(LIBPNG_LIBS PNG::PNG)
endif()
endif()

# Find OpenSSL
if(DCMTK_WITH_OPENSSL)
- find_package(OpenSSL QUIET)
+ find_package(OpenSSL REQUIRED)
if(NOT OPENSSL_FOUND)
message(STATUS "Warning: OPENSSL support will be disabled because openssl was not found.")
set(WITH_OPENSSL "")
@@ -75,15 +67,11 @@
list(APPEND CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
CHECK_CXX_SOURCE_COMPILES("extern \"C\" {\n#include <openssl/ssl.h>\n}\nint main(){\n#if OPENSSL_VERSION_NUMBER < 0x10002000L\n#error OpenSSL too old\n#endif\n}\n" OPENSSL_VERSION_CHECK)
set(CMAKE_REQUIRED_INCLUDES "${TEMP_INCLUDES}")
- if(OPENSSL_VERSION_CHECK)
+ if(1)
message(STATUS "Info: DCMTK OPENSSL support will be enabled")
set(WITH_OPENSSL 1)
include_directories(${OPENSSL_INCLUDE_DIR})
- set(OPENSSL_LIBS ${OPENSSL_LIBRARIES} ${OPENSSL_EXTRA_LIBS_STATIC})
- CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
- if(HAVE_LIBDL)
- set(OPENSSL_LIBS ${OPENSSL_LIBS} dl)
- endif()
+ set(OPENSSL_LIBS OpenSSL::SSL OpenSSL::Crypto)
else()
message(STATUS "Info: DCMTK OPENSSL support will be disabled: DCMTK requires OpenSSL version 1.0.2 or newer")
set(DCMTK_WITH_OPENSSL OFF CACHE BOOL "" FORCE)
@@ -94,7 +82,7 @@

# Find libXML2
if(DCMTK_WITH_XML)
- find_package(LibXml2 QUIET)
+ find_package(LibXml2 REQUIRED MODULE)
if(NOT LIBXML2_FOUND)
message(STATUS "Warning: XML support will be disabled because libxml2 was not found.")
set(WITH_LIBXML "")
@@ -103,13 +91,13 @@
message(STATUS "Info: DCMTK XML support will be enabled")
set(WITH_LIBXML 1)
include_directories(${LIBXML2_INCLUDE_DIR})
- set(LIBXML_LIBS ${LIBXML2_LIBRARIES} ${LIBXML2_EXTRA_LIBS_STATIC})
+ set(LIBXML_LIBS LibXml2::LibXml2)
endif()
endif()

# Find zlib
if(DCMTK_WITH_ZLIB)
- find_package(ZLIB QUIET)
+ find_package(ZLIB REQUIRED)
if(NOT ZLIB_FOUND)
message(STATUS "Warning: ZLIB support will be disabled because zlib was not found.")
set(WITH_ZLIB "")
@@ -118,7 +106,7 @@
message(STATUS "Info: DCMTK ZLIB support will be enabled")
set(WITH_ZLIB 1)
include_directories(${ZLIB_INCLUDE_DIRS})
- set(ZLIB_LIBS ${ZLIB_LIBRARIES})
+ set(ZLIB_LIBS ZLIB::ZLIB)
endif()
endif()

@@ -139,11 +127,10 @@

# Find libiconv
if(DCMTK_WITH_ICONV)
- find_package(Iconv QUIET)
- find_package(LIBCHARSET QUIET)
- if(ICONV_FOUND)
+ find_package(Iconv REQUIRED)
+ if(Iconv_FOUND)
if(NOT Iconv_IS_BUILT_IN)
- set(LIBICONV_FOUND ${ICONV_FOUND})
+ set(LIBICONV_FOUND ${Iconv_FOUND})
else()
message(STATUS "Info: found builtin ICONV support inside the C standard library.")
set(DCMTK_WITH_STDLIBC_ICONV ON CACHE BOOL "" FORCE)
@@ -153,7 +140,7 @@
set(LIBICONV_SECOND_ARGUMENT_CONST ${ICONV_SECOND_ARGUMENT_IS_CONST} CACHE INTERNAL "${HELPSTRING}")
endif()
endif()
- if(NOT LIBICONV_FOUND OR NOT LIBCHARSET_FOUND)
+ if(NOT LIBICONV_FOUND)
message(STATUS "Warning: ICONV support will be disabled because libiconv was not found. Correct LIBICONV_LIBDIR and LIBICONV_INCLUDE_DIR and re-enable DCMTK_WITH_ICONV.")
set(DCMTK_WITH_ICONV OFF CACHE BOOL "" FORCE)
set(WITH_LIBICONV "")
@@ -161,24 +148,24 @@
message(STATUS "Info: DCMTK ICONV support will be enabled")
set(WITH_LIBICONV 1)
set(LIBICONV_INCDIR ${LIBICONV_INCLUDE_DIRS} ${Iconv_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR} ${LIBCHARSET_INCLUDE_DIRS})
- set(LIBICONV_LIBDIR ${LIBICONV_LIBDIR})
- set(LIBICONV_LIBS ${LIBICONV_LIBRARIES} ${Iconv_LIBRARIES} ${ICONV_LIBRARIES} ${LIBCHARSET_LIBRARY})
+ set(LIBICONV_LIBDIR ${Iconv_LIB_DIRS})
+ set(LIBICONV_LIBS Iconv::Iconv)
include_directories(${LIBICONV_INCDIR})
endif()
endif()

# Find libwrap
if(DCMTK_WITH_WRAP)
- find_package(WRAP QUIET)
- if(NOT WRAP_FOUND)
+ find_package(tcp-wrappers REQUIRED CONFIG)
+ if(NOT tcp-wrappers_FOUND)
message(STATUS "Warning: WRAP support will be disabled because libwrap was not found.")
set(WITH_TCPWRAPPER "")
set(DCMTK_WITH_WRAP OFF CACHE BOOL "" FORCE)
else()
message(STATUS "Info: DCMTK WRAP support will be enabled")
set(WITH_TCPWRAPPER 1)
- include_directories(${WRAP_INCLUDE_DIRS})
- set(WRAP_LIBS ${WRAP_LIBRARIES} ${WRAP_EXTRA_LIBS_STATIC})
+ include_directories(${tcp-wrappers_INCLUDE_DIRS})
+ set(WRAP_LIBS tcp-wrappers::tcp-wrappers)
endif()
endif()

Loading

0 comments on commit 031299d

Please sign in to comment.