View | Details | Raw Unified | Return to bug 200424 | Differences between
and this patch

Collapse All | Expand All

(-)godot/Makefile (-4 / +3 lines)
Lines 2-10 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	godot
4
PORTNAME=	godot
5
PORTVERSION=	1.0
5
PORTVERSION=	1.1
6
DISTVERSIONSUFFIX=	-stable
6
DISTVERSIONSUFFIX=	-stable
7
PORTREVISION=	1
8
CATEGORIES=	devel games
7
CATEGORIES=	devel games
9
8
10
MAINTAINER=	FreeBSD@Shaneware.biz
9
MAINTAINER=	FreeBSD@Shaneware.biz
Lines 19-25 Link Here
19
GH_ACCOUNT=	okamstudio
18
GH_ACCOUNT=	okamstudio
20
19
21
USES=		scons pkgconfig compiler
20
USES=		scons pkgconfig compiler
22
USE_XORG=	x11 xcursor
21
USE_XORG=	x11 xcursor xinerama
23
USE_GL=		glu
22
USE_GL=		glu
24
USE_OPENSSL=	yes
23
USE_OPENSSL=	yes
25
24
Lines 41-47 Link Here
41
BITSUF=	.32
40
BITSUF=	.32
42
.endif
41
.endif
43
42
44
.if ${COMPILER_TYPE} == clang
43
.if ${CHOSEN_COMPILER_TYPE} == clang
45
.if ${OSVERSION} < 900000
44
.if ${OSVERSION} < 900000
46
BROKEN=	clang fails to link on 8.x
45
BROKEN=	clang fails to link on 8.x
47
.endif
46
.endif
(-)godot/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (okamstudio-godot-1.0-stable_GH0.tar.gz) = b3017c145a7715b717a513dd289793688b0c12394f4b56b351a126b678f87064
1
SHA256 (okamstudio-godot-1.1-stable_GH0.tar.gz) = 64281f4fa485cac13ff5b0bc00449a62b19198fc072260d3fb01aa5aad2be8a5
2
SIZE (okamstudio-godot-1.0-stable_GH0.tar.gz) = 25111224
2
SIZE (okamstudio-godot-1.1-stable_GH0.tar.gz) = 54744842
(-)godot/files/extra-patch-core_variant.h (+24 lines)
Line 0 Link Here
1
--- core/variant.h.orig	2014-12-15 18:49:18 UTC
2
+++ core/variant.h
3
@@ -167,8 +167,9 @@ public:
4
 	static String get_type_name(Variant::Type p_type);
5
 	static bool can_convert(Type p_type_from,Type p_type_to);
6
 
7
+#if defined(_MSC_VER)
8
 #pragma runtime_checks( "", off )
9
-
10
+#endif
11
 	template<class T>
12
 	static Type get_type_for() {
13
 		
14
@@ -177,8 +178,9 @@ public:
15
 		Type r = v.get_type();
16
 		return r;
17
 	}
18
+#if defined(_MSC_VER)
19
 #pragma runtime_checks( "", restore )
20
-
21
+#endif
22
 	bool is_ref() const;
23
 	_FORCE_INLINE_ bool is_num() const { return type==INT || type==REAL; };
24
 	_FORCE_INLINE_ bool is_array() const { return type>=ARRAY; };
(-)godot/files/extra-patch-drivers_unix_ip__unix.cpp (+20 lines)
Line 0 Link Here
1
--- drivers/unix/ip_unix.cpp.orig	2014-12-15 18:49:18 UTC
2
+++ drivers/unix/ip_unix.cpp
3
@@ -50,11 +50,16 @@
4
  #ifdef ANDROID_ENABLED
5
   #include "platform/android/ifaddrs_android.h"
6
  #else
7
+ #ifdef __FreeBSD__
8
+  #include <sys/types.h>
9
+ #endif
10
   #include <ifaddrs.h>
11
  #endif
12
  #include <arpa/inet.h>
13
  #include <sys/socket.h>
14
-
15
+ #ifdef __FreeBSD__
16
+  #include <netinet/in.h>
17
+ #endif
18
 #endif
19
 
