Update to upstream release 3.1.1

This commit is contained in:
Jamie Nguyen 2016-01-24 14:58:55 +00:00
parent 8a1b763a16
commit 0ca6145a9c
14 changed files with 23 additions and 604 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
ledger-2.6.3.tar.gz
/ledger-3.0.2.tar.gz
/ledger-3.1.tar.gz
/ledger-3.1.1.tar.gz

View File

@ -1,36 +0,0 @@
From a1cb25ad2d9a98ea9ec0bb3ee27fe3cde6046434 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johann=20Kl=C3=A4hn?= <kljohann@gmail.com>
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();

View File

@ -1,95 +0,0 @@
From bcaca24de4264f89a94069701361988007e22e58 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <jwakely@redhat.com>
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

View File

@ -1,26 +0,0 @@
From a66001382cd68c1d989bbe4ced629cc87370a4ce Mon Sep 17 00:00:00 2001
From: Craig Earls <enderw88@gmail.com>
Date: Fri, 10 Oct 2014 22:02:44 -0700
Subject: [PATCH 1/9] Force reconcile to use scrubbed values incase you are
reconciling an account with lot values.
---
lisp/ledger-reconcile.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el
index f660fd0..a8dc1eb 100644
--- a/lisp/ledger-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -118,7 +118,7 @@ ledger file order, use '(0)'."
;; specify the individual fields in the command line.
(if (ledger-exec-ledger buffer (current-buffer)
"balance" "--limit" "cleared or pending" "--empty" "--collapse"
- "--format" "%(display_total)" account)
+ "--format" "%(scrub(display_total))" account)
(ledger-split-commodity-string
(buffer-substring-no-properties (point-min) (point-max))))))
--
1.9.3

View File

@ -1,50 +0,0 @@
From acf0618fd0be3f951ac3376d3dd31330b2ea0cd6 Mon Sep 17 00:00:00 2001
From: Martin Michlmayr <tbm@cyrius.com>
Date: Sun, 12 Oct 2014 16:52:43 -0400
Subject: [PATCH 2/9] Fix texinfo syntax errors
Fix the following texinfo syntax errors:
ledger/doc/ledger3.texi:7878: @itemx must follow @item
ledger/doc/ledger3.texi:7939: @itemx must follow @item
ledger/doc/ledger3.texi:7944: @itemx must follow @item
---
doc/ledger3.texi | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index c7613c0..c795a05 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -7875,11 +7875,10 @@ A regular expression that matches against a transaction's payee name.
@itemx tag(REGEX)
A regular expression that matches against a transaction's tags.
-@itemx expr date =~ /REGEX/
+@item expr date =~ /REGEX/
Useful for specifying a date in plain terms. For example, you could say
@samp{expr date =~ /2014/}.
-
@item expr comment =~ /REGEX/
A regular expression that matches against a posting's comment field. This
searches only a posting's field, not the transaction's note or comment field.
@@ -7935,13 +7934,12 @@ A sub-expression is nested in parenthesis. This can be useful passing
more complicated arguments to functions, or for overriding the natural
precedence order of operators.
-
-@itemx expr base =~ /REGEX/
+@item expr base =~ /REGEX/
A regular expression that matches against an account's base name. If
a posting, this will match against the account affected by the
posting.
-@itemx expr code =~ /REGEX/
+@item expr code =~ /REGEX/
A regular expression that matches against the transaction code (the
text that occurs between parentheses before the payee).
--
1.9.3

View File

@ -1,32 +0,0 @@
From 6b2520cc49edf4d167bec10850b832c308ebf9a3 Mon Sep 17 00:00:00 2001
From: Martin Michlmayr <tbm@cyrius.com>
Date: Sun, 12 Oct 2014 18:20:54 -0400
Subject: [PATCH 3/9] BUILD_WEB_DOCS implies BUILD_DOCS
This fixes the build when -DBUILD_WEB_DOCS=1 is specified wihout
specifying -DBUILD_DOCS. This fails because man2html/groff are
not found because the find_program command for these programs
is only run if BUILD_DOCS is enabled.
---
doc/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 96c6d51..46c3f73 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -27,6 +27,11 @@ endif()
########################################################################
+# BUILD_WEB_DOCS implies BUILD_DOCS
+if (BUILD_WEB_DOCS)
+ set(BUILD_DOCS 1)
+endif()
+
if (BUILD_DOCS)
find_program(MAKEINFO makeinfo)
find_program(TEXI2PDF texi2pdf)
--
1.9.3

