Skip to content

Commit

Permalink
fixup! vendor: Add vtd 2.2.0 packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tobifalk committed Jan 22, 2021
1 parent f6dac19 commit 8c6fb99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion vendor/vtd-api/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def export_sources(self):
tools.untargz(
self._archive_base,
self.export_sources_folder,
pattern=Path(self._root_dir) / "Develop" / "*",
pattern="{}".format(Path(self._root_dir) / "Develop" / "*"),
)
self.copy("CMakeLists.txt")

Expand Down
16 changes: 9 additions & 7 deletions vendor/vtd/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pathlib import Path
import shutil
import os.path

from conans import CMake, ConanFile, tools
from conans.errors import ConanInvalidConfiguration
Expand All @@ -26,14 +27,15 @@ class VtdConan(ConanFile):
_archive_base = "vtd.2.2.0.Base.20181231.tgz"
_archive_osi = "vtd.2.2.0.addOns.OSI.20190513.tgz"
_archive_rod = "vtd.2.2.0.addOns.ROD.Base.20190313.tgz"
exports_sources = [
_archive_base,
_archive_osi,
_archive_rod,
]

_root_dir = "VTD.2.2"

def export_sources(self):
self.copy(self._archive_base, symlinks=False)
if os.path.isfile(self._archive_osi):
self.copy(self._archive_osi, symlinks=False)
if os.path.isfile(self._archive_rod):
self.copy(self._archive_rod, symlinks=False)

def configure(self):
if self.settings.os == "Windows":
raise ConanInvalidConfiguration("VTD binaries do not exist for Windows")
Expand All @@ -44,7 +46,7 @@ def build(self):

def extract_archive(archive):
print("Extracting: {}".format(archive))
tools.untargz(src / archive, dst)
tools.untargz("{}".format(src / archive), "{}".format(dst))

extract_archive(self._archive_base)
if self.options.with_osi:
Expand Down

0 comments on commit 8c6fb99

Please sign in to comment.