소스 검색

WIP

Those patches don't apply
Alexandre Janniaux 5 년 전
부모
커밋
2214f046b3

+ 1 - 1
compileAndBuildVLCKit.sh

@@ -24,7 +24,7 @@ OSVERSIONMINLDFLAG=ios
 ROOT_DIR=empty
 FARCH="all"
 
-TESTEDHASH="6e223d67a" # libvlc hash that this version of VLCKit is build on
+TESTEDHASH="746a0dd9a57f" # libvlc hash that this version of VLCKit is build on
 
 usage()
 {

+ 0 - 206
libvlc/patches/0015-Work-around-lack-of-__thread-storage-qualifier-on-ol.patch

@@ -1,207 +0,0 @@
-From ab530d647c5ada5f91a21fdaa1d7efa2179ba99d Mon Sep 17 00:00:00 2001
-From: Carola Nitz <nitz.carola@googlemail.com>
-Date: Fri, 23 Feb 2018 13:16:41 +0100
-Subject: [PATCH 15/24] Work around lack of __thread storage qualifier on old
- macOS
-
----
- configure.ac                      |  4 +-
- include/vlc_fixups.h              |  6 ++-
- po/POTFILES.in                    |  1 +
- src/Makefile.am                   |  1 +
- {compat => src/extras}/tdestroy.c | 67 ++++++++++++++++++-------------
- 5 files changed, 47 insertions(+), 32 deletions(-)
- rename {compat => src/extras}/tdestroy.c (59%)
-
-diff --git a/configure.ac b/configure.ac
-index 886b499566..26a9fb8616 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -643,8 +643,8 @@ dnl Check for system libs needed
- need_libc=false
- 
- dnl Check for usual libc functions
--AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
--AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll posix_memalign recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp pathconf])
-+AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream pipe2 pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
-+AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll posix_memalign recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tfind timegm timespec_get strverscmp pathconf])
- AC_REPLACE_FUNCS([gettimeofday])
- AC_CHECK_FUNC(fdatasync,,
-   [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
-diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
-index 8fd01da0ce..16282aae9e 100644
---- a/include/vlc_fixups.h
-+++ b/include/vlc_fixups.h
-@@ -505,9 +505,11 @@ void *lfind( const void *key, const void *base, size_t *nmemb,
-          lfind((a),(b), &(unsigned){ (*(c) > UINT_MAX) ? UINT_MAX : *(c) }, (d),(e))
- #endif /* _WIN64 */
- 
--#ifndef HAVE_TDESTROY
- void tdestroy( void *root, void (*free_node)(void *nodep) );
--#endif
-+# ifndef HAVE_TDESTROY
-+void vlc_tdestroy( void *, void (*)(void *) );
-+#  define tdestroy vlc_tdestroy
-+# endif
- 
- /* Random numbers */
- #ifndef HAVE_NRAND48
-diff --git a/po/POTFILES.in b/po/POTFILES.in
-index d2771b57ec..62b3645c30 100644
---- a/po/POTFILES.in
-+++ b/po/POTFILES.in
-@@ -66,6 +66,7 @@ src/config/help.c
- src/config/intf.c
- src/darwin/error.c
- src/extras/libc.c
-+src/extras/tdestroy.c
- src/input/access.c
- src/input/decoder.c
- src/input/decoder.h
-diff --git a/src/Makefile.am b/src/Makefile.am
-index b6c5996837..978a0674b1 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -210,6 +210,7 @@ libvlccore_la_SOURCES = \
- 	config/getopt.c \
- 	config/vlc_getopt.h \
- 	extras/libc.c \
-+	extras/tdestroy.c \
- 	media_source/media_source.c \
- 	media_source/media_source.h \
- 	media_source/media_tree.c \
-diff --git a/compat/tdestroy.c b/src/extras/tdestroy.c
-similarity index 59%
-rename from compat/tdestroy.c
-rename to src/extras/tdestroy.c
-index 6bb3480957..5c54881553 100644
---- a/compat/tdestroy.c
-+++ b/src/extras/tdestroy.c
-@@ -3,7 +3,7 @@
-  * @brief replacement for GNU tdestroy()
-  */
- /*****************************************************************************
-- * Copyright (C) 2009, 2018 Rémi Denis-Courmont
-+ * Copyright (C) 2009 Rémi Denis-Courmont
-  *
-  * This program is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as published by
-@@ -24,77 +24,88 @@
- # include "config.h"
- #endif
- 
--#include <assert.h>
-+#if defined(HAVE_SEARCH_H) && !defined(HAVE_TDESTROY) && defined(HAVE_TFIND)
-+
- #include <stdlib.h>
--#ifdef HAVE_SEARCH_H
--# include <search.h>
--#endif
-+#include <assert.h>
- 
--#ifdef HAVE_TFIND
--static __thread struct
-+#include <vlc_common.h>
-+#include <search.h>
-+
-+static struct
- {
-     const void **tab;
-     size_t count;
--} list = { NULL, 0 };
-+    vlc_mutex_t lock;
-+} list = { NULL, 0, VLC_STATIC_MUTEX };
- 
--static void list_nodes(const void *node, const VISIT which, const int depth)
-+static void list_nodes (const void *node, const VISIT which, const int depth)
- {
-     (void) depth;
- 
-     if (which != postorder && which != leaf)
-         return;
- 
--    const void **tab = realloc(list.tab, sizeof (*tab) * (list.count + 1));
--    if (tab == NULL)
--        abort();
-+    const void **tab = realloc (list.tab, sizeof (*tab) * (list.count + 1));
-+    if (unlikely(tab == NULL))
-+        abort ();
- 
-     tab[list.count] = *(const void **)node;
-     list.tab = tab;
-     list.count++;
- }
- 
--static __thread const void *smallest;
-+static struct
-+{
-+    const void *node;
-+    vlc_mutex_t lock;
-+} smallest = { NULL, VLC_STATIC_MUTEX };
- 
--static int cmp_smallest(const void *a, const void *b)
-+static int cmp_smallest (const void *a, const void *b)
- {
-     if (a == b)
-         return 0;
--    if (a == smallest)
-+    if (a == smallest.node)
-         return -1;
--    if (b == smallest)
-+    if (likely(b == smallest.node))
-         return +1;
--    abort();
-+    abort ();
- }
- 
--void tdestroy(void *root, void (*freenode)(void *))
-+void vlc_tdestroy (void *root, void (*freenode) (void *))
- {
-     const void **tab;
-     size_t count;
- 
--    assert(freenode != NULL);
-+    assert (freenode != NULL);
- 
-     /* Enumerate nodes in order */
--    assert(list.count == 0);
--    twalk(root, list_nodes);
-+    vlc_mutex_lock (&list.lock);
-+    assert (list.count == 0);
-+    twalk (root, list_nodes);
-     tab = list.tab;
-     count = list.count;
-     list.tab = NULL;
-     list.count = 0;
-+    vlc_mutex_unlock (&list.lock);
- 
-     /* Destroy the tree */
-+    vlc_mutex_lock (&smallest.lock);
-     for (size_t i = 0; i < count; i++)
-     {
--         void *node = (void *)(tab[i]);
-+         void *node  = tab[i];
- 
--         smallest = node;
--         node = tdelete(node, &root, cmp_smallest);
--         assert(node != NULL);
-+         smallest.node = node;
-+         node = tdelete (node, &root, cmp_smallest);
-+         assert (node != NULL);
-     }
-+    vlc_mutex_unlock (&smallest.lock);
-     assert (root == NULL);
- 
-     /* Destroy the nodes */
-     for (size_t i = 0; i < count; i++)
--         freenode((void *)(tab[i]));
--    free(tab);
-+         freenode ((void *)(tab[i]));
-+    free (tab);
- }
--#endif /* HAVE_TFIND */
-+
-+#endif
-2.21.0 (Apple Git-122.2)
-

+ 0 - 118
libvlc/patches/0022-apple-build-add-more-options.patch

@@ -1,119 +0,0 @@
-From 09d0077a8c0a674c2d676501040aef6cf8f24c25 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@feepk.net>
-Date: Wed, 27 Nov 2019 18:08:32 +0100
-Subject: [PATCH 22/24] apple/build: add more options
-
-This exposes the verbose option, adds disable-debug and compiles the sources on all the cores by default.
-
-Additionally, this downloads all the contrib packages before compiling a single one of them.
----
- extras/package/apple/build.sh | 41 +++++++++++++++++++++++++----------
- 1 file changed, 30 insertions(+), 11 deletions(-)
-
-diff --git a/extras/package/apple/build.sh b/extras/package/apple/build.sh
-index f35dcd4de0..8643f11d74 100755
---- a/extras/package/apple/build.sh
-+++ b/extras/package/apple/build.sh
-@@ -89,6 +89,11 @@ VLC_USE_PREBUILT_CONTRIBS=0
- # User-provided URL from where to fetch contribs, empty
- # for the default chosen by contrib system
- VLC_PREBUILT_CONTRIBS_URL=${VLC_PREBUILT_CONTRIBS_URL:-""}
-+# The number of cores to compile on
-+CORE_COUNT=`sysctl -n machdep.cpu.core_count`
-+let VLC_USE_NUMBER_OF_CORES=$CORE_COUNT+1
-+# whether to disable debug mode (the default) or not
-+VLC_DISABLE_DEBUG=0
- 
- ##########################################################
- #                    Helper functions                    #
-@@ -98,10 +103,12 @@ VLC_PREBUILT_CONTRIBS_URL=${VLC_PREBUILT_CONTRIBS_URL:-""}
- usage()
- {
-     echo "Usage: $VLC_SCRIPT_NAME [options]"
--    echo " --arch=ARCH    Architecture to build for"
--    echo "                  (i386|x86_64|armv7|armv7s|arm64)"
--    echo " --sdk=SDK      Name of the SDK to build with (see 'xcodebuild -showsdks')"
--    echo " --help         Print this help"
-+    echo " --arch=ARCH     Architecture to build for"
-+    echo "                   (i386|x86_64|armv7|armv7s|arm64)"
-+    echo " --sdk=SDK       Name of the SDK to build with (see 'xcodebuild -showsdks')"
-+    echo " --disable-debug Disable libvlc debug mode (for release)"
-+    echo " --verbose       Print verbose output and disable multi-core use"
-+    echo " --help          Print this help"
-     echo ""
-     echo "Advanced options:"
-     echo " --package-contribs        Create a prebuilt contrib package"
-@@ -362,6 +369,10 @@ do
-             ;;
-         --verbose)
-             VLC_SCRIPT_VERBOSE=1
-+            VLC_USE_NUMBER_OF_CORES=1
-+            ;;
-+        --disable-debug)
-+            VLC_DISABLE_DEBUG=1
-             ;;
-         --arch=*)
-             VLC_HOST_ARCH="${1#--arch=}"
-@@ -420,12 +431,13 @@ readonly VLC_PSEUDO_TRIPLET="${VLC_HOST_ARCH}-apple-${VLC_HOST_PLATFORM}_${VLC_D
- # Contrib install dir
- readonly VLC_CONTRIB_INSTALL_DIR="$VLC_BUILD_DIR/contrib/$VLC_PSEUDO_TRIPLET"
- # VLC install dir
--readonly VLC_INSTALL_DIR="$VLC_BUILD_DIR/vlc-$VLC_PSEUDO_TRIPLET"
-+readonly VLC_INSTALL_DIR="$VLC_BUILD_DIR/vlc-${VLC_APPLE_SDK_NAME}-${VLC_HOST_ARCH}"
- 
- echo "Build configuration"
--echo "  Platform:     $VLC_HOST_PLATFORM"
--echo "  Architecture: $VLC_HOST_ARCH"
--echo "  SDK Version:  $VLC_APPLE_SDK_VERSION"
-+echo "  Platform:         $VLC_HOST_PLATFORM"
-+echo "  Architecture:     $VLC_HOST_ARCH"
-+echo "  SDK Version:      $VLC_APPLE_SDK_VERSION"
-+echo "  Number of Cores:  $VLC_USE_NUMBER_OF_CORES"
- echo ""
- 
- ##########################################################
-@@ -475,7 +487,7 @@ echo "Building needed tools (if missing)"
- 
- cd "$VLC_SRC_DIR/extras/tools" || abort_err "Failed cd to tools dir"
- ./bootstrap || abort_err "Bootstrapping tools failed"
--$MAKE || abort_err "Building tools failed"
-+$MAKE -j$VLC_USE_NUMBER_OF_CORES || abort_err "Building tools failed"
- 
- echo ""
- 
-@@ -533,8 +545,11 @@ else
-     # Print list of contribs that will be built
-     $MAKE list
- 
-+    # Download source packages
-+    $MAKE fetch -j$VLC_USE_NUMBER_OF_CORES
-+
-     # Build contribs
--    $MAKE || abort_err "Building contribs failed"
-+    $MAKE -j$VLC_USE_NUMBER_OF_CORES || abort_err "Building contribs failed"
- 
-     # Make prebuilt contribs package
-     if [ "$VLC_MAKE_PREBUILT_CONTRIBS" -gt "0" ]; then
-@@ -564,6 +579,10 @@ elif [ "$VLC_HOST_OS" = "tvos" ]; then
-     VLC_CONFIG_OPTIONS+=( "${VLC_CONFIG_OPTIONS_TVOS[@]}" )
- fi
- 
-+if [ "$VLC_DISABLE_DEBUG" -gt "0" ]; then
-+    VLC_CONFIG_OPTIONS+=( "--disable-debug" )
-+fi
-+
- # Bootstrap VLC
- cd "$VLC_SRC_DIR" || abort_err "Failed cd to VLC source dir"
- ./bootstrap
-@@ -582,7 +601,7 @@ mkdir -p "$VLC_INSTALL_DIR"
-     "${VLC_CONFIG_OPTIONS[@]}" \
-  || abort_err "Configuring VLC failed"
- 
--$MAKE || abort_err "Building VLC failed"
-+$MAKE -j$VLC_USE_NUMBER_OF_CORES || abort_err "Building VLC failed"
- 
- $MAKE install || abort_err "Installing VLC failed"
- 
-2.21.0 (Apple Git-122.2)
-

