Mercurial > vanilla
comparison multimedia/gst-plugins-good/gst-plugins-good.sh @ 723:5316149e8c85
multimedia/gst-plugins-good: initial import, closes #1726
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 05 Aug 2019 19:36:16 +0200 |
parents | |
children | e91fbcb3d1ef |
comparison
equal
deleted
inserted
replaced
722:1ac4747e74bb | 723:5316149e8c85 |
---|---|
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 AALIB, JACK, LIBCACA, and others options. | |
19 | |
20 PKGNAME=gst-plugins-good | |
21 PKGVERSION=1.16.0 | |
22 PKGREVISION=1 | |
23 PKGLICENSE="GPLv2" | |
24 PKGSUMMARY="gstreamer good plugins" | |
25 PKGDOWNLOAD="https://gstreamer.freedesktop.org/src/gst-plugins-good/$PKGNAME-$PKGVERSION.tar.xz" | |
26 PKGDEPENDS="dev/meson:build multimedia/gstreamer" | |
27 PKGOPTIONS="BZIP2 CAIRO FLAC GTK JPEG LAME LIBSOUP NLS OSS PNG PULSEAUDIO QT X" | |
28 | |
29 : ${CC:=clang} | |
30 : ${CFLAGS:=-O2} | |
31 : ${CXX:=clang++} | |
32 : ${CXXFLAGS:=-O2} | |
33 : ${LDFLAGS:=} | |
34 : ${BZIP2:=yes} | |
35 : ${CAIRO:=yes} | |
36 : ${FLAC:=yes} | |
37 : ${GTK:=yes} | |
38 : ${JPEG:=yes} | |
39 : ${LAME:=yes} | |
40 : ${LIBSOUP:=yes} | |
41 : ${NLS:=yes} | |
42 : ${OSS:=yes} | |
43 : ${PNG:=yes} | |
44 : ${PULSEAUDIO:=yes} | |
45 : ${QT:=no} | |
46 : ${X:=yes} | |
47 | |
48 if [ "$BZIP2" = "yes" ]; then | |
49 PKGDEPENDS="compression/bzip2 $PKGDEPENDS" | |
50 with_bzip2="-D bz2=enabled" | |
51 else | |
52 with_bzip2="-D bz2=disabled" | |
53 fi | |
54 | |
55 if [ "$CAIRO" = "yes" ]; then | |
56 PKGDEPENDS="graphics/cairo $PKGDEPENDS" | |
57 with_cairo="-D cairo=enabled" | |
58 else | |
59 with_cairo="-D cairo=disabled" | |
60 fi | |
61 | |
62 if [ "$FLAC" = "yes" ]; then | |
63 PKGDEPENDS="audio/flac $PKGDEPENDS" | |
64 with_flac="-D flac=enabled" | |
65 else | |
66 with_flac="-D flac=disabled" | |
67 fi | |
68 | |
69 if [ "$GTK" = "yes" ]; then | |
70 PKGDEPENDS="graphics/gtk graphics/gdk-pixbuf $PKGDEPENDS" | |
71 with_gtk="-D gtk3=enabled -D gdk-pixbuf=enabled" | |
72 else | |
73 with_gtk="-D gtk3=disabled -D gdk-pixbuf=disabled" | |
74 fi | |
75 | |
76 if [ "$JPEG" = "yes" ]; then | |
77 PKGDEPENDS="graphics/libjpeg-turbo $PKGDEPENDS" | |
78 with_jpeg="-D jpeg=enabled" | |
79 else | |
80 with_jpeg="-D jpeg=disabled" | |
81 fi | |
82 | |
83 if [ "$LAME" = "yes" ]; then | |
84 PKGDEPENDS="audio/lame $PKGDEPENDS" | |
85 with_lame="-D lame=enabled" | |
86 else | |
87 with_lame="-D lame=disabled" | |
88 fi | |
89 | |
90 if [ "$NLS" = "yes" ]; then | |
91 PKGDEPENDS="core/gettext:build $PKGDEPENDS" | |
92 with_nls="-D nls=enabled" | |
93 else | |
94 with_nls="-D nls=disabled" | |
95 fi | |
96 | |
97 if [ "$OSS" = "yes" ]; then | |
98 PKGDEPENDS="lib/linux-headers:build $PKGDEPENDS" | |
99 with_oss="-D oss=enabled" | |
100 else | |
101 with_oss="-D oss=disabled" | |
102 fi | |
103 | |
104 if [ "$PNG" = "yes" ]; then | |
105 PKGDEPENDS="lib/libpng $PKGDEPENDS" | |
106 with_png="-D png=enabled" | |
107 else | |
108 with_png="-D png=disabled" | |
109 fi | |
110 | |
111 if [ "$PULSEAUDIO" = "yes" ]; then | |
112 PKGDEPENDS="audio/pulseaudio $PKGDEPENDS" | |
113 with_pulseaudio="-D pulse=enabled" | |
114 else | |
115 with_pulseaudio="-D pulse=disabled" | |
116 fi | |
117 | |
118 if [ "$QT" = "yes" ]; then | |
119 PKGDEPENDS="qt/qtbase $PKGDEPENDS" | |
120 with_qt="-D qt5=enabled" | |
121 else | |
122 with_qt="-D qt5=disabled" | |
123 fi | |
124 | |
125 if [ "$LIBSOUP" = "yes" ]; then | |
126 PKGDEPENDS="network/libsoup $PKGDEPENDS" | |
127 with_libsoup="-D soup=enabled" | |
128 else | |
129 with_libsoup="-D soup=disabled" | |
130 fi | |
131 | |
132 if [ "$X" = "yes" ]; then | |
133 PKGDEPENDS="x11/libx11 | |
134 x11/libxdamage | |
135 x11/libxext | |
136 x11/libxfixes $PKGDEPENDS" | |
137 with_x="-D ximagesrc=enabled" | |
138 with_x="-D ximagesrc-xshm=enabled $with_x" | |
139 with_x="-D ximagesrc-xfixes=enabled $with_x" | |
140 with_x="-D ximagesrc-xdmage=enabled $with_x" | |
141 else | |
142 with_x="-D ximagesrc=disabled" | |
143 with_x="-D ximagesrc-xshm=disabled $with_x" | |
144 with_x="-D ximagesrc-xfixes=disabled $with_x" | |
145 with_x="-D ximagesrc-xdmage=disabled $with_x" | |
146 fi | |
147 | |
148 build() | |
149 { | |
150 rm -rf $PKGNAME-$PKGVERSION | |
151 tar xvf $PKGNAME-$PKGVERSION.tar.xz | |
152 cd $PKGNAME-$PKGVERSION | |
153 | |
154 CC="$CC" \ | |
155 CFLAGS="$CFLAGS" \ | |
156 CXX="$CXX" \ | |
157 CXXFLAGS="$CXXFLAGS" \ | |
158 LDFLAGS="$LDFLAGS" \ | |
159 meson \ | |
160 --prefix / \ | |
161 --buildtype release \ | |
162 --default-library shared \ | |
163 -D tests=disabled \ | |
164 $with_bzip2 \ | |
165 $with_cairo \ | |
166 $with_flac \ | |
167 $with_gtk \ | |
168 $with_jpeg \ | |
169 $with_lame \ | |
170 $with_libsoup \ | |
171 $with_nls \ | |
172 $with_oss \ | |
173 $with_png \ | |
174 $with_pulseaudio \ | |
175 $with_qt \ | |
176 $with_x \ | |
177 . build | |
178 CC="$CC" ninja -C build | |
179 DESTDIR=$DESTDIR ninja -C build install | |
180 | |
181 cd .. | |
182 rm -rf $PKGNAME-$PKGVERSION | |
183 } | |
184 |