aboutsummaryrefslogtreecommitdiff
path: root/mail/mailest
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2015-07-10 01:24:27 +0000
committerHiroki Sato <hrs@FreeBSD.org>2015-07-10 01:24:27 +0000
commita8eb7c738bda8f9bdce503eeeaddeaf351bbc95f (patch)
treec175af7f73962c7d6ae020c1309e6b4971cee538 /mail/mailest
parentbee941dbd5917eb6daebd746779102dd28212567 (diff)
downloadports-a8eb7c738bda8f9bdce503eeeaddeaf351bbc95f.tar.gz
ports-a8eb7c738bda8f9bdce503eeeaddeaf351bbc95f.zip
Add mail/mailest, hyper estraier search engine backend for mail/mew.
Notes
Notes: svn path=/head/; revision=391687
Diffstat (limited to 'mail/mailest')
-rw-r--r--mail/mailest/Makefile34
-rw-r--r--mail/mailest/distinfo2
-rw-r--r--mail/mailest/files/patch-mailestd-Makefile29
-rw-r--r--mail/mailest/files/patch-mailestd.c47
-rw-r--r--mail/mailest/pkg-descr4
-rw-r--r--mail/mailest/pkg-message29
-rw-r--r--mail/mailest/pkg-plist11
7 files changed, 156 insertions, 0 deletions
diff --git a/mail/mailest/Makefile b/mail/mailest/Makefile
new file mode 100644
index 000000000000..5cd8b269cece
--- /dev/null
+++ b/mail/mailest/Makefile
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+PORTNAME= mailest
+PORTVERSION= 0.9.20
+CATEGORIES= mail
+
+MAINTAINER= hrs@FreeBSD.org
+COMMENT= Hyper Estraier backend for Mew
+
+LICENSE= BSD2CLAUSE ISCL LGPL21
+LICENSE_COMB= multi
+LICENSE_FILE_BSD2CLAUSE=${WRKSRC}/LICENSE.BSD2CLAUSE
+LICENSE_FILE_ISCL= ${WRKSRC}/LICENSE.ISCL
+LICENSE_FILE_LGPL21= ${WRKSRC}/LICENSE.LGPL21
+
+LIB_DEPENDS= libevent.so:${PORTSDIR}/devel/libevent2 \
+ libqdbm.so:${PORTSDIR}/databases/qdbm
+RUN_DEPENDS= mewl:${PORTSDIR}/mail/mew \
+ estcmd:${PORTSDIR}/textproc/hyperestraier
+
+USES= iconv
+USE_EMACS= yes
+USE_GITHUB= yes
+GH_ACCOUNT= yasuoka
+GH_TAGNAME= ${PORTNAME}-${PORTVERSION}
+MAKE_ENV= USE_BSDMAKE=true WITH_INSTALL_AS_USER=true
+
+post-extract:
+ ${SED} "/\*-/,/*\//!d" ${WRKSRC}/bytebuf.c > ${LICENSE_FILE_BSD2CLAUSE}
+ ${SED} "/^\/\*/,/ *\//!d" ${WRKSRC}/mailestctl.c > ${LICENSE_FILE_ISCL}
+ ${SED} "/^\/\*\*/,/\*\*\//!d" ${WRKSRC}/estdraft.c \
+ > ${LICENSE_FILE_LGPL21}
+
+.include <bsd.port.mk>
diff --git a/mail/mailest/distinfo b/mail/mailest/distinfo
new file mode 100644
index 000000000000..f23d934a3fdc
--- /dev/null
+++ b/mail/mailest/distinfo
@@ -0,0 +1,2 @@
+SHA256 (yasuoka-mailest-0.9.20-mailest-0.9.20_GH0.tar.gz) = f51cde2047422c993425eee8102e5f7a914094b60a1a039a0b84502e5d22c5f8
+SIZE (yasuoka-mailest-0.9.20-mailest-0.9.20_GH0.tar.gz) = 171958
diff --git a/mail/mailest/files/patch-mailestd-Makefile b/mail/mailest/files/patch-mailestd-Makefile
new file mode 100644
index 000000000000..c1aee6e150b6
--- /dev/null
+++ b/mail/mailest/files/patch-mailestd-Makefile
@@ -0,0 +1,29 @@
+--- mailestd/Makefile.orig 2015-05-27 12:18:27.000000000 +0900
++++ mailestd/Makefile 2015-06-05 16:09:10.228594000 +0900
+@@ -2,9 +2,9 @@
+
+ PROG= mailestd
+ SRCS= bytebuf.c mailestd.c mailestctl.c parse.y parser.c
+-LINKS= ${BINDIR}/mailestd ${LOCALBASE}/bin/mailestctl
++LINKS= ${BINDIR}/${PROG} ${BINDIR}/mailestctl
+ CFLAGS+= -DHAVE_LIBESTDRAFT -DMONITOR_KQUEUE
+-LIBESTDRAFTOBJ!=cd ${.CURDIR}/../libestdraft; ${MAKE} _whereobj
++LIBESTDRAFTOBJ!=cd ${.CURDIR}/../libestdraft; ${MAKE} -V.OBJDIR
+ LDFLAGS= -L${LOCALBASE}/lib
+ LDADD= -lestraier -levent -lqdbm
+ DPADD= ${LIBESTRAIER} ${LIBEVENT} ${LIBQDBM}
+@@ -21,13 +21,7 @@
+ DPADD+= ${LIBPTHREAD}
+ .endif
+
+-beforeinstall:
+- ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+- ${.CURDIR}/../mew-mailest.sh ${PREFIX}/bin/mew-mailest
+- ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+- ${.CURDIR}/../cmew-mailest.sh ${PREFIX}/bin/cmew-mailest
+- ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+- ${.CURDIR}/../smew-mailest.sh ${PREFIX}/bin/smew-mailest
++SCRIPTS= mew-mailest.sh cmew-mailest.sh smew-mailest.sh
+
+ LDFLAGS+= -L${LIBESTDRAFTOBJ}
+ LDADD+= -lestdraft
diff --git a/mail/mailest/files/patch-mailestd.c b/mail/mailest/files/patch-mailestd.c
new file mode 100644
index 000000000000..3421d0c49550
--- /dev/null
+++ b/mail/mailest/files/patch-mailestd.c
@@ -0,0 +1,47 @@
+--- mailestd.c.orig 2015-05-27 12:18:27.000000000 +0900
++++ mailestd.c 2015-06-05 16:21:58.350309000 +0900
+@@ -809,8 +809,6 @@
+
+ RB_INIT(&folders);
+ ctx = mailestd_get_gather(_this, task->gather_id);
+- mailestd_log(LOG_DEBUG, "Gathering %s ...", mailestd_folder_name(
+- _this, folder, buf, sizeof(buf)));
+ if (folder[0] == '/')
+ strlcpy(rdir, folder, sizeof(rdir));
+ else {
+@@ -818,6 +816,8 @@
+ strlcat(rdir, "/", sizeof(rdir));
+ strlcat(rdir, folder, sizeof(rdir));
+ }
++ mailestd_log(LOG_DEBUG, "Gathering %s ...", mailestd_folder_name(
++ _this, rdir, buf, sizeof(buf)));
+ paths[0] = rdir;
+ paths[1] = NULL;
+ lrdir = strlen(rdir);
+@@ -853,7 +853,7 @@
+ }
+
+ mailestd_log(LOG_DEBUG, "Gathered %s (Total: %d Remove: %d Update: %d)",
+- mailestd_folder_name(_this, folder, buf, sizeof(buf)),
++ mailestd_folder_name(_this, rdir, buf, sizeof(buf)),
+ total, delete, update);
+ out:
+ if (ctx != NULL) {
+@@ -2638,6 +2638,7 @@
+ mailestd_monitor_folder(struct mailestd *_this, const char *dirpath)
+ {
+ int fd = -1;
++ char buf[PATH_MAX];
+ struct folder *fld, fld0;
+
+ MAILESTD_ASSERT(_thread_self() == _this->monitorworker.thread);
+@@ -2659,7 +2660,8 @@
+ fld->fd = fd;
+ fld->path = xstrdup(dirpath);
+ RB_INSERT(folder_tree, &_this->monitors, fld);
+- mailestd_log(LOG_DEBUG, "Start monitoring %s", dirpath);
++ mailestd_log(LOG_DEBUG, "Start monitoring %s",
++ mailestd_folder_name(_this, dirpath, buf, sizeof(buf)));
+ }
+
+ static void
diff --git a/mail/mailest/pkg-descr b/mail/mailest/pkg-descr
new file mode 100644
index 000000000000..def69de02626
--- /dev/null
+++ b/mail/mailest/pkg-descr
@@ -0,0 +1,4 @@
+mailest provides a search backend and id index database for
+Mew using Hyper Estraier.
+
+WWW: https://github.com/yasuoka/mailest
diff --git a/mail/mailest/pkg-message b/mail/mailest/pkg-message
new file mode 100644
index 000000000000..3b020ca7990a
--- /dev/null
+++ b/mail/mailest/pkg-message
@@ -0,0 +1,29 @@
+------------
+How to start
+------------
+
++ For existing `mewest` user, backup and/or delete the database
+ (`~/Mail/casket`)
+
+ - Since "mailestd" can work with the old database, so OK to skip deleting
+ `~/Mail/casket`, but remark that `V` will not work against the mails
+ which are indexed by `mewest`. To make `V` work against them, delete
+ the database in advance.
+
++ Add the below line to `.mew.el` to let Mew use "Hyper Estrairer" for
+ search.
+
+ ((setq mew-search-method 'est)
+
++ Add the below lines to `~/.emacs` use use the "mailest" instead of
+ existing "mewest".
+
+ (defvar mew-prog-est "mew-mailest")
+ (defvar mew-prog-est-update "mew-mailest")
+ (defvar mew-prog-cmew "cmew-mailest")
+ (defvar mew-prog-smew "smew-mailest")
+ (defvar mew-id-db-file ".mailest.sock")
+
++ Try `km`, `kM`, `k/`, `k?`, `V` in Mew. See
+ http://mew.org/en/info/release/mew_6.html#dbsearch for search commands
+ in Mew.
diff --git a/mail/mailest/pkg-plist b/mail/mailest/pkg-plist
new file mode 100644
index 000000000000..3a5dbbaed99e
--- /dev/null
+++ b/mail/mailest/pkg-plist
@@ -0,0 +1,11 @@
+sbin/cmew-mailest
+sbin/mailestctl
+sbin/mew-mailest
+sbin/smew-mailest
+sbin/mailestd
+man/man1/cmew-mailest.1.gz
+man/man1/mailestctl.1.gz
+man/man1/mew-mailest.1.gz
+man/man1/smew-mailest.1.gz
+man/man5/mailestd.conf.5.gz
+man/man8/mailestd.8.gz