pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/audio/openal-soft-cxx14
Module Name: pkgsrc
Committed By: nia
Date: Sun Mar 30 09:32:57 UTC 2025
Added Files:
pkgsrc/audio/openal-soft-cxx14: DESCR Makefile PLIST buildlink3.mk
distinfo options.mk
pkgsrc/audio/openal-soft-cxx14/patches: patch-CMakeLists.txt
patch-alc_alconfig.cpp patch-include_AL_al.h
Log Message:
openal-soft-cxx14: Import the last version requiring only C++14.
This is intended for systems with compilers new enough to build
C++14 but not new enough to build C++20, of which there are many.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/openal-soft-cxx14/DESCR \
pkgsrc/audio/openal-soft-cxx14/Makefile \
pkgsrc/audio/openal-soft-cxx14/PLIST \
pkgsrc/audio/openal-soft-cxx14/buildlink3.mk \
pkgsrc/audio/openal-soft-cxx14/distinfo \
pkgsrc/audio/openal-soft-cxx14/options.mk
cvs rdiff -u -r0 -r1.1 \
pkgsrc/audio/openal-soft-cxx14/patches/patch-CMakeLists.txt \
pkgsrc/audio/openal-soft-cxx14/patches/patch-alc_alconfig.cpp \
pkgsrc/audio/openal-soft-cxx14/patches/patch-include_AL_al.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/audio/openal-soft-cxx14/DESCR
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/DESCR:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/DESCR Sun Mar 30 09:32:57 2025
@@ -0,0 +1,9 @@
+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.
+
+This is the last version written primarily in C++14, kept around for
+systems with older compiler versions.
Index: pkgsrc/audio/openal-soft-cxx14/Makefile
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/Makefile:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/Makefile Sun Mar 30 09:32:57 2025
@@ -0,0 +1,61 @@
+# $NetBSD: Makefile,v 1.1 2025/03/30 09:32:57 nia Exp $
+
+DISTNAME= openal-soft-1.23.1
+CATEGORIES= audio
+MASTER_SITES= https://openal-soft.org/openal-releases/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://openal-soft.org/
+COMMENT= Software implementation of the OpenAL 3D audio API
+LICENSE= gnu-lgpl-v2
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake pkg-config
+
+USE_CXX_FEATURES+= c++14
+
+PKGCONFIG_OVERRIDE+= openal.pc.in
+PKG_SYSCONFSUBDIR= openal
+
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_EXAMPLES=OFF
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_UTILS=ON
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_NO_CONFIG_UTIL=ON
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_RTKIT=OFF
+
+CFLAGS+= -DSYS_CONF_DIR="\"${PKG_SYSCONFDIR}\""
+CFLAGS.NetBSD+= -D_NETBSD_SOURCE
+CFLAGS.SunOS+= -D__EXTENSIONS__
+
+BUILDLINK_TRANSFORM+= rm:-Wall
+BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,--version-script=${WRKSRC}/libopenal.version
+
+CONF_FILES+= ${PREFIX}/share/openal/alsoftrc.sample ${PKG_SYSCONFDIR}/alsoft.conf
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS" || ${OPSYS} == "NetBSD"
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_BACKEND_SOLARIS=ON
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_REQUIRE_SOLARIS=ON
+.endif
+
+.include "../../mk/oss.buildlink3.mk"
+
+.if ${OSS_TYPE} != "none"
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_BACKEND_OSS=ON
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_REQUIRE_OSS=ON
+SUBST_CLASSES+= oss
+SUBST_STAGE.oss= pre-configure
+SUBST_MESSAGE.oss= Fixing default OSS device references.
+SUBST_FILES.oss= alc/backends/oss.cpp
+SUBST_SED.oss= -e 's,/dev/dsp,${DEVOSSAUDIO},'
+.endif
+
+post-install:
+ ${RM} ${DESTDIR}${PREFIX}/include/AL/al.h.orig
+
+.include "options.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/audio/openal-soft-cxx14/PLIST
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/PLIST:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/PLIST Sun Mar 30 09:32:57 2025
@@ -0,0 +1,25 @@
+@comment $NetBSD: PLIST,v 1.1 2025/03/30 09:32:57 nia Exp $
+bin/openal-info
+include/AL/al.h
+include/AL/alc.h
+include/AL/alext.h
+include/AL/efx-creative.h
+include/AL/efx-presets.h
+include/AL/efx.h
+lib/cmake/OpenAL/OpenALConfig.cmake
+lib/cmake/OpenAL/OpenALTargets-relwithdebinfo.cmake
+lib/cmake/OpenAL/OpenALTargets.cmake
+lib/libopenal.so
+lib/libopenal.so.1
+lib/libopenal.so.${PKGVERSION}
+lib/pkgconfig/openal.pc
+share/openal/alsoftrc.sample
+share/openal/hrtf/Default HRTF.mhr
+share/openal/presets/3D7.1.ambdec
+share/openal/presets/hex-quad.ambdec
+share/openal/presets/hexagon.ambdec
+share/openal/presets/itu5.1-nocenter.ambdec
+share/openal/presets/itu5.1.ambdec
+share/openal/presets/presets.txt
+share/openal/presets/rectangle.ambdec
+share/openal/presets/square.ambdec
Index: pkgsrc/audio/openal-soft-cxx14/buildlink3.mk
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/buildlink3.mk:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/buildlink3.mk Sun Mar 30 09:32:57 2025
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2025/03/30 09:32:57 nia Exp $
+
+BUILDLINK_TREE+= openal-soft
+
+.if !defined(OPENAL_SOFT_BUILDLINK3_MK)
+OPENAL_SOFT_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.openal-soft+= openal-soft>=1.5.304<1.24.0
+BUILDLINK_PKGSRCDIR.openal-soft?= ../../audio/openal-soft-cxx14
+.endif # OPENAL_SOFT_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -openal-soft
Index: pkgsrc/audio/openal-soft-cxx14/distinfo
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/distinfo:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/distinfo Sun Mar 30 09:32:57 2025
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2025/03/30 09:32:57 nia Exp $
+
+BLAKE2s (openal-soft-1.23.1.tar.bz2) = da179b66de6bfa924ab61e4f05b9f7153ab078b850929b4a5b5f16119e3708f7
+SHA512 (openal-soft-1.23.1.tar.bz2) = 0d40577cd27040dc8814c15bacc310a0ce1c98e084f0a37db9f66899265df42ea61ac672efba7445e495849c25b9ba5b086f43320a38965f6ee74081b2896819
+Size (openal-soft-1.23.1.tar.bz2) = 699330 bytes
+SHA1 (patch-CMakeLists.txt) = 8f3c8c750c22d6c66652ee22a1dda7965c9c469b
+SHA1 (patch-alc_alconfig.cpp) = 3d91d567bb20ce296fd7a6a50f2ec6b11f9bc18c
+SHA1 (patch-include_AL_al.h) = d331039f47f05c1ee523b884711af5d11baec653
Index: pkgsrc/audio/openal-soft-cxx14/options.mk
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/options.mk:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/options.mk Sun Mar 30 09:32:57 2025
@@ -0,0 +1,29 @@
+# $NetBSD: options.mk,v 1.1 2025/03/30 09:32:57 nia Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.openal-soft
+PKG_SUPPORTED_OPTIONS= jack pulseaudio
+PKG_SUPPORTED_OPTIONS.Linux+= alsa
+PKG_SUGGESTED_OPTIONS.Linux+= alsa
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_BACKEND_ALSA=ON
+. include "../../audio/alsa-lib/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_BACKEND_ALSA=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mjack)
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_BACKEND_JACK=ON
+. include "../../audio/jack/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_BACKEND_JACK=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_BACKEND_PULSEAUDIO=ON
+. include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+= -DALSOFT_BACKEND_PULSEAUDIO=OFF
+.endif
Index: pkgsrc/audio/openal-soft-cxx14/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/patches/patch-CMakeLists.txt:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/patches/patch-CMakeLists.txt Sun Mar 30 09:32:57 2025
@@ -0,0 +1,73 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2025/03/30 09:32:57 nia Exp $
+
+Only build openal-info as far as utilties go.
+
+--- CMakeLists.txt.orig 2025-03-30 09:18:09.678315912 +0000
++++ CMakeLists.txt
+@@ -1574,66 +1574,6 @@ if(ALSOFT_UTILS)
+ set(EXTRA_INSTALLS ${EXTRA_INSTALLS} openal-info)
+ endif()
+
+- if(SNDFILE_FOUND)
+- add_executable(uhjdecoder utils/uhjdecoder.cpp)
+- target_compile_definitions(uhjdecoder PRIVATE ${CPP_DEFS})
+- target_include_directories(uhjdecoder
+- PRIVATE ${OpenAL_BINARY_DIR} ${OpenAL_SOURCE_DIR}/common)
+- target_compile_options(uhjdecoder PRIVATE ${C_FLAGS})
+- target_link_libraries(uhjdecoder PUBLIC common
+- PRIVATE ${LINKER_FLAGS} SndFile::SndFile ${UNICODE_FLAG})
+- set_target_properties(uhjdecoder PROPERTIES ${DEFAULT_TARGET_PROPS})
+-
+- add_executable(uhjencoder utils/uhjencoder.cpp)
+- target_compile_definitions(uhjencoder PRIVATE ${CPP_DEFS})
+- target_include_directories(uhjencoder
+- PRIVATE ${OpenAL_BINARY_DIR} ${OpenAL_SOURCE_DIR}/common)
+- target_compile_options(uhjencoder PRIVATE ${C_FLAGS})
+- target_link_libraries(uhjencoder PUBLIC common
+- PRIVATE ${LINKER_FLAGS} SndFile::SndFile ${UNICODE_FLAG})
+- set_target_properties(uhjencoder PROPERTIES ${DEFAULT_TARGET_PROPS})
+- endif()
+-
+- if(MYSOFA_FOUND)
+- set(SOFA_SUPPORT_SRCS
+- utils/sofa-support.cpp
+- utils/sofa-support.h)
+- add_library(sofa-support STATIC EXCLUDE_FROM_ALL ${SOFA_SUPPORT_SRCS})
+- target_compile_definitions(sofa-support PRIVATE ${CPP_DEFS})
+- target_include_directories(sofa-support PUBLIC ${OpenAL_SOURCE_DIR}/common)
+- target_compile_options(sofa-support PRIVATE ${C_FLAGS})
+- target_link_libraries(sofa-support PUBLIC common MySOFA::MySOFA PRIVATE ${LINKER_FLAGS})
+- set_target_properties(sofa-support PROPERTIES ${DEFAULT_TARGET_PROPS})
+-
+- set(MAKEMHR_SRCS
+- utils/makemhr/loaddef.cpp
+- utils/makemhr/loaddef.h
+- utils/makemhr/loadsofa.cpp
+- utils/makemhr/loadsofa.h
+- utils/makemhr/makemhr.cpp
+- utils/makemhr/makemhr.h)
+- if(NOT HAVE_GETOPT)
+- set(MAKEMHR_SRCS ${MAKEMHR_SRCS} utils/getopt.c utils/getopt.h)
+- endif()
+- add_executable(makemhr ${MAKEMHR_SRCS})
+- target_compile_definitions(makemhr PRIVATE ${CPP_DEFS})
+- target_include_directories(makemhr
+- PRIVATE ${OpenAL_BINARY_DIR} ${OpenAL_SOURCE_DIR}/utils)
+- target_compile_options(makemhr PRIVATE ${C_FLAGS})
+- target_link_libraries(makemhr PRIVATE ${LINKER_FLAGS} sofa-support ${UNICODE_FLAG})
+- set_target_properties(makemhr PROPERTIES ${DEFAULT_TARGET_PROPS})
+- if(ALSOFT_INSTALL_EXAMPLES)
+- set(EXTRA_INSTALLS ${EXTRA_INSTALLS} makemhr)
+- endif()
+-
+- set(SOFAINFO_SRCS utils/sofa-info.cpp)
+- add_executable(sofa-info ${SOFAINFO_SRCS})
+- target_compile_definitions(sofa-info PRIVATE ${CPP_DEFS})
+- target_include_directories(sofa-info PRIVATE ${OpenAL_SOURCE_DIR}/utils)
+- target_compile_options(sofa-info PRIVATE ${C_FLAGS})
+- target_link_libraries(sofa-info PRIVATE ${LINKER_FLAGS} sofa-support ${UNICODE_FLAG})
+- set_target_properties(sofa-info PROPERTIES ${DEFAULT_TARGET_PROPS})
+- endif()
+ message(STATUS "Building utility programs")
+
+ if(NOT ALSOFT_NO_CONFIG_UTIL)
Index: pkgsrc/audio/openal-soft-cxx14/patches/patch-alc_alconfig.cpp
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/patches/patch-alc_alconfig.cpp:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/patches/patch-alc_alconfig.cpp Sun Mar 30 09:32:57 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-alc_alconfig.cpp,v 1.1 2025/03/30 09:32:57 nia Exp $
+
+Allow the Makefile to specify the default config file path.
+
+--- alc/alconfig.cpp.orig 2025-03-30 09:19:12.176855304 +0000
++++ alc/alconfig.cpp
+@@ -364,7 +364,7 @@ void ReadALConfig()
+
+ void ReadALConfig()
+ {
+- const char *str{"/etc/openal/alsoft.conf"};
++ const char *str{SYS_CONF_DIR"/alsoft.conf"};
+
+ TRACE("Loading config %s...\n", str);
+ al::ifstream f{str};
+@@ -372,7 +372,7 @@ void ReadALConfig()
+ LoadConfigFromFile(f);
+ f.close();
+
+- std::string confpaths{al::getenv("XDG_CONFIG_DIRS").value_or("/etc/xdg")};
++ std::string confpaths{al::getenv("XDG_CONFIG_DIRS").value_or(SYS_CONF_DIR"/xdg")};
+ /* Go through the list in reverse, since "the order of base directories
+ * denotes their importance; the first directory listed is the most
+ * important". Ergo, we need to load the settings from the later dirs
Index: pkgsrc/audio/openal-soft-cxx14/patches/patch-include_AL_al.h
diff -u /dev/null pkgsrc/audio/openal-soft-cxx14/patches/patch-include_AL_al.h:1.1
--- /dev/null Sun Mar 30 09:32:57 2025
+++ pkgsrc/audio/openal-soft-cxx14/patches/patch-include_AL_al.h Sun Mar 30 09:32:57 2025
@@ -0,0 +1,19 @@
+$NetBSD: patch-include_AL_al.h,v 1.1 2025/03/30 09:32:57 nia Exp $
+
+Fix SunOS build, int8_t is not always the same as signed char.
+
+--- include/AL/al.h.orig 2025-03-30 09:20:20.772509153 +0000
++++ include/AL/al.h
+@@ -41,7 +41,12 @@ typedef char ALboolean;
+ typedef char ALchar;
+
+ /** signed 8-bit integer */
++#ifdef __sun
++#include <inttypes.h>
++typedef int8_t ALbyte;
++#else
+ typedef signed char ALbyte;
++#endif
+
+ /** unsigned 8-bit integer */
+ typedef unsigned char ALubyte;
Home |
Main Index |
Thread Index |
Old Index