瀏覽代碼

MobileVLCKit: add patches against vlc.git from ios.git

Felix Paul Kühne 11 年之前
父節點
當前提交
75de502ca2
共有 17 個文件被更改,包括 1178 次插入0 次删除
  1. 69 0
      MobileVLCKit/patches/0001-arm_neon-added-function-macro-to-handle-the-undersco.patch
  2. 208 0
      MobileVLCKit/patches/0002-arm_neon-use-a-macro-to-fix-compilation-for-iOS.patch
  3. 86 0
      MobileVLCKit/patches/0003-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch
  4. 52 0
      MobileVLCKit/patches/0004-contrib-ebml-mkv-compile-with-hidden-symbols-on-iOS.patch
  5. 36 0
      MobileVLCKit/patches/0005-posix-thread-add-a-hack-to-work-around-crashes-when-.patch
  6. 87 0
      MobileVLCKit/patches/0006-freetype-added-a-fake-font-lookup-mechanism-for-iOS-.patch
  7. 66 0
      MobileVLCKit/patches/0007-libass-fix-text-rendering-on-iOS-by-providing-a-font.patch
  8. 25 0
      MobileVLCKit/patches/0008-freetype-fix-corner-case-crash.patch
  9. 67 0
      MobileVLCKit/patches/0009-io-implement-network-timeout-default-60s.patch
  10. 24 0
      MobileVLCKit/patches/0010-deinterlace-added-a-hack-to-work-around-a-libtool-bu.patch
  11. 100 0
      MobileVLCKit/patches/0011-contrib-png-fix-ARM-assembly-for-iOS.patch
  12. 63 0
      MobileVLCKit/patches/0012-contrib-add-arch-option-for-platforms-where-the-arch.patch
  13. 25 0
      MobileVLCKit/patches/0013-extras-deploy-arch-option-for-iOS.patch
  14. 39 0
      MobileVLCKit/patches/0014-contrib-png-fix-compilation-for-arm64-which-is-unkno.patch
  15. 28 0
      MobileVLCKit/patches/0015-contrib-speex-fix-compilation-for-arm64.patch
  16. 51 0
      MobileVLCKit/patches/0016-contrib-flac-fix-compilation-with-clang-5.0.patch
  17. 152 0
      MobileVLCKit/patches/0017-contrib-gcrypt-use-git-version-on-iOS.patch

+ 69 - 0
MobileVLCKit/patches/0001-arm_neon-added-function-macro-to-handle-the-undersco.patch

@@ -0,0 +1,69 @@
+From 4599c045a12463ba244bee55e05a8014f6dd4b63 Mon Sep 17 00:00:00 2001
+From: David Geldreich <david.geldreich@free.fr>
+Date: Fri, 20 Apr 2012 16:41:19 +0200
+Subject: [PATCH 01/17] arm_neon: added function macro to handle the underscore
+ prefix for the iOS ARM ABI
+
+---
+ modules/arm_neon/asm.S | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 modules/arm_neon/asm.S
+
+diff --git a/modules/arm_neon/asm.S b/modules/arm_neon/asm.S
+new file mode 100644
+index 0000000..d853255
+--- /dev/null
++++ b/modules/arm_neon/asm.S
+@@ -0,0 +1,49 @@
++@*****************************************************************************
++@ asm.S : defines and macros
++@*****************************************************************************
++@ Copyright (C) 2012 David Geldreich <david.geldreich at free.fr>
++@
++@ This program is free software; you can redistribute it and/or modify
++@ it under the terms of the GNU General Public License as published by
++@ the Free Software Foundation; either version 2 of the License, or
++@ (at your option) any later version.
++@
++@ This program is distributed in the hope that it will be useful,
++@ but WITHOUT ANY WARRANTY; without even the implied warranty of
++@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++@ GNU General Public License for more details.
++@
++@ You should have received a copy of the GNU General Public License
++@ along with this program; if not, write to the Free Software Foundation,
++@ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
++@****************************************************************************/
++
++#ifdef __APPLE__
++#   define EXTERN_ASM _
++#else
++#   define EXTERN_ASM
++#endif
++
++#ifdef __ELF__
++#   define ELF
++#else
++#   define ELF @
++#endif
++
++.macro  function name, export=0
++    .macro endfunc
++ELF     .size   \name, . - \name
++        .endfunc
++        .purgem endfunc
++    .endm
++        .text
++        .align          2
++    .if \export
++        .global EXTERN_ASM\name
++EXTERN_ASM\name:
++    .endif
++ELF     .type   \name, %function
++        .func   \name
++\name:
++.endm
++
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 208 - 0
MobileVLCKit/patches/0002-arm_neon-use-a-macro-to-fix-compilation-for-iOS.patch

