[packages/CPU-X] - fix building on x32

baggins baggins at pld-linux.org
Sat Aug 4 21:51:54 CEST 2018


commit 6c3579a41499fad4904d6239c68f2a376421c5c1
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Aug 4 21:51:42 2018 +0200

    - fix building on x32

 CPU-X.spec |  6 +++++-
 x32.patch  | 11 +++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/CPU-X.spec b/CPU-X.spec
index 84f2de8..dc86580 100644
--- a/CPU-X.spec
+++ b/CPU-X.spec
@@ -6,11 +6,12 @@ License:	GPL v3
 Group:		Applications
 Source0:	https://github.com/X0rg/CPU-X/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	a680ad9004e48d3c8caa758215d8269b
+Patch0:		x32.patch
 URL:		https://x0rg.github.io/CPU-X/
 BuildRequires:	cmake
 BuildRequires:	curl-devel
 BuildRequires:	gtk+3-devel >= 3.12.0
-BuildRequires:	libcpuid >= 0.4.0
+BuildRequires:	libcpuid-devel >= 0.4.0
 BuildRequires:	nasm
 BuildRequires:	ncurses-devel
 BuildRequires:	pciutils-devel
@@ -26,6 +27,9 @@ Open Source software designed for GNU/Linux.
 
 %prep
 %setup -q
+%ifarch x32
+%patch0 -p1
+%endif
 
 %build
 mkdir -p build
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..bc985bc
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,11 @@
+--- CPU-X-3.2.3/src/bandwidth/CMakeLists.txt~	2018-07-01 18:22:23.000000000 +0200
++++ CPU-X-3.2.3/src/bandwidth/CMakeLists.txt	2018-08-04 21:49:25.805270583 +0200
+@@ -31,7 +31,7 @@
+ 	elseif(BITNESS EQUAL 64)
+ 		set(ROUTINES "routines-x86-64bit")
+ 		add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ROUTINES}.o
+-			COMMAND ${CMAKE_ASM_NASM_COMPILER} ${NASM_FLAGS_DEBUG} -f elf64 ${ROUTINES}.asm -o ${CMAKE_CURRENT_BINARY_DIR}/${ROUTINES}.o
++			COMMAND ${CMAKE_ASM_NASM_COMPILER} ${NASM_FLAGS_DEBUG} -f elfx32 ${ROUTINES}.asm -o ${CMAKE_CURRENT_BINARY_DIR}/${ROUTINES}.o
+ 			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ 		)
+ 	endif()
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/CPU-X.git/commitdiff/6c3579a41499fad4904d6239c68f2a376421c5c1



More information about the pld-cvs-commit mailing list