]> git.pld-linux.org Git - packages/audacity.git/commitdiff
try enabling cpu flags explicitly based on target arch
authorJan Palus <atler@pld-linux.org>
Sat, 23 Jan 2021 10:09:44 +0000 (11:09 +0100)
committerJan Palus <atler@pld-linux.org>
Sat, 23 Jan 2021 10:10:41 +0000 (11:10 +0100)
audacity.spec
no-sse.patch [deleted file]

index 1eac03deb54405a9a04273b24587a0c6b526b55b..719c087c76a01ae0f98fbcf8b070b6817722a3bd 100644 (file)
@@ -9,7 +9,20 @@
 # Conditional build:
 %bcond_without ffmpeg          # build without ffmpeg support
 %bcond_with    gtk3            # GTK+ 3.x instead of 2.x (not fully supported)
 # 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):     Кроссплатформенный звуковой редактор
 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):     Кроссплатформенный звуковой редактор
@@ -26,7 +39,6 @@ Source1:      %{name}-manual-%{version}.zip
 Patch0:                %{name}-opt.patch
 Patch1:                %{name}-no-macos.patch
 Patch2:                %{name}-desktop.patch
 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
 URL:           http://audacityteam.org/
 BuildRequires: alsa-lib-devel
 BuildRequires: autoconf >= 2.59
@@ -55,6 +67,7 @@ BuildRequires:        lv2-devel
 BuildRequires: nasm
 BuildRequires: pkgconfig
 #BuildRequires:        portaudio-devel >= 19
 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
 BuildRequires: soundtouch-devel >= 1.3.0
 BuildRequires: soxr-devel >= 0.0.5
 BuildRequires: speex-devel
@@ -106,9 +119,6 @@ Audacity - это звуковой редактор, позволяющий ра
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%ifarch %{ix86}
-%patch3 -p1
-%endif
 
 %{__sed} -i 's/libmp3lame.so/libmp3lame.so.0/g' locale/*.po
 
 
 %{__sed} -i 's/libmp3lame.so/libmp3lame.so.0/g' locale/*.po
 
@@ -139,6 +149,9 @@ fi
 mkdir -p build
 cd build
 %cmake .. \
 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
        -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
diff --git a/no-sse.patch b/no-sse.patch
deleted file mode 100644 (file)
index 46b9776..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- 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 )
This page took 0.148104 seconds and 4 git commands to generate.