[packages/crafty] - fix building on x32

baggins baggins at pld-linux.org
Fri Mar 27 22:43:20 CET 2020


commit 9f188564fa215d2113863cb5f2b5bd75d2bb83c5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Mar 27 22:42:55 2020 +0100

    - fix building on x32

 crafty.spec |  2 ++
 x32.patch   | 11 +++++++++++
 2 files changed, 13 insertions(+)
---
diff --git a/crafty.spec b/crafty.spec
index f1d05a8..1647f9d 100644
--- a/crafty.spec
+++ b/crafty.spec
@@ -27,6 +27,7 @@ Patch0:		%{name}-paths.patch
 Patch1:		%{name}-security.patch
 Patch2:		%{name}-portable.patch
 Patch3:		%{name}-spelling.patch
+Patch4:		x32.patch
 URL:		http://www.craftychess.com/
 BuildRequires:	libstdc++-devel
 BuildRequires:	sed >= 4.0
@@ -54,6 +55,7 @@ często wygrywa z GNU Chess na tym samym sprzęcie.
 %patch1 -p0
 %patch2 -p0
 %patch3 -p0
+%patch4 -p1
 %{__mv} doc/read.me README
 %{__mv} doc/* .
 %{__mv} bitmaps/README.bitmaps .
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..122a43b
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,11 @@
+--- crafty-25.2/tbprobe.c~	2020-03-27 22:38:46.000000000 +0100
++++ crafty-25.2/tbprobe.c	2020-03-27 22:39:45.477080526 +0100
+@@ -107,7 +107,7 @@
+ #define file(s)                 ((s) & 0x07)
+ #define board(s)                ((uint64_t)1 << (s))
+ static inline unsigned _lsb(uint64_t b) {
+-#ifdef __x86_64__
++#if defined(__x86_64__) && !defined(__ILP32__)
+   size_t idx;
+ __asm__("bsfq %1, %0": "=r"(idx):"rm"(b));
+   return idx;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crafty.git/commitdiff/9f188564fa215d2113863cb5f2b5bd75d2bb83c5



More information about the pld-cvs-commit mailing list