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

This commit is contained in:
rdb 2010-07-28 08:07:58 +00:00
parent 570ffe14e2
commit f29be80495
2 changed files with 5 additions and 2 deletions

View File

@ -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")):

View File

@ -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)):