Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Dec 2010 12:20:12 GMT
From:      Stefan Bethke <stb@lassitu.de>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/153452: New port: science/py-ws2300 A driver for the LaCrosse WS-2300 weather station
Message-ID:  <201012261220.oBQCKCVp054482@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/153452; it has been noted by GNATS.

From: Stefan Bethke <stb@lassitu.de>
To: FreeBSD-gnats-submit@FreeBSD.org,
 freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/153452: New port: science/py-ws2300 A driver for the LaCrosse WS-2300 weather station
Date: Sun, 26 Dec 2010 13:14:55 +0100

 --Apple-Mail-1--621600839
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 I forgot a patch. Here's the complete SHAR with the patch included.
 
 
 --Apple-Mail-1--621600839
 Content-Disposition: attachment;
 	filename=py-ws2300.shar
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="py-ws2300.shar"
 Content-Transfer-Encoding: 7bit
 
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	py-ws2300
 #	py-ws2300/distinfo
 #	py-ws2300/pkg-plist
 #	py-ws2300/Makefile
 #	py-ws2300/files
 #	py-ws2300/files/ws2300
 #	py-ws2300/files/patch-ws2300.py
 #	py-ws2300/pkg-descr
 #
 echo c - py-ws2300
 mkdir -p py-ws2300 > /dev/null 2>&1
 echo x - py-ws2300/distinfo
 sed 's/^X//' >py-ws2300/distinfo << 'd6658d0e9f20f34fad70eb0626cb729c'
 XSHA256 (ws2300-1.3.tar.gz) = f824943f04791d63fc5edd940a60181bde2c8f575c11be1e473036fce76c7eef
 XSIZE (ws2300-1.3.tar.gz) = 63738
 d6658d0e9f20f34fad70eb0626cb729c
 echo x - py-ws2300/pkg-plist
 sed 's/^X//' >py-ws2300/pkg-plist << 'f76cabf254af03cfc8bad852c78c288d'
 X%%PYTHON_SITELIBDIR%%/ws2300.py
 X%%PYTHON_SITELIBDIR%%/ws2300.pyc
 X%%PYTHON_SITELIBDIR%%/ws2300.pyo
 Xbin/ws2300
 f76cabf254af03cfc8bad852c78c288d
 echo x - py-ws2300/Makefile
 sed 's/^X//' >py-ws2300/Makefile << '7a0b06e1c53503f2c69695bf7d7531a7'
 X# New ports collection makefile for:	py-ws2300
 X# Date created:				26 December 2010
 X# Whom:					Stefan Bethke <stb@lassitu.de>
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=	ws2300
 XPORTVERSION=	1.3
 XCATEGORIES=	science python
 XMASTER_SITES=	http://ace-host.stuart.id.au/russell/files/ws2300/ \
 X		http://www.transit.hanse.de/mirror/ace-host.stuart.id.au/russell/files/ws2300/
 XPKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 X#DISTNAME=	pydns-${PORTVERSION}
 X
 XMAINTAINER=	stb@lassitu.de
 XCOMMENT=	A driver for the LaCrosse WS-2300 weather station
 X
 XUSE_PYTHON=	yes
 XUSE_PYDISTUTILS=	yes
 X#PYDISTUTILS_PKGNAME=	x
 X
 XMAN1=	ws2300.1
 X
 Xpost-install:
 X	#@${LN} -sf ${PYTHONPREFIX_SITELIBDIR}/ws2300.py ${PREFIX}/bin/ws2300
 X	@${INSTALL_SCRIPT} ${FILESDIR}/ws2300 ${PREFIX}/bin/ws2300
 X	@${INSTALL_MAN} ${WRKSRC}/ws2300.1 ${PREFIX}/man/man1/
 X
 X.include <bsd.port.mk>
 7a0b06e1c53503f2c69695bf7d7531a7
 echo c - py-ws2300/files
 mkdir -p py-ws2300/files > /dev/null 2>&1
 echo x - py-ws2300/files/ws2300
 sed 's/^X//' >py-ws2300/files/ws2300 << '02cea18e519bd17929d719270a34d8f7'
 X#!/usr/bin/env python
 X
 Xfrom ws2300 import *
 Xmain(sys.argv)
 02cea18e519bd17929d719270a34d8f7
 echo x - py-ws2300/files/patch-ws2300.py
 sed 's/^X//' >py-ws2300/files/patch-ws2300.py << '84061ef936654111515b41c19f08d83c'
 X--- ws2300.py.orig	2008-02-09 01:05:06.000000000 +0100
 X+++ ws2300.py	2010-12-26 13:09:04.204179367 +0100
 X@@ -26,15 +26,16 @@
 X import math
 X import optparse
 X import os
 X-import popen2
 X import select
 X import signal
 X import socket
 X import stat
 X import string
 X import struct
 X+import subprocess
 X import sys
 X import syslog
 X+import termios
 X import traceback
 X import time
 X import tty
 X@@ -182,7 +183,10 @@
 X       setup[6][tty.VMIN] = 1
 X       setup[6][tty.VTIME] = 0
 X       tty.tcflush(self.serial_port, tty.TCIOFLUSH)
 X-      tty.tcflow(self.serial_port, tty.TCOON|tty.TCION)
 X+      try:
 X+        tty.tcflow(self.serial_port, tty.TCOON|tty.TCION)
 X+      except termios.error:
 X+        pass
 X       tty.tcsetattr(self.serial_port, tty.TCSAFLUSH, setup)
 X       #
 X       # Set DTR low and RTS high and leave other control lines untouched.
 X@@ -2714,9 +2718,9 @@
 X # If some sort of error occurred, send an email.
 X #
 X def email_fatal(me, email, lines):
 X-  stdout, stdin = popen2.popen2("/usr/sbin/sendmail -t")
 X-  stdout.close()
 X-  w = lambda s: stdin.write(s + "\n")
 X+  p = subprocess.Popen(["/usr/sbin/sendmail", "-t"],
 X+    stdin=subprocess.PIPE, close_fds=True)
 X+  w = lambda s: p.stdin.write(s + "\n")
 X   if not isinstance(email, (type(()), type([]))):
 X     email = [email]
 X   w("To: " + ",".join(email))
 X@@ -2730,7 +2734,7 @@
 X   w("Regards,")
 X   w(me)
 X   w("Running on " + socket.gethostname())
 X-  stdin.close()
 X+  p.stdin.close()
 X 
 X #
 X # Daemon mode recording.
 84061ef936654111515b41c19f08d83c
 echo x - py-ws2300/pkg-descr
 sed 's/^X//' >py-ws2300/pkg-descr << '008ccc22a6abb8405cc79d0e3f0a0ef6'
 XWs2300 manipulates the LaCrosse WS-2300 weather station via its RS232
 Xinterface. It can read and write values, and can continuously log data from
 XWS-2300 to a file or SQL database.
 X
 XWWW: http://ace-host.stuart.id.au/russell/files/ws2300/
 008ccc22a6abb8405cc79d0e3f0a0ef6
 exit
 
 
 --Apple-Mail-1--621600839
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 
 -- 
 Stefan Bethke <stb@lassitu.de>   Fon +49 151 14070811
 
 
 
 
 --Apple-Mail-1--621600839--



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