From 3e39a108e2891de0f437bc195db15ab5f3974b1b Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Dec 10 2014 15:16:00 +0000 Subject: Update cflags patch. --- 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 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 --- - 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 - 1.3.1-2 +- Update cflags patch. + * Tue Dec 09 2014 - Andreas Schneider - 1.3.1-1 - Update to version 1.3.1. - resolves: #1171420 - Fix passing optflags to the C compiler.