summaryrefslogtreecommitdiffstats
path: root/external/libassuan
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/libassuan
parentInitial commit. (diff)
downloadlibreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz
libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/libassuan')
-rw-r--r--external/libassuan/ExternalPackage_libassuan.mk28
-rw-r--r--external/libassuan/ExternalProject_libassuan.mk67
-rw-r--r--external/libassuan/Makefile14
-rw-r--r--external/libassuan/Module_libassuan.mk18
-rw-r--r--external/libassuan/README3
-rw-r--r--external/libassuan/UnpackedTarball_libassuan.mk24
-rw-r--r--external/libassuan/find-libgpg-error.patch18
-rw-r--r--external/libassuan/fix-autoconf-macros.patch56
-rw-r--r--external/libassuan/rpath.patch11
-rw-r--r--external/libassuan/w32-build-fixes-2.patch12
-rw-r--r--external/libassuan/w32-build-fixes.patch.164
11 files changed, 315 insertions, 0 deletions
diff --git a/external/libassuan/ExternalPackage_libassuan.mk b/external/libassuan/ExternalPackage_libassuan.mk
new file mode 100644
index 000000000..955dddd3c
--- /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.1))
+
+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..565d38ff9
--- /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)
+gb_ExternalProject_libassuan_host := $(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32)
+gb_ExternalProject_libassuan_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64)
+$(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executable_get_target,cpp)
+ $(call gb_Trace_StartRange,libassuan,EXTERNAL)
+ $(call gb_ExternalProject_run,build,\
+ autoreconf \
+ && ./configure \
+ --enable-static \
+ --disable-shared \
+ --disable-doc \
+ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+ CXXFLAGS="$(CXXFLAGS)" \
+ GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
+ GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
+ --host=$(gb_ExternalProject_libassuan_host) \
+ RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ 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 \
+ && ./configure \
+ --disable-doc \
+ 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') \
+ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ $(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..295b87d49
--- /dev/null
+++ b/external/libassuan/UnpackedTarball_libassuan.mk
@@ -0,0 +1,24 @@
+# -*- 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) \
+))
+
+# 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..4a2d035b5
--- /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/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..b0dbbf841
--- /dev/null
+++ b/external/libassuan/w32-build-fixes.patch.1
@@ -0,0 +1,64 @@
+--- libassuan/src/Makefile.am
++++ libassuan/src/Makefile.am
+@@ -81,7 +81,7 @@
+
+ if HAVE_W32_SYSTEM
+
+-LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
++LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
+ `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
+ sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
+
+--- 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.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
+@@ -142,11 +142,11 @@
+ $(DESTDIR)$(bindir)/gpgcedev.dll
+ endif
+
+-mkheader: mkheader.c Makefile
++mkheader$(EXEEXT): mkheader.c Makefile
+ $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c
+
+-assuan.h: assuan.h.in mkheader $(parts_of_assuan_h)
+- ./mkheader $(host_os) $(srcdir)/assuan.h.in \
++assuan.h: assuan.h.in mkheader$(EXEEXT) $(parts_of_assuan_h)
++ ./mkheader$(EXEEXT) $(host_os) $(srcdir)/assuan.h.in \
+ @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