1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-15 07:56:36 +00:00

devel/godot: update to 3.1

PR:		236731
Submitted by:	Shane <FreeBSD@ShaneWare.Biz> (maintainer)
This commit is contained in:
Steve Wills 2019-04-18 19:45:12 +00:00
parent e415ed1be5
commit b50c30a48f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=499312
17 changed files with 120 additions and 261 deletions

View File

@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= godot
PORTVERSION= 3.0.6
PORTREVISION= 1
DISTVERSIONSUFFIX= -stable
PORTVERSION= 3.1
DISTVERSIONSUFFIX= -stable
CATEGORIES= devel games
MAINTAINER= FreeBSD@Shaneware.biz
@ -27,10 +26,8 @@ RUN_DEPENDS= xdg-user-dir:devel/xdg-user-dirs \
xdg-open:devel/xdg-utils \
xmessage:x11/xmessage
# on 10.4 using clang34 fails - so we want to use clang60
# gl already needs clang60 so this shouldn't add any overhead
USES= compiler:c++14-lang pkgconfig scons ssl
USE_XORG= x11 xcursor xi xinerama xrandr
USE_XORG= x11 xcursor xi xinerama xrandr xrender
USE_GL= gl glew glu
USE_GITHUB= yes
@ -47,27 +44,27 @@ CXXFLAGS_sparc64= -DNO_THREADS
CXXFLAGS_mips= -DNO_THREADS
CXXFLAGS_mips64= -DNO_THREADS
# option MONO can be built but is not stable enough to use yet
# for now leave it out as an option
# option MONO doesn't build (needs 5.12+) so for now leave it out as an option
OPTIONS_DEFINE= EXAMPLES TOOLS
OPTIONS_DEFAULT= OSS
OPTIONS_DEFAULT= ALSA
# Moved to devel/godot-tools
OPTIONS_EXCLUDE?= EXAMPLES TOOLS
OPTIONS_GROUP= AUDIO
OPTIONS_GROUP_AUDIO= ALSA OSS PULSEAUDIO
OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO
AUDIO_DESC= Audio support
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
ALSA_MAKE_ARGS= alsa=True
EXAMPLES_GH_PROJECT= godot-demo-projects:DEMOS
# master at 31/1
EXAMPLES_GH_TAGNAME= d69cc10a0b8a:DEMOS
# master at 23/3
EXAMPLES_GH_TAGNAME= 17e80079e3fc:DEMOS
EXAMPLES_PORTEXAMPLES= *
# while mono support can build it isn't stable enough to be used yet
MONO_LIB_DEPENDS= libmonosgen-2.0.so:lang/mono
MONO_MAKE_ARGS= module_mono_enabled=True
OSS_MAKE_ARGS= oss=True
PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio
# mono support doesn't build at present
MONO_USES= mono:nuget
NUGET_DEPENDS= DotNet.Glob=2.1.1
MONO_MAKE_ARGS= module_mono_enabled=True mono_glue=True NUGET_PATH=${NUGET_EXE}
MONO_MAKE_ENV= NUGET_PATH=${NUGET_EXE}
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_MAKE_ARGS= pulseaudio=True
TOOLS_DESC= Include development tools (IDE)
TOOLS_MAKE_ARGS= target=release_debug tools=True
@ -91,7 +88,7 @@ post-patch:
@${REINPLACE_CMD} -e 's|/usr/bin|${PREFIX}/bin|' \
${WRKSRC}/platform/x11/os_x11.cpp
pre-build-MONO-on:
pre-build-MONO-on: makenuget
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g} \
target=release_debug tools=True mono_glue=False)

View File

@ -1,5 +1,7 @@
TIMESTAMP = 1536387978
SHA256 (godotengine-godot-3.0.6-stable_GH0.tar.gz) = 50431e021ee5ec21002cc23435f530f8fde518c6eb7085c9f7f1027abaae2581
SIZE (godotengine-godot-3.0.6-stable_GH0.tar.gz) = 18958766
SHA256 (godotengine-godot-demo-projects-d69cc10a0b8a_GH0.tar.gz) = b798d0bb56a643fdb175df463990904523495dd5546bc00bbe762e0645b7c94a
SIZE (godotengine-godot-demo-projects-d69cc10a0b8a_GH0.tar.gz) = 140126782
TIMESTAMP = 1553320527
SHA256 (dotnet.glob.2.1.1.nupkg) = 8fa01b1928a9c4b70a4803226dcd2ec942474daf2876b80e35a0380d72f8fc1a
SIZE (dotnet.glob.2.1.1.nupkg) = 73782
SHA256 (godotengine-godot-3.1-stable_GH0.tar.gz) = cd66354b2397f28193ba3add8d8cc5c3562775f662887b56f16de82974f041e3
SIZE (godotengine-godot-3.1-stable_GH0.tar.gz) = 20400493
SHA256 (godotengine-godot-demo-projects-17e80079e3fc_GH0.tar.gz) = b430cb02302489f66f69ca6e743b47e227148ae8224cae625c5cfa744d940433
SIZE (godotengine-godot-demo-projects-17e80079e3fc_GH0.tar.gz) = 151343471