20
 IP_Address IP_Unix::_resolve_hostname(const String& p_hostname) {
(-)godot/files/extra-patch-drivers_unix_os__unix.cpp (+44 lines)
Line 0 Link Here
1
--- drivers/unix/os_unix.cpp.orig	2014-12-15 18:49:18 UTC
2
+++ drivers/unix/os_unix.cpp
3
@@ -44,7 +44,9 @@
4
 #include "stream_peer_tcp_posix.h"
5
 #include "packet_peer_udp_posix.h"
6
 
7
-
8
+#ifdef __FreeBSD__
9
+#include <sys/param.h>
10
+#endif
11
 #include <stdarg.h>
12
 #include <sys/time.h>
13
 #include <sys/wait.h>
14
@@ -305,7 +307,17 @@ Error OS_Unix::execute(const String& p_p
15
 			args.push_back((char*)cs[i].get_data());// shitty C cast
16
 		args.push_back(0);
17
 
18
+#ifdef __FreeBSD__
19
+        if(p_path.find("/")) {
20
+            // exec name contains path so use it
21
+            execv(p_path.utf8().get_data(),&args[0]);
22
+        }else{
23
+            // use program name and search through PATH to find it
24
+		    execvp(getprogname(),&args[0]);
25
+		}
26
+#else
27
 		execv(p_path.utf8().get_data(),&args[0]);
28
+#endif
29
 		// still alive? something failed..
30
 		fprintf(stderr,"**ERROR** OS_Unix::execute - Could not create child process while executing: %s\n",p_path.utf8().get_data());
31
 		abort();
32
@@ -415,6 +427,12 @@ String OS_Unix::get_executable_path() co
33
 		return OS::get_executable_path();
34
 	}
35
 	return b;
36
+#elif defined(__FreeBSD__)
37
+    char resolved_path[MAXPATHLEN];
38
+    
39
+    realpath(OS::get_executable_path().utf8().get_data(), resolved_path);
40
+
41
+    return String(resolved_path);
42
 #else
43
 	ERR_PRINT("Warning, don't know how to obtain executable path on this OS! Please override this function properly.");
44
 	return OS::get_executable_path();
(-)godot/files/old-patch-platform_x11_detect.py (+63 lines)
Line 0 Link Here
1
--- platform/x11/detect.py.orig	2014-12-15 21:49:18.000000000 +0300
2
+++ platform/x11/detect.py	2015-03-03 07:01:34.000000000 +0300
3
@@ -29,11 +29,6 @@
4
 		print("X11 not found.. x11 disabled.")
5
 		return False
6
 
7
-        ssl_error=os.system("pkg-config openssl --modversion > /dev/null ")
8
-        if (ssl_error):
9
-                print("OpenSSL not found.. x11 disabled.")
10
-                return False
11
-
12
 	x11_error=os.system("pkg-config xcursor --modversion > /dev/null ")
13
 	if (x11_error):
14
 		print("xcursor not found.. x11 disabled.")
15
@@ -72,17 +67,16 @@
16
 
17
 	env.Append(CPPPATH=['#platform/x11'])
18
 	if (env["use_llvm"]=="yes"):
19
-		env["CC"]="clang"
20
-		env["CXX"]="clang++"
21
-		env["LD"]="clang++"
22
-		if (env["use_sanitizer"]=="yes"):
23
-			env.Append(CXXFLAGS=['-fsanitize=address','-fno-omit-frame-pointer'])
24
-			env.Append(LINKFLAGS=['-fsanitize=address'])
25
-			env.extra_suffix=".llvms"
26
-		else:
27
-			env.extra_suffix=".llvm"
28
-
29
-
30
+		if 'clang++' not in env['CXX']:
31
+			env["CC"]="clang"
32
+			env["CXX"]="clang++"
33
+			env["LD"]="clang++"
34
+		env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
35
+		env.extra_suffix=".llvm"
36
+
37
+	if (env["use_sanitizer"]=="yes"):
38
+		env.Append(CCFLAGS=['-fsanitize=address','-fno-omit-frame-pointer'])
39
+		env.Append(LINKFLAGS='-fsanitize=address')
40
 
41
 
42
 	#if (env["tools"]=="no"):
43
@@ -105,7 +99,7 @@
44
 
45
 	env.ParseConfig('pkg-config x11 --cflags --libs')
46
 	env.ParseConfig('pkg-config xcursor --cflags --libs')
47
-	env.ParseConfig('pkg-config openssl --cflags --libs')
48
+	env.ParseConfig('echo -lssl -lcrypto')
49
 
50
 
51
 	env.ParseConfig('pkg-config freetype2 --cflags --libs')
52
@@ -128,11 +122,6 @@
53
 		env.Append(LINKFLAGS=['-m64','-L/usr/lib/i686-linux-gnu'])
54
 
55
 
56
-	if (env["CXX"]=="clang++"):
57
-		env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
58
-		env["CC"]="clang"
59
-		env["LD"]="clang++"
60
-
61
 	import methods
62
 
63
 	env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } )
