Mercurial > vanilla
comparison multimedia/gst-plugins-bad/gst-plugins-bad.sh @ 738:eae54468321b
multimedia/gst-plugins-bad: initial import, closes #1728
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 06 Aug 2019 20:36:00 +0200 |
parents | |
children | e91fbcb3d1ef |
comparison
equal
deleted
inserted
replaced
737:24249b89d047 | 738:eae54468321b |
---|---|
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: add CHROMAPRINT, LADSPA, MMS, MODPLUG, OPENAL, H264, JPEG (openjpeg) | |
19 | |
20 PKGNAME=gst-plugins-bad | |
21 PKGVERSION=1.16.0 | |
22 PKGREVISION=1 | |
23 PKGLICENSE="GPLv2" | |
24 PKGSUMMARY="gstreamer bad plugins" | |
25 PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-bad/$PKGNAME-$PKGVERSION.tar.xz" | |
26 PKGDEPENDS="dev/meson:build multimedia/gstreamer" | |
27 PKGOPTIONS="BLUETOOTH BZIP2 CURL DVD FAAC FAAD KMS SNDFILE WAYLAND X" | |
28 | |
29 : ${CC:=clang} | |
30 : ${CFLAGS:=-O2} | |
31 : ${CXX:=clang++} | |
32 : ${CXXFLAGS:=-O2} | |
33 : ${LDFLAGS:=} | |
34 : ${BLUETOOTH:=yes} | |
35 : ${BZIP2:=yes} | |
36 : ${CURL:=yes} | |
37 : ${DVD:=yes} | |
38 : ${FAAC:=yes} | |
39 : ${FAAD:=yes} | |
40 : ${KMS:=yes} | |
41 : ${SNDFILE:=yes} | |
42 : ${WAYLAND:=yes} | |
43 : ${X:=yes} | |
44 | |
45 if [ "$BLUETOOTH" = "yes" ]; then | |
46 PKGDEPENDS="bluetooth/bluez $PKGDEPENDS" | |
47 with_bluetooth="-D bluez=enabled" | |
48 else | |
49 with_bluetooth="-D bluez=disabled" | |
50 fi | |
51 | |
52 if [ "$BZIP2" = "yes" ]; then | |
53 PKGDEPENDS="compression/bzip2 $PKGDEPENDS" | |
54 with_bzip2="-D bz2=enabled" | |
55 else | |
56 with_bzip2="-D bz2=disabled" | |
57 fi | |
58 | |
59 if [ "$CURL" = "yes" ]; then | |
60 PKGDEPENDS="network/curl $PKGDEPENDS" | |
61 with_curl="-D curl=enabled" | |
62 else | |
63 with_curl="-D curl=disabled" | |
64 fi | |
65 | |
66 if [ "$DVD" = "yes" ]; then | |
67 PKGDEPENDS="multimedia/libdvdnav multimedia/libdvdread $PKGDEPENDS" | |
68 with_dvd="-D resindvd=enabled" | |
69 else | |
70 with_dvd="-D resindvd=disabled" | |
71 fi | |
72 | |
73 if [ "$FAAC" = "yes" ]; then | |
74 PKGDEPENDS="audio/faac $PKGDEPENDS" | |
75 with_faac="-D faac=enabled" | |
76 else | |
77 with_faac="-D faac=disabled" | |
78 fi | |
79 | |
80 if [ "$FAAD" = "yes" ]; then | |
81 PKGDEPENDS="audio/faad2 $PKGDEPENDS" | |
82 with_faac="-D faad=enabled" | |
83 else | |
84 with_faac="-D faad=disabled" | |
85 fi | |
86 | |
87 if [ "$KMS" = "yes" ]; then | |
88 PKGDEPENDS="graphics/libdrm $PKGDEPENDS" | |
89 with_kms="-D kms=enabled" | |
90 else | |
91 with_kms="-D kms=disabled" | |
92 fi | |
93 | |
94 if [ "$SNDFILE" = "yes" ]; then | |
95 PKGDEPENDS="audio/libsndfile $PKGDEPENDS" | |
96 with_sndfile="-D sndfile=enabled" | |
97 else | |
98 with_sndfile="-D sndfile=disabled" | |
99 fi | |
100 | |
101 if [ "$WAYLAND" = "yes" ]; then | |
102 PKGDEPENDS="graphics/wayland graphics/wayland-protocols $PKGDEPENDS" | |
103 with_wayland="-D wayland=enabled" | |
104 else | |
105 with_wayland="-D wayland=disabled" | |
106 fi | |
107 | |
108 if [ "$X" = "yes" ]; then | |
109 PKGDEPENDS="x11/libx11 $PKGDEPENDS" | |
110 with_x="-D x11=enabled" | |
111 else | |
112 with_x="-D x11=disabled" | |
113 fi | |
114 | |
115 build() | |
116 { | |
117 rm -rf $PKGNAME-$PKGVERSION | |
118 tar xvf $PKGNAME-$PKGVERSION.tar.xz | |
119 cd $PKGNAME-$PKGVERSION | |
120 | |
121 CC="$CC" \ | |
122 CFLAGS="$CFLAGS" \ | |
123 CXX="$CXX" \ | |
124 CXXFLAGS="$CXXFLAGS" \ | |
125 LDFLAGS="$LDFLAGS" \ | |
126 meson \ | |
127 --prefix / \ | |
128 --buildtype release \ | |
129 --default-library shared \ | |
130 . build \ | |
131 -D tests=disabled \ | |
132 $with_bluetooth \ | |
133 $with_bzip2 \ | |
134 $with_curl \ | |
135 $with_dvd \ | |
136 $with_faac \ | |
137 $with_faad \ | |
138 $with_kms \ | |
139 $with_sndfile \ | |
140 $with_wayland \ | |
141 $with_x | |
142 CC="$CC" ninja -C build | |
143 DESTDIR=$DESTDIR ninja -C build install | |
144 | |
145 cd .. | |
146 rm -rf $PKGNAME-$PKGVERSION | |
147 } | |
148 |