Skip to content

Commit

Permalink
Prefer official release artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopobcn committed Feb 5, 2023
1 parent a8ab6eb commit 971473b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions recipes/folly/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ sources:
sha256: "e81140d04a4e89e3f848e528466a9b3d3ae37d7eeb9e65467fca50d70918eef6"
"2022.01.31.00":
url: "https://github.com/facebook/folly/releases/download/v2022.01.31.00/folly-v2022.01.31.00.tar.gz"
sha256: "9dce0187329e5a37a4a22488467cda3db2c30331ec4d805375d37dbd9258c652"
sha256: "7b8d5dd2eb51757858247af0ad27af2e3e93823f84033a628722b01e06cd68a9"
"2022.10.31.00":
url: "https://github.com/facebook/folly/releases/download/v2022.10.31.00/folly-v2022.10.31.00.tar.gz"
sha256: "e6759cb0e16197f15fec52068d8f20de8f2af538740e3469f95693f31e5f81a7"
sha256: "d7749f78eee2a327c1fa6b4a290e4bcd7115cdd7f7ef59f9e043ed59e597ab30"
patches:
"2019.10.21.00":
- patch_file: "patches/0001-find-packages.patch"
Expand Down
7 changes: 5 additions & 2 deletions recipes/folly/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.microsoft import is_msvc, msvc_runtime_flag
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, replace_in_file
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, download, copy, rmdir, replace_in_file
from conan.tools.build import can_run, check_min_cppstd, default_cppstd
from conan.tools.scm import Version
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
Expand Down Expand Up @@ -145,8 +145,11 @@ def add_millennium(_cppstd):
if self.options.get_safe("use_sse4_2") and str(self.settings.arch) not in ['x86', 'x86_64']:
raise ConanInvalidConfiguration(f"{self.ref} can use the option use_sse4_2 only on x86 and x86_64 archs.")

def _preserve_tarball_root(self):
return Version(self.version) >= "2022.01.31.00"

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
get(self, **self.conan_data["sources"][self.version], strip_root=not self._preserve_tarball_root())

def _cxx_std_flag(self, cppstd):
cppstd_prefix_gnu, cppstd_value = (cppstd[:3], cppstd[3:]) if "gnu" in cppstd else ("", cppstd)
Expand Down

0 comments on commit 971473b

Please sign in to comment.