View File

@ -1,103 +0,0 @@
From 56976a127c081a6a008c81966360003a8711a319 Mon Sep 17 00:00:00 2001
From: Stefano Zacchiroli <zack@upsilon.cc>
Date: Mon, 13 Oct 2014 23:15:23 +0200
Subject: [PATCH 4/9] make --columns default to terminal width, as returned by
ioctl()
If set, the COLUMNS environment variable will take precedence over terminal
width. However, please note that COLUMNS is usually *not* exported by shells to
child processes, so in most cases COLUMNS will be undefined for ledger---hence
the motivation for this change.
Terminal width is queried using ioctl() on stdin. For the sake of portability
the querying is done only on platform where ioctl() is detected as supported at
compile-time.
---
CMakeLists.txt | 1 +
src/report.cc | 7 +++++++
src/select.cc | 7 +++++++
src/system.hh.in | 5 +++++
4 files changed, 20 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6592f10..09d1405 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,7 @@ check_function_exists(access HAVE_ACCESS)
check_function_exists(realpath HAVE_REALPATH)
check_function_exists(getpwuid HAVE_GETPWUID)
check_function_exists(getpwnam HAVE_GETPWNAM)
+check_function_exists(ioctl HAVE_IOCTL)
check_function_exists(isatty HAVE_ISATTY)
check_c_source_compiles("
diff --git a/src/report.cc b/src/report.cc
index 7bb79bd..a05a57d 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -181,10 +181,17 @@ void report_t::normalize_options(const string& verb)
}
long cols = 0;
+#if HAVE_IOCTL
+ struct winsize ws;
+#endif
if (HANDLED(columns_))
cols = lexical_cast<long>(HANDLER(columns_).value);
else if (const char * columns = std::getenv("COLUMNS"))
cols = lexical_cast<long>(columns);
+#if HAVE_IOCTL
+ else if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) != -1)
+ cols = ws.ws_col;
+#endif
else
cols = 80L;
diff --git a/src/select.cc b/src/select.cc
index 45ae34b..a9e943a 100644
--- a/src/select.cc
+++ b/src/select.cc
@@ -145,10 +145,17 @@ value_t select_command(call_scope_t& args)
string thus_far = "";
std::size_t cols = 0;
+#if HAVE_IOCTL
+ struct winsize ws;
+#endif
if (report.HANDLED(columns_))
cols = lexical_cast<std::size_t>(report.HANDLER(columns_).value);
else if (const char * columns_env = std::getenv("COLUMNS"))
cols = lexical_cast<std::size_t>(columns_env);
+#if HAVE_IOCTL
+ else if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) != -1)
+ cols = ws.ws_col;
+#endif
else
cols = 80;
diff --git a/src/system.hh.in b/src/system.hh.in
index eaee14d..67a218d 100644
--- a/src/system.hh.in
+++ b/src/system.hh.in
@@ -63,6 +63,7 @@
#define HAVE_REALPATH @HAVE_REALPATH@
#define HAVE_GETPWUID @HAVE_GETPWUID@
#define HAVE_GETPWNAM @HAVE_GETPWNAM@
+#define HAVE_IOCTL @HAVE_IOCTL@
#define HAVE_ISATTY @HAVE_ISATTY@
#define HAVE_UNIX_PIPES @HAVE_UNIX_PIPES@
@@ -151,6 +152,10 @@ typedef std::ostream::pos_type ostream_pos_type;
#include <pwd.h>
#endif
+#if HAVE_IOCTL
+#include <sys/ioctl.h>
+#endif
+
#if HAVE_UNIX_PIPES
#include <sys/types.h>
#include <sys/wait.h>
--
1.9.3

View File

