various fixes to the openal port from Brad;
- Use CMake options via CONFIGURE_ARGS to disable unnecessary backends and unwanted features which also means being able to remove some patching of CMakeLists. - Fix hardcoded path in the OpenAL code. - Fix the pkg-config file to properly list the library dependencies.
This commit is contained in:
parent
55d83e5db7
commit
7a1fb3abee
@ -1,31 +1,38 @@
|
||||
# $OpenBSD: Makefile,v 1.20 2011/06/25 18:42:02 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.21 2011/06/26 09:58:08 sthen Exp $
|
||||
|
||||
COMMENT = cross-platform 3D audio API
|
||||
|
||||
V = 20110624
|
||||
DISTNAME = openal-soft-$V
|
||||
PKGNAME = openal-$V
|
||||
REVISION = 0
|
||||
CATEGORIES = audio
|
||||
SHARED_LIBS = openal 2.0
|
||||
|
||||
HOMEPAGE = http://kcat.strangesoft.net/openal.html
|
||||
|
||||
# LGPL
|
||||
# LGPLv2+
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
PERMIT_DISTFILES_CDROM =Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
|
||||
WANTLIB = c m pthread sndio portaudio
|
||||
WANTLIB = c m pthread sndio
|
||||
|
||||
MASTER_SITES = ${HOMEPAGE:S,.html,-releases/,} \
|
||||
http://openbsd.fi/dist/
|
||||
|
||||
LIB_DEPENDS = audio/portaudio-svn
|
||||
MODULES = devel/cmake
|
||||
|
||||
CONFIGURE_STYLE = cmake
|
||||
CONFIGURE_ARGS = -DALSA=off -DOSS=off -DSOLARIS=off -DPORTAUDIO=off \
|
||||
-DPULSEAUDIO=off -DDLOPEN=off
|
||||
|
||||
NO_REGRESS = Yes
|
||||
|
||||
pre-build:
|
||||
@${SUBST_CMD} ${WRKSRC}/Alc/alcConfig.c
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/openal
|
||||
${INSTALL_DATA} ${WRKSRC}/alsoftrc.sample \
|
||||
|
12
audio/openal/patches/patch-Alc_alcConfig_c
Normal file
12
audio/openal/patches/patch-Alc_alcConfig_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Alc_alcConfig_c,v 1.1 2011/06/26 09:58:08 sthen Exp $
|
||||
--- Alc/alcConfig.c.orig Sat Jun 25 19:34:30 2011
|
||||
+++ Alc/alcConfig.c Sat Jun 25 19:34:48 2011
|
||||
@@ -226,7 +226,7 @@ void ReadALConfig(void)
|
||||
}
|
||||
}
|
||||
#else
|
||||
- f = fopen("/etc/openal/alsoft.conf", "r");
|
||||
+ f = fopen("${SYSCONFDIR}/openal/alsoft.conf", "r");
|
||||
if(f)
|
||||
{
|
||||
LoadConfigFromFile(f);
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-Alc_portaudio_c,v 1.1 2011/06/25 18:42:02 jasper Exp $
|
||||
--- Alc/portaudio.c.orig Sat Jun 25 19:34:32 2011
|
||||
+++ Alc/portaudio.c Sat Jun 25 19:34:36 2011
|
||||
@@ -112,6 +112,8 @@ void *pa_load(void)
|
||||
{
|
||||
if(!pa_handle)
|
||||
{
|
||||
+ PaError err;
|
||||
+
|
||||
pa_handle = (void*)0xDEADBEEF;
|
||||
if((err=Pa_Initialize()) != paNoError)
|
||||
{
|
@ -1,15 +1,6 @@
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.1 2011/06/25 18:42:02 jasper Exp $
|
||||
--- CMakeLists.txt.orig Fri Jun 24 03:02:57 2011
|
||||
+++ CMakeLists.txt Sat Jun 25 20:46:26 2011
|
||||
@@ -50,7 +50,7 @@ OPTION(REQUIRE_PULSEAUDIO "Require PulseAudio backend"
|
||||
OPTION(REQUIRE_COREAUDIO "Require CoreAudio backend" OFF)
|
||||
OPTION(REQUIRE_OPENSL "Require OpenSL backend" OFF)
|
||||
|
||||
-OPTION(DLOPEN "Check for the dlopen API for loading optional libs" ON)
|
||||
+OPTION(DLOPEN "Check for the dlopen API for loading optional libs" OFF)
|
||||
|
||||
OPTION(WERROR "Treat compile warnings as errors" OFF)
|
||||
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.2 2011/06/26 09:58:08 sthen Exp $
|
||||
--- CMakeLists.txt.orig Thu Jun 23 20:02:57 2011
|
||||
+++ CMakeLists.txt Sat Jun 25 19:27:55 2011
|
||||
@@ -145,13 +145,13 @@ ELSE()
|
||||
ADD_DEFINITIONS(-Werror)
|
||||
ENDIF()
|
||||
@ -27,19 +18,3 @@ $OpenBSD: patch-CMakeLists_txt,v 1.1 2011/06/25 18:42:02 jasper Exp $
|
||||
"Flags used by the compiler during release builds"
|
||||
FORCE)
|
||||
SET(CMAKE_C_FLAGS_DEBUG "-g3 -D_DEBUG" CACHE STRING
|
||||
@@ -508,6 +508,15 @@ ENDIF()
|
||||
|
||||
# Check PortAudio backend
|
||||
IF(PORTAUDIO)
|
||||
+ IF(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
+ INCLUDE(FindPkgConfig)
|
||||
+ PKG_CHECK_MODULES(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
+ INCLUDE_DIRECTORIES("${PORTAUDIO_INCLUDE_DIRS}")
|
||||
+ LINK_DIRECTORIES("${PORTAUDIO_LIBRARY_DIRS}")
|
||||
+ SET(HAVE_PORTAUDIO 1)
|
||||
+ SET(HAVE_LIBPORTAUDIO 1)
|
||||
+ SET(HAVE_PORTAUDIO_H 1)
|
||||
+ ENDIF()
|
||||
CHECK_INCLUDE_FILE(portaudio.h HAVE_PORTAUDIO_H)
|
||||
IF(HAVE_PORTAUDIO_H)
|
||||
CHECK_SHARED_LIBRARY_EXISTS(portaudio Pa_Initialize 0 "" HAVE_LIBPORTAUDIO)
|
||||
|
10
audio/openal/patches/patch-openal_pc_in
Normal file
10
audio/openal/patches/patch-openal_pc_in
Normal file
@ -0,0 +1,10 @@
|
||||
$OpenBSD: patch-openal_pc_in,v 1.1 2011/06/26 09:58:08 sthen Exp $
|
||||
--- openal.pc.in.orig Sat Jun 25 21:24:40 2011
|
||||
+++ openal.pc.in Sat Jun 25 21:28:26 2011
|
||||
@@ -7,5 +7,5 @@ Name: OpenAL
|
||||
Description: OpenAL is a cross-platform 3D audio API
|
||||
Requires: @PKG_CONFIG_REQUIRES@
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -L${libdir} -l@LIBNAME@ @PKG_CONFIG_LIBS@
|
||||
+Libs: -L${libdir} -l@LIBNAME@ @PKG_CONFIG_LIBS@ -lm -lsndio -pthread
|
||||
Cflags: -I${includedir} @PKG_CONFIG_CFLAGS@
|
Loading…
Reference in New Issue
Block a user