Import vgmstream-1866.
vgmstream is a library for playback of hundreds of streamed (prerecorded) audio formats used in video games. This package contains two components: vgmstream-cli, which decodes music files to .wav, and vgmstream123, which plays music files. ok thfr@master
parent
48b8871314
commit
3bdfabc354
|
@ -0,0 +1,40 @@
|
|||
COMMENT = play back various video game streamed audio formats
|
||||
|
||||
PKGNAME = vgmstream-$V
|
||||
|
||||
V = 1866
|
||||
|
||||
DIST_TUPLE = github vgmstream vgmstream r$V .
|
||||
|
||||
CATEGORIES = audio
|
||||
|
||||
HOMEPAGE = https://vgmstream.org/
|
||||
|
||||
MAINTAINER = Anthony J. Bentley <anthony@anjbe.name>
|
||||
|
||||
# ISC
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
# uses pledge()
|
||||
WANTLIB += ao c m
|
||||
|
||||
LIB_DEPENDS = audio/libao
|
||||
|
||||
MAKE_FLAGS = CC="${CC}" \
|
||||
STRIP=@true \
|
||||
LIBAO_INC="-I${LOCALBASE}/include" \
|
||||
LIBAO_LIB="-L${LOCALBASE}/lib -lao"
|
||||
|
||||
USE_GMAKE = Yes
|
||||
|
||||
DEBUG_PACKAGES = ${BUILD_PACKAGES}
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
ALL_TARGET = vgmstream-cli vgmstream123
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/cli/vgmstream-cli ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/cli/vgmstream123 ${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
|
@ -0,0 +1,2 @@
|
|||
SHA256 (vgmstream-vgmstream-r1866.tar.gz) = VrrqjrpXdtdcSHyEbii0SPmXVd0ST/fIQd+Vfzc92mI=
|
||||
SIZE (vgmstream-vgmstream-r1866.tar.gz) = 8301265
|
|
@ -0,0 +1,12 @@
|
|||
Index: Makefile
|
||||
--- Makefile.orig
|
||||
+++ Makefile
|
||||
@@ -67,8 +67,6 @@ export RMF SHELL CC AR STRIP WINDRES DLLTOOL
|
||||
###############################################################################
|
||||
### build defs
|
||||
|
||||
-DEF_CFLAGS += -ffast-math -O3 -Wall -Werror=format-security -Wvla -Wimplicit-function-declaration -Wignored-qualifiers
|
||||
-
|
||||
VGM_DEBUG_FLAGS = 0
|
||||
ifeq ($(VGM_DEBUG_FLAGS),1)
|
||||
#DEF_CFLAGS += -O0
|
|
@ -0,0 +1,22 @@
|
|||
Index: cli/vgmstream123.c
|
||||
--- cli/vgmstream123.c.orig
|
||||
+++ cli/vgmstream123.c
|
||||
@@ -760,7 +760,18 @@ int main(int argc, char **argv) {
|
||||
signal(SIGINT, interrupt_handler);
|
||||
signal(SIGQUIT, interrupt_handler);
|
||||
|
||||
+ if (pledge("stdio rpath wpath cpath inet unix dns tty prot_exec audio", NULL) == -1) {
|
||||
+ fprintf(stderr, "pledge\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
ao_initialize();
|
||||
+
|
||||
+ if (pledge("stdio rpath wpath cpath inet unix dns tty audio", NULL) == -1) {
|
||||
+ fprintf(stderr, "pledge\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
driver_id = ao_default_driver_id();
|
||||
memset(¤t_sample_format, 0, sizeof(current_sample_format));
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
Index: cli/vgmstream_cli.c
|
||||
--- cli/vgmstream_cli.c.orig
|
||||
+++ cli/vgmstream_cli.c
|
||||
@@ -4,6 +4,7 @@
|
||||
#define POSIXLY_CORRECT
|
||||
|
||||
#include <getopt.h>
|
||||
+#include <stdlib.h>
|
||||
#include "../src/vgmstream.h"
|
||||
#include "../src/api.h"
|
||||
#include "../src/util.h"
|
||||
@@ -593,6 +594,10 @@ int main(int argc, char** argv) {
|
||||
cli_config cfg = {0};
|
||||
int i, res, ok;
|
||||
|
||||
+ if (pledge("stdio rpath wpath cpath", NULL) == -1) {
|
||||
+ fprintf(stderr, "pledge\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
/* read args */
|
||||
res = parse_config(&cfg, argc, argv);
|
|
@ -0,0 +1,4 @@
|
|||
vgmstream is a library for playback of hundreds of streamed (prerecorded)
|
||||
audio formats used in video games. This package contains two components:
|
||||
vgmstream-cli, which decodes music files to .wav, and vgmstream123,
|
||||
which plays music files.
|
|
@ -0,0 +1,2 @@
|
|||
@bin bin/vgmstream-cli
|
||||
@bin bin/vgmstream123
|
Loading…
Reference in New Issue