diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-02-10 17:51:35 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-02-16 12:14:02 +0000 |
commit | 4a53df9cd7e58230bbb5f5c46161861010ca220f (patch) | |
tree | e2fd7c2da6d05c16105b3954bd6d3480d8221597 /external/gpgme | |
parent | 99263598bfb7911a18dae48e1d9fc01e11e0143c (diff) |
gpg4libre: Build internal libgpg-error, libassuan and gpgme(pp)
Change-Id: I1953e7062b872340b844771adc8ebe40f524cc76
Reviewed-on: https://gerrit.libreoffice.org/34227
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'external/gpgme')
-rw-r--r-- | external/gpgme/ExternalProject_gpgme.mk | 29 | ||||
-rw-r--r-- | external/gpgme/Module_gpgme.mk | 1 | ||||
-rw-r--r-- | external/gpgme/UnpackedTarball_gpgme.mk | 5 | ||||
-rw-r--r-- | external/gpgme/find-libgpg-error-libassuan.patch | 59 |
4 files changed, 94 insertions, 0 deletions
diff --git a/external/gpgme/ExternalProject_gpgme.mk b/external/gpgme/ExternalProject_gpgme.mk new file mode 100644 index 000000000000..e5ad64285a87 --- /dev/null +++ b/external/gpgme/ExternalProject_gpgme.mk @@ -0,0 +1,29 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,gpgme)) + +$(eval $(call gb_ExternalProject_register_targets,gpgme,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_autoconf,gpgme,build)) + +$(call gb_ExternalProject_get_state_target,gpgme,build): + $(call gb_ExternalProject_run,build,\ + autoreconf \ + && ./configure \ + GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \ + GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \ + LIBASSUAN_CFLAGS="$(LIBASSUAN_CFLAGS)" \ + LIBASSUAN_LIBS="$(LIBASSUAN_LIBS)" \ + && $(MAKE) \ + ) + +# vim: set noet sw=4 ts=4: diff --git a/external/gpgme/Module_gpgme.mk b/external/gpgme/Module_gpgme.mk index b0b9def23cd2..8c318a2f6e69 100644 --- a/external/gpgme/Module_gpgme.mk +++ b/external/gpgme/Module_gpgme.mk @@ -10,6 +10,7 @@ $(eval $(call gb_Module_Module,gpgme)) $(eval $(call gb_Module_add_targets,gpgme,\ + ExternalProject_gpgme \ UnpackedTarball_gpgme \ )) diff --git a/external/gpgme/UnpackedTarball_gpgme.mk b/external/gpgme/UnpackedTarball_gpgme.mk index 22c52cdb85a6..a6b79c4f836b 100644 --- a/external/gpgme/UnpackedTarball_gpgme.mk +++ b/external/gpgme/UnpackedTarball_gpgme.mk @@ -11,4 +11,9 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,gpgme)) $(eval $(call gb_UnpackedTarball_set_tarball,gpgme,$(GPGME_TARBALL))) +$(eval $(call gb_UnpackedTarball_set_patchlevel,gpgme,0)) + +$(eval $(call gb_UnpackedTarball_add_patches,gpgme, \ + external/gpgme/find-libgpg-error-libassuan.patch \ +)) # vim: set noet sw=4 ts=4: diff --git a/external/gpgme/find-libgpg-error-libassuan.patch b/external/gpgme/find-libgpg-error-libassuan.patch new file mode 100644 index 000000000000..2ddd4d2f2e62 --- /dev/null +++ b/external/gpgme/find-libgpg-error-libassuan.patch @@ -0,0 +1,59 @@ +diff --git a/configure.ac b/configure.ac +index f28480b..92a3e85 100644 +--- configure.ac ++++ configure.ac +@@ -674,15 +674,34 @@ AC_CHECK_FUNCS(setlocale) + + # Checking for libgpg-error. + have_gpg_error=no +-AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION", +- have_gpg_error=yes, have_gpg_error=no) ++if test "x${GPG_ERROR_CFLAGS}" = x; then ++ AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION", ++ have_gpg_error=yes, have_gpg_error=no) ++else ++ have_gpg_error=yes ++ GPG_ERROR_CFLAGS="$GPG_ERROR_CFLAGS" ++ GPG_ERROR_LIBS="$GPG_ERROR_LIBS" ++ AC_SUBST(GPG_ERROR_CFLAGS) ++ AC_SUBST(GPG_ERROR_LIBS) ++ ++fi ++ + AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME, + [The default error source for GPGME.]) + + # And for libassuan. + have_libassuan=no +-AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION", ++if test "x${LIBASSUAN_CFLAGS}" = x; then ++ AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION", + have_libassuan=yes, have_libassuan=no) ++else ++ have_libassuan=yes ++ LIBASSUAN_CFLAGS="$LIBASSUAN_CFLAGS" ++ LIBASSUAN_LIBS="$LIBASSUAN_LIBS" ++ AC_SUBST(LIBASSUAN_CFLAGS) ++ AC_SUBST(LIBASSUAN_LIBS) ++fi ++ + if test "$have_libassuan" = "yes"; then + AC_DEFINE_UNQUOTED(GPGME_LIBASSUAN_VERSION, "$libassuan_version", + [version of the libassuan library]) +diff --git a/src/Makefile.am b/src/Makefile.am +index ce6f1d4..6b1d835 100644 +--- src/Makefile.am ++++ src/Makefile.am +@@ -97,10 +97,10 @@ endif + + # We use a global CFLAGS setting for all library + # versions, because then every object file is only compiled once. +-AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@ ++AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GPG_ERROR_CFLAGS@ @GLIB_CFLAGS@ + + gpgme_tool_SOURCES = gpgme-tool.c argparse.c argparse.h +-gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@ ++gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@ + + + if HAVE_W32_SYSTEM |