comparison multimedia/gstreamer/gstreamer.sh @ 674:cff7770ad21a

multimedia/gstreamer: initial import, closes #1724
author David Demelier <markand@malikania.fr>
date Thu, 01 Aug 2019 20:25:00 +0200
parents
children e91fbcb3d1ef
comparison
equal deleted inserted replaced
673:095df05b9e78 674:cff7770ad21a
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 PKGNAME=gstreamer
19 PKGVERSION=1.16.0
20 PKGREVISION=1
21 PKGLICENSE="LGPLv20"
22 PKGSUMMARY="multimedia streaming framework"
23 PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gstreamer/$PKGNAME-$PKGVERSION.tar.xz"
24 PKGDEPENDS="dev/meson:build lib/glib"
25 PKGOPTIONS="INTROSPECTION NLS"
26
27 : ${CC:=clang}
28 : ${CFLAGS:=-O2}
29 : ${LDFLAGS:=}
30 : ${INTROSPECTION:=yes}
31 : ${NLS:=yes}
32
33 if [ "$INTROSPECTION" = "yes" ]; then
34 PKGDEPENDS="dev/gobject-introspection:build $PKGDEPENDS"
35 with_introspection="-D introspection=enabled"
36 else
37 with_introspection="-D introspection=disabled"
38 fi
39
40 if [ "$NLS" = "yes" ]; then
41 PKGDEPENDS="core/gettext:build $PKGDEPENDS"
42 with_nls="-D nls=enabled"
43 else
44 with_nls="-D nls=disabled"
45 fi
46
47 build()
48 {
49 rm -rf $PKGNAME-$PKGVERSION
50 tar xvf $PKGNAME-$PKGVERSION.tar.xz
51 cd $PKGNAME-$PKGVERSION
52
53 CC="$CC" \
54 CFLAGS="$CFLAGS" \
55 LDFLAGS="$LDFLAGS" \
56 meson \
57 --prefix / \
58 --buildtype release \
59 --default-library shared \
60 -D tests=disabled \
61 $with_introspection \
62 $with_nls \
63 . build
64 CC="$CC" ninja -C build
65 DESTDIR=$DESTDIR ninja -C build install
66
67 cd ..
68 rm -rf $PKGNAME-$PKGVERSION
69 }
70