Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch/expected lite #1442

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion recipes/expected-lite/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
sources:
"0.3.0":
url: https://github.com/martinmoene/expected-lite/archive/v0.3.0.tar.gz
sha256: fc942ce0614e9498bff6f35f1ee8d58f83026bac904d9ab427a2e822b5bdfcbd
sha256: fc942ce0614e9498bff6f35f1ee8d58f83026bac904d9ab427a2e822b5bdfcbd
patches:
"0.3.0":
- patch_file: "patches/upstream-issue-32.patch"
base_path: "source_subfolder"
11 changes: 8 additions & 3 deletions recipes/expected-lite/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@

class ExpectedLite(ConanFile):
name = "expected-lite"
license = "BSL-1.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/martinmoene/expected-lite"
description = "expected lite - Expected objects in C++11 and later in a single-file header-only library"
topics = ("conan", "cpp11", "cpp14", "cpp17", "expected", "expected-implementations")
license = "BSL-1.0"
exports_sources = ["patches/**"]
no_copy_source = True

_source_subfolder = "source_subfolder"

@property
def _source_subfolder(self):
return "source_subfolder"

def source(self):
tools.get(**self.conan_data["sources"][self.version])
extracted_dir = self.name + "-" + self.version
os.rename(extracted_dir, self._source_subfolder)
for patch in self.conan_data["patches"][self.version]:
tools.patch(**patch)

def package(self):
self.copy("*.hpp", dst="include", src=os.path.join(self._source_subfolder, "include"))
Expand Down
Loading