(-)godot/files/patch-core_variant.h (-24 lines)
Lines 1-24 Link Here
1
--- core/variant.h.orig	2014-12-15 18:49:18 UTC
2
+++ core/variant.h
3
@@ -167,8 +167,9 @@ public:
4
 	static String get_type_name(Variant::Type p_type);
5
 	static bool can_convert(Type p_type_from,Type p_type_to);
6
 
7
+#if defined(_MSC_VER)
8
 #pragma runtime_checks( "", off )
9
-
10
+#endif
11
 	template<class T>
12
 	static Type get_type_for() {
13
 		
14
@@ -177,8 +178,9 @@ public:
15
 		Type r = v.get_type();
16
 		return r;
17
 	}
18
+#if defined(_MSC_VER)
19
 #pragma runtime_checks( "", restore )
20
-
21
+#endif
22
 	bool is_ref() const;
23
 	_FORCE_INLINE_ bool is_num() const { return type==INT || type==REAL; };
24
 	_FORCE_INLINE_ bool is_array() const { return type>=ARRAY; };
(-)godot/files/patch-drivers_unix_ip__unix.cpp (-20 lines)
Lines 1-20 Link Here
1
--- drivers/unix/ip_unix.cpp.orig	2014-12-15 18:49:18 UTC
2
+++ drivers/unix/ip_unix.cpp
3
@@ -50,11 +50,16 @@
4
  #ifdef ANDROID_ENABLED
5
   #include "platform/android/ifaddrs_android.h"
6
  #else
7
+ #ifdef __FreeBSD__
8
+  #include <sys/types.h>
9
+ #endif
10
   #include <ifaddrs.h>
11
  #endif
12
  #include <arpa/inet.h>
13
  #include <sys/socket.h>
14
-
15
+ #ifdef __FreeBSD__
16
+  #include <netinet/in.h>
17
+ #endif
18
 #endif
19
 
