From f8e1d3b9c83cc3d55c8f1ac8a1c02f36b278a4e2 Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 1 Jan 2018 21:57:34 +0100 Subject: [PATCH] app, configure: adding dependency to mypaint-brushes. This ensures that MyPaint default brushes are installed, otherwise this makes the MyPaint brush tool quite useless and confusing unless MyPaint is installed (which was making MyPaint a de-facto dependency of GIMP until this commit!). Also we won't have to guess anymore the right path for these brushs. The path will be known at compile time. --- app/config/Makefile.am | 1 + app/config/gimpcoreconfig.c | 24 +----------------------- configure.ac | 2 ++ 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/app/config/Makefile.am b/app/config/Makefile.am index ecc9a20423..7780250d9e 100644 --- a/app/config/Makefile.am +++ b/app/config/Makefile.am @@ -25,6 +25,7 @@ AM_CPPFLAGS = \ $(GEGL_CFLAGS) \ $(CAIRO_CFLAGS) \ $(GDK_PIXBUF_CFLAGS) \ + $(MYPAINT_BRUSHES_CFLAGS) \ -I$(includedir) noinst_LIBRARIES = libappconfig.a diff --git a/app/config/gimpcoreconfig.c b/app/config/gimpcoreconfig.c index e6058781c3..cec2c6293e 100644 --- a/app/config/gimpcoreconfig.c +++ b/app/config/gimpcoreconfig.c @@ -261,20 +261,8 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass) GIMP_CONFIG_PARAM_RESTART); g_free (path); -#if 0 - /* FIXME these are useful dirs, disabled until we figure how to - * properly generate a default gimprc - */ - dir1 = g_build_filename (DATADIR, "mypaint", "brushes", NULL); - dir2 = g_build_filename (g_get_user_data_dir (), "mypaint", "brushes", NULL); -#endif path = g_build_path (G_SEARCHPATH_SEPARATOR_S, - "/usr/share/mypaint/brushes", - "/usr/local/share/mypaint/brushes", -#if 0 - dir1, - dir2, -#endif + MYPAINT_BRUSHES_DIR, "~/.mypaint/brushes", NULL); GIMP_CONFIG_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH, @@ -285,15 +273,8 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass) GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_RESTART); g_free (path); -#if 0 - g_free (dir1); -#endif path = g_build_path (G_SEARCHPATH_SEPARATOR_S, -#if 0 - /* FIXME see above */ - dir2, -#endif "~/.mypaint/brushes", NULL); GIMP_CONFIG_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH_WRITABLE, @@ -304,9 +285,6 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass) GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_RESTART); g_free (path); -#if 0 - g_free (dir2); -#endif path = gimp_config_build_data_path ("patterns"); GIMP_CONFIG_PROP_PATH (object_class, PROP_PATTERN_PATH, diff --git a/configure.ac b/configure.ac index 04429b8adf..156085a85f 100644 --- a/configure.ac +++ b/configure.ac @@ -1672,6 +1672,8 @@ AM_CONDITIONAL(HAVE_WEBP, test "x$have_webp" = xyes) PKG_CHECK_MODULES(LIBMYPAINT, libmypaint >= libmypaint_required_version,, [add_deps_error([libmypaint >= libmypaint_required_version])]) +PKG_CHECK_MODULES(MYPAINT_BRUSHES, mypaint-brushes-1.0,, + [add_deps_error([mypaint-brushes-1.0])]) ################## # Check for webkit