summaryrefslogtreecommitdiff
path: root/graphics/mypaint/patches/patch-SConstruct
blob: 07f667a8a712b766bd454e0d37b994f130983da8 (plain)
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
$NetBSD: patch-SConstruct,v 1.2 2012/12/19 11:25:31 ryoon Exp $

* Set python interpreter
* From http://dev.gentoo.org/~vapier/scons-blows.txt, to respect LDFLAGS

--- SConstruct.orig	2011-11-22 20:27:03.000000000 +0000
+++ SConstruct
@@ -1,4 +1,5 @@
 import os, sys
+import SCons.Util
 from os.path import join, basename
 from SCons.Script.SConscript import SConsEnvironment
 
@@ -72,6 +73,9 @@ if env['debug']:
     env.Append(CPPDEFINES='HEAVY_DEBUG')
     env.Append(CCFLAGS='-O0', LINKFLAGS='-O0')
 
+if os.environ.has_key('LDFLAGS'):
+    env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+
 #env.Append(CCFLAGS='-fno-inline', LINKFLAGS='-fno-inline')
 
 Export('env', 'python')
@@ -81,7 +85,7 @@ languages = SConscript('po/SConscript')
 
 def burn_python_version(target, source, env):
     # make sure we run the python version that we built the extension modules for
-    s =  '#!/usr/bin/env ' + python + '\n'
+    s =  '#!%PYTHONBIN%\n'
     s += 5*'#\n'
     s += '# DO NOT EDIT - edit %s instead\n' % source[0]
     s += 5*'#\n'