Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Aug 2024 06:27:52 GMT
From:      MANTANI Nobutaka <nobutaka@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 5667992026d1 - main - japanese/skk-jawiki: New port: SKK dictionary from Wikipedia (Japanese edition)
Message-ID:  <202408180627.47I6RqKO027047@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by nobutaka:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5667992026d1c0e65ab240d98e46a3d3f899511c

commit 5667992026d1c0e65ab240d98e46a3d3f899511c
Author:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
AuthorDate: 2024-08-18 06:24:39 +0000
Commit:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
CommitDate: 2024-08-18 06:24:39 +0000

    japanese/skk-jawiki: New port: SKK dictionary from Wikipedia (Japanese edition)
    
    SKK (Simple Kana Kanji Convertor) is a very fast and efficient Japanese
    input method system.
    This package provides dictionary from Wikipedia (Japanese edition).
    
    PR:     278808
    Reported by:    mew14930xvi <mew14930xvi@inbox.lv>
---
 japanese/Makefile             |   1 +
 japanese/skk-jawiki/Makefile  | 103 ++++++++++++++++++++++++++++++++++++++++++
 japanese/skk-jawiki/distinfo  |   3 ++
 japanese/skk-jawiki/pkg-descr |   3 ++
 4 files changed, 110 insertions(+)

diff --git a/japanese/Makefile b/japanese/Makefile
index 0da6a8c8f6f4..ddf8c0e2389f 100644
--- a/japanese/Makefile
+++ b/japanese/Makefile
@@ -257,6 +257,7 @@
     SUBDIR += sj3-lib
     SUBDIR += sj3-server
     SUBDIR += skk
+    SUBDIR += skk-jawiki
     SUBDIR += skk-jisyo
     SUBDIR += skk-jisyo-cdb
     SUBDIR += skk-tools
