Add package: Cava

Cava is an Audio Visualizer that can work together with MPD. It works
out of the Box if you enable "visulizer output" in MPD by either running
`mpc enable 3` or by enabling it in [7] in ncmpcpp.
This commit is contained in:
Oliver Schmidhauser 2017-08-25 17:16:37 +02:00 committed by Fredrik Fornwall
parent 053aff9aa6
commit eec02a26ba
3 changed files with 53 additions and 0 deletions

15
packages/cava/build.sh Normal file
View File

@ -0,0 +1,15 @@
TERMUX_PKG_HOMEPAGE=https://github.com/karlstav/cava
TERMUX_PKG_DESCRIPTION="Console-based Audio Visualizer. Works with MPD."
TERMUX_PKG_VERSION=0.5.0
TERMUX_PKG_MAINTAINER="Oliver Schmidhauser @Neo-Oli"
TERMUX_PKG_SRCURL=https://github.com/karlstav/cava/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=c2fdc489addd96058a2b98c6bd2d925c88db1b7651c67d274f21aabbd7ff0ad8
TERMUX_PKG_FOLDERNAME=cava-$TERMUX_PKG_VERSION
TERMUX_PKG_DEPENDS="ncurses,fftw"
TERMUX_PKG_BUILD_DEPENDS="libtool"
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --prefix=${TERMUX_PREFIX}"
termux_step_pre_configure() {
./autogen.sh
}

View File

@ -0,0 +1,13 @@
diff --git a/cava.c b/cava.c
index de8f98a..e88154e 100644
--- a/cava.c
+++ b/cava.c
@@ -268,7 +268,7 @@ FILE *fp;
}
if (strcmp(inputMethod, "fifo") == 0) {
im = 2;
- audio.source = (char *)iniparser_getstring(ini, "input:source", "/tmp/mpd.fifo");
+ audio.source = (char *)iniparser_getstring(ini, "input:source", "@TERMUX_PREFIX@/tmp/mpd.fifo");
}
if (strcmp(inputMethod, "pulse") == 0) {
im = 3;

View File

@ -0,0 +1,25 @@
diff --git a/configure.ac b/configure.ac
index 6e3c291..c9d706e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,9 +31,9 @@ dnl ######################
AC_CHECK_HEADERS([pthread.h],
AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread",
- AC_MSG_ERROR([pthread.h found but there is no pthread library to make use of])
+ AC_MSG_NOTICE([pthread.h found but there is no pthread library to make use of])
),
- AC_MSG_ERROR([no pthread.h header header file found])
+ AC_MSG_NOTICE([no pthread.h header header file found])
)
@@ -152,7 +152,7 @@ AS_IF([test "x$enable_legacy_iniparser" = "xyes"], [
dnl ############################
dnl Set font directory
dnl ############################
-DEFAULT_FONT_DIR="/usr/share/consolefonts"
+DEFAULT_FONT_DIR="@TERMUX_PREFIX@/share/consolefonts"
AC_ARG_VAR(FONT_DIR, [Directory where the font will be installed.])
if test -z "$FONT_DIR" ; then
FONT_DIR="$DEFAULT_FONT_DIR"