diff options
author | Oleksii Samorukov <samm@FreeBSD.org> | 2020-05-03 13:20:06 +0000 |
---|---|---|
committer | Oleksii Samorukov <samm@FreeBSD.org> | 2020-05-03 13:20:06 +0000 |
commit | 37d055a90b12d6dc9776a5c7502fdd41f5f2ba7e (patch) | |
tree | 3f45208bf476b43f2180bc6d0e226cc5509c2741 /comms | |
parent | b5e30f49094ee3ea3bdd9b5106ed7f45c4e8f30c (diff) | |
download | ports-37d055a90b12d6dc9776a5c7502fdd41f5f2ba7e.tar.gz ports-37d055a90b12d6dc9776a5c7502fdd41f5f2ba7e.zip |
Notes
Diffstat (limited to 'comms')
-rw-r--r-- | comms/ebusd/Makefile | 2 | ||||
-rw-r--r-- | comms/ebusd/distinfo | 6 | ||||
-rw-r--r-- | comms/ebusd/files/patch-configure.ac | 8 | ||||
-rw-r--r-- | comms/ebusd/files/patch-src_lib_ebus_device.cpp | 59 | ||||
-rw-r--r-- | comms/ebusd/files/patch-src_lib_ebus_device.h | 10 | ||||
-rw-r--r-- | comms/ebusd/files/patch-src_lib_utils_tcpsocket.h | 10 |
6 files changed, 4 insertions, 91 deletions
diff --git a/comms/ebusd/Makefile b/comms/ebusd/Makefile index 4c77010012bf..7d45d5850a38 100644 --- a/comms/ebusd/Makefile +++ b/comms/ebusd/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= ebusd -PORTVERSION= 3.3 +PORTVERSION= 3.4 DISTVERSIONPREFIX= v CATEGORIES= comms diff --git a/comms/ebusd/distinfo b/comms/ebusd/distinfo index 9a792aad2502..77378349988a 100644 --- a/comms/ebusd/distinfo +++ b/comms/ebusd/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1569925578 -SHA256 (john30-ebusd-v3.3_GH0.tar.gz) = 48669140cfafbe060c765b4530018b30f07e1b074dbce00b205a8f2a22dee573 -SIZE (john30-ebusd-v3.3_GH0.tar.gz) = 696172 +TIMESTAMP = 1588504293 +SHA256 (john30-ebusd-v3.4_GH0.tar.gz) = 38d69e8687ab98cd6cfcadc6ca1b1949ce29a0efa51f82e3e38777a1f99b28ae +SIZE (john30-ebusd-v3.4_GH0.tar.gz) = 462066 diff --git a/comms/ebusd/files/patch-configure.ac b/comms/ebusd/files/patch-configure.ac index 4755d534dcd2..1ccde321b677 100644 --- a/comms/ebusd/files/patch-configure.ac +++ b/comms/ebusd/files/patch-configure.ac @@ -1,13 +1,5 @@ --- configure.ac.orig 2018-12-26 15:38:15 UTC +++ configure.ac -@@ -36,6 +36,7 @@ AC_SUBST(EXTRA_LIBS) - AC_CHECK_FUNC([pselect], [AC_DEFINE(HAVE_PSELECT, [1], [Defined if pselect() is available.])]) - AC_CHECK_FUNC([ppoll], [AC_DEFINE(HAVE_PPOLL, [1], [Defined if ppoll() is available.])]) - AC_CHECK_HEADER([linux/serial.h], [AC_DEFINE(HAVE_LINUX_SERIAL, [1], [Defined if linux/serial.h is available.])]) -+AC_CHECK_HEADER([dev/usb/uftdiio.h], [AC_DEFINE(HAVE_FREEBSD_UFTDI, [1], [Defined if dev/usb/uftdiio.h is available.])]) - - AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable code coverage tracking]), [CXXFLAGS+=" -coverage -O0"], []) - AC_ARG_WITH(contrib, AS_HELP_STRING([--without-contrib], [disable inclusion of contributed sources]), [], [with_contrib=yes]) @@ -118,7 +119,7 @@ AM_COND_IF([CONTRIB], [AC_CONFIG_FILES([ ])]) diff --git a/comms/ebusd/files/patch-src_lib_ebus_device.cpp b/comms/ebusd/files/patch-src_lib_ebus_device.cpp deleted file mode 100644 index e00057c6cc4e..000000000000 --- a/comms/ebusd/files/patch-src_lib_ebus_device.cpp +++ /dev/null @@ -1,59 +0,0 @@ ---- src/lib/ebus/device.cpp.orig 2018-12-26 15:38:15 UTC -+++ src/lib/ebus/device.cpp -@@ -30,6 +30,9 @@ - #ifdef HAVE_LINUX_SERIAL - # include <linux/serial.h> - #endif -+#ifdef HAVE_FREEBSD_UFTDI -+# include <dev/usb/uftdiio.h> -+#endif - #include <errno.h> - #ifdef HAVE_PPOLL - # include <poll.h> -@@ -192,7 +195,7 @@ result_t SerialDevice::open() { - struct termios newSettings; - - // open file descriptor -- m_fd = ::open(m_name, O_RDWR | O_NOCTTY); -+ m_fd = ::open(m_name, O_RDWR | O_NOCTTY | O_NDELAY); - - if (m_fd < 0) { - return RESULT_ERR_NOTFOUND; -@@ -215,13 +218,24 @@ result_t SerialDevice::open() { - } - #endif - -+#ifdef HAVE_FREEBSD_UFTDI -+ int param = 0; -+ // flush tx/rx and set low latency on uftdi device -+ if (ioctl(m_fd, UFTDIIOC_GET_LATENCY, ¶m) == 0) { -+ ioctl(m_fd, UFTDIIOC_RESET_IO, ¶m); -+ param = 1; -+ ioctl(m_fd, UFTDIIOC_SET_LATENCY, ¶m); -+ } -+#endif -+ - // save current settings - tcgetattr(m_fd, &m_oldSettings); - - // create new settings - memset(&newSettings, 0, sizeof(newSettings)); - -- newSettings.c_cflag |= (B2400 | CS8 | CLOCAL | CREAD); -+ cfsetspeed(&newSettings, B2400); -+ newSettings.c_cflag |= (CS8 | CLOCAL | CREAD); - newSettings.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); // non-canonical mode - newSettings.c_iflag |= IGNPAR; // ignore parity errors - newSettings.c_oflag &= ~OPOST; -@@ -234,7 +248,10 @@ result_t SerialDevice::open() { - tcflush(m_fd, TCIFLUSH); - - // activate new settings of serial device -- tcsetattr(m_fd, TCSAFLUSH, &newSettings); -+ if (tcsetattr(m_fd, TCSAFLUSH, &newSettings)) { -+ close(); -+ return RESULT_ERR_DEVICE; -+ } - - // set serial device into blocking mode - fcntl(m_fd, F_SETFL, fcntl(m_fd, F_GETFL) & ~O_NONBLOCK); diff --git a/comms/ebusd/files/patch-src_lib_ebus_device.h b/comms/ebusd/files/patch-src_lib_ebus_device.h deleted file mode 100644 index 95572de6527f..000000000000 --- a/comms/ebusd/files/patch-src_lib_ebus_device.h +++ /dev/null @@ -1,10 +0,0 @@ ---- src/lib/ebus/device.h.orig 2018-12-26 15:38:15 UTC -+++ src/lib/ebus/device.h -@@ -22,6 +22,7 @@ - #include <unistd.h> - #include <termios.h> - #include <arpa/inet.h> -+#include <netinet/in.h> - #include <netdb.h> - #include <iostream> - #include <fstream> diff --git a/comms/ebusd/files/patch-src_lib_utils_tcpsocket.h b/comms/ebusd/files/patch-src_lib_utils_tcpsocket.h deleted file mode 100644 index e6559448cd62..000000000000 --- a/comms/ebusd/files/patch-src_lib_utils_tcpsocket.h +++ /dev/null @@ -1,10 +0,0 @@ ---- src/lib/utils/tcpsocket.h.orig 2018-12-26 15:38:15 UTC -+++ src/lib/utils/tcpsocket.h -@@ -21,6 +21,7 @@ - - #include <unistd.h> - #include <sys/socket.h> -+#include <netinet/in.h> - #include <sys/time.h> - #include <stdint.h> - #include <string> |