Unbreak with new glib2mm (needs C++11). From upstream.

This commit is contained in:
ajacoutot 2015-09-24 10:34:31 +00:00
parent 2915db39bf
commit 4a6b6727cf
18 changed files with 360 additions and 21 deletions

View File

@ -1,23 +1,22 @@
# $OpenBSD: Makefile,v 1.62 2015/05/22 11:31:19 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.63 2015/09/24 10:34:31 ajacoutot Exp $
PORTROACH= limit:^2
PORTROACH= limit:^2
COMMENT= C++ interface for gtk2+
COMMENT= C++ interface for gtk2+
GNOME_PROJECT= gtkmm
GNOME_VERSION= 2.24.4
REVISION= 1
GNOME_PROJECT= gtkmm
GNOME_VERSION= 2.24.4
PKGNAME= gtk2mm-${GNOME_VERSION}
REVISION= 2
PKGNAME= gtk2mm-${GNOME_VERSION}
CATEGORIES= devel x11
CATEGORIES= x11 devel
SHARED_LIBS += gdkmm-2.4 11.0 # 2.0
SHARED_LIBS += gtkmm-2.4 11.0 # 2.0
HOMEPAGE= http://www.gtkmm.org/
HOMEPAGE= http://www.gtkmm.org/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# LGPLv2.1
PERMIT_PACKAGE_CDROM= Yes
@ -28,20 +27,36 @@ WANTLIB += expat ffi fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
WANTLIB += gio-2.0 giomm-2.4 glib-2.0 glibmm-2.4 gmodule-2.0 gobject-2.0
WANTLIB += graphite2 gthread-2.0 gtk-x11-2.0 harfbuzz m pango-1.0
WANTLIB += pangocairo-1.0 pangoft2-1.0 pangomm-1.4 pcre pixman-1
WANTLIB += png pthread pthread-stubs sigc-2.0 stdc++ xcb xcb-render
WANTLIB += png pthread pthread-stubs sigc-2.0 xcb xcb-render
WANTLIB += xcb-shm z
MODULES= devel/gettext \
x11/gnome
MODULES= devel/gettext \
x11/gnome
LIB_DEPENDS= devel/atk2mm \
devel/pangomm \
x11/gtk+2
# c++11
MODULES += gcc4
MODGCC4_ARCHS= *
MODGCC4_LANGS= c++
SEPARATE_BUILD= Yes
LIB_DEPENDS= devel/atk2mm \
devel/pangomm \
x11/gtk+2
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --enable-static \
--disable-dependency-tracking
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --enable-static \
--disable-dependency-tracking
AUTOCONF_VERSION= 2.68
AUTOMAKE_VERSION= 1.15
BUILD_DEPENDS += ${MODGNU_AUTOCONF_DEPENDS} \
${MODGNU_AUTOMAKE_DEPENDS} \
devel/libtool \
devel/mm-common
pre-configure:
cd ${WRKSRC} && \
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
NOCONFIGURE=1 \
./autogen.sh
.include <bsd.port.mk>

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-configure_ac,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 5b8f1294844e3639c6be802dda81fa853511bf30 Mon Sep 17 00:00:00 2001
From: Murray Cumming <murrayc@murrayc.com>
Date: Fri, 14 Aug 2015 13:50:40 +0200
Subject: configure.ac: Use C++11 if the compiler supports it.
--- configure.ac.orig Tue Jun 25 21:34:40 2013
+++ configure.ac Wed Sep 23 12:20:46 2015
@@ -31,7 +31,7 @@ AM_MAINTAINER_MODE
AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
-MM_PREREQ([0.9.5])
+MM_PREREQ([0.9.8])
MM_INIT_MODULE([gdkmm-2.4])
MM_INIT_MODULE([gtkmm-2.4])
@@ -44,6 +44,8 @@ MM_CONFIG_DOCTOOL_DIR([docs])
AC_SUBST([LIBGTKMM_SO_VERSION], [2:0:1])
AC_PROG_CXX
+MM_AX_CXX_COMPILE_STDCXX_11([noext],[optional])
+
AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-gdk_src_color_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gdk/src/color.hg.orig Tue Jun 25 21:34:31 2013
+++ gdk/src/color.hg Wed Sep 23 12:15:37 2015
@@ -21,6 +21,8 @@
// the #ifndef GDKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
_CONFIGINCLUDE(gdkmmconfig.h)
+#include <glibmm/arrayhandle.h>
+
_DEFS(gdkmm,gdk)
namespace Gdk

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-gdk_src_pixbuf_ccg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 33f4ecd007b2e4bd3511b36add8734b362c80d40 Mon Sep 17 00:00:00 2001
From: Murray Cumming <murrayc@murrayc.com>
Date: Fri, 14 Aug 2015 14:25:57 +0200
Subject: Pixbuf: Avoid deprecations warnings that break --enable-warnings=fatal.
--- gdk/src/pixbuf.ccg.orig Tue Jun 25 21:34:31 2013
+++ gdk/src/pixbuf.ccg Wed Sep 23 12:21:48 2015
@@ -21,6 +21,11 @@
#include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
+//Turn off all deprecation warnings, to avoid the warning about
+//gdk_pixbuf_new_from_inline() in the generated code.
+//We don't bother using G_GNUC_END_IGNORE_DEPRECATIONS
+//because we are happy to keep it active for the whole file.
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
namespace
{

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-gdk_src_pixbuf_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 33f4ecd007b2e4bd3511b36add8734b362c80d40 Mon Sep 17 00:00:00 2001
From: Murray Cumming <murrayc@murrayc.com>
Date: Fri, 14 Aug 2015 14:25:57 +0200
Subject: Pixbuf: Avoid deprecations warnings that break --enable-warnings=fatal.
--- gdk/src/pixbuf.hg.orig Tue Jun 25 21:34:31 2013
+++ gdk/src/pixbuf.hg Wed Sep 23 12:21:48 2015
@@ -17,6 +17,9 @@
#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
#undef GDK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#undef GDK_PIXBUF_DISABLE_DEPRECATED
+#define GDK_PIXBUF_DISABLE_DEPRECATION_WARNINGS 1
#m4 _POP()
// This is for including the config header before any code (such as
// the #ifndef GDKMM_DISABLE_DEPRECATED in deprecated classes) is generated:

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-gdk_src_pixbufanimationiter_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gdk/src/pixbufanimationiter.hg.orig Tue Jun 25 21:34:31 2013
+++ gdk/src/pixbufanimationiter.hg Wed Sep 23 12:15:37 2015
@@ -21,6 +21,7 @@
#include <glibmm/object.h>
#include <gdkmm/pixbuf.h>
+#include <glibmm/timeval.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
_DEFS(gdkmm,gdk)

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-gdk_src_pixbufformat_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gdk/src/pixbufformat.hg.orig Tue Jun 25 21:34:31 2013
+++ gdk/src/pixbufformat.hg Wed Sep 23 12:15:37 2015
@@ -20,7 +20,7 @@
_DEFS(gdkmm,gdk)
#include <gdkmmconfig.h>
-
+#include <glibmm/arrayhandle.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _GdkPixbufFormat GdkPixbufFormat; }

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-gdk_src_rectangle_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gdk/src/rectangle.hg.orig Tue Jun 25 21:34:31 2013
+++ gdk/src/rectangle.hg Wed Sep 23 12:15:37 2015
@@ -19,6 +19,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <glibmm/value.h>
#include <gdk/gdk.h>
_DEFS(gdkmm,gdk)

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-gdk_src_rgbcmap_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gdk/src/rgbcmap.hg.orig Tue Jun 25 21:34:31 2013
+++ gdk/src/rgbcmap.hg Wed Sep 23 12:15:37 2015
@@ -24,6 +24,7 @@ _DEFS(gdkmm,gdk)
#m4 _POP()
#include <gdkmmconfig.h>
+#include <glibmm/arrayhandle.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _GdkRgbCmap GdkRgbCmap; }

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-gdk_src_types_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gdk/src/types.hg.orig Tue Jun 25 21:34:31 2013
+++ gdk/src/types.hg Wed Sep 23 12:15:37 2015
@@ -19,6 +19,8 @@
_DEFS(gdkmm,gdk)
+#include <glibmm/arrayhandle.h>
+#include <glibmm/listhandle.h>
#include <gdk/gdk.h>
#include <gdkmmconfig.h>

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-gtk_gtkmm_border_h,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gtk/gtkmm/border.h.orig Tue Jun 25 21:34:31 2013
+++ gtk/gtkmm/border.h Wed Sep 23 12:15:37 2015
@@ -22,6 +22,7 @@
*/
#include <glibmm/value.h>
+#include <gtk/gtk.h> /* For GtkBorder */
namespace Gtk
{

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-gtk_src_entrycompletion_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 9d52f886ffe556f9615f98a280d3a036a9ecf28e Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Sun, 5 Jul 2015 15:41:11 +0200
Subject: More fixes to suit newish glibmm.
--- gtk/src/entrycompletion.hg.orig Tue Jun 25 21:34:31 2013
+++ gtk/src/entrycompletion.hg Wed Sep 23 12:19:32 2015
@@ -218,7 +218,7 @@ dnl
_WRAP_PROPERTY("model", Glib::RefPtr<Gtk::TreeModel>)
_WRAP_PROPERTY("minimum_key_length", int)
- _WRAP_PROPERTY("text_column, int)
+ _WRAP_PROPERTY("text_column", int)
_WRAP_PROPERTY("inline_completion", bool)
_WRAP_PROPERTY("popup_completion", bool)
_WRAP_PROPERTY("popup_set_width", bool)

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-gtk_src_enums_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gtk/src/enums.hg.orig Tue Jun 25 21:34:31 2013
+++ gtk/src/enums.hg Wed Sep 23 12:15:37 2015
@@ -19,6 +19,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <glibmm/value.h>
#include <gtkmmconfig.h> //For GTKMM_MAEMO_EXTENSIONS_ENABLED
_DEFS(gtkmm,gtk)

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-gtk_src_main_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gtk/src/main.hg.orig Tue Jun 25 21:34:31 2013
+++ gtk/src/main.hg Wed Sep 23 12:15:37 2015
@@ -22,6 +22,7 @@
#include <sigc++/sigc++.h>
#include <gdkmm/types.h> //For GdkEventKey
+#include <glibmm/optioncontext.h>
_DEFS(gtkmm,gtk)

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-gtk_src_papersize_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 4fb3efa910a46364fa8ec4d60fcce557200e4dcb Mon Sep 17 00:00:00 2001
From: Murray Cumming <murrayc@murrayc.com>
Date: Wed, 14 Mar 2012 11:41:46 +0100
Subject: PaperSize: Correct the PaperSizeTraits pre-declaration.
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gtk/src/papersize.hg.orig Tue Jun 25 21:34:31 2013
+++ gtk/src/papersize.hg Wed Sep 23 12:15:37 2015
@@ -17,11 +17,14 @@
_DEFS(gtkmm,gtk)
+#include <glibmm/keyfile.h>
+#include <glibmm/listhandle.h>
+
namespace Gtk
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-class PaperSizeTraits;
+struct PaperSizeTraits;
#endif
/** Common paper names, from PWG 5101.1-2002 PWG: Standard for Media Standardized Names

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-gtk_src_printunixdialog_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 9d52f886ffe556f9615f98a280d3a036a9ecf28e Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Sun, 5 Jul 2015 15:41:11 +0200
Subject: More fixes to suit newish glibmm.
--- gtk/src/printunixdialog.hg.orig Tue Jun 25 21:34:31 2013
+++ gtk/src/printunixdialog.hg Wed Sep 23 12:19:32 2015
@@ -71,7 +71,7 @@ class PrintUnixDialog : public Dialog (public)
#m4 _CONVERSION(`GtkPrinter*',`Glib::RefPtr<const Printer>',`Glib::wrap($3)')
_WRAP_METHOD(Glib::RefPtr<Printer> get_selected_printer(), gtk_print_unix_dialog_get_selected_printer, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Printer> get_selected_printer() const, gtk_print_unix_dialog_get_selected_printer, refreturn. constversion)
+ _WRAP_METHOD(Glib::RefPtr<const Printer> get_selected_printer() const, gtk_print_unix_dialog_get_selected_printer, refreturn, constversion)
void add_custom_tab(const Widget& child, const Glib::ustring& tab_label);
_WRAP_METHOD(void add_custom_tab(const Widget& child, const Widget& tab_label), gtk_print_unix_dialog_add_custom_tab)

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-gtk_src_textattributes_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gtk/src/textattributes.hg.orig Tue Jun 25 21:34:31 2013
+++ gtk/src/textattributes.hg Wed Sep 23 12:15:37 2015
@@ -22,6 +22,8 @@
_DEFS(gtkmm,gtk)
+#include <glibmm/value.h>
+
namespace Gtk
{

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-gtk_src_treemodel_hg,v 1.1 2015/09/24 10:34:31 ajacoutot Exp $
From 185abd365c2898ad77dbb33a099341fa28e5a496 Mon Sep 17 00:00:00 2001
From: Kjell Ahlstedt <kjell.ahlstedt@bredband.net>
Date: Thu, 2 Jul 2015 19:53:16 +0200
Subject: Add #includes needed with glibmm newer than 2.31.0.
--- gtk/src/treemodel.hg.orig Tue Jun 25 21:34:31 2013
+++ gtk/src/treemodel.hg Wed Sep 23 12:15:37 2015
@@ -18,6 +18,7 @@
*/
#include <glibmm/interface.h>
+#include <glibmm/arrayhandle.h>
#include <gtkmm/treeiter.h>
_DEFS(gtkmm,gtk)