Update to 20141206.

This commit is contained in:
Kevin Lo 2014-12-08 06:32:39 +00:00
parent 854d5470a0
commit b9b11675cf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=374234
4 changed files with 14 additions and 59 deletions

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= librs232
PORTVERSION= 20140105
PORTVERSION= 20141206
CATEGORIES= comms
DISTNAME= RS-232
MASTER_SITES= http://www.teuniz.net/RS-232/
@ -10,19 +10,26 @@ MAINTAINER= kevlo@FreeBSD.org
COMMENT= Simple serial library
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/gpl.txt
WRKSRC= ${WRKDIR}
OPTIONS_DEFINE= DOCS
OPTIONS_DEFINE= DOCS EXAMPLES
USES= uidfix
USE_LDCONFIG= yes
PORTEXAMPLES= demo_rx.c demo_tx.c
post-extract:
@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc.txt ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for f in ${PORTEXAMPLES}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${EXAMPLESDIR}
.endfor
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (RS-232.tar.gz) = 6d0800639c1b72411591e02b99269509e9916ddfda8d9fc4f2e385d44916240e
SIZE (RS-232.tar.gz) = 11777
SHA256 (RS-232.tar.gz) = d515fb842dc3a67816aa238b2e45d2ede675be254f04c512f51077980f7b4b6a
SIZE (RS-232.tar.gz) = 12088

View File

@ -1,46 +1,6 @@
--- rs232.c.orig 2014-10-05 15:21:14.000000000 +0800
+++ rs232.c 2014-12-04 14:24:26.000000000 +0800
@@ -38,19 +38,23 @@
-#ifdef __linux__ /* Linux */
+#if defined(__linux__) || defined(__FreeBSD__)
-int Cport[30],
+int Cport[38],
error;
struct termios new_port_settings,
- old_port_settings[30];
+ old_port_settings[38];
-char comports[30][16]={"/dev/ttyS0","/dev/ttyS1","/dev/ttyS2","/dev/ttyS3","/dev/ttyS4","/dev/ttyS5",
- "/dev/ttyS6","/dev/ttyS7","/dev/ttyS8","/dev/ttyS9","/dev/ttyS10","/dev/ttyS11",
- "/dev/ttyS12","/dev/ttyS13","/dev/ttyS14","/dev/ttyS15","/dev/ttyUSB0",
- "/dev/ttyUSB1","/dev/ttyUSB2","/dev/ttyUSB3","/dev/ttyUSB4","/dev/ttyUSB5",
+char comports[38][16]={"/dev/cuau0", "/dev/cuau1", "/dev/cuau2", "/dev/cuau3",
+ "/dev/cuaU0", "/dev/cuaU1", "/dev/cuaU2", "/dev/cuaU3",
+ "/dev/ttyS0","/dev/ttyS1","/dev/ttyS2","/dev/ttyS3",
+ "/dev/ttyS4","/dev/ttyS5", "/dev/ttyS6","/dev/ttyS7",
+ "/dev/ttyS8","/dev/ttyS9","/dev/ttyS10","/dev/ttyS11",
+ "/dev/ttyS12","/dev/ttyS13","/dev/ttyS14","/dev/ttyS15",
+ "/dev/ttyUSB0", "/dev/ttyUSB1","/dev/ttyUSB2",
+ "/dev/ttyUSB3", "/dev/ttyUSB4","/dev/ttyUSB5",
"/dev/ttyAMA0","/dev/ttyAMA1","/dev/ttyACM0","/dev/ttyACM1",
"/dev/rfcomm0","/dev/rfcomm1","/dev/ircomm0","/dev/ircomm1"};
@@ -61,7 +65,7 @@
int baudr,
status;
- if((comport_number>29)||(comport_number<0))
+ if((comport_number>37)||(comport_number<0))
{
printf("illegal comport number\n");
return(1);
@@ -107,28 +111,6 @@
--- rs232.c.orig 2014-12-08 14:19:24.000000000 +0800
+++ rs232.c 2014-12-08 14:19:38.000000000 +0800
@@ -107,28 +107,6 @@
break;
case 460800 : baudr = B460800;
break;

View File

@ -1,12 +0,0 @@
--- rs232.h.orig 2014-12-04 14:17:08.000000000 +0800
+++ rs232.h 2014-12-04 14:17:22.000000000 +0800
@@ -45,8 +45,7 @@
#include <string.h>
-
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
#include <termios.h>
#include <sys/ioctl.h>