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<char, char_traits<char>, allocator<char> > 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<guint16>() [...] Reported by: antoine (via bug 224669) Obtained from: upstream (glibmm 2.31.2) Suggested by: tijl (autoreconf)
This commit is contained in:
parent
1d02ed4ffc
commit
c425ccee01
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=458456
@ -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 <bsd.port.mk>
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- gdk/gdkmm/Makefile.in.orig Fri Jun 4 02:49:50 2004
|
||||
+++ gdk/gdkmm/Makefile.in Fri Apr 22 11:37:45 2005
|
||||
@@ -327,8 +327,7 @@
|
||||
# libraries at link time to resolve symbols (remember a dll is like an
|
||||
# executable).
|
||||
@OS_WIN32_TRUE@no_undefined = -no-undefined -Wl,--export-all-symbols
|
||||
-@OS_WIN32_FALSE@win32_dlls_extra_libs =
|
||||
-@OS_WIN32_TRUE@win32_dlls_extra_libs = $(sublib_win32_dlls_libs)
|
||||
+win32_dlls_extra_libs = $(sublib_win32_dlls_libs)
|
||||
common_ldflags = -version-info $(LIBGTKMM_SO_VERSION) $(no_undefined)
|
||||
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
|
||||
-I$(top_builddir)/pango -I$(top_srcdir)/pango \
|
93
x11-toolkits/gtkmm20/files/patch-glib_glibmm_class.cc
Normal file
93
x11-toolkits/gtkmm20/files/patch-glib_glibmm_class.cc
Normal file
@ -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<guint16>()
|
||||
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<guint16>( )
|
||||
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<guint16>()
|
||||
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<guint16>( )
|
||||
|
||||
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
|
@ -1,12 +0,0 @@
|
||||
--- gtk/gtkmm/Makefile.in.orig Fri Jun 4 02:49:54 2004
|
||||
+++ gtk/gtkmm/Makefile.in Fri Apr 22 11:37:23 2005
|
||||
@@ -482,8 +482,7 @@
|
||||
# libraries at link time to resolve symbols (remember a dll is like an
|
||||
# executable).
|
||||
@OS_WIN32_TRUE@no_undefined = -no-undefined -Wl,--export-all-symbols
|
||||
-@OS_WIN32_FALSE@win32_dlls_extra_libs =
|
||||
-@OS_WIN32_TRUE@win32_dlls_extra_libs = $(sublib_win32_dlls_libs)
|
||||
+win32_dlls_extra_libs = $(sublib_win32_dlls_libs)
|
||||
common_ldflags = -version-info $(LIBGTKMM_SO_VERSION) $(no_undefined)
|
||||
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
|
||||
-I$(top_builddir)/pango -I$(top_srcdir)/pango \
|
Loading…
Reference in New Issue
Block a user