vlc | branch: master | Alexandre Janniaux <[email protected]> | Tue Jun 30 17:02:08 2020 +0200| [ba1ec31f3d921b7c3081a8592c98ce9b3277b8c4] | committer: Alexandre Janniaux
apple: build.sh: add an option to build dynamic objects Add the --enable-shared flag in order to build each plugin and the libvlc/libvlccore libraries as a dynamic object. The goal is to be able to ship them in a bundle archived as an IPA, which can then be signed and installed on real device without needing complex additional linking steps and generating new files. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba1ec31f3d921b7c3081a8592c98ce9b3277b8c4 --- extras/package/apple/build.conf | 2 -- extras/package/apple/build.sh | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/extras/package/apple/build.conf b/extras/package/apple/build.conf index efb056d76b..df550b7dcf 100644 --- a/extras/package/apple/build.conf +++ b/extras/package/apple/build.conf @@ -98,7 +98,6 @@ export VLC_CONTRIB_OPTIONS_TVOS=( # Base configure options for VLC export VLC_CONFIG_OPTIONS_BASE=( - --enable-static --disable-sse --disable-mmx --disable-a52 @@ -106,7 +105,6 @@ export VLC_CONFIG_OPTIONS_BASE=( --disable-libcddb --disable-macosx --disable-macosx-avfoundation - --disable-shared --disable-lua --disable-qt --disable-skins2 diff --git a/extras/package/apple/build.sh b/extras/package/apple/build.sh index 8b9e69cfc9..1b112e8465 100755 --- a/extras/package/apple/build.sh +++ b/extras/package/apple/build.sh @@ -96,6 +96,8 @@ let VLC_USE_NUMBER_OF_CORES=$CORE_COUNT+1 VLC_DISABLE_DEBUG=0 # whether to compile with bitcode or not VLC_USE_BITCODE=0 +# whether to build static or dynamic plugins +VLC_BUILD_DYNAMIC=0 # Tools to be used VLC_HOST_CC="$(xcrun --find clang)" @@ -128,6 +130,7 @@ usage() echo " --package-contribs Create a prebuilt contrib package" echo " --with-prebuilt-contribs Use prebuilt contribs instead of building" echo " them from source" + echo " --enable-shared Build dynamic libraries and plugins" echo "Environment variables:" echo " VLC_PREBUILT_CONTRIBS_URL URL to fetch the prebuilt contrib archive" echo " from when --with-prebuilt-contribs is used" @@ -438,6 +441,9 @@ do --with-prebuilt-contribs) VLC_USE_PREBUILT_CONTRIBS=1 ;; + --enable-shared) + VLC_BUILD_DYNAMIC=1 + ;; VLC_PREBUILT_CONTRIBS_URL=*) VLC_PREBUILT_CONTRIBS_URL="${1#VLC_PREBUILT_CONTRIBS_URL=}" ;; @@ -640,6 +646,12 @@ if [ "$VLC_DISABLE_DEBUG" -gt "0" ]; then VLC_CONFIG_OPTIONS+=( "--disable-debug" ) fi +if [ "$VLC_BUILD_DYNAMIC" -gt "0" ]; then + VLC_CONFIG_OPTIONS+=( "--enable-shared" ) +else + VLC_CONFIG_OPTIONS+=( "--disable-shared" "--enable-static" ) +fi + # Bootstrap VLC cd "$VLC_SRC_DIR" || abort_err "Failed cd to VLC source dir" if ! [ -e configure ]; then @@ -666,6 +678,11 @@ $MAKE -j$VLC_USE_NUMBER_OF_CORES || abort_err "Building VLC failed" $MAKE install || abort_err "Installing VLC failed" echo "" +# Shortcut the build of the static bundle when using the dynamic loader +if [ "$VLC_BUILD_DYNAMIC" -gt "0" ]; then + echo "Build succeeded!" + exit 0 +fi ########################################################## # Remove unused modules # _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
