Commit 7cca3fc9 authored by Felix Paul Kühne's avatar Felix Paul Kühne

libvlc: update to v4

This raises the minimal iOS version to 9.0. tvOS and macOS are unchanged.
parent 9a5d53ec
......@@ -21,5 +21,5 @@ build
/vlc-unstable
DerivedData
MobileVLCKit/ImportedSources
/libvlc
/libvlc/vlc
Tests/Assets
......@@ -9,7 +9,7 @@ BUILD_SIMULATOR=yes
BUILD_STATIC_FRAMEWORK=no
BUILD_DYNAMIC_FRAMEWORK=no
SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
SDK_MIN=8.0
SDK_MIN=9.0
VERBOSE=no
DEBUG=no
CONFIGURATION="Release"
......@@ -25,7 +25,7 @@ OSVERSIONMINLDFLAG=ios
ROOT_DIR=empty
FARCH="all"
TESTEDHASH="774a96ae6" # libvlc hash that this version of VLCKit is build on
TESTEDHASH="fb26e2443" # libvlc hash that this version of VLCKit is build on
if [ -z "$MAKE_JOBS" ]; then
CORE_COUNT=`sysctl -n machdep.cpu.core_count`
......@@ -373,7 +373,6 @@ buildLibVLC() {
--disable-aribb24 \
--disable-aribb25 \
--enable-vpx \
--enable-libdsm \
--enable-libplacebo \
--disable-sparkle \
--disable-growl \
......@@ -381,18 +380,13 @@ buildLibVLC() {
--disable-ncurses \
--disable-asdcplib \
--enable-soxr \
--disable-aom \
--disable-sqlite \
--disable-medialibrary \
--disable-libdsm \
${CUSTOMOSOPTIONS} \
--enable-taglib > ${out}
echo "EXTRA_CFLAGS += ${EXTRA_CFLAGS}" >> config.mak
echo "EXTRA_LDFLAGS += ${EXTRA_LDFLAGS}" >> config.mak
echo "CC=${CC}" >> config.mak
echo "CXX=${CXX}" >> config.mak
echo "OBJC=${OBJC}" >> config.mak
echo "LD=${LD}" >> config.mak
echo "AR=${AR}" >> config.mak
echo "RANLIB=${RANLIB}" >> config.mak
echo "STRIP=${STRIP}" >> config.mak
make fetch -j$MAKE_JOBS
make -j$MAKE_JOBS > ${out}
......@@ -440,7 +434,6 @@ buildLibVLC() {
${DEBUGFLAG} \
${SCARYFLAG} \
--disable-macosx \
--disable-macosx-qtkit \
--disable-macosx-avfoundation \
--disable-shared \
--enable-opus \
......@@ -452,12 +445,10 @@ buildLibVLC() {
--disable-vcd \
--disable-vlc \
--disable-vlm \
--disable-httpd \
--disable-nls \
--disable-sse \
--disable-notify \
--enable-live555 \
--enable-realrtsp \
--enable-swscale \
--disable-projectm \
--enable-libass \
......@@ -485,6 +476,7 @@ buildLibVLC() {
--disable-mmx \
--disable-sparkle \
--disable-addonmanagermodules \
--disable-libplacebo \
--disable-mad > ${out}
fi
......@@ -1006,7 +998,7 @@ do
IOS=no
BITCODE=no
SDK_VERSION=`xcrun --sdk macosx --show-sdk-version`
SDK_MIN=10.9
SDK_MIN=10.11
OSVERSIONMINCFLAG=macosx
OSVERSIONMINLDFLAG=macosx
BUILD_DEVICE=yes
......@@ -1049,7 +1041,7 @@ if [ "$VLCROOT" = "" ]; then
if [ "$NONETWORK" != "yes" ]; then
if ! [ -e vlc ]; then
git clone https://git.videolan.org/git/vlc/vlc-3.0.git vlc
git clone https://git.videolan.org/git/vlc.git vlc
info "Applying patches to vlc.git"
cd vlc
git checkout -B localBranch ${TESTEDHASH}
......@@ -1091,10 +1083,18 @@ fi
if [ "$SKIPLIBVLCCOMPILATION" != "yes" ]; then
info "Building tools"
fetch_python3_path
export PATH="${PYTHON3_PATH}:${VLCROOT}/extras/tools/build/bin:${VLCROOT}/contrib/${TARGET}/bin:/usr/bin:/bin:/usr/sbin:/sbin"
spushd ${VLCROOT}/extras/tools
./bootstrap
make
make .gas
make .buildgas
make .buildxz
make .buildtar
make .buildmeson
make .buildninja
spopd #${VLCROOT}/extras/tools
fi
......
From ecc3193e0021a5902229580520358365dc9817f9 Mon Sep 17 00:00:00 2001
From 6dafec4d5815e7815cb6ad3b26c0fbfaaff42fef Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Fri, 16 Sep 2016 15:51:10 +0200
Subject: [PATCH 04/26] http: add vlc_http_cookies_clear
Subject: [PATCH 01/17] http: add vlc_http_cookies_clear
Clear all cookies without deleting the jar.
---
......@@ -11,10 +11,10 @@ Clear all cookies without deleting the jar.
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/vlc_http.h b/include/vlc_http.h
index ed7e1613da..da1fe4ef1a 100644
index 0e649445f6..28085d814e 100644
--- a/include/vlc_http.h
+++ b/include/vlc_http.h
@@ -71,6 +71,7 @@ VLC_API char *vlc_http_auth_FormatAuthorizationHeader
@@ -70,6 +70,7 @@ VLC_API char *vlc_http_auth_FormatAuthorizationHeader
typedef struct vlc_http_cookie_jar_t vlc_http_cookie_jar_t;
VLC_API vlc_http_cookie_jar_t * vlc_http_cookies_new( void ) VLC_USED;
......@@ -23,10 +23,10 @@ index ed7e1613da..da1fe4ef1a 100644
/**
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index a15ba0d923..db7f4030b9 100644
index 662ad6d3d3..8d9b85ab4c 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -128,6 +128,7 @@ vlc_http_auth_ParseAuthenticationInfoHeader
@@ -129,6 +129,7 @@ vlc_http_auth_ParseAuthenticationInfoHeader
vlc_http_auth_FormatAuthorizationHeader
vlc_http_cookies_new
vlc_http_cookies_destroy
......@@ -35,10 +35,10 @@ index a15ba0d923..db7f4030b9 100644
vlc_http_cookies_fetch
httpd_ClientIP
diff --git a/src/misc/httpcookies.c b/src/misc/httpcookies.c
index 77ab852b15..f229b85dea 100644
index f4c9682a9e..0e2898f4f6 100644
--- a/src/misc/httpcookies.c
+++ b/src/misc/httpcookies.c
@@ -281,7 +281,7 @@ vlc_http_cookie_jar_t * vlc_http_cookies_new(void)
@@ -280,7 +280,7 @@ vlc_http_cookie_jar_t * vlc_http_cookies_new(void)
return jar;
}
......@@ -47,7 +47,7 @@ index 77ab852b15..f229b85dea 100644
{
if ( !p_jar )
return;
@@ -290,8 +290,11 @@ void vlc_http_cookies_destroy( vlc_http_cookie_jar_t * p_jar )
@@ -289,8 +289,11 @@ void vlc_http_cookies_destroy( vlc_http_cookie_jar_t * p_jar )
cookie_destroy( vlc_array_item_at_index( &p_jar->cookies, i ) );
vlc_array_clear( &p_jar->cookies );
......@@ -61,5 +61,5 @@ index 77ab852b15..f229b85dea 100644
}
--
2.20.1
2.20.1 (Apple Git-117)
From 1c93273b8fa98c73928bef678cb3dc920345e174 Mon Sep 17 00:00:00 2001
From 07139b673c9ed045e44ce5f9e44835c297dae725 Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Fri, 16 Sep 2016 15:51:11 +0200
Subject: [PATCH 05/26] libvlc_media: add cookie_jar API
Subject: [PATCH 02/17] libvlc_media: add cookie_jar API
---
include/vlc/libvlc_media.h | 35 +++++++++++++++++++++++++++++++++++
......@@ -12,10 +12,10 @@ Subject: [PATCH 05/26] libvlc_media: add cookie_jar API
5 files changed, 71 insertions(+)
diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index 383f366b69..2a5666688d 100644
index aab025ae28..eaa47c4e7b 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -884,6 +884,41 @@ LIBVLC_API
@@ -960,6 +960,41 @@ LIBVLC_API
void libvlc_media_slaves_release( libvlc_media_slave_t **pp_slaves,
unsigned int i_count );
......@@ -58,10 +58,10 @@ index 383f366b69..2a5666688d 100644
# ifdef __cplusplus
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 482d95f6f1..8ae5da8d0f 100644
index d1ee941cac..23306395ee 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -217,6 +217,8 @@ libvlc_media_set_user_data
@@ -188,6 +188,8 @@ libvlc_media_set_user_data
libvlc_media_subitems
libvlc_media_tracks_get
libvlc_media_tracks_release
......@@ -71,10 +71,10 @@ index 482d95f6f1..8ae5da8d0f 100644
libvlc_playlist_play
libvlc_release
diff --git a/lib/media.c b/lib/media.c
index 54875d6a0e..e1d23caaf5 100644
index 06d02bad8d..affa6c63c9 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -406,6 +406,7 @@ libvlc_media_t * libvlc_media_new_from_input_item(
@@ -407,6 +407,7 @@ libvlc_media_t * libvlc_media_new_from_input_item(
p_md->p_subitems = NULL;
libvlc_event_manager_init( &p_md->event_manager, p_md );
......@@ -82,17 +82,17 @@ index 54875d6a0e..e1d23caaf5 100644
input_item_Hold( p_md->p_input_item );
@@ -561,6 +562,9 @@ void libvlc_media_release( libvlc_media_t *p_md )
@@ -562,6 +563,9 @@ void libvlc_media_release( libvlc_media_t *p_md )
input_item_Release( p_md->p_input_item );
+ if( p_md->p_cookie_jar )
+ vlc_http_cookies_destroy( p_md->p_cookie_jar );
+
+
vlc_cond_destroy( &p_md->parsed_cond );
vlc_mutex_destroy( &p_md->parsed_lock );
vlc_mutex_destroy( &p_md->subitems_lock );
@@ -1288,3 +1292,24 @@ void libvlc_media_slaves_release( libvlc_media_slave_t **pp_slaves,
@@ -1350,3 +1354,24 @@ void libvlc_media_slaves_release( libvlc_media_slave_t **pp_slaves,
}
free( pp_slaves );
}
......@@ -118,10 +118,10 @@ index 54875d6a0e..e1d23caaf5 100644
+ vlc_http_cookies_clear( p_md->p_cookie_jar );
+}
diff --git a/lib/media_internal.h b/lib/media_internal.h
index 5a67e9ff60..0f0341e260 100644
index aefc731c68..e90248c91b 100644
--- a/lib/media_internal.h
+++ b/lib/media_internal.h
@@ -30,6 +30,7 @@
@@ -29,6 +29,7 @@
#include <vlc_common.h>
#include <vlc_input.h>
......@@ -129,7 +129,7 @@ index 5a67e9ff60..0f0341e260 100644
struct libvlc_media_t
{
@@ -48,6 +49,7 @@ struct libvlc_media_t
@@ -47,6 +48,7 @@ struct libvlc_media_t
libvlc_media_parsed_status_t parsed_status;
bool is_parsed;
bool has_asked_preparse;
......@@ -138,10 +138,10 @@ index 5a67e9ff60..0f0341e260 100644
/* Media Descriptor */
diff --git a/lib/media_player.c b/lib/media_player.c
index a9a22fee15..fde008aaeb 100644
index 199d91dbba..e3915e155d 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -621,6 +621,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
@@ -576,6 +576,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "rate", VLC_VAR_FLOAT|VLC_VAR_DOINHERIT);
var_Create (mp, "sout", VLC_VAR_STRING);
var_Create (mp, "demux-filter", VLC_VAR_STRING);
......@@ -149,9 +149,9 @@ index a9a22fee15..fde008aaeb 100644
/* Video */
var_Create (mp, "vout", VLC_VAR_STRING|VLC_VAR_DOINHERIT);
@@ -985,6 +986,12 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
for( size_t i = 0; i < ARRAY_SIZE( p_mi->selected_es ); ++i )
p_mi->selected_es[i] = ES_INIT;
@@ -914,6 +915,12 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
vlc_player_t *player = p_mi->player;
vlc_player_Lock(player);
+ if( p_mi->p_md->p_cookie_jar )
+ {
......@@ -159,9 +159,9 @@ index a9a22fee15..fde008aaeb 100644
+ var_SetChecked( p_mi, "http-cookies", VLC_VAR_ADDRESS, cookies );
+ }
+
media_attach_preparsed_event( p_mi->p_md );
p_input_thread = input_Create( p_mi, p_mi->p_md->p_input_item, NULL,
int ret = vlc_player_Start(player);
if (ret == VLC_SUCCESS)
{
--
2.20.1
2.20.1 (Apple Git-117)
From a764311815c302e77f87ce1ddb924a8e760bef84 Mon Sep 17 00:00:00 2001
From 22409f3d2566657cda2fd9b0017497f63776522b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Thu, 18 Dec 2014 22:14:55 +0100
Subject: [PATCH 01/26] arm_neon: work-around libtool issue
Subject: [PATCH 03/17] arm_neon: work-around libtool issue
---
modules/arm_neon/Makefile.am | 2 ++
......@@ -18,5 +18,5 @@ index 10f5c15d7c..0406ded7eb 100644
libchroma_yuv_neon_plugin_la_SOURCES = \
--
2.20.1
2.20.1 (Apple Git-117)
From e9c1dc8bb9bc5180e6dbafd9dda01c756fc67910 Mon Sep 17 00:00:00 2001
From 11bde9a2d3f0db3439b0753c37e3f9ae42190ec9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Wed, 10 Dec 2014 22:14:55 +0100
Subject: [PATCH 02/26] disable neon volume plugin
Subject: [PATCH 04/17] disable neon volume plugin
---
modules/arm_neon/Makefile.am | 1 -
......@@ -20,5 +20,5 @@ index 0406ded7eb..48aa33332b 100644
endif
--
2.20.1
2.20.1 (Apple Git-117)
From cb41d7ce870dc034cc20a4771fcb2c28b1e30804 Mon Sep 17 00:00:00 2001
From 63c96e0db49337fc119b77612f8ed041bb45e694 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Fri, 22 Jul 2016 11:11:44 +0200
Subject: [PATCH 03/26] Enable System DL
Subject: [PATCH 05/17] Enable System DL
---
contrib/src/ffmpeg/patch-as-patch-can.patch | 20 ++++++++++++++++++++
......@@ -36,10 +36,10 @@ index 0000000000..2d60cf7140
+ in_format.mSampleRate = avctx->sample_rate ? avctx->sample_rate : 44100;
+ in_format.mChannelsPerFrame = avctx->channels ? avctx->channels : 1;
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 74ea2a5be6..0835f38b8d 100644
index 8179fc3c93..5ed95b76e0 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -27,6 +27,9 @@ FFMPEGCONF = \
@@ -25,6 +25,9 @@ FFMPEGCONF = \
--disable-encoder=vorbis \
--disable-decoder=opus \
--enable-libgsm \
......@@ -49,7 +49,7 @@ index 74ea2a5be6..0835f38b8d 100644
--disable-debug \
--disable-avdevice \
--disable-devices \
@@ -244,6 +247,7 @@ endif
@@ -251,6 +254,7 @@ endif
ifdef USE_LIBAV
$(APPLY) $(SRC)/ffmpeg/libav_gsm.patch
endif
......@@ -58,5 +58,5 @@ index 74ea2a5be6..0835f38b8d 100644
.ffmpeg: ffmpeg
--
2.20.1
2.20.1 (Apple Git-117)
From 35debff709b8ca38de9febc7cbe4fec8993009fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sun, 7 Dec 2014 20:02:18 +0100
Subject: [PATCH 06/26] contrib/gcrypt: work-around a libtool limitation
---
contrib/src/gcrypt/rules.mak | 1 +
.../work-around-libtool-limitation.patch | 25 +++++++++++++++++++
2 files changed, 26 insertions(+)
create mode 100644 contrib/src/gcrypt/work-around-libtool-limitation.patch
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index ecc95be7c9..6697e6714f 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -12,6 +12,7 @@ $(TARBALLS)/libgcrypt-$(GCRYPT_VERSION).tar.bz2:
gcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
$(UNPACK)
$(APPLY) $(SRC)/gcrypt/disable-tests-compilation.patch
+ $(APPLY) $(SRC)/gcrypt/work-around-libtool-limitation.patch
$(APPLY) $(SRC)/gcrypt/fix-pthread-detection.patch
$(APPLY) $(SRC)/gcrypt/0001-random-Don-t-assume-that-_WIN64-implies-x86_64.patch
$(APPLY) $(SRC)/gcrypt/0002-aarch64-mpi-Fix-building-the-mpi-aarch64-assembly-fo.patch
diff --git a/contrib/src/gcrypt/work-around-libtool-limitation.patch b/contrib/src/gcrypt/work-around-libtool-limitation.patch
new file mode 100644
index 0000000000..df97ffb488
--- /dev/null
+++ b/contrib/src/gcrypt/work-around-libtool-limitation.patch
@@ -0,0 +1,25 @@
+diff -ru libgcrypt-broken/cipher/Makefile.am libgcrypt/cipher/Makefile.am
+--- libgcrypt-broken/cipher/Makefile.am 2013-11-06 23:05:24.000000000 +0100
++++ libgcrypt/cipher/Makefile.am 2013-11-06 23:21:25.000000000 +0100
+@@ -19,6 +19,8 @@
+
+ # Process this file with automake to produce Makefile.in
+
++LIBTOOL=@LIBTOOL@ --tag=CC
++
+ EXTRA_DIST = Manifest
+
+ # Need to include ../src in addition to top_srcdir because gcrypt.h is
+diff -ru libgcrypt-broken/mpi/Makefile.am libgcrypt/mpi/Makefile.am
+--- libgcrypt-broken/mpi/Makefile.am 2013-11-06 23:05:24.000000000 +0100
++++ libgcrypt/mpi/Makefile.am 2013-11-06 23:22:04.000000000 +0100
+@@ -23,6 +23,9 @@
+
+ # Need to include ../src in addition to top_srcdir because gcrypt.h is
+ # a built header.
++
++LIBTOOL=@LIBTOOL@ --tag=CC
++
+ AM_CPPFLAGS = -I../src -I$(top_srcdir)/src
+ AM_CFLAGS = $(GPG_ERROR_CFLAGS)
+
--
2.20.1
From 2ab5334086120fdff9e6e142e9a3c5f28692b062 Mon Sep 17 00:00:00 2001
From fcab24938b40731c7d8f5475667e14291e7bbc31 Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Fri, 29 Sep 2017 14:49:02 +0200
Subject: [PATCH 10/26] contrib: use live555 version that is compatible with
Subject: [PATCH 06/17] contrib: use live555 version that is compatible with
LGPL2
---
......@@ -18,7 +18,7 @@ index f459fb9d16..02b2a69734 100644
+10846fd6d5482bbea131ae805137077997e9dec242665e3c01d699d5584154c65049e8c520ea855599e554154a148e61fea77b592d97c814a4a98c773658d8f5 live.2016.10.21.tar.gz
\ No newline at end of file
diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index bb1d5655c7..41fc1c6179 100644
index 4f9b70d452..976154312d 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -1,14 +1,12 @@
......@@ -37,7 +37,7 @@ index bb1d5655c7..41fc1c6179 100644
ifeq ($(call need_pkg,"live555"),)
PKGS_FOUND += live555
@@ -92,7 +90,6 @@ endif
@@ -93,7 +91,6 @@ endif
SUBDIRS=groupsock liveMedia UsageEnvironment BasicUsageEnvironment
.live555: live555
......@@ -46,5 +46,5 @@ index bb1d5655c7..41fc1c6179 100644
echo "PREFIX = $(PREFIX)" >> $$subdir/Makefile.head && \
echo "LIBDIR = $(PREFIX)/lib" >> $$subdir/Makefile.head ; done
--
2.20.1
2.20.1 (Apple Git-117)
From d642b417483ca2ea1aaa74bf5c535ae3516665c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sat, 3 Oct 2015 22:45:14 +0200
Subject: [PATCH 07/26] contrib/gcrypt: fix tvOS compilation
---
.../src/gcrypt/fix-sha1-ssse3-for-clang.patch | 16 ++++++++++++++++
contrib/src/gcrypt/rules.mak | 6 ++++++
2 files changed, 22 insertions(+)
create mode 100644 contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
diff --git a/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch b/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
new file mode 100644
index 0000000000..f1d3ccc71f
--- /dev/null
+++ b/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
@@ -0,0 +1,16 @@
+diff -ru libgcrypt/cipher/sha1-ssse3-amd64.S libgcrypt/cipher/sha1-ssse3-amd64.S
+--- libgcrypt/cipher/sha1-ssse3-amd64.S 2014-08-21 14:50:39.000000000 +0200
++++ libgcrypt/cipher/sha1-ssse3-amd64.S 2015-10-03 22:40:21.000000000 +0200
+@@ -217,10 +217,9 @@
+ * _gcry_sha1_transform_amd64_ssse3 (void *ctx, const unsigned char *data)
+ */
+ .text
+-.globl _gcry_sha1_transform_amd64_ssse3
+-.type _gcry_sha1_transform_amd64_ssse3,@function
++.globl __gcry_sha1_transform_amd64_ssse3
+ .align 16
+-_gcry_sha1_transform_amd64_ssse3:
++__gcry_sha1_transform_amd64_ssse3:
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: data (64 bytes)
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index 6697e6714f..ca78585737 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -13,6 +13,7 @@ gcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
$(UNPACK)
$(APPLY) $(SRC)/gcrypt/disable-tests-compilation.patch
$(APPLY) $(SRC)/gcrypt/work-around-libtool-limitation.patch
+ $(APPLY) $(SRC)/gcrypt/fix-sha1-ssse3-for-clang.patch
$(APPLY) $(SRC)/gcrypt/fix-pthread-detection.patch
$(APPLY) $(SRC)/gcrypt/0001-random-Don-t-assume-that-_WIN64-implies-x86_64.patch
$(APPLY) $(SRC)/gcrypt/0002-aarch64-mpi-Fix-building-the-mpi-aarch64-assembly-fo.patch
@@ -47,6 +48,11 @@ GCRYPT_EXTRA_CFLAGS = -fheinous-gnu-extensions
else
GCRYPT_EXTRA_CFLAGS =
endif
+ifdef HAVE_TVOS
+ifeq ($(ARCH), x86_64)
+GCRYPT_CONF += --disable-asm --enable-ciphers=des,rfc2268,arcfour --enable-digests=md5,sha1,rmd160
+endif
+endif
ifdef HAVE_MACOSX
GCRYPT_CONF += --disable-aesni-support
else
--
2.20.1
From 0b0e3f59bd0f86b4080ac7cc86154950af343582 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@feepk.net>
Date: Wed, 17 Jul 2019 10:34:47 +0200
Subject: [PATCH 07/17] tools: fix libtool bootstapping on macOS
---
extras/tools/tools.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 7d677de1d8..937a324331 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -131,7 +131,7 @@ libtool: libtool-$(LIBTOOL_VERSION).tar.gz
$(APPLY) $(TOOLS)/libtool-2.4.6-san.patch
$(APPLY) $(TOOLS)/libtool-2.4.6-clang-libs.patch
$(APPLY) $(TOOLS)/libtool-2.4.6-response-files.patch
- (cd $(UNPACK_DIR) && autoreconf)
+ (cd $(UNPACK_DIR) && autoreconf -fv)
$(MOVE)
.buildlibtool: libtool .automake .help2man
--
2.20.1 (Apple Git-117)
From c2439751018d4181571ac915c49b847192d7f627 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Mon, 12 Sep 2016 17:03:37 +0200
Subject: [PATCH 08/26] contrib/gcrypt: update patches
---
.../src/gcrypt/fix-sha1-ssse3-for-clang.patch | 308 +++++++++++++++++-
.../work-around-libtool-limitation.patch | 16 +-
2 files changed, 310 insertions(+), 14 deletions(-)
diff --git a/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch b/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
index f1d3ccc71f..21d7a30c8d 100644
--- a/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
+++ b/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
@@ -1,16 +1,312 @@
+diff -ru libgcrypt/cipher/arcfour-amd64.S libgcrypt/cipher/arcfour-amd64.S
+--- libgcrypt/cipher/arcfour-amd64.S 2016-03-23 12:59:34.000000000 +0100
++++ libgcrypt/cipher/arcfour-amd64.S 2016-09-13 10:41:44.000000000 +0200
+@@ -19,16 +19,20 @@
+ defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS))
+
+ #ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS
++#ifdef __APPLE__
++# define ELF(...) /*_*/
++#else
+ # define ELF(...) __VA_ARGS__
++#endif
+ #else
+ # define ELF(...) /*_*/
+ #endif
+
+ .text
+ .align 16
+-.globl _gcry_arcfour_amd64
++.globl __gcry_arcfour_amd64
+ ELF(.type _gcry_arcfour_amd64,@function)
+-_gcry_arcfour_amd64:
++__gcry_arcfour_amd64:
+ push %rbp
+ push %rbx
+ mov %rdi, %rbp # key = ARG(key)
+diff -ru libgcrypt/cipher/des-amd64.S libgcrypt/cipher/des-amd64.S
+--- libgcrypt/cipher/des-amd64.S 2016-03-23 12:59:34.000000000 +0100
++++ libgcrypt/cipher/des-amd64.S 2016-09-13 10:44:32.000000000 +0200
+@@ -30,7 +30,11 @@
+ #endif
+
+ #ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS
++#ifdef __APPLE__
++# define ELF(...) /*_*/
++#else
+ # define ELF(...) __VA_ARGS__
++#endif
+ #else
+ # define ELF(...) /*_*/
+ #endif
+@@ -191,10 +195,10 @@
+ movl right##d, 4(io);
+
+ .align 8
+-.globl _gcry_3des_amd64_crypt_block
++.globl __gcry_3des_amd64_crypt_block
+ ELF(.type _gcry_3des_amd64_crypt_block,@function;)
+
+-_gcry_3des_amd64_crypt_block:
++__gcry_3des_amd64_crypt_block:
+ /* input:
+ * %rdi: round keys, CTX
+ * %rsi: dst
+@@ -466,7 +470,7 @@
+
+ .align 8
+ ELF(.type _gcry_3des_amd64_crypt_blk3,@function;)
+-_gcry_3des_amd64_crypt_blk3:
++__gcry_3des_amd64_crypt_blk3:
+ /* input:
+ * %rdi: round keys, CTX
+ * RL0d, RR0d, RL1d, RR1d, RL2d, RR2d: 3 input blocks
+@@ -538,9 +542,9 @@
+ ELF(.size _gcry_3des_amd64_crypt_blk3,.-_gcry_3des_amd64_crypt_blk3;)
+
+ .align 8
+-.globl _gcry_3des_amd64_cbc_dec
++.globl __gcry_3des_amd64_cbc_dec
+ ELF(.type _gcry_3des_amd64_cbc_dec,@function;)
+-_gcry_3des_amd64_cbc_dec:
++__gcry_3des_amd64_cbc_dec:
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (3 blocks)
+@@ -574,7 +578,7 @@
+ bswapl RL2d;
+ bswapl RR2d;
+
+- call _gcry_3des_amd64_crypt_blk3;
++ call __gcry_3des_amd64_crypt_blk3;
+
+ popq %rcx; /*iv*/
+ popq %rdx; /*src*/
+@@ -614,9 +618,9 @@
+ ELF(.size _gcry_3des_amd64_cbc_dec,.-_gcry_3des_amd64_cbc_dec;)
+
+ .align 8
+-.globl _gcry_3des_amd64_ctr_enc
++.globl __gcry_3des_amd64_ctr_enc
+ ELF(.type _gcry_3des_amd64_ctr_enc,@function;)
+-_gcry_3des_amd64_ctr_enc:
++__gcry_3des_amd64_ctr_enc:
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (3 blocks)
+@@ -655,7 +659,7 @@
+ /* store new IV */
+ movq RT0, (RW2);
+
+- call _gcry_3des_amd64_crypt_blk3;
++ call __gcry_3des_amd64_crypt_blk3;
+
+ popq %rdx; /*src*/
+ popq %rsi; /*dst*/
+@@ -692,9 +696,9 @@
+ ELF(.size _gcry_3des_amd64_cbc_dec,.-_gcry_3des_amd64_cbc_dec;)
+
+ .align 8
+-.globl _gcry_3des_amd64_cfb_dec
++.globl __gcry_3des_amd64_cfb_dec
+ ELF(.type _gcry_3des_amd64_cfb_dec,@function;)
+-_gcry_3des_amd64_cfb_dec:
++__gcry_3des_amd64_cfb_dec:
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (3 blocks)
+@@ -731,7 +735,7 @@
+ movq 4 * 4(%rdx), RW0;
+ movq RW0, (RW2);
+
+- call _gcry_3des_amd64_crypt_blk3;
++ call __gcry_3des_amd64_crypt_blk3;
+
+ popq %rdx; /*src*/
+ popq %rsi; /*dst*/
+diff -ru libgcrypt/cipher/poly1305-avx2-amd64.S libgcrypt/cipher/poly1305-avx2-amd64.S
+--- libgcrypt/cipher/poly1305-avx2-amd64.S 2016-03-23 12:59:34.000000000 +0100
++++ libgcrypt/cipher/poly1305-avx2-amd64.S 2016-09-13 10:43:05.000000000 +0200
+@@ -30,7 +30,11 @@
+ defined(ENABLE_AVX2_SUPPORT)
+
+ #ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS
++#ifdef __APPLE__
++# define ELF(...) /*_*/
++#else
+ # define ELF(...) __VA_ARGS__
++#endif
+ #else
+ # define ELF(...) /*_*/
+ #endif
+@@ -40,9 +44,9 @@
+
+
+ .align 8
+-.globl _gcry_poly1305_amd64_avx2_init_ext
++.globl __gcry_poly1305_amd64_avx2_init_ext
+ ELF(.type _gcry_poly1305_amd64_avx2_init_ext,@function;)
+-_gcry_poly1305_amd64_avx2_init_ext:
++__gcry_poly1305_amd64_avx2_init_ext:
+ .Lpoly1305_init_ext_avx2_local:
+ xor %edx, %edx
+ vzeroupper
+@@ -403,9 +407,9 @@
+
+
+ .align 8
+-.globl _gcry_poly1305_amd64_avx2_blocks
++.globl __gcry_poly1305_amd64_avx2_blocks
+ ELF(.type _gcry_poly1305_amd64_avx2_blocks,@function;)
+-_gcry_poly1305_amd64_avx2_blocks:
++__gcry_poly1305_amd64_avx2_blocks:
+ .Lpoly1305_blocks_avx2_local: