Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153506459
D27091.id79303.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
11 KB
Referenced Files
None
Subscribers
None
D27091.id79303.diff
View Options
Index: audio/cava/Makefile
===================================================================
--- audio/cava/Makefile
+++ 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
Index: audio/cava/distinfo
===================================================================
--- audio/cava/distinfo
+++ 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
Index: audio/cava/files/patch-Makefile.am
===================================================================
--- audio/cava/files/patch-Makefile.am
+++ 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
Index: audio/cava/files/patch-cava.c
===================================================================
--- audio/cava/files/patch-cava.c
+++ 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,
Index: audio/cava/files/patch-config.c
===================================================================
--- audio/cava/files/patch-config.c
+++ 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 @@
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 @@
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");
Index: audio/cava/files/patch-example__files_config
===================================================================
--- audio/cava/files/patch-example__files_config
+++ 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.
Index: audio/cava/files/patch-input_sndio.c
===================================================================
--- audio/cava/files/patch-input_sndio.c
+++ 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 @@
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) {
Index: audio/cava/files/patch-output_terminal__ncurses.c
===================================================================
--- audio/cava/files/patch-output_terminal__ncurses.c
+++ 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();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 12:39 PM (31 m, 17 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31979531
Default Alt Text
D27091.id79303.diff (11 KB)
Attached To
Mode
D27091: audio/cava: Update to 0.7.3
Attached
Detach File
Event Timeline
Log In to Comment