From 3c6f056186455a101a02e900ad3ce6fa30cf1f80 Mon Sep 17 00:00:00 2001 From: bland Date: Wed, 13 Oct 2004 11:12:05 +0000 Subject: Redone gcc 3.4 build fix. Previous aproach just made gcc quiet and resulted in lost symbols for Gtk::wrap methods. Reported by: pointyhat via kris --- x11-toolkits/gtk--/Makefile | 2 +- x11-toolkits/gtk--/files/patch-src::gtk--::base.h | 55 ++++++++++++++-------- .../gtk--/files/patch-src::gtkmmproc::stage1.m4 | 11 +++++ x11-toolkits/gtkmm12/Makefile | 2 +- .../gtkmm12/files/patch-src::gtk--::base.h | 55 ++++++++++++++-------- .../gtkmm12/files/patch-src::gtkmmproc::stage1.m4 | 11 +++++ 6 files changed, 94 insertions(+), 42 deletions(-) create mode 100644 x11-toolkits/gtk--/files/patch-src::gtkmmproc::stage1.m4 create mode 100644 x11-toolkits/gtkmm12/files/patch-src::gtkmmproc::stage1.m4 diff --git a/x11-toolkits/gtk--/Makefile b/x11-toolkits/gtk--/Makefile index b86faaba5b9f..b279afe27357 100644 --- a/x11-toolkits/gtk--/Makefile +++ b/x11-toolkits/gtk--/Makefile @@ -7,7 +7,7 @@ PORTNAME= gtkmm PORTVERSION= 1.2.8 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-toolkits MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gtkmm/1.2 diff --git a/x11-toolkits/gtk--/files/patch-src::gtk--::base.h b/x11-toolkits/gtk--/files/patch-src::gtk--::base.h index 287102e51103..5da3b98d9bc1 100644 --- a/x11-toolkits/gtk--/files/patch-src::gtk--::base.h +++ b/x11-toolkits/gtk--/files/patch-src::gtk--::base.h @@ -1,25 +1,40 @@ --- src/gtk--/base.h.orig Tue Nov 14 21:23:11 2000 -+++ src/gtk--/base.h Sun Sep 5 06:11:48 2004 -@@ -454,6 +454,13 @@ - pointer operator -> () const { return &operator*(); } - }; ++++ src/gtk--/base.h Wed Oct 13 05:01:59 2004 +@@ -99,12 +99,10 @@ -+namespace Gtk { -+ -+template -+interf* wrap(impl*); -+ -+} -+ - // this iterator variation returns interf (wrapped from impl) - // Equivelency G_List_Cpp_Iterator - // => list::iterator -@@ -482,7 +489,7 @@ - value_type operator*() const + /* Translating API */ + +-/* + // used to give error on unwrapped types; connect Gtk-- crew +-template struct NotWrapped; ++template struct NotWrapped {typedef void Type;}; + // hook for C => C++ translation + template struct Wrap {typedef typename NotWrapped::Type CppType;}; +-*/ + + class Object; + class ObjectClass; +@@ -118,19 +116,19 @@ + + // Request a specific wrapper for an object. + template +-Cpp* wrap_new(typename Cpp::BaseObjectType* o) ++inline Cpp* wrap_new(typename Cpp::BaseObjectType* o) { - if (node && node->data) -- return Gtk::wrap(static_cast((*node).data)); -+ return Gtk::wrap(static_cast((*node).data)); - return 0; + return (typename Cpp::CppClassType::wrap_new(o)); } + // interface to gtk-- +-/* ++ + template +-typename Wrap::CppType* wrap(C* o) ++inline typename Wrap::CppType* wrap(C* o) + { + return dynamic_cast::CppType*>(wrap_auto((GtkObject*)(o))); + } +-*/ ++ + + /********************************************************************/ + diff --git a/x11-toolkits/gtk--/files/patch-src::gtkmmproc::stage1.m4 b/x11-toolkits/gtk--/files/patch-src::gtkmmproc::stage1.m4 new file mode 100644 index 000000000000..0000d4380d5f --- /dev/null +++ b/x11-toolkits/gtk--/files/patch-src::gtkmmproc::stage1.m4 @@ -0,0 +1,11 @@ +--- src/gtkmmproc/stage1.m4.orig Thu Feb 15 04:42:47 2001 ++++ src/gtkmmproc/stage1.m4 Wed Oct 13 02:35:02 2004 +@@ -198,7 +198,7 @@ + class __CPPNAME__; + class __CPPNAME__`'_Class; + } +-namespace Gtk { __NAMESPACE__::__CPPNAME__ *wrap (__CNAME__ *o); } ++namespace Gtk { template<> struct Wrap<__CNAME__> { typedef __CPPNAME__ CppType; }; } + dnl + dnl + GTKMM_SECTION(PRIVATE) diff --git a/x11-toolkits/gtkmm12/Makefile b/x11-toolkits/gtkmm12/Makefile index b86faaba5b9f..b279afe27357 100644 --- a/x11-toolkits/gtkmm12/Makefile +++ b/x11-toolkits/gtkmm12/Makefile @@ -7,7 +7,7 @@ PORTNAME= gtkmm PORTVERSION= 1.2.8 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-toolkits MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gtkmm/1.2 diff --git a/x11-toolkits/gtkmm12/files/patch-src::gtk--::base.h b/x11-toolkits/gtkmm12/files/patch-src::gtk--::base.h index 287102e51103..5da3b98d9bc1 100644 --- a/x11-toolkits/gtkmm12/files/patch-src::gtk--::base.h +++ b/x11-toolkits/gtkmm12/files/patch-src::gtk--::base.h @@ -1,25 +1,40 @@ --- src/gtk--/base.h.orig Tue Nov 14 21:23:11 2000 -+++ src/gtk--/base.h Sun Sep 5 06:11:48 2004 -@@ -454,6 +454,13 @@ - pointer operator -> () const { return &operator*(); } - }; ++++ src/gtk--/base.h Wed Oct 13 05:01:59 2004 +@@ -99,12 +99,10 @@ -+namespace Gtk { -+ -+template -+interf* wrap(impl*); -+ -+} -+ - // this iterator variation returns interf (wrapped from impl) - // Equivelency G_List_Cpp_Iterator - // => list::iterator -@@ -482,7 +489,7 @@ - value_type operator*() const + /* Translating API */ + +-/* + // used to give error on unwrapped types; connect Gtk-- crew +-template struct NotWrapped; ++template struct NotWrapped {typedef void Type;}; + // hook for C => C++ translation + template struct Wrap {typedef typename NotWrapped::Type CppType;}; +-*/ + + class Object; + class ObjectClass; +@@ -118,19 +116,19 @@ + + // Request a specific wrapper for an object. + template +-Cpp* wrap_new(typename Cpp::BaseObjectType* o) ++inline Cpp* wrap_new(typename Cpp::BaseObjectType* o) { - if (node && node->data) -- return Gtk::wrap(static_cast((*node).data)); -+ return Gtk::wrap(static_cast((*node).data)); - return 0; + return (typename Cpp::CppClassType::wrap_new(o)); } + // interface to gtk-- +-/* ++ + template +-typename Wrap::CppType* wrap(C* o) ++inline typename Wrap::CppType* wrap(C* o) + { + return dynamic_cast::CppType*>(wrap_auto((GtkObject*)(o))); + } +-*/ ++ + + /********************************************************************/ + diff --git a/x11-toolkits/gtkmm12/files/patch-src::gtkmmproc::stage1.m4 b/x11-toolkits/gtkmm12/files/patch-src::gtkmmproc::stage1.m4 new file mode 100644 index 000000000000..0000d4380d5f --- /dev/null +++ b/x11-toolkits/gtkmm12/files/patch-src::gtkmmproc::stage1.m4 @@ -0,0 +1,11 @@ +--- src/gtkmmproc/stage1.m4.orig Thu Feb 15 04:42:47 2001 ++++ src/gtkmmproc/stage1.m4 Wed Oct 13 02:35:02 2004 +@@ -198,7 +198,7 @@ + class __CPPNAME__; + class __CPPNAME__`'_Class; + } +-namespace Gtk { __NAMESPACE__::__CPPNAME__ *wrap (__CNAME__ *o); } ++namespace Gtk { template<> struct Wrap<__CNAME__> { typedef __CPPNAME__ CppType; }; } + dnl + dnl + GTKMM_SECTION(PRIVATE) -- cgit