1 |
commit: 4273258658eda38bae5be3258bcf0ff44ac2f96e |
2 |
Author: Gleb Nemshilov <gleb <AT> fastmail <DOT> com> |
3 |
AuthorDate: Thu May 7 15:00:02 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 24 20:28:14 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42732586 |
7 |
|
8 |
app-office/ledger: add 3.2.0 with py3.7, py3.8 support |
9 |
|
10 |
Add Python 3.7 & 3.8 support |
11 |
Use external utf8cpp library |
12 |
Add bash-completion support |
13 |
Remove "emacs" USE flag |
14 |
|
15 |
Closes: https://bugs.gentoo.org/689132 |
16 |
Bug: https://bugs.gentoo.org/721478 |
17 |
Closes: https://bugs.gentoo.org/692316 |
18 |
Signed-off-by: Gleb Nemshilov <gleb <AT> fastmail.com> |
19 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
20 |
Closes: https://github.com/gentoo/gentoo/pull/15680 |
21 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
22 |
|
23 |
app-office/ledger/Manifest | 1 + |
24 |
app-office/ledger/ledger-3.2.0.ebuild | 115 ++++++++++++++++++++++++++++++++++ |
25 |
2 files changed, 116 insertions(+) |
26 |
|
27 |
diff --git a/app-office/ledger/Manifest b/app-office/ledger/Manifest |
28 |
index dbc383ee8b8..e1a42967e27 100644 |
29 |
--- a/app-office/ledger/Manifest |
30 |
+++ b/app-office/ledger/Manifest |
31 |
@@ -1 +1,2 @@ |
32 |
DIST ledger-3.1.2.tar.gz 801112 BLAKE2B 71b907a83fe10857d17de746c0d124572859c9eca237130ebbfa5b730406470a5d31025736e80516feaac7daf14a4edb8b644ed72a0827f9714ac9cb2b79c0fb SHA512 445d9a9c70aa3e59718f8fb75e4110c73f2f476436149fdd456b5fe7b9cee9333c09647080049989599dfac491e5bdd0d143717e58e15989db0fcaad4e5a958d |
33 |
+DIST ledger-3.2.0.tar.gz 790404 BLAKE2B 081ca5d857238aecbeae5a0ba3267864442a8c1772a71b1894f5a9fb33173f9a0bd488ad4db3844fce8172268e516ebb92ba0556ced6e67b2a089fbb5adfde36 SHA512 580f4f39d7c3cd2bd1d05bcc36b127cfb311219f39fe50dbf23f582f73dd986729d4b5fa76bfd89cd5db9bfdfcdd5dca5b9d6b24766650040e45b881726e65ea |
34 |
|
35 |
diff --git a/app-office/ledger/ledger-3.2.0.ebuild b/app-office/ledger/ledger-3.2.0.ebuild |
36 |
new file mode 100644 |
37 |
index 00000000000..fda15f052db |
38 |
--- /dev/null |
39 |
+++ b/app-office/ledger/ledger-3.2.0.ebuild |
40 |
@@ -0,0 +1,115 @@ |
41 |
+# Copyright 1999-2020 Gentoo Authors |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=7 |
45 |
+ |
46 |
+PYTHON_COMPAT=( python3_{7,8} ) |
47 |
+ |
48 |
+inherit bash-completion-r1 check-reqs cmake python-single-r1 |
49 |
+ |
50 |
+DESCRIPTION="A double-entry accounting system with a command-line reporting interface" |
51 |
+HOMEPAGE="https://www.ledger-cli.org/" |
52 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
53 |
+LICENSE="BSD" |
54 |
+KEYWORDS="~amd64 ~x86" |
55 |
+SLOT="0" |
56 |
+IUSE="debug doc python" |
57 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
58 |
+RESTRICT="test" |
59 |
+ |
60 |
+CHECKREQS_MEMORY=8G |
61 |
+ |
62 |
+RDEPEND=" |
63 |
+ dev-libs/boost:=[python?] |
64 |
+ dev-libs/gmp:0= |
65 |
+ dev-libs/mpfr:0= |
66 |
+ python? ( |
67 |
+ $(python_gen_cond_dep ' |
68 |
+ dev-libs/boost:=[${PYTHON_USEDEP}] |
69 |
+ dev-python/cheetah3:=[${PYTHON_USEDEP}] |
70 |
+ ') |
71 |
+ ${PYTHON_DEPS} |
72 |
+ ) |
73 |
+" |
74 |
+DEPEND=" |
75 |
+ ${RDEPEND} |
76 |
+ dev-libs/utfcpp |
77 |
+ doc? ( |
78 |
+ sys-apps/texinfo |
79 |
+ virtual/texi2dvi |
80 |
+ dev-texlive/texlive-fontsrecommended |
81 |
+ ) |
82 |
+" |
83 |
+ |
84 |
+pkg_pretend() { |
85 |
+ if use python; then |
86 |
+ check-reqs_pkg_pretend |
87 |
+ fi |
88 |
+} |
89 |
+ |
90 |
+pkg_setup() { |
91 |
+ if use python; then |
92 |
+ check-reqs_pkg_setup |
93 |
+ python-single-r1_pkg_setup |
94 |
+ fi |
95 |
+} |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ cmake_src_prepare |
99 |
+ |
100 |
+ # Want to type "info ledger" not "info ledger3" |
101 |
+ sed -i -e 's/ledger3/ledger/g' \ |
102 |
+ doc/ledger3.texi \ |
103 |
+ doc/CMakeLists.txt \ |
104 |
+ test/CheckTexinfo.py \ |
105 |
+ tools/cleanup.sh \ |
106 |
+ tools/gendocs.sh \ |
107 |
+ tools/prepare-commit-msg \ |
108 |
+ tools/spellcheck.sh \ |
109 |
+ || die "Failed to update info file name in file contents" |
110 |
+ |
111 |
+ mv doc/ledger{3,}.texi || die "Failed to rename info file name" |
112 |
+ |
113 |
+ rm -r lib/utfcpp || die |
114 |
+ rm cmake/FindPython.cmake || die |
115 |
+ rm -r cmake/FindPython || die |
116 |
+} |
117 |
+ |
118 |
+src_configure() { |
119 |
+ local mycmakeargs=( |
120 |
+ -DBUILD_DOCS="$(usex doc)" |
121 |
+ -DBUILD_WEB_DOCS="$(usex doc)" |
122 |
+ -DUSE_PYTHON="$(usex python)" |
123 |
+ -DPython_EXECUTABLE="${PYTHON}" |
124 |
+ -DPython_INCLUDE_DIR="$(python_get_includedir)" |
125 |
+ -DCMAKE_INSTALL_DOCDIR="/usr/share/doc/${PF}" |
126 |
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON |
127 |
+ -DBUILD_DEBUG="$(usex debug)" |
128 |
+ -DUTFCPP_PATH="${ESYSROOT}/usr/include/utf8cpp" |
129 |
+ ) |
130 |
+ |
131 |
+ cmake_src_configure |
132 |
+} |
133 |
+ |
134 |
+src_compile() { |
135 |
+ cmake_src_compile |
136 |
+ |
137 |
+ use doc && cmake_src_compile doc |
138 |
+} |
139 |
+ |
140 |
+src_install() { |
141 |
+ cmake_src_install |
142 |
+ |
143 |
+ newbashcomp contrib/${PN}-completion.bash ${PN} |
144 |
+} |
145 |
+ |
146 |
+pkg_postinst() { |
147 |
+ elog |
148 |
+ elog "Since version 3, vim support is released separately." |
149 |
+ elog "See https://github.com/ledger/vim-ledger" |
150 |
+ elog |
151 |
+ elog "For Emacs mode, emerge app-emacs/ledger-mode" |
152 |
+} |
153 |
+ |
154 |
+# rainy day TODO: |
155 |
+# - IUSE test |