summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-30 18:27:46 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-30 18:27:46 (GMT)
commit4153e7f937acfa06b9fb63ebf6552d415fd97e9f (patch)
tree5c01f53b8925dbf928f5c3d38fa22ac2d7fce607
parent1bbf5a4f431ce3aab4c851c71438f3d2e468a866 (diff)
parent4a90cf8fd5da66c2466bfcfe1e5152d45457b291 (diff)
downloadswift-contrib-4153e7f937acfa06b9fb63ebf6552d415fd97e9f.zip
swift-contrib-4153e7f937acfa06b9fb63ebf6552d415fd97e9f.tar.bz2
Merge branch 'swift-1.x'
* swift-1.x: Only package .so in dev package. Support creating Swiften dylibs on Mac OS X. Fixed Swiften .so softlinks. Conflicts: Swiften/SConscript
-rw-r--r--Swift/Packaging/Debian/debian/libswiften-dev.install1
-rw-r--r--Swift/Packaging/Debian/debian/libswiften.install2
-rw-r--r--Swiften/SConscript34
3 files changed, 19 insertions, 18 deletions
diff --git a/Swift/Packaging/Debian/debian/libswiften-dev.install b/Swift/Packaging/Debian/debian/libswiften-dev.install
index 84e0d21..545c6d9 100644
--- a/Swift/Packaging/Debian/debian/libswiften-dev.install
+++ b/Swift/Packaging/Debian/debian/libswiften-dev.install
@@ -1,4 +1,3 @@
usr/lib/libSwiften.so
-usr/lib/libSwiften.so.?.*
usr/include
usr/bin/swiften-config
diff --git a/Swift/Packaging/Debian/debian/libswiften.install b/Swift/Packaging/Debian/debian/libswiften.install
index 04f6608..2603436 100644
--- a/Swift/Packaging/Debian/debian/libswiften.install
+++ b/Swift/Packaging/Debian/debian/libswiften.install
@@ -1 +1 @@
-usr/lib/libSwiften.so.?
+usr/lib/libSwiften.so.*
diff --git a/Swiften/SConscript b/Swiften/SConscript
index c45da6e..62cad07 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -18,19 +18,18 @@ if env["SCONS_STAGE"] == "flags" :
env["SWIFTEN_VERSION_MAJOR"] = 0
env["SWIFTEN_VERSION_MINOR"] = 0
env["SWIFTEN_VERSION_PATCH"] = 0
+ env["SWIFTEN_LIBRARY"] = "Swiften"
+ env["SWIFTEN_LIBRARY_FILE"] = "Swiften"
env["SWIFTEN_LIBRARY_ALIASES"] = []
- if env["PLATFORM"] == "win32" :
- env["SWIFTEN_LIBRARY"] = env.subst("Swiften$SWIFTEN_VERSION_MAJOR")
- env["SWIFTEN_LIBRARY_NAME"] = env.subst("Swiften$SWIFTEN_VERSION_MAJOR")
- elif env["PLATFORM"] == "darwin" :
- env["SWIFTEN_LIBRARY"] = env.subst("Swiften$SWIFTEN_VERSION_MAJOR")
- env["SWIFTEN_LIBRARY_NAME"] = env.subst("Swiften$SWIFTEN_VERSION_MAJOR")
- else :
- env["SWIFTEN_LIBRARY"] = "Swiften"
- env["SWIFTEN_LIBRARY_NAME"] = "Swiften"
- if ARGUMENTS.get("swiften_dll", False) :
- env["SWIFTEN_LIBRARY_NAME"] = env.subst("libSwiften.so.$SWIFTEN_VERSION_MAJOR")
- env["SWIFTEN_LIBRARY_ALIASES"] = ["libSwiften.so", env.subst("libSwiften.so.${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}")]
+ if ARGUMENTS.get("swiften_dll", False) :
+ if env["PLATFORM"] == "win32" :
+ pass
+ elif env["PLATFORM"] == "darwin" :
+ env["SWIFTEN_LIBRARY_FILE"] = env.subst("Swiften.${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}")
+ env["SWIFTEN_LIBRARY_ALIASES"] = ["libSwiften.dylib", env.subst("libSwiften.${SWIFTEN_VERSION_MAJOR}.dylib")]
+ else :
+ env["SWIFTEN_LIBRARY_FILE"] = env.subst("libSwiften.so.${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}")
+ env["SWIFTEN_LIBRARY_ALIASES"] = ["libSwiften.so", env.subst("libSwiften.so.${SWIFTEN_VERSION_MAJOR}")]
swiften_env = env.Clone()
swiften_env["LIBPATH"] = [Dir(".")]
@@ -219,10 +218,13 @@ if env["SCONS_STAGE"] == "build" :
myenv = swiften_env.Clone()
if myenv["PLATFORM"] != "darwin" and myenv["PLATFORM"] != "win32" and myenv.get("HAVE_GCONF", 0) :
env.MergeFlags(env["GCONF_FLAGS"])
- if ARGUMENTS.get("swiften_dll", False) and myenv["PLATFORM"] == "posix" :
- myenv.Append(LINKFLAGS = ["-Wl,-soname,$SWIFTEN_LIBRARY_NAME"])
- myenv["SHLIBSUFFIX"] = ""
- swiften_lib = myenv.SwiftenLibrary(swiften_env["SWIFTEN_LIBRARY_NAME"], sources + swiften_env["SWIFTEN_OBJECTS"])
+ if ARGUMENTS.get("swiften_dll", False) :
+ if myenv["PLATFORM"] == "posix" :
+ myenv.Append(LINKFLAGS = ["-Wl,-soname,libSwiften.so.$SWIFTEN_VERSION_MAJOR"])
+ myenv["SHLIBSUFFIX"] = ""
+ elif myenv["PLATFORM"] == "darwin" :
+ myenv.Append(LINKFLAGS = ["-Wl,-install_name,libSwiften.so.$SWIFTEN_VERSION_MAJOR", "-Wl,-compatibility_version,${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}", "-Wl,-current_version,${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}"])
+ swiften_lib = myenv.SwiftenLibrary(swiften_env["SWIFTEN_LIBRARY_FILE"], sources + swiften_env["SWIFTEN_OBJECTS"])
def symlink(env, target, source) :
if os.path.exists(str(target[0])) :
os.unlink(str(target[0]))