changeset 793:132a50bd2bb9

multimedia: add more options to gst-plugins-*
author David Demelier <markand@malikania.fr>
date Mon, 12 Aug 2019 17:03:32 +0200
parents a6030a75ce9a
children 9a09b85f5ac0
files multimedia/gst-plugins-bad/gst-plugins-bad.sh multimedia/gst-plugins-good/gst-plugins-good.sh multimedia/gst-plugins-ugly/gst-plugins-ugly.sh
diffstat 3 files changed, 66 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/multimedia/gst-plugins-bad/gst-plugins-bad.sh	Mon Aug 12 17:01:02 2019 +0200
+++ b/multimedia/gst-plugins-bad/gst-plugins-bad.sh	Mon Aug 12 17:03:32 2019 +0200
@@ -15,7 +15,7 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
 
-# TODO: add CHROMAPRINT, LADSPA, MMS, MODPLUG, OPENAL, H264, JPEG (openjpeg)
+# TODO: add CHROMAPRINT, MMS, MODPLUG, LADSPA
 
 PKGNAME=gst-plugins-bad
 PKGVERSION=1.16.0
@@ -24,7 +24,7 @@
 PKGSUMMARY="gstreamer bad plugins"
 PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-bad/$PKGNAME-$PKGVERSION.tar.xz"
 PKGDEPENDS="dev/meson:build multimedia/gstreamer"
-PKGOPTIONS="BLUETOOTH BZIP2 CURL DVD FAAC FAAD KMS SNDFILE WAYLAND X"
+PKGOPTIONS="BLUETOOTH BZIP2 CURL DVD FAAC FAAD H264 JPEG KMS OPENAL SNDFILE WAYLAND X"
 
 : ${CC:=clang}
 : ${CFLAGS:=-O2}
@@ -37,7 +37,10 @@
 : ${DVD:=yes}
 : ${FAAC:=yes}
 : ${FAAD:=yes}
+: ${H264:=no}           # BROKEN: does not compile with our version of openh264
+: ${JPEG:=yes}
 : ${KMS:=yes}
+: ${OPENAL:=yes}
 : ${SNDFILE:=yes}
 : ${WAYLAND:=yes}
 : ${X:=yes}
@@ -84,6 +87,20 @@
 	with_faac="-D faad=disabled"
 fi
 
+if [ "$H264" = "yes" ]; then
+	PKGDEPENDS="multimedia/openh264 $PKGDEPENDS"
+	with_h264="-D openh264=enabled"
+else
+	with_h264="-D openh264=disabled"
+fi
+
+if [ "$JPEG" = "yes" ]; then
+	PKGDEPENDS="graphics/openjpeg $PKGDEPENDS"
+	with_jpeg="-D openjpeg=enabled"
+else
+	with_jpeg="-D openjpeg=disabled"
+fi
+
 if [ "$KMS" = "yes" ]; then
 	PKGDEPENDS="graphics/libdrm $PKGDEPENDS"
 	with_kms="-D kms=enabled"
@@ -91,6 +108,13 @@
 	with_kms="-D kms=disabled"
 fi
 
+if [ "$OPENAL" = "yes" ]; then
+	PKGDEPENDS="audio/openal-soft $PKGDEPENDS"
+	with_openal="-D openal=enabled"
+else
+	with_openal="-D openal=disabled"
+fi
+
 if [ "$SNDFILE" = "yes" ]; then
 	PKGDEPENDS="audio/libsndfile $PKGDEPENDS"
 	with_sndfile="-D sndfile=enabled"
@@ -134,7 +158,10 @@
 		$with_dvd \
 		$with_faac \
 		$with_faad \
+		$with_h264 \
+		$with_jpeg \
 		$with_kms \
+		$with_openal \
 		$with_sndfile \
 		$with_wayland \
 		$with_x
--- a/multimedia/gst-plugins-good/gst-plugins-good.sh	Mon Aug 12 17:01:02 2019 +0200
+++ b/multimedia/gst-plugins-good/gst-plugins-good.sh	Mon Aug 12 17:03:32 2019 +0200
@@ -15,8 +15,6 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
 
-# TODO: add AALIB, JACK, LIBCACA, and others options.
-
 PKGNAME=gst-plugins-good
 PKGVERSION=1.16.0
 PKGREVISION=1
@@ -24,7 +22,7 @@
 PKGSUMMARY="gstreamer good plugins"
 PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-good/$PKGNAME-$PKGVERSION.tar.xz"
 PKGDEPENDS="dev/meson:build multimedia/gstreamer"
