diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/libassuan | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/libassuan')
-rw-r--r-- | external/libassuan/ExternalPackage_libassuan.mk | 28 | ||||
-rw-r--r-- | external/libassuan/ExternalProject_libassuan.mk | 67 | ||||
-rw-r--r-- | external/libassuan/Makefile | 14 | ||||
-rw-r--r-- | external/libassuan/Module_libassuan.mk | 18 | ||||
-rw-r--r-- | external/libassuan/README | 3 | ||||
-rw-r--r-- | external/libassuan/UnpackedTarball_libassuan.mk | 25 | ||||
-rw-r--r-- | external/libassuan/find-libgpg-error.patch | 18 | ||||
-rw-r--r-- | external/libassuan/fix-autoconf-macros.patch | 27 | ||||
-rw-r--r-- | external/libassuan/rpath.patch | 11 | ||||
-rw-r--r-- | external/libassuan/w32-build-fixes-2.patch | 12 | ||||
-rw-r--r-- | external/libassuan/w32-build-fixes.patch.1 | 73 | ||||
-rw-r--r-- | external/libassuan/w32-stdc.patch | 74 |
12 files changed, 370 insertions, 0 deletions
diff --git a/external/libassuan/ExternalPackage_libassuan.mk b/external/libassuan/ExternalPackage_libassuan.mk new file mode 100644 index 000000000..0f24e5e2d --- /dev/null +++ b/external/libassuan/ExternalPackage_libassuan.mk @@ -0,0 +1,28 @@ +# -*- 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,libassuan,libassuan)) + +$(eval $(call gb_ExternalPackage_use_external_project,libassuan,libassuan)) + +ifneq ($(DISABLE_DYNLOADING),TRUE) + +ifeq ($(OS),LINUX) + +$(eval $(call gb_ExternalPackage_add_file,libassuan,$(LIBO_LIB_FOLDER)/libassuan.so.0,src/.libs/libassuan.so.0.8.5)) + +else ifeq ($(OS),MACOSX) + +$(eval $(call gb_ExternalPackage_add_file,libassuan,$(LIBO_LIB_FOLDER)/libassuan.0.dylib,src/.libs/libassuan.0.dylib)) + +endif + +endif # $(DISABLE_DYNLOADING) + +# vim: set noet sw=4 ts=4: diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk new file mode 100644 index 000000000..9b972a55f --- /dev/null +++ b/external/libassuan/ExternalProject_libassuan.mk @@ -0,0 +1,67 @@ +# -*- 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,libassuan)) + +$(eval $(call gb_ExternalProject_register_targets,libassuan,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_autoconf,libassuan,build)) + +$(eval $(call gb_ExternalProject_use_externals,libassuan,\ + libgpg-error \ +)) + + +ifeq ($(COM),MSC) +$(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executable_get_target_for_build,cpp) + $(call gb_Trace_StartRange,libassuan,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + $(gb_WIN_GPG_cross_setup_exports) \ + && autoreconf \ + && $(gb_RUN_CONFIGURE) ./configure \ + --enable-static \ + --disable-shared \ + --disable-doc \ + $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ + CFLAGS="$(CFLAGS) -D__STDC__=1 $(call gb_ExternalProject_get_build_flags,libassuan)" \ + GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \ + GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \ + $(gb_WIN_GPG_platform_switches) \ + MAKE=$(MAKE) \ + && $(MAKE) \ + ) + $(call gb_Trace_EndRange,libassuan,EXTERNAL) +else +$(call gb_ExternalProject_get_state_target,libassuan,build): + $(call gb_Trace_StartRange,libassuan,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + autoreconf \ + && $(gb_RUN_CONFIGURE) ./configure \ + --disable-doc \ + CFLAGS="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,libassuan)" \ + GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \ + GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \ + $(if $(filter LINUX,$(OS)), \ + 'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \ + -Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN') \ + $(gb_CONFIGURE_PLATFORMS) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ + && $(MAKE) \ + $(if $(filter MACOSX,$(OS)),\ + && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ + $(EXTERNAL_WORKDIR)/src/.libs/libassuan.0.dylib \ + ) \ + ) + $(call gb_Trace_EndRange,libassuan,EXTERNAL) + +endif +# vim: set noet sw=4 ts=4: diff --git a/external/libassuan/Makefile b/external/libassuan/Makefile new file mode 100644 index 000000000..569ad8a0b --- /dev/null +++ b/external/libassuan/Makefile @@ -0,0 +1,14 @@ +# -*- 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/. +# + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/libassuan/Module_libassuan.mk b/external/libassuan/Module_libassuan.mk new file mode 100644 index 000000000..45ada66ee --- /dev/null +++ b/external/libassuan/Module_libassuan.mk @@ -0,0 +1,18 @@ +# -*- 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_Module_Module,libassuan)) + +$(eval $(call gb_Module_add_targets,libassuan,\ + ExternalProject_libassuan \ + ExternalPackage_libassuan \ + UnpackedTarball_libassuan \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libassuan/README b/external/libassuan/README new file mode 100644 index 000000000..cd35103a1 --- /dev/null +++ b/external/libassuan/README @@ -0,0 +1,3 @@ +A small library implementing Assuan protocol which is used as IPC +between most of the newer GnuPG components +[https://www.gnupg.org/related_software/libassuan/index.html] diff --git a/external/libassuan/UnpackedTarball_libassuan.mk b/external/libassuan/UnpackedTarball_libassuan.mk new file mode 100644 index 000000000..3604fa36a --- /dev/null +++ b/external/libassuan/UnpackedTarball_libassuan.mk @@ -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,libassuan)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libassuan,$(LIBASSUAN_TARBALL))) + +$(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 \ + $(if $(filter MSC,$(COM)),external/libassuan/w32-build-fixes.patch.1) \ + external/libassuan/w32-build-fixes-2.patch \ + $(if $(filter LINUX,$(OS)),external/libassuan/rpath.patch) \ + external/libassuan/w32-stdc.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libassuan/find-libgpg-error.patch b/external/libassuan/find-libgpg-error.patch new file mode 100644 index 000000000..57361ab5e --- /dev/null +++ b/external/libassuan/find-libgpg-error.patch @@ -0,0 +1,18 @@ +--- configure.ac 2017-02-13 14:34:06.983449082 +0100 ++++ configure.ac 2017-02-13 15:36:50.944653536 +0100 +@@ -355,7 +355,14 @@ + + + # Checking for libgpg-error. +-AM_PATH_GPG_ERROR(1.17,, AC_MSG_ERROR([libgpg-error was not found])) ++if test "${GPG_ERROR_CFLAGS+set}" != "set"; then ++ AM_PATH_GPG_ERROR(1.17,, AC_MSG_ERROR([libgpg-error was not found])) ++else ++ GPG_ERROR_CFLAGS="$GPG_ERROR_CFLAGS" ++ GPG_ERROR_LIBS="$GPG_ERROR_LIBS" ++ AC_SUBST(GPG_ERROR_CFLAGS) ++ AC_SUBST(GPG_ERROR_LIBS) ++fi + + # + # Checks for library functions. diff --git a/external/libassuan/fix-autoconf-macros.patch b/external/libassuan/fix-autoconf-macros.patch new file mode 100644 index 000000000..743ca460b --- /dev/null +++ b/external/libassuan/fix-autoconf-macros.patch @@ -0,0 +1,27 @@ +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 +@@ -75,7 +80,22 @@ + AC_SUBST(LIBASSUAN_LT_REVISION) + + 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) diff --git a/external/libassuan/rpath.patch b/external/libassuan/rpath.patch new file mode 100644 index 000000000..73c10e342 --- /dev/null +++ b/external/libassuan/rpath.patch @@ -0,0 +1,11 @@ +--- configure.ac ++++ configure.ac +@@ -127,6 +127,8 @@ + LT_INIT([win32-dll disable-static]) + LT_LANG([Windows Resource]) + ++hardcode_libdir_flag_spec= ++ + # For now we hardcode the use of version scripts. It would be better + # to write a test for this or even implement this within libtool. + have_ld_version_script=no diff --git a/external/libassuan/w32-build-fixes-2.patch b/external/libassuan/w32-build-fixes-2.patch new file mode 100644 index 000000000..918405d15 --- /dev/null +++ b/external/libassuan/w32-build-fixes-2.patch @@ -0,0 +1,12 @@ +Avoid MFC dependency - can go with very basic includes instead + +--- src/versioninfo.rc.in~ 2015-10-16 15:40:36.000000000 +0200 ++++ src/versioninfo.rc.in 2017-11-29 04:19:57.870117200 +0100 +@@ -14,7 +14,6 @@ + + #line __LINE__ "versioninfo.rc.in" + +-#include <afxres.h> + + + VS_VERSION_INFO VERSIONINFO diff --git a/external/libassuan/w32-build-fixes.patch.1 b/external/libassuan/w32-build-fixes.patch.1 new file mode 100644 index 000000000..ebf98c5f5 --- /dev/null +++ b/external/libassuan/w32-build-fixes.patch.1 @@ -0,0 +1,73 @@ +--- libassuan.orig/src/mkheader.c 2013-03-15 20:26:09.000000000 +0100 ++++ libassuan/src/mkheader.c 2017-09-24 14:17:33.584583300 +0200 +@@ -99,7 +99,7 @@ + "# include <unistd.h>\n" + "#endif\n", stdout); + else +- fputs ("#include <unistd.h>\n", stdout); ++ fputs ("#include <io.h>\n", stdout); + } + else if (!strcmp (tag, "include:types")) + { +diff -ru libassuan.orig/src/Makefile.in libassuan/src/Makefile.in +--- libassuan.orig/src/Makefile.in 2020-06-10 17:26:08.699728800 +0200 ++++ libassuan/src/Makefile.in 2020-06-10 17:22:11.066865300 +0200 +@@ -462,7 +462,7 @@ + assuan-pipe-connect.c assuan-socket-connect.c assuan-uds.c \ + assuan-logging.c assuan-socket.c $(am__append_2) \ + $(am__append_3) $(am__append_4) ++@HAVE_W32_SYSTEM_TRUE@LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ +-@HAVE_W32_SYSTEM_TRUE@LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \ + @HAVE_W32_SYSTEM_TRUE@ `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + @HAVE_W32_SYSTEM_TRUE@ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` + +diff -ru libassuan.orig/src/Makefile.am libassuan/src/Makefile.am +--- libassuan.orig/src/Makefile.am 2017-09-24 14:20:05.906065400 +0200 ++++ libassuan/src/Makefile.am 2017-09-24 14:40:59.038850200 +0200 +@@ -87,7 +87,7 @@ + + if HAVE_W32_SYSTEM + ++LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ +-LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + sed -e 's/-I/--include-dir /g;s/-D/--define /g'` + +@@ -148,10 +148,10 @@ + $(DESTDIR)$(bindir)/gpgcedev.dll + endif + ++mkheader$(EXEEXT): mkheader.c Makefile +-mkheader: mkheader.c Makefile + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) \ + $(LDFLAGS_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c + ++assuan.h: assuan.h.in mkheader$(EXEEXT) $(parts_of_assuan_h) ++ ./mkheader$(EXEEXT) $(host_os) $(srcdir)/assuan.h.in \ +-assuan.h: assuan.h.in mkheader $(parts_of_assuan_h) +- ./mkheader $(host_os) $(srcdir)/assuan.h.in \ + $(PACKAGE_VERSION) $(VERSION_NUMBER) >$@ +diff -ru libassuan.orig/src/assuan-handler.c libassuan/src/assuan-handler.c +--- libassuan.orig/src/assuan-handler.c 2016-06-25 16:27:49.000000000 +0200 ++++ libassuan/src/assuan-handler.c 2017-09-24 15:32:51.200956200 +0200 +@@ -395,7 +395,7 @@ + + { "INPUT", std_handler_input, std_help_input, 0 }, + { "OUTPUT", std_handler_output, std_help_output, 0 }, +- { } }; ++}; + + + /** +diff -ru libassuan.orig/Makefile.am libassuan/Makefile.am +--- libassuan.orig/Makefile.am 2016-07-14 10:09:22.000000000 +0200 ++++ libassuan/Makefile.am 2017-09-25 21:20:19.928317500 +0200 +@@ -35,7 +35,7 @@ + doc = + endif + +-SUBDIRS = m4 src $(doc) tests ++SUBDIRS = m4 src $(doc) + + + dist-hook: gen-ChangeLog diff --git a/external/libassuan/w32-stdc.patch b/external/libassuan/w32-stdc.patch new file mode 100644 index 000000000..def3dea83 --- /dev/null +++ b/external/libassuan/w32-stdc.patch @@ -0,0 +1,74 @@ +--- src/assuan-handler.c ++++ src/assuan-handler.c +@@ -938,7 +938,7 @@ + #if defined(HAVE_W32CE_SYSTEM) + fdarray[n++] = (void*)fileno (ctx->outbound.data.fp); + #elif defined(HAVE_W32_SYSTEM) +- fdarray[n++] = (void*)_get_osfhandle (fileno (ctx->outbound.data.fp)); ++ fdarray[n++] = (void*)_get_osfhandle (_fileno (ctx->outbound.data.fp)); + #else + fdarray[n++] = fileno (ctx->outbound.data.fp); + #endif +--- src/assuan-logging.c ++++ src/assuan-logging.c +@@ -30,10 +30,15 @@ + # ifdef HAVE_WINSOCK2_H + # include <winsock2.h> + # endif ++# include <process.h> ++# define getpid _getpid + # include <windows.h> + #endif /*HAVE_W32_SYSTEM*/ + #include <errno.h> + #include <ctype.h> ++#if defined HAVE_W32_SYSTEM ++#define isascii __isascii ++#endif + + #include "assuan-defs.h" + +--- src/assuan-pipe-connect.c ++++ src/assuan-pipe-connect.c +@@ -47,6 +47,8 @@ + # ifdef HAVE_WINSOCK2_H + # include <winsock2.h> + # endif ++# include <process.h> ++# define getpid _getpid + # include <windows.h> + #endif + +--- src/assuan-socket.c ++++ src/assuan-socket.c +@@ -27,6 +27,8 @@ + #include <stdlib.h> + #ifdef HAVE_W32_SYSTEM + # define WIN32_LEAN_AND_MEAN ++# include <process.h> ++# define getpid _getpid + # include <windows.h> + # include <wincrypt.h> + #ifndef HAVE_W32CE_SYSTEM +--- src/conversion.c ++++ src/conversion.c +@@ -27,6 +27,9 @@ + #include <string.h> + #include <errno.h> + #include <ctype.h> ++#if defined HAVE_W32_SYSTEM ++#define isascii __isascii ++#endif + + #include "assuan-defs.h" + #include "debug.h" +--- src/system-w32.c ++++ src/system-w32.c +@@ -453,7 +453,7 @@ + + /* Dup stderr to /dev/null unless it is in the list of FDs to be + passed to the child. */ +- fd = assuan_fd_from_posix_fd (fileno (stderr)); ++ fd = assuan_fd_from_posix_fd (_fileno (stderr)); + fdp = fd_child_list; + if (fdp) + { |