summaryrefslogtreecommitdiffstats
path: root/debian/patches/0003-add_powerline_compile_flags.patch
blob: 955824ec71413d003147f70021e65e807975bf27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Author: Jerome Charaoui <jerome@riseup.net>
Description: Adds CPPFLAGS and LDFLAGS to scripts/powerline compiler
Forwarded: not-needed

diff -Naurp powerline.orig/setup.py powerline/setup.py
--- powerline.orig/setup.py
+++ powerline/setup.py
@@ -30,9 +30,11 @@ def compile_client():
 		from distutils.ccompiler import new_compiler
 		compiler = new_compiler().compiler
 		cflags = os.environ.get('CFLAGS', str('-O3'))
+		ldflags = os.environ.get('LDFLAGS', '')
+		cppflags = os.environ.get('CPPFLAGS', '')
 		# A normal split would do a split on each space which might be incorrect. The
 		# shlex will not split if a space occurs in an arguments value.
-		subprocess.check_call(compiler + shlex.split(cflags) + ['client/powerline.c', '-o', 'scripts/powerline'])
+		subprocess.check_call(compiler + shlex.split(cflags) + shlex.split(ldflags) + shlex.split(cppflags) + ['client/powerline.c', '-o', 'scripts/powerline'])
 
 try:
 	compile_client()