Date: Wed, 24 Aug 2016 19:21:11 +0000 (UTC) From: Kurt Jaeger <pi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r420818 - in head/devel: . godot godot-tools godot/files Message-ID: <201608241921.u7OJLBOM077416@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pi Date: Wed Aug 24 19:21:11 2016 New Revision: 420818 URL: https://svnweb.freebsd.org/changeset/ports/420818 Log: devel/godot: Update to 2.1 and add minimal devel/godot-tools slave port - Update to 2.1 release - Add LICENSE_FILE for MIT license - Add CCBYv3 license for logo - Add devel/xdg-user-dirs, devel/xdg-utils and x11/xmessage to RUN_DEPENDS - Add xrandr to USE_XORG - Replace USE_OPENSSL=yes with USES+=ssl - Add gl to USE_GL - Remove GLU dependency - glu.h was included from imported glew.h but GLU components are not used - Add DEBUG option and clarify build targets - Replace TOOLS option with devel/godot-tools port, while devel/godot port used as runtime - Allow to build ALSA and PulseAudio drivers independently - Allow to build RtAudio driver with OSS or ALSA or PulseAudio - Set OSS option by default - Add desktop entry for godot-tools - Add sed patch to fix executable paths inside of ${WRKSRC}/platform/x11/os_x11.cpp file - Remove mkdir, because of COPYTREE_SHARE usage, which recreates destination directories - Remove RM command for demos/2d/hexamap/.fscache file, because the file is not available for current version - Add patch to enable OSS usage for RtAudio driver on FreeBSD - Add patch to fix issue(s) with OS_Unix::execute and OS_Unix::get_executable_path functions on FreeBSD - Add patch to fix layout of --help text - Remove pkg-plist and use dynamic package list with PORTDATA and PLIST_FILES - Use current head commit of 2.1 branch from new github repo godotengine/godot-demo-projects to install examples (this was previously part of godot repo) PR: 209742 Submitted by: lightside@gmx.com Approved by: FreeBSD@Shaneware.biz Added: head/devel/godot-tools/ head/devel/godot-tools/Makefile (contents, props changed) head/devel/godot/files/patch-drivers_rtaudio_RtAudio.cpp (contents, props changed) head/devel/godot/files/patch-drivers_rtaudio_RtAudio.h (contents, props changed) head/devel/godot/files/patch-drivers_rtaudio_audio__driver__rtaudio.cpp (contents, props changed) head/devel/godot/files/patch-drivers_unix_os__unix.cpp (contents, props changed) head/devel/godot/files/patch-main_main.cpp (contents, props changed) Deleted: head/devel/godot/pkg-plist Modified: head/devel/Makefile head/devel/godot/Makefile head/devel/godot/distinfo head/devel/godot/files/patch-SConstruct head/devel/godot/files/patch-platform_x11_detect.py Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Wed Aug 24 19:10:53 2016 (r420817) +++ head/devel/Makefile Wed Aug 24 19:21:11 2016 (r420818) @@ -753,6 +753,7 @@ SUBDIR += gobject-introspection SUBDIR += godep SUBDIR += godot + SUBDIR += godot-tools SUBDIR += goffice SUBDIR += goffice010 SUBDIR += google-gdata Added: head/devel/godot-tools/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/godot-tools/Makefile Wed Aug 24 19:21:11 2016 (r420818) @@ -0,0 +1,13 @@ +# Created by: Shane Ambler <FreeBSD@Shaneware.biz> +# $FreeBSD$ + +PKGNAMESUFFIX= -tools + +COMMENT= Game integrated development environment + +OPTIONS_EXCLUDE= # +OPTIONS_SLAVE= TOOLS + +MASTERDIR= ${.CURDIR}/../godot + +.include "${MASTERDIR}/Makefile" Modified: head/devel/godot/Makefile ============================================================================== --- head/devel/godot/Makefile Wed Aug 24 19:10:53 2016 (r420817) +++ head/devel/godot/Makefile Wed Aug 24 19:21:11 2016 (r420818) @@ -2,76 +2,94 @@ # $FreeBSD$ PORTNAME= godot -PORTVERSION= 2.0.3 +PORTVERSION= 2.1 DISTVERSIONSUFFIX= -stable CATEGORIES= devel games MAINTAINER= FreeBSD@Shaneware.biz -COMMENT= Game engine and development environment +COMMENT?= Game runtime engine -LICENSE= MIT - -LIB_DEPENDS= libfreetype.so:print/freetype2 \ - libasound.so:audio/alsa-lib +LICENSE= MIT CCBYv3 +LICENSE_COMB= multi +LICENSE_NAME_CCBYv3= Creative Commons Attribution 3.0 Unported license +LICENSE_FILE_CCBYv3= ${WRKSRC}/LOGO_LICENSE.md +LICENSE_FILE_MIT= ${WRKSRC}/LICENSE.md +LICENSE_PERMS_CCBYv3= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + +LIB_DEPENDS= libfreetype.so:print/freetype2 +RUN_DEPENDS= xdg-user-dir:devel/xdg-user-dirs \ + xdg-open:devel/xdg-utils \ + xmessage:x11/xmessage USE_GITHUB= yes GH_ACCOUNT= godotengine -USES= scons pkgconfig compiler -USE_XORG= x11 xcursor xinerama -USE_GL= glu -USE_OPENSSL= yes +USES= compiler:c++11-lib pkgconfig scons ssl +USE_XORG= x11 xcursor xinerama xrandr +USE_GL= gl MAKE_ARGS+= platform=x11 -CXXFLAGS+= -DRTAUDIO_ENABLED +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 OPTIONS_DEFINE= EXAMPLES TOOLS -OPTIONS_DEFAULT= TOOLS -OPTIONS_SUB= yes - +OPTIONS_DEFAULT= OSS +# Moved to devel/godot-tools +OPTIONS_EXCLUDE?= EXAMPLES TOOLS +OPTIONS_GROUP= AUDIO +OPTIONS_GROUP_AUDIO= ALSA OSS PULSEAUDIO + +EXAMPLES_GH_PROJECT= godot-demo-projects:DEMOS +# Branch HEAD for PORTVERSION +EXAMPLES_GH_TAGNAME= dfa1274:DEMOS +EXAMPLES_PORTEXAMPLES= * TOOLS_DESC= Include development tools (IDE) -TOOLS_MAKE_ARGS_ON= tools=yes -TOOLS_MAKE_ARGS_OFF= tools=no target=release - -.include <bsd.port.pre.mk> - -.if ${ARCH}==amd64 || ${ARCH}==powerpc64 || ${ARCH}==sparc64 || ${ARCH}==ia64 -BITSUF= .64 -.else -BITSUF= .32 -.endif - -.if ${CHOSEN_COMPILER_TYPE} == clang -LLSUF= .llvm -MAKE_ARGS+= use_llvm=yes -.else # clang -USE_GCC= yes -.if ${ARCH} == i386 -CXXFLAGS+= -march=i586 +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 -.endif # clang - -.if ${PORT_OPTIONS:MTOOLS} -TOOLSUF= .tools -.else -TOOLSUF= .opt -.endif - -BINSUFFIX= ${TOOLSUF}${BITSUF}${LLSUF} -PLIST_SUB+= BINSUFF=${BINSUFFIX} post-patch: - @${REINPLACE_CMD} -e 's|custom_build|${OPSYS}_Ports_build|' ${WRKSRC}/methods.py - + @${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${BINSUFFIX} \ - ${STAGEDIR}/${PREFIX}/bin/godot.x11${BINSUFFIX} - @${LN} ${STAGEDIR}/${PREFIX}/bin/godot.x11${BINSUFFIX} \ - ${STAGEDIR}/${PREFIX}/bin/godot + @cd ${WRKSRC}/bin && ${INSTALL_PROGRAM} godot.x11* \ + ${STAGEDIR}/${PREFIX}/bin/${GODOTFILE} do-install-EXAMPLES-on: - ${MKDIR} ${STAGEDIR}${DATADIR} - (cd ${WRKSRC} && ${COPYTREE_SHARE} demos ${STAGEDIR}${DATADIR}) - ${RM} ${STAGEDIR}${DATADIR}/demos/2d/hexamap/.fscache + (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 <bsd.port.post.mk> +.include <bsd.port.mk> Modified: head/devel/godot/distinfo ============================================================================== --- head/devel/godot/distinfo Wed Aug 24 19:10:53 2016 (r420817) +++ head/devel/godot/distinfo Wed Aug 24 19:21:11 2016 (r420818) @@ -1,3 +1,5 @@ -TIMESTAMP = 1463653508 -SHA256 (godotengine-godot-2.0.3-stable_GH0.tar.gz) = 8112742141fc5b3467e19206c677aa81738eded0681280d7c3817520afedc383 -SIZE (godotengine-godot-2.0.3-stable_GH0.tar.gz) = 32804039 +TIMESTAMP = 1470729135 +SHA256 (godotengine-godot-2.1-stable_GH0.tar.gz) = 0d2a6f5a3689a818cb4859e7655e64a4d603940fae1bdf16a18b980c22b0b6fe +SIZE (godotengine-godot-2.1-stable_GH0.tar.gz) = 17917448 +SHA256 (godotengine-godot-demo-projects-dfa1274_GH0.tar.gz) = 42420f7f473b1391a13f226473d1cc850605f24d2865220e4c5acde05f1c340c +SIZE (godotengine-godot-demo-projects-dfa1274_GH0.tar.gz) = 18423807 Modified: head/devel/godot/files/patch-SConstruct ============================================================================== --- head/devel/godot/files/patch-SConstruct Wed Aug 24 19:10:53 2016 (r420817) +++ head/devel/godot/files/patch-SConstruct Wed Aug 24 19:21:11 2016 (r420818) @@ -1,6 +1,6 @@ ---- SConstruct.orig 2016-02-29 11:52:09 UTC +--- SConstruct.orig 2016-08-09 07:52:15 UTC +++ SConstruct -@@ -223,15 +223,17 @@ if selected_platform in platform_list: +@@ -231,15 +231,17 @@ if selected_platform in platform_list: if env["extra_suffix"] != '' : env.extra_suffix += '.'+env["extra_suffix"] Added: head/devel/godot/files/patch-drivers_rtaudio_RtAudio.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/godot/files/patch-drivers_rtaudio_RtAudio.cpp Wed Aug 24 19:21:11 2016 (r420818) @@ -0,0 +1,89 @@ +--- 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 <errno.h> + #include <math.h> + ++#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(); Added: head/devel/godot/files/patch-drivers_rtaudio_RtAudio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/godot/files/patch-drivers_rtaudio_RtAudio.h Wed Aug 24 19:21:11 2016 (r420818) @@ -0,0 +1,16 @@ +--- 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__ Added: head/devel/godot/files/patch-drivers_rtaudio_audio__driver__rtaudio.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/godot/files/patch-drivers_rtaudio_audio__driver__rtaudio.cpp Wed Aug 24 19:21:11 2016 (r420818) @@ -0,0 +1,18 @@ +--- drivers/rtaudio/audio_driver_rtaudio.cpp.orig 2016-08-09 07:52:15 UTC ++++ drivers/rtaudio/audio_driver_rtaudio.cpp +@@ -35,8 +35,14 @@ const char* AudioDriverRtAudio::get_name + + #ifdef OSX_ENABLED + return "RtAudio-OSX"; +-#elif defined(UNIX_ENABLED) ++#elif defined(UNIX_ENABLED) && (defined(ALSA_ENABLED) || defined(PULSEAUDIO_ENABLED) || defined(OSS_ENABLED)) ++#if defined(OSS_ENABLED) ++ return "RtAudio-OSS"; ++#elif defined(ALSA_ENABLED) + return "RtAudio-ALSA"; ++#elif defined(PULSEAUDIO_ENABLED) ++ return "RtAudio-PulseAudio"; ++#endif + #elif defined(WINDOWS_ENABLED) + return "RtAudio-DirectSound"; + #else Added: head/devel/godot/files/patch-drivers_unix_os__unix.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/godot/files/patch-drivers_unix_os__unix.cpp Wed Aug 24 19:21:11 2016 (r420818) @@ -0,0 +1,50 @@ +--- drivers/unix/os_unix.cpp.orig 2016-08-09 07:52:15 UTC ++++ drivers/unix/os_unix.cpp +@@ -50,6 +50,7 @@ + + #ifdef __FreeBSD__ + #include <sys/param.h> ++#include <sys/sysctl.h> + #endif + #include <stdarg.h> + #include <sys/time.h> +@@ -371,17 +372,7 @@ Error OS_Unix::execute(const String& p_p + args.push_back((char*)cs[i].get_data());// shitty C cast + args.push_back(0); + +-#ifdef __FreeBSD__ +- if(p_path.find("/")) { +- // exec name contains path so use it +- execv(p_path.utf8().get_data(),&args[0]); +- }else{ +- // use program name and search through PATH to find it +- execvp(getprogname(),&args[0]); +- } +-#else + execv(p_path.utf8().get_data(),&args[0]); +-#endif + // still alive? something failed.. + fprintf(stderr,"**ERROR** OS_Unix::execute - Could not create child process while executing: %s\n",p_path.utf8().get_data()); + abort(); +@@ -503,11 +494,16 @@ String OS_Unix::get_executable_path() co + } + return b; + #elif defined(__FreeBSD__) +- char resolved_path[MAXPATHLEN]; +- +- realpath(OS::get_executable_path().utf8().get_data(), resolved_path); +- +- return String(resolved_path); ++ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; ++ char buf[MAXPATHLEN]; ++ size_t len = sizeof(buf); ++ if (sysctl(mib, 4, buf, &len, NULL, 0) != 0) { ++ WARN_PRINT("Couldn't get executable path from sysctl"); ++ return OS::get_executable_path(); ++ } ++ String b; ++ b.parse_utf8(buf); ++ return b; + #elif defined(__APPLE__) + char temp_path[1]; + uint32_t buff_size=1; Added: head/devel/godot/files/patch-main_main.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/godot/files/patch-main_main.cpp Wed Aug 24 19:21:11 2016 (r420818) @@ -0,0 +1,11 @@ +--- 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;i<OS::get_singleton()->get_audio_driver_count();i++) { + Modified: head/devel/godot/files/patch-platform_x11_detect.py ============================================================================== --- head/devel/godot/files/patch-platform_x11_detect.py Wed Aug 24 19:10:53 2016 (r420817) +++ head/devel/godot/files/patch-platform_x11_detect.py Wed Aug 24 19:21:11 2016 (r420818) @@ -1,4 +1,4 @@ ---- platform/x11/detect.py.orig 2016-02-29 16:49:54 UTC +--- platform/x11/detect.py.orig 2016-08-09 07:52:15 UTC +++ platform/x11/detect.py @@ -30,11 +30,6 @@ def can_build(): print("X11 not found.. x11 disabled.") @@ -12,8 +12,19 @@ x11_error=os.system("pkg-config xcursor --modversion > /dev/null ") if (x11_error): print("xcursor not found.. x11 disabled.") -@@ -133,7 +128,7 @@ def configure(env): - env.ParseConfig('pkg-config xcursor --cflags --libs') +@@ -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') if (env["openssl"]=="yes"): - env.ParseConfig('pkg-config openssl --cflags --libs') @@ -21,3 +32,34 @@ if (env["freetype"]=="yes"): +@@ -152,12 +149,13 @@ def configure(env): + + env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) + +- 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["pulseaudio"]=="yes"): + if not os.system("pkg-config --exists libpulse-simple"): + print("Enabling PulseAudio")
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608241921.u7OJLBOM077416>