contrib: add option to turn off (L)GPL version 3
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Sep 2017 16:30:20 +0000 (19:30 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Sep 2017 18:45:30 +0000 (21:45 +0300)
contrib/bootstrap
contrib/src/main.mak

index 218487e..7738938 100755 (executable)
@@ -31,6 +31,7 @@ usage()
        echo "  --disable-sout   configure to not build stream output packages"
        echo "  --enable-small   optimize libraries for size with slight speed decrease [DANGEROUS]"
        echo "  --disable-gpl    configure to not build viral GPL code"
+       echo "  --disable-gnuv3  configure to not build version 3 (L)GPL code"
        echo "  --disable-optim  disable optimization in libraries"
 }
 
@@ -43,6 +44,7 @@ BUILD_ENCODERS="1"
 BUILD_NETWORK="1"
 BUILD_DISCS="1"
 GPL="1"
+GNUV3="1"
 WITH_OPTIMIZATION="1"
 
 if test ! -f "../../contrib/src/main.mak"
@@ -85,6 +87,9 @@ do
                --disable-gpl)
                        GPL=
                        ;;
+               --disable-gnuv3)
+                       GNUV3=
+                       ;;
                --disable-*)
                        PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
                        ;;
@@ -246,6 +251,7 @@ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
 test -z "$BUILD_NETWORK" || add_make_enabled "BUILD_NETWORK"
 test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
 test -z "$GPL" || add_make_enabled "GPL"
+test -z "$GNUV3" || add_make_enabled "GNUV3"
 test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
 test "`uname -o`" != "Msys" || add_make "CMAKE_GENERATOR := -G \"MSYS Makefiles\""
 
index 1d9b622..ba97ba3 100644 (file)
@@ -358,6 +358,13 @@ REQUIRE_GPL =
 else
 REQUIRE_GPL = @echo "Package \"$<\" requires the GPL license." >&2; exit 1
 endif
+ifdef GNUV3
+REQUIRE_GNUV3 =
+else
+REQUIRE_GNUV3 = \
+       @echo "Package \"$<\" requires the version 3 of GNU licenses." >&2; \
+       exit 1
+endif
 
 #
 # Per-package build rules