File: fix-version-h.patch

package info (click to toggle)
swift-im 5.0~alpha2.145.g12d031cf8%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,240 kB
  • sloc: cpp: 134,640; python: 2,701; sh: 774; xml: 561; javascript: 69; makefile: 60
file content (31 lines) | stat: -rw-r--r-- 1,255 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: Allow SWIFTEN_VERSION from env
 the build system does fail in determining the swiften version when building the
 Debian package, so it needs a hint… (by environment variable SWIFTEN_VERSION)
Author: Tobias Frost <tobi@debian.org>
Bug-Debian: https://bugs.debian.org/1024553
Forwarded: Debian specific
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -1,4 +1,4 @@
-import os, re, Version, os.path, time, urllib
+import os, re, Version, os.path, time, urllib, sys
 
 Import("env")
 
@@ -11,12 +11,13 @@
 
 if env["SCONS_STAGE"] == "flags" :
     env["SWIFTEN_DLL"] = env["swiften_dll"]
-    env["SWIFTEN_VERSION"] = Version.getBuildVersion(env.Dir("#").abspath, "swift")
+    env["SWIFTEN_VERSION"] = os.getenv("SWIFTEN_VERSION")
     version_match = re.match(r"(\d+)\.(\d+).*", env["SWIFTEN_VERSION"])
     if version_match :
         env["SWIFTEN_VERSION_MAJOR"] = int(version_match.group(1))
         env["SWIFTEN_VERSION_MINOR"] = int(version_match.group(2))
     else :
+        sys.exit("Could not determine Swiften version! Bailing out.")
         env["SWIFTEN_VERSION_MAJOR"] = 0
         env["SWIFTEN_VERSION_MINOR"] = 0
     env["SWIFTEN_VERSION_PATCH"] = 0