japanese/multiskkserv: Resurrect and update to 20240224

PR:	278562
Reported by:	mew14930xvi <mew14930xvi@inbox.lv>
This commit is contained in:
MANTANI Nobutaka 2024-08-18 15:52:26 +09:00
parent f7aaddf034
commit 43d00a248a
5 changed files with 71 additions and 0 deletions

View file

@ -182,6 +182,7 @@
SUBDIR += mozc-el
SUBDIR += mozc-server
SUBDIR += mozc-tool
SUBDIR += multiskkserv
SUBDIR += mypaedia-fpw-package
SUBDIR += namazu
SUBDIR += namazu2

View file

@ -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>

View file

@ -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

View file

@ -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

View file

@ -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.