[packages/audacity] try enabling cpu flags explicitly based on target arch

atler atler at pld-linux.org
Sat Jan 23 11:11:43 CET 2021


commit 250a255c8f96a21f8d950180850131b8c84c025c
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Jan 23 11:09:44 2021 +0100

    try enabling cpu flags explicitly based on target arch

 audacity.spec | 21 +++++++++++++++++----
 no-sse.patch  | 19 -------------------
 2 files changed, 17 insertions(+), 23 deletions(-)
---
diff --git a/audacity.spec b/audacity.spec
index 1eac03d..719c087 100644
--- a/audacity.spec
+++ b/audacity.spec
@@ -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)
+%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):	Кроссплатформенный звуковой редактор
@@ -26,7 +39,6 @@ Source1:	%{name}-manual-%{version}.zip
 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
@@ -55,6 +67,7 @@ BuildRequires:	lv2-devel
 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
@@ -106,9 +119,6 @@ Audacity - это звуковой редактор, позволяющий ра
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%ifarch %{ix86}
-%patch3 -p1
-%endif
 
 %{__sed} -i 's/libmp3lame.so/libmp3lame.so.0/g' locale/*.po
 
@@ -139,6 +149,9 @@ fi
 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
diff --git a/no-sse.patch b/no-sse.patch
deleted file mode 100644
index 46b9776..0000000
--- a/no-sse.patch
+++ /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 )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/audacity.git/commitdiff/250a255c8f96a21f8d950180850131b8c84c025c



More information about the pld-cvs-commit mailing list