Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2026 10:05:42 +0000
From:      Vladimir Druzenko <vvd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 1bae9d3c2710 - main - finance/ledger: Update 3.3.2 => 3.4.1
Message-ID:  <6a0ae476.3e7dd.6638c76a@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1bae9d3c271039681f9e78e4cbd70bc0af8cb89a

commit 1bae9d3c271039681f9e78e4cbd70bc0af8cb89a
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2026-05-18 10:02:23 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-05-18 10:02:23 +0000

    finance/ledger: Update 3.3.2 => 3.4.1
    
    Changelogs:
    https://github.com/ledger/ledger/releases/tag/v3.4.0
    https://github.com/ledger/ledger/releases/tag/v3.4.1
    
    PR:             294963
    Approved by:    Woody Carey <woodycarey@hotmail.com> (maintainer, timeout 2 weeks)
    Sponsored by:   UNIS Labs
    Co-authored-by: Ewen Crawford <eacrawford02@gmail.com>
    MFH:            2026Q2
---
 finance/ledger/Makefile                     | 33 ++++++++++++++---
 finance/ledger/distinfo                     |  6 +--
 finance/ledger/files/patch-CMakeLists.txt   | 12 ++++++
 finance/ledger/files/patch-contrib_repl.sh  |  8 ++++
 finance/ledger/files/patch-src_filters.cc   | 48 ------------------------
 finance/ledger/files/patch-src_system.hh.in | 19 ----------
 finance/ledger/files/patch-src_utils.h      | 57 -----------------------------
 finance/ledger/pkg-plist                    | 54 ++++++++++++++++++++++++++-
 8 files changed, 104 insertions(+), 133 deletions(-)

diff --git a/finance/ledger/Makefile b/finance/ledger/Makefile
index 58a156e875d3..fbb2d738f85b 100644
--- a/finance/ledger/Makefile
+++ b/finance/ledger/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	ledger
 DISTVERSIONPREFIX=	v
-DISTVERSION=	3.3.2
-PORTREVISION=	6
+DISTVERSION=	3.4.1
 CATEGORIES=	finance
 
 MAINTAINER=	woodycarey@hotmail.com
@@ -11,15 +10,28 @@ WWW=		https://ledger-cli.org/
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-BUILD_DEPENDS=	utf8cpp>=0:devel/utf8cpp
-LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
+BUILD_DEPENDS=	utf8cpp>=0:devel/utf8cpp \
+		icu>=63:devel/icu
+LIB_DEPENDS=	libboost_atomic.so:devel/boost-libs \
 		libgmp.so:math/gmp \
 		libmpfr.so:math/mpfr
 
-USES=		cmake compiler:c++11-lib cpe libedit
+USES=		cmake compiler:c++17-lang cpe libedit perl5 shebangfix
 CPE_VENDOR=	${PORTNAME}-cli
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
+USE_PERL5=	run
+SHEBANG_FILES=	contrib/getquote-uk.py \
+		contrib/ledger-du \
+		contrib/non-profit-audit-reports/general-ledger-report.plx \
+		contrib/non-profit-audit-reports/fund-report.plx \
+		contrib/non-profit-audit-reports/csv2ods.py \
+		contrib/non-profit-audit-reports/readcsv.py \
+		contrib/non-profit-audit-reports/bank-reconcilation.plx \
+		contrib/non-profit-audit-reports/unpaid-accruals-report.plx \
+		contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx \
+		contrib/non-profit-audit-reports/summary-reports.plx \
+		contrib/raw/GenerateLatexExpeneseReport.pl
 
 OPTIONS_DEFINE=	GNUPG PYTHON
 OPTIONS_SUB=	yes
@@ -31,8 +43,19 @@ GNUPG_CMAKE_BOOL=	USE_GPGME
 PYTHON_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}boost-libs>0:devel/boost-python-libs@${PY_FLAVOR}
 PYTHON_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}boost-libs>0:devel/boost-python-libs@${PY_FLAVOR}
 PYTHON_USES=		python
+PYTHON_USES_OFF=	python:env
 PYTHON_CMAKE_BOOL=	USE_PYTHON
 
