summarylogtreecommitdiffstats
path: root/fix-build-without-gconf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'fix-build-without-gconf.patch')
-rw-r--r--fix-build-without-gconf.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/fix-build-without-gconf.patch b/fix-build-without-gconf.patch
new file mode 100644
index 000000000000..f8735a3aced1
--- /dev/null
+++ b/fix-build-without-gconf.patch
@@ -0,0 +1,55 @@
+diff -Naur agave-0.4.7.orig/src/gcs-conf.cc agave-0.4.7/src/gcs-conf.cc
+--- agave-0.4.7.orig/src/gcs-conf.cc 2008-02-26 04:07:02.000000000 +0100
++++ agave-0.4.7/src/gcs-conf.cc 2018-09-05 13:00:23.733940123 +0200
+@@ -26,6 +26,7 @@
+ #include "config.h"
+ #include "gcs-conf.h"
+ #include "core/gcs-color.h"
++#include <glibmm.h>
+ #ifdef HAVE_GCONFMM
+ #include <gconfmm/client.h>
+ #include <gconfmm/value.h>
+@@ -36,6 +37,7 @@
+ // gconf recommends storing enumerations as strings rather than integers
+ // since it's more robust against changes in enumeration order and is more
+ // human-readable. This is a helper for gconf_string_to_enum and vice versa
++#ifdef HAVE_GCONFMM
+ static GConfEnumStringPair schemetype_lookup_table[] =
+ {
+ { SCHEME_COMPLEMENTS, "COMPLEMENTS" },
+@@ -59,6 +61,7 @@
+ operator double() { return get_float(); }
+ operator float() { return get_float(); }
+ };
++#endif // HAVE_GCONFMM
+
+ const Glib::ustring Conf::APP_DIR = "/apps/agave";
+
+@@ -128,8 +131,10 @@
+
+ void Conf::set_last_scheme_type(tSchemeType t)
+ {
++#ifdef HAVE_GCONFMM
+ Glib::ustring schemetype_string = gconf_enum_to_string(schemetype_lookup_table, t);
+ set_value(KEY_LAST_SCHEME_TYPE, schemetype_string);
++#endif // HAVE_GCONFMM
+ }
+
+
+@@ -137,12 +142,16 @@
+ {
+ Glib::ustring scheme_type;
+ tSchemeType t;
++#ifdef HAVE_GCONFMM
+ if (!get_value(KEY_LAST_SCHEME_TYPE, scheme_type) ||
+ !gconf_string_to_enum(schemetype_lookup_table,
+ scheme_type.c_str(), reinterpret_cast<int*>(&t)))
+ {
++#endif // HAVE_GCONFMM
+ t = SCHEME_TRIADS;
++#ifdef HAVE_GCONFMM
+ }
++#endif // HAVE_GCONFMM
+ return t;
+ }
+