+ 0 - 25
libvlc/patches/0024-apple-build-rename-installation-folder-for-contrib.patch

@@ -1,26 +0,0 @@
-From d80b87cf9cf7987c6daf8a61f446e219131110e1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@feepk.net>
-Date: Fri, 29 Nov 2019 11:26:35 +0100
-Subject: [PATCH 24/24] apple/build: rename installation folder for contrib
-
-This strips duplicate information and makes the folder a lot easier to parse.
----
- extras/package/apple/build.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/extras/package/apple/build.sh b/extras/package/apple/build.sh
-index f2ceb2a971..4fc9ea77fd 100755
---- a/extras/package/apple/build.sh
-+++ b/extras/package/apple/build.sh
-@@ -429,7 +429,7 @@ validate_architecture "$VLC_HOST_ARCH"
- # Set pseudo-triplet
- readonly VLC_PSEUDO_TRIPLET="${VLC_HOST_ARCH}-apple-${VLC_HOST_PLATFORM}_${VLC_DEPLOYMENT_TARGET}"
- # Contrib install dir
--readonly VLC_CONTRIB_INSTALL_DIR="$VLC_BUILD_DIR/contrib/$VLC_PSEUDO_TRIPLET"
-+readonly VLC_CONTRIB_INSTALL_DIR="$VLC_BUILD_DIR/contrib/${VLC_HOST_ARCH}-${VLC_APPLE_SDK_NAME}"
- # VLC install dir
- readonly VLC_INSTALL_DIR="$VLC_BUILD_DIR/vlc-${VLC_APPLE_SDK_NAME}-${VLC_HOST_ARCH}"
- 
-2.21.0 (Apple Git-122.2)
-