annotate audio/openal-soft/openal-soft.sh @ 1220:4ccc42bf0284

misc: split .sh with .info
author David Demelier <markand@malikania.fr>
date Thu, 30 Sep 2021 09:26:38 +0200
parents 337f950c30f5
children a47aaf9743a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1217
27d1a83dc8d6 misc: change shebang to /bin/sh
David Demelier <markand@malikania.fr>
parents: 1216
diff changeset
1 #!/bin/sh
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
1220
4ccc42bf0284 misc: split .sh with .info
David Demelier <markand@malikania.fr>
parents: 1219
diff changeset
18 . ./openal-soft.info
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
19
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 : ${CC:=clang}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 : ${CFLAGS:=-O2}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 : ${CXX:=clang++}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 : ${CXXFLAGS:=-O2}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 : ${ALSA:=yes}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 : ${EXAMPLES:=no} # BROKEN: does not link.
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 : ${JACK:=yes}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 : ${OSS:=yes}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 : ${PULSEAUDIO:=yes}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 : ${SDL2:=yes}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 : ${UTILS:=yes}
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
31
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 if [ "$ALSA" = "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 768
diff changeset
33 PKGDEPENDS="alsa-lib $PKGDEPENDS"
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 with_alsa="-DALSOFT_REQUIRE_ALSA=On"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 else
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 with_alsa="-DALSOFT_REQUIRE_ALSA=Off"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 fi
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
38
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 if [ "$EXAMPLES" = "yes" ]; then
1023
60d881a89c6a vanilla: fix many dependencies
David Demelier <markand@malikania.fr>
parents: 1019
diff changeset
40 PKGDEPENDS="sdl2 ffmpeg $PKGDEPENDS"
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 with_examples="-DALSOFT_EXAMPLES=On"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 else
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 with_examples="-DALSOFT_EXAMPLES=Off"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 fi
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
45
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 if [ "$JACK" = "yes" ]; then
1023
60d881a89c6a vanilla: fix many dependencies
David Demelier <markand@malikania.fr>
parents: 1019
diff changeset
47 PKGDEPENDS="jack2 $PKGDEPENDS"
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 with_jack="-DALSOFT_REQUIRE_JACK=On"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 else
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 with_jack="-DALSOFT_REQUIRE_JACK=Off"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
51 fi
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
52
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
53 if [ "$OSS" = "yes" ]; then
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
54 with_oss="-DALSOFT_REQUIRE_OSS=On"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 else
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
56 with_oss="-DALSOFT_REQUIRE_OSS=Off"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
57 fi
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
58
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
59 if [ "$PULSEAUDIO" = "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 768
diff changeset
60 PKGDEPENDS="pulseaudio $PKGDEPENDS"
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
61 with_pulseaudio="-DALSOFT_REQUIRE_PULSEAUDIO=On"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
62 else
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
63 with_pulseaudio="-DALSOFT_REQUIRE_PULSEAUDIO=Off"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
64 fi
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
65
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
66 if [ "$SDL2" = "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 768
diff changeset
67 # Don't register sdl2 twice.
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
68 if [ "$EXAMPLES" != "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 768
diff changeset
69 PKGDEPENDS="sdl2 $PKGDEPENDS"
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
70 fi
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
71
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
72 with_sdl2="-DALSOFT_REQUIRE_SDL2=On"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
73 else
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
74 with_sdl2="-DALSOFT_REQUIRE_SDL2=Off"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
75 fi
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
76
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
77 if [ "$UTILS" = "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 768
diff changeset
78 PKGDEPENDS="qtbase $PKGDEPENDS"
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
79 with_utils="-DALSOFT_UTILS=On"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
80 else
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
81 with_utils="-DALSOFT_UTILS=Off"
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
82 fi
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
83
1216
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
84 rm -rf $PKGNAME-$PKGVERSION
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
85 tar xvf $PKGNAME-$PKGVERSION.tar.bz2
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
86 cd $PKGNAME-$PKGVERSION
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
87
1216
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
88 cd build
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
89 cmake .. \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
90 -DBUILD_SHARED_LIBS=On \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
91 -DCMAKE_BUILD_TYPE=Release \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
92 -DCMAKE_CXX_COMPILER="$CXX" \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
93 -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
94 -DCMAKE_C_COMPILER="$CC" \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
95 -DCMAKE_C_FLAGS="$CFLAGS" \
1218
57dc83a39b13 misc: switch back to standard FHS
David Demelier <markand@malikania.fr>
parents: 1217
diff changeset
96 -DCMAKE_INSTALL_PREFIX=/usr \
1216
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
97 -DCMAKE_INSTALL_LIBDIR=/lib \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
98 $with_alsa \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
99 $with_examples \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
100 $with_jack \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
101 $with_oss \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
102 $with_pulseaudio \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
103 $with_sdl2 \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
104 $with_utils
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
105 CC="$CC" \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
106 CFLAGS="$CFLAGS" \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
107 CXX="$CXX" \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
108 CXXFLAGS="$CXXFLAGS" \
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
109 make
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
110 make install DESTDIR=$DESTDIR
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
111 cd ..
768
315c80f10619 audio/openal-soft: initial import, closes #1762
David Demelier <markand@malikania.fr>
parents:
diff changeset
112
1216
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
113 cd ..
6710613b88b9 misc: remove build function
David Demelier <markand@malikania.fr>
parents: 1023
diff changeset
114 rm -rf $PKGNAME-$PKGVERSION