summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/cava/Makefile5
-rw-r--r--audio/cava/distinfo6
-rw-r--r--audio/cava/files/patch-Makefile.am28
-rw-r--r--audio/cava/files/patch-cava.c52
-rw-r--r--audio/cava/files/patch-config.c22
-rw-r--r--audio/cava/files/patch-example__files_config8
-rw-r--r--audio/cava/files/patch-input_sndio.c15
-rw-r--r--audio/cava/files/patch-output_terminal__ncurses.c4
8 files changed, 80 insertions, 60 deletions
diff --git a/audio/cava/Makefile b/audio/cava/Makefile
index f42c3a98882a..8b13771fee01 100644
--- a/audio/cava/Makefile
+++ b/audio/cava/Makefile
@@ -1,11 +1,10 @@
# $FreeBSD$
PORTNAME= cava
-DISTVERSION= 0.7.1
-PORTREVISION= 1
+DISTVERSION= 0.7.3
CATEGORIES= audio
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= vendion@gmail.com
COMMENT= Console-based Audio Visualizer for MPD, PulseAudio, and sndio
LICENSE= MIT
diff --git a/audio/cava/distinfo b/audio/cava/distinfo
index 7e014cabc405..4c90efb22b37 100644
--- a/audio/cava/distinfo
+++ b/audio/cava/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1593045121
-SHA256 (karlstav-cava-0.7.1_GH0.tar.gz) = 7dfb8f9c72722ded5b88bba967c72d024e9446fdabdf14938f4519262c901d06
-SIZE (karlstav-cava-0.7.1_GH0.tar.gz) = 53018
+TIMESTAMP = 1603885847
+SHA256 (karlstav-cava-0.7.3_GH0.tar.gz) = 6363347ef4c74770767d9aa2fb5d65ad4c2aedf1d23bdaac50fc8e8e4e3c707e
+SIZE (karlstav-cava-0.7.3_GH0.tar.gz) = 101323
diff --git a/audio/cava/files/patch-Makefile.am b/audio/cava/files/patch-Makefile.am
index d80ad51409c3..ee322757d48c 100644
--- a/audio/cava/files/patch-Makefile.am
+++ b/audio/cava/files/patch-Makefile.am
@@ -2,29 +2,23 @@
does not recognize
- Do not install the Linux-only font
---- Makefile.am.orig 2020-06-24 19:18:09 UTC
+--- Makefile.am.orig 2020-10-07 16:30:24 UTC
+++ Makefile.am
-@@ -10,11 +10,11 @@ M_CPPFLAGS = -DSYSTEM_LIBINIPARSER=@SYSTEM_LIBINIPARSE
-
- bin_PROGRAMS = cava
- cava_SOURCES = cava.c config.c input/common.c input/fifo.c input/shmem.c \
-- output/terminal_noncurses.c output/raw.c
-+ output/raw.c
+@@ -13,7 +13,7 @@ cava_SOURCES = cava.c config.c input/common.c input/fi
+ output/terminal_noncurses.c output/raw.c
cava_LDFLAGS = -L/usr/local/lib -Wl,-rpath /usr/local/lib
cava_CPPFLAGS = -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" \
- -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE_EXTENDED
--cava_CFLAGS = -std=c99 -Wall -Werror -Wextra -Wno-unused-result -Wno-unknown-warning-option -Wno-maybe-uninitialized
+ -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE_EXTENDED -DFONT_DIR=\"@FONT_DIR@\"
-+cava_CFLAGS = -std=c99 -Wall -Wextra
+ cava_CFLAGS = -std=c99 -Wall -Werror -Wextra -Wno-unused-result -Wno-unknown-warning-option -Wno-maybe-uninitialized
if OSX
- cava_CFLAGS += -DNORT
-@@ -43,7 +43,7 @@ if NCURSES
+@@ -21,7 +21,7 @@ if OSX
+ else
+ cava_LDFLAGS += -lrt
+ cava_font_dir = @FONT_DIR@
+- cava_font__DATA = cava.psf
++ cava_font__DATA = cava.fnt
endif
- cava_font_dir = @FONT_DIR@
--cava_font__DATA = cava.psf
-+cava_font__DATA = cava.fnt
-
- if !SYSTEM_LIBINIPARSER
- cava_LDADD = -liniparser
+ if ALSA
diff --git a/audio/cava/files/patch-cava.c b/audio/cava/files/patch-cava.c
index 131d159988ae..e51adb46beb4 100644
--- a/audio/cava/files/patch-cava.c
+++ b/audio/cava/files/patch-cava.c
@@ -1,6 +1,6 @@
---- cava.c.orig 2020-06-24 19:18:09 UTC
+--- cava.c.orig 2020-10-07 16:30:24 UTC
+++ cava.c
-@@ -31,13 +31,11 @@
+@@ -36,13 +36,11 @@
#include "util.h"
#ifdef NCURSES
@@ -14,7 +14,7 @@
#include "input/alsa.h"
#include "input/common.h"
-@@ -90,8 +88,6 @@ void cleanup(void) {
+@@ -92,8 +90,6 @@ void cleanup(void) {
#else
;
#endif
@@ -23,7 +23,7 @@
}
}
-@@ -337,8 +333,12 @@ as of 0.4.0 all options are specified in config file,
+@@ -291,8 +287,12 @@ as of 0.4.0 all options are specified in config file,
if (strncmp(ttyname(0), "/dev/ttys", 9) == 0)
inAtty = 0;
if (inAtty) {
@@ -36,26 +36,60 @@
}
// We use unicode block characters to draw the bars and
-@@ -546,12 +546,6 @@ as of 0.4.0 all options are specified in config file,
+@@ -540,16 +540,6 @@ as of 0.4.0 all options are specified in config file,
height = lines * 8;
break;
#endif
- case OUTPUT_NONCURSES:
- get_terminal_dim_noncurses(&width, &lines);
+-
+- if (p.xaxis != NONE)
+- lines--;
+-
- init_terminal_noncurses(inAtty, p.col, p.bgcol, width, lines, p.bar_width);
-- height = (lines - 1) * 8;
+- height = lines * 8;
- break;
-
case OUTPUT_RAW:
if (strcmp(p.raw_target, "/dev/stdout") != 0) {
// checking if file exists
-@@ -997,10 +991,6 @@ as of 0.4.0 all options are specified in config file,
- p.gradient);
+@@ -785,11 +775,6 @@ as of 0.4.0 all options are specified in config file,
+ if (p.xaxis != NONE) {
+ x_axis_info = 1;
+ double center_frequency;
+- if (output_mode == OUTPUT_NONCURSES) {
+- printf("\r\033[%dB", lines + 1);
+- if (rest)
+- printf("\033[%dC", rest);
+- }
+ for (n = 0; n < number_of_bars; n++) {
+ if (p.stereo) {
+ if (n < number_of_bars / 2)
+@@ -815,16 +800,6 @@ as of 0.4.0 all options are specified in config file,
+ mvprintw(lines, n * (p.bar_width + p.bar_spacing) + rest, "%.1f",
+ freq_kilohz);
+ #endif
+- } else if (output_mode == OUTPUT_NONCURSES) {
+- if (center_frequency < 1000)
+- printf("%-4d", freq_floor);
+- else if (center_frequency > 1000 && center_frequency < 10000)
+- printf("%.2f", freq_kilohz);
+- else
+- printf("%.1f", freq_kilohz);
+-
+- if (n < number_of_bars - 1)
+- printf("\033[%dC", p.bar_width + p.bar_spacing - 4);
+ }
+ }
+ printf("\r\033[%dA", lines + 1);
+@@ -1124,11 +1099,6 @@ as of 0.4.0 all options are specified in config file,
+ p.gradient, x_axis_info);
break;
#endif
- case OUTPUT_NONCURSES:
- rc = draw_terminal_noncurses(inAtty, lines, width, number_of_bars, p.bar_width,
-- p.bar_spacing, rest, bars, previous_frame);
+- p.bar_spacing, rest, bars, previous_frame,
+- x_axis_info);
- break;
case OUTPUT_RAW:
rc = print_raw_out(number_of_bars, fp, p.is_bin, p.bit_format, p.ascii_range,
diff --git a/audio/cava/files/patch-config.c b/audio/cava/files/patch-config.c
index 897f543436ff..9979b6579a75 100644
--- a/audio/cava/files/patch-config.c
+++ b/audio/cava/files/patch-config.c
@@ -1,9 +1,9 @@
Remove noncurses output method which only produces a garbled mess
on terminals.
---- config.c.orig 2020-05-29 23:28:58 UTC
+--- config.c.orig 2020-10-29 12:33:01 UTC
+++ config.c
-@@ -173,10 +173,6 @@ bool validate_config(struct config_params *p, struct e
+@@ -181,10 +181,6 @@ bool validate_config(struct config_params *p, struct e
return false;
#endif
}
@@ -15,6 +15,15 @@ on terminals.
p->om = OUTPUT_RAW;
p->bar_spacing = 0;
@@ -220,7 +216,7 @@ bool validate_config(struct config_params *p, struct e
+ #ifndef NCURSES
+ write_errorf(
+ error,
+- "output method %s is not supported, supported methods are: 'noncurses' and 'raw'\n",
++ "output method %s is not supported, supported methods are: 'raw'\n",
+ outputMethod);
+ return false;
+ #endif
+@@ -228,7 +224,7 @@ bool validate_config(struct config_params *p, struct e
#ifdef NCURSES
write_errorf(error,
"output method %s is not supported, supported methods are: 'ncurses', "
@@ -23,12 +32,3 @@ on terminals.
outputMethod);
return false;
#endif
-@@ -408,7 +404,7 @@ bool load_config(char configPath[PATH_MAX], struct con
- }
-
- #ifdef NCURSES
-- outputMethod = (char *)iniparser_getstring(ini, "output:method", "noncurses");
-+ outputMethod = (char *)iniparser_getstring(ini, "output:method", "ncurses");
- #endif
- #ifndef NCURSES
- outputMethod = (char *)iniparser_getstring(ini, "output:method", "noncurses");
diff --git a/audio/cava/files/patch-example__files_config b/audio/cava/files/patch-example__files_config
index a6ffb8d49fbd..5a810485fe9f 100644
--- a/audio/cava/files/patch-example__files_config
+++ b/audio/cava/files/patch-example__files_config
@@ -1,14 +1,14 @@
---- example_files/config.orig 2020-05-29 23:30:26 UTC
+--- example_files/config.orig 2020-10-29 12:41:35 UTC
+++ example_files/config
-@@ -76,10 +76,7 @@
+@@ -73,10 +73,7 @@
[output]
-# Output method. Can be 'ncurses', 'noncurses' or 'raw'.
-# 'noncurses' uses a custom framebuffer technique and draws only changes
--# from frame to frame. As of version 0.7.0 'noncurses' is default.
+-# from frame to frame. 'ncurses' is default if supported
-#
-+# Output method. Can be 'ncurses', or 'raw'.
++# Output method. Can be 'ncurses' or 'raw'.
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
# stream of the bar heights that can be used to send to other applications.
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
diff --git a/audio/cava/files/patch-input_sndio.c b/audio/cava/files/patch-input_sndio.c
index 2e0d49c01f4f..38737e10450e 100644
--- a/audio/cava/files/patch-input_sndio.c
+++ b/audio/cava/files/patch-input_sndio.c
@@ -1,15 +1,8 @@
Stop using uninitialized variable after lazy refactoring upstream
---- input/sndio.c.orig 2020-05-29 23:20:44 UTC
+--- input/sndio.c.orig 2020-10-29 12:44:33 UTC
+++ input/sndio.c
-@@ -8,14 +8,13 @@ void *input_sndio(void *data) {
- struct sio_par par;
- struct sio_hdl *hdl;
- int16_t buf[256];
-- unsigned int channels;
-
- sio_initpar(&par);
- par.sig = 1;
+@@ -14,7 +14,7 @@ void *input_sndio(void *data) {
par.bits = 16;
par.le = 1;
par.rate = 44100;
@@ -18,11 +11,11 @@ Stop using uninitialized variable after lazy refactoring upstream
par.appbufsz = sizeof(buf) / par.rchan;
if ((hdl = sio_open(audio->source, SIO_REC, 0)) == NULL) {
-@@ -34,7 +33,7 @@ void *input_sndio(void *data) {
+@@ -33,7 +33,7 @@ void *input_sndio(void *data) {
exit(EXIT_FAILURE);
}
-- uint16_t frames = (sizeof(buf) / sizeof(buf[0])) / channels;
+- uint16_t frames = (sizeof(buf) / sizeof(buf[0])) / 2;
+ uint16_t frames = (sizeof(buf) / sizeof(buf[0])) / audio->channels;
while (audio->terminate != 1) {
if (sio_read(hdl, buf, sizeof(buf)) == 0) {
diff --git a/audio/cava/files/patch-output_terminal__ncurses.c b/audio/cava/files/patch-output_terminal__ncurses.c
index 139005cc801c..c6a1e8fb503d 100644
--- a/audio/cava/files/patch-output_terminal__ncurses.c
+++ b/audio/cava/files/patch-output_terminal__ncurses.c
@@ -1,6 +1,6 @@
---- output/terminal_ncurses.c.orig 2020-05-29 23:00:32 UTC
+--- output/terminal_ncurses.c.orig 2020-10-29 12:36:59 UTC
+++ output/terminal_ncurses.c
-@@ -262,9 +262,13 @@ int draw_terminal_ncurses(int is_tty, int terminal_hei
+@@ -267,9 +267,13 @@ int draw_terminal_ncurses(int is_tty, int terminal_hei
// general: cleanup
void cleanup_terminal_ncurses(void) {
echo();