[vlc-commits] [Git][videolan/vlc][master] 7 commits: package/macos: allow passing extra config flags in the build

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jun 30 17:14:42 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d059c20d by Steve Lhomme at 2023-06-30T16:16:13+00:00
package/macos: allow passing extra config flags in the build

- - - - -
d1dff550 by Steve Lhomme at 2023-06-30T16:16:13+00:00
package/macos: add an option to select the (lib)VLC license

Some contribs may be disabled depending on the license chosen.

By default we build with GPLv3 compatibility. libvlc-only builds may want
to restrict to LGPL v3 with ad-clause or LGPL v2.1 with ad-clause.

faad is automatically picked when building for GPL and not picked
otherwise. We should never force it.

- - - - -
756bd8f2 by Steve Lhomme at 2023-06-30T16:16:13+00:00
package/win32: show the usage when a bogus option is passed

- - - - -
90bfcecd by Steve Lhomme at 2023-06-30T16:16:13+00:00
package/win32: add an option to select the (lib)VLC license

Some contribs may be disabled depending on the license chosen.

By default we build with GPLv3 compatibility. libvlc-only builds may want
to restrict to LGPL v3 with ad-clause or LGPL v2.1 with ad-clause.

- - - - -
dc74c5d5 by Steve Lhomme at 2023-06-30T16:16:13+00:00
contrib: gnutls: disable build if license is not matched

We need nettle and gmp and they can't be used with the LGPLv2 license.

- - - - -
c40554e3 by Steve Lhomme at 2023-06-30T16:16:13+00:00
contrib: adscplib: disable build if license is not matched

We need nettle and gmp and they can't be used with the LGPLv2 license.

- - - - -
82faf793 by Steve Lhomme at 2023-06-30T16:16:13+00:00
contrib: srt: disable build if license is not matched

We need nettle and gmp and they can't be used with the LGPLv2 license.

- - - - -


7 changed files:

- contrib/src/asdcplib/rules.mak
- contrib/src/gnutls/rules.mak
- contrib/src/srt/rules.mak
- extras/package/macosx/build.sh
- extras/package/macosx/configure.sh
- extras/package/win32/build.sh
- extras/package/win32/configure.sh


Changes:

=====================================
contrib/src/asdcplib/rules.mak
=====================================
@@ -4,7 +4,16 @@ ASDCPLIB_VERSION := 2.7.19
 
 ASDCPLIB_URL := http://download.cinecert.com/asdcplib/asdcplib-$(ASDCPLIB_VERSION).tar.gz
 
-ifndef HAVE_IOS
+# nettle/gmp can't be used with the LGPLv2 license
+ifdef GPL
+ASDCP_PKG=1
+else
+ifdef GNUV3
+ASDCP_PKG=1
+endif
+endif
+
+ifdef ASDCP_PKG
 ifndef HAVE_ANDROID
 ifndef HAVE_WINSTORE # FIXME uses some fordbidden SetErrorModes, GetModuleFileName in fileio.cpp
 PKGS += asdcplib


=====================================
contrib/src/gnutls/rules.mak
=====================================
@@ -3,11 +3,22 @@
 GNUTLS_VERSION := 3.6.16
 GNUTLS_URL := $(GNUGPG)/gnutls/v3.6/gnutls-$(GNUTLS_VERSION).tar.xz
 
+# nettle/gmp can't be used with the LGPLv2 license
+ifdef GPL
+GNUTLS_PKG=1
+else
+ifdef GNUV3
+GNUTLS_PKG=1
+endif
+endif
+
 ifdef BUILD_NETWORK
 ifndef HAVE_DARWIN_OS
+ifdef GNUTLS_PKG
 PKGS += gnutls
 endif
 endif
+endif
 ifeq ($(call need_pkg,"gnutls >= 3.5.0"),)
 PKGS_FOUND += gnutls
 endif


=====================================
contrib/src/srt/rules.mak
=====================================
@@ -3,9 +3,20 @@
 SRT_VERSION := 1.4.4
 SRT_URL := $(GITHUB)/Haivision/srt/archive/v$(SRT_VERSION).tar.gz
 
+# gnutls (nettle/gmp) can't be used with the LGPLv2 license
+ifdef GPL
+SRT_PKG=1
+else
+ifdef GNUV3
+SRT_PKG=1
+endif
+endif
+
 ifdef BUILD_NETWORK
+ifdef SRT_PKG
 PKGS += srt
 endif
+endif
 
 ifeq ($(call need_pkg,"srt >= 1.3.2"),)
 PKGS_FOUND += srt


=====================================
extras/package/macosx/build.sh
=====================================
@@ -40,6 +40,10 @@ OPTIONS:
    -C            Use the specified VLC build dir
    -b <url>      Enable breakpad support and send crash reports to this URL
    -d            Disable debug mode (on by default)
+   -g <g|l|a>    Select the license of contribs
+                     g: GPLv3 (default)
+                     l: LGPLv3 + ad-clauses
+                     a: LGPLv2 + ad-clauses
 EOF
 
 }
