[packages/ocaml-zarith] - added x32 patch (adjust asm arch detection for x32 ABI); release 2

qboosh qboosh at pld-linux.org
Sat Dec 28 15:47:39 CET 2019


commit 41878b55efe78206165dd4a918c0ae144b48fa44
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 28 15:48:28 2019 +0100

    - added x32 patch (adjust asm arch detection for x32 ABI); release 2

 ocaml-zarith-x32.patch | 15 +++++++++++++++
 ocaml-zarith.spec      |  6 +++++-
 2 files changed, 20 insertions(+), 1 deletion(-)
---
diff --git a/ocaml-zarith.spec b/ocaml-zarith.spec
index 9f67479..bf7d764 100644
--- a/ocaml-zarith.spec
+++ b/ocaml-zarith.spec
@@ -12,12 +12,13 @@ Summary:	Zarith: arbitrary-precision integers
 Summary(pl.UTF-8):	Zarith - liczby całkowite dowolnej precyzji
 Name:		ocaml-zarith
 Version:	1.9.1
-Release:	1
+Release:	2
 License:	LGPL v2 with linking exception
 Group:		Applications/Math
 #Source0Download: https://github.com/ocaml/Zarith/releases
 Source0:	https://github.com/ocaml/Zarith/archive/release-%{version}/Zarith-%{version}.tar.gz
 # Source0-md5:	af41b7534a4c91a8f774f04e307c1c66
+Patch0:		%{name}-x32.patch
 URL:		http://github.com/ocaml/Zarith
 BuildRequires:	bash
 BuildRequires:	gmp-devel
@@ -57,10 +58,13 @@ przy użyciu biblioteki Zarith.
 
 %prep
 %setup -q -n Zarith-release-%{version}
+%patch0 -p1
 
 %build
+CC="%{__cc}" \
 CFLAGS="%{rpmcflags}" \
 ./configure \
+	-host %{_target_platform} \
 	-installdir $RPM_BUILD_ROOT%{_libdir}/ocaml \
 	-gmp
 
diff --git a/ocaml-zarith-x32.patch b/ocaml-zarith-x32.patch
new file mode 100644
index 0000000..a0f65c0
--- /dev/null
+++ b/ocaml-zarith-x32.patch
@@ -0,0 +1,15 @@
+--- Zarith-release-1.9.1/configure.orig	2019-08-28 16:17:04.000000000 +0200
++++ Zarith-release-1.9.1/configure	2019-12-28 15:42:01.220520989 +0100
+@@ -323,7 +323,11 @@
+             arch='x86_64'
+         fi
+         ;;
+-    i486-*linux-gnu|i686-*linux-gnu|i486-kfreebsd-gnu)
++    x86_64-*linux-gnux32)
++        ccdef="-DZ_ELF -DZ_DOT_LABEL_PREFIX $ccdef"
++        arch='x86_64'
++        ;;
++    i[456]86-*linux-gnu|iathlon-*linux-gnu|i486-kfreebsd-gnu)
+         ccdef="-DZ_ELF -DZ_DOT_LABEL_PREFIX $ccdef"
+         arch='i686';;
+     i686-*cygwin)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ocaml-zarith.git/commitdiff/41878b55efe78206165dd4a918c0ae144b48fa44



More information about the pld-cvs-commit mailing list