diff options
author | yuri <yuri@FreeBSD.org> | 2018-09-24 05:43:25 +0800 |
---|---|---|
committer | yuri <yuri@FreeBSD.org> | 2018-09-24 05:43:25 +0800 |
commit | d7e3cdbc4d9131455bfa25e5108be1296f82333d (patch) | |
tree | f1c618c6297a042ac062bad2928e131cb768ac10 /misc | |
parent | 2256672f1cfbebe2ceedb099374d9bf7586f0d7a (diff) | |
download | freebsd-ports-gnome-d7e3cdbc4d9131455bfa25e5108be1296f82333d.tar.gz freebsd-ports-gnome-d7e3cdbc4d9131455bfa25e5108be1296f82333d.tar.zst freebsd-ports-gnome-d7e3cdbc4d9131455bfa25e5108be1296f82333d.zip |
New port: misc/pyobd: OBD-II compliant car diagnostic tool
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile | 1 | ||||
-rw-r--r-- | misc/pyobd/Makefile | 45 | ||||
-rw-r--r-- | misc/pyobd/distinfo | 3 | ||||
-rw-r--r-- | misc/pyobd/files/patch-pyobd | 47 | ||||
-rw-r--r-- | misc/pyobd/files/patch-pyobd.desktop | 16 | ||||
-rw-r--r-- | misc/pyobd/pkg-descr | 12 | ||||
-rw-r--r-- | misc/pyobd/pkg-message | 15 | ||||
-rw-r--r-- | misc/pyobd/pkg-plist | 12 |
8 files changed, 151 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile index aa4e04a6a347..9e2f9e50c864 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -445,6 +445,7 @@ SUBDIR += py-tqdm SUBDIR += py-yolk SUBDIR += pylize + SUBDIR += pyobd SUBDIR += qbrew SUBDIR += qlas SUBDIR += qmetro diff --git a/misc/pyobd/Makefile b/misc/pyobd/Makefile new file mode 100644 index 000000000000..87b2999ff326 --- /dev/null +++ b/misc/pyobd/Makefile @@ -0,0 +1,45 @@ +# $FreeBSD$ + +PORTNAME= pyobd +DISTVERSION= 0.9.3 +CATEGORIES= misc +MASTER_SITES= http://www.obdtester.com/download/ +DISTNAME= pyobd_${PORTVERSION} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= OBD-II compliant car diagnostic tool + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= convert:graphics/ImageMagick +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}serial>0:comms/py-serial@${PY_FLAVOR} + +USES= dos2unix gnome python:2.7 shebangfix +DOS2UNIX_FILES= ${PORTNAME}.desktop +SHEBANG_FILES= ${PORTNAME} +USE_WX= 3.0 +WX_COMPS= python + +INSTALLS_ICONS= yes + +NO_ARCH= yes + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +do-build: + @convert ${WRKSRC}/${PORTNAME}.gif ${WRKSRC}/${PORTNAME}.png + +do-install: + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop \ + ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop + @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/32x32/apps + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/32x32/apps/${PORTNAME}.png + @${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME} ${WRKSRC}/*.py ${WRKSRC}/*.pyc \ + ${STAGEDIR}${DATADIR} + @${CHMOD} +x ${STAGEDIR}${DATADIR}/${PORTNAME} + @${LN} -sf ../share/${PORTNAME}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + +.include <bsd.port.mk> diff --git a/misc/pyobd/distinfo b/misc/pyobd/distinfo new file mode 100644 index 000000000000..537284ea2fd5 --- /dev/null +++ b/misc/pyobd/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1468366650 +SHA256 (pyobd_0.9.3.tar.gz) = f3004db4000e2bc166aae3b4342c98aa62f74f3372c5829472af0ee56c5e110c +SIZE (pyobd_0.9.3.tar.gz) = 768154 diff --git a/misc/pyobd/files/patch-pyobd b/misc/pyobd/files/patch-pyobd new file mode 100644 index 000000000000..a65d6c4f978c --- /dev/null +++ b/misc/pyobd/files/patch-pyobd @@ -0,0 +1,47 @@ +--- pyobd.orig 2015-04-21 10:02:41 UTC ++++ pyobd +@@ -356,7 +356,7 @@ class MyApp(wx.App): + else: + self.configfilepath=os.environ['HOME']+'/.pyobdrc' + if self.config.read(self.configfilepath)==[]: +- self.COMPORT="/dev/ttyACM0" ++ self.COMPORT="/dev/ttyU0" + self.RECONNATTEMPTS=5 + self.SERTIMEOUT=2 + else: +@@ -592,34 +592,7 @@ the Free Software Foundation, Inc., 59 T + def scanSerial(self): + """scan for available ports. return a list of serial names""" + available = [] +- for i in range(256): +- try: #scan standart ttyS* +- s = serial.Serial(i) +- available.append(s.portstr) +- s.close() # explicit close 'cause of delayed GC in java +- except serial.SerialException: +- pass +- for i in range(256): +- try: #scan USB ttyACM +- s = serial.Serial("/dev/ttyACM"+str(i)) +- available.append(s.portstr) +- s.close() # explicit close 'cause of delayed GC in java +- except serial.SerialException: +- pass +- for i in range(256): +- try: +- s = serial.Serial("/dev/ttyUSB"+str(i)) +- available.append(s.portstr) +- s.close() # explicit close 'cause of delayed GC in java +- except serial.SerialException: +- pass +- for i in range(256): +- try: +- s = serial.Serial("/dev/ttyd"+str(i)) +- available.append(s.portstr) +- s.close() # explicit close 'cause of delayed GC in java +- except serial.SerialException: +- pass ++ available.append("/dev/ttyU0") + + # ELM-USB shows up as /dev/tty.usbmodemXXXX, where XXXX is a changing hex string + # on connection; so we have to search through all 64K options diff --git a/misc/pyobd/files/patch-pyobd.desktop b/misc/pyobd/files/patch-pyobd.desktop new file mode 100644 index 000000000000..d70f1d2b4b5c --- /dev/null +++ b/misc/pyobd/files/patch-pyobd.desktop @@ -0,0 +1,16 @@ +--- pyobd.desktop.orig 2016-07-21 17:05:31 UTC ++++ pyobd.desktop +@@ -1,9 +1,10 @@ + [Desktop Entry] + Encoding=UTF8 +-Icon=/usr/share/pyobd/pyobd.gif +-Name=pyOBD: OBD2 Diagnostics ++Icon=pyOBD ++Name=pyOBD ++GenericName=OBD2 Diagnostics + Comment=Car On-Board 2 vehicle diagnostics (ELM-32x compatible interface) +-Exec=python /usr/bin/pyobd ++Exec=pyobd + Terminal=false + Type=Application + Categories=Utility; diff --git a/misc/pyobd/pkg-descr b/misc/pyobd/pkg-descr new file mode 100644 index 000000000000..938ed77d70ff --- /dev/null +++ b/misc/pyobd/pkg-descr @@ -0,0 +1,12 @@ +pyOBD (aka pyOBD-II or pyOBD2) is an OBD-II compliant car diagnostic tool. +It is designed to interface with low-cost ELM 32x OBD-II diagnostic interfaces +such as ELM-USB. It will basically allow you to talk to your car's ECU, ... +display fault codes, display measured values, read status tests, etc. All cars +made since 1996 (in the US) or 2001 (in the EU) must be OBD-II compliant, i.e. +they should work with pyOBD. + +pyOBD is written entirely in Python and was originally written by Donour +Sizemore, now maintained and improved by SECONS Ltd. and it is Free Software +and is distributed under the terms of the GPL. + +WWW: http://www.obdtester.com/pyobd diff --git a/misc/pyobd/pkg-message b/misc/pyobd/pkg-message new file mode 100644 index 000000000000..f2cd139a0f8d --- /dev/null +++ b/misc/pyobd/pkg-message @@ -0,0 +1,15 @@ +====================================================================== +You installed pyOBD: OBD-II compliant car diagnostic tool. + +pyOBD expects the device /dev/ttyU0 that should be created when you +connect the OBD-II cable. + +You need these lines in /etc/devfs.rules to make the device readable +and writable by you. If your user is in the group users: + +[localrules=5] +add path 'ttyU*' mode 0660 group users + +You also need this line in /etc/rc.conf to allow localrules to take effect: +devfs_system_ruleset="localrules" +====================================================================== diff --git a/misc/pyobd/pkg-plist b/misc/pyobd/pkg-plist new file mode 100644 index 000000000000..bdc1d1ef8586 --- /dev/null +++ b/misc/pyobd/pkg-plist @@ -0,0 +1,12 @@ +bin/pyobd +share/applications/pyobd.desktop +share/icons/hicolor/32x32/apps/pyobd.png +%%DATADIR%%/debugEvent.py +%%DATADIR%%/debugEvent.pyc +%%DATADIR%%/obd2_codes.py +%%DATADIR%%/obd2_codes.pyc +%%DATADIR%%/obd_io.py +%%DATADIR%%/obd_io.pyc +%%DATADIR%%/obd_sensors.py +%%DATADIR%%/obd_sensors.pyc +%%DATADIR%%/pyobd |