[crrcsim/f18] fix build on platforms without io.h

Dan Horák sharkcz at fedoraproject.org
Fri Feb 1 11:45:59 UTC 2013


commit d2ea5cc37b09e6c55c8b70613f9b2ac812defad8
Author: Dan Horák <dan at danny.cz>
Date:   Fri Feb 1 12:45:24 2013 +0100

    fix build on platforms without io.h

 crrcsim-0.9.12-no-io-h.patch |   26 ++++++++++++++++++++++++++
 crrcsim.spec                 |    7 ++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/crrcsim-0.9.12-no-io-h.patch b/crrcsim-0.9.12-no-io-h.patch
new file mode 100644
index 0000000..3534c9a
--- /dev/null
+++ b/crrcsim-0.9.12-no-io-h.patch
@@ -0,0 +1,26 @@
+diff -up crrcsim-0.9.12/src/mod_inputdev/inputdev_parallel/inputdev_parallel.cpp.ioh crrcsim-0.9.12/src/mod_inputdev/inputdev_parallel/inputdev_parallel.cpp
+--- crrcsim-0.9.12/src/mod_inputdev/inputdev_parallel/inputdev_parallel.cpp.ioh	2013-02-01 12:18:32.000000000 +0100
++++ crrcsim-0.9.12/src/mod_inputdev/inputdev_parallel/inputdev_parallel.cpp	2013-02-01 12:19:52.000000000 +0100
+@@ -28,16 +28,16 @@
+ #if defined(__APPLE__) || defined(MACOSX)
+ #else
+ #  if defined(WIN32)
+-#  elif defined(__powerpc__)
+-#    define ioperm(a,b,c) -1
+-#    define inb(a) 0
+-#    define outb(a,b)
+ #  else   // Linux
+-#    ifdef HAVE_SYS_IO_H
++#    if defined(HAVE_SYS_IO_H)
+ #     include <sys/io.h>
+-#    else
++#    elif defined(HAVE_ASM_IO_H)
+ #     include <unistd.h>
+ #     include <asm/io.h>
++#    else
++#     define ioperm(a,b,c) -1
++#     define inb(a) 0
++#     define outb(a,b)
+ #    endif
+ #  endif
+ #endif  // __APPLE__
diff --git a/crrcsim.spec b/crrcsim.spec
index 183ae55..5cd531e 100644
--- a/crrcsim.spec
+++ b/crrcsim.spec
@@ -1,11 +1,12 @@
 Name:          crrcsim
 Version:       0.9.12
-Release:       2%{?dist}
+Release:       3%{?dist}
 Group:         Amusements/Games
 Summary:       Model-Airplane Flight Simulation Program
 License:       GPLv2
 URL:           http://sourceforge.net/apps/mediawiki/crrcsim/
 Source0:       http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Patch0:        %{name}-0.9.12-no-io-h.patch
 
 
 # It is only meant for development purposes.
@@ -52,6 +53,7 @@ Documentation for %{name} package.
 
 %prep
 %setup -q
+%patch0 -p1 -b .no-io-h
 
 # Correct EOL.
 for i in \
@@ -153,6 +155,9 @@ rm -f %{buildroot}%{_datadir}/%{name}/icons/%{name}.{ico,xpm}
 
 
 %changelog
+* Fri Feb 01 2013 Dan Horák <dan[at]danny.cz> - 0.9.12-3
+- fix build on platforms without io.h
+
 * Tue Jan 29 2013 Damian Wrobel <dwrobel at ertelnet.rybnik.pl> - 0.9.12-2
 - doc subpackage BuildArch adn Requires corrected.
 


More information about the scm-commits mailing list