gpg4libre: cleanup gpgme & add gbuild lib for gpgmepp

This moves the external to gpgmepp, since that's what we _actually_
link against; plus tons of enablement for Windows build, mostly
related to linker probs integration.

There's still no good way to build a DLL with autotools, so we fall
back to gbuild manual make, see also tdf#91480

Change-Id: Ifd8217ef58536612d2389d48e343db133a13fb9c
Reviewed-on: https://gerrit.libreoffice.org/44970
Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
This commit is contained in:
Thorsten Behrens 2017-11-15 21:31:07 +01:00 committed by Thorsten Behrens
parent bafbaa3fed
commit 50a55d8620
19 changed files with 475 additions and 97 deletions

View file

@ -3472,7 +3472,7 @@ endef
else # NON-SYSTEM_GPGME
define gb_ExternalProject__use_gpgmepp
$(call gb_ExternalProject_use_external_project,$(1),gpgme)
$(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
endef
define gb_ExternalProject__use_libassuan
@ -3484,24 +3484,77 @@ $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
endef
ifneq ($(filter WNT,$(OS)),)
define gb_LinkTarget__use_libgpg-error
$(call gb_LinkTarget_use_package,$(1),libgpg-error)
$(call gb_LinkTarget_set_include,$(1),\
$(GPG_ERROR_CFLAGS) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_add_libs,$(1),\
-LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
)
endef
define gb_LinkTarget__use_libassuan
$(call gb_LinkTarget_use_package,$(1),libassuan)
$(call gb_LinkTarget_set_include,$(1),\
$(LIBASSUAN_CFLAGS) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_add_libs,$(1),\
-LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
)
endef
define gb_LinkTarget__use_gpgmepp
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,gpgme)/lang/cpp/src \
-I$(call gb_UnpackedTarball_get_dir,gpgme)/src \
-I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
-I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
$$(GPG_ERROR_CFLAGS) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_use_libraries,$(1),\
gpgmepp \
)
endef
$(eval $(call gb_Helper_register_packages_for_install,ooo,\
libassuan \
libgpg-error \
))
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
gpgmepp \
))
endif
ifneq ($(filter MACOSX LINUX,$(OS)),)
define gb_LinkTarget__use_gpgmepp
$(call gb_LinkTarget_use_package,$(1),gpgmepp)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
-I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
$$(GPG_ERROR_CFLAGS) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,gpgme)/lang/cpp/src/.libs/ -lgpgmepp \
-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
)
$(call gb_LinkTarget_use_package,$(1),gpgme)
endef
ifneq ($(filter MACOSX LINUX,$(OS)),)
$(eval $(call gb_Helper_register_packages_for_install,ooo,\
gpgme \
gpgmepp \
libassuan \
libgpg-error \
))

View file

@ -10128,7 +10128,11 @@ fi
AC_SUBST(ENABLE_PDFIUM)
SYSTEM_GPGMEPP=
if test "$_os" = "Linux" -o "$_os" = "Darwin"; then
# need matching cygwin arch for building gpgme sadly, for the while
if test "$_os" = "Linux" -o "$_os" = "Darwin" \
-o \( "$_os" = "WINNT" -a "$host_cpu" = "i686" -a "$WINDOWS_SDK_ARCH" = "x86" \) \
-o \( "$_os" = "WINNT" -a "$host_cpu" = "x86_64" -a "$WINDOWS_SDK_ARCH" = "x64" \) ; then
dnl ===================================================================
dnl Check for system gpgme
dnl ===================================================================
@ -10150,23 +10154,13 @@ if test "$_os" = "Linux" -o "$_os" = "Darwin"; then
AC_MSG_RESULT([internal])
AC_DEFINE([GPGME_CAN_EXPORT_MINIMAL_KEY])
BUILD_TYPE="$BUILD_TYPE LIBGPGERROR LIBASSUAN GPGMEPP"
if test "$_os" = "WINNT"; then
BUILD_TYPE="$BUILD_TYPE GLIB2"
fi
GPG_ERROR_CFLAGS="-I${WORKDIR}/UnpackedTarball/libgpg-error/src"
GPG_ERROR_LIBS="-L${WORKDIR}/UnpackedTarball/libgpg-error/src/.libs -lgpg-error"
LIBASSUAN_CFLAGS="-I${WORKDIR}/UnpackedTarball/libassuan/src"
LIBASSUAN_LIBS="-L${WORKDIR}/UnpackedTarball/libassuan/src/.libs -lassuan"
if test "$_os" != "WINNT"; then
GPG_ERROR_LIBS="-L${WORKDIR}/UnpackedTarball/libgpg-error/src/.libs -lgpg-error"
LIBASSUAN_LIBS="-L${WORKDIR}/UnpackedTarball/libassuan/src/.libs -lassuan"
fi
fi
else
# TODO(davido): Windows build must be protected with a configure option
# unless CI doesn't support libtool with windres with gcc preprocessor
BUILD_TYPE="$BUILD_TYPE LIBASSUAN LIBGPGERROR GPGMEPP"
GPG_ERROR_CFLAGS="-I${WORKDIR}/UnpackedTarball/libgpg-error/src"
GPG_ERROR_LIBS="-L${WORKDIR}/UnpackedTarball/libgpg-error/src/.libs -lgpg-error"
LIBASSUAN_CFLAGS="-I${WORKDIR}/UnpackedTarball/libassuan/src"
LIBASSUAN_LIBS="-L${WORKDIR}/UnpackedTarball/libassuan/src/.libs -lassuan"
fi
AC_SUBST(SYSTEM_GPGMEPP)
AC_SUBST(GPG_ERROR_CFLAGS)

