diff options
author | Akinori Hattori <hattya@gentoo.org> | 2016-05-13 21:54:39 +0900 |
---|---|---|
committer | Akinori Hattori <hattya@gentoo.org> | 2016-05-13 21:54:39 +0900 |
commit | 2c1c1baa25ab44148aabe7810fad51acf62b4d99 (patch) | |
tree | 237012067dbec9e7a6dea0a9b909c5bceb24ffac /app-i18n/skk-jisyo | |
parent | app-i18n/skk-jisyo: fix live ebuild version (diff) | |
download | gentoo-2c1c1baa25ab44148aabe7810fad51acf62b4d99.tar.gz gentoo-2c1c1baa25ab44148aabe7810fad51acf62b4d99.tar.bz2 gentoo-2c1c1baa25ab44148aabe7810fad51acf62b4d99.zip |
app-i18n/skk-jisyo: update to EAPI 6
Package-Manager: portage-2.2.28
Diffstat (limited to 'app-i18n/skk-jisyo')
-rw-r--r-- | app-i18n/skk-jisyo/skk-jisyo-999999.ebuild | 83 |
1 files changed, 47 insertions, 36 deletions
diff --git a/app-i18n/skk-jisyo/skk-jisyo-999999.ebuild b/app-i18n/skk-jisyo/skk-jisyo-999999.ebuild index 5a09deebbaba..568e28cd1f7d 100644 --- a/app-i18n/skk-jisyo/skk-jisyo-999999.ebuild +++ b/app-i18n/skk-jisyo/skk-jisyo-999999.ebuild @@ -2,49 +2,64 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -ECVS_SERVER="openlab.jp:/circus/cvsroot" -ECVS_USER="guest" -ECVS_PASS="guest" -ECVS_MODULE="skk/dic" -inherit cvs +EAPI="6" +USE_RUBY="ruby20 ruby21" + +inherit cvs ruby-single + +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.bz2" -SRC_URI="" +ECVS_SERVER="openlab.jp:/circus/cvsroot" +ECVS_MODULE="skk/dic" +ECVS_USER="guest" +ECVS_PASS="guest" -LICENSE="GPL-2 public-domain freedist" +LICENSE="GPL-2 freedist public-domain" SLOT="0" KEYWORDS="" IUSE="cdb" -COMMON_DEPEND="cdb? ( dev-db/cdb )" -DEPEND="${COMMON_DEPEND} - sys-apps/gawk" -RDEPEND="${COMMON_DEPEND} - !app-i18n/skk-jisyo-extra - !app-i18n/skk-jisyo-cdb" - +DEPEND="${RUBY_DEPS} + app-i18n/skktools + sys-apps/gawk + cdb? ( + || ( + dev-db/tinycdb + dev-db/cdb + ) + )" +RDEPEND="" S="${WORKDIR}/${ECVS_MODULE}" -src_unpack() { - cvs_src_unpack +DOCS=( ChangeLog{,.{1..3}} READMEs/committers.txt edict_doc.txt zipcode/README.ja ) + +SKKTOOLS_DIR="${EPREFIX}/usr/share/skktools/convert2skk" + +src_prepare() { + rm -f ${MY_PN}.{wrong*,noregist,not_wrong,hukugougo,notes,requested,pubdic+} - cd "${S}" - rm SKK-JISYO.wrong.annotated SKK-JISYO.china_taiwan.header - rm SKK-JISYO.noregist SKK-JISYO.not_wrong SKK-JISYO.hukugougo - rm SKK-JISYO.notes SKK-JISYO.requested SKK-JISYO.pubdic+ + eapply_user } src_compile() { - # bug 184457 - unset LANG LC_ALL LC_CTYPE + local ctdic="${MY_PN}.china_taiwan" ruby + mv ${ctdic}{.header,} + for ruby in ${USE_RUBY}; do + if has_version dev-lang/ruby:${ruby:4:1}.${ruby:5}; then + ${ruby} ${SKKTOOLS_DIR}/ctdicconv.rb csv/${ctdic##*.}.csv | skkdic-expr2 >> ${ctdic} + break + fi + done - for f in SKK-JISYO.* zipcode/SKK-JISYO.* ; do - mv ${f} ${f}.annotated - gawk -f "${FILESDIR}"/unannotation.awk ${f}.annotated > $(basename ${f}) || die - if use cdb ; then - gawk ' + if use cdb; then + local cdbmake="cdbmake" f + if has_version dev-db/tinycdb; then + cdbmake="cdb -c" + fi + for f in {,zipcode/}${MY_PN}.*; do + LC_ALL=C gawk ' /^[^;]/ { s = substr($0, index($0, " ") + 1) print "+" length($1) "," length(s) ":" $1 "->" s @@ -52,16 +67,12 @@ src_compile() { END { print "" } - ' $(basename ${f}) | cdbmake $(basename ${f}).cdb "${T}"/$(basename ${f}) || die - fi - rm ${f}.annotated - done + ' ${f} | ${cdbmake} ${f}.cdb || die + done + fi } src_install() { - # install dictionaries insinto /usr/share/skk - doins SKK-JISYO.* || die - - dodoc ChangeLog* READMEs/committers.txt edict_doc.txt + doins {,zipcode/}${MY_PN}.* } |