View | Details | Raw Unified | Return to bug 198019 | Differences between
and this patch

Collapse All | Expand All

(-)b/comms/telldus-core/Makefile (-1 / +6 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	telldus-core
4
PORTNAME=	telldus-core
5
PORTVERSION=	2.1.2
5
PORTVERSION=	2.1.2
6
PORTREVISION=	1
6
CATEGORIES=	comms
7
CATEGORIES=	comms
7
MASTER_SITES=	http://download.telldus.se/TellStick/Software/telldus-core/
8
MASTER_SITES=	http://download.telldus.se/TellStick/Software/telldus-core/
8
9
Lines 16-22 LIB_DEPENDS= libftdi.so:${PORTSDIR}/devel/libftdi \ Link Here
16
		libconfuse.so:${PORTSDIR}/devel/libconfuse \
17
		libconfuse.so:${PORTSDIR}/devel/libconfuse \
17
		libargp.so:${PORTSDIR}/devel/argp-standalone
18
		libargp.so:${PORTSDIR}/devel/argp-standalone
18
19
19
USES= 		iconv cmake compiler:c++11-lang
20
USE_LDCONFIG=	yes
21
22
USES=		iconv cmake compiler:c++11-lang
20
23
21
#CMAKE_VERBOSE=yes
24
#CMAKE_VERBOSE=yes
22
CMAKE_ARGS+=-DGENERATE_MAN=TRUE
25
CMAKE_ARGS+=-DGENERATE_MAN=TRUE
Lines 30-35 USE_RC_SUBR= telldusd Link Here
30
USER=		nobody
33
USER=		nobody
31
GROUP=		dialer
34
GROUP=		dialer
32
35
36
SUB_FILES=	pkg-message
37
33
.include <bsd.port.pre.mk>
38
.include <bsd.port.pre.mk>
34
39
35
post-patch:
40
post-patch:
(-)b/comms/telldus-core/files/patch-common-CMakeLists.txt (-2 / +9 lines)
Lines 1-6 Link Here
1
--- common/CMakeLists.txt
1
--- common/CMakeLists.txt
2
+++ common/CMakeLists.txt
2
+++ common/CMakeLists.txt
3
@@ -54,16 +54,22 @@ ELSEIF (WIN32)
3
@@ -54,16 +54,29 @@ ELSEIF (WIN32)
4
 	)
4
 	)
5
 ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
5
 ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
6
 	#### FreeBSD ####
6
 	#### FreeBSD ####
