pkgsrc-WIP-changes archive

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

vmailmgr-base: add 'gdbm' and 'kerberos' options.



Module Name:	pkgsrc-wip
Committed By:	Amitai Schleier <schmonz-web-git%schmonz.com@localhost>
Pushed By:	schmonz
Date:		Thu Feb 22 20:21:45 2024 -0500
Changeset:	0ffa89b7839d0289aede0dcf3774c97c12b2e86b

Modified Files:
	vmailmgr-base/Makefile
	vmailmgr-base/distinfo
	vmailmgr-base/patches/patch-lib_vpwtable_gdbm__write.cc
Added Files:
	vmailmgr-base/options.mk

Log Message:
vmailmgr-base: add 'gdbm' and 'kerberos' options.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0ffa89b7839d0289aede0dcf3774c97c12b2e86b

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

diffstat:
 vmailmgr-base/Makefile                             |  2 ++
 vmailmgr-base/distinfo                             |  2 +-
 vmailmgr-base/options.mk                           | 26 ++++++++++++++++++++++
 .../patches/patch-lib_vpwtable_gdbm__write.cc      | 22 +++++++++++++-----
 4 files changed, 45 insertions(+), 7 deletions(-)

diffs:
diff --git a/vmailmgr-base/Makefile b/vmailmgr-base/Makefile
index 0e19c359cb..c3c0164a76 100644
--- a/vmailmgr-base/Makefile
+++ b/vmailmgr-base/Makefile
@@ -9,6 +9,8 @@ CONFIGURE_ARGS+=	--disable-courier-imap
 CONFIGURE_ARGS+=	--disable-php
 CONFIGURE_ARGS+=	--disable-python
 
+.include "options.mk"
+
 # for vmailmgr.7, without building the heavier docs
 # copy-paste-changed from ../../mk/build/build.mk:
 post-build:
diff --git a/vmailmgr-base/distinfo b/vmailmgr-base/distinfo
index 00e5991713..6809eef41c 100644
--- a/vmailmgr-base/distinfo
+++ b/vmailmgr-base/distinfo
@@ -26,5 +26,5 @@ SHA1 (patch-lib_vpwtable_gdbm__del.cc) = 9eb35e3d6daaf55aaefdaf7fec33a500e51d785
 SHA1 (patch-lib_vpwtable_gdbm__exists.cc) = c819d6fb8d410b83faf113d639620dcb44d7ba2d
 SHA1 (patch-lib_vpwtable_gdbm__getbyname.cc) = 6a74f8a8398b6344116d1ded1553a0e795dc809c
 SHA1 (patch-lib_vpwtable_gdbm__put.cc) = 26e9c45bba56cb22fcf17d4a61daef3803ddc752
-SHA1 (patch-lib_vpwtable_gdbm__write.cc) = 5cb4a746cbc82d4d3524114d334752b603bfa2a3
+SHA1 (patch-lib_vpwtable_gdbm__write.cc) = 5d5bbdc6369292aab87225ba525e81a194aa0d70
 SHA1 (patch-python_Makefile.am) = b1991252f66714b31709a50029fb8c85cd277d79
diff --git a/vmailmgr-base/options.mk b/vmailmgr-base/options.mk
new file mode 100644
index 0000000000..7eb8e27501
--- /dev/null
+++ b/vmailmgr-base/options.mk
@@ -0,0 +1,26 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.vmailmgr-base
+
+PKG_OPTIONS_REQUIRED_GROUPS=	db
+PKG_OPTIONS_GROUP.db=		cdb gdbm
+
+PKG_SUPPORTED_OPTIONS=		kerberos # XXX or gssapi?
+PKG_SUGGESTED_OPTIONS=		cdb
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mcdb)
+# enabled by default
+.endif
+
+.if !empty(PKG_OPTIONS:Mgdbm)
+CONFIGURE_ARGS+=		--with-vpwtable=gdbm
+.include "../../databases/gdbm/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mkerberos)
+CONFIGURE_ARGS+=		--with-krb5
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/krb5.buildlink3.mk"
+.endif
diff --git a/vmailmgr-base/patches/patch-lib_vpwtable_gdbm__write.cc b/vmailmgr-base/patches/patch-lib_vpwtable_gdbm__write.cc
index 3ec27dfccc..2e8511034c 100644
--- a/vmailmgr-base/patches/patch-lib_vpwtable_gdbm__write.cc
+++ b/vmailmgr-base/patches/patch-lib_vpwtable_gdbm__write.cc
@@ -2,9 +2,16 @@ $NetBSD$
 
 Patch from FreeBSD ports.
 
---- lib/vpwtable/gdbm_write.cc.orig	2024-02-20 03:22:19.220947617 +0000
+--- lib/vpwtable/gdbm_write.cc.orig	2015-09-01 16:03:21.000000000 +0000
 +++ lib/vpwtable/gdbm_write.cc
-@@ -22,8 +22,8 @@
+@@ -16,14 +16,15 @@
+ 
+ #include <config.h>
+ #include <errno.h>
++#include <unistd.h>
+ #include "vpwtable.h"
+ #include <gdbm.h>
+ 
  class gdbm_vpwtable_writer : public vpwtable_writer
  {
  private:
@@ -15,14 +22,17 @@ Patch from FreeBSD ports.
    GDBM_FILE out;
    bool opened;
  public:
-@@ -60,9 +60,9 @@ bool gdbm_vpwtable_writer::operator!() c
+@@ -59,10 +60,10 @@ bool gdbm_vpwtable_writer::operator!() c
+ 
  bool gdbm_vpwtable_writer::put(const vpwentry& vpw)
  {
-   mystring name = vpw->name.lower();
+-  mystring name = vpw->name.lower();
 -  datum key = { (char*)name.c_str(), name.length() };
-+  datum key = { (char*)name.c_str(), static_cast<int>(name.length()) };
-   mystring binary = vpw->to_record();
+-  mystring binary = vpw->to_record();
 -  datum data = { (char*)binary.c_str(), binary.length() };
++  mystring name = vpw.name.lower();
++  datum key = { (char*)name.c_str(), static_cast<int>(name.length()) };
++  mystring binary = vpw.to_record();
 +  datum data = { (char*)binary.c_str(), static_cast<int>(binary.length()) };
    return gdbm_store(out, key, data, GDBM_INSERT) == 0;
  }


Home | Main Index | Thread Index | Old Index