summaryrefslogtreecommitdiff
path: root/app-text/cmigemo
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/cmigemo')
-rw-r--r--app-text/cmigemo/Manifest13
-rw-r--r--app-text/cmigemo/cmigemo-1.3c-r3.ebuild80
-rw-r--r--app-text/cmigemo/cmigemo-1.3c-r4.ebuild81
-rw-r--r--app-text/cmigemo/cmigemo-1.3e_p20220623.ebuild78
-rw-r--r--app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch51
-rw-r--r--app-text/cmigemo/files/cmigemo-1.3c-parallel-build.patch73
-rw-r--r--app-text/cmigemo/files/cmigemo-1.3c-parallel-install.patch113
-rw-r--r--app-text/cmigemo/files/cmigemo-gentoo.patch74
-rw-r--r--app-text/cmigemo/files/cmigemo-ldflags.patch (renamed from app-text/cmigemo/files/cmigemo-1.3c-ldflags.patch)4
-rw-r--r--app-text/cmigemo/metadata.xml6
10 files changed, 476 insertions, 97 deletions
diff --git a/app-text/cmigemo/Manifest b/app-text/cmigemo/Manifest
index 84a398b435a8..62f2815138fc 100644
--- a/app-text/cmigemo/Manifest
+++ b/app-text/cmigemo/Manifest
@@ -1,5 +1,10 @@
-AUX cmigemo-1.3c-gentoo.patch 1948 BLAKE2B 5c182d0c9c93b06104d1067272d35b023386a9ce7bfee1828489268cfff1bacbe64d83cde803df1a0f52804b3474900077a8144a1bd5900785c73b77ea0ca1d0 SHA512 90035c0fbf3b341113e4991f08c9962e27d37f6f215983379e92d7c616a67662b8754f390f9f19f7c84f1d5cc9a51a815999ec6c84e7c642758b3324f05b7837
-AUX cmigemo-1.3c-ldflags.patch 502 BLAKE2B 3fc4c85592cc9feffbaeee636e8fcada10c7b7cd8696495239436808ddf9462da09713bbba10c3e5eb66cb45a3ec02e53f1e708fc0c1281dd96cc3e66db8caea SHA512 932bfad5afc4c90531cac96a9a7fb06d1ed690b3391ad9425c5ae1baa7caf2d8046d208e25816ea4ecfbbe44b2a95216e551cbbeb7808548f534853e6b817f7b
+AUX cmigemo-1.3c-gentoo.patch 2385 BLAKE2B 210143d8528628df8086228fbf3ae8e2e45410d4207416103f3483090db1aca810d3931fb371c11642974fa356ebfa2e282c26dfbf735b3f5c7f44cfe4003e2c SHA512 55b113406f6b09328701db6939e2cb626ce96b4ac8c09daeedf5a0085f802f7121e9e96f8d4d6ceabeac0d2400aa78024b80063e0bc910bc534589a19e425f07
+AUX cmigemo-1.3c-parallel-build.patch 2840 BLAKE2B 18af41a23dda95f51ba933556e626e08dc5ed0ba4e2f78161fa861cf85114e8bf8cfafb31d78f1f0eddf36257ab69ef3444112b7339eaabacdd5ae93d1136922 SHA512 51aa98b72b84e12fb1247b9d741af8b32a9cdc35eb759d5ef28c42e241449eec31b4c497ed95769d47fe459e21bee856d05e650af494347ea01717cfdd6215fd
+AUX cmigemo-1.3c-parallel-install.patch 4205 BLAKE2B 6c97d088e0b53ae2e201c34939b75dbc87a9b079e422b37ca4e2efa4f22a791cf4b68c41a5ab8b3c8d5649ad353f5de224b93d93fa9fb5a3144f7cb34419b121 SHA512 227422c9364ca435d8461f7cff7955482f0c0bdad94071caee0adcbf5b6c86347f0d30e75fc8d13144e815e1dfc4ea971afed47b81470adae1619b6ed0de08ec
+AUX cmigemo-gentoo.patch 1898 BLAKE2B 2ea3a51c3154031e9e3fbede0b20550e727b329f271248d36ed6313418c1675356b769c317c62102bc1b817803b1c407d55935111a4ebe230fc2c36337723c99 SHA512 1412aa740d4e7f3ed171162683e9174eaa4a3e212c6ef8c3a81c6090f9edcb0a362ca8599fdde715914f075ac6905148c1058ac53735175a69e98fa352d474f3
+AUX cmigemo-ldflags.patch 384 BLAKE2B 6fca46e68128013296705f242e3d5edc4a143180084613b5b8dc27500fb01d5d2edc706943f966d0e9f9ef77198a24d50e49d147b9daa433b36bc808a8579a8d SHA512 f95abf99897a2f425f3f4f7d3641b9b3952e2648a690005393810a8a59c6e9a67af8656f0138f69d51bca4eb7b582e616668effaea2a0195504d328f5c8259ca
DIST cmigemo-1.3c-MIT.tar.bz2 54447 BLAKE2B 37e561b992317dbf421b3d09203e92000c0217347235545483b4f8b99071794c2b240636a880c1758c1828782468670eb640fbd411abe779b28c52dfc3147650 SHA512 8c5b9109f4309906ed19d5d48643918f51c339be7f3b34c90d2d814fed1b6d30e77a1539f6c1e11ceb3560f83fd9e1079254af0b41e81b274e39128de6ffeb18
-EBUILD cmigemo-1.3c-r3.ebuild 1570 BLAKE2B da03e4bd9fab6e8bff0f76be7303c4b49d7596e13e203255c9ecba64fdbd137b0dfcbfb27569ef885f713df779c678cbcaf938f4e539b06f7a544a75f0e3c134 SHA512 4b5d8cb80cd7aec240ae3ddf7293be3ee72ec4d5047e1d3f9887d820d0daf5b53a016bf4a162f2afa6079bbf2fe51aef181db653b5efef3068b3d619273659b2
-MISC metadata.xml 235 BLAKE2B a3e5a3109b59e3f97ef14f8d55ba13b16dc5371a1b7d6f238230aa4494db32dd4a42e3ee012ec8b18fae394feb2b1b56882bc70504aa7c6b969c1b20140f0ece SHA512 7c4e5f5dea465e45c662f5f53513626088aff514e1326593426af227d77e63d8a00d8af05aa208881a399f83dd41e73cd2ef81c8b7f275a2fa891f295231d67c
+DIST cmigemo-1.3e_p20220623.tar.gz 70154 BLAKE2B 633719399afaa48e870d6995557be01460c624d992525b9192d87ccab6f90ab29e9b3b5b11f4274b204eaae0b144246cc713bcce18a51172d8e16ed5333b59fb SHA512 7e95f8a95380991eea33067a2c95b820d520a1a24919ee5be22ebcbccd53ee870ca54dbdcaa08b7d01c9b4abf7f24d09eb2c09a7f9768ed4fd08fc73667d2496
+EBUILD cmigemo-1.3c-r4.ebuild 1595 BLAKE2B 3b2f166d708b4968ff92c200fda4c6f49e9b3318b5935055a8b14343b459873c2bd212d2e741aeb1de7cc2618812681ce39a539a373a5ab4f7a98e9565f5ec3a SHA512 747828ee09dbd0d6aca591dd29504e1c2bda3d0f185c1e68848f0cceebfc4468d63433109bd5b53a7a20b86d188556d0fdcb20954f126d9163ac8f3e53cbb12d
+EBUILD cmigemo-1.3e_p20220623.ebuild 1588 BLAKE2B 36147e0e1af3cf20eb1c8485e64c1c64d41b4c1af98f2f6204c364ce3287060e2b5d7600d08f09ed942e27bc7143f4504617ec6eb7786c817242b999a1f474f5 SHA512 abad6bc95424bec32ec98103330b2c97b2f9ecfc93227550bde17a66e27949d29264f81df30022e926d1752e97745dbac24205eba5fe0a6c39054e87aa18c34d
+MISC metadata.xml 386 BLAKE2B 9cff7f0297e29d3dd31da57a735f89d12f6c54419d185880397f88b23e071de5bfe9a7c0f027a197c89eda8e1f1cafd23579a0369d9b1dc6291c0c69415382ee SHA512 eee252eb3bed7cc2cadbf839fb51aac68f16ae56c1230c88adddd19e015d2edcf30ff1f7fe3c4515fba929546c3e3199fec6066c64818e91cd8d2f4bae3667bf
diff --git a/app-text/cmigemo/cmigemo-1.3c-r3.ebuild b/app-text/cmigemo/cmigemo-1.3c-r3.ebuild
deleted file mode 100644
index 13e4e867cedb..000000000000
--- a/app-text/cmigemo/cmigemo-1.3c-r3.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit flag-o-matic toolchain-funcs
-
-MY_P="${P}-MIT"
-DESCRIPTION="Migemo library implementation in C"
-HOMEPAGE="http://www.kaoriya.net/#CMIGEMO"
-SRC_URI="http://www.kaoriya.net/dist/var/${MY_P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 ppc x86"
-IUSE="unicode vim-syntax"
-
-DEPEND=">=app-dicts/migemo-dict-200812[unicode=]
- dev-lang/perl
- || (
- net-misc/curl
- net-misc/wget
- www-client/fetch
- )
- app-i18n/nkf"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- # Bug #246953
- "${FILESDIR}"/${P}-gentoo.patch
- "${FILESDIR}"/${P}-ldflags.patch
-)
-
-src_prepare() {
- default
-
- touch dict/SKK-JISYO.L || die
- if use unicode ; then
- sed -i -e "/gcc:/s/euc-jp/utf-8/" dict/dict.mak || die
- fi
-
- # Bug #255813
- sed -i -e "/^docdir/s:/doc/migemo:/share/doc/${PF}:" compile/config.mk.in || die
-}
-
-src_compile() {
- append-flags -fPIC
- # parallel make b0rked
- emake -j1 \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- gcc-all
-}
-
-src_install() {
- # parallel make b0rked
- emake -j1 \
- prefix="${D}/usr" \
- libdir="${D}/usr/$(get_libdir)" \
- gcc-install
-
- local encoding
- if use unicode ; then
- encoding="utf-8"
- else
- encoding="euc-jp"
- fi
-
- mv "${D}/usr/share/migemo/${encoding}/"*.dat "${D}/usr/share/migemo/" || die
- rm -rf "${D}/usr/share/migemo/"{cp932,euc-jp,utf-8} || die
-
- if use vim-syntax ; then
- insinto /usr/share/vim/vimfiles/plugin
- doins tools/migemo.vim
- fi
-
- dodoc doc/{README_j,TODO_j,vimigemo}.txt
-}
diff --git a/app-text/cmigemo/cmigemo-1.3c-r4.ebuild b/app-text/cmigemo/cmigemo-1.3c-r4.ebuild
new file mode 100644
index 000000000000..f39e35d60f0f
--- /dev/null
+++ b/app-text/cmigemo/cmigemo-1.3c-r4.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit flag-o-matic toolchain-funcs
+
+MY_P="${P}-MIT"
+
+DESCRIPTION="Migemo library implementation in C"
+HOMEPAGE="https://www.kaoriya.net/software/cmigemo/"
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc x86"
+IUSE="unicode vim"
+
+RDEPEND=">=app-dicts/migemo-dict-200812[unicode=]"
+DEPEND="${RDEPEND}"
+BDEPEND="app-i18n/nkf
+ dev-lang/perl
+ || (
+ net-misc/curl
+ net-misc/wget
+ www-client/fetch
+ )"
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-ldflags.patch
+ # bug #246953
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-parallel-build.patch
+ "${FILESDIR}"/${P}-parallel-install.patch
+)
+DOCS=( doc/{README_j,TODO_j,vimigemo}.txt )
+
+src_prepare() {
+ default
+
+ touch dict/SKK-JISYO.L || die
+ if use unicode; then
+ sed -i "/gcc:/s/euc-jp/utf-8/" dict/dict.mak || die
+ fi
+
+ # bug #255813
+ sed -i "/^docdir/s:/doc/migemo:/share/doc/${PF}:" compile/config.mk.in || die
+}
+
+src_compile() {
+ append-flags -fPIC
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ gcc-all
+}
+
+src_install() {
+ emake \
+ prefix="${ED}/usr" \
+ libdir="${ED}/usr/$(get_libdir)" \
+ gcc-install
+ einstalldocs
+
+ local encoding
+ if use unicode; then
+ encoding="utf-8"
+ else
+ encoding="euc-jp"
+ fi
+
+ mv "${ED}"/usr/share/migemo/${encoding}/*.dat "${ED}"/usr/share/migemo || die
+ rm -rf "${ED}"/usr/share/migemo/{cp932,euc-jp,utf-8}
+
+ if use vim; then
+ insinto /usr/share/vim/vimfiles/plugin
+ doins tools/migemo.vim
+ fi
+}
diff --git a/app-text/cmigemo/cmigemo-1.3e_p20220623.ebuild b/app-text/cmigemo/cmigemo-1.3e_p20220623.ebuild
new file mode 100644
index 000000000000..84f5050840cc
--- /dev/null
+++ b/app-text/cmigemo/cmigemo-1.3e_p20220623.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit flag-o-matic toolchain-funcs vcs-snapshot
+
+EGIT_COMMIT="e0f6145f61e0b7058c3006f344e58571d9fdd83a"
+
+DESCRIPTION="Migemo library implementation in C"
+HOMEPAGE="https://www.kaoriya.net/software/cmigemo/"
+SRC_URI="https://github.com/koron/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE="unicode vim"
+
+RDEPEND=">=app-dicts/migemo-dict-200812[unicode=]"
+DEPEND="${RDEPEND}"
+BDEPEND="app-i18n/nkf
+ dev-lang/perl
+ || (
+ net-misc/curl
+ net-misc/wget
+ www-client/fetch
+ )"
+
+PATCHES=(
+ # bug #246953
+ "${FILESDIR}"/${PN}-gentoo.patch
+ "${FILESDIR}"/${PN}-ldflags.patch
+)
+DOCS=( doc/{README_j,TODO_j,vimigemo}.txt )
+
+src_prepare() {
+ default
+
+ touch dict/SKK-JISYO.L || die
+ if use unicode; then
+ sed -i "/gcc:/s/euc-jp/utf-8/" dict/dict.mak || die
+ fi
+
+ # bug #255813
+ sed -i "/^docdir/s:/doc/migemo:/share/doc/${PF}:" compile/config.mk.in || die
+}
+
+src_compile() {
+ append-flags -fPIC
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ gcc-all
+}
+
+src_install() {
+ emake \
+ prefix="${ED}/usr" \
+ libdir="${ED}/usr/$(get_libdir)" \
+ gcc-install
+ einstalldocs
+
+ local encoding
+ if use unicode; then
+ encoding="utf-8"
+ else
+ encoding="euc-jp"
+ fi
+
+ mv "${ED}"/usr/share/migemo/${encoding}/*.dat "${ED}"/usr/share/migemo || die
+ rm -rf "${ED}"/usr/share/migemo/{cp932,euc-jp,utf-8}
+
+ if use vim; then
+ insinto /usr/share/vim/vimfiles/plugin
+ doins tools/migemo.vim
+ fi
+}
diff --git a/app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch b/app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch
index 2f903bb9bb62..daf9c18e9157 100644
--- a/app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch
+++ b/app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch
@@ -1,6 +1,5 @@
-diff -Naur cmigemo-1.3c-MIT.orig/compile/Make_gcc.mak cmigemo-1.3c-MIT/compile/Make_gcc.mak
---- cmigemo-1.3c-MIT.orig/compile/Make_gcc.mak 2003-10-19 16:00:59.000000000 +0900
-+++ cmigemo-1.3c-MIT/compile/Make_gcc.mak 2009-11-08 16:45:32.485952233 +0900
+--- a/compile/Make_gcc.mak
++++ b/compile/Make_gcc.mak
@@ -14,7 +14,7 @@
libmigemo = libmigemo.so
EXEEXT =
@@ -10,9 +9,18 @@ diff -Naur cmigemo-1.3c-MIT.orig/compile/Make_gcc.mak cmigemo-1.3c-MIT/compile/M
include config.mk
include compile/unix.mak
-diff -Naur cmigemo-1.3c-MIT.orig/configure cmigemo-1.3c-MIT/configure
---- cmigemo-1.3c-MIT.orig/configure 2004-06-19 12:50:27.000000000 +0900
-+++ cmigemo-1.3c-MIT/configure 2009-11-08 16:40:42.688962262 +0900
+--- a/compile/unix.mak
++++ b/compile/unix.mak
+@@ -22,6 +22,7 @@
+ $(MKDIR) $$i; \
+ fi \
+ done
++ touch $@
+
+ $(outdir)cmigemo$(EXEEXT): $(objdir)main.$(O) $(libmigemo_LIB)
+ $(CC) -o $@ $(objdir)main.$(O) -L. -L$(outdir) -lmigemo $(LDFLAGS)
+--- a/configure
++++ b/configure
@@ -31,12 +31,12 @@
fi
@@ -30,9 +38,8 @@ diff -Naur cmigemo-1.3c-MIT.orig/configure cmigemo-1.3c-MIT/configure
exit 1
fi
-diff -Naur cmigemo-1.3c-MIT.orig/tools/migemo.vim cmigemo-1.3c-MIT/tools/migemo.vim
---- cmigemo-1.3c-MIT.orig/tools/migemo.vim 2004-02-23 16:32:53.000000000 +0900
-+++ cmigemo-1.3c-MIT/tools/migemo.vim 2009-11-08 16:42:19.572951008 +0900
+--- a/tools/migemo.vim
++++ b/tools/migemo.vim
@@ -20,7 +20,7 @@
let dict = globpath(path, "migemo-dict")
endif
@@ -47,9 +54,33 @@ diff -Naur cmigemo-1.3c-MIT.orig/tools/migemo.vim cmigemo-1.3c-MIT/tools/migemo.
else
" non-builtin version
- let g:migemodict = s:SearchDict()
-+ if !exists('g:migemodict')
++ if !get(g:, 'migemodict')
+ let g:migemodict = s:SearchDict()
+ endif
command! -nargs=* Migemo :call <SID>MigemoSearch(<q-args>)
nnoremap <silent> <leader>mi :call <SID>MigemoSearch('')<cr>
+@@ -53,11 +55,6 @@
+ if retval == ''
+ return
+ endif
+- if has('iconv') && $HOMEDRIVE != ''
+- let retval = iconv(retval, 'cp932', 'euc-jp')
+- elseif &encoding != 'euc-jp'
+- let retval = iconv(retval, &encoding, 'euc-jp')
+- endif
+ "let retval = system('cmigemo -v -w "'.retval.'" -d "'.g:migemodict.'"')
+ let retval = system('cmigemo -v -w '.retval.' -d "'.g:migemodict.'"')
+ if retval == ''
+@@ -88,11 +85,6 @@
+ echohl None
+ return
+ endif
+- if has('iconv') && $HOMEDRIVE != ''
+- let retval = iconv(retval, 'euc-jp', 'cp932')
+- elseif &encoding != 'euc-jp'
+- let retval = iconv(retval, 'euc-jp', &encoding)
+- endif
+
+ let @/ = retval
+ let v:errmsg = ''
diff --git a/app-text/cmigemo/files/cmigemo-1.3c-parallel-build.patch b/app-text/cmigemo/files/cmigemo-1.3c-parallel-build.patch
new file mode 100644
index 000000000000..b311754e1538
--- /dev/null
+++ b/app-text/cmigemo/files/cmigemo-1.3c-parallel-build.patch
@@ -0,0 +1,73 @@
+https://github.com/koron/cmigemo/pull/28
+
+From fd4bad807a9a52130d58269a4b1507a8720c5ae6 Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Fri, 12 Nov 2021 15:16:54 +0000
+Subject: [PATCH] Add directory dependencies to fix parallel builds
+
+When building in parallel (make -j) sometimes make would try to create
+a dictionary file before the directory containing it had been
+created. To fix this, I've made the directory a dependency of each
+file in it, rather than having them be sibling dependencies of the
+-files targets.
+---
+ dict/dict.mak | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/dict/dict.mak b/dict/dict.mak
+index 8ea8a66..44bd543 100644
+--- a/dict/dict.mak
++++ b/dict/dict.mak
+@@ -33,40 +33,40 @@ cp932: $(DICT)
+ # Dictionary in euc-jp
+ #
+ euc-jp: cp932 euc-jp-files
+-euc-jp-files: $(EUCJP_DIR) $(EUCJP_DIR)/migemo-dict \
++euc-jp-files: $(EUCJP_DIR)/migemo-dict \
+ $(EUCJP_DIR)/zen2han.dat $(EUCJP_DIR)/han2zen.dat \
+ $(EUCJP_DIR)/hira2kata.dat $(EUCJP_DIR)/roma2hira.dat
+ $(EUCJP_DIR):
+ $(MKDIR) $(EUCJP_DIR)
+-$(EUCJP_DIR)/migemo-dict: migemo-dict
++$(EUCJP_DIR)/migemo-dict: $(EUCJP_DIR) migemo-dict
+ $(FILTER_EUCJP) < migemo-dict > $@
+-$(EUCJP_DIR)/zen2han.dat: zen2han.dat
++$(EUCJP_DIR)/zen2han.dat: $(EUCJP_DIR) zen2han.dat
+ $(FILTER_EUCJP) < zen2han.dat > $@
+-$(EUCJP_DIR)/han2zen.dat: han2zen.dat
++$(EUCJP_DIR)/han2zen.dat: $(EUCJP_DIR) han2zen.dat
+ $(FILTER_EUCJP) < han2zen.dat > $@
+-$(EUCJP_DIR)/hira2kata.dat: hira2kata.dat
++$(EUCJP_DIR)/hira2kata.dat: $(EUCJP_DIR) hira2kata.dat
+ $(FILTER_EUCJP) < hira2kata.dat > $@
+-$(EUCJP_DIR)/roma2hira.dat: roma2hira.dat
++$(EUCJP_DIR)/roma2hira.dat: $(EUCJP_DIR) roma2hira.dat
+ $(FILTER_EUCJP) < roma2hira.dat > $@
+
+ ##############################################################################
+ # Dictionary in utf-8
+ #
+ utf-8: cp932 utf-8-files
+-utf-8-files: $(UTF8_DIR) $(UTF8_DIR)/migemo-dict \
++utf-8-files: $(UTF8_DIR)/migemo-dict \
+ $(UTF8_DIR)/zen2han.dat $(UTF8_DIR)/han2zen.dat \
+ $(UTF8_DIR)/hira2kata.dat $(UTF8_DIR)/roma2hira.dat
+ $(UTF8_DIR):
+ $(MKDIR) $(UTF8_DIR)
+-$(UTF8_DIR)/migemo-dict: migemo-dict
++$(UTF8_DIR)/migemo-dict: $(UTF8_DIR) migemo-dict
+ $(FILTER_UTF8) < migemo-dict > $@
+-$(UTF8_DIR)/zen2han.dat: zen2han.dat
++$(UTF8_DIR)/zen2han.dat: $(UTF8_DIR) zen2han.dat
+ $(FILTER_UTF8) < zen2han.dat > $@
+-$(UTF8_DIR)/han2zen.dat: han2zen.dat
++$(UTF8_DIR)/han2zen.dat: $(UTF8_DIR) han2zen.dat
+ $(FILTER_UTF8) < han2zen.dat > $@
+-$(UTF8_DIR)/hira2kata.dat: hira2kata.dat
++$(UTF8_DIR)/hira2kata.dat: $(UTF8_DIR) hira2kata.dat
+ $(FILTER_UTF8) < hira2kata.dat > $@
+-$(UTF8_DIR)/roma2hira.dat: roma2hira.dat
++$(UTF8_DIR)/roma2hira.dat: $(UTF8_DIR) roma2hira.dat
+ $(FILTER_UTF8) < roma2hira.dat > $@
+
+ ##############################################################################
diff --git a/app-text/cmigemo/files/cmigemo-1.3c-parallel-install.patch b/app-text/cmigemo/files/cmigemo-1.3c-parallel-install.patch
new file mode 100644
index 000000000000..9ac30d65a3c0
--- /dev/null
+++ b/app-text/cmigemo/files/cmigemo-1.3c-parallel-install.patch
@@ -0,0 +1,113 @@
+https://github.com/koron/cmigemo/pull/29
+
+From 4c7476b614208836c3f4036fca87c8c718043c8b Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Wed, 22 Jun 2022 22:07:18 +0100
+Subject: [PATCH 1/3] compile/unix.mak: add .o file dependency on $(objdir)
+ directory
+
+Without this change parallel build fails occasionally when object
+files are built before directory is being created:
+
+ make[1]: Entering directory '/build/cmigemo'
+ gcc -O2 -Wall -fPIC -o build/object/charset.o -c src/charset.c
+ Assembler messages:
+ Fatal error: can't create build/object/charset.o: No such file or directory
+ make[1]: *** [compile/unix.mak:33: build/object/charset.o] Error 1 shuffle=1655929862
+---
+ compile/unix.mak | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/compile/unix.mak b/compile/unix.mak
+index 8ef6413..8cf525a 100644
+--- a/compile/unix.mak
++++ b/compile/unix.mak
+@@ -14,7 +14,7 @@ CFLAGS = -O2 -Wall $(DEFINES) $(CFLAGS_MIGEMO)
+ LDFLAGS = $(LDFLAGS_MIGEMO)
+ LIBS =
+
+-default: dirs $(outdir)cmigemo$(EXEEXT)
++default: $(outdir)cmigemo$(EXEEXT)
+
+ dirs:
+ @for i in $(objdir) $(outdir); do \
+@@ -26,10 +26,10 @@ dirs:
+ $(outdir)cmigemo$(EXEEXT): $(objdir)main.$(O) $(libmigemo_LIB)
+ $(CC) -o $@ $(objdir)main.$(O) -L. -L$(outdir) -lmigemo $(LDFLAGS)
+
+-$(objdir)main.o: $(srcdir)main.c
++$(objdir)main.o: $(srcdir)main.c dirs
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+-$(objdir)%.o: $(srcdir)%.c
++$(objdir)%.o: $(srcdir)%.c dirs
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+ ##############################################################################
+
+From 88a1ed71a637faa6ec4eeb7e2b2f0a9f597a4812 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Wed, 22 Jun 2022 22:10:42 +0100
+Subject: [PATCH 2/3] compile/unix.mak: add install dependency on $(dictdir)
+ directory
+
+Without this change parallel install fails occasionally when
+$(dictdir) is not yet present:
+
+ gcc -o build/cmigemo ./build/object/main.o -L. -L./build/ -lmigemo -Wl,-rpath,.,-rpath,/usr/local/lib,-rpath,/usr/lib
+ install -m 644 dict/migemo-dict ...-cmigemo-1.3e/share/migemo/cp932
+ install: cannot create regular file '...-cmigemo-1.3e/share/migemo/cp932': No such file or directory
+ make[1]: *** [compile/unix.mak:49: install-dict] Error 1 shuffle=1655931959
+---
+ compile/unix.mak | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compile/unix.mak b/compile/unix.mak
+index 8cf525a..cb6bd8f 100644
+--- a/compile/unix.mak
++++ b/compile/unix.mak
+@@ -45,7 +45,7 @@ install-mkdir:
+ $(MKDIR) $(dictdir)/euc-jp
+ $(MKDIR) $(dictdir)/utf-8
+
+-install-dict:
++install-dict: install-mkdir
+ $(INSTALL_DATA) dict/migemo-dict $(dictdir)/cp932
+ $(INSTALL_DATA) dict/han2zen.dat $(dictdir)/cp932
+ $(INSTALL_DATA) dict/hira2kata.dat $(dictdir)/cp932
+
+From 3b39db8a748081e60bcceb7a8ae93616a5939f41 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Wed, 22 Jun 2022 22:16:12 +0100
+Subject: [PATCH 3/3] compile/unix.mak: add install-lib dependency on $(libdir)
+ directory
+
+Without this change parallel install fails occasionally when
+$(libdir) is not yet present:
+
+ rm -f libmigemo.so.1 libmigemo.so
+ ln -s libmigemo.so.1.1.0 libmigemo.so.1
+ ln -s libmigemo.so.1.1.0 libmigemo.so
+ install -m 755 libmigemo.so.1.1.0 ...-cmigemo-1.3e/lib
+ rm -f ...-cmigemo-1.3e/lib/libmigemo.so.1 ...-cmigemo-1.3e/lib/libmigemo.so
+ ln -s libmigemo.so.1.1.0 ...-cmigemo-1.3e/lib/libmigemo.so.1
+ ln: failed to create symbolic link '...-cmigemo-1.3e/lib/libmigemo.so.1': Not a directory
+ make[1]: *** [compile/Make_gcc.mak:38: install-lib] Error 1 shuffle=1655932664
+---
+ compile/unix.mak | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/compile/unix.mak b/compile/unix.mak
+index cb6bd8f..6651fcd 100644
+--- a/compile/unix.mak
++++ b/compile/unix.mak
+@@ -66,6 +66,9 @@ install-dict: install-mkdir
+ $(INSTALL_DATA) dict/utf-8.d/zen2han.dat $(dictdir)/utf-8; \
+ fi
+
++# depends on $(libdir) to be already present
++install-lib: install-mkdir
++
+ install: $(outdir)cmigemo$(EXEEXT) $(libmigemo_DSO) install-mkdir install-dict install-lib
+ $(INSTALL_DATA) $(srcdir)migemo.h $(incdir)
+ $(INSTALL_DATA) doc/README_j.txt $(docdir)
diff --git a/app-text/cmigemo/files/cmigemo-gentoo.patch b/app-text/cmigemo/files/cmigemo-gentoo.patch
new file mode 100644
index 000000000000..37215d224ed8
--- /dev/null
+++ b/app-text/cmigemo/files/cmigemo-gentoo.patch
@@ -0,0 +1,74 @@
+--- a/compile/Make_gcc.mak
++++ b/compile/Make_gcc.mak
+@@ -14,7 +14,7 @@
+ libmigemo = libmigemo.so
+ EXEEXT =
+ CFLAGS_MIGEMO = -fPIC
+-LDFLAGS_MIGEMO = -Wl,-rpath,.,-rpath,/usr/local/lib,-rpath,/usr/lib
++LDFLAGS_MIGEMO =
+
+ include config.mk
+ include compile/unix.mak
+--- a/compile/unix.mak
++++ b/compile/unix.mak
+@@ -22,6 +22,7 @@
+ $(MKDIR) $$i; \
+ fi \
+ done
++ touch $@
+
+ $(outdir)cmigemo$(EXEEXT): $(objdir)main.$(O) $(libmigemo_LIB)
+ $(CC) -o $@ $(objdir)main.$(O) -L. -L$(outdir) -lmigemo $(LDFLAGS)
+--- a/configure
++++ b/configure
+@@ -31,12 +31,12 @@
+ fi
+
+ # Check encoding filter
+-if CHECK_COMMAND qkc ; then
+- PROGRAM_ENCODEFILTER="qkc -q -u"
+-elif CHECK_COMMAND nkf ; then
++if CHECK_COMMAND nkf ; then
+ PROGRAM_ENCODEFILTER="nkf -x"
++elif CHECK_COMMAND qkc ; then
++ PROGRAM_ENCODEFILTER="qkc -q -u"
+ else
+- echo "ERROR: Require qkc or nkf installed for encode filter."
++ echo "ERROR: Require nkf or qkc installed for encode filter."
+ exit 1
+ fi
+
+--- a/tools/migemo.vim
++++ b/tools/migemo.vim
+@@ -24,10 +24,7 @@
+ endif
+ if dict == ''
+ for path in [
+- \ '/usr/local/share/migemo/',
+- \ '/usr/local/share/cmigemo/',
+ \ '/usr/local/share/',
+- \ '/usr/share/cmigemo/',
+ \ '/usr/share/',
+ \ ]
+ let path = path . a:name
+@@ -50,6 +47,9 @@
+ let dict = s:SearchDict2(&encoding.'/migemo-dict')
+ endif
+ if dict == ''
++ let dict = s:SearchDict2('migemo/migemo-dict')
++ endif
++ if dict == ''
+ let dict = s:SearchDict2('migemo-dict')
+ endif
+ return dict
+@@ -70,7 +70,9 @@
+ nnoremap <Leader>f :call <SID>SearchChar(0)<CR>
+ else
+ " non-builtin version
+- let g:migemodict = s:SearchDict()
++ if !get(g:, 'migemodict')
++ let g:migemodict = s:SearchDict()
++ endif
+ command! -nargs=* Migemo :call <SID>MigemoSearch(<q-args>)
+ nnoremap <silent> <leader>mi :call <SID>MigemoSearch('')<cr>
+
diff --git a/app-text/cmigemo/files/cmigemo-1.3c-ldflags.patch b/app-text/cmigemo/files/cmigemo-ldflags.patch
index 2f4f8c922431..ca1db125c5a2 100644
--- a/app-text/cmigemo/files/cmigemo-1.3c-ldflags.patch
+++ b/app-text/cmigemo/files/cmigemo-ldflags.patch
@@ -1,8 +1,6 @@
-diff --git a/compile/Make_gcc.mak b/compile/Make_gcc.mak
-index f042ac6..f91fe92 100644
--- a/compile/Make_gcc.mak
+++ b/compile/Make_gcc.mak
-@@ -28,7 +28,7 @@ include compile/clean_unix.mak
+@@ -28,7 +28,7 @@
#
$(libmigemo_LIB): $(libmigemo_DSO)
$(libmigemo_DSO): $(libmigemo_OBJ)
diff --git a/app-text/cmigemo/metadata.xml b/app-text/cmigemo/metadata.xml
index a94766977fa6..0d0a18d865c0 100644
--- a/app-text/cmigemo/metadata.xml
+++ b/app-text/cmigemo/metadata.xml
@@ -5,4 +5,10 @@
<email>cjk@gentoo.org</email>
<name>Cjk</name>
</maintainer>
+ <upstream>
+ <remote-id type="github">koron/cmigemo</remote-id>
+ </upstream>
+ <use>
+ <flag name="vim">Install Vim plugin for C/Migemo</flag>
+ </use>
</pkgmetadata>