summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2017-03-09 23:59:31 +1000
committerJuro Bystricky <juro.bystricky@intel.com>2017-04-06 13:47:39 -0700
commit0cd5e3c7b1956f7c8cba421741af5e6e12197c0f (patch)
tree688d8576e0a52f0d7cf40891eacbf5eb43b4753e
parent1ee7ae05742e6f39f9244cb5ba2da3f885c60c8b (diff)
downloadmeta-mingw-0cd5e3c7b1956f7c8cba421741af5e6e12197c0f.tar.gz
libgpg-error_1.26.bbappend: Add patch to fix configure bug for mingw32
Resolve bug with the generation of the versioninfo.rc file which depends on the BUILD_REVISION being set during configure. The BUILD_REVISION is unset when building against tarball source due to no git repository information. This patch sets the BUILD_REVISION to 0 when no information is available. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r--recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch46
-rw-r--r--recipes-support/libgpg-error/libgpg-error_1.26.bbappend6
2 files changed, 52 insertions, 0 deletions
diff --git a/recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch b/recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
new file mode 100644
index 0000000..ea5a102
--- /dev/null
+++ b/recipes-support/libgpg-error/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
@@ -0,0 +1,46 @@
1From 274bb6fc22f8e0bfe521305d5e67eee268cabf7f Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan@nathanrossi.com>
3Date: Fri, 30 Dec 2016 18:02:26 +1000
4Subject: [PATCH] configure.ac: Set 'mym4_revision' to 0 if not a git repo
5
6---
7It is possible for the source to not be located in a git repository
8(e.g. source is from a tarball). In which case the git repository
9information is not available. This results in the mym4_revision being an
10empty string however this value is used in BUILD_FILEVERSION where it is
11assumed to be 4 decimal values. Additionally BUILD_REVISION uses this
12value and is also assumed to be non-empty.
13
14In the case of BUILD_FILEVERSION it is used in versioninfo.rc.in, where
15it must be populated as 4 decimal values due to the expected syntax. In
16cases where it is not (e.g. when BUILD_FILEVERSION = '1,26,0,' a syntax
17error is raised.
18
19 windres: versioninfo.rc.in:21: syntax error
20
21This patch changes mym4_revision so that if the 'git rev-parse' returns
22non-zero (e.g. not in a git repository) the value falls back to '0'.
23This propagates as '0' to both BUILD_FILEVERSION and BUILD_REVISION.
24
25Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
26Upstream-Status: Submitted
27---
28 configure.ac | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/configure.ac b/configure.ac
32index 6d4f173d1b..149ac02b5f 100644
33--- a/configure.ac
34+++ b/configure.ac
35@@ -35,7 +35,7 @@ m4_define([mym4_version_minor], [27])
36 # processing is done by autoconf and not during the configure run.
37 m4_define([mym4_version], [mym4_version_major.mym4_version_minor])
38 m4_define([mym4_revision],
39- m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
40+ m4_esyscmd([(git rev-parse --short HEAD || printf '0') | tr -d '\n\r']))
41 m4_define([mym4_revision_dec],
42 m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
43 m4_define([mym4_betastring],
44--
452.11.0
46
diff --git a/recipes-support/libgpg-error/libgpg-error_1.26.bbappend b/recipes-support/libgpg-error/libgpg-error_1.26.bbappend
new file mode 100644
index 0000000..e30e376
--- /dev/null
+++ b/recipes-support/libgpg-error/libgpg-error_1.26.bbappend
@@ -0,0 +1,6 @@
1
2FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
3SRC_URI_append = " \
4 file://configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch \
5 "
6