From 0d10e2553111a6c4786c9c2d1cebe405b1dfbbaa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Fri, 25 Feb 2011 19:56:05 +0100
Subject: Temporarily don't build Sluift plugin on amd64.


diff --git a/3rdParty/Lua/SConscript b/3rdParty/Lua/SConscript
index 9063f97..cd65061 100644
--- a/3rdParty/Lua/SConscript
+++ b/3rdParty/Lua/SConscript
@@ -33,9 +33,6 @@ if env.get("LUA_BUNDLED", False) :
 
 		# Remove warn flags
 		myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]])
-		if myenv["PLATFORM"] == "posix" :
-			myenv.Append(CCFLAGS = ["-fPIC"])
-
 		myenv.MergeFlags(myenv["LUA_FLAGS"])
 		myenv.MergeFlags(myenv["PLATFORM_FLAGS"])
 		myenv.StaticLibrary("Swiften_Lua", [
diff --git a/Sluift/SConscript b/Sluift/SConscript
index 74b266c..ae51f57 100644
--- a/Sluift/SConscript
+++ b/Sluift/SConscript
@@ -1,3 +1,5 @@
+import platform
+
 Import("env")
 
 if env["SCONS_STAGE"] == "build" :
@@ -5,14 +7,16 @@ if env["SCONS_STAGE"] == "build" :
 	myenv.UseFlags(env["LUA_FLAGS"])
 	myenv.UseFlags(env["SWIFTEN_FLAGS"])
 	myenv.UseFlags(env["SWIFTEN_DEP_FLAGS"])
-
 	myenv["SHLIBPREFIX"] = ""
+
 	if myenv["PLATFORM"] == "win32" :
 		myenv.Append(CPPDEFINES = ["SLUIFT_BUILD_DLL"])
 	elif myenv["PLATFORM"] == "darwin" :
 		myenv["SHLIBSUFFIX"] = ".so"
-	elif myenv["PLATFORM"] == "posix" :
-		myenv.Append(CCFLAGS = ["-fPIC"])
-	myenv.SharedLibrary("sluift", [
-			"sluift.cpp",
-		])
+
+	# Temporarily not building plugin on amd64, because it
+	# requires the whole build to be done with -fPIC
+	if myenv["PLATFORM"] != "posix" or platform.machine() != "amd64" :
+		myenv.SharedLibrary("sluift", [
+				"sluift.cpp",
+			])
-- 
cgit v0.10.2-6-g49f6