-PKGOPTIONS="BZIP2 CAIRO FLAC GTK JPEG LAME LIBSOUP NLS OSS PNG PULSEAUDIO QT X"
+PKGOPTIONS="BZIP2 CAIRO FLAC GTK JACK JPEG LAME LIBSOUP NLS OSS PNG PULSEAUDIO QT X"
 
 : ${CC:=clang}
 : ${CFLAGS:=-O2}
@@ -35,6 +33,7 @@
 : ${CAIRO:=yes}
 : ${FLAC:=yes}
 : ${GTK:=yes}
+: ${JACK:=yes}
 : ${JPEG:=yes}
 : ${LAME:=yes}
 : ${LIBSOUP:=yes}
@@ -73,6 +72,13 @@
 	with_gtk="-D gtk3=disabled -D gdk-pixbuf=disabled"
 fi
 
+if [ "$JACK" = "yes" ]; then
+	PKGDEPENDS="audio/jack $PKGDEPENDS"
+	with_jack="-D jack=enabled"
+else
+	with_jack="-D jack=disabled"
+fi
+
 if [ "$JPEG" = "yes" ]; then
 	PKGDEPENDS="graphics/libjpeg-turbo $PKGDEPENDS"
 	with_jpeg="-D jpeg=enabled"
@@ -166,6 +172,7 @@
 		$with_flac \
 		$with_gtk \
 		$with_jpeg \
+		$with_jack \
 		$with_lame \
 		$with_libsoup \
 		$with_nls \
@@ -173,11 +180,9 @@
 		$with_png \
 		$with_pulseaudio \
 		$with_qt \
-		$with_x \
-		. build
+		$with_x
 	CC="$CC" ninja -C build
 	DESTDIR=$DESTDIR ninja -C build install
-	sed -i -e "s|prefix=/|prefix=|" $DESTDIR/lib/pkgconfig/*.pc
 
 	cd ..
 	rm -rf $PKGNAME-$PKGVERSION
--- a/multimedia/gst-plugins-ugly/gst-plugins-ugly.sh	Mon Aug 12 17:01:02 2019 +0200
+++ b/multimedia/gst-plugins-ugly/gst-plugins-ugly.sh	Mon Aug 12 17:03:32 2019 +0200
@@ -15,9 +15,6 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
 
-# TODO: add options for A52 AMRNB CDIO X264
-
-
 PKGNAME=gst-plugins-ugly
 PKGVERSION=1.16.0
 PKGREVISION=1
@@ -25,7 +22,23 @@
 PKGSUMMARY="gstreamer ugly plugins"
 PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-ugly/$PKGNAME-$PKGVERSION.tar.xz"
 PKGDEPENDS="dev/meson:build multimedia/gstreamer"
-PKGOPTIONS="DVD"
+PKGOPTIONS="CDIO DVD H264"
+
+: ${CC:=clang}
+: ${CFLAGS:=-O2}
+: ${CXX:=clang++}
+: ${CXXFLAGS:=-O2}
+: ${LDFLAGS:=}
+: ${CDIO:=yes}
+: ${DVD:=yes}
+: ${H264:=yes}
+
+if [ "$CDIO" = "yes" ]; then
+	PKGDEPENDS="multimedia/libcdio $PKGDEPENDS"
+	with_cdio="-D cdio=enabled"
+else
+	with_cdio="-D cdio=disabled"
+fi
 
 if [ "$DVD" = "yes" ]; then
 	PKGDEPENDS="multimedia/libdvdread $PKGDEPENDS"
@@ -34,12 +47,12 @@
 	with_dvd="-D dvdread=disabled"
 fi
 
-: ${CC:=clang}
-: ${CFLAGS:=-O2}
-: ${CXX:=clang++}
-: ${CXXFLAGS:=-O2}
-: ${LDFLAGS:=}
-: ${DVD:=yes}
+if [ "$H264" = "yes" ]; then
+	PKGDEPENDS="multimedia/x264 $PKGDEPENDS"
+	with_h264="-D x264=enabled"
+else
+	with_h264="-D x264=disabled"
+fi
 
 build()
 {
@@ -57,7 +70,9 @@
 		--buildtype release \
 		--default-library shared \
 		-D tests=disabled \
-		$with_dvd
+		$with_cdio \
+		$with_dvd \
+		$with_h264
 	CC="$CC" ninja -C build
 	DESTDIR=$DESTDIR ninja -C build install