From d7f3e85fb97f76dc4974ddd79cd580702c3a4832 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Tue, 29 Jul 2025 10:23:04 +0200 Subject: [PATCH] cava: add recipe --- .../0001-configure.ac-fix-crosscompile.patch | 77 +++++++++++++++++++ recipes-support/cava/cava_0.10.4.bb | 18 +++++ 2 files changed, 95 insertions(+) create mode 100644 recipes-support/cava/cava/0001-configure.ac-fix-crosscompile.patch create mode 100644 recipes-support/cava/cava_0.10.4.bb diff --git a/recipes-support/cava/cava/0001-configure.ac-fix-crosscompile.patch b/recipes-support/cava/cava/0001-configure.ac-fix-crosscompile.patch new file mode 100644 index 0000000..4a327c2 --- /dev/null +++ b/recipes-support/cava/cava/0001-configure.ac-fix-crosscompile.patch @@ -0,0 +1,77 @@ +From ab53b2d40094eb12ffd4f470af4aaafae9dde3bb Mon Sep 17 00:00:00 2001 +From: Markus Volk +Date: Tue, 29 Jul 2025 10:02:43 +0200 +Subject: [PATCH] configure.ac: fix crosscompile + +Signed-off-by: Markus Volk + +Upstream-Status: Pending +--- + configure.ac | 40 +++++++++------------------------------- + 1 file changed, 9 insertions(+), 31 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 624e8d8..71845af 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -349,40 +349,18 @@ AM_CONDITIONAL([SDL_GLSL], [test "x$have_opengl" = "xyes"]) + dnl ###################### + dnl checking for ncursesw + dnl ###################### +-AC_ARG_ENABLE([output_ncurses], +- AS_HELP_STRING([--disable-output-ncurses], +- [do not include support for output with ncurses]) +-) +- +-AS_IF([test "x$enable_output_ncurses" != "xno"], [ +- curses_config_bin="ncursesw6-config ncursesw5-config" +- +- AC_PATH_PROGS(CURSES_CONFIG, $curses_config_bin) +- +- AC_CHECK_LIB(ncursesw, initscr, +- curses_lib=ncursesw +- ) +- +- AC_CHECK_LIB($curses_lib, initscr, +- if test "$CURSES_CONFIG" = "" ; then +- LIBS="$LIBS -l$curses_lib" +- CPPFLAGS="$CPPFLAGS -DNCURSES" +- fi +- if test "$CURSES_CONFIG" != "" ; then +- CPPFLAGS="$CPPFLAGS `$CURSES_CONFIG --cflags` -DNCURSES" +- LIBS="$LIBS `$CURSES_CONFIG --libs`" +- fi + +- AC_CHECK_HEADERS([curses.h], , AC_MSG_ERROR([missing curses.h header])) +- have_ncurses=yes, ++PKG_CHECK_MODULES(NCURSESW, ncursesw, have_ncursesw_pkg=yes, have_ncursesw_pkg=no) ++ if [[ $have_ncursesw_pkg = "yes" ]] ; then ++ LIBS="$LIBS $NCURSESW_LIBS" ++ CPPFLAGS="$CPPFLAGS $NCURSESW_CFLAGS" ++ fi + ++ if [[ $have_ncursesw_pkg = "no" ]] ; then + AC_MSG_NOTICE([WARNING: building without ncursesw support ncursesw is recomended!]) +- have_ncurses=no +- )], +- [have_ncurses=no] +-) ++ fi + +-AM_CONDITIONAL([NCURSES], [test "x$have_ncurses" = "xyes"]) ++AM_CONDITIONAL([NCURSES], [test "x$have_ncurses" = "xyes"]) + + + dnl ###################### +@@ -422,7 +400,7 @@ dnl ###################### + dnl checking for iniparser + dnl ###################### + +- PKG_CHECK_MODULES(INIPARSER, libiniparser, have_iniparser_pkg=yes, have_iniparser_pkg=no) ++ PKG_CHECK_MODULES(INIPARSER, iniparser, have_iniparser_pkg=yes, have_iniparser_pkg=no) + if [[ $have_iniparser_pkg = "yes" ]] ; then + LIBS="$LIBS $INIPARSER_LIBS" + CPPFLAGS="$CPPFLAGS $INIPARSER_CFLAGS" +-- +2.50.1 + diff --git a/recipes-support/cava/cava_0.10.4.bb b/recipes-support/cava/cava_0.10.4.bb new file mode 100644 index 0000000..ac5551d --- /dev/null +++ b/recipes-support/cava/cava_0.10.4.bb @@ -0,0 +1,18 @@ +SUMMARY = "Cross-platform Audio Visualizer" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6eea703700f068b569f924b80fadf6da" + +SRC_URI = "git://github.com/karlstav/cava.git;protocol=https;branch=master" +SRC_URI += "file://0001-configure.ac-fix-crosscompile.patch" +SRCREV = "a6cd68e26447770a1526021d709f27b26d08df80" + +DEPENDS = "fftw pipewire alsa-lib virtual/libsdl2 iniparser virtual/libgl ncurses autoconf-native autoconf-archive-native" + +inherit autotools-brokensep pkgconfig + +do_configure:prepend() { + echo ${PV} > ${S}/version # hard coded version + cd ${S} && autoreconf -vif +} + +FILES:${PN} += "${datadir}"