[cfitsio] Add ppc64le support (bz #1097248).
Sergio Pascual
sergiopr at fedoraproject.org
Thu May 15 14:42:26 UTC 2014
commit ffa7ad14680c09051a3738892e3feefac75db25a
Author: Sergio Pascual <sergiopr at fedoraproject.org>
Date: Thu May 15 16:42:11 2014 +0200
Add ppc64le support (bz #1097248).
cfitsio-ppc64le_support.patch | 31 +++++++++++++++++++++++++++++++
cfitsio.spec | 8 +++++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/cfitsio-ppc64le_support.patch b/cfitsio-ppc64le_support.patch
new file mode 100644
index 0000000..b44369b
--- /dev/null
+++ b/cfitsio-ppc64le_support.patch
@@ -0,0 +1,31 @@
+Subject: cfitsio ppc64le support
+From: Michel Normand <normand at linux.vnet.ibm.com>
+
+for ppc64le archi should define BYTESWAPPED but not MACHINE
+
+Signed-off-by: Michel Normand <normand at linux.vnet.ibm.com>
+---
+ fitsio2.h | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+Index: cfitsio/fitsio2.h
+===================================================================
+--- cfitsio.orig/fitsio2.h
++++ cfitsio/fitsio2.h
+@@ -109,9 +109,13 @@ extern int Fitsio_Pthread_Status;
+
+ #elif defined(__powerpc64__) || defined(__64BIT__) || defined(__AARCH64EB__) /* IBM 64-bit AIX powerpc*/
+ /* could also test for __ppc64__ or __PPC64 */
+-#define BYTESWAPPED FALSE
+-#define MACHINE NATIVE
+-#define LONGSIZE 64
++# if defined(__LITTLE_ENDIAN__)
++# define BYTESWAPPED TRUE
++# else
++# define BYTESWAPPED FALSE
++# define MACHINE NATIVE
++# endif
++# define LONGSIZE 64
+
+ #elif defined(_MIPS_SZLONG)
+
diff --git a/cfitsio.spec b/cfitsio.spec
index 7b8b38c..dfd98c6 100644
--- a/cfitsio.spec
+++ b/cfitsio.spec
@@ -1,6 +1,6 @@
Name: cfitsio
Version: 3.360
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Library for manipulating FITS data files
Group: Development/Libraries
License: MIT
@@ -14,6 +14,8 @@ Patch1: cfitsio-noversioncheck.patch
Patch2: cfitsio-pkgconfig.patch
# AArch64 platform definitions
Patch3: cfitsio-aarch64.patch
+# ppc64le platform definitions
+Patch4: cfitsio-ppc64le_support.patch
BuildRequires: gcc-gfortran zlib-devel
Requires(post): /sbin/ldconfig
@@ -82,6 +84,7 @@ compression algorithm.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
# remove bundled zlib
# not all the files inside zlib belong to zlib
@@ -143,6 +146,9 @@ chmod 755 %{buildroot}%{_bindir}/f{,un}pack
%{_bindir}/funpack
%changelog
+* Thu May 15 2014 Sergio Pascual <sergiopr at fedoraproject.org> - 3.360-3
+- Add ppc64le support (bz #1097248).
+
* Tue Apr 15 2014 Marcin Juszkiewicz <mjuszkiewicz at redhat.com> - 3.360-2
- Add AArch64 support.
More information about the scm-commits
mailing list