@ -1,26 +0,0 @@
From 5eb62970423431bb3d81f31c24d53416d36b8801 Mon Sep 17 00:00:00 2001
From: Martin Michlmayr <tbm@cyrius.com>
Date: Fri, 17 Oct 2014 21:16:15 -0400
Subject: [PATCH 5/9] Typo fix
Thanks to Dominik Honnef for spotting it.
---
doc/ledger3.texi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index c795a05..834cf96 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -1756,7 +1756,7 @@ both liquid and commodity assets. Now, on the day of the sale:
@smallexample @c input:validate
2005/08/01 Stock sale
- Assets:Broker -50 APPL @{$30.00@} @@ $50.00
+ Assets:Broker -50 AAPL @{$30.00@} @@ $50.00
Expenses:Broker:Commissions $19.95
Income:Capital Gains $-1,000.00
Assets:Broker $2,480.05
--
1.9.3

View File

@ -1,30 +0,0 @@
From 325f8cb6442118c38121991bb76e03fd95ffcafc Mon Sep 17 00:00:00 2001
From: Martin Michlmayr <tbm@cyrius.com>
Date: Fri, 17 Oct 2014 21:22:02 -0400
Subject: [PATCH 6/9] Fix numbers from example
Thanks to Dominik Honnef.
---
doc/ledger3.texi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index 834cf96..e52aff2 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -3325,10 +3325,10 @@ For example, consider the stock sale given above:
@end smallexample
The commodity transferred into @samp{Assets:Brokerage} is not actually 10
-AAPL, but rather 10 AAPL @{$5.00@}. The figure in braces after the
+AAPL, but rather 10 AAPL @{$50.00@}. The figure in braces after the
amount is called the ``lot price''. It's Ledger's way of remembering
that this commodity was transferred through an exchange, and that
-$5.00 was the price of that exchange.
+$50.00 was the price of that exchange.
This becomes significant if you later sell that commodity again. For
example, you might write this:
--
1.9.3

View File

