git: cbf7ed9c4547 - main - Add chinese/bpmf-vsime: Bopomofo IVS reading selection tool

Li-Wen Hsu <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch main has been updated by lwhsu:

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

commit cbf7ed9c45473ac47158efeb5aa75a1360f3a845
Author:     Li-Wen Hsu <[email protected]>
AuthorDate: 2026-08-12 08:46:36 +0000
Commit:     Li-Wen Hsu <[email protected]>
CommitDate: 2026-08-12 08:51:39 +0000

    Add chinese/bpmf-vsime: Bopomofo IVS reading selection tool
    
    The tool is a local web page that highlights every Han character with more
    than one Bopomofo reading, guesses the common ones from a bundled phrase
    database, and produces plain text carrying the matching Ideographic
    Variation Sequences.
    
    The upstream distribution bundles a copy of BpmfZihiKaiStd-Regular.ttf for
    the page to render with.  Drop it and point the two @font-face rules at the
    copy installed by x11-fonts/bpmf-zihikai instead, which is a run dependency.
---
 chinese/Makefile                        |  1 +
 chinese/bpmf-vsime/Makefile             | 42 +++++++++++++++++++++++++++++++++
 chinese/bpmf-vsime/distinfo             |  3 +++
 chinese/bpmf-vsime/files/pkg-message.in | 10 ++++++++
 chinese/bpmf-vsime/pkg-descr            | 13 ++++++++++
 chinese/bpmf-vsime/pkg-plist            |  2 ++
 6 files changed, 71 insertions(+)

diff --git a/chinese/Makefile b/chinese/Makefile
index 534a15ae021a..dd3bbae81a2c 100644
--- a/chinese/Makefile
+++ b/chinese/Makefile
@@ -11,6 +11,7 @@
     SUBDIR += autoconvert
     SUBDIR += big5width
     SUBDIR += bitchx
+    SUBDIR += bpmf-vsime
     SUBDIR += bsdconv-opencc
     SUBDIR += bug5
     SUBDIR += c2t
diff --git a/chinese/bpmf-vsime/Makefile b/chinese/bpmf-vsime/Makefile
new file mode 100644
index 000000000000..2e36edbe6bb4
--- /dev/null
+++ b/chinese/bpmf-vsime/Makefile
@@ -0,0 +1,42 @@
+PORTNAME=	bpmf-vsime
+PORTVERSION=	1.500
+CATEGORIES=	chinese
+MASTER_SITES=	https://github.com/ButTaiwan/bpmfvs/releases/download/v${PORTVERSION}/
+DISTNAME=	Bpmf_VSIME
+DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}
+
+MAINTAINER=	[email protected]
+COMMENT=	Bopomofo IVS reading selection tool
+WWW=		https://github.com/ButTaiwan/bpmfvs
+
+LICENSE=	APACHE20 CC-BY-ND-3.0 MIT
+LICENSE_COMB=	multi
+LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE-2.0.txt
+LICENSE_FILE_MIT=	${WRKSRC}/LICENSE-MIT.txt
+
+RUN_DEPENDS=	${LOCALBASE}/share/fonts/bpmf-zihikai/BpmfZihiKaiStd-Regular.ttf:x11-fonts/bpmf-zihikai
+
+USES=		zip
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+NO_WRKSUBDIR=	yes
+
+SUB_FILES=	pkg-message
+
+PORTDATA=	index.html ime.js jquery.min.js poyin_db.js tzdic zhdicui.js \
+		zhuivsdic.js zihaidic.css
+
+# Render with the font installed by x11-fonts/bpmf-zihikai instead of the
+# copy bundled in the distfile, which is not installed.
+post-patch:
+	@${REINPLACE_CMD} -e "s|url('BpmfZihiKaiStd-Regular.ttf')|url('../fonts/bpmf-zihikai/BpmfZihiKaiStd-Regular.ttf')|" \
+		${WRKSRC}/index.html ${WRKSRC}/zihaidic.css
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/NOTICE.txt ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/chinese/bpmf-vsime/distinfo b/chinese/bpmf-vsime/distinfo
new file mode 100644
index 000000000000..94916e424583
--- /dev/null
+++ b/chinese/bpmf-vsime/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1786519491
+SHA256 (bpmf-vsime-1.500/Bpmf_VSIME.zip) = 5418641577b378dcbfe5763726746569cbd26f62a7af19b027ae5adb3e79974f
+SIZE (bpmf-vsime-1.500/Bpmf_VSIME.zip) = 13091401
diff --git a/chinese/bpmf-vsime/files/pkg-message.in b/chinese/bpmf-vsime/files/pkg-message.in
new file mode 100644
index 000000000000..1b38c55bd6c3
--- /dev/null
+++ b/chinese/bpmf-vsime/files/pkg-message.in
@@ -0,0 +1,10 @@
+[
+{ type: install
+  message: <<EOM
+The reading selection tool is installed as a local web page.  Open it with a
+browser, for example:
+
+	xdg-open file://%%DATADIR%%/index.html
+EOM
+}
+]
diff --git a/chinese/bpmf-vsime/pkg-descr b/chinese/bpmf-vsime/pkg-descr
new file mode 100644
index 000000000000..b51beaa08453
--- /dev/null
+++ b/chinese/bpmf-vsime/pkg-descr
@@ -0,0 +1,13 @@
+Offline reading selection tool from the Bopomofo IVS font specification.
+Paste a Chinese text into the browser page, and every Han character that has
+more than one Bopomofo reading is highlighted so that the intended reading
+can be picked; the tool guesses common readings from a bundled phrase
+database.  The result is plain text carrying Ideographic Variation Sequences,
+which can be pasted into any application that renders it with a Bopomofo IVS
+font.
+
+The bundled dictionary comes from the Ministry of Education Concised Mandarin
+Dictionary and is shown through the ToneOZ dictionary front end.
+
+The page is rendered with x11-fonts/bpmf-zihikai, which is installed as a
+dependency.
diff --git a/chinese/bpmf-vsime/pkg-plist b/chinese/bpmf-vsime/pkg-plist
new file mode 100644
index 000000000000..72487db452ba
--- /dev/null
+++ b/chinese/bpmf-vsime/pkg-plist
@@ -0,0 +1,2 @@
+%%DOCSDIR%%/NOTICE.txt
+%%DOCSDIR%%/README.md
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.