Skip to content

Commit

Permalink
gconfmm: Fix build with glib 2.67.3 and later
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandesign committed May 13, 2024
1 parent f599c0f commit 572b3fa
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gnome/gconfmm/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ long_description \
maintainers nomaintainer
categories gnome
license LGPL-2.1+
homepage https://www.gtkmm.org/
homepage https://gitlab.gnome.org/Archive/${name}
master_sites gnome:sources/${name}/${branch}/
use_xz yes

Expand All @@ -29,7 +29,8 @@ depends_build path:bin/pkg-config:pkgconfig \
depends_lib port:glibmm \
port:gconf

patchfiles patch-configure.ac.diff
patchfiles patch-configure.ac.diff \
gconfmm26-2.28.3-no-extern-c-glib-includes.patch

compiler.cxx_standard 2011

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Fix:

error: templates must have C++ linkage

https://gitlab.gnome.org/GNOME/glib/-/issues/2331
https://src.fedoraproject.org/rpms/gconfmm26/blob/4e74a371eef957bbd581cc0501ef110bb7861794/f/gconfmm26-2.28.3-no-extern-c-glib-includes.patch
--- gconf/gconfmm/callback.h 2011-10-18 11:33:49.000000000 -0400
+++ gconf/gconfmm/callback.h 2021-02-13 09:21:06.167235506 -0500
@@ -22,10 +22,7 @@
#ifndef GCONFMM_CALLBACK_H
#define GCONFMM_CALLBACK_H

-extern "C"
-{
#include <gconf/gconf-client.h>
-}

#include <glibmm/object.h>
#include <gconfmm/entry.h>
diff -Naur gconf/gconfmm/schema.h gconf/gconfmm/schema.h
--- gconf/gconfmm/schema.h 2011-10-21 04:51:27.000000000 -0400
+++ gconf/gconfmm/schema.h 2021-02-13 09:21:24.616354041 -0500
@@ -31,10 +31,8 @@
#include <gconfmm/value.h>


-extern "C" {
// TODO: do not include this.
#include <gconf/gconf-schema.h>
-}

namespace Gnome
{
diff -Naur gconf/src/schema.hg gconf/src/schema.hg
--- gconf/src/schema.hg 2011-10-18 11:33:49.000000000 -0400
+++ gconf/src/schema.hg 2021-02-13 09:21:58.002568546 -0500
@@ -24,10 +24,8 @@

_DEFS(gconfmm,gconf)

-extern "C" {
// TODO: do not include this.
#include <gconf/gconf-schema.h>
-}

namespace Gnome
{

0 comments on commit 572b3fa

Please sign in to comment.