View file

@ -43,7 +43,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,FREETYPE,freetype) \
$(call gb_Helper_optional,GLIB2,glib2) \
$(call gb_Helper_optional,GLM,glm) \
$(call gb_Helper_optional,GPGMEPP,gpgme) \
$(call gb_Helper_optional,GPGMEPP,gpgmepp) \
$(call gb_Helper_optional,GRAPHITE,graphite) \
$(call gb_Helper_optional,HARFBUZZ,harfbuzz) \
$(call gb_Helper_optional,HSQLDB,hsqldb) \

View file

@ -1,30 +0,0 @@
# -*- 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_ExternalPackage_ExternalPackage,gpgme,gpgme))
$(eval $(call gb_ExternalPackage_use_external_project,gpgme,gpgme))
ifneq ($(DISABLE_DYNLOADING),TRUE)
ifeq ($(OS),LINUX)
$(eval $(call gb_ExternalPackage_add_file,gpgme,$(LIBO_LIB_FOLDER)/libgpgmepp.so.6,lang/cpp/src/.libs/libgpgmepp.so.6.4.0))
$(eval $(call gb_ExternalPackage_add_file,gpgme,$(LIBO_LIB_FOLDER)/libgpgme.so.11,src/.libs/libgpgme.so.11.18.0))
else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,gpgme,$(LIBO_LIB_FOLDER)/libgpgmepp.6.dylib,lang/cpp/src/.libs/libgpgmepp.6.dylib))
$(eval $(call gb_ExternalPackage_add_file,gpgme,$(LIBO_LIB_FOLDER)/libgpgme.11.dylib,src/.libs/libgpgme.11.dylib))
endif
endif # $(DISABLE_DYNLOADING)
# vim: set noet sw=4 ts=4:

View file

@ -1,22 +0,0 @@
# -*- 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_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 \
external/gpgme/fix-autoconf-macros.patch \
external/gpgme/add-minimal-keyexport.patch \
$(if $(filter MSC,$(COM)),external/gpgme/w32-build-fixes.patch.1) \
))
# vim: set noet sw=4 ts=4:

View file

@ -0,0 +1,30 @@
# -*- 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_ExternalPackage_ExternalPackage,gpgmepp,gpgmepp))
$(eval $(call gb_ExternalPackage_use_external_project,gpgmepp,gpgmepp))
ifneq ($(DISABLE_DYNLOADING),TRUE)
ifeq ($(OS),LINUX)
$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgmepp.so.6,lang/cpp/src/.libs/libgpgmepp.so.6.4.0))
$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgme.so.11,src/.libs/libgpgme.so.11.18.0))
else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgmepp.6.dylib,lang/cpp/src/.libs/libgpgmepp.6.dylib))
$(eval $(call gb_ExternalPackage_add_file,gpgmepp,$(LIBO_LIB_FOLDER)/libgpgme.11.dylib,src/.libs/libgpgme.11.dylib))
endif
endif # $(DISABLE_DYNLOADING)
# vim: set noet sw=4 ts=4:

View file

