From 4be97261884c3e977f50a3453dc390acc4b13e63 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Aug 04 2013 19:18:11 +0000 Subject: Fix to use distro optflags. Also fixed FTBFS on ARM --- diff --git a/phasex-0.11.1-cflags.patch b/phasex-0.11.1-cflags.patch deleted file mode 100644 index c3570d7..0000000 --- a/phasex-0.11.1-cflags.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up phasex-0.11.1/configure~ phasex-0.11.1/configure ---- phasex-0.11.1/configure~ 2007-08-14 06:18:08.000000000 +0300 -+++ phasex-0.11.1/configure 2009-05-09 00:10:26.000000000 +0300 -@@ -7700,16 +7700,13 @@ esac - # copy debug flags - C_DEBUG_FLAGS="$debug_flags" - --# Remove optimization level flag so we can add our own --CFLAGS=`echo "$CFLAGS" | perl -e "s/-O0-9? //g"` -- - # These seem to work very well - OPT_FLAGS="$ARCH_OPT_FLAGS $C_DEBUG_FLAGS -O3 -ffast-math -fomit-frame-pointer -fstrength-reduce" - - # These seem to not make much difference or even slow things down, but YMMV - #OPT_FLAGS="$OPT_FLAGS -fforce-addr -funroll-loops -floop-optimize2 -fmove-loop-invariants -fprefetch-loop-arrays -fpeel-loops" - --CFLAGS="$OPT_FLAGS -D_REENTRANT $JACK_CFLAGS $GTK_CFLAGS $CFLAGS" -+CFLAGS="-D_REENTRANT $JACK_CFLAGS $GTK_CFLAGS $CFLAGS" - LIBS="$ALSA_LIBS $JACK_LIBS $GLIB_LIBS $GTK_LIBS $LIBS" - - diff --git a/phasex-cflags.patch b/phasex-cflags.patch new file mode 100644 index 0000000..c0cec41 --- /dev/null +++ b/phasex-cflags.patch @@ -0,0 +1,20 @@ +--- phasex-dev-m1/configure.orig 2013-08-04 19:48:55.159153909 +0100 ++++ phasex-dev-m1/configure 2013-08-04 19:51:07.466438046 +0100 +@@ -5847,14 +5847,14 @@ + case "$DEBUG_CFLAGS" in + "none") + DEBUG_CFLAGS="" +- OPT_CFLAGS="-pipe -Wcast-align $ARCH_OPT_CFLAGS -m$ARCH_BITS $ARCH_MATH_CFLAGS -O3 -ffast-math -fomit-frame-pointer" ++ OPT_CFLAGS="-Wcast-align $ARCH_MATH_CFLAGS -ffast-math -fomit-frame-pointer" + ;; + "yes") + DEBUG_CFLAGS="" +- OPT_CFLAGS="-g -pipe -Wall -Wcast-align $ARCH_OPT_CFLAGS -m$ARCH_BITS $ARCH_MATH_CFLAGS -O2 -ffast-math" ++ OPT_CFLAGS="-Wcast-align $ARCH_MATH_CFLAGS -ffast-math" + ;; + *) +- OPT_CFLAGS="-g -pipe -Wall -Wcast-align $ARCH_OPT_CFLAGS -m$ARCH_BITS $ARCH_MATH_CFLAGS -O2 -ffast-math" ++ OPT_CFLAGS="-Wcast-align $ARCH_MATH_CFLAGS -ffast-math" + ;; + esac + diff --git a/phasex.spec b/phasex.spec index 0827a46..8b6da6f 100644 --- a/phasex.spec +++ b/phasex.spec @@ -4,13 +4,14 @@ Name: phasex Version: 0.12.0 -Release: 0.10.%{prerel}%{?dist} +Release: 0.11.%{prerel}%{?dist} Summary: PHASEX -- Phase Harmonic Advanced Synthesis EXperiment Group: Applications/Multimedia License: GPLv2 URL: https://github.com/disabled/phasex-dev Source0: https://github.com/downloads/disabled/phasex-dev/%{name}-%{prerel_d}.tar.gz +Patch0: phasex-cflags.patch BuildRequires: glibc-devel >= 2.3.0 BuildRequires: alsa-lib-devel >= 0.9.0 @@ -37,19 +38,15 @@ processing capabilities, and more. %prep %setup -q -n %{name}-%{prerel_d} - -# Upstream is notified via email for these two issues -# Fix optflags -sed -i -e 's|-O3.*"|%{optflags}"|' -e 's|-mtune=generic||' configure +%patch0 -p1 -b .cflags # Fix DSO linking sed -i -e 's|\(-lpthread\)|\1 -lX11 -lgmodule-2.0|' configure %build -%configure \ -%ifarch %ix86 x86_64 - --enable-arch=%{_target_cpu} -%endif +export CFLAGS="%{optflags}" +export CPPFLAGS="%{optflags}" +%configure make %{?_smp_mflags} @@ -57,15 +54,15 @@ make %{?_smp_mflags} make install DESTDIR=$RPM_BUILD_ROOT for s in 16 22 32 48 ; do - %{__mkdir} -p %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps - %{__cp} %{buildroot}%{_datadir}/phasex/pixmaps/phasex-icon-${s}x${s}.png \ + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps + cp %{buildroot}%{_datadir}/phasex/pixmaps/phasex-icon-${s}x${s}.png \ %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/phasex-icon.png done BASE="AudioVideo Audio" XTRA="X-MIDI X-Digital_Processing X-Jack X-Synthesis Midi" -%{__mkdir} -p %{buildroot}%{_datadir}/applications +mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install \ %if 0%{?fedora} && 0%{?fedora} < 19 --vendor %{desktop_vendor} \ @@ -102,6 +99,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/icons/hicolor/*/apps/phasex-icon.png %changelog +* Sun Aug 4 2013 Peter Robinson 0.12.0-0.11.m1 +- Fix to use distro optflags. Also fixed FTBFS on ARM + * Sun Aug 04 2013 Fedora Release Engineering - 0.12.0-0.10.m1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild