pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/finance/ledger



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Tue Nov 26 22:59:34 UTC 2024

Modified Files:
        pkgsrc/finance/ledger: distinfo
Added Files:
        pkgsrc/finance/ledger/patches: patch-src_filters.cc patch-src_utils.h

Log Message:
finance/ledger: Fix build with boost>=1.86.

Patch backported from upstream master, since there's been no upstream
release since the breakage.

No revbump because this has been broken since the revbump last month
for boost 1.86.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/finance/ledger/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/finance/ledger/patches/patch-src_filters.cc
cvs rdiff -u -r0 -r1.3 pkgsrc/finance/ledger/patches/patch-src_utils.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/finance/ledger/distinfo
diff -u pkgsrc/finance/ledger/distinfo:1.13 pkgsrc/finance/ledger/distinfo:1.14
--- pkgsrc/finance/ledger/distinfo:1.13 Thu May  2 13:27:04 2024
+++ pkgsrc/finance/ledger/distinfo      Tue Nov 26 22:59:34 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2024/05/02 13:27:04 riastradh Exp $
+$NetBSD: distinfo,v 1.14 2024/11/26 22:59:34 riastradh Exp $
 
 BLAKE2s (ledger-3.3.2.tar.gz) = 9204b163d03fe6d2d286614a47d65317d33c8d1bca885d7f3c9447f334b57d7c
 SHA512 (ledger-3.3.2.tar.gz) = d5d7058f0e9a02ad1d46e6780675d446070824b321f0f4c1ea6ac0c3dd4f11f259113bc36cbc796e4bb6d0a7898d6a68a25cce639e27a2b2434eec11a612ecb0
@@ -6,6 +6,7 @@ Size (ledger-3.3.2.tar.gz) = 825274 byte
 SHA1 (patch-src_CMakeLists.txt) = 8d6a16523554c98c8559702db681af6fb4f413aa
 SHA1 (patch-src_amount.cc) = 245d2dfe0182ca431188c324531ac1204be902be
 SHA1 (patch-src_expr.cc) = e707cbcba58a31534072ed490c9ba95f8dc4005d
+SHA1 (patch-src_filters.cc) = be5a1f382006ae014cea0c028d774f68d4e58ca8
 SHA1 (patch-src_format.cc) = c7fe4821bc86a9126978235fa44859f84ea92989
 SHA1 (patch-src_item.cc) = 5e97a09824a04092161d8a0ca956a43ef084a03d
 SHA1 (patch-src_lookup.cc) = 0140f88386a6a9bbfa82e48fca4f3555f40a03aa
@@ -18,4 +19,5 @@ SHA1 (patch-src_system.hh.in) = 2993ef00
 SHA1 (patch-src_textual.cc) = 698581b6193b39449f84ff27bc695a9b14c877c9
 SHA1 (patch-src_times.cc) = 544235432f6811f1a5c73ee72b3011709b606f17
 SHA1 (patch-src_utils.cc) = 06d8c17822a945a9d08c1122fb05f0568fdcf493
+SHA1 (patch-src_utils.h) = b050118f37e8fe2c030fdd1dd8affcbdc08626c5
 SHA1 (patch-src_xact.cc) = 89befd42102146e7a46f92ce458a7f1bc321ce55

Added files:

Index: pkgsrc/finance/ledger/patches/patch-src_filters.cc
diff -u /dev/null pkgsrc/finance/ledger/patches/patch-src_filters.cc:1.1
--- /dev/null   Tue Nov 26 22:59:34 2024
+++ pkgsrc/finance/ledger/patches/patch-src_filters.cc  Tue Nov 26 22:59:34 2024
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_filters.cc,v 1.1 2024/11/26 22:59:34 riastradh Exp $
+
+Fix build with boost>=1.86, which broke API compatibility.
+https://github.com/ledger/ledger/issues/2378
+
+--- src/filters.cc.orig        2023-03-30 07:40:48.000000000 +0000
++++ src/filters.cc
+@@ -238,7 +238,7 @@ void anonymize_posts::render_commodity(a
+ void anonymize_posts::operator()(post_t& post)
+ {
+       boost::uuids::detail::sha1  sha;
+-  unsigned int message_digest[5];
++  unsigned char message_digest[20];
+   bool         copy_xact_details = false;
+ 
+   if (last_xact != post.xact) {
+@@ -1268,7 +1268,7 @@ void budget_posts::report_budget_items(c
+     foreach (pending_posts_list::iterator& i, posts_to_erase)
+       pending_posts.erase(i);
+   }
+-  
++
+   if (pending_posts.size() == 0)
+     return;
+ 

Index: pkgsrc/finance/ledger/patches/patch-src_utils.h
diff -u /dev/null pkgsrc/finance/ledger/patches/patch-src_utils.h:1.3
--- /dev/null   Tue Nov 26 22:59:34 2024
+++ pkgsrc/finance/ledger/patches/patch-src_utils.h     Tue Nov 26 22:59:34 2024
@@ -0,0 +1,38 @@
+$NetBSD: patch-src_utils.h,v 1.3 2024/11/26 22:59:34 riastradh Exp $
+
+Fix build with boost>=1.86, which broke API compatibility.
+https://github.com/ledger/ledger/issues/2378
+
+--- src/utils.h.orig   2023-03-30 07:40:48.000000000 +0000
++++ src/utils.h
+@@ -607,14 +607,14 @@ inline int peek_next_nonws(std::istream&
+     *_p = '\0';                                         \
+   }
+ 
+-inline string to_hex(unsigned int * message_digest, const int len = 1)
++inline string to_hex(unsigned char * message_digest, const int len = 4)
+ {
+   std::ostringstream buf;
+ 
+-  for(int i = 0; i < 5 ; i++) {
+-    buf.width(8);
++  for(int i = 0; i < 20 ; i++) {
++    buf.width(2);
+     buf.fill('0');
+-    buf << std::hex << message_digest[i];
++    buf << std::hex << (int)message_digest[i];
+     if (i + 1 >= len)
+       break;                    // only output the first LEN dwords
+   }
+@@ -627,9 +627,9 @@ inline string sha1sum(const string& str)
+ 
+   sha.process_bytes(str.c_str(), str.length());
+ 
+-  unsigned int message_digest[5];
++  unsigned char message_digest[20];
+   sha.get_digest(message_digest);
+-  return to_hex(message_digest, 5);
++  return to_hex(message_digest, 20);
+ }
+ 
+ extern const string version;



Home | Main Index | Thread Index | Old Index