From owner-svn-ports-head@freebsd.org Mon Jan 8 17:07:42 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 C8C00E782DF; Mon, 8 Jan 2018 17:07:42 +0000 (UTC) (envelope-from jbeich@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 A37CF30FF; Mon, 8 Jan 2018 17:07:42 +0000 (UTC) (envelope-from jbeich@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 EBB762757; Mon, 8 Jan 2018 17:07:41 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w08H7f1A090834; Mon, 8 Jan 2018 17:07:41 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w08H7fVl090832; Mon, 8 Jan 2018 17:07:41 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801081707.w08H7fVl090832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Mon, 8 Jan 2018 17:07:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458456 - in head/x11-toolkits/gtkmm20: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/x11-toolkits/gtkmm20: . files X-SVN-Commit-Revision: 458456 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: Mon, 08 Jan 2018 17:07:42 -0000 Author: jbeich Date: Mon Jan 8 17:07:41 2018 New Revision: 458456 URL: https://svnweb.freebsd.org/changeset/ports/458456 Log: x11-toolkits/gtkmm20: unbreak build with Clang 6 (C++14 by default) In file included from module.cc:3: ../../glib/glibmm/module.h:30:1: error: no member named 'string' in the global namespace; did you mean '::std::string'? GTKMM_USING_STD(string) ^~~~~~~~~~~~~~~~~~~~~~~ ../../glib/glibmmconfig.h:60:57: note: expanded from macro 'GTKMM_USING_STD' # define GTKMM_USING_STD(Symbol) namespace std { using ::Symbol; } ^~ /usr/include/c++/v1/iosfwd:194:65: note: '::std::string' declared here typedef basic_string, allocator > string; ^ class.cc:40:5: error: non-constant-expression cannot be narrowed from type 'guint' (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list [-Wc++11-narrowing] base_query.class_size, ^~~~~~~~~~~~~~~~~~~~~ class.cc:40:5: note: insert an explicit cast to silence this issue base_query.class_size, ^~~~~~~~~~~~~~~~~~~~~ static_cast() [...] Reported by: antoine (via bug 224669) Obtained from: upstream (glibmm 2.31.2) Suggested by: tijl (autoreconf) Added: head/x11-toolkits/gtkmm20/files/patch-glib_glibmm_class.cc (contents, props changed) Deleted: head/x11-toolkits/gtkmm20/files/patch-gdk__gdkmm__Makefile.in head/x11-toolkits/gtkmm20/files/patch-gtk__gtkmm__Makefile.in Modified: head/x11-toolkits/gtkmm20/Makefile (contents, props changed) Modified: head/x11-toolkits/gtkmm20/Makefile ============================================================================== --- head/x11-toolkits/gtkmm20/Makefile Mon Jan 8 17:07:21 2018 (r458455) +++ head/x11-toolkits/gtkmm20/Makefile Mon Jan 8 17:07:41 2018 (r458456) @@ -22,7 +22,7 @@ PORTSCOUT= ignore:1 LIB_DEPENDS= libsigc-1.2.so:devel/libsigc++12 BUILD_DEPENDS= gm4:devel/m4 -USES+= gmake libtool:keepla pathfix pkgconfig +USES+= autoreconf gmake libtool:keepla pathfix pkgconfig GNU_CONFIGURE= yes USE_LDCONFIG= yes USE_GNOME= gtk20 @@ -39,7 +39,8 @@ post-patch: ${WRKSRC}/glib/glibmm/*.cc ${WRKSRC}/glib/glibmm/*.h \ ${WRKSRC}/gtk/gtkmm/textbuffer.cc .for d in docs examples tests - @${REINPLACE_CMD} -e '/^SUBDIRS =/s/${d}//' ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e '/^SUBDIRS[[:space:]]*=/s/${d}//' \ + ${WRKSRC}/Makefile.am .endfor .include Added: head/x11-toolkits/gtkmm20/files/patch-glib_glibmm_class.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-toolkits/gtkmm20/files/patch-glib_glibmm_class.cc Mon Jan 8 17:07:41 2018 (r458456) @@ -0,0 +1,93 @@ +class.cc:40:5: error: non-constant-expression cannot be narrowed from type 'guint' + (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list + [-Wc++11-narrowing] + base_query.class_size, + ^~~~~~~~~~~~~~~~~~~~~ +class.cc:40:5: note: insert an explicit cast to silence this issue + base_query.class_size, + ^~~~~~~~~~~~~~~~~~~~~ + static_cast() +class.cc:46:5: error: non-constant-expression cannot be narrowed from type 'guint' + (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list + [-Wc++11-narrowing] + base_query.instance_size, + ^~~~~~~~~~~~~~~~~~~~~~~~ +class.cc:46:5: note: insert an explicit cast to silence this issue + base_query.instance_size, + ^~~~~~~~~~~~~~~~~~~~~~~~ + static_cast( ) +class.cc:78:7: error: non-constant-expression cannot be narrowed from type 'guint' + (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list + [-Wc++11-narrowing] + base_query.class_size, + ^~~~~~~~~~~~~~~~~~~~~ +class.cc:78:7: note: insert an explicit cast to silence this issue + base_query.class_size, + ^~~~~~~~~~~~~~~~~~~~~ + static_cast() +class.cc:84:7: error: non-constant-expression cannot be narrowed from type 'guint' + (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list + [-Wc++11-narrowing] + base_query.instance_size, + ^~~~~~~~~~~~~~~~~~~~~~~~ +class.cc:84:7: note: insert an explicit cast to silence this issue + base_query.instance_size, + ^~~~~~~~~~~~~~~~~~~~~~~~ + static_cast( ) + +https://git.gnome.org/browse/glibmm/commit/?id=926909ed02a2 + +--- glib/glibmm/class.cc.orig 2002-10-11 18:05:43 UTC ++++ glib/glibmm/class.cc +@@ -35,15 +35,23 @@ void Class::register_derived_type(GType base_type) + GTypeQuery base_query = { 0, 0, 0, 0, }; + g_type_query(base_type, &base_query); + ++ //GTypeQuery::class_size is guint but GTypeInfo::class_size is guint16. ++ const guint16 class_size = ++ (guint16)base_query.class_size; ++ ++ //GTypeQuery::instance_size is guint but GTypeInfo::instance_size is guint16. ++ const guint16 instance_size = ++ (guint16)base_query.instance_size; ++ + const GTypeInfo derived_info = + { +- base_query.class_size, ++ class_size, + 0, // base_init + 0, // base_finalize + class_init_func_, + 0, // class_finalize + 0, // class_data +- base_query.instance_size, ++ instance_size, + 0, // n_preallocs + 0, // instance_init + 0, // value_table +@@ -73,15 +81,23 @@ GType Class::clone_custom_type(const char* custom_type + GTypeQuery base_query = { 0, 0, 0, 0, }; + g_type_query(base_type, &base_query); + ++ //GTypeQuery::class_size is guint but GTypeInfo::class_size is guint16. ++ const guint16 class_size = ++ (guint16)base_query.class_size; ++ ++ //GTypeQuery::instance_size is guint but GTypeInfo::instance_size is guint16. ++ const guint16 instance_size = ++ (guint16)base_query.instance_size; ++ + const GTypeInfo derived_info = + { +- base_query.class_size, ++ class_size, + 0, // base_init + 0, // base_finalize + &Class::custom_class_init_function, + 0, // class_finalize + this, // class_data +- base_query.instance_size, ++ instance_size, + 0, // n_preallocs + 0, // instance_init + 0, // value_table