20
 IP_Address IP_Unix::_resolve_hostname(const String& p_hostname) {
(-)godot/files/patch-drivers_unix_os__unix.cpp (-44 lines)
Lines 1-44 Link Here
1
--- drivers/unix/os_unix.cpp.orig	2014-12-15 18:49:18 UTC
2
+++ drivers/unix/os_unix.cpp
3
@@ -44,7 +44,9 @@
4
 #include "stream_peer_tcp_posix.h"
5
 #include "packet_peer_udp_posix.h"
6
 
7
-
8
+#ifdef __FreeBSD__
9
+#include <sys/param.h>
10
+#endif
11
 #include <stdarg.h>
12
 #include <sys/time.h>
13
 #include <sys/wait.h>
14
@@ -305,7 +307,17 @@ Error OS_Unix::execute(const String& p_p
15
 			args.push_back((char*)cs[i].get_data());// shitty C cast
16
 		args.push_back(0);
17
 
18
+#ifdef __FreeBSD__
19
+        if(p_path.find("/")) {
20
+            // exec name contains path so use it
21
+            execv(p_path.utf8().get_data(),&args[0]);
22
+        }else{
23
+            // use program name and search through PATH to find it
24
+		    execvp(getprogname(),&args[0]);
25
+		}
26
+#else
27
 		execv(p_path.utf8().get_data(),&args[0]);
28
+#endif
29
 		// still alive? something failed..
30
 		fprintf(stderr,"**ERROR** OS_Unix::execute - Could not create child process while executing: %s\n",p_path.utf8().get_data());
31
 		abort();
32
@@ -415,6 +427,12 @@ String OS_Unix::get_executable_path() co
33
 		return OS::get_executable_path();
34
 	}
35
 	return b;
36
+#elif defined(__FreeBSD__)
37
+    char resolved_path[MAXPATHLEN];
38
+    
39
+    realpath(OS::get_executable_path().utf8().get_data(), resolved_path);
40
+
41
+    return String(resolved_path);
42
 #else
43
 	ERR_PRINT("Warning, don't know how to obtain executable path on this OS! Please override this function properly.");
44
 	return OS::get_executable_path();
(-)godot/files/patch-platform_x11_detect.py (-44 / +4 lines)
Lines 1-5 Link Here
1
--- platform/x11/detect.py.orig	2014-12-15 21:49:18.000000000 +0300
1
--- ./platform/x11/detect.py.orig	2015-05-22 03:33:21.000000000 +0930
2
+++ platform/x11/detect.py	2015-03-03 07:01:34.000000000 +0300
2
+++ ./platform/x11/detect.py	2015-05-23 14:57:49.522273728 +0930
3
@@ -29,11 +29,6 @@
3
@@ -29,11 +29,6 @@
4
 		print("X11 not found.. x11 disabled.")
4
 		print("X11 not found.. x11 disabled.")
5
 		return False
5
 		return False
Lines 12-63 Link Here
12
 	x11_error=os.system("pkg-config xcursor --modversion > /dev/null ")
12
 	x11_error=os.system("pkg-config xcursor --modversion > /dev/null ")
13
 	if (x11_error):
13
 	if (x11_error):
14
 		print("xcursor not found.. x11 disabled.")
14
 		print("xcursor not found.. x11 disabled.")
15
@@ -72,17 +67,16 @@
15
@@ -126,7 +121,7 @@
16
 
17
 	env.Append(CPPPATH=['#platform/x11'])
18
 	if (env["use_llvm"]=="yes"):
19
-		env["CC"]="clang"
20
-		env["CXX"]="clang++"
21
-		env["LD"]="clang++"
22
-		if (env["use_sanitizer"]=="yes"):
23
-			env.Append(CXXFLAGS=['-fsanitize=address','-fno-omit-frame-pointer'])
24
-			env.Append(LINKFLAGS=['-fsanitize=address'])
25
-			env.extra_suffix=".llvms"
26
-		else:
27
-			env.extra_suffix=".llvm"
28
-
29
-
30
+		if 'clang++' not in env['CXX']:
31
+			env["CC"]="clang"
32
+			env["CXX"]="clang++"
33
+			env["LD"]="clang++"
34
+			env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
35
+		env.extra_suffix=".llvm"
36
+
37
+	if (env["use_sanitizer"]=="yes"):
38
+		env.Append(CCFLAGS=['-fsanitize=address','-fno-omit-frame-pointer'])
39
+		env.Append(LINKFLAGS='-fsanitize=address')
40
 
41
 
42
 	#if (env["tools"]=="no"):
43
@@ -105,7 +99,7 @@
44
 
45
 	env.ParseConfig('pkg-config x11 --cflags --libs')
16
 	env.ParseConfig('pkg-config x11 --cflags --libs')
17
 	env.ParseConfig('pkg-config xinerama --cflags --libs')
46
 	env.ParseConfig('pkg-config xcursor --cflags --libs')
18
 	env.ParseConfig('pkg-config xcursor --cflags --libs')
47
-	env.ParseConfig('pkg-config openssl --cflags --libs')
19
-	env.ParseConfig('pkg-config openssl --cflags --libs')
48
+	env.ParseConfig('echo -lssl -lcrypto')
20
+	env.ParseConfig('echo -lssl -lcrypto')
49
 
21
 
50
 
22
 
51
 	env.ParseConfig('pkg-config freetype2 --cflags --libs')
23
 	env.ParseConfig('pkg-config freetype2 --cflags --libs')
52
@@ -128,11 +122,6 @@
53
 		env.Append(LINKFLAGS=['-m64','-L/usr/lib/i686-linux-gnu'])
54
 
55
 
56
-	if (env["CXX"]=="clang++"):
57
-		env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
58
-		env["CC"]="clang"
59
-		env["LD"]="clang++"
60
-
61
 	import methods
62
 
63
 	env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } )

Return to bug 200424