@ -1,55 +0,0 @@
From cff5b16f7c9a726383a3f296889dd951f7f4bd12 Mon Sep 17 00:00:00 2001
From: myqlarson <myqlarson@gmail.com>
Date: Mon, 20 Oct 2014 01:17:16 +1300
Subject: [PATCH 7/9] Update ledger3.texi
Fixed typos and clarified CSV import behaviour with regard to column headers (I haven't checked the code, but I noticed the programme behaves this way).
---
doc/ledger3.texi | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index e52aff2..8a9d52b 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -4547,8 +4547,8 @@ Transaction Number,Date,Description,Memo,Amount Debit,Amount Credit,Balance,Chec
Unfortunately, as it stands Ledger cannot read it, but you can. Ledger
expects the first line to contain a description of the fields on each
-line of the file. The fields ledger can recognize are called
-@code{date}, @code{posted}, @code{code}, @code{payee} or @code{desc},
+line of the file. The fields ledger can recognize contain these case-insensitive strings
+@code{date}, @code{posted}, @code{code}, @code{payee} or @code{desc} or @code{description},
@code{amount}, @code{cost}, @code{total}, and @code{note}.
Delete the account description lines at the top, and replace the first
@@ -4582,7 +4582,7 @@ transid,date,payee,note,amount,,,code,
@end smallexample
Ledger will include @samp{; transid: 767718} in the first transaction
-is from the file above.
+from the file above.
@findex --invert
@findex --account @var{STR}
@@ -4613,7 +4613,7 @@ account Aufwand:Einkauf:Lebensmittel
Note that it may be necessary for the output of @samp{ledger convert}
to be passed through @code{ledger print} a second time if you want to
-match on the new payee field. During the @code{ledger convert} run
+match on the new payee field. During the @code{ledger convert} run,
only the original payee name as specified in the csv data seems to be
used.
@@ -5239,7 +5239,7 @@ report the values used by each tag.
@findex entry
@findex xact
-The @command{xact} command simplify the creation of new transactions.
+The @command{xact} command simplifies the creation of new transactions.
It works on the principle that 80% of all postings are variants of
earlier postings. Here's how it works:
--
1.9.3

View File

@ -1,33 +0,0 @@
From 5df0788ba20f3b9a8f37827b92d18c92f37827c6 Mon Sep 17 00:00:00 2001
From: myqlarson <myqlarson@gmail.com>
Date: Mon, 20 Oct 2014 02:01:18 +1300
Subject: [PATCH 8/9] Update ledger3.texi
Improved wording
---
doc/ledger3.texi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index 8a9d52b..e9b0f55 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -4588,11 +4588,11 @@ from the file above.
@findex --account @var{STR}
@findex --rich-data
-The @command{convert} command accepts three options. The most important
-ones are @option{--invert} which inverts the amount field, and
+The @command{convert} command accepts three options. They are
+@option{--invert} which inverts the amount field,
@option{--account @var{STR}} which you can use to specify the account to
-balance against and @option{--rich-data}. When using the rich-data
-switch, additional metadata is stored as tags. There is, for example,
+balance against, and @option{--rich-data} which stores
+additional metadata as tags. There is, for example,
a UUID field. If an entry with the same UUID tag is already included in
the normal ledger file (specified via @option{--file @var{FILE} (-f)} or
via the environment variable @env{LEDGER_FILE}) this entry will not be
--
1.9.3

View File

@ -1,75 +0,0 @@
From 62e1354e0bb9bef2efaed14e3543199880026491 Mon Sep 17 00:00:00 2001
From: John Wiegley <johnw@newartisans.com>
Date: Tue, 4 Nov 2014 00:08:21 -0600
Subject: [PATCH 9/9] Some minor changes
---
acprep | 9 +++------
default.nix | 10 +++++++---
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/acprep b/acprep
index a6cadc7..b0af210 100755
--- a/acprep
+++ b/acprep
@@ -1,10 +1,7 @@
#!/usr/bin/env python
-# acprep, version 3.0
+# acprep, version 3.1
#
-# This script configures my ledger source tree on my Mac OS/X machine. This
-# is not necessary, however, since I keep all the files necessary for building
-# checked in to the source tree. Users can just type './configure && make'.
# This script simply sets up the compiler and linker flags for all the various
# build permutations I use for testing and profiling.
@@ -802,7 +799,7 @@ class PrepareBuild(CommandLineApp):
conf_args.append('-DCMAKE_CXX_FLAGS=%s' %
self.envvars[var])
elif var == 'LDFLAGS':
- conf_args.append('-DCMAKE_EXE_LINKER_FLAGS=%s' %
+ conf_args.append('-DCMAKE_EXE_LINKER_FLAGS=%s' %
self.envvars[var])
if self.options.boost_root:
@@ -895,7 +892,7 @@ class PrepareBuild(CommandLineApp):
self.log.debug('Changing directory to ' + build_dir)
os.chdir(build_dir)
- self.execute(*(['ninja' if self.options.use_ninja else 'make'] +
+ self.execute(*(['ninja' if self.options.use_ninja else 'make'] +
make_args))
finally:
os.chdir(self.source_dir)
diff --git a/default.nix b/default.nix
index d54621d..4885c98 100644
--- a/default.nix
+++ b/default.nix
@@ -7,8 +7,7 @@ in
stdenv.mkDerivation {
name = "ledger-3.1.0.${rev}";
-
- src = ./.;
+ src = builtins.filterSource (path: type: type != "unknown") ./.;
buildInputs = [ cmake boost gmp mpfr libedit python texinfo gnused ];
@@ -18,7 +17,12 @@ stdenv.mkDerivation {
# broken in ledger...
postInstall = ''
mkdir -p $out/share/emacs/site-lisp/
- cp -v $src/lisp/*.el $out/share/emacs/site-lisp/
+ cp -v "$src/lisp/"*.el $out/share/emacs/site-lisp/
+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
+ for i in date_time filesystem system iostreams regex unit_test_framework; do
+ boostlib=libboost_''$i.dylib
+ install_name_tool -change ''$boostlib ${boost}/lib/''$boostlib $out/bin/ledger
+ done
'';
meta = {
--
1.9.3

View File

@ -1,30 +1,12 @@
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%global commit 720c03b139d251c53f9deef491f5953e2fdb97ca
Name: ledger
Version: 3.1
Release: 10%{?dist}
Version: 3.1.1
Release: 1%{?dist}
Summary: A powerful command-line double-entry accounting system
Group: Applications/Productivity
License: BSD
URL: http://ledger-cli.org/
Source0: https://github.com/ledger/ledger/archive/%{commit}/%{name}-%{version}.tar.gz
# A series of small commits from upstream that came shortly after the release
# of version 3.1, including a fix for FTBFS when building the documentation.
Patch1: %{name}-3.1-0001-Force-reconcile-to-use-scrubbed-values-incase-you-ar.patch
Patch2: %{name}-3.1-0002-Fix-texinfo-syntax-errors.patch
Patch3: %{name}-3.1-0003-BUILD_WEB_DOCS-implies-BUILD_DOCS.patch
Patch4: %{name}-3.1-0004-make-columns-default-to-terminal-width-as-returned-b.patch
Patch5: %{name}-3.1-0005-Typo-fix.patch
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
# 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
Source0: https://github.com/ledger/ledger/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: boost-devel
BuildRequires: cmake
@ -59,14 +41,12 @@ their data, there really is no alternative.
%package python
Summary: Python bindings for %{name}
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description python
Python bindings for ledger.
%package devel
Summary: Libraries and header files for %{name} development
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Libraries and header files for %{name} development.
@ -90,29 +70,24 @@ emacs-%{name} instead.
%prep
%setup -q -n %{name}-%{commit}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%setup -qn %{name}-%{version}
# Avoid texinfo errors on EL7.
%if 0%{?rhel} == 7
sed -i -e 's#FIXME:UNDOCUMENTED#FIXMEUNDOCUMENTED#g' doc/ledger3.texi
%endif
%build
./acprep --prefix=%{_prefix} update
%cmake . \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DBUILD_WEB_DOCS=1 \
-DBUILD_EMACSLISP:BOOL=ON \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DUSE_PYTHON=ON
make %{?_smp_mflags}
-DUSE_PYTHON:BOOL=ON \
-DUSE_DOXYGEN:BOOL=ON \
-DBUILD_WEB_DOCS:BOOL=ON \
-DBUILD_EMACSLISP:BOOL=ON
#make %%{?_smp_mflags}
make
make doc
# Build info files.
@ -124,6 +99,7 @@ popd
%install
make install DESTDIR=%{buildroot}
chmod +x %{buildroot}%{python2_sitearch}/ledger.so
# Bash completion
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
@ -140,7 +116,7 @@ cp -p doc/ledger-mode.info %{buildroot}%{_infodir}
# Contrib scripts
mkdir -p %{buildroot}%{_pkgdocdir}/contrib
for i in bal bal-huquq entry getquote.pl getquote-uk.py ledger-du README repl.sh report tc ti to trend; do
for i in bal bal-huquq entry getquote.pl getquote-uk.py ledger-du ParseCcStmt.cs README repl.sh report tc ti to trend; do
install -p -m0644 contrib/${i} %{buildroot}%{_pkgdocdir}/contrib/${i}
done
@ -173,8 +149,7 @@ fi
%files
%doc README.md
%doc doc/GLOSSARY.md doc/LICENSE doc/NEWS
%doc README.md doc/GLOSSARY.md 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
@ -188,6 +163,7 @@ fi
%{_libdir}/libledger.so.3
%{_mandir}/man1/ledger.1*
%config(noreplace) %{_sysconfdir}/bash_completion.d/ledger
%license LICENSE.md
%files -n emacs-%{name}
%dir %{_emacs_sitelispdir}/ledger-mode
@ -206,6 +182,9 @@ fi
%changelog
* Sun Jan 24 2016 Jamie Nguyen <jamielinux@fedoraproject.org> - 3.1.1-1
- update to upstream release 3.1.1
* Mon Jan 18 2016 Jonathan Wakely <jwakely@redhat.com> - 3.1-10
- Rebuilt for Boost 1.60

View File

@ -1 +1 @@
2302295d393742fdc72c4263266c0b96 ledger-3.1.tar.gz
eae070cbbc1a40a277f1394d72ef0fe6 ledger-3.1.1.tar.gz