Index: head/devel/godot/Makefile =================================================================== --- head/devel/godot/Makefile (revision 432640) +++ head/devel/godot/Makefile (revision 432641) @@ -1,97 +1,100 @@ # Created by: Shane Ambler # $FreeBSD$ PORTNAME= godot -PORTVERSION= 2.1 +PORTVERSION= 2.1.2 DISTVERSIONSUFFIX= -stable CATEGORIES= devel games MAINTAINER= FreeBSD@Shaneware.biz COMMENT?= Game runtime engine LICENSE= MIT CC-BY-3.0 LICENSE_COMB= multi LICENSE_FILE_CC-BY-3.0= ${WRKSRC}/LOGO_LICENSE.md LICENSE_FILE_MIT= ${WRKSRC}/LICENSE.md -LIB_DEPENDS= libfreetype.so:print/freetype2 +LIB_DEPENDS= libfreetype.so:print/freetype2 \ + libpng.so:graphics/png \ + libmpcdec.so:audio/musepack \ + libspeex.so:audio/speex RUN_DEPENDS= xdg-user-dir:devel/xdg-user-dirs \ xdg-open:devel/xdg-utils \ xmessage:x11/xmessage USE_GITHUB= yes GH_ACCOUNT= godotengine USES= compiler:c++11-lib pkgconfig scons ssl USE_XORG= x11 xcursor xinerama xrandr USE_GL= gl -MAKE_ARGS+= platform=x11 +MAKE_ARGS+= platform=x11 builtin_speex=no builtin_libmpcdec=no MAKE_ARGS+= ${MAKE_ARGS_${CHOSEN_COMPILER_TYPE}} MAKE_ARGS_clang= use_llvm=yes CXXFLAGS+= -DGLEW_NO_GLU -DRTAUDIO_ENABLED CXXFLAGS_i386= ${CXXFLAGS_i386_${CHOSEN_COMPILER_TYPE}} CXXFLAGS_i386_gcc= -march=i586 CXXFLAGS_aarch64= -DNO_THREADS CXXFLAGS_sparc64= -DNO_THREADS CXXFLAGS_mips= -DNO_THREADS CXXFLAGS_mips64= -DNO_THREADS +LDFLAGS+= -lspeex -lmpcdec OPTIONS_DEFINE= EXAMPLES TOOLS OPTIONS_DEFAULT= OSS # Moved to devel/godot-tools OPTIONS_EXCLUDE?= EXAMPLES TOOLS OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA OSS PULSEAUDIO +AUDIO_DESC= Audio support +ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib +ALSA_MAKE_ARGS= alsa=yes EXAMPLES_GH_PROJECT= godot-demo-projects:DEMOS # Branch HEAD for PORTVERSION EXAMPLES_GH_TAGNAME= dfa1274:DEMOS EXAMPLES_PORTEXAMPLES= * +OSS_MAKE_ARGS= oss=yes +PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio +PULSEAUDIO_MAKE_ARGS= pulseaudio=yes TOOLS_DESC= Include development tools (IDE) TOOLS_MAKE_ARGS= target=release_debug tools=yes TOOLS_MAKE_ARGS_OFF= target=release tools=no TOOLS_DESKTOP_ENTRIES= "Godot" "${COMMENT}" "${GODOTFILE}" \ "${GODOTFILE}" "Development;IDE;" "" TOOLS_PLIST_FILES= share/pixmaps/${GODOTFILE}.png \ share/pixmaps/${GODOTFILE}.svg - -AUDIO_DESC= Audio support -ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib -ALSA_MAKE_ARGS= alsa=yes -OSS_MAKE_ARGS= oss=yes -PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio -PULSEAUDIO_MAKE_ARGS= pulseaudio=yes GODOTFILE= ${PORTNAME}${PKGNAMESUFFIX} PLIST_FILES= bin/${GODOTFILE} .ifmake makesum # Always include optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" OPTIONS_EXCLUDE= .endif post-patch: @${REINPLACE_CMD} -e 's|custom_build|${OPSYS}_Ports_build|' \ ${WRKSRC}/methods.py @${REINPLACE_CMD} -e 's|/usr/bin|${PREFIX}/bin|' \ ${WRKSRC}/platform/x11/os_x11.cpp # The official godot binary name reflects options used to compile # We just want a simple name matching the portname # This gives us bin/godot for runtime and bin/godot-tools for the IDE do-install: cd ${WRKSRC}/bin && ${INSTALL_PROGRAM} godot.x11* \ ${STAGEDIR}/${PREFIX}/bin/${GODOTFILE} do-install-EXAMPLES-on: (cd ${WRKSRC_DEMOS} && ${COPYTREE_SHARE} "${PORTEXAMPLES}" \ ${STAGEDIR}${EXAMPLESDIR}) do-install-TOOLS-on: ${INSTALL_DATA} ${WRKSRC}/icon.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/${GODOTFILE}.png ${INSTALL_DATA} ${WRKSRC}/icon.svg \ ${STAGEDIR}${PREFIX}/share/pixmaps/${GODOTFILE}.svg .include Index: head/devel/godot/distinfo =================================================================== --- head/devel/godot/distinfo (revision 432640) +++ head/devel/godot/distinfo (revision 432641) @@ -1,5 +1,5 @@ -TIMESTAMP = 1470729135 -SHA256 (godotengine-godot-2.1-stable_GH0.tar.gz) = 0d2a6f5a3689a818cb4859e7655e64a4d603940fae1bdf16a18b980c22b0b6fe -SIZE (godotengine-godot-2.1-stable_GH0.tar.gz) = 17917448 +TIMESTAMP = 1485416056 +SHA256 (godotengine-godot-2.1.2-stable_GH0.tar.gz) = 29b3131449f8ca908be800c4c07020efaa9f90a29b6bc1be8a18a331dc34b49a +SIZE (godotengine-godot-2.1.2-stable_GH0.tar.gz) = 14399692 SHA256 (godotengine-godot-demo-projects-dfa1274_GH0.tar.gz) = 42420f7f473b1391a13f226473d1cc850605f24d2865220e4c5acde05f1c340c SIZE (godotengine-godot-demo-projects-dfa1274_GH0.tar.gz) = 18423807 Index: head/devel/godot/files/patch-drivers_rtaudio_RtAudio.cpp =================================================================== --- head/devel/godot/files/patch-drivers_rtaudio_RtAudio.cpp (revision 432640) +++ head/devel/godot/files/patch-drivers_rtaudio_RtAudio.cpp (nonexistent) @@ -1,89 +0,0 @@ ---- drivers/rtaudio/RtAudio.cpp.orig 2016-08-09 07:52:15 UTC -+++ drivers/rtaudio/RtAudio.cpp -@@ -8589,6 +8589,12 @@ bool RtApiPulse::probeDeviceOpen( unsign - #include - #include - -+#if defined(__FreeBSD__) -+#define SND_DEVICE "/dev/dsp" -+#else -+#define SND_DEVICE "/dev/mixer" -+#endif -+ - static void *ossCallbackHandler(void * ptr); - - // A structure to hold various information related to the OSS API -@@ -8615,9 +8621,11 @@ RtApiOss :: ~RtApiOss() - - unsigned int RtApiOss :: getDeviceCount( void ) - { -- int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); -+ int mixerfd = open( SND_DEVICE, O_RDWR, 0 ); - if ( mixerfd == -1 ) { -- errorText_ = "RtApiOss::getDeviceCount: error opening '/dev/mixer'."; -+ errorText_ = "RtApiOss::getDeviceCount: error opening '"; -+ errorText_ += SND_DEVICE; -+ errorText_ += "'."; - error( RtAudioError::WARNING ); - return 0; - } -@@ -8639,9 +8647,11 @@ RtAudio::DeviceInfo RtApiOss :: getDevic - RtAudio::DeviceInfo info; - info.probed = false; - -- int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); -+ int mixerfd = open( SND_DEVICE, O_RDWR, 0 ); - if ( mixerfd == -1 ) { -- errorText_ = "RtApiOss::getDeviceInfo: error opening '/dev/mixer'."; -+ errorText_ = "RtApiOss::getDeviceInfo: error opening '"; -+ errorText_ += SND_DEVICE; -+ errorText_ += "'."; - error( RtAudioError::WARNING ); - return info; - } -@@ -8697,8 +8707,10 @@ RtAudio::DeviceInfo RtApiOss :: getDevic - info.nativeFormats |= RTAUDIO_SINT8; - if ( mask & AFMT_S32_LE || mask & AFMT_S32_BE ) - info.nativeFormats |= RTAUDIO_SINT32; -+#if defined(AFMT_FLOAT) - if ( mask & AFMT_FLOAT ) - info.nativeFormats |= RTAUDIO_FLOAT32; -+#endif - if ( mask & AFMT_S24_LE || mask & AFMT_S24_BE ) - info.nativeFormats |= RTAUDIO_SINT24; - -@@ -8757,9 +8769,11 @@ bool RtApiOss :: probeDeviceOpen( unsign - RtAudioFormat format, unsigned int *bufferSize, - RtAudio::StreamOptions *options ) - { -- int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); -+ int mixerfd = open( SND_DEVICE, O_RDWR, 0 ); - if ( mixerfd == -1 ) { -- errorText_ = "RtApiOss::probeDeviceOpen: error opening '/dev/mixer'."; -+ errorText_ = "RtApiOss::probeDeviceOpen: error opening '"; -+ errorText_ += SND_DEVICE; -+ errorText_ += "'."; - return FAILURE; - } - -@@ -8787,7 +8801,11 @@ bool RtApiOss :: probeDeviceOpen( unsign - } - - oss_audioinfo ainfo; -+#if defined(__FreeBSD__) -+ ainfo.dev = -1; // specify -1 to get default device -+#else - ainfo.dev = device; -+#endif - result = ioctl( mixerfd, SNDCTL_AUDIOINFO, &ainfo ); - close( mixerfd ); - if ( result == -1 ) { -@@ -9025,7 +9043,7 @@ bool RtApiOss :: probeDeviceOpen( unsign - } - - // Verify the sample rate setup worked. -- if ( abs( srate - sampleRate ) > 100 ) { -+ if ( abs( srate - (int)sampleRate ) > 100 ) { - close( fd ); - errorStream_ << "RtApiOss::probeDeviceOpen: device (" << ainfo.name << ") does not support sample rate (" << sampleRate << ")."; - errorText_ = errorStream_.str(); Property changes on: head/devel/godot/files/patch-drivers_rtaudio_RtAudio.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/godot/files/patch-main_main.cpp =================================================================== --- head/devel/godot/files/patch-main_main.cpp (revision 432640) +++ head/devel/godot/files/patch-main_main.cpp (nonexistent) @@ -1,11 +0,0 @@ ---- main/main.cpp.orig 2016-08-09 07:52:15 UTC -+++ main/main.cpp -@@ -161,7 +161,7 @@ void Main::print_help(const char* p_bina - } - OS::get_singleton()->print(")\n"); - OS::get_singleton()->print("\t-ldpi\t : Force low-dpi mode (OSX Only)"); -- -+ OS::get_singleton()->print("\n"); - OS::get_singleton()->print("\t-ad DRIVER\t : Audio Driver ("); - for (int i=0;iget_audio_driver_count();i++) { - Property changes on: head/devel/godot/files/patch-main_main.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/godot/files/patch-drivers_rtaudio_RtAudio.h =================================================================== --- head/devel/godot/files/patch-drivers_rtaudio_RtAudio.h (revision 432640) +++ head/devel/godot/files/patch-drivers_rtaudio_RtAudio.h (nonexistent) @@ -1,16 +0,0 @@ ---- drivers/rtaudio/RtAudio.h.orig 2016-08-09 07:52:15 UTC -+++ drivers/rtaudio/RtAudio.h -@@ -5,7 +5,13 @@ - #if defined(OSX_ENABLED) - #define __MACOSX_CORE__ - #elif defined(UNIX_ENABLED) -+#if defined(OSS_ENABLED) -+ #define __LINUX_OSS__ -+#elif defined(ALSA_ENABLED) - #define __LINUX_ALSA__ -+#elif defined(PULSEAUDIO_ENABLED) -+ #define __LINUX_PULSE__ -+#endif - #elif defined(WINDOWS_ENABLED) - #if defined(WINRT_ENABLED) - #define __RTAUDIO_DUMMY__ Property changes on: head/devel/godot/files/patch-drivers_rtaudio_RtAudio.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/godot/files/patch-SConstruct =================================================================== --- head/devel/godot/files/patch-SConstruct (revision 432640) +++ head/devel/godot/files/patch-SConstruct (revision 432641) @@ -1,35 +1,36 @@ ---- SConstruct.orig 2016-08-09 07:52:15 UTC +--- SConstruct.orig 2016-11-15 18:44:21 UTC +++ SConstruct -@@ -63,7 +63,7 @@ elif (os.name=="nt"): - if (os.getenv("VSINSTALLDIR")==None or platform_arg=="android"): - custom_tools=['mingw'] +@@ -65,7 +65,7 @@ elif (os.name == "nt"): + if (os.getenv("VSINSTALLDIR") == None or platform_arg == "android"): + custom_tools = ['mingw'] --env_base=Environment(tools=custom_tools); -+env_base=Environment(tools=custom_tools, ENV = os.environ); +-env_base = Environment(tools=custom_tools) ++env_base = Environment(tools=custom_tools, ENV = os.environ) + if 'TERM' in os.environ: + env_base['ENV']['TERM'] = os.environ['TERM'] env_base.AppendENVPath('PATH', os.getenv('PATH')) - env_base.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH')) - env_base.global_defaults=global_defaults -@@ -231,15 +231,17 @@ if selected_platform in platform_list: - if env["extra_suffix"] != '' : - env.extra_suffix += '.'+env["extra_suffix"] +@@ -247,15 +247,16 @@ if selected_platform in platform_list: + if env["extra_suffix"] != '': + env.extra_suffix += '.' + env["extra_suffix"] -- CCFLAGS = env.get('CCFLAGS', '') -- env['CCFLAGS'] = '' -+ env['CC'] = os.environ['CC'] -+ env['CXX'] = os.environ['CXX'] -+ -+ CFLAGS = os.environ['CFLAGS'] -+ env['CFLAGS'] = [] -+ env.Append(CFLAGS=string.split(str(CFLAGS))) - -+ CCFLAGS = os.environ['CXXFLAGS'] -+ env['CCFLAGS'] = [] - env.Append(CCFLAGS=string.split(str(CCFLAGS))) - -- CFLAGS = env.get('CFLAGS', '') -- env['CFLAGS'] = '' +- CCFLAGS = env.get('CCFLAGS', '') +- env['CCFLAGS'] = '' - -- env.Append(CFLAGS=string.split(str(CFLAGS))) +- env.Append(CCFLAGS=string.split(str(CCFLAGS))) +- +- CFLAGS = env.get('CFLAGS', '') +- env['CFLAGS'] = '' +- ++ env['CC'] = os.environ['CC'] ++ env['CXX'] = os.environ['CXX'] ++ ++ CFLAGS = os.environ['CFLAGS'] ++ env['CFLAGS'] = [] + env.Append(CFLAGS=string.split(str(CFLAGS))) ++ ++ CCFLAGS = os.environ['CXXFLAGS'] ++ env['CCFLAGS'] = [] ++ env.Append(CCFLAGS=string.split(str(CCFLAGS))) - LINKFLAGS = env.get('LINKFLAGS', '') - env['LINKFLAGS'] = '' + LINKFLAGS = env.get('LINKFLAGS', '') + env['LINKFLAGS'] = '' Index: head/devel/godot/files/patch-drivers_SCsub =================================================================== --- head/devel/godot/files/patch-drivers_SCsub (nonexistent) +++ head/devel/godot/files/patch-drivers_SCsub (revision 432641) @@ -0,0 +1,11 @@ +--- drivers/SCsub.orig 2016-11-30 21:41:21 UTC ++++ drivers/SCsub +@@ -14,7 +14,7 @@ SConscript('windows/SCsub') + # Sounds drivers + SConscript('alsa/SCsub') + SConscript('pulseaudio/SCsub') +-if (env["platform"] == "windows"): ++if (env["platform"] == "windows") or (env["platform"] == "x11"): + SConscript("rtaudio/SCsub") + + # Graphics drivers Property changes on: head/devel/godot/files/patch-drivers_SCsub ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/godot/files/patch-modules_speex_audio__stream__speex.cpp =================================================================== --- head/devel/godot/files/patch-modules_speex_audio__stream__speex.cpp (nonexistent) +++ head/devel/godot/files/patch-modules_speex_audio__stream__speex.cpp (revision 432641) @@ -0,0 +1,10 @@ +--- modules/speex/audio_stream_speex.cpp.orig 2016-11-28 17:58:00 UTC ++++ modules/speex/audio_stream_speex.cpp +@@ -28,7 +28,6 @@ + /*************************************************************************/ + #include "audio_stream_speex.h" + +-#include "os_support.h" + #include "os/os.h" + #define READ_CHUNK 1024 + Property changes on: head/devel/godot/files/patch-modules_speex_audio__stream__speex.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/godot/files/patch-platform_x11_detect.py =================================================================== --- head/devel/godot/files/patch-platform_x11_detect.py (revision 432640) +++ head/devel/godot/files/patch-platform_x11_detect.py (revision 432641) @@ -1,65 +1,66 @@ ---- platform/x11/detect.py.orig 2016-08-09 07:52:15 UTC +--- platform/x11/detect.py.orig 2016-11-15 18:44:21 UTC +++ platform/x11/detect.py -@@ -30,11 +30,6 @@ def can_build(): - print("X11 not found.. x11 disabled.") - return False +@@ -31,11 +31,6 @@ def can_build(): + print("X11 not found.. x11 disabled.") + return False -- ssl_error=os.system("pkg-config openssl --modversion > /dev/null ") -- if (ssl_error): -- print("OpenSSL not found.. x11 disabled.") -- return False +- ssl_error = os.system("pkg-config openssl --modversion > /dev/null ") +- if (ssl_error): +- print("OpenSSL not found.. x11 disabled.") +- return False - - x11_error=os.system("pkg-config xcursor --modversion > /dev/null ") - if (x11_error): - print("xcursor not found.. x11 disabled.") -@@ -60,7 +55,9 @@ def get_opts(): - ('use_static_cpp','link stdc++ statically','no'), - ('use_sanitizer','Use llvm compiler sanitize address','no'), - ('use_leak_sanitizer','Use llvm compiler sanitize memory leaks','no'), -- ('pulseaudio','Detect & Use pulseaudio','yes'), -+ ('alsa','Detect & Use alsa audio','no'), -+ ('oss','Detect & Use OSS audio','no'), -+ ('pulseaudio','Detect & Use pulseaudio','no'), - ('udev','Use udev for gamepad connection callbacks','no'), - ('debug_release', 'Add debug symbols to release version','no'), - ] -@@ -141,7 +138,7 @@ def configure(env): - env.ParseConfig('pkg-config xrandr --cflags --libs') + x11_error = os.system("pkg-config xcursor --modversion > /dev/null ") + if (x11_error): + print("xcursor not found.. x11 disabled.") +@@ -61,7 +56,9 @@ def get_opts(): + ('use_static_cpp', 'link stdc++ statically', 'no'), + ('use_sanitizer', 'Use llvm compiler sanitize address', 'no'), + ('use_leak_sanitizer', 'Use llvm compiler sanitize memory leaks', 'no'), +- ('pulseaudio', 'Detect & Use pulseaudio', 'yes'), ++ ('alsa','Detect & Use alsa audio','no'), ++ ('oss','Detect & Use OSS audio','no'), ++ ('pulseaudio', 'Detect & Use pulseaudio', 'no'), + ('udev', 'Use udev for gamepad connection callbacks', 'no'), + ('debug_release', 'Add debug symbols to release version', 'no'), + ] +@@ -134,7 +131,7 @@ def configure(env): + env.ParseConfig('pkg-config xrandr --cflags --libs') - if (env["openssl"]=="yes"): -- env.ParseConfig('pkg-config openssl --cflags --libs') -+ env.ParseConfig('echo -lssl -lcrypto') + if (env['builtin_openssl'] == 'no'): +- env.ParseConfig('pkg-config openssl --cflags --libs') ++ env.ParseConfig('echo -lssl -lcrypto') + if (env['builtin_libwebp'] == 'no'): + env.ParseConfig('pkg-config libwebp --cflags --libs') +@@ -173,12 +170,13 @@ def configure(env): + if (env['builtin_glew'] == 'no'): + env.ParseConfig('pkg-config glew --cflags --libs') - if (env["freetype"]=="yes"): -@@ -152,12 +149,13 @@ def configure(env): +- if os.system("pkg-config --exists alsa") == 0: +- print("Enabling ALSA") +- env.Append(CPPFLAGS=["-DALSA_ENABLED"]) +- env.ParseConfig('pkg-config alsa --cflags --libs') +- else: +- print("ALSA libraries not found, disabling driver") ++ if (env["alsa"]=="yes"): ++ if os.system("pkg-config --exists alsa")==0: ++ print("Enabling ALSA") ++ env.Append(CPPFLAGS=["-DALSA_ENABLED"]) ++ env.Append(LIBS=['asound']) ++ else: ++ print("ALSA libraries not found, disabling driver") - env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) + if (platform.system() == "Linux"): + env.Append(CPPFLAGS=["-DJOYDEV_ENABLED"]) +@@ -193,6 +191,11 @@ def configure(env): + else: + print("libudev development libraries not found, disabling udev support") -- if os.system("pkg-config --exists alsa")==0: -- print("Enabling ALSA") -- env.Append(CPPFLAGS=["-DALSA_ENABLED"]) -- env.Append(LIBS=['asound']) -- else: -- print("ALSA libraries not found, disabling driver") -+ if (env["alsa"]=="yes"): -+ if os.system("pkg-config --exists alsa")==0: -+ print("Enabling ALSA") -+ env.Append(CPPFLAGS=["-DALSA_ENABLED"]) -+ env.Append(LIBS=['asound']) -+ else: -+ print("ALSA libraries not found, disabling driver") - - if (platform.system() == "Linux"): - env.Append(CPPFLAGS=["-DJOYDEV_ENABLED"]) -@@ -172,6 +170,10 @@ def configure(env): - else: - print("libudev development libraries not found, disabling udev support") - -+ if (env["oss"]=="yes"): -+ print("Enabling OSS Audio") -+ env.Append(CPPFLAGS=["-DOSS_ENABLED"]) ++ if (env["oss"]=="yes"): ++ print("Enabling OSS Audio") ++ env.Append(CPPFLAGS=["-DOSS_ENABLED"]) ++ env.Append(CCFLAGS=['-Ithirdparty/rtaudio']) + - if (env["pulseaudio"]=="yes"): - if not os.system("pkg-config --exists libpulse-simple"): - print("Enabling PulseAudio") + if (env["pulseaudio"] == "yes"): + if not os.system("pkg-config --exists libpulse-simple"): + print("Enabling PulseAudio") Index: head/devel/godot/files/patch-thirdparty_rtaudio_RtAudio.cpp =================================================================== --- head/devel/godot/files/patch-thirdparty_rtaudio_RtAudio.cpp (nonexistent) +++ head/devel/godot/files/patch-thirdparty_rtaudio_RtAudio.cpp (revision 432641) @@ -0,0 +1,89 @@ +--- thirdparty/rtaudio/RtAudio.cpp.orig 2016-08-09 07:52:15 UTC ++++ thirdparty/rtaudio/RtAudio.cpp +@@ -8589,6 +8589,12 @@ bool RtApiPulse::probeDeviceOpen( unsign + #include + #include + ++#if defined(__FreeBSD__) ++#define SND_DEVICE "/dev/dsp" ++#else ++#define SND_DEVICE "/dev/mixer" ++#endif ++ + static void *ossCallbackHandler(void * ptr); + + // A structure to hold various information related to the OSS API +@@ -8615,9 +8621,11 @@ RtApiOss :: ~RtApiOss() + + unsigned int RtApiOss :: getDeviceCount( void ) + { +- int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); ++ int mixerfd = open( SND_DEVICE, O_RDWR, 0 ); + if ( mixerfd == -1 ) { +- errorText_ = "RtApiOss::getDeviceCount: error opening '/dev/mixer'."; ++ errorText_ = "RtApiOss::getDeviceCount: error opening '"; ++ errorText_ += SND_DEVICE; ++ errorText_ += "'."; + error( RtAudioError::WARNING ); + return 0; + } +@@ -8639,9 +8647,11 @@ RtAudio::DeviceInfo RtApiOss :: getDevic + RtAudio::DeviceInfo info; + info.probed = false; + +- int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); ++ int mixerfd = open( SND_DEVICE, O_RDWR, 0 ); + if ( mixerfd == -1 ) { +- errorText_ = "RtApiOss::getDeviceInfo: error opening '/dev/mixer'."; ++ errorText_ = "RtApiOss::getDeviceInfo: error opening '"; ++ errorText_ += SND_DEVICE; ++ errorText_ += "'."; + error( RtAudioError::WARNING ); + return info; + } +@@ -8697,8 +8707,10 @@ RtAudio::DeviceInfo RtApiOss :: getDevic + info.nativeFormats |= RTAUDIO_SINT8; + if ( mask & AFMT_S32_LE || mask & AFMT_S32_BE ) + info.nativeFormats |= RTAUDIO_SINT32; ++#if defined(AFMT_FLOAT) + if ( mask & AFMT_FLOAT ) + info.nativeFormats |= RTAUDIO_FLOAT32; ++#endif + if ( mask & AFMT_S24_LE || mask & AFMT_S24_BE ) + info.nativeFormats |= RTAUDIO_SINT24; + +@@ -8757,9 +8769,11 @@ bool RtApiOss :: probeDeviceOpen( unsign + RtAudioFormat format, unsigned int *bufferSize, + RtAudio::StreamOptions *options ) + { +- int mixerfd = open( "/dev/mixer", O_RDWR, 0 ); ++ int mixerfd = open( SND_DEVICE, O_RDWR, 0 ); + if ( mixerfd == -1 ) { +- errorText_ = "RtApiOss::probeDeviceOpen: error opening '/dev/mixer'."; ++ errorText_ = "RtApiOss::probeDeviceOpen: error opening '"; ++ errorText_ += SND_DEVICE; ++ errorText_ += "'."; + return FAILURE; + } + +@@ -8787,7 +8801,11 @@ bool RtApiOss :: probeDeviceOpen( unsign + } + + oss_audioinfo ainfo; ++#if defined(__FreeBSD__) ++ ainfo.dev = -1; // specify -1 to get default device ++#else + ainfo.dev = device; ++#endif + result = ioctl( mixerfd, SNDCTL_AUDIOINFO, &ainfo ); + close( mixerfd ); + if ( result == -1 ) { +@@ -9025,7 +9043,7 @@ bool RtApiOss :: probeDeviceOpen( unsign + } + + // Verify the sample rate setup worked. +- if ( abs( srate - sampleRate ) > 100 ) { ++ if ( abs( srate - (int)sampleRate ) > 100 ) { + close( fd ); + errorStream_ << "RtApiOss::probeDeviceOpen: device (" << ainfo.name << ") does not support sample rate (" << sampleRate << ")."; + errorText_ = errorStream_.str(); Property changes on: head/devel/godot/files/patch-thirdparty_rtaudio_RtAudio.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/godot/files/patch-thirdparty_rtaudio_RtAudio.h =================================================================== --- head/devel/godot/files/patch-thirdparty_rtaudio_RtAudio.h (nonexistent) +++ head/devel/godot/files/patch-thirdparty_rtaudio_RtAudio.h (revision 432641) @@ -0,0 +1,16 @@ +--- thirdparty/rtaudio/RtAudio.h.orig 2016-08-09 07:52:15 UTC ++++ thirdparty/rtaudio/RtAudio.h +@@ -5,7 +5,13 @@ + #if defined(OSX_ENABLED) + #define __MACOSX_CORE__ + #elif defined(UNIX_ENABLED) ++#if defined(OSS_ENABLED) ++ #define __LINUX_OSS__ ++#elif defined(ALSA_ENABLED) + #define __LINUX_ALSA__ ++#elif defined(PULSEAUDIO_ENABLED) ++ #define __LINUX_PULSE__ ++#endif + #elif defined(WINDOWS_ENABLED) + #if defined(WINRT_ENABLED) + #define __RTAUDIO_DUMMY__ Property changes on: head/devel/godot/files/patch-thirdparty_rtaudio_RtAudio.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property