pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add openfmod 0.0.20201109



Module Name:	pkgsrc-wip
Committed By:	Maya Rashish <maya%NetBSD.org@localhost>
Pushed By:	coypu
Date:		Sat Jan 23 18:36:06 2021 +0200
Changeset:	352891d16627554298736f923c9cb0312789c86b

Added Files:
	openfmod/DESCR
	openfmod/Makefile
	openfmod/PLIST
	openfmod/buildlink3.mk
	openfmod/distinfo
	openfmod/patches/patch-include_openfmod-internal.h
	openfmod/patches/patch-makefile
	openfmod/patches/patch-src_fmod-studio.c
	openfmod/patches/patch-src_fsb-file.c

Log Message:
Add openfmod 0.0.20201109

Partial reimplementation of FMOD audio library

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=352891d16627554298736f923c9cb0312789c86b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 openfmod/DESCR                                     |  1 +
 openfmod/Makefile                                  | 25 ++++++++++++++++++
 openfmod/PLIST                                     |  2 ++
 openfmod/buildlink3.mk                             | 14 ++++++++++
 openfmod/distinfo                                  | 10 ++++++++
 openfmod/patches/patch-include_openfmod-internal.h | 28 ++++++++++++++++++++
 openfmod/patches/patch-makefile                    | 20 +++++++++++++++
 openfmod/patches/patch-src_fmod-studio.c           | 30 ++++++++++++++++++++++
 openfmod/patches/patch-src_fsb-file.c              | 16 ++++++++++++
 9 files changed, 146 insertions(+)

