[powerline] Update cflags patch.
asn
asn at fedoraproject.org
Thu Dec 11 14:38:19 UTC 2014
commit 3e39a108e2891de0f437bc195db15ab5f3974b1b
Author: Andreas Schneider <asn at cryptomilk.org>
Date: Wed Dec 10 16:02:49 2014 +0100
Update cflags patch.
...-Honor-CFLAGS-set-as-environment-variable.patch | 24 ++++++++++++++-----
powerline.spec | 5 +++-
2 files changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/0001-setup-Honor-CFLAGS-set-as-environment-variable.patch b/0001-setup-Honor-CFLAGS-set-as-environment-variable.patch
index 9094a41..0393031 100644
--- a/0001-setup-Honor-CFLAGS-set-as-environment-variable.patch
+++ b/0001-setup-Honor-CFLAGS-set-as-environment-variable.patch
@@ -1,4 +1,4 @@
-From 0307d7c229cda63a55bc53ccb7a71fd62a669bdf Mon Sep 17 00:00:00 2001
+From e373b36d00fbfec2a9120cc61eacb70e4ff8e1fc Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn at cryptomilk.org>
Date: Tue, 9 Dec 2014 09:32:05 +0100
Subject: [PATCH] setup: Honor CFLAGS set as environment variable
@@ -10,20 +10,30 @@ commandline and the setup.py should forward them to the compiler.
Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
---
- setup.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ setup.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
-index 434dff5..00503f1 100755
+index 434dff5..7dbf021 100755
--- a/setup.py
+++ b/setup.py
-@@ -27,7 +27,8 @@ def compile_client():
+@@ -6,6 +6,7 @@ import os
+ import sys
+ import subprocess
+ import logging
++import shlex
+
+ from setuptools import setup, find_packages
+
+@@ -27,7 +28,10 @@ def compile_client():
else:
from distutils.ccompiler import new_compiler
compiler = new_compiler().compiler
- subprocess.check_call(compiler + ['-O3', 'client/powerline.c', '-o', 'scripts/powerline'])
-+ cflags = os.environ['CFLAGS'].get() or '-O3'
-+ subprocess.check_call(compiler + [cflags, 'client/powerline.c', '-o', 'scripts/powerline'])
++ cflags = os.environ.get('CFLAGS', '-O3')
++ # 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'])
try:
compile_client()
diff --git a/powerline.spec b/powerline.spec
index bd255c7..4bd1d2b 100644
--- a/powerline.spec
+++ b/powerline.spec
@@ -1,6 +1,6 @@
Name: powerline
Version: 1.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: The ultimate status-line/prompt utility
License: MIT
@@ -220,6 +220,9 @@ mv %{buildroot}%{python_sitelib}/powerline/bindings/zsh/powerline.zsh %{buildroo
%{_datadir}/tmux/powerline*.conf
%changelog
+* Wed Dec 10 2014 - Andreas Schneider <asn at redhat.com> - 1.3.1-2
+- Update cflags patch.
+
* Tue Dec 09 2014 - Andreas Schneider <asn at redhat.com> - 1.3.1-1
- Update to version 1.3.1.
- resolves: #1171420 - Fix passing optflags to the C compiler.
More information about the scm-commits
mailing list