diff --git a/audio/Makefile b/audio/Makefile index 877f84858974..8924ac5ffbe9 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -841,6 +841,7 @@ SUBDIR += umurmur SUBDIR += vagalume SUBDIR += vamp-plugin-sdk + SUBDIR += vgmplay SUBDIR += virtual_oss SUBDIR += virtual_oss_ctl SUBDIR += vitunes diff --git a/audio/vgmplay/Makefile b/audio/vgmplay/Makefile new file mode 100644 index 000000000000..d5813e1c4473 --- /dev/null +++ b/audio/vgmplay/Makefile @@ -0,0 +1,48 @@ +# $FreeBSD$ + +PORTNAME= vgmplay +PORTVERSION= 0.40.9 +CATEGORIES= audio +MASTER_SITES= https://github.com/vgmrips/${PORTNAME}/releases/download/${PORTVERSION}/ +DISTNAME= ${PORTNAME:S/vgmp/VGMP/}_${PORTVERSION:S/.//:S/./-/}_src + +MAINTAINER= tagattie@yandex.com +COMMENT= Command-line player for VGM (video game music) files + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/licenses/GPL.txt + +USES= 7z dos2unix gmake + +NO_WRKSUBDIR= yes + +OPTIONS_SINGLE= AUDIO +OPTIONS_SINGLE_AUDIO= OSS LIBAO +OPTIONS_DEFAULT= OSS + +OSS_DESC= Use OSS (/dev/dsp) +LIBAO_DESC= Use libao + +OSS_MAKE_ENV+= USE_LIBAO=0 +LIBAO_MAKE_ENV+= USE_LIBAO=1 +LIBAO_LIB_DEPENDS= libao.so:audio/libao +LIBAO_CFLAGS+= -I${LOCALBASE}/include +LIBAO_LDFLAGS+= -L${LOCALBASE}/lib + +MAKE_ENV+= PREFIX=${LOCALBASE} + +PLIST_FILES= bin/vgmplay bin/vgm2pcm bin/vgm2wav man/man1/vgmplay.1.gz ${EXAMPLESDIR}/vgmplay.ini + +post-patch: + ${REINPLACE_CMD} -e 's/@//' ${WRKSRC}/Makefile + ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|; s|/usr/share/vgmplay|${EXAMPLESDIR}|; s|VGMPlay|vgmplay|g;' ${WRKSRC}/vgmplay.1 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/vgmplay ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/vgm2pcm ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/vgm2wav ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/vgmplay.1 ${STAGEDIR}${PREFIX}/man/man1 + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/VGMPlay.ini ${STAGEDIR}${EXAMPLESDIR}/vgmplay.ini + +.include diff --git a/audio/vgmplay/distinfo b/audio/vgmplay/distinfo new file mode 100644 index 000000000000..015632fd1686 --- /dev/null +++ b/audio/vgmplay/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1546946539 +SHA256 (VGMPlay_040-9_src.7z) = 4f799bb21ba288893a627b0c6d71db84e2d8a74ec8852a092845ad831de8e19a +SIZE (VGMPlay_040-9_src.7z) = 586532 diff --git a/audio/vgmplay/files/patch-Makefile b/audio/vgmplay/files/patch-Makefile new file mode 100644 index 000000000000..5979ec0b143e --- /dev/null +++ b/audio/vgmplay/files/patch-Makefile @@ -0,0 +1,12 @@ +--- Makefile.orig 2019-01-11 06:06:08 UTC ++++ Makefile +@@ -58,7 +58,9 @@ endif + + + ++ifndef CC + CC = gcc ++endif + ifndef PREFIX + PREFIX = /usr/local + #PREFIX = $(HOME)/.local diff --git a/audio/vgmplay/files/patch-Stream.c b/audio/vgmplay/files/patch-Stream.c new file mode 100644 index 000000000000..722e0a797096 --- /dev/null +++ b/audio/vgmplay/files/patch-Stream.c @@ -0,0 +1,11 @@ +--- Stream.c.orig 2019-01-08 12:56:30 UTC ++++ Stream.c +@@ -16,6 +16,8 @@ + #include + #ifdef __NetBSD__ + #include ++#elif defined(__FreeBSD__) ++#include + #elif defined(__APPLE__) || defined(__OpenBSD__) + // nothing + #else diff --git a/audio/vgmplay/pkg-descr b/audio/vgmplay/pkg-descr new file mode 100644 index 000000000000..862c1918d2c1 --- /dev/null +++ b/audio/vgmplay/pkg-descr @@ -0,0 +1,7 @@ +The official and always up-to-date player for all VGM (Video Game +Music) files. VGM is an audio file format for multiple video game +platforms, such as Sega Master System, Game Gear, Mega Drive/Genesis, +MSX, Neo Geo, IBM PC AT (Adlib/SoundBlaster), and has expanded to a +variety of arcade system boards since its release. + +WWW: https://github.com/vgmrips/vgmplay