@@ -54,7 +58,7 @@ spopd()
     popd > /dev/null
 }
 
-while getopts "qhvrcdpi:k:a:j:C:b:" OPTION
+while getopts "qhvrcdpi:k:a:j:C:b:g:" OPTION
 do
      case $OPTION in
          h)
@@ -95,6 +99,9 @@ do
          b)
              BREAKPAD=$OPTARG
          ;;
+         g)
+             LICENSE=$OPTARG
+         ;;
          *)
              usage
              exit 1
@@ -161,12 +168,28 @@ vlcSetContribEnvironment "$MINIMAL_OSX_VERSION"
 info "Building contribs"
 spushd "${vlcroot}/contrib"
 
+case $LICENSE in
+    l)
+        # LGPL v3 + ad-clauses
+        CONTRIBFLAGS="$CONTRIBFLAGS --disable-gpl --enable-ad-clauses"
+        VLC_CONFIGURE_ARGS="$VLC_CONFIGURE_ARGS --disable-a52"
+    ;;
+    a)
+        # LGPL v2.1 + ad-clauses
+        CONTRIBFLAGS="$CONTRIBFLAGS --disable-gpl --disable-gnuv3 --enable-ad-clauses"
+        VLC_CONFIGURE_ARGS="$VLC_CONFIGURE_ARGS --disable-a52"
+    ;;
+    g|*)
+        # GPL v3
+    ;;
+esac
+
 if [ "$REBUILD" = "yes" ]; then
     rm -rf contrib-$HOST_TRIPLET
     rm -rf $HOST_TRIPLET
 fi
 mkdir -p contrib-$HOST_TRIPLET && cd contrib-$HOST_TRIPLET
-../bootstrap --build=$BUILD_TRIPLET --host=$HOST_TRIPLET > $out
+../bootstrap --build=$BUILD_TRIPLET --host=$HOST_TRIPLET $CONTRIBFLAGS > $out
 
 make list
 if [ "$CONTRIBFROMSOURCE" != "yes" ]; then


=====================================
extras/package/macosx/configure.sh
=====================================
@@ -11,7 +11,6 @@ OPTIONS="
         --enable-macosx
         --enable-merge-ffmpeg
         --enable-osx-notifications
-        --enable-faad
         --enable-flac
         --enable-theora
         --enable-shout


=====================================
extras/package/win32/build.sh
=====================================
@@ -38,17 +38,17 @@ OPTIONS:
    -z            Build without GUI (libvlc only)
    -o <path>     Install the built binaries in the absolute path
    -m            Build with Meson rather than autotools
+   -g <g|l|a>    Select the license of contribs
+                     g: GPLv3 (default)
+                     l: LGPLv3 + ad-clauses
+                     a: LGPLv2 + ad-clauses
 EOF
 }
 
 ARCH="x86_64"
-while getopts "hra:pcli:W:sb:dD:xS:uwzo:m" OPTION
+while getopts "hra:pcli:W:sb:dD:xS:uwzo:mg:" OPTION
 do
      case $OPTION in
-         h)
-             usage
-             exit 1
-         ;;
          r)
              RELEASE="yes"
              INSTALLER="r"
@@ -105,6 +105,13 @@ do
          m)
              BUILD_MESON="yes"
          ;;
+         g)
+             LICENSE=$OPTARG
+         ;;
+         h|*)
+             usage
+             exit 1
+         ;;
      esac
 done
 shift $(($OPTIND - 1))
@@ -220,6 +227,23 @@ if [ ! -z "$WIXPATH" ]; then
     CONTRIBFLAGS="$CONTRIBFLAGS --enable-wix"
 fi
 
+case $LICENSE in
+    l)
+        # LGPL v3 + ad-clauses
+        CONTRIBFLAGS="$CONTRIBFLAGS --disable-gpl --enable-ad-clauses"
+        CONFIGFLAGS="$CONFIGFLAGS --disable-a52 --enable-live555"
+    ;;
+    a)
+        # LGPL v2.1 + ad-clauses
+        CONTRIBFLAGS="$CONTRIBFLAGS --disable-gpl --disable-gnuv3 --enable-ad-clauses"
+        CONFIGFLAGS="$CONFIGFLAGS --disable-a52"
+    ;;
+    g|*)
+        # GPL v3
+        CONFIGFLAGS="$CONFIGFLAGS --enable-live555"
+    ;;
+esac
+
 export PATH="$PWD/contrib/$CONTRIB_PREFIX/bin":"$PATH"
 
 if [ "$INTERACTIVE" = "yes" ]; then


=====================================
extras/package/win32/configure.sh
=====================================
@@ -9,7 +9,6 @@ OPTIONS="
       --enable-dca
       --enable-libass
       --enable-schroedinger
-      --enable-live555
       --enable-shout
       --enable-goom
       --enable-sse



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/05c8dd3f5f848731a87576f56e2af27ea2bf2b4a...82faf7932af044cd93c841bc2e53c26216fe0d07

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/05c8dd3f5f848731a87576f56e2af27ea2bf2b4a...82faf7932af044cd93c841bc2e53c26216fe0d07
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list