[libindi] Add AArch64 definitions where needed.
Peter Robinson
pbrobinson at fedoraproject.org
Mon May 12 11:46:16 UTC 2014
commit df911b5e85d4fd193de4edf7c16702b7be4859a2
Author: Peter Robinson <pbrobinson at gmail.com>
Date: Mon May 12 12:46:01 2014 +0100
Add AArch64 definitions where needed.
libindi-aarch64.patch | 86 +++++++++++++++++++++++++++++++++++++++++++++++++
libindi.spec | 7 +++-
2 files changed, 92 insertions(+), 1 deletions(-)
---
diff --git a/libindi-aarch64.patch b/libindi-aarch64.patch
new file mode 100644
index 0000000..665ee0d
--- /dev/null
+++ b/libindi-aarch64.patch
@@ -0,0 +1,86 @@
+Index: libindi-0.9.8/libs/webcam/port.cpp
+===================================================================
+--- libindi-0.9.8.orig/libs/webcam/port.cpp
++++ libindi-0.9.8/libs/webcam/port.cpp
+@@ -37,36 +37,6 @@
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #endif /* LOCKING */
+-#ifdef __linux__
+-#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) \
+- || defined(__powerpc__) || defined(__s390__) || defined(__s390x__)\
+- || defined(__mips__) || defined(__mc68000__) || defined(__sh__)
+-#define NO_SYSIO
+-#endif /* architechtures */
+-#endif /* __linux__ */
+-
+-#ifdef __linux__
+- #if defined(NO_SYSIO)
+- #include <fcntl.h>
+- #else
+- #include <sys/io.h>
+- #endif /* NO_SYSIO */
+-#elif defined(QNX)
+-#include <conio.h>
+-#elif defined(__FreeBSD__)
+-#include <sys/types.h>
+-#include <machine/cpufunc.h>
+-#elif defined(BSDI)
+-#include <machine/inline.h>
+-#elif defined(OPENBSD)
+-#include <machine/pio.h>
+-#elif defined(LYNX)
+-#include "lynx-io.h"
+-#elif defined(SOLARIS)
+-#include "solaris-io.h"
+-#else
+-#error Please define a platform in the Makefile
+-#endif /* which OS */
+
+ #include "port.h"
+
+Index: libindi-0.9.8/libs/webcam/port.h
+===================================================================
+--- libindi-0.9.8.orig/libs/webcam/port.h
++++ libindi-0.9.8/libs/webcam/port.h
+@@ -36,9 +36,20 @@
+ #include <unistd.h>
+
+ #ifdef __linux__
+- #if !defined(arm) && !defined(__hppa__) && !defined(__sparc__) && !defined(__ppc__) && !defined(__powerpc__) && !defined(__s390__) && !defined(__s390x__) && !defined(__mips__) && !defined(__mc68000__)
++#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) \
++ || defined(__powerpc__) || defined(__s390__) || defined(__s390x__)\
++ || defined(__mips__) || defined(__mc68000__) || defined(__sh__)\
++ || defined(__aarch64__)
++#define NO_SYSIO
++#endif /* architechtures */
++#endif /* __linux__ */
++
++#ifdef __linux__
++ #if defined(NO_SYSIO)
++ #include <fcntl.h>
++ #else
+ #include <sys/io.h>
+- #endif /* !arm */
++ #endif /* NO_SYSIO */
+ #elif defined(QNX)
+ #include <conio.h>
+ #elif defined(__FreeBSD__)
+@@ -56,7 +67,7 @@
+ #error Please define a platform in the Makefile
+ #endif
+
+-#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__)
++#if defined(NO_SYSIO)
+ static char ports_temp;
+
+ #ifdef inb
+@@ -115,7 +126,7 @@ private:
+ #ifdef FREEBSD
+ FILE *devio;
+ #endif
+-#if defined(__linux__) && (defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__))
++#if defined(NO_SYSIO)
+ int devport;
+ #endif
+ };
diff --git a/libindi.spec b/libindi.spec
index 1a242f1..1e5d52a 100644
--- a/libindi.spec
+++ b/libindi.spec
@@ -3,7 +3,7 @@
Name: libindi
Version: 0.9.8.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Instrument Neutral Distributed Interface
Group: Development/Libraries
@@ -15,6 +15,7 @@ Source0: http://downloads.sourceforge.net/indi/%{name}_%{version}.tar.gz
Patch0: libindi-cmake.patch
# https://sourceforge.net/p/indi/bugs/50/
Patch1: libindi-mathplugin.patch
+Patch2: libindi-aarch64.patch
BuildRequires: cmake cfitsio-devel zlib-devel libnova-devel libfli-devel
BuildRequires: libusb-devel libjpeg-devel gsl-devel
@@ -43,6 +44,7 @@ Static library needed to develop a %{name} application
%setup -q -n %{name}-%{wrongversion}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
chmod -x drivers/telescope/lx200fs2.h
chmod -x drivers/telescope/lx200fs2.cpp
@@ -74,6 +76,9 @@ make install DESTDIR=%{buildroot}
%{_libdir}/*.a
%changelog
+* Mon May 12 2014 Marcin Juszkiewicz <mjuszkiewicz at redhat.com> 0.9.8.1-4
+- Add AArch64 definitions where needed.
+
* Fri May 09 2014 Sergio Pascual <sergiopr at fedoraproject.org> 0.9.8.1-3
- Plugin directory has to be arch-dependent
More information about the scm-commits
mailing list