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

contrib: ensure GPL is enabled if needed

Not including a package in $PKGS only prevents it from being built
as a direct VLC dependency. This patch adds a sanity check that any
GPL package is not pulled either as a dependency or a manual explicit
request.
parent 41e1fa53
......@@ -23,6 +23,7 @@ endif
$(MOVE)
.a52: a52dec
$(REQUIRE_GPL)
$(RECONF)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
cd $</liba52 && $(MAKE) install
......
......@@ -25,6 +25,7 @@ libdca: libdca-$(DCA_VERSION).tar.bz2 .sum-dca
$(MOVE)
.dca: libdca
$(REQUIRE_GPL)
$(RECONF)
cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -std=gnu89" ./configure $(HOSTCONF)
cd $< && $(MAKE) -C include install
......
......@@ -25,6 +25,7 @@ dvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2 .sum-dvdnav
DEPS_dvdnav = dvdcss dvdread
.dvdnav: dvdnav .dvdcss .dvdread
$(REQUIRE_GPL)
$(RECONF) -I m4
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --disable-examples
cd $< && $(MAKE) install
......
......@@ -24,6 +24,7 @@ dvdread: libdvdread-$(LIBDVDREAD_VERSION).tar.bz2 .sum-dvdread
DEPS_dvdread = dvdcss
.dvdread: dvdread .dvdcss
$(REQUIRE_GPL)
$(RECONF) -I m4
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --with-libdvdcss
cd $< && $(MAKE) install
......
......@@ -28,6 +28,7 @@ endif
$(MOVE)
.faad2: faad2
$(REQUIRE_GPL)
$(RECONF)
cd $< && $(HOSTVARS) ./configure --without-drm $(HOSTCONF)
cd $< && sed -i.orig "s/shrext_cmds/shrext/g" libtool
......
......@@ -24,6 +24,7 @@ libmpeg2: libmpeg2-$(LIBMPEG2_VERSION).tar.gz .sum-libmpeg2
$(MOVE)
.libmpeg2: libmpeg2
$(REQUIRE_GPL)
$(RECONF)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --without-x --disable-sdl
cd $</libmpeg2 && $(MAKE) && $(MAKE) install
......
......@@ -34,6 +34,7 @@ endif
$(MOVE)
.mad: libmad
$(REQUIRE_GPL)
$(RECONF)
ifdef HAVE_IOS
cd $< && $(HOSTVARS) CCAS="$(AS)" CFLAGS="$(CFLAGS) -O3" ./configure $(HOSTCONF) $(MAD_CONF)
......
......@@ -353,6 +353,12 @@ RECONF = mkdir -p -- $(PREFIX)/share/aclocal && \
CMAKE = cmake . -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake) \
-DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CMAKE_GENERATOR)
ifdef GPL
REQUIRE_GPL =
else
REQUIRE_GPL = @echo "Package \"$<\" requires the GPL license." >&2; exit 1
endif
#
# Per-package build rules
#
......
......@@ -121,6 +121,7 @@ postproc: postproc-$(POSTPROC_VERSION).tar.xz .sum-postproc
$(MOVE)
.postproc: postproc
$(REQUIRE_GPL)
cd $< && $(HOSTVARS) ./configure \
--extra-cflags="$(EXTRA_CFLAGS)" \
--extra-ldflags="$(LDFLAGS)" $(POSTPROCCONF) \
......
......@@ -20,6 +20,7 @@ samplerate: libsamplerate-$(SAMPLERATE_VERSION).tar.gz .sum-samplerate
$(MOVE)
.samplerate: samplerate
$(REQUIRE_GPL)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
cd $< && $(MAKE) -C src install && $(MAKE) install-data
touch $@
......@@ -22,6 +22,7 @@ sidplay-libs: sidplay-libs-$(SID_VERSION).tar.gz .sum-sidplay2
$(MOVE)
.sidplay2: sidplay-libs
$(REQUIRE_GPL)
for d in . libsidplay builders resid builders/resid-builder \
builders/hardsid-builder libsidutils ; \
do \
......
......@@ -79,11 +79,13 @@ x262: x262-git.tar.gz .sum-x262
.x264: x264
$(REQUIRE_GPL)
cd $< && $(HOSTVARS) ./configure $(X264CONF)
cd $< && $(MAKE) install
touch $@
.x26410b: x26410b
$(REQUIRE_GPL)
cd $< && $(HOSTVARS) ./configure $(X264CONF) --bit-depth=10
cd $< && sed -i -e 's/libx264/libx26410b/g' Makefile config.mak
cd $< && sed -i -e 's/x264/x26410b/g' x264.pc
......@@ -93,6 +95,7 @@ x262: x262-git.tar.gz .sum-x262
touch $@
.x262: x262
$(REQUIRE_GPL)
cd $< && sed -i -e 's/x264/x262/g' configure
cd $< && sed -i -e 's/x264_config/x262_config/g' *.h Makefile *.c
cd $< && $(HOSTVARS) ./configure $(X264CONF)
......
......@@ -34,6 +34,7 @@ endif
$(MOVE)
.x265: x265 toolchain.cmake
$(REQUIRE_GPL)
cd $</source && $(HOSTVARS_PIC) $(CMAKE) -DENABLE_SHARED=OFF
cd $</source && $(MAKE) install
sed -e s/'[^ ]*clang_rt[^ ]*'//g -i.orig "$(PREFIX)/lib/pkgconfig/x265.pc"
......
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