From owner-svn-ports-head@freebsd.org Sun Jan 7 11:57:52 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63EEEE685FF; Sun, 7 Jan 2018 11:57:52 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BABD82F4D; Sun, 7 Jan 2018 11:57:52 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65E3120DB3; Sun, 7 Jan 2018 11:57:51 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w07Bvp7c026236; Sun, 7 Jan 2018 11:57:51 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w07BvoK5026230; Sun, 7 Jan 2018 11:57:50 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201801071157.w07BvoK5026230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Sun, 7 Jan 2018 11:57:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458314 - in head/x11/kdelibs4: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: in head/x11/kdelibs4: . files X-SVN-Commit-Revision: 458314 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jan 2018 11:57:52 -0000 Author: tcberner Date: Sun Jan 7 11:57:50 2018 New Revision: 458314 URL: https://svnweb.freebsd.org/changeset/ports/458314 Log: x11/kdelibs4 fix build with clang6 PR: 224945 Added: head/x11/kdelibs4/files/patch-dnssd_servicemodel.cpp (contents, props changed) head/x11/kdelibs4/files/patch-kdeui_icons_kiconcache.cpp (contents, props changed) head/x11/kdelibs4/files/patch-khtml_misc_AtomicString.cpp (contents, props changed) head/x11/kdelibs4/files/patch-khtml_xml_dom__stringimpl.h (contents, props changed) head/x11/kdelibs4/files/patch-kinit_kinit.cpp (contents, props changed) Modified: head/x11/kdelibs4/Makefile Modified: head/x11/kdelibs4/Makefile ============================================================================== --- head/x11/kdelibs4/Makefile Sun Jan 7 11:33:58 2018 (r458313) +++ head/x11/kdelibs4/Makefile Sun Jan 7 11:57:50 2018 (r458314) @@ -3,7 +3,7 @@ PORTNAME= kdelibs PORTVERSION= ${KDE4_KDELIBS_VERSION} -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11 kde kde-applications MAINTAINER= kde@FreeBSD.org Added: head/x11/kdelibs4/files/patch-dnssd_servicemodel.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/kdelibs4/files/patch-dnssd_servicemodel.cpp Sun Jan 7 11:57:50 2018 (r458314) @@ -0,0 +1,23 @@ +Backport of + +rom 80b43aaae27cfdf543483cd55d9012e37219350a Mon Sep 17 00:00:00 2001 +From: Alex Richardson +Date: Wed, 29 Jan 2014 21:56:27 +0100 +Subject: [PATCH] Fix build with clang + +If we don't cast to unsigned int clang complains with following message: + +error: case value evaluates to 2690980318, which cannot be narrowed to +type 'int' + +--- dnssd/servicemodel.cpp.orig 2018-01-07 11:07:50 UTC ++++ dnssd/servicemodel.cpp +@@ -80,7 +80,7 @@ QVariant ServiceModel::data(const QModelIndex& index, + if (!index.isValid()) return QVariant(); + if (!hasIndex(index.row(), index.column(), index.parent())) return QVariant(); + const QList srv=d->m_browser->services(); +- switch (role) { ++ switch ((uint)role) { + case Qt::DisplayRole: + switch (index.column()) { + case ServiceName: return srv[index.row()]->serviceName(); Added: head/x11/kdelibs4/files/patch-kdeui_icons_kiconcache.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/kdelibs4/files/patch-kdeui_icons_kiconcache.cpp Sun Jan 7 11:57:50 2018 (r458314) @@ -0,0 +1,15 @@ +error: invalid suffix on literal; C++11 requires a space between literal and identifier +[-Wreserved-user-defined-literal] + d->mUpdatesFile = KGlobal::dirs()->locateLocal("cache", "kpc/"KDE_ICONCACHE_NAME".updated"); + ^ +--- kdeui/icons/kiconcache.cpp.orig 2018-01-07 10:31:47 UTC ++++ kdeui/icons/kiconcache.cpp +@@ -103,7 +103,7 @@ class KIconCache::Private (public) + KIconCache::KIconCache() + : KPixmapCache(KDE_ICONCACHE_NAME), d(new Private(this)) + { +- d->mUpdatesFile = KGlobal::dirs()->locateLocal("cache", "kpc/"KDE_ICONCACHE_NAME".updated"); ++ d->mUpdatesFile = KGlobal::dirs()->locateLocal("cache", "kpc/" KDE_ICONCACHE_NAME ".updated"); + // Set limit to 10 MB + setCacheLimit(10 * 1024); + } Added: head/x11/kdelibs4/files/patch-khtml_misc_AtomicString.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/kdelibs4/files/patch-khtml_misc_AtomicString.cpp Sun Jan 7 11:57:50 2018 (r458314) @@ -0,0 +1,40 @@ +Backport of: + +From 7ed8ac1ae23a31d2eb227ffa15d68b2beaf8f37d Mon Sep 17 00:00:00 2001 +From: Milian Wolff +Date: Wed, 26 Feb 2014 22:37:29 +0100 +Subject: [PATCH] Fix compiler error when using clang: + +src/misc/AtomicString.cpp:175:28: error: non-constant-expression + cannot be narrowed from type 'int' to 'unsigned int' in initializer + list [-Wc++11-narrowing] + UCharBuffer buf = { s, length }; + ^~~~~~ +src/misc/AtomicString.cpp:175:28: note: override this message by + inserting an explicit cast + UCharBuffer buf = { s, length }; + ^~~~~~ + static_cast( ) + +REVIEW: 116541 + +--- khtml/misc/AtomicString.cpp.orig 2018-01-07 11:32:56 UTC ++++ khtml/misc/AtomicString.cpp +@@ -160,7 +160,7 @@ DOMStringImpl* AtomicString::add(const QChar* s, int l + return DOMStringImpl::empty(); + + init(); +- UCharBuffer buf = { s, length }; ++ UCharBuffer buf = { s, static_cast(length) }; + std::pair::iterator, bool> addResult = stringTable->add(buf); + if (!addResult.second) + return *addResult.first; +@@ -180,7 +180,7 @@ DOMStringImpl* AtomicString::add(const QChar* s) + return DOMStringImpl::empty(); + + init(); +- UCharBuffer buf = {s, length}; ++ UCharBuffer buf = {s, static_cast(length) }; + std::pair::iterator, bool> addResult = stringTable->add(buf); + if (!addResult.second) + return *addResult.first; Added: head/x11/kdelibs4/files/patch-khtml_xml_dom__stringimpl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/kdelibs4/files/patch-khtml_xml_dom__stringimpl.h Sun Jan 7 11:57:50 2018 (r458314) @@ -0,0 +1,31 @@ +Backport of + +From 6c4f7f84dd1326853475d10e503f220e4555e5e2 Mon Sep 17 00:00:00 2001 +From: Milian Wolff +Date: Sun, 2 Mar 2014 21:48:20 +0100 +Subject: [PATCH] Fix clang compilation warning: + +khtml/src/xml/dom_stringimpl.h:60:13: warning: cast from 'char *' +to 'QChar *' increases required alignment from 1 to 2 [-Wcast-align + s = (QChar*) new cha sizeof(QChar)*( havestr ? len : 1 ) ; + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note that this line of code is pretty odd I have to say. It this +supposed to be an optimization to prevent the default ctor/dtor of +QChar to be called? Is it really worth it here? + +REVIEW: 116544 + +--- khtml/xml/dom_stringimpl.h.orig 2018-01-07 11:19:19 UTC ++++ khtml/xml/dom_stringimpl.h +@@ -32,8 +32,8 @@ + #include "misc/khtmllayout.h" + #include "misc/shared.h" + +-#define QT_ALLOC_QCHAR_VEC( N ) (QChar*) new char[ sizeof(QChar)*( N ) ] +-#define QT_DELETE_QCHAR_VEC( P ) delete[] ((char*)( P )) ++#define QT_ALLOC_QCHAR_VEC( N ) reinterpret_cast(new char[ sizeof(QChar)*( N ) ]) ++#define QT_DELETE_QCHAR_VEC( P ) delete[] (reinterpret_cast( P )) + + namespace DOM { + Added: head/x11/kdelibs4/files/patch-kinit_kinit.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/kdelibs4/files/patch-kinit_kinit.cpp Sun Jan 7 11:57:50 2018 (r458314) @@ -0,0 +1,15 @@ +error: invalid suffix on literal; C++11 requires a space between literal and identifier +[-Wreserved-user-defined-literal] + fprintf(stderr, "kdeinit4: Aborting. $"DISPLAY" is not set.\n"); + +--- kinit/kinit.cpp.orig 2018-01-07 10:44:53 UTC ++++ kinit/kinit.cpp +@@ -1478,7 +1478,7 @@ static void kdeinit_library_path() + if (display.isEmpty()) + { + #if defined(Q_WS_X11) || defined(Q_WS_QWS) +- fprintf(stderr, "kdeinit4: Aborting. $"DISPLAY" is not set.\n"); ++ fprintf(stderr, "kdeinit4: Aborting. $" DISPLAY " is not set.\n"); + exit(255); + #endif + }