diff options
author | makc <makc@FreeBSD.org> | 2015-10-14 04:35:29 +0800 |
---|---|---|
committer | makc <makc@FreeBSD.org> | 2015-10-14 04:35:29 +0800 |
commit | dfbaba426b5b8acebfda59e9cfdf4553cd97a26e (patch) | |
tree | a147b5e1f619ef882d436132221e8ec3a9a8fcfb /comms | |
parent | bb624c5b71115fea23c95c2513080d24ce7ddf69 (diff) | |
download | freebsd-ports-graphics-dfbaba426b5b8acebfda59e9cfdf4553cd97a26e.tar.gz freebsd-ports-graphics-dfbaba426b5b8acebfda59e9cfdf4553cd97a26e.tar.zst freebsd-ports-graphics-dfbaba426b5b8acebfda59e9cfdf4553cd97a26e.zip |
comms/py-serial:
- Use options helpers
- Fix packaging with python3
- Add patch to make tools.list_ports usable on FreeBSD (committed upstream)
PR: 202887
Approved by: sbz (maintainer timeout 5 weeks)
Diffstat (limited to 'comms')
-rw-r--r-- | comms/py-serial/Makefile | 13 | ||||
-rw-r--r-- | comms/py-serial/files/patch-serial_tools_list__ports__posix.py | 11 |
2 files changed, 18 insertions, 6 deletions
diff --git a/comms/py-serial/Makefile b/comms/py-serial/Makefile index df96188749d..0fdc01c7396 100644 --- a/comms/py-serial/Makefile +++ b/comms/py-serial/Makefile @@ -3,6 +3,7 @@ PORTNAME= serial PORTVERSION= 2.7 +PORTREVISION= 1 CATEGORIES= comms python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,18 +12,18 @@ DISTNAME= py${PORTNAME}-${PORTVERSION} MAINTAINER= sbz@FreeBSD.org COMMENT= Serial port encapsulation library for Python -USES= python -USE_PYTHON= distutils pythonprefix +USES= dos2unix python +USE_PYTHON= concurrent distutils py3kplist pythonprefix PYDISTUTILS_PKGNAME= py${PORTNAME} - -DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} -EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} +DOS2UNIX_FILES= serial/tools/list_ports_posix.py OPTIONS_DEFINE= DOCS EXAMPLES -post-install: +do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/*.txt ${STAGEDIR}${DOCSDIR} + +do-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR} diff --git a/comms/py-serial/files/patch-serial_tools_list__ports__posix.py b/comms/py-serial/files/patch-serial_tools_list__ports__posix.py new file mode 100644 index 00000000000..92fb9f24730 --- /dev/null +++ b/comms/py-serial/files/patch-serial_tools_list__ports__posix.py @@ -0,0 +1,11 @@ +--- serial/tools/list_ports_posix.py.orig 2013-10-12 03:43:18 UTC ++++ serial/tools/list_ports_posix.py +@@ -43,7 +43,7 @@ elif plat[:3] == 'bsd' or \ + plat[:7] == 'freebsd': + + def comports(): +- devices = glob.glob('/dev/cuad*') ++ devices = glob.glob('/dev/cua*[!.init][!.lock]') + return [(d, d, d) for d in devices] + + elif plat[:6] == 'darwin': # OS X (confirmed) |