@@ -0,0 +1,208 @@
+From ab28b1dc53049462c1d393ebefba8e0d52041076 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Fri, 10 Aug 2012 16:01:49 +0200
+Subject: [PATCH 02/17] arm_neon: use a macro to fix compilation for iOS
+
+---
+ modules/arm_neon/amplify.S              |  9 +++---
+ modules/arm_neon/simple_channel_mixer.S | 57 +++++++++++++++------------------
+ 2 files changed, 31 insertions(+), 35 deletions(-)
+
+diff --git a/modules/arm_neon/amplify.S b/modules/arm_neon/amplify.S
+index 5938118..578f972 100644
+--- a/modules/arm_neon/amplify.S
++++ b/modules/arm_neon/amplify.S
+@@ -18,6 +18,8 @@
+  @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+  @****************************************************************************/
+ 
++#include "asm.S"
++
+ 	.syntax	unified
+ 	.arm
+ 	.fpu	neon
+@@ -26,10 +28,8 @@
+ #define	DST	r0
+ #define	SRC	r1
+ #define	SIZE	r2
+-	.align 2
+-	.global amplify_float_arm_neon
+-	.type	amplify_float_arm_neon, %function
+-amplify_float_arm_neon:
++
++function amplify_float_arm_neon, export=1
+ 	cmp		SIZE,	#0
+ 	bxeq		lr
+ #ifdef __ARM_PCS
+@@ -79,3 +79,4 @@ amplify_float_arm_neon:
+ 4:	vst1.f32	{d20-d21},	[DST,:128]!
+ 5:	vst1.f32	{d16-d17},	[DST,:128]!
+ 	bx		lr
++endfunc
+diff --git a/modules/arm_neon/simple_channel_mixer.S b/modules/arm_neon/simple_channel_mixer.S
+index dcc51ed..4722be4 100644
+--- a/modules/arm_neon/simple_channel_mixer.S
++++ b/modules/arm_neon/simple_channel_mixer.S
+@@ -19,6 +19,8 @@
+  @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+  @****************************************************************************/
+ 
++#include "asm.S"
++
+ 	.fpu neon
+ 	.text
+ 	.align 2
+@@ -34,9 +36,8 @@ coeff_7to2:
+ 	.float 0.5
+ 	.float 0.25
+ 	.float 0.25
+-	.global convert_7to2_neon_asm
+-	.type	convert_7to2_neon_asm, %function
+-convert_7to2_neon_asm:
++
++function convert_7to2_neon_asm, export=1
+ 	push {r4,lr}
+ 
+ 	adr COEFF, coeff_7to2
+@@ -63,16 +64,15 @@ convert_7to2_neon_asm:
+ 	bne 0b
+ 
+ 	pop {r4,pc}
+-
++endfunc
+ 
+ coeff_5to2:
+ 	.float 0.5
+ 	.float 0.5
+ 	.float 0.33
+ 	.float 0.33
+-	.global convert_5to2_neon_asm
+-	.type	convert_5to2_neon_asm, %function
+-convert_5to2_neon_asm:
++
++function convert_5to2_neon_asm, export=1
+ 	push {r4,lr}
+ 
+ 	adr COEFF, coeff_5to2
+@@ -95,14 +95,13 @@ convert_5to2_neon_asm:
+ 	bne 0b
+ 
+ 	pop {r4,pc}
+-
++endfunc
+ 
+ coeff_4to2:
+ 	.float 0.5
+ 	.float 0.5
+-	.global convert_4to2_neon_asm
+-	.type	convert_4to2_neon_asm, %function
+-convert_4to2_neon_asm:
++
++function convert_4to2_neon_asm, export=1
+ 	push {r4,lr}
+ 
+ 	adr COEFF, coeff_4to2
+@@ -119,14 +118,13 @@ convert_4to2_neon_asm:
+ 	bne 0b
+ 
+ 	pop {r4,pc}
+-
++endfunc
+ 
+ coeff_3to2:
+ 	.float 0.5
+ 	.float 0.5
+-	.global convert_3to2_neon_asm
+-	.type	convert_3to2_neon_asm, %function
+-convert_3to2_neon_asm:
++
++function convert_3to2_neon_asm, export=1
+ 	push {r4,lr}
+ 
+ 	adr COEFF, coeff_3to2
+@@ -147,16 +145,15 @@ convert_3to2_neon_asm:
+ 	bne 0b
+ 
+ 	pop {r4,pc}
+-
++endfunc
+ 
+ coeff_7to1:
+ 	.float 0.25
+ 	.float 0.25
+ 	.float 0.125
+ 	.float 0.125
+-	.global convert_7to1_neon_asm
+-	.type	convert_7to1_neon_asm, %function
+-convert_7to1_neon_asm:
++
++function convert_7to1_neon_asm, export=1
+ 	push {r4,lr}
+ 
+ 	adr COEFF, coeff_7to1
+@@ -181,16 +178,15 @@ convert_7to1_neon_asm:
+ 	bne 0b
+ 
+ 	pop {r4,pc}
+-
++endfunc
+ 
+ coeff_5to1:
+ 	.float 0.25
+ 	.float 0.25
+ 	.float 0.16666667
+ 	.float 0.16666667
+-	.global convert_5to1_neon_asm
+-	.type	convert_5to1_neon_asm, %function
+-convert_5to1_neon_asm:
++
++function convert_5to1_neon_asm, export=1
+ 	push {r4,lr}
+ 
+ 	adr COEFF, coeff_5to1
+@@ -212,16 +208,15 @@ convert_5to1_neon_asm:
+ 	bne 0b
+ 
+ 	pop {r4,pc}
+-
++endfunc
+ 
+ coeff_7to4:
+ 	.float 0.5
+ 	.float 0.5
+ 	.float 0.16666667
+ 	.float 0.16666667
+-	.global convert_7to4_neon_asm
+-	.type	convert_7to4_neon_asm, %function
+-convert_7to4_neon_asm:
++
++function convert_7to4_neon_asm, export=1
+ 	push {r4,lr}
+ 
+ 	adr COEFF, coeff_7to4
+@@ -247,14 +242,13 @@ convert_7to4_neon_asm:
+ 	bne 0b
+ 
+ 	pop {r4,pc}
+-
++endfunc
+ 
+ coeff_5to4:
+ 	.float 0.5
+ 	.float 0.5
+-	.global convert_5to4_neon_asm
+-	.type	convert_5to4_neon_asm, %function
+-convert_5to4_neon_asm:
++
++function convert_5to4_neon_asm, export=1
+ 	push {r4,lr}
+ 
+ 	adr COEFF, coeff_5to4
+@@ -277,3 +271,4 @@ convert_5to4_neon_asm:
+ 	bne 0b
+ 
+ 	pop {r4,pc}
++endfunc
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 86 - 0
MobileVLCKit/patches/0003-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch

