Mercurial > vanilla
view multimedia/gst-plugins-good/gst-plugins-good.sh @ 1149:ee4b956157fe
kernel/linux-headers: rename from lib/linux-headers
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 25 Sep 2019 21:10:00 +0200 |
parents | 297b5eef115e |
children | 6710613b88b9 |
line wrap: on
line source
#!/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. # PKGNAME=gst-plugins-good PKGVERSION=1.16.0 PKGREVISION=1 PKGLICENSE="GPLv20" PKGSUMMARY="gstreamer good plugins" PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-good/$PKGNAME-$PKGVERSION.tar.xz" PKGDEPENDS="gst-plugins-base gstreamer meson:build" PKGOPTIONS="BZIP2 CAIRO FLAC GTK JACK JPEG LIBSOUP MP2 MP3 NLS OSS PNG PULSEAUDIO QT TAGLIB SHOUT SPEEX WAVPACK X" : ${CC:=clang} : ${CFLAGS:=-O2} : ${CXX:=clang++} : ${CXXFLAGS:=-O2} : ${LDFLAGS:=} : ${BZIP2:=yes} : ${CAIRO:=yes} : ${FLAC:=yes} : ${GTK:=yes} : ${JACK:=yes} : ${JPEG:=yes} : ${LIBSOUP:=yes} : ${MP2:=yes} : ${MP3:=lame mpg123} : ${NLS:=yes} : ${OSS:=yes} : ${PNG:=yes} : ${PULSEAUDIO:=yes} : ${QT:=no} : ${TAGLIB:=yes} : ${SHOUT:=yes} : ${SPEEX:=yes} : ${WAVPACK:=yes} : ${X:=yes} if [ "$BZIP2" = "yes" ]; then PKGDEPENDS="bzip2 $PKGDEPENDS" with_bzip2="-D bz2=enabled" else with_bzip2="-D bz2=disabled" fi if [ "$CAIRO" = "yes" ]; then PKGDEPENDS="cairo $PKGDEPENDS" with_cairo="-D cairo=enabled" else with_cairo="-D cairo=disabled" fi if [ "$FLAC" = "yes" ]; then PKGDEPENDS="flac $PKGDEPENDS" with_flac="-D flac=enabled" else with_flac="-D flac=disabled" fi if [ "$GTK" = "yes" ]; then PKGDEPENDS="gtk gdk-pixbuf $PKGDEPENDS" with_gtk="-D gtk3=enabled -D gdk-pixbuf=enabled" else with_gtk="-D gtk3=disabled -D gdk-pixbuf=disabled" fi if [ "$JACK" = "yes" ]; then PKGDEPENDS="jack2 $PKGDEPENDS" with_jack="-D jack=enabled" else with_jack="-D jack=disabled" fi if [ "$JPEG" = "yes" ]; then PKGDEPENDS="libjpeg-turbo $PKGDEPENDS" with_jpeg="-D jpeg=enabled" else with_jpeg="-D jpeg=disabled" fi if [ "$LIBSOUP" = "yes" ]; then PKGDEPENDS="libsoup $PKGDEPENDS" with_libsoup="-D soup=enabled" else with_libsoup="-D soup=disabled" fi if [ "$MP2" = "yes" ]; then PKGDEPENDS="twolame $PKGDEPENDS" with_mp2="-D twolame=enabled" else with_mp2="-D twolame=disabled" fi if [ -z "${MP3##*mpg123*}" ]; then PKGDEPENDS="mpg123 $PKGDEPENDS" with_mpg123="-D mpg123=enabled" else with_mpg123="-D mpg123=disabled" fi if [ -z "${MP3##*lame*}" ]; then PKGDEPENDS="lame $PKGDEPENDS" with_lame="-D lame=enabled" else with_lame="-D lame=disabled" fi if [ "$NLS" = "yes" ]; then PKGDEPENDS="gettext $PKGDEPENDS" with_nls="-D nls=enabled" else with_nls="-D nls=disabled" fi if [ "$OSS" = "yes" ]; then PKGDEPENDS="linux-headers:build $PKGDEPENDS" with_oss="-D oss=enabled" else with_oss="-D oss=disabled" fi if [ "$PNG" = "yes" ]; then PKGDEPENDS="libpng $PKGDEPENDS" with_png="-D png=enabled" else with_png="-D png=disabled" fi if [ "$PULSEAUDIO" = "yes" ]; then PKGDEPENDS="pulseaudio $PKGDEPENDS" with_pulseaudio="-D pulse=enabled" else with_pulseaudio="-D pulse=disabled" fi if [ "$QT" = "yes" ]; then PKGDEPENDS="qtbase $PKGDEPENDS" with_qt="-D qt5=enabled" else with_qt="-D qt5=disabled" fi if [ "$TAGLIB" = "yes" ]; then PKGDEPENDS="taglib $PKGDEPENDS" with_taglib="-D taglib=enabled" else with_taglib="-D taglib=disabled" fi if [ "$SHOUT" = "yes" ]; then PKGDEPENDS="libshout $PKGDEPENDS" with_shout="-D shout2=enabled" else with_shout="-D shout2=disabled" fi if [ "$SPEEX" = "yes" ]; then PKGDEPENDS="speex $PKGDEPENDS" with_speex="-D speex=enabled" else with_speex="-D speex=disabled" fi if [ "$WAVPACK" = "yes" ]; then PKGDEPENDS="wavpack $PKGDEPENDS" with_wavpack="-D wavpack=enabled" else with_wavpack="-D wavpack=disabled" fi if [ "$X" = "yes" ]; then PKGDEPENDS="libx11 libxdamage libxext libxfixes $PKGDEPENDS" with_x="-D ximagesrc=enabled" with_x="-D ximagesrc-xshm=enabled $with_x" with_x="-D ximagesrc-xfixes=enabled $with_x" with_x="-D ximagesrc-xdmage=enabled $with_x" else with_x="-D ximagesrc=disabled" with_x="-D ximagesrc-xshm=disabled $with_x" with_x="-D ximagesrc-xfixes=disabled $with_x" with_x="-D ximagesrc-xdmage=disabled $with_x" 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 . build \ --prefix / \ --buildtype release \ --default-library shared \ -D tests=disabled \ $with_bzip2 \ $with_cairo \ $with_flac \ $with_gtk \ $with_jack \ $with_jpeg \ $with_lame \ $with_libsoup \ $with_mp2 \ $with_mpg123 \ $with_nls \ $with_oss \ $with_png \ $with_pulseaudio \ $with_qt \ $with_shout \ $with_speex \ $with_taglib \ $with_wavpack \ $with_x CC="$CC" ninja -C build DESTDIR=$DESTDIR ninja -C build install cd .. rm -rf $PKGNAME-$PKGVERSION }