[packages/python3-pygame] - bcond to use SSE4.2 instructions (without runtime check)

qboosh qboosh at pld-linux.org
Sat Oct 5 10:39:46 CEST 2024


commit 94e34f6395d81b415b4f8c21d2718ec9c84b83b9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 5 09:34:36 2024 +0200

    - bcond to use SSE4.2 instructions (without runtime check)

 python3-pygame.spec | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/python3-pygame.spec b/python3-pygame.spec
index 6d8104b..21056cc 100644
--- a/python3-pygame.spec
+++ b/python3-pygame.spec
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 %bcond_without	apidocs	# Sphinx documentation
+%bcond_with	sse4	# SSE 4.2 instructions
 
 %define		module	pygame
 
@@ -35,6 +36,9 @@ BuildRequires:	sphinx-pdg-3
 %endif
 BuildRequires:	xorg-lib-libX11-devel
 Requires:	python3-modules >= 1:3.6
+%if %{with sse4}
+Requires:	cpuinfo(sse4_2)
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -95,7 +99,9 @@ Przykłady do modułów Pythona pygame.
 
 %build
 export PORTMIDI_INC_PORTTIME=1
+%if %{without sse4}
 CFLAGS="%{rpmcflags} -DPG_COMPILE_SSE4_2=0"
+%endif
 %py3_build
 
 %if %{with apidocs}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pygame.git/commitdiff/94e34f6395d81b415b4f8c21d2718ec9c84b83b9



More information about the pld-cvs-commit mailing list