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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
diff -ur telepathy-inspector-0.5.0.orig/data/SConscript telepathy-inspector-0.5.0/data/SConscript
--- telepathy-inspector-0.5.0.orig/data/SConscript 2007-06-27 12:10:15.000000000 +0200
+++ telepathy-inspector-0.5.0/data/SConscript 2007-06-27 12:10:48.000000000 +0200
@@ -27,7 +27,8 @@
Import ('env')
-install_dir = os.path.join (env['PREFIX'], 'share', 'telepathy-inspector')
+_r = lambda p: (p[0] == '/') and p[1:] or p
+install_dir = os.path.join('/', env['DESTDIR'], _r(env['PREFIX']), 'share', 'telepathy-inspector')
data_install = env.Install (install_dir, data_files)
env.Alias ('install', data_install)
diff -ur telepathy-inspector-0.5.0.orig/SConstruct telepathy-inspector-0.5.0/SConstruct
--- telepathy-inspector-0.5.0.orig/SConstruct 2007-06-27 12:10:15.000000000 +0200
+++ telepathy-inspector-0.5.0/SConstruct 2007-07-06 19:53:53.000000000 +0200
@@ -1,5 +1,6 @@
import os
from build_functions import CheckPKGConfig, CheckPKG, CheckPackages, SaveDictionary
+from SCons.Util import CLVar
SConsignFile()
@@ -21,7 +22,8 @@
# Get our configuration options:
opts = Options(options_filename)
-opts.Add('PREFIX', 'Directory to install under', '/usr/local')
+opts.Add('PREFIX', 'A prefix for all paths', '/usr/local')
+opts.Add('DESTDIR', 'Directory to install under', '')
opts.Add(BoolOption('CONFIGURE', 'Whether the build should be (re)configured', 'yes'))
opts.Add(BoolOption('DEBUG', 'Whether debugging information should be produced', 'no'))
opts.Update(env)
@@ -29,16 +31,18 @@
Help(opts.GenerateHelpText(env))
-# Compiler options
+# Compiler and linker flags
-if env['CC'] == 'gcc':
+if os.environ.has_key('CFLAGS'):
+ env['CCFLAGS'] += CLVar(os.environ['CFLAGS'])
+if os.environ.has_key('LDFLAGS'):
+ env['LINKFLAGS'] += CLVar(os.environ['LDFLAGS'])
+if env['CC'] == 'gcc':
env['CCFLAGS'] += ' -Wall -Werror'
-
if env['DEBUG'] == True:
env['CCFLAGS'] += ' -g'
-
# Configuration:
if env['CONFIGURE'] == True:
diff -ur telepathy-inspector-0.5.0.orig/src/SConscript telepathy-inspector-0.5.0/src/SConscript
--- telepathy-inspector-0.5.0.orig/src/SConscript 2007-06-27 12:10:14.000000000 +0200
+++ telepathy-inspector-0.5.0/src/SConscript 2007-06-27 12:11:00.000000000 +0200
@@ -45,7 +45,8 @@
Import ('env options_filename')
-install_dir = os.path.join (env['PREFIX'], 'bin')
+_r = lambda p: (p[0] == '/') and p[1:] or p
+install_dir = os.path.join('/', env['DESTDIR'], _r(env['PREFIX']), 'bin')
env.Command('ti-signals-marshal.c', 'ti-signals-marshal.list', 'glib-genmarshal --body --prefix=ti_marshal $SOURCE > $TARGET')
env.Command('ti-signals-marshal.h', 'ti-signals-marshal.list', 'glib-genmarshal --header --prefix=ti_marshal $SOURCE > $TARGET')
|