aboutsummaryrefslogtreecommitdiff
path: root/net-im/telegramqml
diff options
context:
space:
mode:
authorTobias C. Berner <tcberner@FreeBSD.org>2017-02-12 12:02:44 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2017-02-12 12:02:44 +0000
commit89f2abf9c3b636a01383e5a9d46ffaf4fc582cad (patch)
treeba522ac2d03a663ca624388351abfd7fb1b6ef37 /net-im/telegramqml
parent56fbe3026a93c6ca39e0d32dd7a4268cbcf65d6a (diff)
downloadports-89f2abf9c3b636a01383e5a9d46ffaf4fc582cad.tar.gz
ports-89f2abf9c3b636a01383e5a9d46ffaf4fc582cad.zip
Change c++11 behaviour of net-im/libqtelegram-ae and net-im/telegramqml.
Instead of explicitely disabling c++11 mode as the code uses narrowing of unsigned ints to ints, simply pass -no-c++11-narrowing if the compiler is clang. This is done in preparation for Qt 5.7.1, which requires c++11 mode. Approved by: rakuco (mentor)
Notes
Notes: svn path=/head/; revision=433938
Diffstat (limited to 'net-im/telegramqml')
-rw-r--r--net-im/telegramqml/Makefile7
-rw-r--r--net-im/telegramqml/files/patch-telegramqml.pro18
2 files changed, 19 insertions, 6 deletions
diff --git a/net-im/telegramqml/Makefile b/net-im/telegramqml/Makefile
index b12866f19b86..512332524304 100644
--- a/net-im/telegramqml/Makefile
+++ b/net-im/telegramqml/Makefile
@@ -3,6 +3,7 @@
PORTNAME= telegramqml
PORTVERSION= 0.9.2
+PORTREVISION= 1
DISTVERSIONPREFIX= v
CATEGORIES= net-im
@@ -25,12 +26,6 @@ USE_LDCONFIG= yes
QMAKE_ARGS= BUILD_MODE+=lib \
LIBQTELEGRAM_INCLUDE_PATH="${LOCALBASE}/include/libqtelegram-ae"
-# Explicitly disable C++11, as Qt 5.6 defaults to -std=gnu++11 when the
-# compiler supports it and the build currently fails.
-# ../TelegramQML-0.9.2/telegramqml.cpp:4794:10: error: case value evaluates to 2573335900, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
-# case Update::typeUpdateReadHistoryInbox:
-QMAKE_ARGS+= CONFIG-="c++11"
-
post-patch:
@${REINPLACE_CMD} -e "/isEmpty(OPENSSL_INCLUDE_PATH)/d" \
${WRKSRC}/telegramqml.pri
diff --git a/net-im/telegramqml/files/patch-telegramqml.pro b/net-im/telegramqml/files/patch-telegramqml.pro
new file mode 100644
index 000000000000..0aff03340578
--- /dev/null
+++ b/net-im/telegramqml/files/patch-telegramqml.pro
@@ -0,0 +1,18 @@
+C++11 does not allow narrowing of integer types by default -- however multiple
+constants defined in the code are too large to fit into a signed int, and rely
+on the narrowing behaviour.
+
+--- telegramqml.pro.orig 2017-02-11 13:02:31 UTC
++++ telegramqml.pro
+@@ -31,6 +31,11 @@ linux {
+ }
+ }
+
++# Explictely allow narrowing of integer types
++clang {
++ QMAKE_CXXFLAGS += -Wno-c++11-narrowing
++}
++
+ contains(BUILD_MODE,lib) {
+ isEmpty(PREFIX) {
+ isEmpty(INSTALL_HEADERS_PREFIX): INSTALL_HEADERS_PREFIX = $$[QT_INSTALL_HEADERS]