sci-libs/libqalculate: Fix compilation with -readline USE (#590490 by Ryoto Yayame)
authorPacho Ramos <pacho@gentoo.org>
Sun, 27 Nov 2016 12:42:58 +0000 (13:42 +0100)
committerPacho Ramos <pacho@gentoo.org>
Sun, 27 Nov 2016 12:43:52 +0000 (13:43 +0100)
Package-Manager: portage-2.3.2

sci-libs/libqalculate/files/libqalculate-0.9.9-readline.patch [new file with mode: 0644]
sci-libs/libqalculate/libqalculate-0.9.9.ebuild

diff --git a/sci-libs/libqalculate/files/libqalculate-0.9.9-readline.patch b/sci-libs/libqalculate/files/libqalculate-0.9.9-readline.patch
new file mode 100644 (file)
index 0000000..ab2a5a0
--- /dev/null
@@ -0,0 +1,13 @@
+diff -ru libqalculate-0.9.9.orig/src/qalc.cc libqalculate-0.9.9/src/qalc.cc
+--- libqalculate-0.9.9.orig/src/qalc.cc        2016-07-26 14:41:40.000000000 +0200
++++ libqalculate-0.9.9/src/qalc.cc     2016-08-04 18:27:36.553906707 +0200
+@@ -3179,7 +3179,9 @@
+               if(!file) {
+                       g_free(gstr_file);
+                       g_free(gstr_oldfile);
++#ifdef HAVE_LIBREADLINE
+                       g_free(historyfile);
++#endif
+                       first_time = true;
+                       set_saved_mode();
+                       return;
index 513479bf33da973a55cdf8a4d4d5cc1abd5ffe9c..6d6541cd4b7e8f1ea93c2c26c1d4f4b086ab20f6 100644 (file)
@@ -27,6 +27,11 @@ RDEPEND="${COMMON_DEPEND}
        net-misc/wget
        gnuplot? ( >=sci-visualization/gnuplot-3.7 )"
 
+PATCHES=(
+       # https://github.com/Qalculate/libqalculate/issues/6
+       "${FILESDIR}"/${P}-readline.patch
+)
+
 src_prepare() {
        default