aboutsummaryrefslogtreecommitdiff
path: root/comms/telldus-core
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2015-04-15 08:20:27 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2015-04-15 08:20:27 +0000
commit074ea5282a00d556c73d86231bec5444990597dc (patch)
treeeec3d608e84e79f0187985e5a1e29cd4f04f13eb /comms/telldus-core
parent522c152d1c7b0c92982e310110fa6d59f915ffeb (diff)
Notes
Diffstat (limited to 'comms/telldus-core')
-rw-r--r--comms/telldus-core/Makefile3
-rw-r--r--comms/telldus-core/files/patch-common-CMakeLists.txt29
-rw-r--r--comms/telldus-core/files/patch-common-Strings.cpp26
3 files changed, 28 insertions, 30 deletions
diff --git a/comms/telldus-core/Makefile b/comms/telldus-core/Makefile
index 6cb336b63464..3efde174cb59 100644
--- a/comms/telldus-core/Makefile
+++ b/comms/telldus-core/Makefile
@@ -3,6 +3,7 @@
PORTNAME= telldus-core
PORTVERSION= 2.1.2
+PORTREVISION= 1
CATEGORIES= comms
MASTER_SITES= http://download.telldus.se/TellStick/Software/telldus-core/
@@ -16,7 +17,7 @@ LIB_DEPENDS= libftdi.so:${PORTSDIR}/devel/libftdi \
libconfuse.so:${PORTSDIR}/devel/libconfuse \
libargp.so:${PORTSDIR}/devel/argp-standalone
-USES= iconv cmake compiler:c++11-lang
+USES= cmake compiler:c++11-lang iconv:wchar_t
#CMAKE_VERBOSE=yes
CMAKE_ARGS+=-DGENERATE_MAN=TRUE
diff --git a/comms/telldus-core/files/patch-common-CMakeLists.txt b/comms/telldus-core/files/patch-common-CMakeLists.txt
deleted file mode 100644
index d8ee6992a540..000000000000
--- a/comms/telldus-core/files/patch-common-CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
---- common/CMakeLists.txt
-+++ common/CMakeLists.txt
-@@ -54,16 +54,22 @@ ELSEIF (WIN32)
- )
- ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
- #### FreeBSD ####
-- FIND_LIBRARY(ICONV_LIBRARY iconv)
-+ string(REGEX MATCH "(([0-9]+)\\.([0-9]+))-([A-Z0-9])+" FREEBSD "${CMAKE_SYSTEM_VERSION}")
-+ set( FREEBSD_RELEASE "${CMAKE_MATCH_1}" )
- ADD_DEFINITIONS( -D_FREEBSD )
- LIST(APPEND telldus-common_SRCS
- Event_unix.cpp
- EventHandler_unix.cpp
- Socket_unix.cpp
- )
-- LIST(APPEND telldus-common_LIBRARIES
-- ${ICONV_LIBRARY}
-- )
-+
-+ # FreeBSD 10 has iconv built in to libc
-+ IF(FREEBSD_RELEASE LESS 10)
-+ FIND_LIBRARY(ICONV_LIBRARY iconv)
-+ LIST(APPEND telldus-common_LIBRARIES
-+ ${ICONV_LIBRARY}
-+ )
-+ ENDIF ()
- ELSE (APPLE)
- #### Linux ####
- ADD_DEFINITIONS( -D_LINUX )
diff --git a/comms/telldus-core/files/patch-common-Strings.cpp b/comms/telldus-core/files/patch-common-Strings.cpp
new file mode 100644
index 000000000000..2f3c686c4083
--- /dev/null
+++ b/comms/telldus-core/files/patch-common-Strings.cpp
@@ -0,0 +1,26 @@
+--- common/Strings.cpp.orig 2014-03-31 10:30:09 UTC
++++ common/Strings.cpp
+@@ -61,11 +61,7 @@ std::wstring TelldusCore::charToWstring(
+ char *outString = reinterpret_cast<char*>(new wchar_t[utf8Length+1]);
+ memset(outString, 0, sizeof(wchar_t)*(utf8Length+1));
+
+-#ifdef _FREEBSD
+- const char *inPointer = inString;
+-#else
+ char *inPointer = inString;
+-#endif
+ char *outPointer = outString;
+
+ iconv_t convDesc = iconv_open(WCHAR_T_ENCODING, "UTF-8");
+@@ -206,11 +202,7 @@ std::string TelldusCore::wideToString(co
+ char *outString = new char[outbytesLeft];
+ memset(outString, 0, sizeof(*outString)*(outbytesLeft));
+
+-#ifdef _FREEBSD
+- const char *inPointer = inString;
+-#else
+ char *inPointer = inString;
+-#endif
+ char *outPointer = outString;
+
+ iconv_t convDesc = iconv_open("UTF-8", WCHAR_T_ENCODING);