diff --git a/422.patch b/422.patch deleted file mode 100644 index 0d6c284..0000000 --- a/422.patch +++ /dev/null @@ -1,95 +0,0 @@ -From bcaca24de4264f89a94069701361988007e22e58 Mon Sep 17 00:00:00 2001 -From: Jonathan Wakely -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_; - - bool has_xdata() const { --#if BOOST_VERSION >= 105600 -- return xdata_ != NULL; --#else -- return xdata_; --#endif -+ return static_cast(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, 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(_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& original_string = NULL); -+ const optional& 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_; - - bool has_xdata() const { --#if BOOST_VERSION >= 105600 -- return xdata_ != NULL; --#else -- return xdata_; --#endif -+ return static_cast(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 - void stabilize(const optional& date = none); - - bool is_valid() const { --#if BOOST_VERSION >= 105600 -- return start != NULL; --#else -- return start; --#endif -+ return static_cast(start); - } - - /** Find the current or next period containing date. Returns false if diff --git a/a1cb25ad2d9a98ea9ec0bb3ee27fe3cde6046434.patch b/a1cb25ad2d9a98ea9ec0bb3ee27fe3cde6046434.patch new file mode 100644 index 0000000..a3c5c2f --- /dev/null +++ b/a1cb25ad2d9a98ea9ec0bb3ee27fe3cde6046434.patch @@ -0,0 +1,36 @@ +From a1cb25ad2d9a98ea9ec0bb3ee27fe3cde6046434 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Johann=20Kl=C3=A4hn?= +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(); + diff --git a/bcaca24de4264f89a94069701361988007e22e58.patch b/bcaca24de4264f89a94069701361988007e22e58.patch new file mode 100644 index 0000000..0d6c284 --- /dev/null +++ b/bcaca24de4264f89a94069701361988007e22e58.patch @@ -0,0 +1,95 @@ +From bcaca24de4264f89a94069701361988007e22e58 Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +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_; + + bool has_xdata() const { +-#if BOOST_VERSION >= 105600 +- return xdata_ != NULL; +-#else +- return xdata_; +-#endif ++ return static_cast(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, 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(_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& original_string = NULL); ++ const optional& 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_; + + bool has_xdata() const { +-#if BOOST_VERSION >= 105600 +- return xdata_ != NULL; +-#else +- return xdata_; +-#endif ++ return static_cast(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 + void stabilize(const optional& date = none); + + bool is_valid() const { +-#if BOOST_VERSION >= 105600 +- return start != NULL; +-#else +- return start; +-#endif ++ return static_cast(start); + } + + /** Find the current or next period containing date. Returns false if diff --git a/ledger.spec b/ledger.spec index 4c2b995..2393559 100644 --- a/ledger.spec +++ b/ledger.spec @@ -22,8 +22,9 @@ Patch6: %{name}-3.1-0006-Fix-numbers-from-example.patch Patch7: %{name}-3.1-0007-Update-ledger3.texi.patch Patch8: %{name}-3.1-0008-Update-ledger3.texi.patch Patch9: %{name}-3.1-0009-Some-minor-changes.patch -# Fixes build with Boost 1.58. -Patch10: https://github.com/ledger/ledger/pull/422.patch +# Together, these backports fix build with Boost 1.58 +Patch10: https://github.com/ledger/ledger/commit/bcaca24de4264f89a94069701361988007e22e58.patch +Patch11: https://github.com/ledger/ledger/commit/a1cb25ad2d9a98ea9ec0bb3ee27fe3cde6046434.patch BuildRequires: boost-devel BuildRequires: cmake @@ -100,6 +101,7 @@ emacs-%{name} instead. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build @@ -128,7 +130,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d install -p -m0644 contrib/ledger-completion.bash \ %{buildroot}%{_sysconfdir}/bash_completion.d/ledger -# Install documentation manually +# Install documentation manually to a convenient directory layout rm -rf %{buildroot}%{_docdir} rm -rf %{buildroot}%{_infodir}/* @@ -175,6 +177,11 @@ fi %doc doc/GLOSSARY.md doc/LICENSE doc/NEWS %doc doc/ledger3.html doc/ledger-mode.html %doc doc/ledger3.pdf doc/ledger-mode.pdf +# https://bugzilla.redhat.com/show_bug.cgi?id=728959 +# These must be explicitly listed. +%doc %{_pkgdocdir}/contrib +%doc %{_pkgdocdir}/python +%doc %{_pkgdocdir}/samples %{_bindir}/ledger %{_infodir}/ledger3.info* %{_infodir}/ledger-mode.info* @@ -200,7 +207,8 @@ fi %changelog * Mon Jul 27 2015 Adam Williamson - 3.1-7 -- add patch from jwakely to fix build with Boost 1.58 +- add patches from jwakely to fix build with Boost 1.58 +- fix pkgdocdir usage * Wed Jul 22 2015 David Tardon - rebuild for Boost 1.58