File gpredict-goocanvas3.patch of Package gpredict
From 86fb71aad0bba311268352539b61225bf1f1e279 Mon Sep 17 00:00:00 2001
From: Alexandru Csete <oz9aec@gmail.com>
Date: Sat, 20 Feb 2021 14:42:37 +0100
Subject: [PATCH] Add support for GooCanvas 3
If GooCanvas 2 is not available, check for version 3.
Issue #246.
---
configure.ac | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
Index: gpredict-2.2.1/configure.ac
===================================================================
--- gpredict-2.2.1.orig/configure.ac
+++ gpredict-2.2.1/configure.ac
@@ -45,11 +45,11 @@ else
fi
# check for goocanvas (depends on gtk and glib)
-if pkg-config --atleast-version=2.0 goocanvas-2.0; then
- CFLAGS="$CFLAGS `pkg-config --cflags goocanvas-2.0`"
- LIBS="$LIBS `pkg-config --libs goocanvas-2.0`"
+if pkg-config --atleast-version=3.0 goocanvas-3.0; then
+ CFLAGS="$CFLAGS `pkg-config --cflags goocanvas-3.0`"
+ LIBS="$LIBS `pkg-config --libs goocanvas-3.0`"
else
- AC_MSG_ERROR(Gpredict requires libgoocanvas-2.0-dev)
+ AC_MSG_ERROR(Gpredict requires libgoocanvas-3.0-dev)
fi
# check for libgps (optional)
@@ -93,7 +93,7 @@ GIO_V=`pkg-config --modversion gio-2.0`
GTHR_V=`pkg-config --modversion gthread-2.0`
GDK_V=`pkg-config --modversion gdk-3.0`
GTK_V=`pkg-config --modversion gtk+-3.0`
-GOOC_V=`pkg-config --modversion goocanvas-2.0`
+GOOC_V=`pkg-config --modversion goocanvas-3.0`
CURL_V=`pkg-config --modversion libcurl`
if test "$havelibgps" = true ; then
GPS_V=`pkg-config --modversion libgps`