Skip to content

Commit

Permalink
Merge pull request #22304 from fuzzard/depends_gnutls
Browse files Browse the repository at this point in the history
[tools/depends][target] Bump gnutls 3.7.8
  • Loading branch information
fuzzard committed Mar 11, 2023
2 parents 111eac1 + ee4d8a6 commit 73049ad
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 44 deletions.
3 changes: 0 additions & 3 deletions tools/depends/target/config.site.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ LD_LIBRARY_PATH=@prefix@/@tool_dir@/lib:$LD_LIBRARY_PATH
PYTHON_VERSION=3.9
NATIVE_ROOT=@prefix@/@tool_dir@

#libomxil-bellagio
ac_cv_func_malloc_0_nonnull=yes

#curl
ac_cv_file__dev_urandom=yes
ac_cv_lib_ssl_SSL_connect=yes
Expand Down
22 changes: 0 additions & 22 deletions tools/depends/target/gnutls/01-macos-clang-accel.patch

This file was deleted.

5 changes: 5 additions & 0 deletions tools/depends/target/gnutls/GNUTLS-VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LIBNAME=gnutls
VERSION=3.7.8
ARCHIVE=$(LIBNAME)-$(VERSION).tar.xz
SHA512=4199bcf7c9e3aab2f52266aadceefc563dfe2d938d0ea1f3ec3be95d66f4a8c8e5494d3a800c03dd02ad386dec1738bd63e1fe0d8b394a2ccfc7d6c6a0cc9359

35 changes: 19 additions & 16 deletions tools/depends/target/gnutls/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
include ../../Makefile.include
include ../../Makefile.include GNUTLS-VERSION ../../download-files.include
DEPS = ../../Makefile.include Makefile ../../download-files.include \
add-dl-as-private-lib.patch \
01-macos-clang-accel.patch 03-support-correct-cisdigit.patch

# lib name, version
LIBNAME=gnutls
VERSION=3.6.16
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.xz
SHA512=72c78d7fcb024393c1d15f2a1856608ae4460ba43cc5bbbb4c29b80508cae6cb822df4638029de2363437d110187e0a3cc19a7288c3b2f44b2f648399a028438
include ../../download-files.include
03-support-correct-cisdigit.patch \
android-fpending.patch

# disable rpl_malloc and rpl_realloc symbols in glib
# causes linking errors in libmicrohttpd and ffmpeg with missing symbols
# Undefined symbols for architecture arm64:
# "_rpl_realloc", referenced from:
# _gnutls_realloc in libgnutls.a(mem.o)
# _gnutls_realloc_zero in libgnutls.a(init.o)
# __asn1_realloc in libgnutls.a(parser_aux.o)
# __asn1_ordering_set_of in libgnutls.a(coding.o)
# __asn1_realloc in libgnutls.a(decoding.o)
# __gnutls_fread_file in libgnutls.a(read-file.o)
# _rpl_getdelim in libgnutls.a(getdelim.o)
# ...
CONFIGURE_OPTIONS+= ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes

# configuration settings
CONFIGURE=./configure --prefix=$(PREFIX) \
Expand All @@ -34,13 +42,8 @@ $(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); patch -p1 -i ../add-dl-as-private-lib.patch
ifeq ($(findstring apple-darwin, $(HOST)), apple-darwin)
cd $(PLATFORM); patch -p1 -i ../01-macos-clang-accel.patch
endif
ifeq ($(OS),android)
cd $(PLATFORM); patch -p1 -i ../01-macos-clang-accel.patch
endif
cd $(PLATFORM); patch -p1 -i ../03-support-correct-cisdigit.patch
cd $(PLATFORM); patch -p1 -i ../android-fpending.patch
cd $(PLATFORM); $(AUTORECONF) -vif
cd $(PLATFORM); $(CONFIGURE)

Expand Down
6 changes: 3 additions & 3 deletions tools/depends/target/gnutls/add-dl-as-private-lib.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -552,6 +552,9 @@
@@ -586,6 +586,9 @@


AC_LIB_HAVE_LINKFLAGS(dl,, [#include <dlfcn.h>], [dladdr (0, 0);])
Expand All @@ -16,7 +16,7 @@
URL: https://www.gnutls.org/
Version: @VERSION@
Libs: -L${libdir} -lgnutls
-Libs.private: @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBATOMIC_LIBS@ @GNUTLS_LIBS_PRIVATE@
+Libs.private: @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBATOMIC_LIBS@ @GNUTLS_LIBS_PRIVATE@ @LIBDL@
-Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBATOMIC_LIBS@ @GNUTLS_LIBS_PRIVATE@
+Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBATOMIC_LIBS@ @GNUTLS_LIBS_PRIVATE@ @LIBDL@
@GNUTLS_REQUIRES_PRIVATE@
Cflags: -I${includedir}
13 changes: 13 additions & 0 deletions tools/depends/target/gnutls/android-fpending.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- a/src/gl/fpending.c
+++ b/src/gl/fpending.c
@@ -39,7 +39,9 @@
#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
/* GNU libc, BeOS, Haiku, Linux libc5 */
return fp->_IO_write_ptr - fp->_IO_write_base;
-#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+#elif defined __ANDROID__
+ return fp_->_p - fp_->_bf._base;
+#elif defined __sferror || defined __DragonFly__
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
return fp->_p - fp->_bf._base;
#elif defined __EMX__ /* emx+gcc */

0 comments on commit 73049ad

Please sign in to comment.