public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [ITA] openal
@ 2023-09-11 11:38 Takashi Yano
  0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2023-09-11 11:38 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 102 bytes --]

I'd like to adopt the openal package.
Thanks in advance.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

[-- Attachment #2: openal.cygport --]
[-- Type: text/plain, Size: 2309 bytes --]

inherit cmake

NAME="openal"
VERSION=1.23.1
RELEASE=1
LICENSE="LGPL-2.1-only"
CATEGORY="Libs"
SUMMARY="Cross-platform 3D audio library"
DESCRIPTION="OpenAL Soft is an LGPL-licensed, cross-platform, software
implementation of the OpenAL 3D audio API. OpenAL provides capabilities for
playing audio in a virtual 3D environment. Distance attenuation, doppler shift,
and directional sound emitters are among the features handled by the API. More
advanced effects, including air absorption, occlusion, and environmental
reverb, are available through the EFX extension. It also facilitates streaming
audio, multi-channel buffers, and audio capture."
HOMEPAGE="https://openal-soft.org/"
SRC_URI="https://openal-soft.org/openal-releases/${NAME}-soft-${VERSION}.tar.bz2"
SRC_DIR="openal-soft-${VERSION}"

PKG_NAMES="openal openal-config openal-examples libopenal1 libopenal-devel"
openal_CATEGORY="Audio"
openal_SUMMARY="${SUMMARY} utilities"
openal_CONTENTS="usr/bin/openal-info.exe usr/share/"
openal_config_CATEGORY="Audio"
openal_config_SUMMARY="${SUMMARY} configuration GUI"
openal_config_CONTENTS="usr/bin/alsoft-config.exe"
openal_examples_CATEGORY="Audio"
openal_examples_SUMMARY="${SUMMARY} examples"
openal_examples_CONTENTS="--exclude=*-config.exe usr/bin/al*.exe"
libopenal1_REQUIRES="libportaudio2" # libpulse0
libopenal1_CONTENTS="usr/bin/cygopenal-1.dll"
libopenal_devel_CONTENTS="
	usr/include/AL/
	usr/lib/cmake/OpenAL/
	usr/lib/libopenal.dll.a
	usr/lib/pkgconfig/openal.pc
"

# OSS backend plays incorrectly on Cygwin
# PTHREAD means -pthread flag not pthread usage
CYGCMAKE_ARGS="
	-DALSOFT_BACKEND_ALSA=OFF
	-DALSOFT_BACKEND_COREAUDIO=OFF
	-DALSOFT_BACKEND_DSOUND=OFF
	-DALSOFT_BACKEND_JACK=OFF
	-DALSOFT_BACKEND_MMDEVAPI=OFF
	-DALSOFT_BACKEND_OPENSL=OFF
	-DALSOFT_BACKEND_OSS=OFF
	-DALSOFT_BACKEND_PORTAUDIO=ON
	-DALSOFT_BACKEND_PULSEAUDIO=ON
	-DALSOFT_BACKEND_PSA=OFF
	-DALSOFT_BACKEND_SNDIO=OFF
	-DALSOFT_BACKEND_SOLARIS=OFF
	-DALSOFT_BACKEND_WAVE=ON
	-DALSOFT_BACKEND_WINMM=OFF
	-DALSOFT_DLOPEN=ON
	-DHAVE_PTHREAD=OFF
	-DHAVE_GCC_PROTECTED_VISIBILITY=OFF
	-DHAVE_VISIBILITY_INTERNAL_SWITCH=OFF
	-DHAVE_VISIBILITY_HIDDEN_SWITCH=OFF
	-DHAVE_WINDOWS_H=OFF
	-DHAVE_GUIDDEF_H=OFF
	-DHAVE_INITGUID_H=OFF
	-DAVUTIL_LIBRARIES=NOTFOUND
"

[-- Attachment #3: openal-1.23.1-1.src.patch --]
[-- Type: text/plain, Size: 2017 bytes --]

--- origsrc/openal-soft-1.23.1/CMakeLists.txt	2023-04-12 04:46:23.000000000 +0900
+++ src/openal-soft-1.23.1/CMakeLists.txt	2023-09-09 21:40:33.686868300 +0900
@@ -1720,7 +1720,7 @@ if(ALSOFT_EXAMPLES)
     if(SDL2_FOUND)
         add_executable(alloopback examples/alloopback.c)
         target_link_libraries(alloopback
-            PRIVATE ${LINKER_FLAGS} SDL2::SDL2 ex-common ${MATH_LIB})
+            PRIVATE ${LINKER_FLAGS} SDL2 ex-common ${MATH_LIB})
         set_target_properties(alloopback PROPERTIES ${DEFAULT_TARGET_PROPS})
 
         if(ALSOFT_INSTALL_EXAMPLES)
--- origsrc/openal-soft-1.23.1/alc/backends/portaudio.cpp	2023-04-12 04:46:23.000000000 +0900
+++ src/openal-soft-1.23.1/alc/backends/portaudio.cpp	2023-09-09 21:33:00.601607900 +0900
@@ -363,6 +363,8 @@ bool PortBackendFactory::init()
     {
 #ifdef _WIN32
 # define PALIB "portaudio.dll"
+#elif defined(__CYGWIN__)
+# define PALIB "cygportaudio-2.dll"
 #elif defined(__APPLE__) && defined(__MACH__)
 # define PALIB "libportaudio.2.dylib"
 #elif defined(__OpenBSD__)
--- origsrc/openal-soft-1.23.1/alc/backends/pulseaudio.cpp	2023-04-12 04:46:23.000000000 +0900
+++ src/openal-soft-1.23.1/alc/backends/pulseaudio.cpp	2023-09-09 21:34:10.319746200 +0900
@@ -1368,6 +1368,8 @@ bool PulseBackendFactory::init()
 
 #ifdef _WIN32
 #define PALIB "libpulse-0.dll"
+#elif defined(__CYGWIN__)
+#define PALIB "cygpulse-0.dll"
 #elif defined(__APPLE__) && defined(__MACH__)
 #define PALIB "libpulse.0.dylib"
 #else
--- origsrc/openal-soft-1.23.1/examples/alloopback.c	2023-04-12 04:46:23.000000000 +0900
+++ src/openal-soft-1.23.1/examples/alloopback.c	2023-09-09 21:54:10.156086500 +0900
@@ -31,10 +31,10 @@
 #include <stdio.h>
 
 #define SDL_MAIN_HANDLED
-#include "SDL.h"
-#include "SDL_audio.h"
-#include "SDL_error.h"
-#include "SDL_stdinc.h"
+#include "SDL2/SDL.h"
+#include "SDL2/SDL_audio.h"
+#include "SDL2/SDL_error.h"
+#include "SDL2/SDL_stdinc.h"
 
 #include "AL/al.h"
 #include "AL/alc.h"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-11 11:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 11:38 [ITA] openal Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).