Ticket #2804: bsd_fixes_2.diff
File bsd_fixes_2.diff, 6.7 KB (added by , 10 years ago) |
---|
-
build/premake/extern_libs4.lua
235 235 -- Suppress all the Boost warnings on OS X by including it as a system directory 236 236 buildoptions { "-isystem../" .. libraries_dir .. "boost/include" } 237 237 end 238 if os.getversion().description == "OpenBSD" then 238 -- TODO: This actually applies to most libraries we use on BSDs, make this a global setting. 239 if os.is("bsd") then 239 240 includedirs { "/usr/local/include" } 240 241 end 241 242 end, … … 347 348 elseif os.is("macosx") then 348 349 add_default_include_paths("iconv") 349 350 defines { "LIBICONV_STATIC" } 351 elseif os.getversion().description == "FreeBSD" then 352 defines { "HAVE_ICONV_CONST" } 350 353 end 351 354 end, 352 355 link_settings = function() … … 355 358 end 356 359 add_default_links({ 357 360 win_names = { "libiconv" }, 358 -- TODO: glibc provides symbols for this, so we should only include that (and depend on libiconv) on non-glibc unix359 361 osx_names = { "iconv" }, 360 362 dbg_suffix = "", 361 363 }) 364 -- glibc (used on Linux and GNU/kFreeBSD) has iconv 365 -- FreeBSD 10+ has iconv as a part of libc 366 if os.is("bsd") 367 and not (os.getversion().description == "FreeBSD" and os.getversion().majorversion >= 10 368 or os.getversion().description == "GNU/kFreeBSD") then 369 add_default_links({ 370 bsd_names = { "iconv" }, 371 }) 372 end 362 373 end, 363 374 }, 364 375 icu = { -
build/premake/premake4.lua
38 38 39 39 dofile("extern_libs4.lua") 40 40 41 -- detect compiler for non-Windows 42 if os.is("macosx") then 43 cc = "clang" 44 elseif os.is("linux") and _OPTIONS["icc"] then 45 cc = "icc" 46 elseif not os.is("windows") then 47 cc = os.getenv("CC") 48 if cc == nil or cc == "" then 49 local hasgcc = os.execute("which gcc > .gccpath") 50 local f = io.open(".gccpath", "r") 51 local gccpath = f:read("*line") 52 f:close() 53 os.execute("rm .gccpath") 54 if gccpath == nil then 55 cc = "clang" 56 else 57 cc = "gcc" 58 end 59 end 60 end 61 62 -- TODO: proper clang support 63 if cc == "clang" then 64 premake.gcc.cc = "clang" 65 premake.gcc.cxx = "clang++" 66 end 67 41 68 -- detect CPU architecture (simplistic, currently only supports x86, amd64 and ARM) 42 69 arch = "x86" 43 70 if _OPTIONS["android"] then … … 51 78 if arch == "x86_64" or arch == "amd64" then 52 79 arch = "amd64" 53 80 else 54 os.execute( "gcc-dumpmachine > .gccmachine.tmp")81 os.execute(cc .. " -dumpmachine > .gccmachine.tmp") 55 82 local f = io.open(".gccmachine.tmp", "r") 56 83 local machine = f:read("*line") 57 84 f:close() … … 67 94 end 68 95 end 69 96 70 -- Hack to force clang as default compiler on OS X71 -- TODO: proper clang support72 if os.is("macosx") then73 premake.gcc.cc = "clang"74 premake.gcc.cxx = "clang++"75 end76 77 97 -- Set up the Solution 78 98 solution "pyrogenesis" 79 99 targetdir(rootdir.."/binaries/system") … … 109 129 -- It's too late to do this test by the time we start compiling the PCH file, so 110 130 -- do the test in this build script instead (which is kind of ugly - please fix if 111 131 -- you have a better idea) 112 if not _OPTIONS["icc"]then132 if cc == "gcc" then 113 133 os.execute("gcc -dumpversion > .gccver.tmp") 114 134 local f = io.open(".gccver.tmp", "r") 115 135 major, dot, minor = f:read(1, 1, 1) … … 158 178 function project_set_build_flags() 159 179 160 180 flags { "Symbols", "NoEditAndContinue" } 161 if not _OPTIONS["icc"]and (os.is("windows") or not _OPTIONS["minimal-flags"]) then181 if cc ~= "icc" and (os.is("windows") or not _OPTIONS["minimal-flags"]) then 162 182 -- adds the -Wall compiler flag 163 183 flags { "ExtraWarnings" } -- this causes far too many warnings/remarks on ICC 164 184 end … … 218 238 end 219 239 220 240 else -- *nix 221 if _OPTIONS["icc"]and not _OPTIONS["minimal-flags"] then241 if cc == "icc" and not _OPTIONS["minimal-flags"] then 222 242 buildoptions { 223 243 "-w1", 224 244 -- "-Wabi", … … 391 411 -- bundled libs 392 412 function project_add_x11_dirs() 393 413 if not os.is("windows") and not os.is("macosx") then 394 -- X11 includes may be installed in one of a gadzillion of three places414 -- X11 includes may be installed in one of a gadzillion of five places 395 415 -- Famous last words: "You can't include too much! ;-)" 396 416 includedirs { 397 417 "/usr/X11R6/include/X11", 398 418 "/usr/X11R6/include", 419 "/usr/local/include/X11", 420 "/usr/local/include", 399 421 "/usr/include/X11" 400 422 } 401 423 libdirs { "/usr/X11R6/lib" } -
libraries/source/fcollada/src/Makefile
7 7 PIC_FLAGS ?= -fpic 8 8 endif 9 9 10 ifeq ($(OS_ARCH),FreeBSD) 11 DIRS_SH=csh 12 else 13 DIRS_SH=sh 14 endif 15 10 16 CXX ?= g++ 11 17 CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS) 12 18 CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL … … 227 233 all: output_dirs output/libFColladaSD.a output/libFColladaSR.a install 228 234 229 235 output_dirs: 230 bash-c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'236 $(DIRS_SH) -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}' 231 237 232 238 test: FCollada/FColladaTest/ output/FColladaTest 233 239 ( cd FCollada/FColladaTest/ ; ../../output/FColladaTest ) -
libraries/source/spidermonkey/build.sh
103 103 LIB_PREFIX=lib 104 104 LIB_SRC_SUFFIX=.so 105 105 LIB_DST_SUFFIX=.so 106 if [ "`uname -s`" = "OpenBSD" ] 107 then 108 DLL_SRC_SUFFIX=.so.1.0 109 DLL_DST_SUFFIX=.so.1.0 110 LIB_SRC_SUFFIX=.so.1.0 111 LIB_DST_SUFFIX=:so.1.0 112 fi 106 113 fi 107 114 108 115 # Copy files into the necessary locations for building and running the game -
source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformObject.cpp
158 158 wxString x(xmlData->GetNodeContent()); 159 159 unsigned long xTmp = 0; 160 160 x.ToULong(&xTmp); 161 wxASSERT(xTmp <= (unsigned long) UINT32_MAX);161 wxASSERT(xTmp <= (unsigned long)std::numeric_limits<unsigned int>::max()); 162 162 actorSeed = xTmp; 163 163 } 164 164