aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jimerson <vendion@gmail.com>2021-08-08 12:20:17 +0000
committerNeel Chauhan <nc@FreeBSD.org>2021-08-08 12:26:02 +0000
commit2e7aa6f0683d9aba8fc0cb3460f380098f4ab98f (patch)
tree42afc8095cd153949af3ab1d2cd515d01d87937c
parent273084ac8bef3aa7b9e6f57a3ed473b17b3a1acf (diff)
downloadports-2e7aa6f0683d9aba8fc0cb3460f380098f4ab98f.tar.gz
ports-2e7aa6f0683d9aba8fc0cb3460f380098f4ab98f.zip
audio/cava: Update to 0.7.4
PR: 257645
-rw-r--r--audio/cava/Makefile2
-rw-r--r--audio/cava/distinfo6
-rw-r--r--audio/cava/files/patch-Makefile.am20
-rw-r--r--audio/cava/files/patch-cava.c46
-rw-r--r--audio/cava/files/patch-config.c6
5 files changed, 39 insertions, 41 deletions
diff --git a/audio/cava/Makefile b/audio/cava/Makefile
index cbb1b292b7b7..8a37228f0c20 100644
--- a/audio/cava/Makefile
+++ b/audio/cava/Makefile
@@ -1,5 +1,5 @@
PORTNAME= cava
-DISTVERSION= 0.7.3
+DISTVERSION= 0.7.4
CATEGORIES= audio
MAINTAINER= vendion@gmail.com
diff --git a/audio/cava/distinfo b/audio/cava/distinfo
index 4c90efb22b37..f7821f226333 100644
--- a/audio/cava/distinfo
+++ b/audio/cava/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1603885847
-SHA256 (karlstav-cava-0.7.3_GH0.tar.gz) = 6363347ef4c74770767d9aa2fb5d65ad4c2aedf1d23bdaac50fc8e8e4e3c707e
-SIZE (karlstav-cava-0.7.3_GH0.tar.gz) = 101323
+TIMESTAMP = 1627884520
+SHA256 (karlstav-cava-0.7.4_GH0.tar.gz) = fefd3cc04d41b03ca416630cafadbfda6c75e2ca0869da1f03963dcb13e1ecb7
+SIZE (karlstav-cava-0.7.4_GH0.tar.gz) = 101847
diff --git a/audio/cava/files/patch-Makefile.am b/audio/cava/files/patch-Makefile.am
index ee322757d48c..7d4d996a5040 100644
--- a/audio/cava/files/patch-Makefile.am
+++ b/audio/cava/files/patch-Makefile.am
@@ -2,18 +2,9 @@
does not recognize
- Do not install the Linux-only font
---- Makefile.am.orig 2020-10-07 16:30:24 UTC
+--- Makefile.am.orig 2021-05-18 18:13:38 UTC
+++ Makefile.am
-@@ -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
-+ -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE_EXTENDED -DFONT_DIR=\"@FONT_DIR@\"
- cava_CFLAGS = -std=c99 -Wall -Werror -Wextra -Wno-unused-result -Wno-unknown-warning-option -Wno-maybe-uninitialized
-
- if OSX
-@@ -21,7 +21,7 @@ if OSX
+@@ -22,7 +22,7 @@ if OSX
else
cava_LDFLAGS += -lrt
cava_font_dir = @FONT_DIR@
@@ -22,3 +13,10 @@
endif
if ALSA
+@@ -52,5 +52,6 @@ if !SYSTEM_LIBINIPARSER
+ cava_LDADD += -Liniparser/.libs
+ cava_CPPFLAGS += -Iiniparser/src
+ endif
++
+
+
diff --git a/audio/cava/files/patch-cava.c b/audio/cava/files/patch-cava.c
index e51adb46beb4..d415f642d6d7 100644
--- a/audio/cava/files/patch-cava.c
+++ b/audio/cava/files/patch-cava.c
@@ -1,4 +1,4 @@
---- cava.c.orig 2020-10-07 16:30:24 UTC
+--- cava.c.orig 2021-05-18 18:13:38 UTC
+++ cava.c
@@ -36,13 +36,11 @@
#include "util.h"
@@ -23,20 +23,20 @@
}
}
-@@ -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;
+@@ -260,10 +256,10 @@ as of 0.4.0 all options are specified in config file,
if (inAtty) {
-+#ifdef __FreeBSD__
-+ system("/usr/sbin/vidcontrol -f " FONT_DIR "/cava.fnt >/dev/null 2>&1");
-+#else
- system("setfont cava.psf >/dev/null 2>&1");
- system("setterm -blank 0");
-+#endif
- }
-
- // We use unicode block characters to draw the bars and
-@@ -540,16 +540,6 @@ as of 0.4.0 all options are specified in config file,
+ // checking if cava psf font is installed in FONTDIR
+ FILE *font_file;
+- font_file = fopen(FONTDIR "/cava.psf", "r");
++ font_file = fopen(FONTDIR "/cava.fnt", "r");
+ if (font_file) {
+ fclose(font_file);
+- system("setfont " FONTDIR "/cava.psf >/dev/null 2>&1");
++ system("/usr/sbin/vidcontrol -f " FONTDIR "/cava.fnt > /dev/null 2>&1");
+ } else {
+ // if not it might still be available, we dont know, must try
+ system("setfont cava.psf >/dev/null 2>&1");
+@@ -532,16 +528,6 @@ as of 0.4.0 all options are specified in config file,
height = lines * 8;
break;
#endif
@@ -52,21 +52,21 @@
-
case OUTPUT_RAW:
if (strcmp(p.raw_target, "/dev/stdout") != 0) {
- // checking if file exists
-@@ -785,11 +775,6 @@ as of 0.4.0 all options are specified in config file,
+ int fptest;
+@@ -787,11 +773,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);
+- if (remainder)
+- printf("\033[%dC", remainder);
- }
- for (n = 0; n < number_of_bars; n++) {
+ for (int 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",
+@@ -817,16 +798,6 @@ as of 0.4.0 all options are specified in config file,
+ mvprintw(lines, n * (p.bar_width + p.bar_spacing) + remainder, "%.1f",
freq_kilohz);
#endif
- } else if (output_mode == OUTPUT_NONCURSES) {
@@ -82,13 +82,13 @@
}
}
printf("\r\033[%dA", lines + 1);
-@@ -1124,11 +1099,6 @@ as of 0.4.0 all options are specified in config file,
+@@ -1142,11 +1113,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, remainder, bars, previous_frame,
- x_axis_info);
- break;
case OUTPUT_RAW:
diff --git a/audio/cava/files/patch-config.c b/audio/cava/files/patch-config.c
index 9979b6579a75..6d35fe5f5497 100644
--- a/audio/cava/files/patch-config.c
+++ b/audio/cava/files/patch-config.c
@@ -1,18 +1,18 @@
Remove noncurses output method which only produces a garbled mess
on terminals.
---- config.c.orig 2020-10-29 12:33:01 UTC
+--- config.c.orig 2021-08-02 22:27:47 UTC
+++ config.c
@@ -181,10 +181,6 @@ bool validate_config(struct config_params *p, struct e
return false;
#endif
}
- if (strcmp(outputMethod, "noncurses") == 0) {
-- p->om = OUTPUT_NONCURSES;
+- p->output = OUTPUT_NONCURSES;
- p->bgcol = 0;
- }
if (strcmp(outputMethod, "raw") == 0) { // raw:
- p->om = OUTPUT_RAW;
+ p->output = OUTPUT_RAW;
p->bar_spacing = 0;
@@ -220,7 +216,7 @@ bool validate_config(struct config_params *p, struct e
#ifndef NCURSES