summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-electronics/oregano/files/oregano-0.69.1-scons_env_flags.patch')
-rw-r--r--sci-electronics/oregano/files/oregano-0.69.1-scons_env_flags.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/sci-electronics/oregano/files/oregano-0.69.1-scons_env_flags.patch b/sci-electronics/oregano/files/oregano-0.69.1-scons_env_flags.patch
new file mode 100644
index 000000000000..6e999e44e586
--- /dev/null
+++ b/sci-electronics/oregano/files/oregano-0.69.1-scons_env_flags.patch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## scons.env.flags.dpatch by Maximiliano Curia <maxy@debian.org>
+##
+## DP: Honour the CFLAGS and LDFLAGS environment variables
+
+@DPATCH@
+diff -urNad oregano-0.69.1~/SConstruct oregano-0.69.1/SConstruct
+--- oregano-0.69.1~/SConstruct 2009-07-07 12:49:49.000000000 -0300
++++ oregano-0.69.1/SConstruct 2009-07-22 19:59:31.665525831 -0300
+@@ -76,9 +76,14 @@
+ mo_bld = Builder (action = mo_builder)
+
+ CEnv.Append (BUILDERS = {'MoBuild' : mo_bld})
+-CEnv.Append (CCFLAGS = Split ('-Wall'));
+-if CEnv['Debug']:
+- CEnv.Append (CCFLAGS = Split ('-g'));
++if ( os.environ.has_key('CFLAGS') ):
++ CEnv.Append (CCFLAGS = Split (os.environ['CFLAGS']))
++else:
++ CEnv.Append (CCFLAGS = Split ('-Wall'))
++ if CEnv['Debug']:
++ CEnv.Append (CCFLAGS = Split ('-g'))
++if ( os.environ.has_key('LDFLAGS') ):
++ CEnv.Append (LINKFLAGS = Split (os.environ['LDFLAGS']))
+
+ # Check dependencies #
+ if not CEnv.GetOption ('clean'):