+post-stage:
+	${MV} ${STAGEDIR}${PREFIX}/share/contrib ${STAGEDIR}${DATADIR}
+	${RM} ${STAGEDIR}${DATADIR}/repl.sh.orig
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
+	${MV} ${STAGEDIR}${DATADIR}/ledger-completion.bash \
+		${STAGEDIR}${PREFIX}/etc/bash_completion.d
+
+post-stage-PYTHON-on:
+	${STRIP_CMD} ${STAGEDIR}/${PYTHON_SITELIBDIR}/ledger.so
+
 do-test:
 	@cd ${TEST_WRKSRC} && ctest -C ${CMAKE_BUILD_TYPE} ${_MAKE_JOBS}
 
diff --git a/finance/ledger/distinfo b/finance/ledger/distinfo
index 4744bb716776..33f2d89e2699 100644
--- a/finance/ledger/distinfo
+++ b/finance/ledger/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1718008115
-SHA256 (ledger-ledger-v3.3.2_GH0.tar.gz) = 555296ee1e870ff04e2356676977dcf55ebab5ad79126667bc56464cb1142035
-SIZE (ledger-ledger-v3.3.2_GH0.tar.gz) = 825274
+TIMESTAMP = 1778555555
+SHA256 (ledger-ledger-v3.4.1_GH0.tar.gz) = 1cf012cdc8445cab0efc445064ef9b2d3f46ed0165dae803c40fe3d2b23fdaad
+SIZE (ledger-ledger-v3.4.1_GH0.tar.gz) = 817104
diff --git a/finance/ledger/files/patch-CMakeLists.txt b/finance/ledger/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..7881e1bd4d68
--- /dev/null
+++ b/finance/ledger/files/patch-CMakeLists.txt
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig	2025-10-26 05:55:04 UTC
++++ CMakeLists.txt
+@@ -112,8 +112,8 @@ endif()
+ 
+ ########################################################################
+ 
+-include(FindICU)
+ find_package(ICU ${Required_Icu_Version} OPTIONAL_COMPONENTS uc i18n)
++include(FindICU)
+ 
+ include(CheckIncludeFiles)
+ include(CheckLibraryExists)
diff --git a/finance/ledger/files/patch-contrib_repl.sh b/finance/ledger/files/patch-contrib_repl.sh
new file mode 100644
index 000000000000..d18a09768e0f
--- /dev/null
+++ b/finance/ledger/files/patch-contrib_repl.sh
@@ -0,0 +1,8 @@
+--- contrib/repl.sh.orig	2025-10-26 05:55:04 UTC
++++ contrib/repl.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ EXEC=$(which ledger)
+ if [[ -z "$EXEC" ]]; then
diff --git a/finance/ledger/files/patch-src_filters.cc b/finance/ledger/files/patch-src_filters.cc
deleted file mode 100644
index 56310c98dd19..000000000000
--- a/finance/ledger/files/patch-src_filters.cc
+++ /dev/null
@@ -1,48 +0,0 @@
---- src/filters.cc.orig	2023-03-30 07:40:48 UTC
-+++ src/filters.cc
-@@ -237,8 +237,6 @@ void anonymize_posts::operator()(post_t& post)
- 
- void anonymize_posts::operator()(post_t& post)
- {
--	boost::uuids::detail::sha1  sha;
--  unsigned int message_digest[5];
-   bool         copy_xact_details = false;
- 
-   if (last_xact != post.xact) {
-@@ -255,12 +253,7 @@ void anonymize_posts::operator()(post_t& post)
-     std::ostringstream buf;
-     buf << reinterpret_cast<boost::uintmax_t>(post.xact->payee.c_str())
-         << integer_gen() << post.xact->payee.c_str();
--
--		sha.reset();
--    sha.process_bytes(buf.str().c_str(), buf.str().length());
--    sha.get_digest(message_digest);
--
--    xact.payee = to_hex(message_digest);
-+    xact.payee = sha1sum(buf.str(), 8);
-     xact.note  = none;
-   } else {
-     xact.journal = post.xact->journal;
-@@ -273,12 +266,7 @@ void anonymize_posts::operator()(post_t& post)
-        acct = acct->parent) {
-     std::ostringstream buf;
-     buf << integer_gen() << acct << acct->fullname();
--
--    sha.reset();
--    sha.process_bytes(buf.str().c_str(), buf.str().length());
--    sha.get_digest(message_digest);
--
--    account_names.push_front(to_hex(message_digest));
-+    account_names.push_front(sha1sum(buf.str(), 8));
-   }
- 
-   account_t * new_account =
-@@ -1268,7 +1256,7 @@ void budget_posts::report_budget_items(const date_t& d
-     foreach (pending_posts_list::iterator& i, posts_to_erase)
-       pending_posts.erase(i);
-   }
--  
-+
-   if (pending_posts.size() == 0)
-     return;
- 
diff --git a/finance/ledger/files/patch-src_system.hh.in b/finance/ledger/files/patch-src_system.hh.in
deleted file mode 100644
index 99680c9f96dc..000000000000
--- a/finance/ledger/files/patch-src_system.hh.in
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -ruN ledger-3.2.1/src/system.hh.in ledger-3.2.1-patched/src/system.hh.in
---- src/system.hh.in.orig	2020-05-18 00:30:10.000000000 -0500
-+++ src/system.hh.in	2024-10-07 01:57:27.327578000 -0400
-@@ -144,7 +144,6 @@
- #include <boost/date_time/posix_time/posix_time_io.hpp>
- #include <boost/date_time/gregorian/gregorian_io.hpp>
- 
--#include <boost/filesystem/convenience.hpp>
- #include <boost/filesystem/exception.hpp>
- #include <boost/filesystem/fstream.hpp>
- #include <boost/filesystem/operations.hpp>
-@@ -156,6 +155,7 @@
- #include <boost/function.hpp>
- 
- #include <boost/intrusive_ptr.hpp>
-+#include <boost/smart_ptr/scoped_ptr.hpp>
- 
- #include <boost/iostreams/stream.hpp>
- #include <boost/iostreams/write.hpp>
diff --git a/finance/ledger/files/patch-src_utils.h b/finance/ledger/files/patch-src_utils.h
deleted file mode 100644
index 33e41412a62b..000000000000
--- a/finance/ledger/files/patch-src_utils.h
+++ /dev/null
@@ -1,57 +0,0 @@
---- src/utils.h.orig	2023-03-30 07:40:48 UTC
-+++ src/utils.h
-@@ -607,29 +607,39 @@ inline int peek_next_nonws(std::istream& in) {
-     *_p = '\0';                                         \
-   }
- 
--inline string to_hex(unsigned int * message_digest, const int len = 1)
--{
-+inline string digest_to_hex(
-+  const boost::uuids::detail::sha1::digest_type& message_digest,
-+  size_t len = sizeof(boost::uuids::detail::sha1::digest_type) * 2
-+) {
-   std::ostringstream buf;
-+  buf.setf(std::ios_base::hex, std::ios_base::basefield);
-+  buf.fill('0');
- 
--  for(int i = 0; i < 5 ; i++) {
--    buf.width(8);
--    buf.fill('0');
--    buf << std::hex << message_digest[i];
--    if (i + 1 >= len)
--      break;                    // only output the first LEN dwords
-+  // sha1::digest_type is an array type and may change between Boost versions
-+  const size_t count = std::min(
-+    sizeof(message_digest) / sizeof(message_digest[0]),
-+    (len - 1) / (sizeof(message_digest[0]) * 2) + 1
-+  );
-+  for(size_t i = 0; i < count; i++) {
-+    buf.width(sizeof(message_digest[i]) * 2);
-+    buf << (unsigned int)message_digest[i];
-   }
--  return buf.str();
-+  string hex = buf.str();
-+  hex.resize(len, '0'); // in case a partial element is requested
-+  return hex;
- }
- 
--inline string sha1sum(const string& str)
--{
--	boost::uuids::detail::sha1 sha;
-+inline string sha1sum(
-+  const string& str,
-+  size_t len = sizeof(boost::uuids::detail::sha1::digest_type) * 2
-+) {
-+	static boost::uuids::detail::sha1 sha;
-+  boost::uuids::detail::sha1::digest_type message_digest;
- 
-+	sha.reset();
-   sha.process_bytes(str.c_str(), str.length());
--
--  unsigned int message_digest[5];
-   sha.get_digest(message_digest);
--  return to_hex(message_digest, 5);
-+  return digest_to_hex(message_digest, len);
- }
- 
- extern const string version;
diff --git a/finance/ledger/pkg-plist b/finance/ledger/pkg-plist
index e666c8b33770..d40ecf3b84a1 100644
--- a/finance/ledger/pkg-plist
+++ b/finance/ledger/pkg-plist
@@ -1,4 +1,5 @@
 bin/ledger
+etc/bash_completion.d/ledger-completion.bash
 include/ledger/account.h
 include/ledger/amount.h
 include/ledger/annotate.h
@@ -24,6 +25,7 @@ include/ledger/history.h
 include/ledger/item.h
 include/ledger/iterators.h
 include/ledger/journal.h
+include/ledger/ledger.hh
 include/ledger/lookup.h
 include/ledger/mask.h
 include/ledger/op.h
@@ -55,9 +57,59 @@ include/ledger/token.h
 include/ledger/unistring.h
 include/ledger/utils.h
 include/ledger/value.h
-include/ledger/views.h
 include/ledger/xact.h
 lib/libledger.so
 lib/libledger.so.3
 %%PYTHON%%%%PYTHON_SITELIBDIR%%/ledger.so
+%%DATADIR%%/README
+%%DATADIR%%/bal
+%%DATADIR%%/bal-huquq
+%%DATADIR%%/compilation-ledger.el
+%%DATADIR%%/entry
+%%DATADIR%%/getquote-uk.py
+%%DATADIR%%/getquote.pl
+%%DATADIR%%/html/README
+%%DATADIR%%/html/ledger.xsl
+%%DATADIR%%/iso4127-commodities/iso4217ledger.sh
+%%DATADIR%%/iso4127-commodities/iso4217ledger.xsl
+%%DATADIR%%/ledger-du
+%%DATADIR%%/non-profit-audit-reports/GPLv3
+%%DATADIR%%/non-profit-audit-reports/LICENSE
+%%DATADIR%%/non-profit-audit-reports/README
+%%DATADIR%%/non-profit-audit-reports/bank-reconcilation.plx
+%%DATADIR%%/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx
+%%DATADIR%%/non-profit-audit-reports/csv2ods.py
+%%DATADIR%%/non-profit-audit-reports/demo.sh
+%%DATADIR%%/non-profit-audit-reports/fund-report.plx
+%%DATADIR%%/non-profit-audit-reports/general-ledger-report.plx
+%%DATADIR%%/non-profit-audit-reports/ooolib2/__init__.py
+%%DATADIR%%/non-profit-audit-reports/readcsv.py
+%%DATADIR%%/non-profit-audit-reports/summary-reports.plx
+%%DATADIR%%/non-profit-audit-reports/tests/Financial/BankStuff/bank-statement.pdf
+%%DATADIR%%/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.pdf
+%%DATADIR%%/non-profit-audit-reports/tests/Financial/Invoices/Invoice20110510.txt
+%%DATADIR%%/non-profit-audit-reports/tests/Projects/Blah/Expenses/hosting/AprilHostingReceipt.pdf
+%%DATADIR%%/non-profit-audit-reports/tests/Projects/Blah/Expenses/hosting/april-invoice.pdf
+%%DATADIR%%/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.pdf
+%%DATADIR%%/non-profit-audit-reports/tests/Projects/Foo/Expenses/hosting/AprilHostingReceipt.txt
+%%DATADIR%%/non-profit-audit-reports/tests/Projects/Foo/Invoices/Invoice20100101.pdf
+%%DATADIR%%/non-profit-audit-reports/tests/Projects/Foo/earmark-record.txt
+%%DATADIR%%/non-profit-audit-reports/tests/non-profit-test-data.ledger
+%%DATADIR%%/non-profit-audit-reports/tests/non-profit-test-data_MANIFEST
+%%DATADIR%%/non-profit-audit-reports/tests/non-profit-test-data_chart-of-accounts.csv
+%%DATADIR%%/non-profit-audit-reports/tests/non-profit-test-data_general-ledger.ods
+%%DATADIR%%/non-profit-audit-reports/unpaid-accruals-report.plx
+%%DATADIR%%/raw/GenerateLatexExpeneseReport.pl
+%%DATADIR%%/raw/MetadataExample.dat
+%%DATADIR%%/raw/README
+%%DATADIR%%/raw/VerifyImages.sh
+%%DATADIR%%/raw/dotemacs.el
+%%DATADIR%%/raw/ledger-matching.el
+%%DATADIR%%/raw/ledger-shell-environment-functions
+%%DATADIR%%/repl.sh
+%%DATADIR%%/report
+%%DATADIR%%/tc
+%%DATADIR%%/ti
+%%DATADIR%%/to
+%%DATADIR%%/trend
 share/man/man1/ledger.1.gz


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a0ae476.3e7dd.6638c76a>