mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
audio/cava: Add vt(4) font
On Linux Cava loads a custom font to display blocks with varying heights and widths on the Linux console. Provide support for it on FreeBSD with vt(4) too.
This commit is contained in:
parent
4be3726b57
commit
bf85617e4b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=481208
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= cava
|
||||
DISTVERSION= 0.6.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= audio
|
||||
|
||||
MAINTAINER= tobik@FreeBSD.org
|
||||
@ -10,6 +11,7 @@ COMMENT= Console-based Audio Visualizer for MPD, PulseAudio, and sndio
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= psf2bdf:x11-fonts/psftools
|
||||
LIB_DEPENDS= libfftw3.so:math/fftw3 \
|
||||
libiniparser.so:devel/iniparser
|
||||
|
||||
@ -18,11 +20,12 @@ USE_GITHUB= yes
|
||||
GH_ACCOUNT= karlstav
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ENV= ac_cv_lib_asound_snd_pcm_open=no
|
||||
CONFIGURE_ENV= ac_cv_lib_asound_snd_pcm_open=no \
|
||||
FONT_DIR=${DATADIR}
|
||||
|
||||
INSTALL_TARGET= install-strip
|
||||
|
||||
PLIST_FILES= bin/cava
|
||||
PLIST_FILES= bin/cava ${DATADIR}/cava.fnt
|
||||
PORTDOCS= README.md
|
||||
PORTEXAMPLES= config
|
||||
|
||||
@ -39,6 +42,10 @@ SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio
|
||||
pre-configure:
|
||||
@${ECHO_CMD} ${DISTVERSION} > ${WRKSRC}/version
|
||||
|
||||
pre-build:
|
||||
psf2bdf ${WRKSRC}/cava.psf > ${WRKSRC}/cava.bdf
|
||||
vtfontcvt ${WRKSRC}/cava.bdf ${WRKSRC}/cava.fnt
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
|
||||
|
@ -2,17 +2,21 @@
|
||||
does not recognize
|
||||
- Do not install the Linux-only font
|
||||
|
||||
--- Makefile.am.orig 2018-09-10 08:31:56 UTC
|
||||
--- Makefile.am.orig 2018-05-03 16:07:33 UTC
|
||||
+++ Makefile.am
|
||||
@@ -14,10 +14,8 @@ cava_LDADD = -liniparser
|
||||
@@ -13,11 +13,12 @@ cava_SOURCES = cava.c
|
||||
cava_LDADD = -liniparser
|
||||
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_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L
|
||||
-cava_CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-result -Wno-maybe-uninitialized
|
||||
+ -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L -DFONT_DIR=\"@FONT_DIR@\"
|
||||
+
|
||||
+cava_CFLAGS = -std=c99 -Wall -Wextra
|
||||
|
||||
-cava_font_dir = @FONT_DIR@
|
||||
cava_font_dir = @FONT_DIR@
|
||||
-cava_font__DATA = cava.psf
|
||||
+cava_font__DATA = cava.fnt
|
||||
|
||||
if !SYSTEM_LIBINIPARSER
|
||||
cava_SOURCES += iniparser/libiniparser.la
|
||||
|
15
audio/cava/files/patch-cava.c
Normal file
15
audio/cava/files/patch-cava.c
Normal file
@ -0,0 +1,15 @@
|
||||
--- cava.c.orig 2018-10-04 05:51:51 UTC
|
||||
+++ cava.c
|
||||
@@ -341,8 +341,12 @@ as of 0.4.0 all options are specified in config file,
|
||||
"/dev/console") == 0) inAtty = 1;
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
16
audio/cava/files/patch-output_terminal__ncurses.c
Normal file
16
audio/cava/files/patch-output_terminal__ncurses.c
Normal file
@ -0,0 +1,16 @@
|
||||
--- output/terminal_ncurses.c.orig 2018-10-04 05:56:00 UTC
|
||||
+++ output/terminal_ncurses.c
|
||||
@@ -215,9 +215,13 @@ int flastd[200], int gradient) {
|
||||
// general: cleanup
|
||||
void cleanup_terminal_ncurses(void) {
|
||||
echo();
|
||||
+#ifdef __FreeBSD__
|
||||
+ system("/usr/sbin/vidcontrol -f >/dev/null 2>&1");
|
||||
+#else
|
||||
system("setfont >/dev/null 2>&1");
|
||||
system("setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1");
|
||||
system("setterm -blank 10");
|
||||
+#endif
|
||||
/*for(int i = 0; i < gradient_size; ++i) {
|
||||
if(the_color_redefinitions[i].color) {
|
||||
init_color(the_color_redefinitions[i].color,
|
Loading…
Reference in New Issue
Block a user