[Libreoffice-commits] core.git: external/gpgme external/libassuan external/libgpg-error

Thorsten Behrens Thorsten.Behrens at CIB.de
Fri Feb 17 09:20:20 UTC 2017


 external/gpgme/ExternalProject_gpgme.mk               |    1 
 external/gpgme/UnpackedTarball_gpgme.mk               |    1 
 external/gpgme/fix-autoconf-macros.patch              |   39 ++++++++++++
 external/libassuan/UnpackedTarball_libassuan.mk       |    1 
 external/libassuan/fix-autoconf-macros.patch          |   56 ++++++++++++++++++
 external/libgpg-error/UnpackedTarball_libgpg-error.mk |    6 +
 external/libgpg-error/fix-autoconf-macros.patch       |   39 ++++++++++++
 7 files changed, 143 insertions(+)

New commits:
commit f37fcda0e9f893b8eca6598004af618e19feb58e
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Thu Feb 16 17:44:45 2017 +0100

    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 at CIB.de>
    Reviewed-by: Siegmund Gorr <siegmund.gorr at cib.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/external/gpgme/ExternalProject_gpgme.mk b/external/gpgme/ExternalProject_gpgme.mk
index f27794f..5c32969 100644
--- a/external/gpgme/ExternalProject_gpgme.mk
+++ b/external/gpgme/ExternalProject_gpgme.mk
@@ -21,6 +21,7 @@ $(call gb_ExternalProject_get_state_target,gpgme,build):
 	$(call gb_ExternalProject_run,build,\
 		autoreconf \
 		&& ./configure \
+		   --enable-languages="cl cpp" \
 		   GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
 		   GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
 		   LIBASSUAN_CFLAGS="$(LIBASSUAN_CFLAGS)" \
diff --git a/external/gpgme/UnpackedTarball_gpgme.mk b/external/gpgme/UnpackedTarball_gpgme.mk
index a6b79c4..ca9fd79 100644
--- a/external/gpgme/UnpackedTarball_gpgme.mk
+++ b/external/gpgme/UnpackedTarball_gpgme.mk
@@ -15,5 +15,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,gpgme,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,gpgme, \
     external/gpgme/find-libgpg-error-libassuan.patch \
+    external/gpgme/fix-autoconf-macros.patch \
 ))
 # vim: set noet sw=4 ts=4:
diff --git a/external/gpgme/fix-autoconf-macros.patch b/external/gpgme/fix-autoconf-macros.patch
new file mode 100644
index 0000000..627c7b1
--- /dev/null
+++ b/external/gpgme/fix-autoconf-macros.patch
@@ -0,0 +1,39 @@
+diff -ur gpgme.org/configure.ac gpgme/configure.ac
+--- configure.ac	2017-02-16 15:18:45.051417378 +0100
++++ configure.ac~	2017-02-16 15:20:03.635059285 +0100
+@@ -35,6 +35,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.mym4_version_micro])
+ m4_define([mym4_revision],
+@@ -90,7 +90,22 @@
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR(src/gpgme.h.in)
+ AC_CONFIG_HEADER(config.h)
+-AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
++
++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 no-dist-gzip) dnl NB: Do not [quote] this parameter.
++
+ AM_MAINTAINER_MODE
+ AC_CANONICAL_HOST
+ AM_SILENT_RULES
diff --git a/external/libassuan/UnpackedTarball_libassuan.mk b/external/libassuan/UnpackedTarball_libassuan.mk
index fd1a9e9..924d610 100644
--- a/external/libassuan/UnpackedTarball_libassuan.mk
+++ b/external/libassuan/UnpackedTarball_libassuan.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libassuan,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libassuan, \
     external/libassuan/find-libgpg-error.patch \
+    external/libassuan/fix-autoconf-macros.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libassuan/fix-autoconf-macros.patch b/external/libassuan/fix-autoconf-macros.patch
new file mode 100644
index 0000000..4a2d035
--- /dev/null
+++ b/external/libassuan/fix-autoconf-macros.patch
@@ -0,0 +1,56 @@
+diff -ur libassuan.org/configure.ac libassuan/configure.ac
+--- configure.ac	2017-02-16 18:32:51.549527554 +0100
++++ configure.ac~	2017-02-16 18:32:59.893497890 +0100
+@@ -44,6 +44,14 @@
+ # the decimalized short revision number, a beta version string and a
+ # flag indicating a development version (mym4_isbeta).  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_argn],
++[m4_assert([0 < $1])]dnl
++[m4_pushdef([_$0], [_m4_popdef([_$0])]m4_dquote([$]m4_incr([$1])))_$0($@)])
++m4_define([m4_esyscmd_s], [m4_chomp_all(m4_esyscmd([$1]))])
+ m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \
+                            mym4_package mym4_major mym4_minor mym4_micro),[:]))
+ m4_define([mym4_isbeta],       m4_argn(2, mym4_verslist))
+@@ -75,7 +80,22 @@
+ VERSION=$PACKAGE_VERSION
+ 
+ AC_CONFIG_AUX_DIR([build-aux])
+-AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
++
++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 no-dist-gzip) dnl NB: Do not [quote] this parameter.
++
+ AM_MAINTAINER_MODE
+ AC_CONFIG_SRCDIR(src/assuan.h.in)
+ AC_CONFIG_MACRO_DIR(m4)
+@@ -475,10 +475,12 @@
+               [Defined if LOCAL_PEEREID is supported (NetBSD specific)])
+   else
+     # (Open)Solaris
+-    AC_CHECK_FUNCS([getpeerucred], AC_CHECK_HEADERS([ucred.h]))
++    AC_CHECK_FUNCS([getpeerucred])
+     if test $ac_cv_func_getpeerucred != yes; then
+         # FreeBSD
+         AC_CHECK_FUNCS([getpeereid])
++    else
++        AC_CHECK_HEADERS([ucred.h])
+     fi
+   fi
+ fi
diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index 4f124d6..b2f4252 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 0000000..ba32461
--- /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])


More information about the Libreoffice-commits mailing list