From 4ff4d599828158f74509ba07acc7952190c4eebf Mon Sep 17 00:00:00 2001 From: Sergey Matveychuk Date: Sun, 27 Nov 2005 07:40:51 +0000 Subject: [PATCH] - Fix serial ports name for FreeBSD >= 6.0 PR: ports/89282 Reported by: Karsten Thygesen --- comms/ruby-serialport/Makefile | 1 + .../ruby-serialport/files/patch-serialport.c | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 comms/ruby-serialport/files/patch-serialport.c diff --git a/comms/ruby-serialport/Makefile b/comms/ruby-serialport/Makefile index a6f9b6f0edf0..55f22b35c7fa 100644 --- a/comms/ruby-serialport/Makefile +++ b/comms/ruby-serialport/Makefile @@ -7,6 +7,7 @@ PORTNAME= serialport PORTVERSION= 0.6 +PORTREVISION= 1 CATEGORIES= comms ruby MASTER_SITES= http://rubyforge.org/frs/download.php/72/ PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX} diff --git a/comms/ruby-serialport/files/patch-serialport.c b/comms/ruby-serialport/files/patch-serialport.c new file mode 100644 index 000000000000..1830a5874f34 --- /dev/null +++ b/comms/ruby-serialport/files/patch-serialport.c @@ -0,0 +1,27 @@ +--- serialport.c.orig Sun Nov 27 10:28:52 2005 ++++ serialport.c Sun Nov 27 10:35:17 2005 +@@ -20,6 +20,10 @@ + #include /* ruby inclusion */ + #include /* ruby io inclusion */ + ++#if defined (freebsd) ++#include ++#endif ++ + struct modem_params { + int data_rate; + int data_bits; +@@ -569,9 +573,12 @@ + #if defined(linux) || defined(cygwin) + "/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3", + "/dev/ttyS4", "/dev/ttyS5", "/dev/ttyS6", "/dev/ttyS7" +-#elif defined(freebsd) || defined(netbsd) || defined(openbsd) ++#elif (defined(freebsd) && __FreeBSD_version < 600006) || defined(netbsd) || defined(openbsd) + "/dev/cuaa0", "/dev/cuaa1", "/dev/cuaa2", "/dev/cuaa3", + "/dev/cuaa4", "/dev/cuaa5", "/dev/cuaa6", "/dev/cuaa7" ++#elif (defined(freebsd) && __FreeBSD_version >= 600006) ++ "/dev/cuad0", "/dev/cuad1", "/dev/cuad2", "/dev/cuad3", ++ "/dev/cuad4", "/dev/cuad5", "/dev/cuad6", "/dev/cuad7" + #elif defined(solaris) + "/dev/ttya", "/dev/ttyb", "/dev/ttyc", "/dev/ttyd", + "/dev/ttye", "/dev/ttyf", "/dev/ttyg", "/dev/ttyh"