qalc: Be silent if gnuplot is not detected
authorFredrik Fornwall <fredrik@fornwall.net>
Thu, 31 Aug 2017 14:14:36 +0000 (16:14 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 31 Aug 2017 14:14:36 +0000 (16:14 +0200)
packages/qalc/libqalculate-Calculator.cc.patch [new file with mode: 0644]

diff --git a/packages/qalc/libqalculate-Calculator.cc.patch b/packages/qalc/libqalculate-Calculator.cc.patch
new file mode 100644 (file)
index 0000000..a5488fe
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../libqalculate-2.0.0/libqalculate/Calculator.cc ./libqalculate/Calculator.cc
+--- ../libqalculate-2.0.0/libqalculate/Calculator.cc   2017-08-27 21:38:22.000000000 +0200
++++ ./libqalculate/Calculator.cc       2017-08-31 16:09:58.987236004 +0200
+@@ -9360,7 +9360,7 @@
+       char filename[MAX_PATH]; 
+       return SearchPath(NULL, "gnuplot", ".exe", MAX_PATH, filename, &lpFilePart);
+ #else
+-      FILE *pipe = popen("gnuplot -", "w");
++      FILE *pipe = popen("gnuplot - 2> /dev/null", "w");
+       if(!pipe) return false;
+       return pclose(pipe) == 0;
+ #endif