pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/libzdb databases/libzdb: make this build on ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2f1eb6d9d08f
branches:  trunk
changeset: 387377:2f1eb6d9d08f
user:      he <he%pkgsrc.org@localhost>
date:      Fri Oct 28 17:58:03 2022 +0000

description:
databases/libzdb: make this build on 32-bit NetBSD hosts.

Add two patches:
 * Avoid c++ overload conflict between `time_t` and `long long`
 * Fix a print of `time_t` in tests/unit.c.

It seems evaldo%gardenali.biz@localhost was swallowed by Google 10+ years
ago (domain gardenali.biz no longer exists), so I took the liberty
of reverting that to pkgsrc-users%NetBSD.org@localhost.

Bump PKGREVISION.

diffstat:

 databases/libzdb/Makefile                  |   6 +++---
 databases/libzdb/distinfo                  |   4 +++-
 databases/libzdb/patches/patch-src_zdbpp.h |  19 +++++++++++++++++++
 databases/libzdb/patches/patch-test_unit.c |  26 ++++++++++++++++++++++++++
 4 files changed, 51 insertions(+), 4 deletions(-)

diffs (83 lines):

diff -r ab7fdb528791 -r 2f1eb6d9d08f databases/libzdb/Makefile
--- a/databases/libzdb/Makefile Fri Oct 28 13:25:18 2022 +0000
+++ b/databases/libzdb/Makefile Fri Oct 28 17:58:03 2022 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.27 2022/04/18 19:09:42 adam Exp $
+# $NetBSD: Makefile,v 1.28 2022/10/28 17:58:03 he Exp $
 
 DISTNAME=      libzdb-3.2.2
-PKGREVISION=   5
+PKGREVISION=   7
 CATEGORIES=    databases
 MASTER_SITES=  http://www.tildeslash.com/libzdb/dist/
 
-MAINTAINER=    evaldo%gardenali.biz@localhost
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://www.tildeslash.com/libzdb/
 COMMENT=       Zild Database Library, a fast thread-safe connection pooling library
 LICENSE=       gnu-gpl-v3
diff -r ab7fdb528791 -r 2f1eb6d9d08f databases/libzdb/distinfo
--- a/databases/libzdb/distinfo Fri Oct 28 13:25:18 2022 +0000
+++ b/databases/libzdb/distinfo Fri Oct 28 17:58:03 2022 +0000
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.6 2021/10/26 10:09:22 nia Exp $
+$NetBSD: distinfo,v 1.7 2022/10/28 17:58:03 he Exp $
 
 BLAKE2s (libzdb-3.2.2.tar.gz) = 9df58f68d011a948e1de1a90c74665a89cd61d63ebe1b223adfc588e859d6401
 SHA512 (libzdb-3.2.2.tar.gz) = 1e732f8785322e0369de16a8100c9467e96ad1ca4eee31e8bfc349f4f17d4cc237a691addc060a66e1b46bcfeb99c3aed07b1d5dbe20e70fde4ffbf35dbea2eb
 Size (libzdb-3.2.2.tar.gz) = 752292 bytes
+SHA1 (patch-src_zdbpp.h) = f02ad625e2a93232744444ddf48676ea6b17c963
+SHA1 (patch-test_unit.c) = 148f32b9fcdd660a2f70d7187eae3be611ca7ffe
diff -r ab7fdb528791 -r 2f1eb6d9d08f databases/libzdb/patches/patch-src_zdbpp.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/libzdb/patches/patch-src_zdbpp.h        Fri Oct 28 17:58:03 2022 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_zdbpp.h,v 1.1 2022/10/28 17:58:03 he Exp $
+
+Avoid "cannot be overloaded with" error by skipping doing
+bind() both for `time_t` and `long long` if they're the same size.
+
+--- src/zdbpp.h.orig   2022-10-28 13:27:26.964215539 +0000
++++ src/zdbpp.h
+@@ -311,9 +311,11 @@ namespace zdb {
+             this->setInt(parameterIndex, x);
+         }
+         
++#if !defined(__NetBSD__) || (defined(__NetBSD__) && (__SIZEOF_LONG_LONG__ != 8))
+         void bind(int parameterIndex, long long x) {
+             this->setLLong(parameterIndex, x);
+         }
++#endif
+         
+         void bind(int parameterIndex, double x) {
+             this->setDouble(parameterIndex, x);
diff -r ab7fdb528791 -r 2f1eb6d9d08f databases/libzdb/patches/patch-test_unit.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/libzdb/patches/patch-test_unit.c        Fri Oct 28 17:58:03 2022 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-test_unit.c,v 1.1 2022/10/28 17:58:03 he Exp $
+
+Adapt to 64-bit time_t on NetBSD.
+
+--- test/unit.c.orig   2019-03-22 02:15:59.000000000 +0000
++++ test/unit.c
+@@ -3,6 +3,7 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
++#include <inttypes.h>
+ 
+ #include "Config.h"
+ #include "URL.h"
+@@ -168,7 +169,11 @@ static void testTime() {
+                 
+         printf("=> Test1: now\n");
+         {
++#ifdef __NetBSD__
++                printf("\tResult: %" PRIu64 "\n", Time_now());
++#else
+                 printf("\tResult: %ld\n", Time_now());
++#endif
+         }
+         printf("=> Test1: OK\n\n");
+ 



Home | Main Index | Thread Index | Old Index