unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30017] [PATCH] gnu: ledger: Fix test failures.
@ 2018-01-07 18:39 ericbavier
  2018-01-08  8:48 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: ericbavier @ 2018-01-07 18:39 UTC (permalink / raw)
  To: 30017; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/patches/ledger-revert-boost-python-fix.patch,
gnu/packages/patches/ledger-fix-uninitialized.patch: New patches.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/finance.scm (ledger)[source]: Use them.
---
 gnu/local.mk                                       |  2 ++
 gnu/packages/finance.scm                           |  6 +++-
 .../patches/ledger-fix-uninitialized.patch         | 27 +++++++++++++++
 .../patches/ledger-revert-boost-python-fix.patch   | 39 ++++++++++++++++++++++
 4 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/ledger-fix-uninitialized.patch
 create mode 100644 gnu/packages/patches/ledger-revert-boost-python-fix.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e9ee25e4a..7c84580e6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -791,6 +791,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/ldc-disable-tests.patch			\
   %D%/packages/patches/ldc-1.1.0-disable-dmd-tests.patch	\
   %D%/packages/patches/ldc-1.1.0-disable-phobos-tests.patch	\
+  %D%/packages/patches/ledger-fix-uninitialized.patch		\
+  %D%/packages/patches/ledger-revert-boost-python-fix.patch	\
   %D%/packages/patches/liba52-enable-pic.patch			\
   %D%/packages/patches/liba52-link-with-libm.patch		\
   %D%/packages/patches/liba52-set-soname.patch			\
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 8d2b734d9..be208bd1c 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
+;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,6 +30,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system python)
+  #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
@@ -130,7 +132,9 @@ line client and a client based on Qt.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "12jlv3gsjhrja25q9hrwh73cdacd2l3c2yyn8qnijav9mdhnbw4h"))))
+                "12jlv3gsjhrja25q9hrwh73cdacd2l3c2yyn8qnijav9mdhnbw4h"))
+              (patches (search-patches "ledger-revert-boost-python-fix.patch"
+                                       "ledger-fix-uninitialized.patch"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((guix build cmake-build-system)
diff --git a/gnu/packages/patches/ledger-fix-uninitialized.patch b/gnu/packages/patches/ledger-fix-uninitialized.patch
new file mode 100644
index 000000000..e8d4a6dea
--- /dev/null
+++ b/gnu/packages/patches/ledger-fix-uninitialized.patch
@@ -0,0 +1,27 @@
+This fixes failures of tests "BaseLine_opt-datetime-format" and
+"BaseLine_opt-time-report", which were printing a unexpected trailing '*' on
+the last line of output, e.g.:
+
+  @@ -5,4 +5,4 @@
+     04/05/13 12:00 PM    04/05/13 01:30 PM       1.50h    Lunch
+     04/05/13 11:30 AM    04/05/13 12:00 PM       30.0m    Walk
+   --------------------------------------------------
+  -
+  +                                          *
+
+Reported upstream at
+https://groups.google.com/d/msg/ledger-cli/EeJUrUk8YDc/pIR-LOTVEAAJ
+
+diff --git a/src/account.h b/src/account.h
+index 1b97463d..f2555593 100644
+--- a/src/account.h
++++ b/src/account.h
+@@ -187,7 +187,7 @@ public:
+
+       datetime_t         earliest_checkin;
+       datetime_t         latest_checkout;
+-      bool               latest_checkout_cleared;
++      bool               latest_checkout_cleared = false;
+
+       std::set<path>     filenames;
+       std::set<string>   accounts_referenced;
diff --git a/gnu/packages/patches/ledger-revert-boost-python-fix.patch b/gnu/packages/patches/ledger-revert-boost-python-fix.patch
new file mode 100644
index 000000000..99f48f6e4
--- /dev/null
+++ b/gnu/packages/patches/ledger-revert-boost-python-fix.patch
@@ -0,0 +1,39 @@
+From 01220484f428a447e9b00e071a0d85185f30e1de Mon Sep 17 00:00:00 2001
+From: Alexis Hildebrandt <afh@surryhill.net>
+Date: Wed, 22 Jun 2016 15:43:37 +0200
+Subject: [PATCH] Revert "[python] Add fix for Boost.Python compile errors"
+
+This reverts commit 11590e134eafa768ccc4a171cc7fb216e906095f.
+---
+ src/py_commodity.cc | 3 ---
+ src/py_journal.cc   | 3 ---
+ 2 files changed, 6 deletions(-)
+
+diff --git a/src/py_commodity.cc b/src/py_commodity.cc
+index 5aafa6c..c457e64 100644
+--- a/src/py_commodity.cc
++++ b/src/py_commodity.cc
+@@ -243,9 +243,6 @@ namespace {
+
+ void export_commodity()
+ {
+-#if BOOST_VERSION >= 106000
+-  python::register_ptr_to_python< shared_ptr<commodity_pool_t> >();
+-#endif
+   class_< commodity_pool_t, shared_ptr<commodity_pool_t>,
+           boost::noncopyable > ("CommodityPool", no_init)
+     .add_property("null_commodity",
+diff --git a/src/py_journal.cc b/src/py_journal.cc
+index c1c38a9..879f954 100644
+--- a/src/py_journal.cc
++++ b/src/py_journal.cc
+@@ -232,9 +232,6 @@ void export_journal()
+           boost::noncopyable >("PostHandler")
+     ;
+
+-#if BOOST_VERSION >= 106000
+-  python::register_ptr_to_python< shared_ptr<collector_wrapper> >();
+-#endif
+   class_< collector_wrapper, shared_ptr<collector_wrapper>,
+           boost::noncopyable >("PostCollectorWrapper", no_init)
+     .def("__len__", &collector_wrapper::length)
--
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#30017] [PATCH] gnu: ledger: Fix test failures.
  2018-01-07 18:39 [bug#30017] [PATCH] gnu: ledger: Fix test failures ericbavier
@ 2018-01-08  8:48 ` Ludovic Courtès
  2018-01-08 23:46   ` bug#30017: " Eric Bavier
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2018-01-08  8:48 UTC (permalink / raw)
  To: ericbavier; +Cc: 30017, Eric Bavier

ericbavier@centurylink.net skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/patches/ledger-revert-boost-python-fix.patch,
> gnu/packages/patches/ledger-fix-uninitialized.patch: New patches.
> * gnu/local.mk (dist_patch_DATA): Add them.
> * gnu/packages/finance.scm (ledger)[source]: Use them.

Excellent, I say go for it!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#30017: [PATCH] gnu: ledger: Fix test failures.
  2018-01-08  8:48 ` Ludovic Courtès
@ 2018-01-08 23:46   ` Eric Bavier
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Bavier @ 2018-01-08 23:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30017-done

On Mon, 08 Jan 2018 09:48:04 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> ericbavier@centurylink.net skribis:
> 
> > From: Eric Bavier <bavier@member.fsf.org>
> >
> > * gnu/packages/patches/ledger-revert-boost-python-fix.patch,
> > gnu/packages/patches/ledger-fix-uninitialized.patch: New patches.
> > * gnu/local.mk (dist_patch_DATA): Add them.
> > * gnu/packages/finance.scm (ledger)[source]: Use them.  
> 
> Excellent, I say go for it!

Great, pushed in 5424f9bcab01d7017550d79cdf42daea87151da0

`~Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-09  4:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-07 18:39 [bug#30017] [PATCH] gnu: ledger: Fix test failures ericbavier
2018-01-08  8:48 ` Ludovic Courtès
2018-01-08 23:46   ` bug#30017: " Eric Bavier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).