Skip to content

Commit

Permalink
few more conan v2 tools to satisfy hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Sep 5, 2022
1 parent c36235f commit a1ec2d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
7 changes: 4 additions & 3 deletions recipes/openssl/1.x.x/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import cross_building
from conan.tools.files import rename, get, rmdir
from conan.tools.microsoft import is_msvc, msvc_runtime_flag
from conan.tools.build import cross_building
from conan.errors import ConanInvalidConfiguration
from conans import ConanFile, AutoToolsBuildEnvironment, tools
from conans import AutoToolsBuildEnvironment, tools
from contextlib import contextmanager
from functools import total_ordering
import fnmatch
Expand Down
17 changes: 9 additions & 8 deletions recipes/openssl/3.x.x/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from conan.tools.files import rename
from conan.tools.microsoft import is_msvc, msvc_runtime_flag
from conans import ConanFile, AutoToolsBuildEnvironment, tools
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import cross_building
from conans.errors import ConanInvalidConfiguration
from conan.tools.files import get, rename, rmdir
from conan.tools.microsoft import is_msvc, msvc_runtime_flag
from conans import AutoToolsBuildEnvironment, tools
import contextlib
import fnmatch
import functools
Expand Down Expand Up @@ -149,8 +150,8 @@ def _use_nmake(self):
return self._is_clangcl or is_msvc(self)

def source(self):
tools.get(**self.conan_data["sources"][self.version],
destination=self._source_subfolder, strip_root=True)
get(**self.conan_data["sources"][self.version],
destination=self._source_subfolder, strip_root=True)

@property
def _target(self):
Expand Down Expand Up @@ -343,7 +344,7 @@ def _patch_configure(self):
# since _patch_makefile_org will replace binutils variables
# use a more restricted regular expresion to prevent that Configure script trying to do it again
configure = os.path.join(self._source_subfolder, "Configure")
tools.replace_in_file(configure, r"s/^AR=\s*ar/AR= $ar/;", r"s/^AR=\s*ar\b/AR= $ar/;")
replace_in_file(self, configure, r"s/^AR=\s*ar/AR= $ar/;", r"s/^AR=\s*ar\b/AR= $ar/;")

def _patch_makefile_org(self):
# https://wiki.openssl.org/index.php/Compilation_and_Installation#Modifying_Build_Settings
Expand Down Expand Up @@ -664,7 +665,7 @@ def package(self):
else:
self.copy("fips.so", src=provdir,dst="lib/ossl-modules")

tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))

self._create_cmake_module_variables(
os.path.join(self.package_folder, self._module_file_rel_path)
Expand Down

0 comments on commit a1ec2d5

Please sign in to comment.