LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File project.diff of Package ansifilter (Project home:dnh)

--- ansifilter.spec.orig
+++ ansifilter.spec
@@ -17,7 +17,11 @@
 #
 
 
+%if 0%{?suse_version} >= 1320
 %bcond_without gui
+%else
+%bcond_with gui
+%endif
 Name:           ansifilter
 Version:        2.8
 Release:        0
@@ -29,7 +33,7 @@ Source:         http://www.andre-simon.d
 Source1:        ansifilter.desktop
 Source2:        http://www.andre-simon.de/zip/ansifilter-%{version}.tar.bz2.asc
 Source99:       ansifilter.keyring
-BuildRequires:  gcc-c++
+BuildRequires:  gcc-c++ >= 4.6
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -41,7 +45,7 @@ output (HTML, RTF, TeX, LaTeX, BBCode).
 %package gui
 Summary:        ANSI Terminal Escape Code Converter - Qt GUI
 Group:          Development/Tools/Other
-BuildRequires:  libqt5-qtbase-devel
+BuildRequires:  libqt5-qtbase-devel >= 5.2
 BuildRequires:  update-desktop-files
 Requires:       %{name} = %{version}-%{release}
 
@@ -58,9 +62,16 @@ rm -v src/qt-gui/Makefile*
 %endif
 
 %build
+%if 0%{?suse_version} < 1220
+# g++ 4.6 needs this for unique_ptr used in main.cpp
+CXXADD="-std=c++0x -include future"
+%else
+# g++ 4.7 onwards already has c++11 and unique_ptr
+CXXADD="-std=c++11"
+%endif
 make \
   CFLAGS="%{optflags} -fPIC" \
-  CXXFLAGS="%{optflags} -std=c++11 -fPIC" \
+  CXXFLAGS="%{optflags} -fPIC ${CXXADD}" \
   QMAKE="qmake-qt5" \
   all \
 %if %{with gui}