summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Schridde <devurandom@gmx.net>2017-09-22 22:40:40 (GMT)
committerTobias Markmann <tm@ayena.de>2017-12-19 10:57:56 (GMT)
commitd9c8d48677df0f0dffb9c1f2cb35542cb59a27c8 (patch)
treef87569704f35a119be2c74743af571bf98de8efe
parent70509d57ea60d41785bbcea6b4e01fd36f5d3d57 (diff)
downloadswift-d9c8d48677df0f0dffb9c1f2cb35542cb59a27c8.zip
swift-d9c8d48677df0f0dffb9c1f2cb35542cb59a27c8.tar.bz2
Allow to override Swiften libdir
The libdir for Swiften was hardcoded to "lib". With this patch it is possible to override it. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Build with SWIFTEN_LIBDIR=lib64 and observe that files are installed into the desired directory (i.e. /usr/lib64, if SWIFTEN_INSTALLDIR=/usr). Change-Id: I4d844b93a189254b5923f9cd58190b0f6a65b9ac
-rw-r--r--BuildTools/SCons/SConscript.boot2
-rw-r--r--Swiften/SConscript5
2 files changed, 5 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 6ac4981..d9678a5 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -425,6 +425,8 @@ for path in ["SWIFT_INSTALLDIR", "SWIFTEN_INSTALLDIR", "SLUIFT_INSTALLDIR"] :
env[path] = Dir(ARGUMENTS[path]).abspath
else :
env[path] = Dir("#/" + ARGUMENTS[path]).abspath
+if ARGUMENTS.get("SWIFTEN_LIBDIR", "") :
+ env["SWIFTEN_LIBDIR"] = ARGUMENTS["SWIFTEN_LIBDIR"]
################################################################################
diff --git a/Swiften/SConscript b/Swiften/SConscript
index e0f87ce..f52637b 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -618,8 +618,9 @@ if env["SCONS_STAGE"] == "build" :
# Install swiften
if swiften_env.get("SWIFTEN_INSTALLDIR", "") :
- swiften_env.Install(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "lib"), swiften_lib)
+ swiften_libdir = swiften_env.get("SWIFTEN_LIBDIR", "lib")
+ swiften_env.Install(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], swiften_libdir), swiften_lib)
for alias in myenv["SWIFTEN_LIBRARY_ALIASES"] :
- myenv.Command(myenv.File(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "lib", alias)), [env.Value(swiften_lib[0].name), swiften_lib[0]], symlink)
+ myenv.Command(myenv.File(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], swiften_libdir, alias)), [env.Value(swiften_lib[0].name), swiften_lib[0]], symlink)
for include in swiften_includes :
swiften_env.Install(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "include", os.path.dirname(include)), "#/" + include)