git: 43d00a248a3b - main - japanese/multiskkserv: Resurrect and update to 20240224

From: MANTANI Nobutaka <nobutaka_at_FreeBSD.org>
Date: Sun, 18 Aug 2024 06:56:24 UTC
The branch main has been updated by nobutaka:

URL: https://cgit.FreeBSD.org/ports/commit/?id=43d00a248a3b9e0bbbb98f8ca59881db922b0bd4

commit 43d00a248a3b9e0bbbb98f8ca59881db922b0bd4
Author:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
AuthorDate: 2024-08-18 06:52:26 +0000
Commit:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
CommitDate: 2024-08-18 06:52:26 +0000

    japanese/multiskkserv: Resurrect and update to 20240224
    
    PR:     278562
    Reported by:    mew14930xvi <mew14930xvi@inbox.lv>
---
 japanese/Makefile                           |  1 +
 japanese/multiskkserv/Makefile              | 42 +++++++++++++++++++++++++++++
 japanese/multiskkserv/distinfo              |  3 +++
 japanese/multiskkserv/files/multiskkserv.in | 20 ++++++++++++++
 japanese/multiskkserv/pkg-descr             |  5 ++++
 5 files changed, 71 insertions(+)

diff --git a/japanese/Makefile b/japanese/Makefile
index 6bcd8776bf6a..8cd3d2617abd 100644
--- a/japanese/Makefile
+++ b/japanese/Makefile
@@ -182,6 +182,7 @@
     SUBDIR += mozc-el
     SUBDIR += mozc-server
     SUBDIR += mozc-tool
+    SUBDIR += multiskkserv
     SUBDIR += mypaedia-fpw-package
     SUBDIR += namazu
     SUBDIR += namazu2
diff --git a/japanese/multiskkserv/Makefile b/japanese/multiskkserv/Makefile
new file mode 100644
index 000000000000..e609ede970a5
--- /dev/null
+++ b/japanese/multiskkserv/Makefile
@@ -0,0 +1,42 @@
+PORTNAME=	multiskkserv
+DISTVERSION=	20240224
+CATEGORIES=	japanese
+
+MAINTAINER=	mew14930xvi@inbox.lv
+COMMENT=	Multiple dictionary server for the SKK
+WWW=		https://github.com/sina-ht/multiskkserv/
+
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+RUN_DEPENDS=	${LOCALBASE}/${SKKDIR}/SKK-JISYO.L.cdb:japanese/skk-jisyo-cdb \
+		${LOCALBASE}/${SKKDIR}/SKK-JISYO.jawiki.cdb:japanese/skk-jawiki
+
+USES=		autoreconf libtool
+USE_GITHUB=	yes
+GH_ACCOUNT=	sina-ht
+GH_TAGNAME=	2ffe7cd
+
+SKKDIR?=	share/skk
+SKKJISYO_TYPE?=	L JIS2 JIS3_4 jawiki
+
+USE_RC_SUBR=	${PORTNAME}
+GNU_CONFIGURE=	yes
+
+SUB_FILES=	${PORTNAME}
+SUB_LIST=	SKKDICS="${SKKJISYO_TYPE:S/^/${PREFIX}\/${SKKDIR}\/SKK-JISYO./:S/$/.cdb/}"
+
+PLIST_FILES=	bin/skkdic-p2cdb sbin/multiskkserv sbin/multiskkserv-ctl
+
+OPTIONS_DEFINE=		CDB
+OPTIONS_DEFAULT=	CDB
+CDB_DESC=		Use databases/cdb instead of bundled tinycdb
+CDB_EXTRACT_DEPENDS=	${NONEXISTENT}:databases/cdb:build
+CDB_CONFIGURE_ON=	--with-cdb=`${MAKE} -C ${PORTSDIR}/databases/cdb -V WRKSRC`
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/tools/skkdic-p2cdb ${STAGEDIR}${PREFIX}/bin
+	cd ${WRKSRC}/src && ${INSTALL_PROGRAM} multiskkserv multiskkserv-ctl \
+		${STAGEDIR}${PREFIX}/sbin
+
+.include <bsd.port.mk>
diff --git a/japanese/multiskkserv/distinfo b/japanese/multiskkserv/distinfo
new file mode 100644
index 000000000000..587b3571d2b3
--- /dev/null
+++ b/japanese/multiskkserv/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1713851829
+SHA256 (sina-ht-multiskkserv-20240224-2ffe7cd_GH0.tar.gz) = e40c06236f682296eeac57e935c1373f41e5231fe8efff33a56919f530ccaacc
+SIZE (sina-ht-multiskkserv-20240224-2ffe7cd_GH0.tar.gz) = 219138
diff --git a/japanese/multiskkserv/files/multiskkserv.in b/japanese/multiskkserv/files/multiskkserv.in
new file mode 100644
index 000000000000..14ccd1a1f5d0
--- /dev/null
+++ b/japanese/multiskkserv/files/multiskkserv.in
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# PROVIDE: multiskkserv
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+# See `%%PREFIX%%/sbin/multiskkserv -h` for flags
+# NOTE: multiskkserv won't auto-detach itself, use &.
+
+. /etc/rc.subr
+
+name=multiskkserv
+rcvar=multiskkserv_enable
+command=%%PREFIX%%/sbin/multiskkserv
+
+: ${multiskkserv_enable:="NO"}
+: ${multiskkserv_flags:="-s 127.0.0.1 %%SKKDICS%% &"}
+
+load_rc_config ${name}
+run_rc_command $1
diff --git a/japanese/multiskkserv/pkg-descr b/japanese/multiskkserv/pkg-descr
new file mode 100644
index 000000000000..b318352ea681
--- /dev/null
+++ b/japanese/multiskkserv/pkg-descr
@@ -0,0 +1,5 @@
+multiskkserv is a skk server which can search multiple dictionaries.
+This server uses cdb format as the dictionary format. cdb is the
+efficient and constant (i.e. cannot add, delete, modify) database
+format by Dan J. Bernstein, which I think is the appropriate format
+for the system-wide constant dictionary storage.