libassuan: upgrade to 3.0.1

Downloaded from https://gnupg.org/ftp/gcrypt/libassuan/libassuan-3.0.1.tar.bz2

Change-Id: Ie56dd4d88998c6b2a825a502aa34bae3436d2b25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169198
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
This commit is contained in:
Christian Lohmaier 2024-07-25 15:19:24 +02:00
parent 5fc6ef5990
commit 79d74f036f
10 changed files with 72 additions and 44 deletions

View file

@ -404,8 +404,8 @@ LCMS2_TARBALL := lcms2-2.16.tar.gz
# three static lines
# so that git cherry-pick
# will not run into conflicts
LIBASSUAN_SHA256SUM := 0103081ffc27838a2e50479153ca105e873d3d65d8a9593282e9c94c7e6afb76
LIBASSUAN_TARBALL := libassuan-2.5.7.tar.bz2
LIBASSUAN_SHA256SUM := c8f0f42e6103dea4b1a6a483cb556654e97302c7465308f58363778f95f194b1
LIBASSUAN_TARBALL := libassuan-3.0.1.tar.bz2
# three static lines
# so that git cherry-pick
# will not run into conflicts

View file

@ -53,14 +53,15 @@ index f28480b..92a3e85 100644
@LDADD_FOR_TESTS_KLUDGE@ -lstdc++
AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
--- lang/cpp/tests/Makefile.in 2020-06-20 00:44:49.542344510 +0200
+++ lang/cpp/tests/Makefile.in~ 2020-06-13 00:55:19.021212970 +0200
@@ -427,7 +427,7 @@
top_srcdir = @top_srcdir@
AM_LDFLAGS = -no-install
LDADD = ../../cpp/src/libgpgmepp.la \
+ ../../../src/libgpgme.la @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@ \
- ../../../src/libgpgme.la @GPG_ERROR_LIBS@ \
@LDADD_FOR_TESTS_KLUDGE@ -lstdc++
diff -ur gpgmepp.org/src/Makefile.am gpgmepp/src/Makefile.am
--- src/Makefile.am 2024-07-02 13:24:02.549609519 +0200
+++ src/Makefile.am 2024-07-02 13:24:29.573606613 +0200
@@ -111,7 +111,7 @@
gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@
AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
gpgme_json_SOURCES = gpgme-json.c cJSON.c cJSON.h
-gpgme_json_LDADD = -lm libgpgme.la $(GPG_ERROR_LIBS)
+gpgme_json_LDADD = -lm libgpgme.la @LIBASSUAN_LIBS@ $(GPG_ERROR_LIBS)
if HAVE_W32_SYSTEM

View file

@ -111,7 +111,7 @@ diff -ru gpgme.orig/src/Makefile.am gpgme/src/Makefile.am
+gpgme_tool_LDADD =
-gpgme_json_SOURCES = gpgme-json.c cJSON.c cJSON.h
-gpgme_json_LDADD = -lm libgpgme.la $(GPG_ERROR_LIBS)
-gpgme_json_LDADD = -lm libgpgme.la @LIBASSUAN_LIBS@ $(GPG_ERROR_LIBS)
+gpgme_json_SOURCES =
+gpgme_json_LDADD =

View file

@ -15,11 +15,11 @@ 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.7))
$(eval $(call gb_ExternalPackage_add_file,libassuan,$(LIBO_LIB_FOLDER)/libassuan.so.9,src/.libs/libassuan.so.9.0.1))
else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,libassuan,$(LIBO_LIB_FOLDER)/libassuan.0.dylib,src/.libs/libassuan.0.dylib))
$(eval $(call gb_ExternalPackage_add_file,libassuan,$(LIBO_LIB_FOLDER)/libassuan.9.dylib,src/.libs/libassuan.9.dylib))
endif

View file

@ -58,7 +58,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build):
&& $(MAKE) \
$(if $(filter MACOSX,$(OS)),\
&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
$(EXTERNAL_WORKDIR)/src/.libs/libassuan.0.dylib \
$(EXTERNAL_WORKDIR)/src/.libs/libassuan.9.dylib \
) \
)
$(call gb_Trace_EndRange,libassuan,EXTERNAL)