@ -7,34 +7,32 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalProject_ExternalProject,gpgme))
$(eval $(call gb_ExternalProject_ExternalProject,gpgmepp))
$(eval $(call gb_ExternalProject_register_targets,gpgme,\
$(eval $(call gb_ExternalProject_register_targets,gpgmepp,\
build \
))
$(eval $(call gb_ExternalProject_use_autoconf,gpgme,build))
$(eval $(call gb_ExternalProject_use_autoconf,gpgmepp,build))
$(eval $(call gb_ExternalProject_use_externals,gpgme,\
$(eval $(call gb_ExternalProject_use_externals,gpgmepp,\
libgpg-error \
libassuan \
))
ifeq ($(COM),MSC)
$(call gb_ExternalProject_get_state_target,gpgme,build):
$(call gb_ExternalProject_get_state_target,gpgmepp,build):
$(call gb_ExternalProject_run,build,\
autoreconf \
&& ./configure \
--enable-languages="cl cpp" \
--disable-shared \
--disable-languages \
--disable-gpgconf-test \
--disable-gpg-test \
--disable-gpgsm-test \
--disable-g13-test \
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
LIBASSUAN_CFLAGS="$(LIBASSUAN_CFLAGS)" \
LIBASSUAN_LIBS="$(LIBASSUAN_LIBS)" \
CFLAGS='$(CFLAGS) \
--disable-glibtest \
CFLAGS='$(CFLAGS) \
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS)) \
@ -42,18 +40,17 @@ $(call gb_ExternalProject_get_state_target,gpgme,build):
--host=$(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) \
&& $(MAKE) \
)
else
$(call gb_ExternalProject_get_state_target,gpgme,build):
$(call gb_ExternalProject_get_state_target,gpgmepp,build):
$(call gb_ExternalProject_run,build,\
autoreconf \
&& ./configure \
--enable-languages="cl cpp" \
--enable-languages="cpp" \
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
LIBASSUAN_CFLAGS="$(LIBASSUAN_CFLAGS)" \
LIBASSUAN_LIBS="$(LIBASSUAN_LIBS)" \
CFLAGS='$(CFLAGS) \
CFLAGS='$(CFLAGS) \
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS)) \
@ -64,6 +61,6 @@ $(call gb_ExternalProject_get_state_target,gpgme,build):
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
&& $(MAKE) \
)
endif
# vim: set noet sw=4 ts=4:

79
external/gpgmepp/Library_gpgmepp.mk vendored Normal file
View file

@ -0,0 +1,79 @@
# -*- 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_Library_Library,gpgmepp))
$(eval $(call gb_Library_use_unpacked,gpgmepp,gpgmepp))
$(eval $(call gb_Library_use_externals,gpgmepp,\
libgpg-error \
libassuan \
))
$(eval $(call gb_LinkTarget_use_external_project,\
$(call gb_Library_get_linktarget,gpgmepp),gpgmepp,full))
$(eval $(call gb_Library_set_warnings_not_errors,gpgmepp))
$(eval $(call gb_Library_set_include,gpgmepp,\
-I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
-I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/interfaces \
-I$(call gb_UnpackedTarball_get_dir,gpgmepp) \
-I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
-I$(call gb_UnpackedTarball_get_dir,libgpg-error)/src \
$$(INCLUDE) \
))
$(eval $(call gb_Library_add_libs,gpgmepp,\
ws2_32.lib shell32.lib \
-LIBPATH:$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs libgpgme.lib \
))
$(eval $(call gb_Library_add_defs,gpgmepp,\
-DHAVE_CONFIG_H \
-DBUILDING_GPGMEPP \
-DDLL_EXPORT \
-DPIC \
))
$(eval $(call gb_Library_set_generated_cxx_suffix,gpgmepp,cpp))
$(eval $(call gb_Library_add_generated_exception_objects,gpgmepp,\
UnpackedTarball/gpgmepp/lang/cpp/src/callbacks \
UnpackedTarball/gpgmepp/lang/cpp/src/configuration \
UnpackedTarball/gpgmepp/lang/cpp/src/context \
UnpackedTarball/gpgmepp/lang/cpp/src/context_vanilla \
UnpackedTarball/gpgmepp/lang/cpp/src/data \
UnpackedTarball/gpgmepp/lang/cpp/src/decryptionresult \
UnpackedTarball/gpgmepp/lang/cpp/src/defaultassuantransaction \
UnpackedTarball/gpgmepp/lang/cpp/src/editinteractor \
UnpackedTarball/gpgmepp/lang/cpp/src/encryptionresult \
UnpackedTarball/gpgmepp/lang/cpp/src/engineinfo \
UnpackedTarball/gpgmepp/lang/cpp/src/eventloopinteractor \
UnpackedTarball/gpgmepp/lang/cpp/src/exception \
UnpackedTarball/gpgmepp/lang/cpp/src/gpgadduserideditinteractor \
UnpackedTarball/gpgmepp/lang/cpp/src/gpgagentgetinfoassuantransaction \
UnpackedTarball/gpgmepp/lang/cpp/src/gpggencardkeyinteractor \
UnpackedTarball/gpgmepp/lang/cpp/src/gpgsetexpirytimeeditinteractor \
UnpackedTarball/gpgmepp/lang/cpp/src/gpgsetownertrusteditinteractor \
UnpackedTarball/gpgmepp/lang/cpp/src/gpgsignkeyeditinteractor \
UnpackedTarball/gpgmepp/lang/cpp/src/importresult \
UnpackedTarball/gpgmepp/lang/cpp/src/key \
UnpackedTarball/gpgmepp/lang/cpp/src/keygenerationresult \
UnpackedTarball/gpgmepp/lang/cpp/src/keylistresult \
UnpackedTarball/gpgmepp/lang/cpp/src/scdgetinfoassuantransaction \
UnpackedTarball/gpgmepp/lang/cpp/src/signingresult \
UnpackedTarball/gpgmepp/lang/cpp/src/swdbresult \
UnpackedTarball/gpgmepp/lang/cpp/src/tofuinfo \
UnpackedTarball/gpgmepp/lang/cpp/src/trustitem \
UnpackedTarball/gpgmepp/lang/cpp/src/verificationresult \
UnpackedTarball/gpgmepp/lang/cpp/src/vfsmountresult \
))
# vim: set noet sw=4 ts=4:

View file

@ -7,12 +7,25 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Module_Module,gpgme))
$(eval $(call gb_Module_Module,gpgmepp))
$(eval $(call gb_Module_add_targets,gpgme,\
ExternalProject_gpgme \
ExternalPackage_gpgme \
UnpackedTarball_gpgme \
$(eval $(call gb_Module_add_targets,gpgmepp,\
UnpackedTarball_gpgmepp \
ExternalProject_gpgmepp \
))
ifeq ($(COM),MSC)
$(eval $(call gb_Module_add_targets,gpgmepp,\
Library_gpgmepp \
))
else
$(eval $(call gb_Module_add_targets,gpgmepp,\
ExternalPackage_gpgmepp \
))
endif
# vim: set noet sw=4 ts=4:

View file

@ -0,0 +1,25 @@
# -*- 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_UnpackedTarball_UnpackedTarball,gpgmepp))
$(eval $(call gb_UnpackedTarball_set_tarball,gpgmepp,$(GPGME_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,gpgmepp,0))
$(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \
external/gpgmepp/find-libgpg-error-libassuan.patch \
external/gpgmepp/fix-autoconf-macros.patch \
external/gpgmepp/add-minimal-keyexport.patch \
$(if $(filter MSC,$(COM)),external/gpgmepp/w32-build-fixes.patch.1) \
$(if $(filter MSC,$(COM)),external/gpgmepp/w32-disable-docs.patch.1) \
$(if $(filter MSC,$(COM)),external/gpgmepp/w32-fix-win32-macro.patch.1) \
$(if $(filter MSC,$(COM)),external/gpgmepp/w32-fix-libtool.patch.1) \
))
# vim: set noet sw=4 ts=4:

View file

@ -120,3 +120,14 @@ diff -ru gpgme.orig/src/vfs-mount.c gpgme/src/vfs-mount.c
{
if (opd->result.mount_dir)
free (opd->result.mount_dir);
diff -ur gpgmepp.org/src/w32-glib-io.c gpgmepp/src/w32-glib-io.c
--- gpgmepp.org/src/w32-glib-io.c 2016-11-16 13:22:41.000000000 +0100
+++ gpgmepp/src/w32-glib-io.c 2017-11-20 06:40:44.793945300 +0100
@@ -37,6 +37,7 @@
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
+#include <winsock2.h>
#include <glib.h>
#include <windows.h>
#include <io.h>

View file

@ -0,0 +1,15 @@
Disable doc building the hard way - should rather be a config option
like libgpg-error's --disable-doc
diff -ur gpgmepp.org/Makefile.am gpgmepp/Makefile.am
--- gpgmepp.org/Makefile.am 2016-11-16 13:20:18.000000000 +0100
+++ gpgmepp/Makefile.am 2017-11-20 15:34:49.086731000 +0100
@@ -33,7 +33,7 @@
tests =
endif
-SUBDIRS = src ${tests} doc lang
+SUBDIRS = src ${tests} lang
# Fix the version of the spec file and create a file named VERSION
# to be used for patch's Prereq: feature.

View file

@ -0,0 +1,38 @@
Gross hack to make libtool work with gcc-wrapper - frontended
link.exe on Windows. Make libtool ignore all libs & simply pass
them on as-is to the linker
A proper fix would be to make gcc-wrapper behave like gcc during
linking, by accepting cygwin path names, and correctly expanding
-l<short_lib_name> to lib<short_lib_name>.lib
diff -ur gpgmepp.org/m4/libtool.m4 gpgmepp/m4/libtool.m4
--- gpgmepp.org/m4/libtool.m4 2016-11-16 13:20:16.000000000 +0100
+++ gpgmepp/m4/libtool.m4 2017-11-21 22:00:05.006587800 +0100
@@ -3209,24 +3209,11 @@
;;
cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
+ lt_cv_deplibs_check_method=pass_all
;;
mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- # Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
+ lt_cv_deplibs_check_method=pass_all
;;
cegcc*)

View file

@ -0,0 +1,175 @@
diff -ur gpgmepp.org/lang/cpp/src/callbacks.cpp gpgmepp/lang/cpp/src/callbacks.cpp
--- gpgmepp.org/lang/cpp/src/callbacks.cpp 2016-10-18 19:22:02.000000000 +0200
+++ gpgmepp/lang/cpp/src/callbacks.cpp 2017-11-20 18:03:04.290060900 +0100
@@ -38,7 +38,9 @@
#include <cassert>
#include <cerrno>
#include <cstring>
+#if HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <stdlib.h>
static inline gpgme_error_t make_err_from_syserror()
diff -ur gpgmepp.org/lang/cpp/src/data.h gpgmepp/lang/cpp/src/data.h
--- gpgmepp.org/lang/cpp/src/data.h 2017-03-24 15:20:32.000000000 +0100
+++ gpgmepp/lang/cpp/src/data.h 2017-11-20 17:23:24.802711200 +0100
@@ -31,6 +31,11 @@
#include <algorithm>
#include <memory>
+#ifdef _MSC_VER
+# include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+
namespace GpgME
{
diff -ur gpgmepp.org/lang/cpp/src/editinteractor.cpp gpgmepp/lang/cpp/src/editinteractor.cpp
--- gpgmepp.org/lang/cpp/src/editinteractor.cpp 2017-03-09 09:01:10.000000000 +0100
+++ gpgmepp/lang/cpp/src/editinteractor.cpp 2017-11-20 18:09:33.022674700 +0100
@@ -30,9 +30,11 @@
#include <gpgme.h>
-#ifdef _WIN32
+#ifdef _MSC_VER
# include <io.h>
-#include <windows.h>
+# include <windows.h>
+# include <BaseTsd.h>
+ typedef SSIZE_T ssize_t;
#else
# include <unistd.h>
#endif
diff -ur gpgmepp.org/lang/cpp/src/gpgmepp_export.h gpgmepp/lang/cpp/src/gpgmepp_export.h
--- gpgmepp.org/lang/cpp/src/gpgmepp_export.h 2016-08-04 15:03:09.000000000 +0200
+++ gpgmepp/lang/cpp/src/gpgmepp_export.h 2017-11-20 16:57:47.805691100 +0100
@@ -29,14 +29,14 @@
# ifndef GPGMEPP_EXPORT
# ifdef BUILDING_GPGMEPP
/* We are building this library */
-# ifdef WIN32
+# ifdef _MSC_VER
# define GPGMEPP_EXPORT __declspec(dllexport)
# else
# define GPGMEPP_EXPORT __attribute__((visibility("default")))
# endif
# else
/* We are using this library */
-# ifdef WIN32
+# ifdef _MSC_VER
# define GPGMEPP_EXPORT __declspec(dllimport)
# else
# define GPGMEPP_EXPORT __attribute__((visibility("default")))
@@ -45,7 +45,7 @@
# endif
# ifndef GPGMEPP_NO_EXPORT
-# ifdef WIN32
+# ifdef _MSC_VER
# define GPGMEPP_NO_EXPORT
# else
# define GPGMEPP_NO_EXPORT __attribute__((visibility("hidden")))
@@ -54,7 +54,11 @@
#endif
#ifndef GPGMEPP_DEPRECATED
-# define GPGMEPP_DEPRECATED __attribute__ ((__deprecated__))
+# ifdef _MSC_VER
+# define GPGMEPP_DEPRECATED __declspec(deprecated("deprecated"))
+# else
+# define GPGMEPP_DEPRECATED __attribute__ ((__deprecated__))
+# endif
#endif
#ifndef GPGMEPP_DEPRECATED_EXPORT
diff -ur gpgmepp.org/lang/cpp/src/interfaces/dataprovider.h gpgmepp/lang/cpp/src/interfaces/dataprovider.h
--- gpgmepp.org/lang/cpp/src/interfaces/dataprovider.h 2016-05-17 14:32:37.000000000 +0200
+++ gpgmepp/lang/cpp/src/interfaces/dataprovider.h 2017-11-20 18:03:11.332715700 +0100
@@ -29,6 +29,11 @@
#include <gpg-error.h>
+#ifdef _MSC_VER
+# include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+
namespace GpgME
{
diff -ur gpgmepp.org/lang/cpp/src/key.cpp gpgmepp/lang/cpp/src/key.cpp
--- gpgmepp.org/lang/cpp/src/key.cpp 2017-03-20 20:10:15.000000000 +0100
+++ gpgmepp/lang/cpp/src/key.cpp 2017-11-20 17:44:50.321858800 +0100
@@ -33,10 +33,16 @@
#include <gpgme.h>
#include <string.h>
+#if HAVE_STRINGS_H
#include <strings.h>
+#endif
#include <istream>
#include <iterator>
+#ifdef _MSC_VER
+# define strcasecmp _stricmp
+#endif
+
const GpgME::Key::Null GpgME::Key::null;
namespace GpgME
diff -ur gpgmepp.org/lang/cpp/src/key.h gpgmepp/lang/cpp/src/key.h
--- gpgmepp.org/lang/cpp/src/key.h 2017-03-20 20:10:15.000000000 +0100
+++ gpgmepp/lang/cpp/src/key.h 2017-11-20 17:07:51.551632000 +0100
@@ -30,7 +30,6 @@
#include "gpgmefw.h"
#include <memory>
-#include <sys/time.h>
#include <vector>
#include <algorithm>
diff -ur gpgmepp.org/lang/qt/src/qgpgme_export.h gpgmepp/lang/qt/src/qgpgme_export.h
--- gpgmepp.org/lang/qt/src/qgpgme_export.h 2016-11-03 17:32:30.000000000 +0100
+++ gpgmepp/lang/qt/src/qgpgme_export.h 2017-11-20 16:58:27.395388000 +0100
@@ -39,14 +39,14 @@
# ifndef QGPGME_EXPORT
# ifdef BUILDING_QGPGME
/* We are building this library */
-# ifdef WIN32
+# ifdef _WIN32
# define QGPGME_EXPORT __declspec(dllexport)
# else
# define QGPGME_EXPORT __attribute__((visibility("default")))
# endif
# else
/* We are using this library */
-# ifdef WIN32
+# ifdef _WIN32
# define QGPGME_EXPORT __declspec(dllimport)
# else
# define QGPGME_EXPORT __attribute__((visibility("default")))
@@ -55,7 +55,7 @@
# endif
# ifndef QGPGME_NO_EXPORT
-# ifdef WIN32
+# ifdef _WIN32
# define QGPGME_NO_EXPORT
# else
# define QGPGME_NO_EXPORT __attribute__((visibility("hidden")))
@@ -64,7 +64,11 @@
#endif
#ifndef QGPGME_DEPRECATED
-# define QGPGME_DEPRECATED __attribute__ ((__deprecated__))
+# ifdef _MSC_VER
+# define QGPGME_DEPRECATED __declspec(deprecated("deprecated"))
+# else
+# define QGPGME_DEPRECATED __attribute__ ((__deprecated__))
+# endif
#endif
#ifndef QGPGME_DEPRECATED_EXPORT