Skip to content

Commit 8352d0f

Browse files
committed
Prepare the MeVisLab thirdparty libraries for the 4.1.0 release
1 parent c90d01f commit 8352d0f

206 files changed

Lines changed: 3074 additions & 37780 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

recipes/7zip/conanfile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from conan.tools.files import copy, get, replace_in_file
33
from conan.tools.layout import basic_layout
44
from conan.tools.microsoft import NMakeToolchain
5-
from conans.errors import ConanInvalidConfiguration
5+
from conan.errors import ConanInvalidConfiguration
66
import os
77

88
required_conan_version = ">=2.2.2"
@@ -74,5 +74,7 @@ def package(self):
7474
)
7575

7676
def package_info(self):
77+
self.cpp_info.set_property("cpe", "cpe:2.3:a:7-zip:7-zip:*:*:*:*:*:*:*:*")
78+
self.cpp_info.set_property("base_purl", "github/ip7z/7zip")
7779
self.cpp_info.includedirs.clear()
7880
self.cpp_info.libdirs.clear()

recipes/abseil/conanfile.py

Lines changed: 72 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import json
2+
import re
13
from conan import ConanFile
24
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
3-
from conan.tools.files import copy, get, rmdir
5+
from conan.tools.files import copy, get, rmdir, load, save, collect_libs
46
import os
57

68
required_conan_version = ">=2.2.2"
@@ -48,12 +50,75 @@ def package(self):
4850
copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
4951
cmake = CMake(self)
5052
cmake.install()
53+
self._create_components_file()
5154
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
55+
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
56+
57+
def _create_components_file(self):
58+
components = {}
59+
dbg = "_d" if self.settings.build_type == "Debug" else ""
60+
targets_file = os.path.join(self.package_folder, "lib", "cmake", "absl", "abslTargets.cmake")
61+
abs_target_content = load(self, targets_file).replace("\r\n", "\n")
62+
63+
cmake_functions = re.findall(r"(?P<func>add_library|set_target_properties)[\n|\s]*\([\n|\s]*(?P<args>[^)]*)\)", abs_target_content)
64+
for cmake_function_name, cmake_function_args in cmake_functions:
65+
cmake_function_args = re.split(r"[\s|\n]+", cmake_function_args, maxsplit=2)
66+
cmake_imported_target_name = cmake_function_args[0]
67+
cmake_target_nonamespace = cmake_imported_target_name.replace("absl::", "")
68+
potential_lib_name = "absl_" + cmake_target_nonamespace
69+
components.setdefault(potential_lib_name, {"cmake_target": cmake_target_nonamespace})
70+
71+
if cmake_function_name == "add_library":
72+
cmake_imported_target_type = cmake_function_args[1]
73+
if cmake_imported_target_type in ["STATIC", "SHARED"]:
74+
components[potential_lib_name]["libs"] = [
75+
f"{potential_lib_name}{dbg}" if cmake_target_nonamespace != "abseil_dll" else f"abseil_dll{dbg}"
76+
]
77+
elif cmake_function_name == "set_target_properties":
78+
target_properties = re.findall(
79+
r"(?P<property>INTERFACE_COMPILE_DEFINITIONS|INTERFACE_INCLUDE_DIRECTORIES|INTERFACE_LINK_LIBRARIES)[\n|\s]+(?P<values>.+)",
80+
cmake_function_args[2],
81+
)
82+
for target_property in target_properties:
83+
property_type = target_property[0]
84+
if property_type == "INTERFACE_LINK_LIBRARIES":
85+
values_list = target_property[1].replace('"', "").split(";")
86+
for dependency in values_list:
87+
if dependency.startswith("absl::"): # abseil targets
88+
components[potential_lib_name].setdefault("requires", []).append(dependency.replace("absl::", "absl_"))
89+
else:
90+
if self.settings.os == "Linux":
91+
if dependency == "Threads::Threads":
92+
components[potential_lib_name].setdefault("system_libs", []).append("pthread")
93+
elif "-lm" in dependency:
94+
components[potential_lib_name].setdefault("system_libs", []).append("m")
95+
elif "-lrt" in dependency:
96+
components[potential_lib_name].setdefault("system_libs", []).append("rt")
97+
elif self.settings.os == "Windows":
98+
for system_lib in ["bcrypt", "advapi32", "dbghelp"]:
99+
if system_lib in dependency:
100+
components[potential_lib_name].setdefault("system_libs", []).append(system_lib)
101+
elif property_type == "INTERFACE_COMPILE_DEFINITIONS":
102+
values_list = target_property[1].replace('"', "").split(";")
103+
for definition in values_list:
104+
if definition == r"\$<\$<PLATFORM_ID:AIX>:_LINUX_SOURCE_COMPAT>":
105+
continue
106+
components[potential_lib_name].setdefault("defines", []).append(definition)
107+
content = json.dumps(components, indent=4)
108+
save(self, os.path.join(self.package_folder, "lib", "abseil_components.json"), content)
52109