@@ -0,0 +1,86 @@
+From 63555ddccf6a0c968e8fb61917166b23c1c63328 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Fri, 10 Aug 2012 16:02:07 +0200
+Subject: [PATCH 03/17] deinterlace/merge: use a macro to fix compilation for
+ iOS
+
+---
+ modules/video_filter/deinterlace/merge_arm.S | 26 ++++++++++----------------
+ 1 file changed, 10 insertions(+), 16 deletions(-)
+
+diff --git a/modules/video_filter/deinterlace/merge_arm.S b/modules/video_filter/deinterlace/merge_arm.S
+index dd77902..03e5042 100644
+--- a/modules/video_filter/deinterlace/merge_arm.S
++++ b/modules/video_filter/deinterlace/merge_arm.S
+@@ -18,6 +18,8 @@
+  @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+  @****************************************************************************/
+ 
++#include "../../arm_neon/asm.S"
++
+ 	.syntax	unified
+ 	.arm
+ 	.arch	armv6
+@@ -29,11 +31,8 @@
+ #define	SRC2	r2
+ #define	SIZE	r3
+ 
+-	.align 2
+-	.global merge8_arm_neon
+-	.type	merge8_arm_neon, %function
+ 	@ NOTE: Offset and pitch must be multiple of 16-bytes in VLC.
+-merge8_arm_neon:
++function merge8_arm_neon, export=1
+ 	cmp		SIZE,	#64
+ 	blo		2f
+ 1:
+@@ -70,11 +69,9 @@ merge8_arm_neon:
+ 	vhadd.u8	q0,	q0,	q8
+ 	vst1.u8		{q0},		[DEST,:128]!
+ 	bx		lr
++endfunc
+ 
+-	.align 2
+-	.global merge16_arm_neon
+-	.type	merge16_arm_neon, %function
+-merge16_arm_neon:
++function merge16_arm_neon, export=1
+ 	cmp		SIZE,	#64
+ 	blo		2f
+ 1:
+@@ -111,11 +108,9 @@ merge16_arm_neon:
+ 	vhadd.u16	q0,	q0,	q8
+ 	vst1.u16	{q0},		[DEST,:128]!
+ 	bx		lr
++endfunc
+ 
+-	.align 2
+-	.global merge8_armv6
+-	.type	merge8_armv6, %function
+-merge8_armv6:
++function merge8_armv6, export=1
+ 	push		{r4-r9,lr}
+ 1:
+ 	pld		[SRC1, #64]
+@@ -133,11 +128,9 @@ merge8_armv6:
+ 	stm		DEST!,	{r6-r7}
+ 	popeq		{r4-r9,pc}
+ 	b		1b
++endfunc
+ 
+-	.align 2
+-	.global merge16_armv6
+-	.type	merge16_armv6, %function
+-merge16_armv6:
++function merge16_armv6, export=1
+ 	push		{r4-r9,lr}
+ 1:
+ 	pld		[SRC1, #64]
+@@ -155,3 +148,4 @@ merge16_armv6:
+ 	stm		DEST!,	{r6-r7}
+ 	popeq		{r4-r9,pc}
+ 	b		1b
++endfunc
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 52 - 0
MobileVLCKit/patches/0004-contrib-ebml-mkv-compile-with-hidden-symbols-on-iOS.patch

@@ -0,0 +1,52 @@
+From 26f7bdf0222e79880e36e962fe8fda4d37e759e4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Sat, 11 Aug 2012 13:29:25 +0200
+Subject: [PATCH 04/17] contrib/ebml+mkv: compile with hidden symbols on iOS
+
+---
+ contrib/src/ebml/rules.mak     | 7 +++++--
+ contrib/src/matroska/rules.mak | 6 +++++-
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/contrib/src/ebml/rules.mak b/contrib/src/ebml/rules.mak
+index 1d01818..a36727c 100644
+--- a/contrib/src/ebml/rules.mak
++++ b/contrib/src/ebml/rules.mak
+@@ -16,8 +16,11 @@ libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml
+ 	$(MOVE)
+ 
+ # libebml requires exceptions
+-EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions" \
+-					CPPFLAGS=""
++ifdef HAVE_IOS
++EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions -fvisibility=hidden" CPPFLAGS=""
++else
++EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions" CPPFLAGS=""
++endif
+ 
+ .ebml: libebml
+ ifdef HAVE_WIN32
+diff --git a/contrib/src/matroska/rules.mak b/contrib/src/matroska/rules.mak
+index 336e001..40dfb1e 100644
+--- a/contrib/src/matroska/rules.mak
++++ b/contrib/src/matroska/rules.mak
+@@ -17,11 +17,15 @@ libmatroska: libmatroska-$(MATROSKA_VERSION).tar.bz2 .sum-matroska
+ 	$(APPLY) $(SRC)/matroska/matroska-pic.patch
+ 	$(MOVE)
+ 
++ifdef HAVE_IOS
++MATROSKA_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
++endif
++
+ .matroska: libmatroska
+ ifdef HAVE_WIN32
+ 	cd $< && $(MAKE) -C make/mingw32 prefix="$(PREFIX)" $(HOSTVARS) SHARED=no EBML_DLL=no libmatroska.a
+ else
+-	cd $< && $(MAKE) -C make/linux prefix="$(PREFIX)" $(HOSTVARS) staticlib
++	cd $< && $(MAKE) -C make/linux prefix="$(PREFIX)" $(HOSTVARS) $(MATROSKA_EXTRA_FLAGS) staticlib
+ endif
+ 	cd $< && $(MAKE) -C make/linux install_staticlib install_headers prefix="$(PREFIX)" $(HOSTVARS)
+ 	$(RANLIB) "$(PREFIX)/lib/libmatroska.a"
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 36 - 0
MobileVLCKit/patches/0005-posix-thread-add-a-hack-to-work-around-crashes-when-.patch

@@ -0,0 +1,36 @@
+From 0cb46acfbc9d388fa0a11116e4274f9257aeb9a8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Thu, 18 Oct 2012 18:38:17 +0200
+Subject: [PATCH 05/17] posix/thread: add a hack to work-around crashes when
+ using the buggy iOS 6 runtime
+
+---
+ src/posix/thread.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/posix/thread.c b/src/posix/thread.c
+index 514f592..6a95bb0 100644
+--- a/src/posix/thread.c
++++ b/src/posix/thread.c
+@@ -355,6 +355,18 @@ void vlc_cond_init_daytime (vlc_cond_t *p_condvar)
+ void vlc_cond_destroy (vlc_cond_t *p_condvar)
+ {
+     int val = pthread_cond_destroy( p_condvar );
++
++#ifdef __APPLE__
++    if (val != 0) {
++        printf("pthread_cond_destroy returned %i\n", val);
++
++        if (val == EBUSY) {
++            printf("this is a EBUSY!\n");
++            return;
++        }
++    }
++#endif
++
+     VLC_THREAD_ASSERT ("destroying condition");
+ }
+ 
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 87 - 0
MobileVLCKit/patches/0006-freetype-added-a-fake-font-lookup-mechanism-for-iOS-.patch

@@ -0,0 +1,87 @@
+From 9b2e1e55528bcc17ff7cc87e395e741dffe5a31f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Fri, 19 Jul 2013 18:38:41 +0700
+Subject: [PATCH 06/17] freetype: added a fake font lookup mechanism for iOS to
+ use the packaged demo fonts
+
+---
+ modules/text_renderer/freetype.c | 42 ++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 42 insertions(+)
+
+diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
+index 05fa2a2..9a00739 100644
+--- a/modules/text_renderer/freetype.c
++++ b/modules/text_renderer/freetype.c
+@@ -106,6 +106,9 @@
+ #include <TargetConditionals.h>
+ #if !TARGET_OS_IPHONE
+ #include <Carbon/Carbon.h>
++#else
++#include <CoreFoundation/CoreFoundation.h>
++#include <vlc_url.h>
+ #endif
+ #include <sys/param.h>                         /* for MAXPATHLEN */
+ #undef HAVE_FONTCONFIG
+@@ -807,6 +810,40 @@ static char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
+ 
+     return psz_path;
+ }
++#else
++static char *iOSFake_Select( filter_t *p_filter, bool b_monospace, bool b_bold,
++                             bool b_italic )
++{
++    // included for future implementation
++    VLC_UNUSED(p_filter);
++    VLC_UNUSED(b_bold);
++    VLC_UNUSED(b_italic);
++    VLC_UNUSED(b_monospace);
++
++    CFURLRef fileURL;
++    fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), b_monospace ?
++                                      CFSTR("OpenSans-Regular.ttf") : CFSTR("SourceCodePro-Regular.ttf"),
++                                      NULL,
++                                      NULL);
++    CFStringRef urlString = CFURLCopyFileSystemPath(fileURL, kCFURLPOSIXPathStyle);
++    CFRelease(fileURL);
++
++    if (!urlString)
++        return NULL;
++
++    CFIndex length = CFStringGetLength(urlString);
++    if (!length)
++        return NULL;
++    length++;
++
++    char *psz_path = (char *)malloc(length);
++    CFStringGetCString(urlString, psz_path, length, kCFStringEncodingUTF8);
++    CFRelease(urlString);
++
++    psz_path = strdup(psz_path);
++
++    return psz_path;
++}
+ #endif
+ #endif
+ 
+@@ -1988,6 +2025,8 @@ static FT_Face LoadFace( filter_t *p_filter,
+ #elif defined( __APPLE__ )
+ #if !TARGET_OS_IPHONE
+         psz_fontfile = MacLegacy_Select( p_filter, p_style->psz_fontname, false, false, -1, &i_idx );
++#else
++        psz_fontfile = iOSFake_Select( p_filter, false, false, false );
+ #endif
+ #elif defined( _WIN32 )
+         psz_fontfile = Win32_Select( p_filter,
+@@ -2890,6 +2929,9 @@ static int Create( vlc_object_t *p_this )
+ #elif defined(__APPLE__)
+ #if !TARGET_OS_IPHONE
+     psz_fontfile = MacLegacy_Select( p_filter, psz_fontfamily, false, false, 0, &fontindex );
++#else
++    psz_fontfile = iOSFake_Select( p_filter, false, false, false );
++    psz_monofontfile = iOSFake_Select( p_filter, true, false, false );
+ #endif
+ #elif defined(_WIN32)
+     psz_fontfile = Win32_Select( p_filter, psz_fontfamily, false, false,
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 66 - 0
MobileVLCKit/patches/0007-libass-fix-text-rendering-on-iOS-by-providing-a-font.patch

@@ -0,0 +1,66 @@
+From 1172ff072bfd48a998ab68983dbc185690bdb07b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Wed, 29 May 2013 13:25:54 +0200
+Subject: [PATCH 07/17] libass: fix text rendering on iOS by providing a font
+ lookup mechanism for the font shipped with Aspen
+
+---
+ modules/codec/libass.c | 35 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
+
+diff --git a/modules/codec/libass.c b/modules/codec/libass.c
+index aa38f1b..38961bc 100644
+--- a/modules/codec/libass.c
++++ b/modules/codec/libass.c
+@@ -29,6 +29,13 @@
+ #   include "config.h"
+ #endif
+ 
++#if defined (__APPLE__)
++#include <TargetConditionals.h>
++#if TARGET_OS_IPHONE
++#include <CoreFoundation/CoreFoundation.h>
++#endif
++#endif
++
+ #include <string.h>
+ #include <limits.h>
+ #include <assert.h>
+@@ -213,6 +220,34 @@ static int Create( vlc_object_t *p_this )
+ #if defined( __ANDROID__ )
+     const char *psz_font = "/system/fonts/DroidSans-Bold.ttf";
+     const char *psz_family = "Droid Sans Bold";
++#elif defined (__APPLE__)
++#if !TARGET_OS_IPHONE
++    const char *psz_font = NULL; /* We don't ship a default font with VLC */
++    const char *psz_family = "Arial"; /* Use Arial if we can't find anything more suitable */
++#else
++    CFURLRef fileURL;
++    fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("OpenSans-Regular.ttf"),
++                                      NULL,
++                                      NULL);
++    CFStringRef urlString = CFURLCopyFileSystemPath(fileURL, kCFURLPOSIXPathStyle);
++    CFRelease(fileURL);
++
++    if (!urlString)
++        return VLC_EGENERIC;
++
++    CFIndex length = CFStringGetLength(urlString);
++    if (!length)
++        return VLC_EGENERIC;
++    length++;
++
++    char *psz_path = (char *)malloc(length);
++    CFStringGetCString(urlString, psz_path, length, kCFStringEncodingUTF8);
++    CFRelease(urlString);
++
++    const char *psz_font = (const char *)strdup(psz_path);
++    free(psz_path);
++    const char *psz_family = "Open Sans";
++#endif
+ #else
+     const char *psz_font = NULL; /* We don't ship a default font with VLC */
+     const char *psz_family = "Arial"; /* Use Arial if we can't find anything more suitable */
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 25 - 0
MobileVLCKit/patches/0008-freetype-fix-corner-case-crash.patch

@@ -0,0 +1,25 @@
+From 4a0b343a4c84cc148cc5afa8805fc430741a0fee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Sun, 21 Jul 2013 18:18:33 +0200
+Subject: [PATCH 08/17] freetype: fix corner-case crash
+
+---
+ modules/text_renderer/freetype.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
+index 9a00739..c7f3c1f 100644
+--- a/modules/text_renderer/freetype.c
++++ b/modules/text_renderer/freetype.c
+@@ -825,6 +825,8 @@ static char *iOSFake_Select( filter_t *p_filter, bool b_monospace, bool b_bold,
+                                       CFSTR("OpenSans-Regular.ttf") : CFSTR("SourceCodePro-Regular.ttf"),
+                                       NULL,
+                                       NULL);
++    if (!fileURL)
++        return NULL;
+     CFStringRef urlString = CFURLCopyFileSystemPath(fileURL, kCFURLPOSIXPathStyle);
+     CFRelease(fileURL);
+ 
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 67 - 0
MobileVLCKit/patches/0009-io-implement-network-timeout-default-60s.patch

@@ -0,0 +1,67 @@
+From 2c7bd9c90f1b043c5019367f81640a0c8c35543d Mon Sep 17 00:00:00 2001
+From: Gleb Pinigin <gpinigin@gmail.com>
+Date: Sun, 28 Jul 2013 18:32:51 +0700
+Subject: [PATCH 09/17] io: implement network timeout(default 60s)
+
+---
+ src/network/io.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/src/network/io.c b/src/network/io.c
+index dc5ef12..effaf15 100644
+--- a/src/network/io.c
++++ b/src/network/io.c
+@@ -33,6 +33,7 @@
+ #endif
+ 
+ #include <vlc_common.h>
++#include <vlc_access.h>
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -73,6 +74,9 @@
+ # define SOL_DCCP 269
+ #endif
+ 
++#define MAX_TIMEOUT 60000
++#define POLL_TIMEOUT 10000
++
+ #include "libvlc.h" /* vlc_object_waitpipe */
+ 
+ extern int rootwrap_bind (int family, int socktype, int protocol,
+@@ -267,6 +271,7 @@ net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
+     ufd[1].fd = vlc_object_waitpipe (p_this);
+     ufd[1].events = POLLIN;
+ 
++    int i_timepassed = 0;
+     size_t i_total = 0;
+     do
+     {
+@@ -288,6 +293,13 @@ net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
+ 
+         if (n < 0)
+         {
++            if (i_timepassed >= MAX_TIMEOUT && i_total == 0)
++            {
++                access_t *p_access = (access_t *)p_this;
++                p_access->info.b_eof = true;
++                goto error;
++            }
++
+             switch (net_errno)
+             {
+                 case EAGAIN: /* no data */
+@@ -326,8 +338,9 @@ net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
+             return -1;
+         }
+ 
++        i_timepassed += POLL_TIMEOUT;
+         /* Wait for more data */
+-        if (poll (ufd, sizeof (ufd) / sizeof (ufd[0]), -1) < 0)
++        if (poll (ufd, sizeof (ufd) / sizeof (ufd[0]), POLL_TIMEOUT) < 0)
+         {
+             if (errno == EINTR)
+                 continue;
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 24 - 0
MobileVLCKit/patches/0010-deinterlace-added-a-hack-to-work-around-a-libtool-bu.patch

@@ -0,0 +1,24 @@
+From ad8a143c606423970d90252a8677e6ef84b477a2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Fri, 10 Aug 2012 16:02:33 +0200
+Subject: [PATCH 10/17] deinterlace: added a hack to work-around a libtool bug
+
+---
+ modules/video_filter/Modules.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/modules/video_filter/Modules.am b/modules/video_filter/Modules.am
+index 6bb5eac..acfe695 100644
+--- a/modules/video_filter/Modules.am
++++ b/modules/video_filter/Modules.am
+@@ -1,3 +1,7 @@
++# When using a specific AS tool instead of gcc libtool goes mad
++# without this. (This is the case with iOS).
++LIBTOOL=@LIBTOOL@ --tag=CC
++
+ SOURCES_mosaic = mosaic.c mosaic.h
+ SOURCES_transform = transform.c
+ SOURCES_invert = invert.c
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 100 - 0
MobileVLCKit/patches/0011-contrib-png-fix-ARM-assembly-for-iOS.patch

@@ -0,0 +1,100 @@
+From b772c77fa3003cf5927c4b4855fd95a25004baef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20Ku=CC=88hne?= <fkuehne@videolan.org>
+Date: Sat, 20 Jul 2013 23:35:05 +0200
+Subject: [PATCH 11/17] contrib/png: fix ARM assembly for iOS
+
+---
+ contrib/src/png/ios.patch | 66 +++++++++++++++++++++++++++++++++++++++++++++++
+ contrib/src/png/rules.mak |  3 +++
+ 2 files changed, 69 insertions(+)
+ create mode 100644 contrib/src/png/ios.patch
+
+diff --git a/contrib/src/png/ios.patch b/contrib/src/png/ios.patch
+new file mode 100644
+index 0000000..f4b8bc1
+--- /dev/null
++++ b/contrib/src/png/ios.patch
+@@ -0,0 +1,66 @@
++diff -ru png/arm/filter_neon.S png-fixed/arm/filter_neon.S
++--- png/arm/filter_neon.S	2013-06-27 05:25:41.000000000 +0200
+++++ png-fixed/arm/filter_neon.S	2013-07-20 23:33:23.000000000 +0200
++@@ -46,7 +46,7 @@
++ \name:
++ .endm
++ 
++-func    png_read_filter_row_sub4_neon, export=1
+++func    _png_read_filter_row_sub4_neon, export=1
++         ldr             r3,  [r0, #4]           @ rowbytes
++         vmov.i8         d3,  #0
++ 1:
++@@ -62,7 +62,7 @@
++         bx              lr
++ endfunc
++ 
++-func    png_read_filter_row_sub3_neon, export=1
+++func    _png_read_filter_row_sub3_neon, export=1
++         ldr             r3,  [r0, #4]           @ rowbytes
++         vmov.i8         d3,  #0
++         mov             r0,  r1
++@@ -88,7 +88,7 @@
++         bx              lr
++ endfunc
++ 
++-func    png_read_filter_row_up_neon, export=1
+++func    _png_read_filter_row_up_neon, export=1
++         ldr             r3,  [r0, #4]           @ rowbytes
++ 1:
++         vld1.8          {q0}, [r1,:128]
++@@ -101,7 +101,7 @@
++         bx              lr
++ endfunc
++ 
++-func    png_read_filter_row_avg4_neon, export=1
+++func    _png_read_filter_row_avg4_neon, export=1
++         ldr             r12, [r0, #4]           @ rowbytes
++         vmov.i8         d3,  #0
++ 1:
++@@ -122,7 +122,7 @@
++         bx              lr
++ endfunc
++ 
++-func    png_read_filter_row_avg3_neon, export=1
+++func    _png_read_filter_row_avg3_neon, export=1
++         push            {r4,lr}
++         ldr             r12, [r0, #4]           @ rowbytes
++         vmov.i8         d3,  #0
++@@ -173,7 +173,7 @@
++         vbsl            \rx, \ra, d28
++ .endm
++ 
++-func    png_read_filter_row_paeth4_neon, export=1
+++func    _png_read_filter_row_paeth4_neon, export=1
++         ldr             r12, [r0, #4]           @ rowbytes
++         vmov.i8         d3,  #0
++         vmov.i8         d20, #0
++@@ -196,7 +196,7 @@
++         bx              lr
++ endfunc
++ 
++-func    png_read_filter_row_paeth3_neon, export=1
+++func    _png_read_filter_row_paeth3_neon, export=1
++         push            {r4,lr}
++         ldr             r12, [r0, #4]           @ rowbytes
++         vmov.i8         d3,  #0
+diff --git a/contrib/src/png/rules.mak b/contrib/src/png/rules.mak
+index d1adc34..701e3a8 100644
+--- a/contrib/src/png/rules.mak
++++ b/contrib/src/png/rules.mak
+@@ -17,6 +17,9 @@ png: libpng-$(PNG_VERSION).tar.xz .sum-png
+ 	$(APPLY) $(SRC)/png/winrt.patch
+ 	$(APPLY) $(SRC)/png/bins.patch
+ 	$(APPLY) $(SRC)/png/automake.patch
++ifdef HAVE_IOS
++	$(APPLY) $(SRC)/png/ios.patch
++endif
+ 	$(MOVE)
+ 
+ DEPS_png = zlib $(DEPS_zlib)
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 63 - 0
MobileVLCKit/patches/0012-contrib-add-arch-option-for-platforms-where-the-arch.patch

@@ -0,0 +1,63 @@
+From 7636f3d41ba1efae6428cffaee5dd5178e46a605 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Thu, 3 Oct 2013 18:27:43 +0200
+Subject: [PATCH 12/17] contrib: add arch option for platforms where the arch
+ triplet would be ambigous
+
+---
+ contrib/bootstrap | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/bootstrap b/contrib/bootstrap
+index e5c7022..cc170a2 100755
+--- a/contrib/bootstrap
++++ b/contrib/bootstrap
+@@ -30,6 +30,7 @@ usage()
+ 	echo "  --disable-sout   configure to not build stream output packages"
+ 	echo "  --enable-small   optimize libraries for size with slight speed decrease [DANGEROUS]"
+ 	echo "  --disable-gpl    configure to not build viral GPL code"
++	echo "  --arch=ARCH      configure to set the target architecture if host triple is ambigous"
+ }
+ 
+ BUILD=
+@@ -40,6 +41,7 @@ PKGS_DISABLE=
+ BUILD_ENCODERS="1"
+ BUILD_DISCS="1"
+ GPL="1"
++ARCH=
+ 
+ if test ! -f "../../contrib/src/main.mak"
+ then
+@@ -81,6 +83,9 @@ do
+ 		--enable-*)
+ 			PKGS_ENABLE="${PKGS_ENABLE} ${1#--enable-}"
+ 			;;
++		--arch=*)
++			ARCH="${1#--arch=}"
++			;;
+ 		*)
+ 			echo "Unrecognized options $1"
+ 			usage
+@@ -188,6 +193,7 @@ test -z "$BUILD_DISCS" || add_make_enabled "BUILD_DISCS"
+ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
+ test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
+ test -z "$GPL" || add_make_enabled "GPL"
++test -z "$ARCH" || add_make "ARCH := $ARCH"
+ 
+ #
+ # Checks
+@@ -200,7 +206,10 @@ case "${OS}" in
+ 			check_macosx_sdk
+ 			add_make_enabled "HAVE_MACOSX" "HAVE_DARWIN_OS" "HAVE_BSD"
+ 		else
+-			add_make_enabled "HAVE_IOS" "HAVE_DARWIN_OS" "HAVE_BSD" "HAVE_NEON" "HAVE_ARMV7A"
++ 			add_make_enabled "HAVE_IOS" "HAVE_DARWIN_OS" "HAVE_BSD" "HAVE_NEON"
++ 			if [ "$ARCH" != "arm64" ]; then
++ 				add_make_enabled "HAVE_ARMV7A"
++ 			fi
+ 		fi
+ 		;;
+ 	*bsd*)
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 25 - 0
MobileVLCKit/patches/0013-extras-deploy-arch-option-for-iOS.patch

@@ -0,0 +1,25 @@
+From 4b1752e265ac88a458fe029d27885ee65e6d2e1e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Thu, 3 Oct 2013 18:28:26 +0200
+Subject: [PATCH 13/17] extras: deploy arch option for iOS
+
+---
+ extras/package/ios/build.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh
+index e9a818a..19e87e7 100755
+--- a/extras/package/ios/build.sh
++++ b/extras/package/ios/build.sh
+@@ -181,7 +181,7 @@ else
+   export ASCPP="xcrun as"
+ fi
+ 
+-../bootstrap --host=${TARGET} --build="i686-apple-darwin10" --prefix=${VLCROOT}/contrib/${TARGET}-${ARCH} --disable-gpl \
++../bootstrap --host=${TARGET} --build="i686-apple-darwin10" --prefix=${VLCROOT}/contrib/${TARGET}-${ARCH} --arch=${ARCH} --disable-gpl \
+     --disable-disc --disable-sout \
+     --disable-sdl \
+     --disable-SDL_image \
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 39 - 0
MobileVLCKit/patches/0014-contrib-png-fix-compilation-for-arm64-which-is-unkno.patch

@@ -0,0 +1,39 @@
+From f83557034fccbdbb72ba409edf63a1e73ca8e109 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Thu, 3 Oct 2013 18:38:25 +0200
+Subject: [PATCH 14/17] contrib/png: fix compilation for arm64 which is unknown
+ to the libpng developers
+
+---
+ contrib/src/png/rules.mak | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/src/png/rules.mak b/contrib/src/png/rules.mak
+index 701e3a8..d76206e 100644
+--- a/contrib/src/png/rules.mak
++++ b/contrib/src/png/rules.mak
+@@ -7,6 +7,13 @@ ifeq ($(call need_pkg,"libpng"),)
+ PKGS_FOUND += png
+ endif
+ 
++PNGCONF =
++ifdef HAVE_IOS
++ifeq ($(ARCH),arm64)
++PNGCONF = --enable-arm-neon=no
++endif
++endif
++
+ $(TARBALLS)/libpng-$(PNG_VERSION).tar.xz:
+ 	$(call download,$(PNG_URL))
+ 
+@@ -26,6 +33,6 @@ DEPS_png = zlib $(DEPS_zlib)
+ 
+ .png: png
+ 	$(RECONF)
+-	cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
++	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(PNGCONF)
+ 	cd $< && $(MAKE) install
+ 	touch $@
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 28 - 0
MobileVLCKit/patches/0015-contrib-speex-fix-compilation-for-arm64.patch

@@ -0,0 +1,28 @@
+From ad9db4f1f818e4ff8118ce7876a1e05f016a75bb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Thu, 3 Oct 2013 19:30:01 +0200
+Subject: [PATCH 15/17] contrib/speex: fix compilation for arm64
+
+---
+ contrib/src/speex/rules.mak | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/contrib/src/speex/rules.mak b/contrib/src/speex/rules.mak
+index 974eac2..8bbbfa7 100644
+--- a/contrib/src/speex/rules.mak
++++ b/contrib/src/speex/rules.mak
+@@ -36,6 +36,11 @@ ifeq ($(ARCH),arm)
+ SPEEX_CONF += --enable-arm5e-asm
+ endif
+ endif
++ifdef HAVE_IOS
++ifeq ($(ARCH),arm64)
++SPEEX_CONF += --disable-neon
++endif
++endif
+ 
+ .speex: speex
+ 	$(RECONF)
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 51 - 0
MobileVLCKit/patches/0016-contrib-flac-fix-compilation-with-clang-5.0.patch

@@ -0,0 +1,51 @@
+From 6202916c0a6ea21a67e4a1fa4355925f9fadd2c0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Mon, 7 Oct 2013 17:05:21 +0200
+Subject: [PATCH 16/17] contrib/flac: fix compilation with clang 5.0
+
+---
+ contrib/src/flac/libFLAC-clang-5.0.patch | 19 +++++++++++++++++++
+ contrib/src/flac/rules.mak               |  1 +
+ 2 files changed, 20 insertions(+)
+ create mode 100644 contrib/src/flac/libFLAC-clang-5.0.patch
+
+diff --git a/contrib/src/flac/libFLAC-clang-5.0.patch b/contrib/src/flac/libFLAC-clang-5.0.patch
+new file mode 100644
+index 0000000..9fcad0b
+--- /dev/null
++++ b/contrib/src/flac/libFLAC-clang-5.0.patch
+@@ -0,0 +1,19 @@
++diff -ru flac/configure.ac flac-fixed/configure.ac
++--- flac/configure.ac	2013-05-27 10:08:57.000000000 +0200
+++++ flac-fixed/configure.ac	2013-10-07 16:56:51.000000000 +0200
++@@ -381,15 +381,9 @@
++ 		CXXFLAGS="$CXXFLAGS -Wall -Wextra -Werror "
++ 		fi
++ 
++-	if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elf; then
++ 		CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
++ 		CFLAGS="$CFLAGS -fvisibility=hidden"
++ 		CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
++-		fi
++-
++-	if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
++-		XIPH_ADD_CFLAGS([-fgnu89-inline])
++-		fi
++ 	fi
++ 
++ 
+diff --git a/contrib/src/flac/rules.mak b/contrib/src/flac/rules.mak
+index bf72caf..ee6c2b5 100644
+--- a/contrib/src/flac/rules.mak
++++ b/contrib/src/flac/rules.mak
+@@ -17,6 +17,7 @@ flac: flac-$(FLAC_VERSION).tar.xz .sum-flac
+ 	$(UNPACK)
+ 	$(APPLY) $(SRC)/flac/libFLAC-pc.patch
+ ifdef HAVE_DARWIN_OS
++	$(APPLY) $(SRC)/flac/libFLAC-clang-5.0.patch
+ 	cd $(UNPACK_DIR) && sed -e 's,-dynamiclib,-dynamiclib -arch $(ARCH),' -i.orig configure
+ endif
+ ifdef HAVE_ANDROID
+-- 
+1.8.3.4 (Apple Git-47)
+

+ 152 - 0
MobileVLCKit/patches/0017-contrib-gcrypt-use-git-version-on-iOS.patch

@@ -0,0 +1,153 @@
+From fc9147da0c71749fc3f366c0070422275e3308fa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
+Date: Thu, 31 Oct 2013 20:42:59 +0100
+Subject: [PATCH 17/17] contrib/gcrypt: use git version on iOS
+
+---
+ contrib/src/gcrypt/disable-doc-compilation.patch   | 43 ++++++++++++++++++++++
+ contrib/src/gcrypt/rules.mak                       | 23 ++++++++----
+ .../gcrypt/work-around-libtool-limitation.patch    | 25 +++++++++++++
+ 3 files changed, 83 insertions(+), 8 deletions(-)
+ create mode 100644 contrib/src/gcrypt/disable-doc-compilation.patch
+ create mode 100644 contrib/src/gcrypt/work-around-libtool-limitation.patch
+
+diff --git a/contrib/src/gcrypt/disable-doc-compilation.patch b/contrib/src/gcrypt/disable-doc-compilation.patch
+new file mode 100644
+index 0000000..e63224e
+--- /dev/null
++++ b/contrib/src/gcrypt/disable-doc-compilation.patch
+@@ -0,0 +1,43 @@
++From 18ac3f6a6e0ab9fe353ee8b5ab2b34ef5ce500d7 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
++Date: Thu, 31 Oct 2013 20:34:15 +0100
++Subject: [PATCH] disable doc compilation
++
++---
++ Makefile.am  | 6 +++---
++ configure.ac | 1 -
++ 2 files changed, 3 insertions(+), 4 deletions(-)
++
++diff --git a/Makefile.am b/Makefile.am
++index f1dbd09..9e0abd6 100644
++--- a/Makefile.am
+++++ b/Makefile.am
++@@ -25,10 +25,10 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-random-daemon \
++ # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
++ GITLOG_TO_CHANGELOG=gitlog-to-changelog
++ 
++-DIST_SUBDIRS = m4 compat mpi cipher random src doc tests
++-SUBDIRS =         compat mpi cipher random src doc tests
+++DIST_SUBDIRS = m4 compat mpi cipher random src tests
+++SUBDIRS =         compat mpi cipher random src tests
++ EXTRA_DIST = autogen.sh README.GIT 					\
++-             ChangeLog-2011 scripts/ChangeLog-2011 doc/ChangeLog-2011 	\
++              m4/ChangeLog-2011 cipher/ChangeLog-2011 src/ChangeLog-2011 \
++              random/ChangeLog-2011 tests/ChangeLog-2011 mpi/ChangeLog-2011 \
++              scripts/git-log-footer scripts/git-log-fix
++diff --git a/configure.ac b/configure.ac
++index e3471d0..6fa4ad6 100644
++--- a/configure.ac
+++++ b/configure.ac
++@@ -1799,7 +1799,6 @@ compat/Makefile
++ mpi/Makefile
++ cipher/Makefile
++ random/Makefile
++-doc/Makefile
++ src/Makefile
++ src/gcrypt.h
++ src/libgcrypt-config
++-- 
++1.8.3.4 (Apple Git-47)
++
+diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
+index 38c96b5..332d2ad 100644
+--- a/contrib/src/gcrypt/rules.mak
++++ b/contrib/src/gcrypt/rules.mak
+@@ -1,6 +1,7 @@
+ # GCRYPT
+ GCRYPT_VERSION := 1.5.3
+ GCRYPT_URL := ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-$(GCRYPT_VERSION).tar.bz2
++GCRYPT_GITURL := git://git.gnupg.org/libgcrypt.git
+ 
+ PKGS += gcrypt
+ 
+@@ -9,9 +10,20 @@ $(TARBALLS)/libgcrypt-$(GCRYPT_VERSION).tar.bz2:
+ 
+ .sum-gcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2
+ 
++$(TARBALLS)/libgcrypt-git.tar.xz:
++	$(call download_git,$(GCRYPT_GITURL),,d1cadd145)
++
++ifndef HAVE_IOS
+ libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
+ 	$(UNPACK)
+ 	$(MOVE)
++else
++libgcrypt: libgcrypt-git.tar.xz .sum-gcrypt
++	$(UNPACK)
++	$(APPLY) $(SRC)/gcrypt/disable-doc-compilation.patch
++	$(APPLY) $(SRC)/gcrypt/work-around-libtool-limitation.patch
++	$(MOVE)
++endif
+ 
+ DEPS_gcrypt = gpg-error
+ 
+@@ -22,12 +34,7 @@ GCRYPT_CONF = \
+ ifdef HAVE_WIN64
+ GCRYPT_CONF += --disable-asm
+ endif
+-ifdef HAVE_IOS
+-GCRYPT_EXTRA_CFLAGS = -fheinous-gnu-extensions
+-else
+-GCRYPT_EXTRA_CFLAGS =
+-endif
+-ifdef HAVE_MACOSX
++ifdef HAVE_DARWIN_OS
+ GCRYPT_CONF += --disable-aesni-support
+ else
+ ifdef HAVE_BSD
+@@ -41,7 +48,7 @@ endif
+ endif
+ 
+ .gcrypt: libgcrypt
+-	#$(RECONF)
+-	cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) $(GCRYPT_EXTRA_CFLAGS)" ./configure $(HOSTCONF) $(GCRYPT_CONF)
++	$(RECONF)
++	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(GCRYPT_CONF)
+ 	cd $< && $(MAKE) install
+ 	touch $@
+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 0000000..df97ffb
+--- /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)
++ 
+-- 
+1.8.3.4 (Apple Git-47)
+