diff --git a/0001-enable-arrch64.patch b/0001-enable-arrch64.patch new file mode 100644 index 0000000..155d97d --- /dev/null +++ b/0001-enable-arrch64.patch @@ -0,0 +1,12 @@ +diff -ur Random123-1.09.orig/include/Random123/features/gccfeatures.h Random123-1.09/include/Random123/features/gccfeatures.h +--- Random123-1.09.orig/include/Random123/features/gccfeatures.h 2018-12-28 18:15:37.119315452 +0000 ++++ Random123-1.09/include/Random123/features/gccfeatures.h 2018-12-28 18:16:08.363157300 +0000 +@@ -34,7 +34,7 @@ + + #define R123_GNUC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) + +-#if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__) ++#if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__) && !defined(__aarch64__) + # error "This code has only been tested on x86 and powerpc platforms." + #include + { /* maybe an unbalanced brace will terminate the compilation */ diff --git a/Random123.spec b/Random123.spec index 320e941..68ffd59 100644 --- a/Random123.spec +++ b/Random123.spec @@ -2,12 +2,15 @@ Name: Random123 Version: 1.09 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library of random number generators License: BSD URL: http://www.deshawresearch.com/resources_random123.html Source0: http://www.deshawresearch.com/downloads/download_random123.cgi/%{name}-%{version}.tar.gz +# works on aarch64 +# https://github.com/neuronsimulator/nrn/pull/115/files +Patch0: 0001-enable-arrch64.patch # gccfeatures.h has a check that only permits building on x86 x86_64 and ppc # I'd rather not remove the check ExcludeArch: %{arm} mips64r2 mips32r2 s390 s390x @@ -78,7 +81,7 @@ Random123 library can be used with CPU (C and C++) and GPU (CUDA and OpenCL) applications. %prep -%setup -q +%autosetup -p1 -S patch %build @@ -103,6 +106,9 @@ cp -a include/Random123/* $RPM_BUILD_ROOT/%{_includedir}/%{name}/ %doc examples %changelog +* Fri Dec 28 2018 Ankur Sinha - 1.09-7 +- Add aarch64 patch + * Thu Jul 12 2018 Fedora Release Engineering - 1.09-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild