Mercurial > vanilla
comparison multimedia/gst-plugins-base/gst-plugins-base.sh @ 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 | |
children | e91fbcb3d1ef |
comparison
equal
deleted
inserted
replaced
710:8104a57ba6ca | 711:5e8b6691ded2 |
---|---|
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 # TODO: implements options VISUAL, TREMOR | |
19 | |
20 PKGNAME=gst-plugins-base | |
21 PKGVERSION=1.16.0 | |
22 PKGREVISION=1 | |
23 PKGLICENSE="GPLv2" | |
24 PKGSUMMARY="gstreamer base plugins" | |
25 PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-base/$PKGNAME-$PKGVERSION.tar.xz" | |
26 PKGDEPENDS="dev/meson:build multimedia/gstreamer" | |
27 PKGOPTIONS="ALSA CDPARANOIA PANGO NLS OGG OPUS THEORA VORBIS X" | |
28 | |
29 : ${CC:=clang} | |
30 : ${CFLAGS:=-O2} | |
31 : ${CXX:=clang++} | |
32 : ${CXXFLAGS:=-O2} | |
33 : ${LDFLAGS:=} | |
34 : ${ALSA:=yes} | |
35 : ${CDPARANOIA:=yes} | |
36 : ${PANGO:=yes} | |
37 : ${OGG:=yes} | |
38 : ${OPUS:=yes} | |
39 : ${THEORA:=yes} | |
40 : ${VORBIS:=yes} | |
41 : ${X:=yes} | |
42 | |
43 if [ "$ALSA" = "yes" ]; then | |
44 PKGDEPENDS="audio/alsa-lib $PKGDEPENDS" | |
45 with_alsa="-D alsa=enabled" | |
46 else | |
47 with_alsa="-D alsa=disabled" | |
48 fi | |
49 | |
50 if [ "$CDPARANOIA" = "yes" ]; then | |
51 PKGDEPENDS="audio/cdparanoia $PKGDEPENDS" | |
52 with_cdparanoia="-D cdparanoia=enabled" | |
53 else | |
54 with_cdparanoia="-D cdparanoia=disabled" | |
55 fi | |
56 | |
57 if [ "$PANGO" = "yes" ]; then | |
58 PKGDEPENDS="fonts/pango $PKGDEPENDS" | |
59 with_pango="-D pango=enabled" | |
60 else | |
61 with_pango="-D pango=disabled" | |
62 fi | |
63 | |
64 if [ "$OGG" = "yes" ]; then | |
65 PKGDEPENDS="audio/libogg $PKGDEPENDS" | |
66 with_ogg="-D ogg=enabled" | |
67 else | |
68 with_ogg="-D ogg=disabled" | |
69 fi | |
70 | |
71 if [ "$OPUS" = "yes" ]; then | |
72 PKGDEPENDS="audio/opus $PKGDEPENDS" | |
73 with_opus="-D opus=enabled" | |
74 else | |
75 with_opus="-D opus=disabled" | |
76 fi | |
77 | |
78 if [ "$THEORA" = "yes" ]; then | |
79 PKGDEPENDS="multimedia/libtheora $PKGDEPENDS" | |
80 with_theora="-D theora=enabled" | |
81 else | |
82 with_theora="-D theora=disabled" | |
83 fi | |
84 | |
85 if [ "$VORBIS" = "yes" ]; then | |
86 PKGDEPENDS="audio/libvorbis $PKGDEPENDS" | |
87 with_vorbis="-D vorbis=enabled" | |
88 else | |
89 with_vorbis="-D vorbis=disabled" | |
90 fi | |
91 | |
92 if [ "$X" = "yes" ]; then | |
93 PKGDEPENDS="x11/libxshmfence $PKGDEPENDS" | |
94 with_x="-D x11=enabled -Dxshm=enabled" | |
95 else | |
96 with_x="-D x11=disabled -Dxshm=disabled" | |
97 fi | |
98 | |
99 build() | |
100 { | |
101 rm -rf $PKGNAME-$PKGVERSION | |
102 tar xvf $PKGNAME-$PKGVERSION.tar.xz | |
103 cd $PKGNAME-$PKGVERSION | |
104 | |
105 CC="$CC" \ | |
106 CFLAGS="$CFLAGS" \ | |
107 CXX="$CXX" \ | |
108 CXXFLAGS="$CXXFLAGS" \ | |
109 LDFLAGS="$LDFLAGS" \ | |
110 meson \ | |
111 --prefix / \ | |
112 --buildtype release \ | |
113 --default-library shared \ | |
114 . build \ | |
115 -D tests=disabled \ | |
116 $with_alsa \ | |
117 $with_cdparanoia \ | |
118 $with_pango \ | |
119 $with_ogg \ | |
120 $with_opus \ | |
121 $with_theora \ | |
122 $with_vorbis \ | |
123 $with_x | |
124 CC="$CC" ninja -C build | |
125 DESTDIR=$DESTDIR ninja -C build install | |
126 | |
127 cd .. | |
128 rm -rf $PKGNAME-$PKGVERSION | |
129 } | |
130 |