[gimp] configure, tools: actually use GIMP_PKGCONFIG_VERSION and...
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] configure, tools: actually use GIMP_PKGCONFIG_VERSION and...
- Date: Fri, 15 Jun 2018 15:24:35 +0000 (UTC)
commit 276d9b60b34b2cde895a858f98210848489ac87f
Author: Jehan <jehan girinstud io>
Date: Fri Jun 15 17:10:21 2018 +0200
configure, tools: actually use GIMP_PKGCONFIG_VERSION and...
... GIMP_TOOL_VERSION rather than hardcoding versions.
We may still have issues with "gtk+-3.0", but let's let this one slip
for now.
configure.ac | 6 ++++++
tools/gimptool.c | 20 +++++++++++---------
2 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a02fa40003..bb40160c8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,12 @@ AC_SUBST(GIMP_USER_VERSION)
AC_SUBST(GIMP_UNSTABLE)
AC_SUBST(GIMP_FULL_NAME)
+# Version strings used in some source, though it seems unnecessary to
+# declare them in the public API (libgimpbase/gimpversion.h).
+AC_DEFINE(GIMP_PKGCONFIG_VERSION, "gimp_pkgconfig_version",
+ [libgimp pkg-config version])
+AC_DEFINE(GIMP_TOOL_VERSION, "gimp_tool_version",
+ [GIMP tools version])
# These are used in the .pc files
GLIB_REQUIRED_VERSION=glib_required_version
diff --git a/tools/gimptool.c b/tools/gimptool.c
index 8f2c7e3698..40476d9f13 100644
--- a/tools/gimptool.c
+++ b/tools/gimptool.c
@@ -23,6 +23,8 @@
* platforms.
*/
+#include "config.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -214,7 +216,7 @@ get_runtime_prefix (gchar slash)
exit (EXIT_FAILURE);
#else
/* On Unix assume the executable package is in the same prefix as the developer stuff */
- return pkg_config ("--variable=prefix gimp-3.0");
+ return pkg_config ("--variable=prefix gimp-" GIMP_PKGCONFIG_VERSION);
#endif
}
@@ -302,7 +304,7 @@ static void
usage (int exit_status)
{
g_print ("\
-Usage: gimptool-2.0 [OPTION]...\n\
+Usage: gimptool-" GIMP_TOOL_VERSION " [OPTION]...\n\
\n\
General options:\n\
--help print this message\n\
@@ -355,7 +357,7 @@ not libgimpui, append -nogimpui.\n");
static gchar *
get_includedir (void)
{
- return pkg_config ("--variable=includedir gimp-3.0");
+ return pkg_config ("--variable=includedir gimp-" GIMP_PKGCONFIG_VERSION);
}
static void
@@ -370,7 +372,7 @@ do_includedir (void)
static gchar *
get_cflags (void)
{
- return pkg_config ("--cflags gimpui-3.0");
+ return pkg_config ("--cflags gimpui-" GIMP_PKGCONFIG_VERSION);
}
static void
@@ -385,7 +387,7 @@ do_cflags (void)
static gchar *
get_cflags_noui (void)
{
- return pkg_config ("--cflags gimp-3.0");
+ return pkg_config ("--cflags gimp-" GIMP_PKGCONFIG_VERSION);
}
static void
@@ -400,7 +402,7 @@ do_cflags_noui (void)
static gchar *
get_cflags_nogimpui (void)
{
- return pkg_config ("--cflags gimp-3.0 gtk+-3.0");
+ return pkg_config ("--cflags gimp-" GIMP_PKGCONFIG_VERSION " gtk+-3.0");
}
static void
@@ -415,7 +417,7 @@ do_cflags_nogimpui (void)
static gchar *
get_libs (void)
{
- return pkg_config ("--libs gimpui-3.0");
+ return pkg_config ("--libs gimpui-" GIMP_PKGCONFIG_VERSION);
}
static void
@@ -430,7 +432,7 @@ do_libs (void)
static gchar *
get_libs_noui (void)
{
- return pkg_config ("--libs gimp-3.0");
+ return pkg_config ("--libs gimp-" GIMP_PKGCONFIG_VERSION);
}
static void
@@ -445,7 +447,7 @@ do_libs_noui (void)
static gchar *
get_libs_nogimpui (void)
{
- return pkg_config ("--libs gimp-3.0 gtk+-3.0");
+ return pkg_config ("--libs gimp-" GIMP_PKGCONFIG_VERSION " gtk+-3.0");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]