From nobody Wed Nov 10 14:04:41 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B41CB183EE52; Wed, 10 Nov 2021 14:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hq66d4cWsz3jv9; Wed, 10 Nov 2021 14:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A7CC19D31; Wed, 10 Nov 2021 14:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AAE4fm9000302; Wed, 10 Nov 2021 14:04:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AAE4foM000301; Wed, 10 Nov 2021 14:04:41 GMT (envelope-from git) Date: Wed, 10 Nov 2021 14:04:41 GMT Message-Id: <202111101404.1AAE4foM000301@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 4b42d0528a99 - main - mail/dovecot-fts-xapian: Update version 1.4.1.14 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b42d0528a99049c6bcaac088948658ffe57d835 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=4b42d0528a99049c6bcaac088948658ffe57d835 commit 4b42d0528a99049c6bcaac088948658ffe57d835 Author: Muhammad Moinur Rahman AuthorDate: 2021-11-10 14:00:41 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2021-11-10 14:04:36 +0000 mail/dovecot-fts-xapian: Update version 1.4.1.14 - Fix runtime - Add USE_LDCONFIG PR: 259616 Reported by: bas@area536.com Approved by: otis (maintainer) --- mail/dovecot-fts-xapian/Makefile | 4 +-- mail/dovecot-fts-xapian/distinfo | 6 ++--- .../patch-src_fts-backend-xapian-functions.cpp | 30 ++++++++++++++++++++++ .../files/patch-src_fts-xapian-plugin.c | 26 +++++++++++++++++++ .../files/patch-src_fts-xapian-plugin.h | 29 +++++++++++++++++++++ 5 files changed, 90 insertions(+), 5 deletions(-) diff --git a/mail/dovecot-fts-xapian/Makefile b/mail/dovecot-fts-xapian/Makefile index 978dc02be880..01a6bec1aae3 100644 --- a/mail/dovecot-fts-xapian/Makefile +++ b/mail/dovecot-fts-xapian/Makefile @@ -1,6 +1,5 @@ PORTNAME= fts-xapian -DISTVERSION= 1.4.13 -PORTREVISION= 2 +DISTVERSION= 1.4.14 CATEGORIES= mail MASTER_SITES= https://github.com/grosjo/fts-xapian/releases/download/${DISTVERSION}/ PKGNAMEPREFIX= dovecot- @@ -17,6 +16,7 @@ LIB_DEPENDS= libicuuc.so:devel/icu \ RUN_DEPENDS= dovecot>=2.3.7:mail/dovecot USES= autoreconf compiler:c++11-lang libtool pkgconfig +USE_LDCONFIG= yes GNU_CONFIGURE= yes diff --git a/mail/dovecot-fts-xapian/distinfo b/mail/dovecot-fts-xapian/distinfo index 4f98dad52fbf..364773719647 100644 --- a/mail/dovecot-fts-xapian/distinfo +++ b/mail/dovecot-fts-xapian/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1633297573 -SHA256 (dovecot-fts-xapian-1.4.13.tar.gz) = a25a5ce4a70f1332408cd006ce1f326031eba5cdd3185ad467314a377af08ed4 -SIZE (dovecot-fts-xapian-1.4.13.tar.gz) = 2318781 +TIMESTAMP = 1636548959 +SHA256 (dovecot-fts-xapian-1.4.14.tar.gz) = 1f46f319f5b1c59f6359d1c1a55a7fa0988bfb3c3e8cdacec792961331ddb780 +SIZE (dovecot-fts-xapian-1.4.14.tar.gz) = 2563251 diff --git a/mail/dovecot-fts-xapian/files/patch-src_fts-backend-xapian-functions.cpp b/mail/dovecot-fts-xapian/files/patch-src_fts-backend-xapian-functions.cpp new file mode 100644 index 000000000000..74bb89dd8c95 --- /dev/null +++ b/mail/dovecot-fts-xapian/files/patch-src_fts-backend-xapian-functions.cpp @@ -0,0 +1,30 @@ +--- src/fts-backend-xapian-functions.cpp.orig 2021-11-10 13:09:44 UTC ++++ src/fts-backend-xapian-functions.cpp +@@ -505,7 +505,17 @@ static long fts_backend_xapian_current_time() + + static long fts_backend_xapian_get_free_memory() // KB + { +- return long(sysconf(_SC_AVPHYS_PAGES)*sysconf(_SC_PAGE_SIZE) / 1024.0); ++#ifdef __FreeBSD__ ++ uint32_t m; ++ size_t len = sizeof(m); ++ sysctlbyname("vm.stats.vm.v_free_count", &m, &len, NULL, 0); ++ if(fts_xapian_settings.verbose>1) i_info("FTS Xapian: (BSD) Free pages %ld",long(m)); ++ m = m * fts_xapian_settings.pagesize / 1024.0; ++ if(fts_xapian_settings.verbose>1) i_info("FTS Xapian: (BSD) Free memory %ld kB",long(m)); ++ return long(m); ++#else ++ return long(sysconf(_SC_AVPHYS_PAGES) * fts_xapian_settings.pagesize / 1024.0); ++#endif + } + + static bool fts_backend_xapian_test_memory() +@@ -1100,7 +1110,7 @@ bool fts_backend_xapian_index_text(struct xapian_fts_b + + XResultSet * result=fts_backend_xapian_query(dbx,xq,1); + +- Xapian::docid docid; ++ Xapian::docid docid = 0; + Xapian::Document * doc = NULL; + + try diff --git a/mail/dovecot-fts-xapian/files/patch-src_fts-xapian-plugin.c b/mail/dovecot-fts-xapian/files/patch-src_fts-xapian-plugin.c new file mode 100644 index 000000000000..24d3a718d46c --- /dev/null +++ b/mail/dovecot-fts-xapian/files/patch-src_fts-xapian-plugin.c @@ -0,0 +1,26 @@ +--- src/fts-xapian-plugin.c.orig 2021-11-10 13:11:59 UTC ++++ src/fts-xapian-plugin.c +@@ -30,7 +30,14 @@ static void fts_xapian_mail_user_created(struct mail_u + fuser->set.lowmemory = XAPIAN_MIN_RAM; + fuser->set.partial = XAPIAN_DEFAULT_PARTIAL; + fuser->set.full = XAPIAN_DEFAULT_FULL; +- ++ ++#ifdef __FreeBSD__ ++ size_t len = sizeof(fuser->set.pagesize); ++ sysctlbyname("hw.pagesize", &(fuser->set.pagesize), &len, NULL, 0); ++#else ++ fuser->set.pagesize = sysconf(_SC_PAGE_SIZE); ++#endif ++ + const char * env = mail_user_plugin_getenv(user, "fts_xapian"); + if (env == NULL) + { +@@ -93,7 +100,6 @@ static void fts_xapian_mail_user_created(struct mail_u + fuser->set.partial = XAPIAN_DEFAULT_PARTIAL; + fuser->set.full = XAPIAN_DEFAULT_FULL; + } +- + + if (fts_mail_user_init(user, FALSE, &error) < 0) i_error("FTS Xapian: %s", error); + diff --git a/mail/dovecot-fts-xapian/files/patch-src_fts-xapian-plugin.h b/mail/dovecot-fts-xapian/files/patch-src_fts-xapian-plugin.h new file mode 100644 index 000000000000..e6788f3145a5 --- /dev/null +++ b/mail/dovecot-fts-xapian/files/patch-src_fts-xapian-plugin.h @@ -0,0 +1,29 @@ +--- src/fts-xapian-plugin.h.orig 2021-11-10 13:06:54 UTC ++++ src/fts-xapian-plugin.h +@@ -15,6 +15,12 @@ + #include "module-context.h" + #include "fts-api-private.h" + ++#ifdef __FreeBSD__ ++#include ++#include ++#include ++#endif ++ + #define XAPIAN_FILE_PREFIX "xapian-indexes" + #define XAPIAN_TERM_SIZELIMIT 245L + #define XAPIAN_COMMIT_ENTRIES 1000000L +@@ -27,9 +33,10 @@ + + struct fts_xapian_settings + { +- int verbose; +- long lowmemory; +- long partial,full; ++ int verbose; ++ unsigned long pagesize; ++ long lowmemory; ++ long partial,full; + }; + + struct fts_xapian_user {