Commit 22bdb82c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

contrib: add option to build with advertising clause

This allows build contribs with 4-clause BSD license or similar.
This is not compatible with GPLv2.
parent d50831fb
......@@ -32,6 +32,8 @@ usage()
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 " --enable-ad-clauses configure to build packages with advertising clauses"
echo " (USE AT YOUR OWN LEGAL RISKS)"
echo " --disable-optim disable optimization in libraries"
}
......@@ -45,6 +47,7 @@ BUILD_NETWORK="1"
BUILD_DISCS="1"
GPL="1"
GNUV3="1"
AD_CLAUSES=
WITH_OPTIMIZATION="1"
if test ! -f "../../contrib/src/main.mak"
......@@ -90,6 +93,9 @@ do
--disable-gnuv3)
GNUV3=
;;
--enable-ad-clauses)
AD_CLAUSES=1
;;
--disable-*)
PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
;;
......@@ -105,6 +111,12 @@ do
shift
done
if test -n "$AD_CLAUSES" -a -n "$GPL" -a -z "$GNUV3"
then
echo "Error: advertising clauses are not compatible with GPLv2!" >&2
exit 1
fi
if test -z "$BUILD"
then
echo -n "Guessing build system... "
......@@ -252,6 +264,7 @@ 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 "$AD_CLAUSES" || add_make_enabled "AD_CLAUSES"
test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
test "`uname -o`" != "Msys" || add_make "CMAKE_GENERATOR := -G \"MSYS Makefiles\""
......
......@@ -3,9 +3,7 @@
FREETYPE2_VERSION := 2.7.1
FREETYPE2_URL := $(SF)/freetype/freetype2/$(FREETYPE2_VERSION)/freetype-$(FREETYPE2_VERSION).tar.gz
ifdef GPL
PKGS += freetype2
endif
ifeq ($(call need_pkg,"freetype2"),)
PKGS_FOUND += freetype2
endif
......@@ -23,7 +21,9 @@ freetype: freetype-$(FREETYPE2_VERSION).tar.gz .sum-freetype2
DEPS_freetype2 = zlib $(DEPS_zlib)
.freetype2: freetype
ifndef AD_CLAUSES
$(REQUIRE_GPL)
endif
cd $< && cp builds/unix/install-sh .
sed -i.orig s/-ansi// $</builds/unix/configure
cd $< && GNUMAKE=$(MAKE) $(HOSTVARS) ./configure --with-harfbuzz=no --with-zlib=yes --without-png --with-bzip2=no $(HOSTCONF)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment