From 5bd76de269a181eae4ce4d2feffb8a99fc35a6e5 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 11 Aug 2012 21:09:28 +0000 Subject: [PATCH] fcollada, ode, carbon/cocoa --- makepanda/makepanda.py | 17 +++++++++++------ makepanda/makepandacore.py | 9 +++++++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index ddd99b82a6..f253f82d08 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -600,6 +600,12 @@ if (COMPILER=="LINUX"): if (sys.platform != "darwin"): PkgDisable("CARBON") PkgDisable("COCOA") + elif (RTDIST or RUNTIME): + # We don't support Cocoa in the runtime yet. + PkgDisable("COCOA") + elif (is_64 and not UNIVERSAL): + # 64-bits OS X doesn't have Carbon. + PkgDisable("CARBON") if (PkgSkip("PYTHON")==0): IncDirectory("ALWAYS", SDK["PYTHON"]) @@ -624,7 +630,7 @@ if (COMPILER=="LINUX"): if (os.path.isdir("/usr/lib64/gtk-2.0/include")): IncDirectory("GTK2", "/usr/lib64/gtk-2.0/include") - fcollada_libs = ("FColladaD", "FColladaSD") + fcollada_libs = ("FColladaD", "FColladaSD", "FColladaS") # WARNING! The order of the ffmpeg libraries matters! ffmpeg_libs = ("libavformat", "libavcodec", "libavutil") @@ -644,7 +650,7 @@ if (COMPILER=="LINUX"): SmartPkgEnable("EGL", "egl", ("EGL"), ("EGL/egl.h")) SmartPkgEnable("OSMESA", "osmesa", ("OSMesa"), ("GL/osmesa.h")) SmartPkgEnable("NVIDIACG", "", ("Cg"), "Cg/cg.h", framework = "Cg") - SmartPkgEnable("ODE", "", ("ode"), "ode/ode.h") + SmartPkgEnable("ODE", "", ("ode"), "ode/ode.h", tool = "ode-config") SmartPkgEnable("OPENAL", "openal", ("openal"), "AL/al.h", framework = "OpenAL") SmartPkgEnable("OPENCV", "opencv", ("cv", "highgui", "cvaux", "ml", "cxcore"), ("opencv", "opencv/cv.h")) SmartPkgEnable("SQUISH", "", ("squish"), "squish.h") @@ -1828,10 +1834,6 @@ def WriteConfigSettings(): dtool_config["PHAVE_MALLOC_H"] = 'UNDEF' dtool_config["PHAVE_SYS_MALLOC_H"] = '1' dtool_config["HAVE_OPENAL_FRAMEWORK"] = '1' - if not RTDIST and not RUNTIME: - dtool_config["HAVE_COCOA"] = '1' - if not (UNIVERSAL or is_64): - dtool_config["HAVE_CARBON"] = '1' dtool_config["HAVE_X11"] = 'UNDEF' # We might have X11, but we don't need it. dtool_config["HAVE_XRANDR"] = 'UNDEF' dtool_config["HAVE_XF86DGA"] = 'UNDEF' @@ -5983,6 +5985,8 @@ def MakeInstallerOSX(): oscmd("chmod +x dstroot/scripts/uninstall16/preflight") oscmd("chmod -R 0775 dstroot/*") + DeleteCVS("dstroot") + DeleteBuildFiles("dstroot") # We need to be root to perform a chown. Bleh. # Fortunately PackageMaker does it for us, on 10.5 and above. #oscmd("chown -R root:admin dstroot/*", True) @@ -6017,6 +6021,7 @@ def MakeInstallerOSX(): if os.path.isfile("/tmp/Info_plist"): oscmd("rm -f /tmp/Info_plist") + # Now that we've built all of the individual packages, build the metapackage. dist = open("dstroot/Panda3D/Panda3D.mpkg/Contents/distribution.dist", "w") print >>dist, '' print >>dist, '' diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index f578d90fb7..0687546241 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -990,6 +990,7 @@ def OverrideValue(parameter, value): def PkgConfigHavePkg(pkgname, tool = "pkg-config"): """Returns a bool whether the pkg-config package is installed.""" + if (sys.platform == "win32" or not LocateBinary(tool)): return False if (tool == "pkg-config"): @@ -1004,6 +1005,7 @@ def PkgConfigHavePkg(pkgname, tool = "pkg-config"): def PkgConfigGetLibs(pkgname, tool = "pkg-config"): """Returns a list of libs for the package, prefixed by -l.""" + if (sys.platform == "win32" or not LocateBinary(tool)): return [] if (tool == "pkg-config"): @@ -1034,6 +1036,7 @@ def PkgConfigGetLibs(pkgname, tool = "pkg-config"): def PkgConfigGetIncDirs(pkgname, tool = "pkg-config"): """Returns a list of includes for the package, NOT prefixed by -I.""" + if (sys.platform == "win32" or not LocateBinary(tool)): return [] if (tool == "pkg-config"): @@ -1051,11 +1054,12 @@ def PkgConfigGetIncDirs(pkgname, tool = "pkg-config"): def PkgConfigGetLibDirs(pkgname, tool = "pkg-config"): """Returns a list of library paths for the package, NOT prefixed by -L.""" + if (sys.platform == "win32" or not LocateBinary(tool)): return [] if (tool == "pkg-config"): handle = os.popen(LocateBinary("pkg-config") + " --silence-errors --libs-only-L " + pkgname) - elif (tool == "wx-config"): + elif (tool == "wx-config" or tool == "ode-config"): return [] else: handle = os.popen(LocateBinary(tool) + " --ldflags") @@ -1070,6 +1074,7 @@ def PkgConfigGetLibDirs(pkgname, tool = "pkg-config"): def PkgConfigGetDefSymbols(pkgname, tool = "pkg-config"): """Returns a dictionary of preprocessor definitions.""" + if (sys.platform == "win32" or not LocateBinary(tool)): return [] if (tool == "pkg-config"): @@ -2134,7 +2139,7 @@ def CalcLocation(fn, ipath): if (fn.endswith(".plist")): return CxxFindSource(fn, ipath) if (fn.endswith(".obj")): return OUTPUTDIR+"/tmp/"+fn[:-4]+".o" if (fn.endswith(".dll")): return OUTPUTDIR+"/lib/"+fn[:-4]+".dylib" - if (fn.endswith(".pyd")): return OUTPUTDIR+"/lib/"+fn[:-4]+".dylib" + if (fn.endswith(".pyd")): return OUTPUTDIR+"/lib/"+fn[:-4]+".so" if (fn.endswith(".mll")): return OUTPUTDIR+"/plugins/"+fn if (fn.endswith(".exe")): return OUTPUTDIR+"/bin/"+fn[:-4] if (fn.endswith(".lib")): return OUTPUTDIR+"/lib/"+fn[:-4]+".a"