View File

@ -1,11 +0,0 @@
--- drivers/SCsub.orig 2016-11-30 21:41:21 UTC
+++ drivers/SCsub
@@ -18,6 +18,8 @@ SConscript('pulseaudio/SCsub')
if (env["platform"] == "windows"):
SConscript("rtaudio/SCsub")
SConscript("wasapi/SCsub")
+if env["platform"] == "x11":
+ SConscript("rtaudio/SCsub")
if env['xaudio2']:
SConscript("xaudio2/SCsub")

View File

@ -1,18 +0,0 @@
--- 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

View File

@ -1,11 +1,11 @@
--- modules/enet/SCsub.orig 2018-06-13 11:43:18 UTC
--- modules/enet/SCsub.orig 2019-03-23 10:48:38 UTC
+++ modules/enet/SCsub
@@ -22,7 +22,7 @@ if env['builtin_enet']:
@@ -21,7 +21,7 @@ if env['builtin_enet']:
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_enet.add_source_files(env.modules_sources, thirdparty_sources)
- env_enet.Append(CPPPATH=[thirdparty_dir])
+ env_enet.Prepend(CPPPATH=[thirdparty_dir])
env_enet.Append(CPPFLAGS=["-DGODOT_ENET"])
env_enet.add_source_files(env.modules_sources, "*.cpp")
env_thirdparty = env_enet.Clone()

View File

@ -1,11 +1,11 @@
--- modules/squish/SCsub.orig 2018-06-13 12:02:27 UTC
--- modules/squish/SCsub.orig 2019-03-23 11:07:40 UTC
+++ modules/squish/SCsub
@@ -23,7 +23,7 @@ if env['builtin_squish']:
@@ -22,7 +22,7 @@ if env['builtin_squish']:
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_squish.add_source_files(env.modules_sources, thirdparty_sources)
- env_squish.Append(CPPPATH=[thirdparty_dir])
+ env_squish.Prepend(CPPPATH=[thirdparty_dir])
# Godot source files
env_squish.add_source_files(env.modules_sources, "*.cpp")
env_thirdparty = env_squish.Clone()
env_thirdparty.disable_warnings()

View File

@ -0,0 +1,11 @@
--- modules/webm/libvpx/SCsub.orig 2019-03-23 15:10:53 UTC
+++ modules/webm/libvpx/SCsub
@@ -256,7 +256,7 @@ libvpx_sources_arm_neon_gas_apple = [libvpx_dir + file
env_libvpx = env_modules.Clone()
env_libvpx.disable_warnings()
-env_libvpx.Append(CPPPATH=[libvpx_dir])
+env_libvpx.Prepend(CPPPATH=[libvpx_dir])
webm_multithread = env["platform"] != 'javascript'

View File

@ -1,52 +0,0 @@
--- platform/x11/detect.py.orig 2018-03-04 00:52:04 UTC
+++ platform/x11/detect.py
@@ -52,7 +52,9 @@ def get_opts():
BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False),
BoolVariable('use_sanitizer', 'Use LLVM compiler address sanitizer', False),
BoolVariable('use_leak_sanitizer', 'Use LLVM compiler memory leaks sanitizer (implies use_sanitizer)', False),
- BoolVariable('pulseaudio', 'Detect & use pulseaudio', True),
+ BoolVariable('alsa','Detect & Use alsa audio',False),
+ BoolVariable('oss','Detect & Use OSS audio',False),
+ BoolVariable('pulseaudio', 'Detect & Use pulseaudio', False),
BoolVariable('udev', 'Use udev for gamepad connection callbacks', False),
EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')),
BoolVariable('separate_debug_symbols', 'Create a separate file with the debug symbols', False),
@@ -154,7 +156,12 @@ def configure(env):
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
if not env['builtin_openssl']:
- env.ParseConfig('pkg-config openssl --cflags --libs')
+ try:
+ # try to find a port installed openssl
+ env.ParseConfig('pkg-config openssl --cflags --libs')
+ except:
+ # if none found use base system openssl
+ env.ParseConfig('echo -lssl -lcrypto')
if not env['builtin_libwebp']:
env.ParseConfig('pkg-config libwebp --cflags --libs')
@@ -226,12 +233,18 @@ def configure(env):
## Flags
- if (os.system("pkg-config --exists alsa") == 0): # 0 means found
- 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']:
+ 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['oss']:
+ print("Enabling OSS Audio")
+ env.Append(CPPFLAGS=["-DOSS_ENABLED"])
+ env.Append(CCFLAGS=['-Ithirdparty/rtaudio'])
if env['pulseaudio']:
if (os.system("pkg-config --exists libpulse-simple") == 0): # 0 means found

View File

