pkgsrc-WIP-changes archive

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

Add gorilla-audio 0.0.20201007



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

Added Files:
	gorilla-audio/DESCR
	gorilla-audio/Makefile
	gorilla-audio/PLIST
	gorilla-audio/buildlink3.mk
	gorilla-audio/distinfo
	gorilla-audio/patches/patch-CMakeLists.txt
	gorilla-audio/patches/patch-src_common_gc__thread.c

Log Message:
Add gorilla-audio 0.0.20201007

Gorilla Audio is a library that can be used for playing real-time
audio.  (It's possible that it can be used for other things too,
but we don't know anything about that.)

It was originally written by Tim Ambrogi, engine programmer at
Final Form Games, and as such has a slight bias towards game
development, but should still be very suitable for other real-time
audio playing needs.

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

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

diffstat:
 gorilla-audio/DESCR                                |  8 +++++
 gorilla-audio/Makefile                             | 25 ++++++++++++++
 gorilla-audio/PLIST                                |  9 +++++
 gorilla-audio/buildlink3.mk                        | 13 ++++++++
 gorilla-audio/distinfo                             |  8 +++++
 gorilla-audio/patches/patch-CMakeLists.txt         | 38 ++++++++++++++++++++++
 .../patches/patch-src_common_gc__thread.c          | 33 +++++++++++++++++++
 7 files changed, 134 insertions(+)

diffs:
diff --git a/gorilla-audio/DESCR b/gorilla-audio/DESCR
new file mode 100644
index 0000000000..4e665991d9
--- /dev/null
+++ b/gorilla-audio/DESCR
@@ -0,0 +1,8 @@
+Gorilla Audio is a library that can be used for playing real-time
+audio.  (It's possible that it can be used for other things too,
+but we don't know anything about that.)
+
+It was originally written by Tim Ambrogi, engine programmer at
+Final Form Games, and as such has a slight bias towards game
+development, but should still be very suitable for other real-time
+audio playing needs.
diff --git a/gorilla-audio/Makefile b/gorilla-audio/Makefile
new file mode 100644
index 0000000000..9a62c5db83
--- /dev/null
+++ b/gorilla-audio/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD$
+
+GITHUB_PROJECT=	gorilla-audio
+GITHUB_TAG=	a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a
+DISTNAME=	a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a
+PKGNAME=	${GITHUB_PROJECT}-0.0.20201007
+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/gorilla-audio/
+COMMENT=	Library for playing real-time audio
+LICENSE=	mit
+
+WRKSRC=		${WRKDIR}/gorilla-audio-a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++
+
+CMAKE_ARGS+=	-DSYSTEM_LIBRARIES:BOOL=TRUE
+
+.include "../../audio/openal-soft/buildlink3.mk"
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../multimedia/libogg/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/gorilla-audio/PLIST b/gorilla-audio/PLIST
new file mode 100644
index 0000000000..9ada12a0c5
--- /dev/null
+++ b/gorilla-audio/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD$
+include/gorilla/common/ga_common.h
+include/gorilla/common/ga_thread.h
+include/gorilla/common/ga_types.h
+include/gorilla/ga.h
+include/gorilla/ga_internal.h
+include/gorilla/gau.h
+lib/libgorilla.a
+lib/libgorilla.so
diff --git a/gorilla-audio/buildlink3.mk b/gorilla-audio/buildlink3.mk
new file mode 100644
index 0000000000..80738d9f1a
--- /dev/null
+++ b/gorilla-audio/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD$
+BUILDLINK_TREE+=	gorilla-audio
+
+.if !defined(GORILLA_AUDIO_BUILDLINK3_MK)
+GORILLA_AUDIO_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.gorilla-audio+=	gorilla-audio>=0.0.20201007
+BUILDLINK_PKGSRCDIR.gorilla-audio?=	../../wip/gorilla-audio
+
+.include "../../audio/openal-soft/buildlink3.mk"
+.endif	# GORILLA_AUDIO_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-gorilla-audio
diff --git a/gorilla-audio/distinfo b/gorilla-audio/distinfo
new file mode 100644
index 0000000000..4bd3646f17
--- /dev/null
+++ b/gorilla-audio/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (gorilla-audio/a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a-a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a.tar.gz) = 727ac9c4fd22c834518c0ff6295416c915464f84
+RMD160 (gorilla-audio/a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a-a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a.tar.gz) = 3b6b3e75c25e27559f23676195e29d2e0ece4ab6
+SHA512 (gorilla-audio/a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a-a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a.tar.gz) = 671454a6603f9cff528eb5fe23b82aaa03b8b0222f0a5266fd08abf06133205625f081646502828e0b162030f4dd335e55ed0822f0e033c3d97ead6fda1e11ca
+Size (gorilla-audio/a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a-a3d6dbe5dd99f4ad29affb8d9a2d893ee30f5f3a.tar.gz) = 499505 bytes
+SHA1 (patch-CMakeLists.txt) = 106e75c31053efed938128913936aa1a80541fc8
+SHA1 (patch-src_common_gc__thread.c) = 002c231b12bdf378d728ccc5a5c0f44af1f637a0
diff --git a/gorilla-audio/patches/patch-CMakeLists.txt b/gorilla-audio/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..d18f290c2e
--- /dev/null
+++ b/gorilla-audio/patches/patch-CMakeLists.txt
@@ -0,0 +1,38 @@
+$NetBSD$
+
+Support using system vorbis and libogg.
+
+--- CMakeLists.txt.orig	2020-12-07 09:04:06.000000000 +0000
++++ CMakeLists.txt
+@@ -175,6 +175,14 @@ set(GORILLA_COMMON_SRC
+   ${SRC_DIR}/common/gc_thread.c)
+ 
+ # OGG/Vorbis
++if(SYSTEM_LIBRARIES)
++find_package(PkgConfig)
++pkg_check_modules(ogg REQUIRED)
++pkg_check_modules(vorbis REQUIRED)
++
++include_directories(${OGG_INCLUDE_DIRS})
++include_directories(${VORBIS_INCLUDE_DIRS})
++else()
+ set(LIBOGGDIR ext/libogg)
+ set(LIBVORBISDIR ext/libvorbis)
+ 
+@@ -213,6 +221,7 @@ set(OGGVORBIS_SRC
+   ${LIBVORBISDIR}/lib/synthesis.c
+   ${LIBVORBISDIR}/lib/vorbisfile.c
+   ${LIBVORBISDIR}/lib/window.c)
++endif()
+ 
+ if(ENABLE_OSS)
+   list(APPEND GORILLA_SRC ${SRC_DIR}/devices/ga_oss.c)
+@@ -243,7 +252,7 @@ set(SIZE32 int32_t)
+ set(USIZE32 uint32_t)
+ set(SIZE64 int64_t)
+ set(USIZE64 uint64_t)
+-configure_file(ext/libogg/include/ogg/config_types.h.in ${CMAKE_SOURCE_DIR}/ext/libogg/include/ogg/config_types.h @ONLY)
++#configure_file(ext/libogg/include/ogg/config_types.h.in ${CMAKE_SOURCE_DIR}/ext/libogg/include/ogg/config_types.h @ONLY)
+ 
+ 
+ source_group("include" FILES ${GORILLA_INCLUDE})
diff --git a/gorilla-audio/patches/patch-src_common_gc__thread.c b/gorilla-audio/patches/patch-src_common_gc__thread.c
new file mode 100644
index 0000000000..ee60fe2298
--- /dev/null
+++ b/gorilla-audio/patches/patch-src_common_gc__thread.c
@@ -0,0 +1,33 @@
+$NetBSD$
+
+NetBSD support.
+
+--- src/common/gc_thread.c.orig	2020-12-07 09:04:06.000000000 +0000
++++ src/common/gc_thread.c
+@@ -49,7 +49,7 @@ void ga_thread_destroy(GaThread *thread)
+ 	gcX_ops->freeFunc(thread);
+ }
+ 
+-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <pthread.h>
+ #include <sched.h>
+ 
+@@ -96,7 +96,7 @@ GaThread* ga_thread_create(GaCbThreadFun
+ 	pthread_mutex_lock(&thread_data->suspend_mutex);
+ 
+ 	if (pthread_attr_init(&thread_data->attr) != 0){} // report error
+-#if defined(__APPLE__) || defined(__ANDROID__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__APPLE__) || defined(__ANDROID__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ 	param.sched_priority = priorityLut[priority];
+ #elif defined(__linux__)
+ 	param.__sched_priority = priorityLut[priority];
+@@ -162,7 +162,7 @@ void ga_mutex_unlock(GaMutex *mutex) {
+ 	LeaveCriticalSection((CRITICAL_SECTION*)mutex->mutex);
+ }
+ 
+-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ 
+ #include <pthread.h>
+ 


Home | Main Index | Thread Index | Old Index