summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-02-10 16:30:51 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-02-23 09:23:37 +0000
commitaceba1e1af7ba63d29f35022741d3c764df63983 (patch)
treecf21fe28e47038e1313d5c1fb5ef054fc875a460
parenta9b4c7b31da1b98280203c61d58261d1ffbb8b77 (diff)
gpg4libre: We want to use C++ library instead
in particular, the one from gpgme project. configure check is set up in such a way that it will fail with older gpgmepp that depends on KDE development packages. This means Linux distros released before 2016 have to rely upon in-tree version, but such is life ... Change-Id: I5cdceffad6e81643603fcdee57a7656218f76834 Reviewed-on: https://gerrit.libreoffice.org/34130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--RepositoryExternal.mk6
-rw-r--r--config_host.mk.in6
-rw-r--r--configure.ac33
3 files changed, 22 insertions, 23 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index da85d052ffd5..48c687267a3e 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3391,7 +3391,7 @@ endef
endif # ENABLE_BREAKPAD
-ifneq ($(SYSTEM_GPGME),)
+ifneq ($(SYSTEM_GPGMEPP),)
gb_ExternalProject__use_gpgme:=
gb_ExternalProject__use_libassuan:=
@@ -3400,11 +3400,11 @@ gb_ExternalProject__use_libgpg-error:=
define gb_LinkTarget__use_gpgme
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
- $$(GPGME_CFLAGS) \
+ $$(GPGMEPP_CFLAGS) \
)
$(call gb_LinkTarget_add_libs,$(1),\
- $(GPGME_LIBS) \
+ $(GPGMEPP_LIBS) \
)
endef
diff --git a/config_host.mk.in b/config_host.mk.in
index 1dfca596b5cf..5c35440ed0ad 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -204,8 +204,8 @@ export EPOXY_LIBS=$(gb_SPACE)@EPOXY_LIBS@
export GLM_CFLAGS=$(gb_SPACE)@GLM_CFLAGS@
export GPG_ERROR_CFLAGS=$(gb_SPACE)@GPG_ERROR_CFLAGS@
export GPG_ERROR_LIBS=$(gb_SPACE)@GPG_ERROR_LIBS@
-export GPGME_CFLAGS=$(gb_SPACE)@GPGME_CFLAGS@
-export GPGME_LIBS=$(gb_SPACE)@GPGME_LIBS@
+export GPGMEPP_CFLAGS=$(gb_SPACE)@GPGMEPP_CFLAGS@
+export GPGMEPP_LIBS=$(gb_SPACE)@GPGMEPP_LIBS@
export GNUTLS_CFLAGS=$(gb_SPACE)@GNUTLS_CFLAGS@
export GNUTLS_LIBS=$(gb_SPACE)@GNUTLS_LIBS@
export PARALLELISM?=@PARALLELISM@
@@ -510,7 +510,7 @@ export SYSTEM_GENCCODE=@SYSTEM_GENCCODE@
export SYSTEM_GENCMN=@SYSTEM_GENCMN@
export SYSTEM_EPOXY=@SYSTEM_EPOXY@
export SYSTEM_GLM=@SYSTEM_GLM@
-export SYSTEM_GPGME=@SYSTEM_GPGME@
+export SYSTEM_GPGMEPP=@SYSTEM_GPGMEPP@
export SYSTEM_GRAPHITE=@SYSTEM_GRAPHITE@
export SYSTEM_HARFBUZZ=@SYSTEM_HARFBUZZ@
export SYSTEM_HSQLDB=@SYSTEM_HSQLDB@
diff --git a/configure.ac b/configure.ac
index df4b75c84728..d7532cbb9e3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1759,10 +1759,10 @@ AC_ARG_WITH(system-poppler,
[Use system poppler (only needed for PDF import).]),,
[with_system_poppler="$with_system_libs"])
-AC_ARG_WITH(system-gpgme,
- AS_HELP_STRING([--with-system-gpgme],
+AC_ARG_WITH(system-gpgmepp,
+ AS_HELP_STRING([--with-system-gpgmepp],
[Use gpgme already on system]),,
- [with_system_gpgme="$with_system_libs"])
+ [with_system_gpgmepp="$with_system_libs"])
AC_ARG_WITH(system-apache-commons,
AS_HELP_STRING([--with-system-apache-commons],
@@ -10444,25 +10444,24 @@ else
fi
AC_SUBST(ENABLE_PDFIUM)
-SYSTEM_GPGME=
+SYSTEM_GPGMEPP=
if test "$_os" = "Linux"; then
dnl ===================================================================
dnl Check for system gpgme
dnl ===================================================================
- AC_MSG_CHECKING([which gpgme to use])
- if test "$with_system_gpgme" = "yes"; then
+ AC_MSG_CHECKING([which gpgmepp to use])
+ if test "$with_system_gpgmepp" = "yes"; then
AC_MSG_RESULT([external])
- SYSTEM_GPGME=TRUE
+ SYSTEM_GPGMEPP=TRUE
- AC_PATH_PROG(GPGMECONFIG, gpgme-config)
- if test -z "$GPGMECONFIG"; then
- AC_MSG_ERROR([--with-system-gpgme requested, but gpgme programs not found])
- fi
-
- GPGME_CFLAGS=`$GPGMECONFIG --cflags`
- GPGME_LIBS=`$GPGMECONFIG --libs`
+ # C++ library doesn't come with fancy gpgmepp-config, check for headers the old-fashioned way
+ AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ],
+ [AC_MSG_ERROR(gpgmepp headers not found, install gpgmepp development package)], [])
+ # progress_callback is the only func with plain C linkage
+ # checking for it also filters out older, KDE-dependent libgpgmepp versions
+ AC_CHECK_LIB(gpgmepp, progress_callback, [ GPGMEPP_LIBS=-lgpgmepp ],
+ [AC_MSG_ERROR(gpgmepp not found or not functional)], [])
else
-# This is work in progress, please DO NOT MODIFY OR REMOVE
AC_MSG_RESULT([internal])
BUILD_TYPE="$BUILD_TYPE LIBGPGERROR LIBASSUAN GPGME"
@@ -10477,8 +10476,8 @@ AC_SUBST(GPG_ERROR_CFLAGS)
AC_SUBST(GPG_ERROR_LIBS)
AC_SUBST(LIBASSUAN_CFLAGS)
AC_SUBST(LIBASSUAN_LIBS)
-AC_SUBST(GPGME_CFLAGS)
-AC_SUBST(GPGME_LIBS)
+AC_SUBST(GPGMEPP_CFLAGS)
+AC_SUBST(GPGMEPP_LIBS)
AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then