SHA256
1
0
forked from pool/gmic

Remove all the silly RPM_OPT_FLAGS tweaking

OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=8
This commit is contained in:
Olaf Hering 2017-05-12 09:35:20 +00:00 committed by Git OBS Bridge
parent 3c3530f957
commit bb5a24041a

View File

@ -76,16 +76,7 @@ BuildRequires: libtiff-devel
%endif
%endif
%endif
%if 0%{?suse_version} == 1030
BuildRequires: gimp-unstable-devel
%else
BuildRequires: gimp-devel
%endif
%if 0%{?sles_version} == 11
BuildRequires: glib2-branding-SLES
%endif
%define openSUSE_submit 1
%description
G'MIC is an open and full-featured framework for image processing, providing several different user interfaces to convert/manipulate/filter/visualize generic image datasets, from 1d scalar signals to 3d+t sequences of multi-spectral volumetric images. Technically speaking, what it does is:
@ -207,37 +198,10 @@ mv zart/README zart/README.zart
cp -p %{SOURCE1} .
%build
RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS | sed 's/-fstack-protector//'`"
#RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O3 -ffast-math -ftree-vectorize"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffast-math"
GCCVER=`gcc -v 2>&1 | tail -n1 | sed -e 's/^gcc version \([^ ]*\) .*$/\1/' -e 's/\.//g'`
if test $GCCVER -ge 480; then RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-ipa-sra"; fi
if test $GCCVER -ge 480 -a $GCCVER -le 482; then MAKEFLAGS="NO_OPENMP=1"; fi
if test $GCCVER -le 445; then sed -i 's/\-std=c++11//' src/Makefile; fi
if test $GCCVER -le 440; then MAKEFLAGS="NO_OPENMP=1"; fi
# Compile times are exorbitant as are, -funroll-loops makes it worse
#RPM_OPT_FLAGS="$RPM_OPT_FLAGS -funroll-loops"
%ifarch %{ix86} x86_64
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -momit-leaf-frame-pointer"
%endif
%if 0%{?openSUSE_submit} == 0
%ifarch %{ix86}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mmmx -msse -mfpmath=sse,387"
%endif
%endif
%if 0%{?fedora_version} > 19
RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS | sed 's/-strong//'`"
%endif
# gcc-4.3 needs -fno-tree-pre, see gcc bug 36439
GCCVER="`gcc --version | head -n1 | sed 's/^gcc[^0-9]*\([^ ]*\).*$/\1/'`"
#echo $GCCVER
case $GCCVER in 4.3*)
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-tree-pre"
;;
4.5*)
RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS | sed 's/\-funroll\-loops //'`"
;;
esac
# Limit parallel build to avoid overloading machines
free -m
MEM=`free -m | grep '^Mem:' | sed 's/^Mem: *\([0-9]*\).*$/\1/'`
@ -253,7 +217,6 @@ if test -n "%jobs" -a $MAXJOBS -gt 1; then
else
JOBS=""
fi
#make CFLAGS="$RPM_OPT_FLAGS"
cd src
%if 0%{?fedora_version} > 16
make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} QMAKE=qmake-qt4 cli