Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Dec 2014 06:49:58 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r373861 - in head/comms: . librs232 librs232/files
Message-ID:  <201412040649.sB46nwxV028463@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Thu Dec  4 06:49:58 2014
New Revision: 373861
URL: https://svnweb.freebsd.org/changeset/ports/373861
QAT: https://qat.redports.org/buildarchive/r373861/

Log:
  Import librs232.
  
  Librs232 is a library which provides common interface to rs232 serial
  interface communication.

Added:
  head/comms/librs232/
  head/comms/librs232/Makefile   (contents, props changed)
  head/comms/librs232/distinfo   (contents, props changed)
  head/comms/librs232/files/
  head/comms/librs232/files/Makefile   (contents, props changed)
  head/comms/librs232/files/patch-rs232.c   (contents, props changed)
  head/comms/librs232/files/patch-rs232.h   (contents, props changed)
  head/comms/librs232/pkg-descr   (contents, props changed)
  head/comms/librs232/pkg-plist   (contents, props changed)
Modified:
  head/comms/Makefile

Modified: head/comms/Makefile
==============================================================================
--- head/comms/Makefile	Thu Dec  4 05:40:55 2014	(r373860)
+++ head/comms/Makefile	Thu Dec  4 06:49:58 2014	(r373861)
@@ -80,6 +80,7 @@
     SUBDIR += libimobiledevice
     SUBDIR += libirman
     SUBDIR += libmodbus
+    SUBDIR += librs232
     SUBDIR += libticables2
     SUBDIR += libticalcs2
     SUBDIR += libusbmuxd

Added: head/comms/librs232/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/librs232/Makefile	Thu Dec  4 06:49:58 2014	(r373861)
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME=	librs232
+PORTVERSION=	20140105
+CATEGORIES=	comms
+DISTNAME=	RS-232
+MASTER_SITES=	http://www.teuniz.net/RS-232/
+
+MAINTAINER=	kevlo@FreeBSD.org
+COMMENT=	Simple serial library
+
+LICENSE=	GPLv2
+
+WRKSRC=		${WRKDIR}
+
+OPTIONS_DEFINE=	DOCS
+
+USES=		uidfix
+USE_LDCONFIG=	yes
+
+post-extract:
+	@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
+
+post-install:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/doc.txt ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>

Added: head/comms/librs232/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/librs232/distinfo	Thu Dec  4 06:49:58 2014	(r373861)
@@ -0,0 +1,2 @@
+SHA256 (RS-232.tar.gz) = 6d0800639c1b72411591e02b99269509e9916ddfda8d9fc4f2e385d44916240e
+SIZE (RS-232.tar.gz) = 11777

Added: head/comms/librs232/files/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/librs232/files/Makefile	Thu Dec  4 06:49:58 2014	(r373861)
@@ -0,0 +1,18 @@
+# BSD Makefile for librs232
+#
+# $FreeBSD$
+#
+
+SRCS=	rs232.c
+
+# Includes
+INCS=	rs232.h
+INCSDIR=${PREFIX}/include
+
+# Libraries
+LIB=	rs232
+SHLIB_MAJOR=	1
+LIBDIR=	${PREFIX}/lib
+NO_PROFILE=	YES
+
+.include <bsd.lib.mk>

Added: head/comms/librs232/files/patch-rs232.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/librs232/files/patch-rs232.c	Thu Dec  4 06:49:58 2014	(r373861)
@@ -0,0 +1,71 @@
+--- 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 @@
+                    break;
+     case  460800 : baudr = B460800;
+                    break;
+-    case  500000 : baudr = B500000;
+-                   break;
+-    case  576000 : baudr = B576000;
+-                   break;
+-    case  921600 : baudr = B921600;
+-                   break;
+-    case 1000000 : baudr = B1000000;
+-                   break;
+-    case 1152000 : baudr = B1152000;
+-                   break;
+-    case 1500000 : baudr = B1500000;
+-                   break;
+-    case 2000000 : baudr = B2000000;
+-                   break;
+-    case 2500000 : baudr = B2500000;
+-                   break;
+-    case 3000000 : baudr = B3000000;
+-                   break;
+-    case 3500000 : baudr = B3500000;
+-                   break;
+-    case 4000000 : baudr = B4000000;
+-                   break;
+     default      : printf("invalid baudrate\n");
+                    return(1);
+                    break;

Added: head/comms/librs232/files/patch-rs232.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/librs232/files/patch-rs232.h	Thu Dec  4 06:49:58 2014	(r373861)
@@ -0,0 +1,12 @@
+--- 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>

Added: head/comms/librs232/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/librs232/pkg-descr	Thu Dec  4 06:49:58 2014	(r373861)
@@ -0,0 +1,4 @@
+Librs232 is a library which provides common interface to rs232 serial 
+interface communication.
+
+WWW: http://www.teuniz.net/RS-232/

Added: head/comms/librs232/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/librs232/pkg-plist	Thu Dec  4 06:49:58 2014	(r373861)
@@ -0,0 +1,5 @@
+include/rs232.h
+lib/librs232.a
+lib/librs232.so
+lib/librs232.so.1
+%%PORTDOCS%%%%DOCSDIR%%/doc.txt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412040649.sB46nwxV028463>