Lines 18-24 Link Here
18
-	)
18
-	)
19
+
19
+
20
+	# FreeBSD 10 has iconv built in to libc
20
+	# FreeBSD 10 has iconv built in to libc
21
+	IF(FREEBSD_RELEASE LESS 10)
21
+	# However, if user has libiconv package installed, clang will find that header first,
22
+	# and we'd get a link error unless -liconv is added. This will at least let it build; we cannot
23
+	# force the user to NOT have libiconv installed.
24
+	# "proper" fix would be to force clang/gcc to use system header. How?
25
+	IF( (FREEBSD_RELEASE LESS 10) OR (EXISTS "/usr/local/include/iconv.h"))
26
+		IF(NOT (FREEBSD_RELEASE LESS 10))
27
+			MESSAGE(WARNING "building with libiconv from package instead of base. Port will fail?")
28
+		ENDIF()
22
+		FIND_LIBRARY(ICONV_LIBRARY iconv)
29
+		FIND_LIBRARY(ICONV_LIBRARY iconv)
23
+		LIST(APPEND telldus-common_LIBRARIES
30
+		LIST(APPEND telldus-common_LIBRARIES
24
+			${ICONV_LIBRARY}
31
+			${ICONV_LIBRARY}
(-)b/comms/telldus-core/files/patch-common-Strings.cpp (+11 lines)
Added Link Here
1
--- common/Strings.cpp
2
+++ common/Strings.cpp
3
@@ -19,7 +19,7 @@
4
 #include <string>
5
 
6
 
7
-#ifdef _MACOSX
8
+#if defined(_MACOSX) || defined(_FREEBSD)
9
 #define WCHAR_T_ENCODING "UCS-4-INTERNAL"
10
 #else
11
 #define WCHAR_T_ENCODING "WCHAR_T"
(-)b/comms/telldus-core/files/patch-tdadmin-freebsd-devd-tellstick.conf (-2 / +16 lines)
Lines 1-12 Link Here
1
--- tdadmin/freebsd-devd-tellstick.conf	2014-04-06 22:40:11.000000000 +0200
1
--- tdadmin/freebsd-devd-tellstick.conf	2014-04-06 22:40:11.000000000 +0200
2
+++ tdadmin/freebsd-devd-tellstick.conf	2014-04-06 20:37:50.501751596 +0200
2
+++ tdadmin/freebsd-devd-tellstick.conf	2014-04-06 20:37:50.501751596 +0200
3
@@ -0,0 +1,12 @@
3
@@ -0,0 +1,26 @@
4
+attach 10 {
4
+attach 10 {
5
+	device-name "uftdi[0-9]+";
5
+	device-name "uftdi[0-9]+";
6
+	match "vendor" "0x1781";
6
+	match "vendor" "0x1781";
7
+	match "product" "0x0c30";
7
+	match "product" "0x0c30";
8
+
8
+
9
+	action "chgrp dialer /dev/ugen$port.$devaddr; chmod 660 /dev/ugen$port.$devaddr;
9
+
10
+	# Devd variable $bus and $devaddr ought to be what we want to identify /dev/ugenN.N.
11
+	# Unfortunately devd overwrites $bus:
12
+	# 	https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198015
13
+	#
14
+	# Use this workaround instead.. Find device by serial and use that device name. -B14 should be stable: 
15
+	# 	https://github.com/freebsd/freebsd/blob/master/usr.sbin/usbconfig/dump.c#L395
16
+	#	https://github.com/freebsd/freebsd/blob/master/lib/libusb/libusb20_desc.h#L220
17
+	#
18
+	# $ usbconfig dump_device_desc | grep $sernum -B14|grep ugen
19
+	# ugen0.2: <TellStick Telldus> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA)
20
+	#
21
+	# Old command:
22
+	# action "chgrp dialer /dev/ugen$bus.$devaddr; chmod 660 /dev/ugen$bus.$devaddr;
23
+	action "dev=`usbconfig dump_device_desc | grep $sernum -B14|grep ugen|cut -f1 -d':'`; chgrp dialer /dev/$$dev; chmod 660 /dev/$$dev;
10
+		@CMAKE_INSTALL_PREFIX@/sbin/tdadmin --pid $product --vid $vendor --serial $sernum controller connect";
24
+		@CMAKE_INSTALL_PREFIX@/sbin/tdadmin --pid $product --vid $vendor --serial $sernum controller connect";
11
+};
25
+};
12
+
26
+
(-)b/comms/telldus-core/files/pkg-message.in (+19 lines)
Added Link Here
1
2
======
3
NOTICE
4
======
5
6
A devd rule has been installed to automatically notify telldusd
7
when a new device has been detected.
8
9
Please restart devd to activate this:
10
11
	/etc/rc.d/devd restart
12
13
Edit %%PREFIX%%/etc/tellstick.conf to configure some devices,
14
and enable telldusd in rc.conf.
15
16
Then start telldusd.
17
18
When starting for the first time, you might need to unplug/plugin the device
19
to allow devd to fix the permissions on the /dev/ugenX.X device.
(-)a/comms/telldus-core/pkg-message (-20 lines)
Removed Link Here
1
2
======
3
NOTICE
4
======
5
6
A devd rule has been installed to automatically notify telldusd
7
when a new device has been detected.
8
9
Please restart devd to activate this:
10
11
	/etc/rc.d/devd restart
12
13
Edit /usr/local/etc/tellstick.conf to configure some devices,
14
and enable telldusd in rc.conf.
15
16
Then start telldusd.
17
18
When starting for the first time, you might need to unplug/plugin the device
19
to allow devd to fix the permissions on the /dev/ugenX.X device.
20
(-)b/comms/telldus-core/pkg-plist (-4 / +5 lines)
Lines 1-10 Link Here
1
bin/tdtool
1
bin/tdtool
2
@mode 775
3
@owner nobody
2
@group dialer
4
@group dialer
3
@mode 664
5
@dir /var/telldus
4
@exec mkdir -p /var/telldus && chown nobody:dialer /var/telldus
6
@exec [ -f /var/telldus/telldus-core.conf ] || touch /var/telldus/telldus-core.conf && chown nobody:dialer /var/telldus/telldus-core.conf
5
@exec [ -f /var/telldus/telldus-core.conf ] || touch /var/telldus/telldus-core.conf && chown nobody:dialer %D/var/telldus/telldus-core.conf
6
@unexec if [ ! -s /var/telldus/telldus-core.conf ]; then rm -vf /var/telldus/telldus-core.conf; fi
7
@unexec if [ ! -s /var/telldus/telldus-core.conf ]; then rm -vf /var/telldus/telldus-core.conf; fi
7
@unexec rmdir /var/telldus >/dev/null 2>&1 || :
8
@mode 664
8
@sample etc/tellstick.conf.sample
9
@sample etc/tellstick.conf.sample
9
@group
10
@group
10
@mode
11
@mode

Return to bug 198019