53110
def package_info(self):
54-
self.cpp_info.builddirs.append(os.path.join("lib", "cmake"))
55-
self.cpp_info.set_property("cmake_find_mode", "none") # do NOT generate cmake files, they are generated by abseil
56-
self.cpp_info.set_property("cmake_file_name", "absl") # let CMake search for absl, not abseil (the package name)
57-
self.cpp_info.set_property(
58-
"cmake_target_name", "absl::base"
59-
) # let CMake link to absl::base, not abseil::abseil (derived from the package name)
111+
# self.cpp_info.set_property("cpe", "") # No CPE yet?
112+
self.cpp_info.set_property("base_purl", "github/abseil/abseil-cpp")
113+
self.cpp_info.set_property("cmake_file_name", "absl")
114+
115+
collect_libs(self)
116+
abseil_components = json.loads(load(self, os.path.join(self.package_folder, "lib", "abseil_components.json")))
117+
for pkgconfig_name, values in abseil_components.items():
118+
cmake_target = values["cmake_target"]
119+
self.cpp_info.components[pkgconfig_name].set_property("cmake_target_name", f"absl::{cmake_target}")
120+
self.cpp_info.components[pkgconfig_name].set_property("pkg_config_name", pkgconfig_name)
121+
self.cpp_info.components[pkgconfig_name].defines = values.get("defines", [])
122+
self.cpp_info.components[pkgconfig_name].system_libs = values.get("system_libs", [])
123+
self.cpp_info.components[pkgconfig_name].requires = values.get("requires", [])
124+
self.cpp_info.components[pkgconfig_name].libs = values.get("libs", [])

recipes/antt/conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class ConanRecipe(ConanFile):
77
name = "antt"
88
version = "2.08"
9-
homepage = "http://www.gust.org.pl"
9+
homepage = "https://www.gust.org.pl"
1010
description = "antt - Antykwa Toruńska: a Type 1 family of a Polish traditional type"
1111
license = "LPPL-1.3a"
1212
package_type = "build-scripts"

recipes/assimp/conanfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class ConanRecipe(ConanFile):
1111
name = "assimp"
12-
version = "5.4.2"
12+
version = "5.4.3"
1313
homepage = "https://www.assimp.org"
1414
description = "library to import and export various 3d-model-formats including scene-post-processing to generate missing render data"
1515
license = "BSD-3-Clause"
@@ -26,7 +26,7 @@ def requirements(self):
2626
def source(self):
2727
get(
2828
self,
29-
sha256="03e38d123f6bf19a48658d197fd09c9a69db88c076b56a476ab2da9f5eb87dcc",
29+
sha256="795c29716f4ac123b403e53b677e9f32a8605c4a7b2d9904bfaae3f4053b506d",
3030
url=f"https://github.com/assimp/assimp/archive/v{self.version}.zip",
3131
strip_root=True,
3232
)
@@ -74,6 +74,8 @@ def package(self):
7474
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
7575

7676
def package_info(self):
77+
self.cpp_info.set_property("cpe", "cpe:2.3:a:assimp:assimp:*:*:*:*:*:*:*:*")
78+
self.cpp_info.set_property("base_purl", "github/assimp/assimp")
7779
self.cpp_info.set_property("cmake_file_name", "assimp")
7880
self.cpp_info.set_property("cmake_target_name", "assimp::assimp")
7981
self.cpp_info.set_property("pkg_config_name", "assimp")

recipes/assimp/patches/001-no_pkgconfig_minizip.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index f1e2d2d..d01a0fc 100644
2+
index d45eb22..5770fef 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -526,12 +526,12 @@ ENDIF()
5+
@@ -549,12 +549,12 @@ ENDIF()
66

77
IF( NOT IOS )
88
IF( NOT ASSIMP_BUILD_MINIZIP )

recipes/boost/conanfile.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from conan import ConanFile
1010
from conan.tools.build.flags import cppstd_flag
1111
from conan.tools.env import Environment
12-
from conan.tools.files import get, copy, collect_libs, files, patch
12+
from conan.tools.files import get, copy, collect_libs, files
1313
from conan.tools.microsoft import is_msvc
1414
from conan.tools.layout import basic_layout
1515
from conan.tools.microsoft.visual import msvc_version_to_toolset_version
@@ -21,7 +21,7 @@ class ConanRecipe(ConanFile):
2121
name = "boost"
2222
display_name = "Boost"
2323
mli_name = "None"
24-
version = "1.85.0"
24+
version = "1.86.0"
2525
homepage = "https://www.boost.org"
2626
description = "Boost provides free peer-reviewed portable C++ source libraries"
2727
license = "BSL-1.0"
@@ -70,15 +70,10 @@ def layout(self):
7070
def source(self):
7171
get(
7272
self,
73-
sha256="7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617",
74-
url=f"https://boostorg.jfrog.io/artifactory/main/release/{self.version}/source/boost_{self.version.replace('.','_')}.tar.bz2",
73+
sha256="1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b",
74+
url=f"https://archives.boost.io/release/{self.version}/source/boost_{self.version.replace('.','_')}.tar.bz2",
7575
strip_root=True,
7676
)
77-
patch(
78-
self,
79-
patch_file="patches/001-b2_update.patch",
80-
patch_description="Update b2 to v5.2.1 for Boost 1.85.0 to fix build issues with newer MSVC versions",
81-
)
8277

8378
def build(self):
8479
self._bootstrap()
@@ -116,6 +111,8 @@ def package(self):
116111
copy(self, pattern="boost*.pdb", dst=self.package_path / "bin", src=out_lib_dir, keep_path=False)
117112

118113
def package_info(self):
114+
self.cpp_info.set_property("cpe", "cpe:2.3:a:boost:boost:*:*:*:*:*:*:*:*")
115+
self.cpp_info.set_property("base_purl", "github/boostorg/boost")
119116
self.cpp_info.set_property("cmake_file_name", "Boost")
120117
self.cpp_info.set_property("cmake_target_name", "Boost::boost")
121118

0 commit comments

Comments
 (0)