Make the 'Gtk' branch compile on Fedora 20

Linus Torvalds torvalds at linux-foundation.org
Tue Jan 7 16:55:34 UTC 2014


This makes our old Gtk branch work with F20, using gtk3.

Not seriously tested, and there are a few warnings, but it seems to
superficially work. Since the gtk3 support infrastructure was already
merged long ago, there's only one actual change to the source code,
the rest is all just the package name changes for gtk3 and the change
to the osmgpsmaps naming.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
-------------- next part --------------
 Makefile  | 8 ++++----
 gtk-gui.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 5b8d345d8fb8..333a82f2b878 100644
--- a/Makefile
+++ b/Makefile
@@ -117,7 +117,7 @@ endif
 # about it if it doesn't.
 LIBUSB = $(shell $(PKGCONFIG) --libs libusb-1.0 2> /dev/null)
 
-LIBGTK = $(shell $(PKGCONFIG) --libs gtk+-2.0 glib-2.0)
+LIBGTK = $(shell $(PKGCONFIG) --libs gtk+-3.0 glib-2.0)
 LIBDIVECOMPUTERCFLAGS = $(LIBDIVECOMPUTERINCLUDES)
 LIBDIVECOMPUTER = $(LIBDIVECOMPUTERARCHIVE) $(LIBUSB)
 
@@ -125,10 +125,10 @@ LIBXML2 = $(shell $(XML2CONFIG) --libs)
 LIBXSLT = $(shell $(XSLCONFIG) --libs)
 XML2CFLAGS = $(shell $(XML2CONFIG) --cflags)
 GLIB2CFLAGS = $(shell $(PKGCONFIG) --cflags glib-2.0)
-GTKCFLAGS = $(shell $(PKGCONFIG) --cflags gtk+-2.0)
+GTKCFLAGS = $(shell $(PKGCONFIG) --cflags gtk+-3.0)
 CFLAGS += $(shell $(XSLCONFIG) --cflags)
-OSMGPSMAPFLAGS += $(shell $(PKGCONFIG) --cflags osmgpsmap 2> /dev/null)
-LIBOSMGPSMAP += $(shell $(PKGCONFIG) --libs osmgpsmap 2> /dev/null)
+OSMGPSMAPFLAGS += $(shell $(PKGCONFIG) --cflags osmgpsmap-1.0 2> /dev/null)
+LIBOSMGPSMAP += $(shell $(PKGCONFIG) --libs osmgpsmap-1.0 2> /dev/null)
 ifneq ($(strip $(LIBOSMGPSMAP)),)
 	GPSOBJ = gps.o
 	CFLAGS += -DHAVE_OSM_GPS_MAP
diff --git a/gtk-gui.c b/gtk-gui.c
index be985a85abc1..2e730285cc38 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1289,7 +1289,7 @@ static void about_dialog(GtkWidget *w, gpointer data)
 #else
 	g_signal_connect(GTK_ABOUT_DIALOG(dialog), "activate-link", G_CALLBACK(about_dialog_link_cb), NULL);
 #endif
-	g_object_set(GTK_OBJECT(dialog),
+	g_object_set(G_OBJECT(dialog),
 		"title", _("About Subsurface"),
 		"program-name", "Subsurface",
 		"comments", _("Multi-platform divelog software in C"),


More information about the subsurface mailing list