aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-support
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
commit4bdb99650a053f254ccd158a6d0c25c80e79f6ee (patch)
treecaa4429a628d0da46e55f36bb39f308c5b73ca60 /recipes-support
parentc7d87da710e373c91f4d0701fb5becffd6144b17 (diff)
downloadmeta-mingw-4bdb99650a053f254ccd158a6d0c25c80e79f6ee.tar.gz
meta-mingw-4bdb99650a053f254ccd158a6d0c25c80e79f6ee.tar.bz2
meta-mingw-4bdb99650a053f254ccd158a6d0c25c80e79f6ee.zip
libgcrypt_1.7.6.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>
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch46
-rw-r--r--recipes-support/libgcrypt/libgcrypt_1.7.6.bbappend6
2 files changed, 52 insertions, 0 deletions
diff --git a/recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch b/recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
new file mode 100644
index 0000000..b7b407a
--- /dev/null
+++ b/recipes-support/libgcrypt/files/configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch
@@ -0,0 +1,46 @@
+From bb6f9e18b5ccef26978f3f3ed2fe7bf3d4d498e7 Mon Sep 17 00:00:00 2001
+From: Nathan Rossi <nathan@nathanrossi.com>
+Date: Fri, 30 Dec 2016 18:02:26 +1000
+Subject: [PATCH] configure.ac: Set 'mym4_revision' to 0 if not a git repo
+
+---
+It is possible for the source to not be located in a git repository
+(e.g. source is from a tarball). In which case the git repository
+information is not available. This results in the mym4_revision being an
+empty string however this value is used in BUILD_FILEVERSION where it is
+assumed to be 4 decimal values. Additionally BUILD_REVISION uses this
+value and is also assumed to be non-empty.
+
+In the case of BUILD_FILEVERSION it is used in versioninfo.rc.in, where
+it must be populated as 4 decimal values due to the expected syntax. In
+cases where it is not (e.g. when BUILD_FILEVERSION = '1,7,5,' a syntax
+error is raised.
+
+ windres: versioninfo.rc.in:21: syntax error
+
+This patch changes mym4_revision so that if the 'git rev-parse' returns
+non-zero (e.g. not in a git repository) the value falls back to '0'.
+This propagates as '0' to both BUILD_FILEVERSION and BUILD_REVISION.
+
+Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
+Upstream-Status: Submitted
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 31c0d553fa..a3deffa6e9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,7 +39,7 @@ m4_define(mym4_version_micro, [0])
+ m4_define(mym4_version,
+ [mym4_version_major.mym4_version_minor.mym4_version_micro])
+ m4_define([mym4_revision],
+- m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
++ m4_esyscmd([(git rev-parse --short HEAD || printf '0') | tr -d '\n\r']))
+ m4_define([mym4_revision_dec],
+ m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
+ m4_define([mym4_betastring],
+--
+2.11.0
+
diff --git a/recipes-support/libgcrypt/libgcrypt_1.7.6.bbappend b/recipes-support/libgcrypt/libgcrypt_1.7.6.bbappend
new file mode 100644
index 0000000..e30e376
--- /dev/null
+++ b/recipes-support/libgcrypt/libgcrypt_1.7.6.bbappend
@@ -0,0 +1,6 @@
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append = " \
+ file://configure.ac-Set-mym4_revision-to-0-if-not-a-git-rep.patch \
+ "
+