[libpuma] Compute the gcc version requirement the way gcc-python-plugin does.

Jerry James jjames at fedoraproject.org
Tue Oct 21 16:17:16 UTC 2014


commit 7ff0db448fa1d460c3dafdac1e8b82f7e6386822
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Tue Oct 21 10:16:27 2014 -0600

    Compute the gcc version requirement the way gcc-python-plugin does.

 libpuma.spec |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libpuma.spec b/libpuma.spec
index 7069548..b48ac64 100644
--- a/libpuma.spec
+++ b/libpuma.spec
@@ -1,4 +1,5 @@
-%global gccver %(gcc --version | sed -n 's/gcc (GCC) \\([[:digit:].]*\\).*/\\1/p')
+%global gccver %(gcc --version | sed -n 's/.*(Red Hat \\(.*\\)).*/\\1/p')
+%global with_hard_gcc_version_requirement 1
 
 Name:           libpuma
 Version:        1.2
@@ -7,7 +8,7 @@ Summary:        Library for parsing and manipulating C/C++ source code
 
 License:        GPLv2+
 URL:            http://aspectc.org/
-Source0:        http://aspectc.org/releases/%{version}/ac-woven-%{version}.tar.gz
+Source0:        ftp://akut.aspectc.org/releases/%{version}/ac-woven-%{version}.tar.gz
 # Man pages from Debian
 Source1:        ac++.1
 Source2:        ag++.1
@@ -26,7 +27,11 @@ BuildRequires:  lexertl-devel
 BuildRequires:  libxml2-devel
 
 # The generated config depends on a specific version of gcc/g++
-Requires:       gcc-c++ = %{gccver}
+%if %{with_hard_gcc_version_requirement}
+Requires:       gcc-c++ = %{gccver}%{?dist}
+%else
+Requires:       gcc-c++
+%endif
 Requires:       libstdc++-devel%{?_isa}
 Requires:       glibc-devel%{?_isa}
 


More information about the scm-commits mailing list