mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Proper library configuration on FreeBSD (I hope)
This commit is contained in:
parent
12ef0e108a
commit
0e4535acf5
@ -118,6 +118,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
|
|||||||
oscmd("mkdir -p "+destdir+PPATH)
|
oscmd("mkdir -p "+destdir+PPATH)
|
||||||
if (sys.platform.startswith("freebsd")):
|
if (sys.platform.startswith("freebsd")):
|
||||||
oscmd("mkdir -p "+destdir+prefix+"/etc")
|
oscmd("mkdir -p "+destdir+prefix+"/etc")
|
||||||
|
oscmd("mkdir -p "+destdir+"/usr/local/libdata/ldconfig")
|
||||||
else:
|
else:
|
||||||
oscmd("mkdir -p "+destdir+"/etc/ld.so.conf.d")
|
oscmd("mkdir -p "+destdir+"/etc/ld.so.conf.d")
|
||||||
WriteFile(destdir+prefix+"/share/panda3d/direct/__init__.py", "")
|
WriteFile(destdir+prefix+"/share/panda3d/direct/__init__.py", "")
|
||||||
@ -147,7 +148,9 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
|
|||||||
oscmd("cp doc/ReleaseNotes "+destdir+prefix+"/share/panda3d/ReleaseNotes")
|
oscmd("cp doc/ReleaseNotes "+destdir+prefix+"/share/panda3d/ReleaseNotes")
|
||||||
oscmd("echo '"+prefix+"/share/panda3d' > "+destdir+PPATH+"/panda3d.pth")
|
oscmd("echo '"+prefix+"/share/panda3d' > "+destdir+PPATH+"/panda3d.pth")
|
||||||
oscmd("echo '"+prefix+libdir+"/panda3d'>> "+destdir+PPATH+"/panda3d.pth")
|
oscmd("echo '"+prefix+libdir+"/panda3d'>> "+destdir+PPATH+"/panda3d.pth")
|
||||||
if (not sys.platform.startswith("freebsd")):
|
if (sys.platform.startswith("freebsd")):
|
||||||
|
oscmd("echo '"+prefix+libdir+"/panda3d'> "+destdir+"/usr/local/libdata/ldconfig/panda3d")
|
||||||
|
else:
|
||||||
oscmd("echo '"+prefix+libdir+"/panda3d'> "+destdir+"/etc/ld.so.conf.d/panda3d.conf")
|
oscmd("echo '"+prefix+libdir+"/panda3d'> "+destdir+"/etc/ld.so.conf.d/panda3d.conf")
|
||||||
oscmd("chmod +x "+destdir+"/etc/ld.so.conf.d/panda3d.conf")
|
oscmd("chmod +x "+destdir+"/etc/ld.so.conf.d/panda3d.conf")
|
||||||
oscmd("ln -s "+PEXEC+" "+destdir+prefix+"/bin/ppython")
|
oscmd("ln -s "+PEXEC+" "+destdir+prefix+"/bin/ppython")
|
||||||
|
@ -5204,9 +5204,9 @@ def MakeInstallerLinux():
|
|||||||
|
|
||||||
# Invoke installpanda.py to install it into a temporary dir
|
# Invoke installpanda.py to install it into a temporary dir
|
||||||
if RUNTIME:
|
if RUNTIME:
|
||||||
InstallRuntime(destdir = "targetroot", outputdir = GetOutputDir())
|
InstallRuntime(destdir = "targetroot", prefix = "/usr", outputdir = GetOutputDir())
|
||||||
else:
|
else:
|
||||||
InstallPanda(destdir = "targetroot", outputdir = GetOutputDir())
|
InstallPanda(destdir = "targetroot", prefix = "/usr", outputdir = GetOutputDir())
|
||||||
oscmd("chmod -R 755 targetroot/usr/share/panda3d")
|
oscmd("chmod -R 755 targetroot/usr/share/panda3d")
|
||||||
|
|
||||||
if (os.path.exists("/usr/bin/rpmbuild") and not os.path.exists("/usr/bin/dpkg-deb")):
|
if (os.path.exists("/usr/bin/rpmbuild") and not os.path.exists("/usr/bin/dpkg-deb")):
|
||||||
@ -5529,15 +5529,24 @@ def MakeInstallerFreeBSD():
|
|||||||
else:
|
else:
|
||||||
descr_txt = INSTALLER_PKG_DESCR_FILE[1:]
|
descr_txt = INSTALLER_PKG_DESCR_FILE[1:]
|
||||||
descr_txt = descr_txt.replace("VERSION", VERSION)
|
descr_txt = descr_txt.replace("VERSION", VERSION)
|
||||||
|
if (RUNTIME):
|
||||||
|
plist_txt = "@name panda3d-runtime-%s\n" % VERSION
|
||||||
|
else:
|
||||||
plist_txt = "@name panda3d-%s\n" % VERSION
|
plist_txt = "@name panda3d-%s\n" % VERSION
|
||||||
for root, dirs, files in os.walk("targetroot/usr/local/", True):
|
for root, dirs, files in os.walk("targetroot/usr/local/", True):
|
||||||
for f in files:
|
for f in files:
|
||||||
plist_txt += os.path.join(root, f)[21:] + "\n"
|
plist_txt += os.path.join(root, f)[21:] + "\n"
|
||||||
|
|
||||||
|
if (not RUNTIME):
|
||||||
|
plist_txt += "@exec /sbin/ldconfig -m /usr/local/lib\n"
|
||||||
|
plist_txt += "@unexec /sbin/ldconfig -R\n"
|
||||||
|
|
||||||
for remdir in ("lib/panda3d", "share/panda3d", "include/panda3d"):
|
for remdir in ("lib/panda3d", "share/panda3d", "include/panda3d"):
|
||||||
for root, dirs, files in os.walk("targetroot/usr/local/" + remdir, False):
|
for root, dirs, files in os.walk("targetroot/usr/local/" + remdir, False):
|
||||||
for d in dirs:
|
for d in dirs:
|
||||||
plist_txt += "@dirrm %s\n" % os.path.join(root, d)[21:]
|
plist_txt += "@dirrm %s\n" % os.path.join(root, d)[21:]
|
||||||
plist_txt += "@dirrm %s\n" % remdir
|
plist_txt += "@dirrm %s\n" % remdir
|
||||||
|
|
||||||
WriteFile("pkg-plist", plist_txt)
|
WriteFile("pkg-plist", plist_txt)
|
||||||
WriteFile("pkg-descr", descr_txt)
|
WriteFile("pkg-descr", descr_txt)
|
||||||
cmd = "pkg_create"
|
cmd = "pkg_create"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user