-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wrap: Add support for applying a list of patch files
Co-authored-by: Xavier Claessens <xavier.claessens@collabora.com>
- Loading branch information
Showing
7 changed files
with
159 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
... should not failed/subprojects/packagefiles/patchfile/0001-Change-foo-to-executable.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From b79f6cc4a096f6c2888f73b947b652491885896a Mon Sep 17 00:00:00 2001 | ||
From: Xavier Claessens <xavier.claessens@collabora.com> | ||
Date: Fri, 30 Nov 2018 14:13:47 -0500 | ||
Subject: [PATCH] Change foo to executable | ||
|
||
--- | ||
foo.c | 4 ++++ | ||
meson.build | 2 +- | ||
2 files changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/foo.c b/foo.c | ||
index 54f9119..468f033 100644 | ||
--- a/foo.c | ||
+++ b/foo.c | ||
@@ -1,3 +1,7 @@ | ||
int dummy_func(void) { | ||
return 44; | ||
} | ||
+ | ||
+int main(void) { | ||
+ return dummy_func() == 44 ? 0 : 1; | ||
+} | ||
diff --git a/meson.build b/meson.build | ||
index 318e81d..4a281d9 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -1,2 +1,2 @@ | ||
project('static lib patchdir', 'c') | ||
-libfoo = static_library('foo', 'foo.c') | ||
+foo_exe = executable('foo', 'foo.c') | ||
-- | ||
2.17.1 | ||
|
21 changes: 21 additions & 0 deletions
21
...should not failed/subprojects/packagefiles/patchfile/0001-Change-return-value-to-43.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
From 7001dcc738e5ae7dfa8af20ed582b9a985804f72 Mon Sep 17 00:00:00 2001 | ||
From: Xavier Claessens <xavier.claessens@collabora.com> | ||
Date: Fri, 30 Nov 2018 10:15:33 -0500 | ||
Subject: [PATCH 1/2] Change return value to 43 | ||
|
||
--- | ||
foo.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/foo.c b/foo.c | ||
index 019f2ba..e4577b8 100644 | ||
--- a/foo.c | ||
+++ b/foo.c | ||
@@ -1,3 +1,3 @@ | ||
int dummy_func(void) { | ||
- return 42; | ||
+ return 43; | ||
} | ||
-- | ||
2.17.1 | ||
|
21 changes: 21 additions & 0 deletions
21
...should not failed/subprojects/packagefiles/patchfile/0002-Change-return-value-to-44.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
From c2da2e490b09f2e251c7f4ef7c1240acee215fec Mon Sep 17 00:00:00 2001 | ||
From: Xavier Claessens <xavier.claessens@collabora.com> | ||
Date: Fri, 30 Nov 2018 10:15:47 -0500 | ||
Subject: [PATCH 2/2] Change return value to 44 | ||
|
||
--- | ||
foo.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/foo.c b/foo.c | ||
index e4577b8..54f9119 100644 | ||
--- a/foo.c | ||
+++ b/foo.c | ||
@@ -1,3 +1,3 @@ | ||
int dummy_func(void) { | ||
- return 43; | ||
+ return 44; | ||
} | ||
-- | ||
2.17.1 | ||
|
14 changes: 14 additions & 0 deletions
14
test cases/common/153 wrap file should not failed/subprojects/patchfile.wrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[wrap-file] | ||
directory = foo-1.0-patchfile | ||
|
||
source_url = http://something.invalid | ||
source_filename = foo-1.0.tar.xz | ||
source_hash = 9ed8f67d75e43d3be161efb6eddf30dd01995a958ca83951ea64234bac8908c1 | ||
lead_directory_missing = true | ||
|
||
patch_directory = foo-1.0 | ||
|
||
diff_files = | ||
patchfile/0001-Change-return-value-to-43.patch, | ||
patchfile/0002-Change-return-value-to-44.patch, | ||
patchfile/0001-Change-foo-to-executable.patch |