download.lst                                       |    4 +-
 external/gpgmepp/find-libgpg-error-libassuan.patch |   21 +++++------
 external/gpgmepp/w32-build-fixes.patch.1           |    2 -
 external/libassuan/ExternalPackage_libassuan.mk    |    4 +-
 external/libassuan/ExternalProject_libassuan.mk    |    2 -
 external/libassuan/UnpackedTarball_libassuan.mk    |    1 
 external/libassuan/drop_putc_unlocked.patch.1      |   26 +++++++++++++
 external/libassuan/find-libgpg-error.patch         |    6 +--
 external/libassuan/w32-build-fixes.patch.1         |   40 ++++++++++-----------
 external/libassuan/w32-stdc.patch                  |   10 ++---
 10 files changed, 72 insertions(+), 44 deletions(-)

New commits:
commit 0ef89275a16cec3aa2c5e06b2bc6837ba9c71c43
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Thu Jul 25 15:19:24 2024 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Fri Sep 27 16:42:43 2024 +0200

    libassuan: upgrade to 3.0.1
    
    Downloaded from 
https://gnupg.org/ftp/gcrypt/libassuan/libassuan-3.0.1.tar.bz2
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169198
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Jenkins
    
    (cherry picked from commit 79d74f036f65dcf128fb9b967b345a9009028f53, as its
    modifications to external/gpgmepp/find-libgpg-error-libassuan.patch happen 
to
    fix a flatpak build against org.freedesktop.Sdk//24.08, which would 
otherwise
    fail with
    
    > libtool: link: LD_RUN_PATH="/usr/local/lib:" /usr/bin/ccache gcc 
-I/run/build/libreoffice/workdir/UnpackedTarball/libassuan/src 
-I/run/build/libreoffice/workdir/UnpackedTarball/libgpg-error/src -O2 -pipe -g 
-Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions 
-fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables 
-fstack-clash-protection -fcf-protection -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer -O2 -Wall -Wcast-align -Wshadow 
-Wstrict-prototypes -Wno-format-y2k -Wno-missing-field-initializers 
-Wno-sign-compare -Wno-format-zero-length -Wno-format-truncation 
-Wno-sizeof-pointer-div -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -o 
.libs/gpgme-json gpgme-json.o cJSON.o  -lm ./.libs/libgpgme.so 
-L/run/build/libreoffice/workdir/UnpackedTarball/libgpg-error/src/.libs 
/run/build/libreoffice/workdir/UnpackedTarball/libgpg-error/src/.libs/libgpg-error.so
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 warning: libassuan.so.0, needed by ./.libs/libgpgme.so, not found (try using 
-rpath or -rpath-link)
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to 
`assuan_socket_connect@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to 
`assuan_ctx_set_system_hooks@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to 
`assuan_get_active_fds@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_sendfd@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_transact@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_write_line@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_pending_line@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_pipe_connect@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_read_line@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_new_ext@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_release@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_set_flag@LIBASSUAN_1.0'
    > 
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
 ./.libs/libgpgme.so: undefined reference to `assuan_send_data@LIBASSUAN_1.0'
    > collect2: error: ld returned 1 exit status
    > make[4]: *** [Makefile:860: gpgme-json] Error 1
    > make[3]: *** [Makefile:550: all-recursive] Error 1
    > make[2]: *** [Makefile:482: all] Error 2
    > make[1]: *** 
[/run/build/libreoffice/external/gpgmepp/ExternalProject_gpgmepp.mk:48: 
/run/build/libreoffice/workdir/ExternalProject/gpgmepp/build] Error 1
    
    as linking the gpgme-json executable, due to the default
    --no-allow-shlib-undefined, tries to resolve the linked-in libgpgme.so, 
which in
    turn has a DT_NEEDED of libassuan.so.9 but a DT_RUNPATH of $ORIGIN, so 
doesn't
    find any libassuan.so.9 if that doesn't happen to be available in the 
system,
    but which it isn't for this flatpak build; I have no idea how that ever
    happened to work)
    
    Change-Id: Ie56dd4d88998c6b2a825a502aa34bae3436d2b25
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174052
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/download.lst b/download.lst
index 9e0d108183fa..18469c101aab 100644
--- a/download.lst
+++ b/download.lst
@@ -369,8 +369,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
diff --git a/external/gpgmepp/find-libgpg-error-libassuan.patch 
b/external/gpgmepp/find-libgpg-error-libassuan.patch
index a98a7d845a34..038a9b0b0691 100644
--- a/external/gpgmepp/find-libgpg-error-libassuan.patch
+++ b/external/gpgmepp/find-libgpg-error-libassuan.patch
@@ -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
diff --git a/external/gpgmepp/w32-build-fixes.patch.1 
b/external/gpgmepp/w32-build-fixes.patch.1
index 250b2022c540..a0a83910bbb6 100644
--- a/external/gpgmepp/w32-build-fixes.patch.1
+++ b/external/gpgmepp/w32-build-fixes.patch.1
@@ -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 =
  
diff --git a/external/libassuan/ExternalPackage_libassuan.mk 
b/external/libassuan/ExternalPackage_libassuan.mk
index 77dc05a665f1..2ef3d7b509a0 100644
--- a/external/libassuan/ExternalPackage_libassuan.mk
+++ b/external/libassuan/ExternalPackage_libassuan.mk
@@ -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
 
diff --git a/external/libassuan/ExternalProject_libassuan.mk 
b/external/libassuan/ExternalProject_libassuan.mk
index 9b972a55fc27..700f2a186ae9 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -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)
diff --git a/external/libassuan/UnpackedTarball_libassuan.mk 
b/external/libassuan/UnpackedTarball_libassuan.mk
index 3604fa36a395..e3fc5391d373 100644
--- a/external/libassuan/UnpackedTarball_libassuan.mk
+++ b/external/libassuan/UnpackedTarball_libassuan.mk
@@ -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 \
diff --git a/external/libassuan/drop_putc_unlocked.patch.1 
b/external/libassuan/drop_putc_unlocked.patch.1
new file mode 100644
index 000000000000..31e04489bd15
--- /dev/null
+++ b/external/libassuan/drop_putc_unlocked.patch.1
@@ -0,0 +1,26 @@
+commit 69069bc63e6b1152e34e39bc322132fd4fd7284d
+Author: Werner Koch <w...@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]))
diff --git a/external/libassuan/find-libgpg-error.patch 
b/external/libassuan/find-libgpg-error.patch
index 57361ab5e8cd..fd09aa64721d 100644
--- a/external/libassuan/find-libgpg-error.patch
+++ b/external/libassuan/find-libgpg-error.patch
@@ -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.
diff --git a/external/libassuan/w32-build-fixes.patch.1 
b/external/libassuan/w32-build-fixes.patch.1
index 8d77eef37cd5..a61c49f3910a 100644
--- a/external/libassuan/w32-build-fixes.patch.1
+++ b/external/libassuan/w32-build-fixes.patch.1
@@ -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>
"
-                "#endif
", stdout);
-       else
--        fputs ("#include <unistd.h>
", stdout);
-+        fputs ("#include <io.h>
", 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
diff --git a/external/libassuan/w32-stdc.patch 
b/external/libassuan/w32-stdc.patch
index def3dea833af..60c421b6ec68 100644
--- a/external/libassuan/w32-stdc.patch
+++ b/external/libassuan/w32-stdc.patch
@@ -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 @@

Reply via email to