Mercurial > vanilla
view multimedia/gst-plugins-bad/gst-plugins-bad.sh @ 909:feb87679bb7b
graphics/giflib: initial import, closes #2211
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 26 Aug 2019 20:20:00 +0200 |
parents | a133976e0783 |
children | ddab65a5b3f5 |
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. # # TODO: add CHROMAPRINT, MMS, MODPLUG, LADSPA PKGNAME=gst-plugins-bad PKGVERSION=1.16.0 PKGREVISION=1 PKGLICENSE="GPLv2" PKGSUMMARY="gstreamer bad plugins" PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-bad/$PKGNAME-$PKGVERSION.tar.xz" PKGDEPENDS="meson:build gstreamer" PKGOPTIONS="BLUETOOTH BZIP2 CURL DVD FAAC FAAD H264 JPEG KMS OPENAL SNDFILE WAYLAND X" : ${CC:=clang} : ${CFLAGS:=-O2} : ${CXX:=clang++} : ${CXXFLAGS:=-O2} : ${LDFLAGS:=} : ${BLUETOOTH:=yes} : ${BZIP2:=yes} : ${CURL:=yes} : ${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} if [ "$BLUETOOTH" = "yes" ]; then PKGDEPENDS="bluez $PKGDEPENDS" with_bluetooth="-D bluez=enabled" else with_bluetooth="-D bluez=disabled" fi if [ "$BZIP2" = "yes" ]; then PKGDEPENDS="bzip2 $PKGDEPENDS" with_bzip2="-D bz2=enabled" else with_bzip2="-D bz2=disabled" fi if [ "$CURL" = "yes" ]; then PKGDEPENDS="curl $PKGDEPENDS" with_curl="-D curl=enabled" else with_curl="-D curl=disabled" fi if [ "$DVD" = "yes" ]; then PKGDEPENDS="libdvdnav libdvdread $PKGDEPENDS" with_dvd="-D resindvd=enabled" else with_dvd="-D resindvd=disabled" fi if [ "$FAAC" = "yes" ]; then PKGDEPENDS="faac $PKGDEPENDS" with_faac="-D faac=enabled" else with_faac="-D faac=disabled" fi if [ "$FAAD" = "yes" ]; then PKGDEPENDS="faad2 $PKGDEPENDS" with_faac="-D faad=enabled" else with_faac="-D faad=disabled" fi if [ "$H264" = "yes" ]; then PKGDEPENDS="openh264 $PKGDEPENDS" with_h264="-D openh264=enabled" else with_h264="-D openh264=disabled" fi if [ "$JPEG" = "yes" ]; then PKGDEPENDS="openjpeg $PKGDEPENDS" with_jpeg="-D openjpeg=enabled" else with_jpeg="-D openjpeg=disabled" fi if [ "$KMS" = "yes" ]; then PKGDEPENDS="libdrm $PKGDEPENDS" with_kms="-D kms=enabled" else with_kms="-D kms=disabled" fi if [ "$OPENAL" = "yes" ]; then PKGDEPENDS="openal-soft $PKGDEPENDS" with_openal="-D openal=enabled" else with_openal="-D openal=disabled" fi if [ "$SNDFILE" = "yes" ]; then PKGDEPENDS="libsndfile $PKGDEPENDS" with_sndfile="-D sndfile=enabled" else with_sndfile="-D sndfile=disabled" fi if [ "$WAYLAND" = "yes" ]; then PKGDEPENDS="wayland wayland-protocols $PKGDEPENDS" with_wayland="-D wayland=enabled" else with_wayland="-D wayland=disabled" fi if [ "$X" = "yes" ]; then PKGDEPENDS="libx11 $PKGDEPENDS" with_x="-D x11=enabled" else with_x="-D x11=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 . build \ --prefix / \ --buildtype release \ --default-library shared \ -D tests=disabled \ $with_bluetooth \ $with_bzip2 \ $with_curl \ $with_dvd \ $with_faac \ $with_faad \ $with_h264 \ $with_jpeg \ $with_kms \ $with_openal \ $with_sndfile \ $with_wayland \ $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 }