2
0
Эх сурвалжийг харах

We need to specify -R to cp on OSX and BSD in order not to follow symlinks

rdb 15 жил өмнө
parent
commit
f29be80495

+ 2 - 1
makepanda/installpanda.py

@@ -154,7 +154,8 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
     oscmd("cp "+outputdir+"/bin/*               "+destdir+prefix+"/bin/")
     for base in os.listdir(outputdir+"/lib"):
         if (not base.endswith(".a")):
-            oscmd("cp -P "+outputdir+"/lib/"+base+" "+destdir+prefix+libdir+"/panda3d/"+base)
+            # We really need to specify -R in order not to follow symlinks on non-GNU
+            oscmd("cp -R -P "+outputdir+"/lib/"+base+" "+destdir+prefix+libdir+"/panda3d/"+base)
     # rpmlint doesn't like it if we compile pyc.
     #for base in os.listdir(destdir+prefix+"/share/panda3d/direct"):
     #    if ((base != "extensions") and (base != "extensions_native")):

+ 3 - 1
makepanda/makepanda.py

@@ -5037,7 +5037,9 @@ def MakeInstallerOSX():
     for base in os.listdir(GetOutputDir()+"/lib"):
         if (not base.endswith(".a")):
             libname = "dstroot/base/Developer/Panda3D/lib/" + base
-            oscmd("cp -P " + GetOutputDir() + "/lib/" + base + " " + libname)
+            # We really need to specify -R in order not to follow symlinks
+            # On OSX, just specifying -P is not enough to do that.
+            oscmd("cp -R -P " + GetOutputDir() + "/lib/" + base + " " + libname)
 
             # Execute install_name_tool to make them reference an absolute path
             if (libname.endswith(".dylib") and not os.path.islink(libname)):