Mercurial > vanilla
comparison audio/alsa-tools/alsa-tools.sh @ 1157:598566babc0c
audio/alsa-tools: initial import, closes #1202
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 01 Oct 2019 20:11:00 +0200 |
parents | |
children | 6710613b88b9 |
comparison
equal
deleted
inserted
replaced
1156:8df20ff190eb | 1157:598566babc0c |
---|---|
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=alsa-tools | |
19 PKGVERSION=1.1.7 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="GPLv20+ LGPLv21+" | |
22 PKGSUMMARY="ALSA tools" | |
23 PKGDOWNLOAD="ftp://ftp.alsa-project.org/pub/tools/$PKGNAME-$PKGVERSION.tar.bz2" | |
24 PKGDEPENDS="alsa-lib" | |
25 PKGOPTIONS="TOOLS" | |
26 | |
27 : ${CHOST:=$(uname -m)-linux-musl} | |
28 : ${CBUILD:=$(uname -m)-linux-musl} | |
29 : ${CC:=clang} | |
30 : ${CFLAGS:=-O2} | |
31 : ${CXX:=clang++} | |
32 : ${CXXFLAGS:=-O2} | |
33 : ${LDFLAGS:=} | |
34 : ${LIBS:=} | |
35 : ${TOOLS:=yes} # Note: space separated list of subdirectories. | |
36 | |
37 if [ "$TOOLS" != "yes" ]; then | |
38 with_tools="PROJECTS=$TOOLS" | |
39 fi | |
40 | |
41 if [ -z "${TOOLS##*echomixer*}" ] || [ "$TOOLS" = "yes" ]; then | |
42 PKGDEPENDS="gtk2 $PKGDEPENDS" | |
43 fi | |
44 | |
45 if [ -z "${TOOLS##*envy24control*}" ] || [ "$TOOLS" = "yes" ]; then | |
46 PKGDEPENDS="gtk2 $PKGDEPENDS" | |
47 fi | |
48 | |
49 if [ -z "${TOOLS##*hdajackretask*}" ] || [ "$TOOLS" = "yes" ]; then | |
50 PKGDEPENDS="gtk $PKGDEPENDS" | |
51 fi | |
52 | |
53 if [ -z "${TOOLS##*hdajacksensetest*}" ] || [ "$TOOLS" = "yes" ]; then | |
54 PKGDEPENDS="glib $PKGDEPENDS" | |
55 fi | |
56 | |
57 if [ -z "${TOOLS##*hdspconf*}" ] || [ "$TOOLS" = "yes" ]; then | |
58 PKGDEPENDS="fltk $PKGDEPENDS" | |
59 fi | |
60 | |
61 if [ -z "${TOOLS##*hdspmixer*}" ] || [ "$TOOLS" = "yes" ]; then | |
62 PKGDEPENDS="fltk $PKGDEPENDS" | |
63 fi | |
64 | |
65 if [ -z "${TOOLS##*rmedigicontrol*}" ] || [ "$TOOLS" = "yes" ]; then | |
66 PKGDEPENDS="gtk2 $PKGDEPENDS" | |
67 fi | |
68 | |
69 build() | |
70 { | |
71 rm -rf $PKGNAME-$PKGVERSION | |
72 tar xvf $PKGNAME-$PKGVERSION.tar.bz2 | |
73 cd $PKGNAME-$PKGVERSION | |
74 | |
75 # | |
76 # The SUBDIRS variable is used in recursive projects so we can't specify | |
77 # it directly otherwise it will be propagated to the underlying | |
78 # projects. Instead, rename the variable to PROJECTS. | |
79 # | |
80 # Also fix many errors that prevents correct handling of configure | |
81 # arguments and disable qlo10k1 which requires a deprecated Qt version. | |
82 # | |
83 patch -p0 < ../patch-makefile.patch | |
84 | |
85 CC="$CC" \ | |
86 CFLAGS="$CFLAGS" \ | |
87 CXX="$CXX" \ | |
88 CXXFLAGS="$CXXFLAGS" \ | |
89 LDFLAGS="$LDFLAGS" \ | |
90 LIBS="$LIBS" \ | |
91 make \ | |
92 CONFIGURE_ARGS="--prefix= --bindir=/bin --sbindir=/bin" \ | |
93 DESTDIR=$DESTDIR \ | |
94 $with_tools \ | |
95 configure install | |
96 find $DESTDIR -type f -name "*.la" -delete | |
97 | |
98 cd .. | |
99 rm -rf $PKGNAME-$PKGVERSION | |
100 } |