Browse Source

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.
pull/162/head
Steve Lhomme 3 years ago
parent
commit
d1dff550bc
  1. 25
      extras/package/macosx/build.sh
  2. 1
      extras/package/macosx/configure.sh

25
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,6 +168,22 @@ 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

1
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

Loading…
Cancel
Save