You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
1.3 KiB
72 lines
1.3 KiB
4 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
6 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI="7"
|
||
6 years ago
|
|
||
|
MY_PN=${PN^^}
|
||
|
|
||
|
DESCRIPTION="Jisyo (dictionary) files for the SKK Japanese-input software"
|
||
|
HOMEPAGE="http://openlab.ring.gr.jp/skk/dic.html"
|
||
|
SRC_URI="mirror://gentoo/${P}.tar.xz
|
||
|
https://dev.gentoo.org/~hattya/distfiles/${P}.tar.xz"
|
||
|
|
||
4 years ago
|
LICENSE="CC-BY-SA-3.0 GPL-2+ public-domain unicode"
|
||
6 years ago
|
SLOT="0"
|
||
4 years ago
|
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
|
||
6 years ago
|
IUSE="cdb"
|
||
|
|
||
|
DEPEND="virtual/awk
|
||
|
cdb? (
|
||
|
|| (
|
||
|
dev-db/tinycdb
|
||
|
dev-db/cdb
|
||
|
)
|
||
|
)"
|
||
|
RDEPEND=""
|
||
|
|
||
4 years ago
|
DOCS=( ChangeLog{,.{1..3}} committers.md )
|
||
|
HTML_DOCS=( edict_doc.html )
|
||
6 years ago
|
|
||
|
src_prepare() {
|
||
4 years ago
|
rm -f ${MY_PN}.{hukugougo,noregist,notes,pubdic+,requested,unannotated,*wrong*}
|
||
6 years ago
|
|
||
|
default
|
||
|
}
|
||
|
|
||
|
cdb_make() {
|
||
|
cdbmake "${1}" "${1}.tmp"
|
||
|
}
|
||
|
|
||
|
tinycdb_make() {
|
||
|
cdb -c "${1}"
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
if use cdb; then
|
||
|
local cdbmake=cdb_make f
|
||
|
if has_version dev-db/tinycdb; then
|
||
|
cdbmake=tinycdb_make
|
||
|
fi
|
||
|
for f in {,zipcode/}${MY_PN}.*; do
|
||
|
LC_ALL=C awk '
|
||
|
/^[^;]/ {
|
||
|
s = substr($0, index($0, " ") + 1)
|
||
|
print "+" length($1) "," length(s) ":" $1 "->" s
|
||
|
}
|
||
|
END {
|
||
|
print ""
|
||
|
}
|
||
|
' ${f} | ${cdbmake} ${f}.cdb || die
|
||
|
done
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
insinto /usr/share/skk
|
||
|
doins {,zipcode/}${MY_PN}.*
|
||
5 years ago
|
|
||
|
einstalldocs
|
||
|
docinto zipcode
|
||
4 years ago
|
dodoc zipcode/README.md
|
||
6 years ago
|
}
|