summaryrefslogtreecommitdiff
path: root/sysutils/sredird
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/sredird')
-rw-r--r--sysutils/sredird/Makefile4
-rw-r--r--sysutils/sredird/distinfo5
-rw-r--r--sysutils/sredird/patches/patch-Makefile11
-rw-r--r--sysutils/sredird/patches/patch-aa38
4 files changed, 48 insertions, 10 deletions
diff --git a/sysutils/sredird/Makefile b/sysutils/sredird/Makefile
index 5dd2385eb91..38743c2d787 100644
--- a/sysutils/sredird/Makefile
+++ b/sysutils/sredird/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2012/10/23 19:51:24 asau Exp $
+# $NetBSD: Makefile,v 1.10 2014/02/16 15:45:52 wiedi Exp $
#
DISTNAME= sredird-2.0.0
@@ -13,6 +13,8 @@ MAKE_FLAGS+= CC=${CC:Q} CFLAGS=${CFLAGS:M*:Q}
BUILD_TARGET= sredird
INSTALLATION_DIRS= libexec share/doc
+LDFLAGS.SunOS+= -lsocket -lnsl
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sredird ${DESTDIR}${PREFIX}/libexec/sredird
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/sredird.README
diff --git a/sysutils/sredird/distinfo b/sysutils/sredird/distinfo
index a8cc726cf82..6c86ab33a05 100644
--- a/sysutils/sredird/distinfo
+++ b/sysutils/sredird/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.3 2005/02/24 13:40:57 agc Exp $
+$NetBSD: distinfo,v 1.4 2014/02/16 15:45:52 wiedi Exp $
SHA1 (sredird-2.0.0.tar.gz) = 2eae6fb41b46ebf9f704dd997ef0a096e5084721
RMD160 (sredird-2.0.0.tar.gz) = d4e943b678b294c4e00350be817348d71b289912
Size (sredird-2.0.0.tar.gz) = 24053 bytes
-SHA1 (patch-aa) = 05c856220a89fe54666b0382d0f313f063789146
+SHA1 (patch-Makefile) = 8dff7071ec15fb7d58eef51e57938f5a1d51ec2f
+SHA1 (patch-aa) = fcae87128439b1fc6705703d473380df46dbcd7e
diff --git a/sysutils/sredird/patches/patch-Makefile b/sysutils/sredird/patches/patch-Makefile
new file mode 100644
index 00000000000..664c91daf73
--- /dev/null
+++ b/sysutils/sredird/patches/patch-Makefile
@@ -0,0 +1,11 @@
+$NetBSD: patch-Makefile,v 1.1 2014/02/16 15:45:52 wiedi Exp $
+
+add LDFLAGS
+--- Makefile.orig 2014-02-15 23:37:24.214914997 +0000
++++ Makefile
+@@ -7,4 +7,4 @@ CFLAGS=-O3 -m486 -pipe -fomit-frame-poin
+ SRC=sredird.c
+
+ sredird: sredird.c
+- $(CC) $(CFLAGS) -o sredird $(SRC)
++ $(CC) $(CFLAGS) -o sredird $(SRC) $(LDFLAGS)
diff --git a/sysutils/sredird/patches/patch-aa b/sysutils/sredird/patches/patch-aa
index 05b2fe21751..d7108b9ab2a 100644
--- a/sysutils/sredird/patches/patch-aa
+++ b/sysutils/sredird/patches/patch-aa
@@ -1,8 +1,16 @@
-$NetBSD: patch-aa,v 1.2 2004/09/28 22:14:04 tv Exp $
+$NetBSD: patch-aa,v 1.3 2014/02/16 15:45:52 wiedi Exp $
---- sredird.c.orig 2002-01-14 05:40:44.000000000 -0500
+--- sredird.c.orig 2002-01-14 10:40:44.000000000 +0000
+++ sredird.c
-@@ -82,9 +82,9 @@
+@@ -77,14 +77,17 @@
+ #include <sys/time.h>
+ #include <sys/times.h>
+ #include <sys/types.h>
++#if defined(__sun)
++#include <sys/filio.h>
++#endif
+ #include <sys/ioctl.h>
+ #include <signal.h>
#include <fcntl.h>
#include <syslog.h>
#include <termios.h>
@@ -13,7 +21,7 @@ $NetBSD: patch-aa,v 1.2 2004/09/28 22:14:04 tv Exp $
#include <netinet/ip.h>
#include <netinet/tcp.h>
-@@ -656,10 +656,14 @@ unsigned long int GetPortSpeed(int PortF
+@@ -656,10 +659,14 @@ unsigned long int GetPortSpeed(int PortF
return(57600UL);
case B115200:
return(115200UL);
@@ -28,7 +36,7 @@ $NetBSD: patch-aa,v 1.2 2004/09/28 22:14:04 tv Exp $
default:
return(0UL);
}
-@@ -1038,9 +1042,11 @@ void SetPortSpeed(int PortFd, unsigned l
+@@ -1038,9 +1045,11 @@ void SetPortSpeed(int PortFd, unsigned l
case 230400UL:
Speed = B230400;
break;
@@ -40,7 +48,7 @@ $NetBSD: patch-aa,v 1.2 2004/09/28 22:14:04 tv Exp $
default:
LogMsg(LOG_WARNING,"Unknwon baud rate requested, setting to 9600.");
Speed = B9600;
-@@ -1770,7 +1776,8 @@ int main(int argc, char * argv[])
+@@ -1770,7 +1779,8 @@ int main(int argc, char * argv[])
int SockParm;
/* Out buffer ticks count */
@@ -50,7 +58,23 @@ $NetBSD: patch-aa,v 1.2 2004/09/28 22:14:04 tv Exp $
/* Out buffer clock ticks limit */
clock_t MaxBTicks;
-@@ -1907,10 +1914,10 @@ int main(int argc, char * argv[])
+@@ -1882,7 +1892,15 @@ int main(int argc, char * argv[])
+ tcgetattr(DeviceFd,&PortSettings);
+
+ /* Set the serial port to raw mode */
++#if defined(__sun)
++ PortSettings.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
++ PortSettings.c_oflag &= ~OPOST;
++ PortSettings.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
++ PortSettings.c_cflag &= ~(CSIZE|PARENB);
++ PortSettings.c_cflag |= CS8;
++#else
+ cfmakeraw(&PortSettings);
++#endif
+
+ /* Enable HANGUP on close and disable modem control line handling */
+ PortSettings.c_cflag = (PortSettings.c_cflag | HUPCL) | CLOCAL;
+@@ -1907,10 +1925,10 @@ int main(int argc, char * argv[])
*/
SockParm = IPTOS_LOWDELAY;
setsockopt(STDIN_FILENO,SOL_SOCKET,SO_KEEPALIVE,&SockParmEnable,sizeof(SockParmEnable));