diff --git a/japanese/skk-jawiki/Makefile b/japanese/skk-jawiki/Makefile index 79eeb4c9c68e..97d97b96fb91 100644 --- a/japanese/skk-jawiki/Makefile +++ b/japanese/skk-jawiki/Makefile @@ -1,71 +1,71 @@ PORTNAME= skk-jawiki DISTVERSION= 2026.06.21.141122 CATEGORIES= japanese MASTER_SITES= https://github.com/tokuhirom/jawiki-kana-kanji-dict/releases/download/v${DISTVERSION}/ DISTFILES= SKK-JISYO.jawiki MAINTAINER= mce@FreeBSD.org COMMENT= SKK dictionary from Wikipedia (Japanese edition) WWW= https://github.com/tokuhirom/jawiki-kana-kanji-dict LICENSE= MIT NO_ARCH= yes SKKDIR= share/skk SKKDIC= SKK-JISYO.jawiki PLIST_FILES= ${DICS:S|^|${SKKDIR}/|} 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/cdbmake:databases/cdb UTF8CDB_BUILD_DEPENDS= ${LOCALBASE}/bin/cdbmake:databases/cdb EUC_VARS= DICS=${SKKDIC} EUCCDB_VARS= DICS+=${SKKDIC}.cdb UTF8_VARS= DICS+=${SKKDIC}.utf8 UTF8CDB_VARS= DICS+=${SKKDIC}.utf8.cdb do-extract: @${MKDIR} ${WRKSRC} ${CP} ${DISTDIR}/${DISTFILES} ${WRKSRC}/ .include 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} '/^[^;]/ { \ + LC_ALL=C ${AWK} '/^[^;]/ { \ s = substr($$0, index($$0, " ") + 1); \ print "+" length($$1) "," length(s) ":" $$1 "->" s; \ } \ END { \ print ""; \ }' < ${WRKSRC}/${dic:S|.cdb||} | \ ${LOCALBASE}/bin/cdbmake ${WRKSRC}/${dic} ${WRKSRC}/${dic}.tmp .endfor do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${SKKDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${DICS} ${STAGEDIR}${PREFIX}/${SKKDIR} .include diff --git a/japanese/skk-jisyo/Makefile b/japanese/skk-jisyo/Makefile index 3168b347b5d4..be8cb9ecd810 100644 --- a/japanese/skk-jisyo/Makefile +++ b/japanese/skk-jisyo/Makefile @@ -1,81 +1,81 @@ PORTNAME= skk-jisyo DISTVERSIONPREFIX= g DISTVERSION= 20260411 CATEGORIES= japanese .if defined(WITH_SKKJISYO_CDB) PKGNAMESUFFIX= -cdb .endif MAINTAINER= mce@FreeBSD.org COMMENT?= Jisyo (dictionary) files for the SKK Japanese-input software WWW= http://openlab.jp/skk/dic.html LICENSE= GPLv2+ .if defined(WITH_SKKJISYO_CDB) BUILD_DEPENDS= ${LOCALBASE}/bin/cdbmake:databases/cdb .endif USE_GITHUB= yes GH_ACCOUNT= skk-dev GH_PROJECT= dict GH_TAGNAME= 0a164e6 NO_ARCH= yes .if defined(WITH_SKKJISYO_CDB) CDBSUFFIX= .cdb .else CDBSUFFIX= #empty NO_BUILD= yes .endif SKKDIR?= share/skk SKK_JISYO_TYPE?=L JIS2 JIS3_4 .for type in ${SKK_JISYO_TYPE} PLIST_FILES+= ${SKKDIR}/SKK-JISYO.${type}${CDBSUFFIX} .endfor PLIST_SUB+= SKKDIR=${SKKDIR} .if defined(WITH_SKKJISYO_DELCOMMENTS) # Strip comments in transtation candidates list. # Candidate list starts with '/', and each candidate is concatenated by # '/' (e.g., "/c1/c2/".) Each candidate may have a comment just after # the candidate, leading a marker character ';' (e.g. /c3;comment/). post-patch: .for type in ${SKK_JISYO_TYPE} ${REINPLACE_CMD} -e '/^[^;]/s,;[^/]*/,/,g' -e '/^>/d' \ ${WRKSRC}/SKK-JISYO.${type} .endfor .endif .if defined(WITH_SKKJISYO_CDB) # Convert plaintext jisyo data to CDB database by cdbmake. # Each line consists of "+${klen},${dlen}:${key}->${data}", where klen/dlen # are length of key/data. A blank line at the end of data is required. # See also: . do-build: .for type in ${SKK_JISYO_TYPE} - ${AWK} '/^[^;]/ { \ + LC_ALL=C ${AWK} '/^[^;]/ { \ s = substr($$0, index($$0, " ") + 1); \ print "+" length($$1) "," length(s) ":" $$1 "->" s; \ } \ END { \ print ""; \ }' \ < ${WRKSRC}/SKK-JISYO.${type} | \ ${LOCALBASE}/bin/cdbmake \ ${WRKSRC}/SKK-JISYO.${type}${CDBSUFFIX} \ ${WRKSRC}/SKK-JISYO.${type}.tmp .endfor .endif do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${SKKDIR} .for type in ${SKK_JISYO_TYPE} ${INSTALL_DATA} ${WRKSRC}/SKK-JISYO.${type}${CDBSUFFIX} \ ${STAGEDIR}${PREFIX}/${SKKDIR}/ .endfor .include