Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
1499dace by Alexandre Janniaux at 2026-02-28T18:43:25+01:00
apple: build: add --with-contrib/--without-contrib

Allow skipping the contribs bootstrap and build step, useful for
iterating on VLC compilation when contribs are already built by
providing already built contribs elsewhere or by completely disabling
the building of contribs to just build core functionalities.

- - - - -


1 changed file:

- extras/package/apple/build.sh


Changes:

=====================================
extras/package/apple/build.sh
=====================================
@@ -96,6 +96,8 @@ VLC_BITCODE_FLAG="-fembed-bitcode"
 VLC_BUILD_DYNAMIC=0
 # Add extra checks when compiling
 VLC_BUILD_EXTRA_CHECKS=0
+# --with-contrib option forwarded to configure
+VLC_WITH_CONTRIB=
 
 # Tools to be used
 VLC_HOST_CC="$(xcrun --find clang)"
@@ -131,6 +133,8 @@ usage()
     echo " --package-contribs        Create a prebuilt contrib package"
     echo " --with-prebuilt-contribs  Use prebuilt contribs instead of building"
     echo "                           them from source"
+    echo " --with-contrib[=DIR]      Use contribs from DIR (default: build and 
auto-detect)"
+    echo " --without-contrib         Disable contribs entirely 
(--with-contrib=no)"
     echo " --enable-shared           Build dynamic libraries and plugins"
     echo " --enable-extra-checks     Add extra checks when compiling"
     echo "Environment variables:"
@@ -525,6 +529,15 @@ do
         --enable-extra-checks)
             VLC_BUILD_EXTRA_CHECKS=1
             ;;
+        --with-contrib=*)
+            VLC_WITH_CONTRIB="${1#--with-contrib=}"
+            ;;
+        --with-contrib)
+            VLC_WITH_CONTRIB=yes
+            ;;
+        --without-contrib)
+            VLC_WITH_CONTRIB=no
+            ;;
         --config=*)
             VLC_BUILD_CONF_PATH="${1#--config=}"
             ;;
@@ -662,6 +675,9 @@ echo ""
 ##########################################################
 #                     Contribs build                     #
 ##########################################################
+if [ "$VLC_WITH_CONTRIB" = "no" ] || { [ -n "$VLC_WITH_CONTRIB" ] && [ 
"$VLC_WITH_CONTRIB" != "yes" ]; }; then
+    echo "Skipping contribs build"
+else
 # Combine settings from config file
 VLC_CONTRIB_OPTIONS=( "${VLC_CONTRIB_OPTIONS_BASE[@]}" )
 
@@ -731,6 +747,7 @@ if [ -n "$PREBUILT_FAILED" ]; then
 else
     $MAKE tools
 fi
+fi # VLC_WITH_CONTRIB
 
 echo ""
 
@@ -787,12 +804,21 @@ cd "${VLC_BUILD_DIR}/build" || abort_err "Failed cd to 
VLC build dir"
 mkdir -p "$VLC_INSTALL_DIR"
 
 
+# Determine how to configure the contribs
+if [ "$VLC_WITH_CONTRIB" = "no" ]; then
+    VLC_CONTRIB_CONFIGURE_ARG="--without-contrib"
+elif [ -n "$VLC_WITH_CONTRIB" ] && [ "$VLC_WITH_CONTRIB" != "yes" ]; then
+    VLC_CONTRIB_CONFIGURE_ARG="--with-contrib=$VLC_WITH_CONTRIB"
+else
+    VLC_CONTRIB_CONFIGURE_ARG="--with-contrib=$VLC_CONTRIB_INSTALL_DIR"
+fi
+
 vlcSetSymbolEnvironment \
 hostenv "${VLC_SRC_DIR}/configure" \
     --host="$VLC_HOST_TRIPLET" \
     ${VLC_BUILD_TRIPLET:+--build="$VLC_BUILD_TRIPLET"} \
     --prefix="$VLC_INSTALL_DIR" \
-    --with-contrib="$VLC_CONTRIB_INSTALL_DIR" \
+    "$VLC_CONTRIB_CONFIGURE_ARG" \
     "${VLC_CONFIG_OPTIONS[@]}" \
     CFLAGS="${CFLAGS}" \
     OBJCFLAGS="${OBJCFLAGS}" \



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/1499dacef4d5a37bca88fee5b95a0e508807059f

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/1499dacef4d5a37bca88fee5b95a0e508807059f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to