[Android] buildsystem: add an option to select the license of VLC contribs

Steve Lhomme git at videolan.org
Tue Aug 12 09:46:22 UTC 2025


vlc-android | branch: master | Steve Lhomme <slhomme at matroska.org> | Tue Jul 29 17:07:09 2025 +0200| [73d21638d55b00dd5eb048a865063e98afa16929] | committer: Duncan McNamara

buildsystem: add an option to select the license of VLC contribs

See https://code.videolan.org/videolan/libvlcjni/-/merge_requests/120 and
https://code.videolan.org/videolan/libvlcjni/-/merge_requests/154

> https://code.videolan.org/videolan/vlc-android/commit/73d21638d55b00dd5eb048a865063e98afa16929
---

 buildsystem/compile.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh
index c71138c266..485daf2d60 100755
--- a/buildsystem/compile.sh
+++ b/buildsystem/compile.sh
@@ -23,6 +23,8 @@ fail()
 
 RELEASE=0
 RESET=0
+# Indicates the license of contribs
+AVLC_CONTRIB_LICENSE=g
 while [ $# -gt 0 ]; do
     case $1 in
         help|--help|-h)
@@ -41,6 +43,10 @@ while [ $# -gt 0 ]; do
             echo "Use -t to use prebuilt contribs for LibVLC"
             echo "Use -m2 to set the maven local repository path to use"
             echo "Use --static-cpp to use the static C++ runtime"
+            echo "Use --license <l> to build contribs with license l"
+            echo "   g: GPLv3 (default)"
+            echo "   l: LGPLv3 + ad-clauses"
+            echo "   a: LGPLv2 + ad-clauses"
             exit 0
             ;;
         a|-a)
@@ -66,6 +72,10 @@ while [ $# -gt 0 ]; do
             M2_REPO=$2
             shift
             ;;
+        --license)
+            AVLC_CONTRIB_LICENSE=$2
+            shift
+            ;;
         -l)
             BUILD_LIBVLC=1
             NO_ML=1
@@ -359,7 +369,7 @@ if [ "$BUILD_MEDIALIB" != 1 ] || [ ! -d "${VLC_LIBJNI_PATH}/libvlc/jni/libs/" ];
         fi
         if ${VLC_LIBJNI_PATH}/vlc/extras/ci/check-url.sh "$VLC_PREBUILT_CONTRIBS_URL"; then CONTRIB_FLAGS="--with-prebuilt-contribs"; fi
     fi
-    ${VLC_LIBJNI_PATH}/buildsystem/compile-libvlc.sh -a ${ARCH} ${CONTRIB_FLAGS} ${CONFIG_ARGS}
+    ${VLC_LIBJNI_PATH}/buildsystem/compile-libvlc.sh -a ${ARCH} ${CONTRIB_FLAGS} ${CONFIG_ARGS} --license $AVLC_CONTRIB_LICENSE
 
     cp -a ${VLC_LIBJNI_PATH}/libvlc/jni/obj/local/${ANDROID_ABI}/*.so "${OUT_DBG_DIR}"
 fi



More information about the Android mailing list