aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2009-05-08 20:00:40 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2009-05-08 20:00:40 +0800
commit1833d61bad7ebe02534914e939d9a099446faa1f (patch)
tree85127dd73eaba57e6e3efbeb9666bbf1975deb7c
parent28ee90a2ea1e5ee08c4596c3244152d99f167fae (diff)
downloadfreebsd-ports-gnome-1833d61bad7ebe02534914e939d9a099446faa1f.tar.gz
freebsd-ports-gnome-1833d61bad7ebe02534914e939d9a099446faa1f.tar.zst
freebsd-ports-gnome-1833d61bad7ebe02534914e939d9a099446faa1f.zip
- Fix FMSPIC serial interface configuration problems
Submitted by: Erkki Moorits <erkki dot moorits at mail dot ee>
-rw-r--r--games/crrcsim/Makefile1
-rw-r--r--games/crrcsim/files/patch-src-mod_inputdev-inputdev_serial-inputdev_serial.cpp45
2 files changed, 46 insertions, 0 deletions
diff --git a/games/crrcsim/Makefile b/games/crrcsim/Makefile
index 6a29edc8e334..d080e48c0744 100644
--- a/games/crrcsim/Makefile
+++ b/games/crrcsim/Makefile
@@ -7,6 +7,7 @@
PORTNAME= crrcsim
PORTVERSION= 0.9.10
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= BERLIOS
diff --git a/games/crrcsim/files/patch-src-mod_inputdev-inputdev_serial-inputdev_serial.cpp b/games/crrcsim/files/patch-src-mod_inputdev-inputdev_serial-inputdev_serial.cpp
new file mode 100644
index 000000000000..7c21aecd376f
--- /dev/null
+++ b/games/crrcsim/files/patch-src-mod_inputdev-inputdev_serial-inputdev_serial.cpp
@@ -0,0 +1,45 @@
+--- src/mod_inputdev/inputdev_serial/inputdev_serial.cpp.orig 2009-03-07 18:41:23.000000000 +0200
++++ src/mod_inputdev/inputdev_serial/inputdev_serial.cpp 2009-04-11 13:08:44.939571159 +0300
+@@ -44,6 +44,8 @@
+
+ #ifdef WIN32
+ #define DEFAULT_PORT_NAME "COM1"
++#elif defined (__FreeBSD__)
++#define DEFAULT_PORT_NAME "/dev/cuad0"
+ #else
+ #define DEFAULT_PORT_NAME "/dev/ttyS0"
+ #endif
+@@ -444,11 +446,19 @@
+ #else
+ // --- implementation for other OSes ----------------------------------------
+ #ifdef OLD_WAY
++#if defined (__FreeBSD__)
++ const char* serialDevs[] = {"/dev/cuad0", "/dev/cuad1",
++ "/dev/cuad2", "/dev/cuad3",
++ "/dev/cuaU0", "/dev/cuaU1",
++ "/dev/cuaU2", "/dev/cuaU3",
++ NULL};
++#else
+ const char* serialDevs[] = {"/dev/ttyS0", "/dev/ttyS1",
+ "/dev/ttyS2", "/dev/ttyS3",
+ "/dev/ttyUSB0", "/dev/ttyUSB1",
+ "/dev/ttyUSB2", "/dev/ttyUSB3",
+ NULL};
++#endif
+ const char** ptr;
+
+ for (ptr = serialDevs; *ptr != NULL; ptr++)
+@@ -459,8 +469,13 @@
+ // look for some well-known names in /dev/
+ std::vector<std::string> serialDevs;
+ std::string sPath = "/dev";
++#if defined (__FreeBSD__)
++ serialDevs.push_back("cuad");
++ serialDevs.push_back("cuaU");
++#else
+ serialDevs.push_back("ttyS");
+ serialDevs.push_back("ttyUSB");
++#endif
+
+ ulDir *dir = ulOpenDir(sPath.c_str());
+ if (dir != NULL)