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 (-8 / +16 lines)
Lines 1-15 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,20 @@
4
+attach 10 {
4
+notify 50 {
5
+	device-name "uftdi[0-9]+";
5
+	match "system"          "USB";
6
+	match "vendor" "0x1781";
6
+	match "subsystem"       "DEVICE";
7
+	match "product" "0x0c30";
7
+	match "type"            "ATTACH";
8
+	match "vendor"          "0x1781";
9
+	match "product"         "0x0c30";
8
+
10
+
9
+	action "chgrp dialer /dev/ugen$port.$devaddr; chmod 660 /dev/ugen$port.$devaddr;
11
+	action "chgrp dialer /dev/$cdev; chmod 660 /dev/$cdev;
10
+		@CMAKE_INSTALL_PREFIX@/sbin/tdadmin --pid $product --vid $vendor --serial $sernum controller connect";
12
+		@CMAKE_INSTALL_PREFIX@/sbin/tdadmin --pid $product --vid $vendor --serial $sernum controller connect";
11
+};
13
+};
12
+
14
+
15
+notify 50 {
16
+	match "system"          "USB";
17
+	match "subsystem"       "DEVICE";
18
+	match "type"            "DETACH";
19
+	match "vendor"          "0x1781";
20
+	match "product"         "0x0c30";
13
+
21
+
14
+# Haven't managed to handle detach/disconnect events, seems they do not provide any information
22
+	action "@CMAKE_INSTALL_PREFIX@/sbin/tdadmin --pid $product --vid $vendor --serial $sernum controller disconnect";
15
+# at all so cannot distinguish different uftdi devices.
23
+};
(-)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