Mercurial > vanilla
changeset 711:5e8b6691ded2
multimedia/gst-plugins-base: initial import, closes #1725
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 02 Aug 2019 21:00:00 +0200 |
parents | 8104a57ba6ca |
children | 0950e7783fde |
files | multimedia/gst-plugins-base/gst-plugins-base.sh multimedia/gst-plugins-base/gst-plugins-base.sha1 |
diffstat | 2 files changed, 131 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/multimedia/gst-plugins-base/gst-plugins-base.sh Fri Aug 02 21:00:00 2019 +0200 @@ -0,0 +1,130 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +# TODO: implements options VISUAL, TREMOR + +PKGNAME=gst-plugins-base +PKGVERSION=1.16.0 +PKGREVISION=1 +PKGLICENSE="GPLv2" +PKGSUMMARY="gstreamer base plugins" +PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-base/$PKGNAME-$PKGVERSION.tar.xz" +PKGDEPENDS="dev/meson:build multimedia/gstreamer" +PKGOPTIONS="ALSA CDPARANOIA PANGO NLS OGG OPUS THEORA VORBIS X" + +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${CXX:=clang++} +: ${CXXFLAGS:=-O2} +: ${LDFLAGS:=} +: ${ALSA:=yes} +: ${CDPARANOIA:=yes} +: ${PANGO:=yes} +: ${OGG:=yes} +: ${OPUS:=yes} +: ${THEORA:=yes} +: ${VORBIS:=yes} +: ${X:=yes} + +if [ "$ALSA" = "yes" ]; then + PKGDEPENDS="audio/alsa-lib $PKGDEPENDS" + with_alsa="-D alsa=enabled" +else + with_alsa="-D alsa=disabled" +fi + +if [ "$CDPARANOIA" = "yes" ]; then + PKGDEPENDS="audio/cdparanoia $PKGDEPENDS" + with_cdparanoia="-D cdparanoia=enabled" +else + with_cdparanoia="-D cdparanoia=disabled" +fi + +if [ "$PANGO" = "yes" ]; then + PKGDEPENDS="fonts/pango $PKGDEPENDS" + with_pango="-D pango=enabled" +else + with_pango="-D pango=disabled" +fi + +if [ "$OGG" = "yes" ]; then + PKGDEPENDS="audio/libogg $PKGDEPENDS" + with_ogg="-D ogg=enabled" +else + with_ogg="-D ogg=disabled" +fi + +if [ "$OPUS" = "yes" ]; then + PKGDEPENDS="audio/opus $PKGDEPENDS" + with_opus="-D opus=enabled" +else + with_opus="-D opus=disabled" +fi + +if [ "$THEORA" = "yes" ]; then + PKGDEPENDS="multimedia/libtheora $PKGDEPENDS" + with_theora="-D theora=enabled" +else + with_theora="-D theora=disabled" +fi + +if [ "$VORBIS" = "yes" ]; then + PKGDEPENDS="audio/libvorbis $PKGDEPENDS" + with_vorbis="-D vorbis=enabled" +else + with_vorbis="-D vorbis=disabled" +fi + +if [ "$X" = "yes" ]; then + PKGDEPENDS="x11/libxshmfence $PKGDEPENDS" + with_x="-D x11=enabled -Dxshm=enabled" +else + with_x="-D x11=disabled -Dxshm=disabled" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar xvf $PKGNAME-$PKGVERSION.tar.xz + cd $PKGNAME-$PKGVERSION + + CC="$CC" \ + CFLAGS="$CFLAGS" \ + CXX="$CXX" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + meson \ + --prefix / \ + --buildtype release \ + --default-library shared \ + . build \ + -D tests=disabled \ + $with_alsa \ + $with_cdparanoia \ + $with_pango \ + $with_ogg \ + $with_opus \ + $with_theora \ + $with_vorbis \ + $with_x + CC="$CC" ninja -C build + DESTDIR=$DESTDIR ninja -C build install + + cd .. + rm -rf $PKGNAME-$PKGVERSION +} +