Date: Thu, 4 Oct 2018 07:30:36 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r481208 - in head/audio/cava: . files Message-ID: <201810040730.w947UapQ049059@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Thu Oct 4 07:30:36 2018 New Revision: 481208 URL: https://svnweb.freebsd.org/changeset/ports/481208 Log: 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. Added: head/audio/cava/files/patch-cava.c (contents, props changed) head/audio/cava/files/patch-output_terminal__ncurses.c (contents, props changed) Modified: head/audio/cava/Makefile head/audio/cava/files/patch-Makefile.am Modified: head/audio/cava/Makefile ============================================================================== --- head/audio/cava/Makefile Thu Oct 4 07:23:06 2018 (r481207) +++ head/audio/cava/Makefile Thu Oct 4 07:30:36 2018 (r481208) @@ -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, Pulse 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 @@ -38,6 +41,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} Modified: head/audio/cava/files/patch-Makefile.am ============================================================================== --- head/audio/cava/files/patch-Makefile.am Thu Oct 4 07:23:06 2018 (r481207) +++ head/audio/cava/files/patch-Makefile.am Thu Oct 4 07:30:36 2018 (r481208) @@ -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 Added: head/audio/cava/files/patch-cava.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/cava/files/patch-cava.c Thu Oct 4 07:30:36 2018 (r481208) @@ -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 + } + } + Added: head/audio/cava/files/patch-output_terminal__ncurses.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/cava/files/patch-output_terminal__ncurses.c Thu Oct 4 07:30:36 2018 (r481208) @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810040730.w947UapQ049059>