diffs:
diff --git a/openfmod/DESCR b/openfmod/DESCR
new file mode 100644
index 0000000000..0f75bbeabe
--- /dev/null
+++ b/openfmod/DESCR
@@ -0,0 +1 @@
+Partial reimplementation of FMOD audio library
diff --git a/openfmod/Makefile b/openfmod/Makefile
new file mode 100644
index 0000000000..5e1faddb3a
--- /dev/null
+++ b/openfmod/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD$
+
+GITHUB_PROJECT=	openfmod
+GITHUB_TAG=	04e63e9b0ba1562db32570a0a7b68030c289dd89
+DISTNAME=	04e63e9b0ba1562db32570a0a7b68030c289dd89
+PKGNAME=	${GITHUB_PROJECT}-0.0.20201109
+CATEGORIES=	audio
+MASTER_SITES=	${MASTER_SITE_GITHUB:=moon-chilled/}
+DIST_SUBDIR=	${GITHUB_PROJECT}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/moon-chilled/openfmod/
+COMMENT=	Partial reimplementation of FMOD audio library
+LICENSE=	mit
+
+WRKSRC=	${WRKDIR}/openfmod-04e63e9b0ba1562db32570a0a7b68030c289dd89
+
+MAKE_FILE=	makefile
+BUILD_TARGET=	default
+
+INSTALLATION_DIRS+=	lib
+
+.include "../../textproc/jansson/buildlink3.mk"
+.include "../../wip/gorilla-audio/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/openfmod/PLIST b/openfmod/PLIST
new file mode 100644
index 0000000000..41148a242f
--- /dev/null
+++ b/openfmod/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+lib/libfmod.so
diff --git a/openfmod/buildlink3.mk b/openfmod/buildlink3.mk
new file mode 100644
index 0000000000..46c543beb0
--- /dev/null
+++ b/openfmod/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD$
+BUILDLINK_TREE+=	openfmod
+
+.if !defined(OPENFMOD_BUILDLINK3_MK)
+OPENFMOD_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.openfmod+=	openfmod>=0.0.20201109
+BUILDLINK_PKGSRCDIR.openfmod?=	../../wip/openfmod
+
+.include "../../textproc/jansson/buildlink3.mk"
+.include "../../wip/gorilla-audio/buildlink3.mk"
+.endif	# OPENFMOD_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-openfmod
diff --git a/openfmod/distinfo b/openfmod/distinfo
new file mode 100644
index 0000000000..94d96ec01b
--- /dev/null
+++ b/openfmod/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+SHA1 (openfmod/04e63e9b0ba1562db32570a0a7b68030c289dd89-04e63e9b0ba1562db32570a0a7b68030c289dd89.tar.gz) = 1cc3057490600d677595bca59b67a36b18a41bd4
+RMD160 (openfmod/04e63e9b0ba1562db32570a0a7b68030c289dd89-04e63e9b0ba1562db32570a0a7b68030c289dd89.tar.gz) = 8d8c68560fc815e047a8760f12f558be8f324d8e
+SHA512 (openfmod/04e63e9b0ba1562db32570a0a7b68030c289dd89-04e63e9b0ba1562db32570a0a7b68030c289dd89.tar.gz) = 08e7755b6b604486728965bc57496d344521c889a31052e6107da8a232caa3e1eb63980f12f8f9b3991fd8fc6d3f97cd692d1d8c206739a56e2dadcbb53fe00a
+Size (openfmod/04e63e9b0ba1562db32570a0a7b68030c289dd89-04e63e9b0ba1562db32570a0a7b68030c289dd89.tar.gz) = 26809 bytes
+SHA1 (patch-include_openfmod-internal.h) = 9b1fcd0c8e8d682b08819b68b56ebb32a430b1b3
+SHA1 (patch-makefile) = c8480b3f69962acea11232220eda1f32fe113cec
+SHA1 (patch-src_fmod-studio.c) = 74bbd5411d3badc80c04e69d7e7f63cb834a5696
+SHA1 (patch-src_fsb-file.c) = 56ecead87136242f49275bed24d0235baafc7ef8
diff --git a/openfmod/patches/patch-include_openfmod-internal.h b/openfmod/patches/patch-include_openfmod-internal.h
new file mode 100644
index 0000000000..9aa3f6fa86
--- /dev/null
+++ b/openfmod/patches/patch-include_openfmod-internal.h
@@ -0,0 +1,28 @@
+$NetBSD$
+
+Newer gorilla-audio support.
+
+--- include/openfmod-internal.h.orig	2020-11-09 09:14:31.000000000 +0000
++++ include/openfmod-internal.h
+@@ -31,7 +31,7 @@ typedef struct {
+ 
+ struct FMOD_SOUND {
+ 	bool is_mem, is_loaded;
+-	ga_Handle *handle;
++	GaHandle *handle;
+ 	const char *fpath;
+ };
+ 
+@@ -65,9 +65,9 @@ FMOD_GUID *path_guid_get(MapPathToGuid *
+ 
+ struct FMOD_STUDIO_SYSTEM {
+ 	struct {
+-		gau_Manager *mgr;
+-		ga_Mixer *mixer;
+-		ga_StreamManager *stream_mgr;
++		GauManager *mgr;
++		GaMixer *mixer;
++		GaStreamManager *stream_mgr;
+ 	} ga;
+ 
+ 	MapPathToGuid pathmap;
diff --git a/openfmod/patches/patch-makefile b/openfmod/patches/patch-makefile
new file mode 100644
index 0000000000..f6b41c1e29
--- /dev/null
+++ b/openfmod/patches/patch-makefile
@@ -0,0 +1,20 @@
+$NetBSD$
+
+destdir and prefix support
+
+--- makefile.orig	2020-11-09 09:14:31.000000000 +0000
++++ makefile
+@@ -1,5 +1,6 @@
++PREFIX ?= /usr/local
+ CFLAGS := -fPIC -Iinclude -isystem /usr/local/include -Wall -Wextra -Wno-unused-parameter
+-LDFLAGS := /usr/local/lib/libgorilla.a -L/usr/local/lib/ -lopenal -ljansson
++LDFLAGS := -Wl,-R,${PREFIX}/lib -L${PREFIX}/lib -lopenal -ljansson -lgorilla
+ CCLD ?= $(CC)
+ 
+ FMOD_OBJ := src/stub.o src/fmod-studio.o src/fsb-file.o src/maps.o
+@@ -13,4 +14,4 @@ clean:
+ 	rm -f $(FMOD_OBJ) libfmod.so
+ 
+ install: libfmod.so
+-	install libfmod.so /usr/local/lib/
++	install libfmod.so ${DESTDIR}${PREFIX}/lib/
diff --git a/openfmod/patches/patch-src_fmod-studio.c b/openfmod/patches/patch-src_fmod-studio.c
new file mode 100644
index 0000000000..5fbee606c5
--- /dev/null
+++ b/openfmod/patches/patch-src_fmod-studio.c
@@ -0,0 +1,30 @@
+$NetBSD$
+
+New gorilla-audio support
+
+--- src/fmod-studio.c.orig	2020-11-09 09:14:31.000000000 +0000
++++ src/fmod-studio.c
+@@ -21,11 +21,11 @@ FMOD_RESULT FMOD_Studio_System_Create(FM
+ 
+ 	FMOD_STUDIO_SYSTEM *ret = calloc(sizeof(FMOD_STUDIO_SYSTEM), 1);
+ 	if (!ret) return FMOD_ERR_INTERNAL;
+-	ret->ga.mgr = gau_manager_create_custom(ga_DeviceType_Default, GAU_THREAD_POLICY_MULTI, 4, 512);
++	ret->ga.mgr = GauManager_create_custom(GaDeviceType_Default, GauThreadPolicy_Single, 4, 512);
+ 	if (!ret->ga.mgr) return FMOD_ERR_INTERNAL;
+-	ret->ga.mixer = gau_manager_mixer(ret->ga.mgr);
++	ret->ga.mixer = GauManager_mixer(ret->ga.mgr);
+ 	if (!ret->ga.mixer) return FMOD_ERR_INTERNAL;
+-	ret->ga.stream_mgr = gau_manager_streamManager(ret->ga.mgr);
++	ret->ga.stream_mgr = GauManager_streamManager(ret->ga.mgr);
+ 
+ 	*system = ret;
+ 	return FMOD_OK;
+@@ -102,7 +102,7 @@ FMOD_RESULT FMOD_Studio_System_GetVCA(FM
+ }
+ 
+ FMOD_RESULT FMOD_Studio_System_Update(FMOD_STUDIO_SYSTEM *system) {
+-	gau_manager_update(system->ga.mgr);
++	GauManager_update(system->ga.mgr);
+ 	return FMOD_OK;
+ }
+ 
diff --git a/openfmod/patches/patch-src_fsb-file.c b/openfmod/patches/patch-src_fsb-file.c
new file mode 100644
index 0000000000..eeadefbce2
--- /dev/null
+++ b/openfmod/patches/patch-src_fsb-file.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- src/fsb-file.c.orig	2020-11-09 09:14:31.000000000 +0000
++++ src/fsb-file.c
+@@ -51,9 +51,9 @@ static bool ensure_sound_loaded(FMOD_STU
+ 	if (snd->is_loaded) return true;
+ 
+ 	if (snd->is_mem) {
+-		snd->handle = gau_create_handle_buffered_file(sys->ga.mixer, sys->ga.stream_mgr, snd->fpath, GAU_AUDIO_TYPE_OGG, NULL, NULL, NULL);
++		snd->handle = gau_create_handle_buffered_file(sys->ga.mixer, sys->ga.stream_mgr, snd->fpath, GauAudioType_Ogg, NULL, NULL, NULL);
+ 	} else {
+-		ga_Sound *sound = gau_load_sound_file(snd->fpath, GAU_AUDIO_TYPE_OGG);
++		GaSound *sound = gau_load_sound_file(snd->fpath, GauAudioType_Ogg);
+ 		if (!sound) return false;
+ 		snd->handle = gau_create_handle_sound(sys->ga.mixer, sound, NULL, NULL, NULL);
+ 	}


Home | Main Index | Thread Index | Old Index