Hello community,

here is the log from the commit of package ledger for openSUSE:Factory checked 
in at 2015-08-03 17:22:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ledger (Old)
 and      /work/SRC/openSUSE:Factory/.ledger.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ledger"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ledger/ledger.changes    2015-02-06 
22:38:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ledger.new/ledger.changes       2015-08-03 
17:22:20.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Aug  2 20:42:30 UTC 2015 - [email protected]
+
+- Fix build with boost 1.58:
+  * add ledger-3.1-convert-boost::optional-objects-to-bool-explicitly.patch
+  * add ledger-3.1-fix-build-with-boost-1.58.patch
+
+-------------------------------------------------------------------

New:
----
  ledger-3.1-convert-boost::optional-objects-to-bool-explicitly.patch
  ledger-3.1-fix-build-with-boost-1.58.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ledger.spec ++++++
--- /var/tmp/diff_new_pack.94mamf/_old  2015-08-03 17:22:21.000000000 +0200
+++ /var/tmp/diff_new_pack.94mamf/_new  2015-08-03 17:22:21.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ledger
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,10 @@
 Group:          Productivity/Office/Finance
 Url:            https://github.com/%{name}/%{name}
 Source:         https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz
+# PATCH-FIX-UPSTREAM 
ledger-3.1-convert-boost::optional-objects-to-bool-explicitly.patch -- picked 
from upstream
+Patch0:         
ledger-3.1-convert-boost::optional-objects-to-bool-explicitly.patch
+# PATCH-FIX-UPSTREAM ledger-3.1-fix-build-with-boost-1.58.patch -- picked from 
upstream
+Patch1:         ledger-3.1-fix-build-with-boost-1.58.patch
 BuildRequires:  boost-devel
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
@@ -40,6 +44,8 @@
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 %cmake -DBUILD_LIBRARY=OFF

++++++ ledger-3.1-convert-boost::optional-objects-to-bool-explicitly.patch 
++++++
>From bcaca24de4264f89a94069701361988007e22e58 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <[email protected]>
Date: Mon, 27 Jul 2015 20:37:16 +0100
Subject: [PATCH] Convert boost::optional objects to bool explicitly.

Fixes #417.
---
 src/account.h | 6 +-----
 src/item.h    | 6 +-----
 src/parser.h  | 2 +-
 src/post.h    | 6 +-----
 src/times.h   | 6 +-----
 5 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/src/account.h b/src/account.h
index 7fae93e..7de4e56 100644
--- a/src/account.h
+++ b/src/account.h
@@ -261,11 +261,7 @@ class account_t : public supports_flags<>, public scope_t
   mutable optional<xdata_t> xdata_;
 
   bool has_xdata() const {
-#if BOOST_VERSION >= 105600
-    return xdata_ != NULL;
-#else
-    return xdata_;
-#endif
+    return static_cast<bool>(xdata_);
   }
   void clear_xdata();
   xdata_t& xdata() {
diff --git a/src/item.h b/src/item.h
index ba81217..dbba53a 100644
--- a/src/item.h
+++ b/src/item.h
@@ -174,11 +174,7 @@ class item_t : public supports_flags<uint_least16_t>, 
public scope_t
   static bool use_aux_date;
 
   virtual bool has_date() const {
-#if BOOST_VERSION >= 105600
-    return _date != NULL;
-#else
-    return _date;
-#endif
+    return static_cast<bool>(_date);
   }
 
   virtual date_t date() const {
diff --git a/src/parser.h b/src/parser.h
index e46fc71..25c4a7e 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -118,7 +118,7 @@ class expr_t::parser_t : public noncopyable
 
   ptr_op_t parse(std::istream&           in,
                  const parse_flags_t&    flags           = PARSE_DEFAULT,
-                 const optional<string>& original_string = NULL);
+                 const optional<string>& original_string = boost::none);
 };
 
 } // namespace ledger
diff --git a/src/post.h b/src/post.h
index 0fb45e9..5f22fa3 100644
--- a/src/post.h
+++ b/src/post.h
@@ -205,11 +205,7 @@ class post_t : public item_t
   mutable optional<xdata_t> xdata_;
 
   bool has_xdata() const {
-#if BOOST_VERSION >= 105600
-    return xdata_ != NULL;
-#else
-    return xdata_;
-#endif
+    return static_cast<bool>(xdata_);
   }
   void clear_xdata() {
     xdata_ = none;
diff --git a/src/times.h b/src/times.h
index 421d146..e1a9e84 100644
--- a/src/times.h
+++ b/src/times.h
@@ -500,11 +500,7 @@ class date_interval_t : public 
equality_comparable<date_interval_t>
   void   stabilize(const optional<date_t>& date = none);
 
   bool   is_valid() const {
-#if BOOST_VERSION >= 105600
-    return start != NULL;
-#else
-    return start;
-#endif
+    return static_cast<bool>(start);
   }
 
   /** Find the current or next period containing date.  Returns false if
++++++ ledger-3.1-fix-build-with-boost-1.58.patch ++++++
>From a1cb25ad2d9a98ea9ec0bb3ee27fe3cde6046434 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johann=20Kl=C3=A4hn?= <[email protected]>
Date: Sun, 10 May 2015 13:41:26 +0200
Subject: [PATCH] fix build for boost 1.58

---
 src/filters.cc   | 2 +-
 src/iterators.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/filters.cc b/src/filters.cc
index 2f97a0e..b6530c0 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -707,7 +707,7 @@ namespace {
     insert_prices_in_map(price_map_t& _all_prices)
       : all_prices(_all_prices) {}
 
-    void operator()(datetime_t& date, const amount_t& price) {
+    void operator()(const datetime_t& date, const amount_t& price) {
       all_prices.insert(price_map_t::value_type(date, price));
     }
   };
diff --git a/src/iterators.cc b/src/iterators.cc
index 21bec5d..0225e21 100644
--- a/src/iterators.cc
+++ b/src/iterators.cc
@@ -96,7 +96,7 @@ namespace {
       TRACE_DTOR(create_price_xact);
     }
 
-    void operator()(datetime_t& date, const amount_t& price) {
+    void operator()(const datetime_t& date, const amount_t& price) {
       xact_t * xact;
       string   symbol = price.commodity().symbol();
 

Reply via email to