View file

@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libassuan,0))
$(eval $(call gb_UnpackedTarball_add_patches,libassuan, \
external/libassuan/find-libgpg-error.patch \
external/libassuan/drop_putc_unlocked.patch.1 \
external/libassuan/fix-autoconf-macros.patch \
$(if $(filter MSC,$(COM)),external/libassuan/w32-build-fixes.patch.1) \
external/libassuan/w32-build-fixes-2.patch \

View file

@ -0,0 +1,26 @@
commit 69069bc63e6b1152e34e39bc322132fd4fd7284d
Author: Werner Koch <wk@gnupg.org>
Date: Tue Jun 25 09:06:04 2024 +0200
Remove an declaration for an unused function
* src/assuan-defs.h (putc_unlocked): Remove declaration.
--
It seems the test for putc_unlocked was remove a long time ago.
GnuPG-bug-id: 7111
diff --git a/src/assuan-defs.h b/src/assuan-defs.h
index faf9aae..5052e8e 100644
--- a/src/assuan-defs.h
+++ b/src/assuan-defs.h
@@ -431,9 +431,6 @@ char *stpcpy (char *dest, const char *src);
#define clearenv _assuan_clearenv
int setenv (const char *name, const char *value, int replace);
#endif
-#ifndef HAVE_PUTC_UNLOCKED
-int putc_unlocked (int c, FILE *stream);
-#endif
#define DIM(v) (sizeof(v)/sizeof((v)[0]))

View file

@ -1,6 +1,6 @@
--- configure.ac 2017-02-13 14:34:06.983449082 +0100
+++ configure.ac 2017-02-13 15:36:50.944653536 +0100
@@ -355,7 +355,14 @@
@@ -399,7 +399,14 @@
# Checking for libgpg-error.
@ -13,6 +13,6 @@
+ AC_SUBST(GPG_ERROR_CFLAGS)
+ AC_SUBST(GPG_ERROR_LIBS)
+fi
AM_CONDITIONAL(USE_GPGRT_CONFIG, [test -n "$GPGRT_CONFIG" \
-a "$ac_cv_path_GPG_ERROR_CONFIG" = no])
#
# Checks for library functions.

View file

@ -1,23 +1,23 @@
--- 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"))
{
--- libassuan.orig/src/assuan.h.in.back 2024-06-20 17:52:17.473923519 +0200
+++ libassuan/src/assuan.h.in 2024-06-20 21:32:24.589095787 +0200
@@ -33,7 +33,7 @@
#include <stdio.h>
#include <sys/types.h>
-#include <unistd.h>
+#include <io.h>
#include <stdarg.h>
#ifndef _ASSUAN_NO_SOCKET_WRAPPER
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) \
assuan-logging.c assuan-socket.c $(am__append_1) \
$(am__append_2)
-@HAVE_W32_SYSTEM_TRUE@LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
+@HAVE_W32_SYSTEM_TRUE@LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(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'`
@ -36,14 +36,14 @@ diff -ru libassuan.orig/src/Makefile.am libassuan/src/Makefile.am
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 },
@@ -414,7 +414,7 @@
#if HAVE_W32_SYSTEM
{ "SENDFD", w32_handler_sendfd, w32_help_sendfd, 1 },
#endif
- { } };
+};
/**
diff -ru libassuan.orig/Makefile.am libassuan/Makefile.am
--- libassuan.orig/Makefile.am 2016-07-14 10:09:22.000000000 +0200

View file

@ -1,9 +1,9 @@
--- 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)
@@ -954,7 +954,7 @@
fdarray[n++] = ctx->outbound.fd;
if (ctx->outbound.data.fp)
#if 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
@ -48,7 +48,7 @@
+# define getpid _getpid
# include <windows.h>
# include <wincrypt.h>
#ifndef HAVE_W32CE_SYSTEM
# include <io.h>
--- src/conversion.c
+++ src/conversion.c
@@ -27,6 +27,9 @@