Index: head/comms/telldus-core/Makefile =================================================================== --- head/comms/telldus-core/Makefile (revision 483472) +++ head/comms/telldus-core/Makefile (revision 483473) @@ -1,58 +1,55 @@ # Created by: Johan Strom # $FreeBSD$ PORTNAME= telldus-core PORTVERSION= 2.1.2 PORTREVISION= 5 CATEGORIES= comms MASTER_SITES= http://download.telldus.se/TellStick/Software/telldus-core/ MAINTAINER= johan@stromnet.se COMMENT= Tellstick Telldus daemon + library LICENSE= LGPL21 BUILD_DEPENDS= help2man:misc/help2man LIB_DEPENDS= libftdi.so:devel/libftdi \ libconfuse.so:devel/libconfuse \ libargp.so:devel/argp-standalone -BROKEN_powerpc64= Does not build: error: strlen was not declared in this scope -BROKEN_sparc64= Does not build: error: strlen was not declared in this scope - -USE_LDCONFIG= yes USES= cmake compiler:c++11-lang iconv:wchar_t +USE_LDCONFIG= yes CMAKE_ARGS+=-DGENERATE_MAN=TRUE # Note: these are internal defines and shall NOT contain ${STAGEDIR} CMAKE_ARGS+=-DSYSCONF_INSTALL_DIR="${PREFIX}/etc" # Using global /var, otherwise testport complains "Warning: port uses /usr/local/var instead of /var" CMAKE_ARGS+=-DSTATE_INSTALL_DIR="/var/telldus" CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}} CXXFLAGS_clang= -Wno-c++11-narrowing MAKE_JOBS_UNSAFE= yes USE_RC_SUBR= telldusd USER= nobody GROUP= dialer SUB_FILES= pkg-message .include post-patch: # remove tr1 if using libc++ .if ${COMPILER_FEATURES:Mlibc++} @${REINPLACE_CMD} -e 's|tr1::||' ${WRKSRC}/common/Event.h .endif post-install: cd ${STAGEDIR}${PREFIX}/etc && \ ${MV} tellstick.conf tellstick.conf.sample - # This file is actually empty but allows us to simply use @sample to + # This file is actually empty but allows us to simply use @sample to # make sure it stays between upgrades if modified cd ${STAGEDIR}/var/telldus && \ ${MV} telldus-core.conf telldus-core.conf.sample .include Index: head/comms/telldus-core/files/patch-common-Socket_unix.cpp =================================================================== --- head/comms/telldus-core/files/patch-common-Socket_unix.cpp (revision 483472) +++ head/comms/telldus-core/files/patch-common-Socket_unix.cpp (revision 483473) @@ -1,24 +1,31 @@ ---- common/Socket_unix.cpp +--- common/Socket_unix.cpp.orig 2014-03-31 10:30:09 UTC +++ common/Socket_unix.cpp -@@ -18,7 +18,7 @@ +@@ -12,13 +12,14 @@ + #include + #include + #include ++#include + + #include "common/Socket.h" + #include "common/Mutex.h" #include "common/Strings.h" #define BUFSIZE 512 -#if defined(_MACOSX) && !defined(SOCK_CLOEXEC) +#if (defined(_MACOSX) || defined (__FreeBSD__)) && !defined(SOCK_CLOEXEC) #define SOCK_CLOEXEC 0 #endif -@@ -128,8 +128,10 @@ std::wstring Socket::read(int timeout) { +@@ -128,8 +129,10 @@ std::wstring Socket::read(int timeout) { void Socket::stopReadWait() { TelldusCore::MutexLocker locker(&d->mutex); - d->connected = false; - // TODO(stefan): somehow signal the socket here? + if(d->connected && d->socket != -1) { + d->connected = false; + shutdown(d->socket, SHUT_RDWR); + } } void Socket::write(const std::wstring &msg) { Index: head/comms/telldus-core/files/patch-service-ConnectionListener_unix.cpp =================================================================== --- head/comms/telldus-core/files/patch-service-ConnectionListener_unix.cpp (revision 483472) +++ head/comms/telldus-core/files/patch-service-ConnectionListener_unix.cpp (revision 483473) @@ -1,11 +1,16 @@ ---- service/ConnectionListener_unix.cpp +--- service/ConnectionListener_unix.cpp.orig 2014-03-31 10:30:09 UTC +++ service/ConnectionListener_unix.cpp -@@ -17,7 +17,7 @@ +@@ -13,11 +13,12 @@ + #include + #include + #include ++#include + #include "service/ConnectionListener.h" #include "common/Socket.h" -#if defined(_MACOSX) && !defined(SOCK_CLOEXEC) +#if (defined(_MACOSX) || defined (__FreeBSD__)) && !defined(SOCK_CLOEXEC) #define SOCK_CLOEXEC 0 #endif