summaryrefslogtreecommitdiffstats
path: root/external/libgpg-error
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-02-16 17:44:45 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-02-17 09:19:58 +0000
commitf37fcda0e9f893b8eca6598004af618e19feb58e (patch)
tree6b658f2933c9cfca7e704df5ae33cfdc007aaef9 /external/libgpg-error
parentMissing include (diff)
downloadcore-f37fcda0e9f893b8eca6598004af618e19feb58e.tar.gz
core-f37fcda0e9f893b8eca6598004af618e19feb58e.zip
gpg4libre: fix build for older autoconf/automake versions
- serial-tests fix from Richard Jones' libguestfs (lgplv2+) (needed for automake < 1.12) - m4_esyscmd fix from slurm project (gplv2+), needed for autoconf < 2.62 or so - m4_argn from m4 sugar (gplv3+ with autoconf exceptions) - AC_CHECK_FUNCS does not like nested macros, so outline dependend AC_CHECK_HEADERS - only build c and c++ bindings for gpgme, we don't need anything else internally. Change-Id: Ic65ca92119efda585ebc9acbfb7c6c2ac2585451 Reviewed-on: https://gerrit.libreoffice.org/34349 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'external/libgpg-error')
-rw-r--r--external/libgpg-error/UnpackedTarball_libgpg-error.mk6
-rw-r--r--external/libgpg-error/fix-autoconf-macros.patch39
2 files changed, 45 insertions, 0 deletions
diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index 4f124d6a9229..b2f425270eaf 100644
--- a/external/libgpg-error/UnpackedTarball_libgpg-error.mk
+++ b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libgpg-error))
$(eval $(call gb_UnpackedTarball_set_tarball,libgpg-error,$(LIBGPGERROR_TARBALL)))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libgpg-error,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libgpg-error, \
+ external/libgpg-error/fix-autoconf-macros.patch \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libgpg-error/fix-autoconf-macros.patch b/external/libgpg-error/fix-autoconf-macros.patch
new file mode 100644
index 000000000000..ba3246124b12
--- /dev/null
+++ b/external/libgpg-error/fix-autoconf-macros.patch
@@ -0,0 +1,39 @@
+diff -ur libgpg-error.org/configure.ac libgpg-error/configure.ac
+--- configure.ac 2017-02-16 18:43:50.697941033 +0100
++++ configure.ac~ 2017-02-16 18:44:07.085881259 +0100
+@@ -33,6 +33,11 @@
+ # decimalized short revision number, a beta version string, and a flag
+ # indicating a development version (mym4_isgit). Note that the m4
+ # processing is done by autoconf and not during the configure run.
++m4_define([m4_chomp_all],
++[m4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [
++/], [/ ]), [/*$]), [$1])])
++
++m4_define([m4_esyscmd_s], [m4_chomp_all(m4_esyscmd([$1]))])
+ m4_define([mym4_version], [mym4_version_major.mym4_version_minor])
+ m4_define([mym4_revision],
+ m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
+@@ -65,7 +70,22 @@
+ AC_SUBST(VERSION_NUMBER)
+
+ AC_CONFIG_AUX_DIR([build-aux])
+-AM_INIT_AUTOMAKE([serial-tests dist-bzip2])
++
++dnl Initialize automake. automake < 1.12 didn't have serial-tests and
++dnl gives an error if it sees this, but for automake >= 1.13
++dnl serial-tests is required so we have to include it. Solution is to
++dnl test for the version of automake (by running an external command)
++dnl and provide it if necessary. Note we have to do this entirely using
++dnl m4 macros since automake queries this macro by running
++dnl 'autoconf --trace ...'.
++m4_define([serial_tests], [
++ m4_esyscmd([automake --version |
++ head -1 |
++ awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { print "serial-tests" }}'
++ ])
++])
++AM_INIT_AUTOMAKE(foreign serial_tests dist-bzip2) dnl NB: Do not [quote] this parameter.
++
+ AM_MAINTAINER_MODE
+ AC_CONFIG_SRCDIR([src/err-sources.h.in])
+ AC_CONFIG_HEADER([config.h])