diff --git a/japanese/skk-jawiki/Makefile b/japanese/skk-jawiki/Makefile
new file mode 100644
index 000000000000..ad55ea1ce70d
--- /dev/null
+++ b/japanese/skk-jawiki/Makefile
@@ -0,0 +1,103 @@
+PORTNAME=	jawiki
+DISTVERSION=	g20240521
+CATEGORIES=	japanese
+PKGNAMEPREFIX?=	ja-skk-
+
+MAINTAINER=	mew14930xvi@inbox.lv
+COMMENT?=	SKK dictionary from Wikipedia (Japanese edition)
+WWW=		https://github.com/tokuhirom/jawiki-kana-kanji-dict
+
+LICENSE=	MIT
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	tokuhirom
+GH_PROJECT=	jawiki-kana-kanji-dict
+GH_TAGNAME=	d62e22e
+NO_ARCH=	yes
+
+.if defined(MECAB)
+BUILD_DEPENDS=	${LOCALBASE}/libexec/mecab/mecab-dict-index:japanese/mecab
+
+MECABDIR=	lib/mecab/dic/ipadic
+MECABDIC=	${PORTNAME}.dic
+
+PLIST_FILES=	${MECABDIR}/${MECABDIC}
+
+OPTIONS_DEFAULT=	UTF8
+OPTIONS_SINGLE=		CHARSET
+OPTIONS_SINGLE_CHARSET=	EUCJP SHIFTJIS UTF8
+EUCJP_DESC=		Use EUC-JP as dictionary charset.
+SHIFTJIS_DESC=		Use SHIFT-JIS as dictionary charset.
+UTF8_DESC=		Use UTF-8 as dictionary charset.
+
+EUCJP_BUILD_DEPENDS=	ja-mecab-ipadic-eucjp>0:japanese/mecab-ipadic-eucjp
+SHIFTJIS_BUILD_DEPENDS=	ja-mecab-ipadic-sjis>0:japanese/mecab-ipadic-sjis
+UTF8_BUILD_DEPENDS=	ja-mecab-ipadic-utf8>0:japanese/mecab-ipadic-utf8
+
+EUCJP_VARS=		CSET=euc-jp
+SHIFTJIS_VARS=		CSET=shiftjis
+UTF8_VARS=		CSET=utf-8
+
+do-build:
+	${LOCALBASE}/libexec/mecab/mecab-dict-index \
+		-d ${LOCALBASE}/${MECABDIR} -u ${WRKSRC}/${MECABDIC} \
+		-f utf-8 -t ${CSET} ${WRKSRC}/mecab-userdic.csv
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/${MECABDIR}
+	${INSTALL_DATA} ${WRKSRC}/${MECABDIC} ${STAGEDIR}${PREFIX}/${MECABDIR}
+.else
+SKKDIR=		share/skk
+SKKDIC=		SKK-JISYO.${PORTNAME}
+
+OPTIONS_DEFAULT=		EUCCDB
+OPTIONS_MULTI=			DICTIONARY
+OPTIONS_MULTI_DICTIONARY=	EUC EUCCDB UTF8 UTF8CDB
+EUC_DESC=			EUC-JP Charset dictionary
+EUCCDB_DESC=			EUC-JP Charset dictionary (cdb)
+UTF8_DESC=			UTF8 Charset dictionary
+UTF8CDB_DESC=			UTF8 Charset dictionary (cdb)
+
+EUC_BUILD_DEPENDS=		${LOCALBASE}/bin/nkf:japanese/nkf
+EUCCDB_BUILD_DEPENDS=		${LOCALBASE}/bin/nkf:japanese/nkf \
+				${LOCALBASE}/bin/cdb:databases/tinycdb
+UTF8CDB_BUILD_DEPENDS=		${LOCALBASE}/bin/cdb:databases/tinycdb
+
+EUC_VARS=			DICS=${SKKDIC}
+EUCCDB_VARS=			DICS+=${SKKDIC}.cdb
+UTF8_VARS=			DICS+=${SKKDIC}.utf8
+UTF8CDB_VARS=			DICS+=${SKKDIC}.utf8.cdb
+
+PLIST_FILES=	${DICS:S|^|${SKKDIR}/|}
+
+.include <bsd.port.options.mk>
+
+do-build:
+	${MV} ${WRKSRC}/${SKKDIC} ${WRKSRC}/${SKKDIC}.orig
+.if ${PORT_OPTIONS:MUTF8*}
+	${ECHO_CMD} ';; -*- mode: fundamental; coding: utf-8 -*-' | \
+		${CAT} - ${WRKSRC}/${SKKDIC}.orig > ${WRKSRC}/${SKKDIC}.utf8
+.endif
+.if ${PORT_OPTIONS:MEUC*}
+	${ECHO_CMD} ';; -*- mode: fundamental; coding: euc-jp -*-' \
+		> ${WRKSRC}/${SKKDIC}
+	${LOCALBASE}/bin/nkf --oc=eucJP-ms ${WRKSRC}/${SKKDIC}.orig \
+		>> ${WRKSRC}/${SKKDIC}
+.endif
+.for dic in ${DICS:M*.cdb}
+	${AWK} '/^[^;]/ { \
+			s = substr($$0, index($$0, " ") + 1); \
+			print "+" length($$1) "," length(s) ":" $$1 "->" s; \
+		} \
+		END { \
+			print ""; \
+		}' < ${WRKSRC}/${dic:S|.cdb||} | \
+	${LOCALBASE}/bin/cdb -c -t - ${WRKSRC}/${dic}
+.endfor
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/${SKKDIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${DICS} ${STAGEDIR}${PREFIX}/${SKKDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/japanese/skk-jawiki/distinfo b/japanese/skk-jawiki/distinfo
new file mode 100644
index 000000000000..87dcf88ed2d0
--- /dev/null
+++ b/japanese/skk-jawiki/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1716299864
+SHA256 (tokuhirom-jawiki-kana-kanji-dict-g20240521-d62e22e_GH0.tar.gz) = 862f59e3795a04d85a0106029d63c4118a0323a7fa1eb3f3cbaf689b5cd1600c
+SIZE (tokuhirom-jawiki-kana-kanji-dict-g20240521-d62e22e_GH0.tar.gz) = 27128722
diff --git a/japanese/skk-jawiki/pkg-descr b/japanese/skk-jawiki/pkg-descr
new file mode 100644
index 000000000000..1ed7aa745834
--- /dev/null
+++ b/japanese/skk-jawiki/pkg-descr
@@ -0,0 +1,3 @@
+SKK (Simple Kana Kanji Convertor) is a very fast and efficient Japanese
+input method system.
+This package provides dictionary from Wikipedia (Japanese edition).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408180627.47I6RqKO027047>