@ -1,13 +0,0 @@
--- platform/x11/os_x11.cpp.orig 2018-01-03 04:32:19 UTC
+++ platform/x11/os_x11.cpp
@@ -2469,6 +2469,10 @@ OS_X11::OS_X11() {
AudioDriverManager::add_driver(&driver_pulseaudio);
#endif
+#ifdef RTAUDIO_ENABLED
+ AudioDriverManager::add_driver(&driver_rtaudio);
+#endif
+
#ifdef ALSA_ENABLED
AudioDriverManager::add_driver(&driver_alsa);
#endif

View File

@ -1,21 +0,0 @@
--- platform/x11/os_x11.h.orig 2018-01-03 09:26:19 UTC
+++ platform/x11/os_x11.h
@@ -38,6 +38,7 @@
//#include "servers/visual/visual_server_wrap_mt.h"
#include "drivers/alsa/audio_driver_alsa.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
+#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "joypad_linux.h"
#include "main/input_default.h"
#include "power_x11.h"
@@ -166,6 +167,10 @@ class OS_X11 : public OS_Unix {
AudioDriverPulseAudio driver_pulseaudio;
#endif
+#ifdef RTAUDIO_ENABLED
+ AudioDriverRtAudio driver_rtaudio;
+#endif
+
Atom net_wm_icon;
PowerX11 *power_manager;

View File

@ -0,0 +1,20 @@
--- thirdparty/libvpx/vpx/vpx_codec.h.orig 2019-03-23 14:24:15 UTC
+++ thirdparty/libvpx/vpx/vpx_codec.h
@@ -36,8 +36,8 @@
* Once initialized, the instance is manged using other functions from
* the vpx_codec_* family.
*/
-#ifndef VPX_VPX_CODEC_H_
-#define VPX_VPX_CODEC_H_
+#ifndef VPX_VPX_VPX_CODEC_H_
+#define VPX_VPX_VPX_CODEC_H_
#ifdef __cplusplus
extern "C" {
@@ -475,5 +475,5 @@ extern "C" {
#ifdef __cplusplus
}
#endif
-#endif // VPX_VPX_CODEC_H_
+#endif // VPX_VPX_VPX_CODEC_H_

View File

@ -0,0 +1,20 @@
--- thirdparty/libvpx/vpx/vpx_decoder.h.orig 2019-03-23 14:46:15 UTC
+++ thirdparty/libvpx/vpx/vpx_decoder.h
@@ -7,8 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef VPX_VPX_DECODER_H_
-#define VPX_VPX_DECODER_H_
+#ifndef VPX_VPX_VPX_DECODER_H_
+#define VPX_VPX_VPX_DECODER_H_
/*!\defgroup decoder Decoder Algorithm Interface
* \ingroup codec
@@ -374,5 +374,5 @@ extern "C" {
#ifdef __cplusplus
}
#endif
-#endif // VPX_VPX_DECODER_H_
+#endif // VPX_VPX_VPX_DECODER_H_

View File

@ -0,0 +1,19 @@
--- thirdparty/libvpx/vpx/vpx_frame_buffer.h.orig 2019-03-23 14:31:21 UTC
+++ thirdparty/libvpx/vpx/vpx_frame_buffer.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef VPX_VPX_FRAME_BUFFER_H_
-#define VPX_VPX_FRAME_BUFFER_H_
+#ifndef VPX_VPX_VPX_FRAME_BUFFER_H_
+#define VPX_VPX_VPX_FRAME_BUFFER_H_
/*!\file
* \brief Describes the decoder external frame buffer interface.
@@ -80,4 +80,4 @@ typedef int (*vpx_release_frame_buffer_cb_fn_t)(
} // extern "C"
#endif
-#endif // VPX_VPX_FRAME_BUFFER_H_
+#endif // VPX_VPX_VPX_FRAME_BUFFER_H_

View File

@ -0,0 +1,19 @@
--- thirdparty/libvpx/vpx/vpx_image.h.orig 2019-03-23 14:18:30 UTC
+++ thirdparty/libvpx/vpx/vpx_image.h
@@ -13,8 +13,8 @@
* \brief Describes the vpx image descriptor and associated operations
*
*/
-#ifndef VPX_VPX_IMAGE_H_
-#define VPX_VPX_IMAGE_H_
+#ifndef VPX_VPX_VPX_IMAGE_H_
+#define VPX_VPX_VPX_IMAGE_H_
#ifdef __cplusplus
extern "C" {
@@ -232,4 +232,4 @@ extern "C" {
} // extern "C"
#endif
-#endif // VPX_VPX_IMAGE_H_
+#endif // VPX_VPX_VPX_IMAGE_H_

View File

@ -1,89 +0,0 @@
--- 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 <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();

View File

@ -1,16 +0,0 @@
--- 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__

View File

@ -1,9 +0,0 @@
--- thirdparty/zstd/SCsub.orig 2018-06-13 11:53:45 UTC
+++ thirdparty/zstd/SCsub
@@ -25,5 +25,5 @@ thirdparty_zstd_sources = [
]
thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources]
env.add_source_files(env.core_sources, thirdparty_zstd_sources)
-env.Append(CPPPATH=["#thirdparty/zstd", "#thirdparty/zstd/common"])
+env.Prepend(CPPPATH=["#thirdparty/zstd", "#thirdparty/zstd/common"])
env.Append(CCFLAGS="-DZSTD_STATIC_LINKING_ONLY")