# Conditional build:
%bcond_without ffmpeg # build without ffmpeg support
%bcond_with gtk3 # GTK+ 3.x instead of 2.x (not fully supported)
+%bcond_without mmx # MMX instructions
+%bcond_without sse # SSE instructions
+%bcond_without sse2 # SSE2 instructions
#
+%ifnarch %{x8664} pentium2 pentium3 pentium4 athlon
+%undefine with_mmx
+%endif
+%ifnarch %{x8664} pentium3 pentium4
+%undefine with_sse
+%endif
+%ifnarch %{x8664} pentium4
+%undefine with_sse2
+%endif
+
Summary: Audacity - manipulate digital audio waveforms
Summary(pl.UTF-8): Audacity - narzędzie do obróbki plików dźwiękowych
Summary(ru.UTF-8): Кроссплатформенный звуковой редактор
Patch0: %{name}-opt.patch
Patch1: %{name}-no-macos.patch
Patch2: %{name}-desktop.patch
-Patch3: no-sse.patch
URL: http://audacityteam.org/
BuildRequires: alsa-lib-devel
BuildRequires: autoconf >= 2.59
BuildRequires: nasm
BuildRequires: pkgconfig
#BuildRequires: portaudio-devel >= 19
+BuildRequires: rpmbuild(macros) >= 1.742
BuildRequires: soundtouch-devel >= 1.3.0
BuildRequires: soxr-devel >= 0.0.5
BuildRequires: speex-devel
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%ifarch %{ix86}
-%patch3 -p1
-%endif
%{__sed} -i 's/libmp3lame.so/libmp3lame.so.0/g' locale/*.po
mkdir -p build
cd build
%cmake .. \
+ %{cmake_on_off mmx HAVE_MMX} \
+ %{cmake_on_off sse HAVE_SSE} \
+ %{cmake_on_off sse2 HAVE_SSE2} \
-DwxWidgets_CONFIG_EXECUTABLE:FILEPATH=$(which wx-gtk%{?with_gtk3:3}%{!?with_gtk3:2}-unicode-config) \
%{!?with_ffmpeg:-Daudacity_use_ffmpeg:STRING=off} \
-DCMAKE_BUILD_TYPE=Release
+++ /dev/null
---- audacity-minsrc-2.4.2/CMakeLists.txt~ 2020-05-30 13:55:53.000000000 +0200
-+++ audacity-minsrc-2.4.2/CMakeLists.txt 2021-01-23 10:56:11.555735531 +0100
-@@ -232,16 +232,6 @@
- if( HAVE_MMX )
- set( MMX_FLAG "-mmmx" CACHE INTERNAL "" )
- endif()
--
-- check_cxx_compiler_flag( "-msse" HAVE_SSE )
-- if( HAVE_SSE )
-- set( SSE_FLAG "-msse" CACHE INTERNAL "" )
-- endif()
--
-- check_cxx_compiler_flag( "-msse2" HAVE_SSE2 )
-- if( HAVE_SSE2 )
-- set( SSE_FLAG "-msse2" CACHE INTERNAL "" )
-- endif()
- elseif( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
- set( HAVE_MMX ON )
- set( HAVE_SSE ON )