[140238] trunk/dports/finance/ledger

khindenburg at macports.org khindenburg at macports.org
Sun Sep 13 17:01:02 PDT 2015


Revision: 140238
          https://trac.macports.org/changeset/140238
Author:   khindenburg at macports.org
Date:     2015-09-13 17:01:02 -0700 (Sun, 13 Sep 2015)
Log Message:
-----------
ledger: add patch to fix current build failures with boost-1.58 #47597; maintainer timeout

Modified Paths:
--------------
    trunk/dports/finance/ledger/Portfile

Added Paths:
-----------
    trunk/dports/finance/ledger/files/
    trunk/dports/finance/ledger/files/ledger-3.1-boost-1.58.patch

Modified: trunk/dports/finance/ledger/Portfile
===================================================================
--- trunk/dports/finance/ledger/Portfile	2015-09-13 20:27:36 UTC (rev 140237)
+++ trunk/dports/finance/ledger/Portfile	2015-09-14 00:01:02 UTC (rev 140238)
@@ -42,6 +42,9 @@
                     port:ncurses \
                     port:gettext
 
+patchfiles          ledger-3.1-boost-1.58.patch
+patch.pre_args      -p1
+
 # Needs a compiler that supports c++11. Do we need to whitelist?
 
 configure.cmd       ${worksrcpath}/acprep opt config

Added: trunk/dports/finance/ledger/files/ledger-3.1-boost-1.58.patch
===================================================================
--- trunk/dports/finance/ledger/files/ledger-3.1-boost-1.58.patch	                        (rev 0)
+++ trunk/dports/finance/ledger/files/ledger-3.1-boost-1.58.patch	2015-09-14 00:01:02 UTC (rev 140238)
@@ -0,0 +1,107 @@
+diff --git a/src/account.h b/src/account.h
+index 7411dfc..23384db 100644
+--- a/src/account.h
++++ b/src/account.h
+@@ -261,11 +261,7 @@ public:
+   mutable optional<xdata_t> xdata_;
+ 
+   bool has_xdata() const {
+-#if BOOST_VERSION >= 105600
+-    return xdata_ != NULL;
+-#else
+-    return xdata_;
+-#endif
++    return xdata_ != boost::none;
+   }
+   void clear_xdata();
+   xdata_t& xdata() {
+diff --git a/src/filters.cc b/src/filters.cc
+index bdc2983..a11dcdd 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/item.h b/src/item.h
+index 767a071..8cb3c3d 100644
+--- a/src/item.h
++++ b/src/item.h
+@@ -191,11 +191,7 @@ public:
+   static bool use_aux_date;
+ 
+   virtual bool has_date() const {
+-#if BOOST_VERSION >= 105600
+-    return _date != NULL;
+-#else
+-    return _date;
+-#endif
++    return _date != boost::none;
+   }
+ 
+   virtual date_t date() const {
+diff --git a/src/iterators.cc b/src/iterators.cc
+index fd6cde6..742db43 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();
+ 
+diff --git a/src/parser.h b/src/parser.h
+index a056493..0d9d07b 100644
+--- a/src/parser.h
++++ b/src/parser.h
+@@ -118,7 +118,7 @@ public:
+ 
+   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 d04be26..8070f3d 100644
+--- a/src/post.h
++++ b/src/post.h
+@@ -205,11 +205,7 @@ public:
+   mutable optional<xdata_t> xdata_;
+ 
+   bool has_xdata() const {
+-#if BOOST_VERSION >= 105600
+-    return xdata_ != NULL;
+-#else
+-    return xdata_;
+-#endif
++    return xdata_ != boost::none;
+   }
+   void clear_xdata() {
+     xdata_ = none;
+diff --git a/src/times.h b/src/times.h
+index 0000758..1d8f121 100644
+--- a/src/times.h
++++ b/src/times.h
+@@ -568,11 +568,7 @@ public:
+   void   stabilize(const optional<date_t>& date = none);
+ 
+   bool   is_valid() const {
+-#if BOOST_VERSION >= 105600
+-    return start != NULL;
+-#else
+-    return start;
+-#endif
++    return start != boost::none;
+   }
+ 
+   /** Find the current or next period containing date.  Returns false if
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150913/d36c7b8e/attachment.html>


More information about the macports-changes mailing list