Skip to content

Commit 0eceaaf

Browse files
committed
vtd: Migrate vtd-2.2.0 package to Conan 2.0 compatibility
1 parent b89bc75 commit 0eceaaf

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

optional/vtd/vendor/vtd-2.2.0/conanfile.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
from pathlib import Path
99
from typing import List
1010

11-
from conans import CMake, ConanFile, tools
12-
from conans.errors import ConanInvalidConfiguration
11+
from conan import ConanFile
12+
from conan.tools import files
13+
from conan.errors import ConanInvalidConfiguration
14+
15+
required_conan_version = ">=1.52.0"
1316

1417

1518
def patch_rpath(file: Path, rpath: List[str]):
@@ -96,7 +99,7 @@ def build(self):
9699

97100
def extract_archive(archive):
98101
print(f"Extracting: {archive}")
99-
tools.untargz(src / archive, dst)
102+
files.untargz(src / archive, dst)
100103

101104
extract_archive(self._archive_base)
102105
libdir.mkdir()
@@ -147,13 +150,15 @@ def package(self):
147150
def package_info(self):
148151
bindir = Path(self.package_folder) / "bin"
149152
self.output.info(f"Appending PATH environment variable: {bindir}")
150-
self.env_info.PATH.append(str(bindir))
151-
self.env_info.VTD_ROOT = self.package_folder
153+
self.runenv_info.append_path("PATH", str(bindir))
154+
self.runenv_info.define("VTD_ROOT", self.package_folder)
155+
self.buildenv_info.define("VTD_ROOT", self.package_folder)
156+
152157
if self.options.with_osi:
153158
osi_path = (
154159
Path(self.package_folder)
155160
/ "Data/Setups/Standard.OSI3/Bin/libopen_simulation_interface.so"
156161
)
157162
if not osi_path.exists():
158163
raise ConanInvalidConfiguration("VTD OSI library not found.")
159-
self.env_info.VTD_EXTERNAL_MODELS.append(f"{osi_path}")
164+
self.runenv_info.append_path("VTD_EXTERNAL_MODELS", f"{osi_path}")

0 commit comments

Comments
 (0)