summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2024-04-28 15:11:39 +0900
committerAkinori Hattori <hattya@gentoo.org>2024-04-28 15:11:39 +0900
commit765a9f31ad672a703d1d5e04af7f18ea89faa0f5 (patch)
treee7d4b8e188daeeb1e42897a8362d2095a20cb88c /app-text/cmigemo
parentapp-text/cmigemo: rename patch (diff)
downloadgentoo-765a9f31ad672a703d1d5e04af7f18ea89faa0f5.tar.gz
gentoo-765a9f31ad672a703d1d5e04af7f18ea89faa0f5.tar.bz2
gentoo-765a9f31ad672a703d1d5e04af7f18ea89faa0f5.zip
app-text/cmigemo: new snapshot
Signed-off-by: Akinori Hattori <hattya@gentoo.org>
Diffstat (limited to 'app-text/cmigemo')
-rw-r--r--app-text/cmigemo/Manifest1
-rw-r--r--app-text/cmigemo/cmigemo-1.3e_p20220623.ebuild78
-rw-r--r--app-text/cmigemo/files/cmigemo-gentoo.patch74
-rw-r--r--app-text/cmigemo/metadata.xml3
4 files changed, 156 insertions, 0 deletions
diff --git a/app-text/cmigemo/Manifest b/app-text/cmigemo/Manifest
index e1db9f4d2646..7807f30ceabf 100644
--- a/app-text/cmigemo/Manifest
+++ b/app-text/cmigemo/Manifest
@@ -1 +1,2 @@
DIST cmigemo-1.3c-MIT.tar.bz2 54447 BLAKE2B 37e561b992317dbf421b3d09203e92000c0217347235545483b4f8b99071794c2b240636a880c1758c1828782468670eb640fbd411abe779b28c52dfc3147650 SHA512 8c5b9109f4309906ed19d5d48643918f51c339be7f3b34c90d2d814fed1b6d30e77a1539f6c1e11ceb3560f83fd9e1079254af0b41e81b274e39128de6ffeb18
+DIST cmigemo-1.3e_p20220623.tar.gz 70154 BLAKE2B 633719399afaa48e870d6995557be01460c624d992525b9192d87ccab6f90ab29e9b3b5b11f4274b204eaae0b144246cc713bcce18a51172d8e16ed5333b59fb SHA512 7e95f8a95380991eea33067a2c95b820d520a1a24919ee5be22ebcbccd53ee870ca54dbdcaa08b7d01c9b4abf7f24d09eb2c09a7f9768ed4fd08fc73667d2496
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-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/metadata.xml b/app-text/cmigemo/metadata.xml
index 05296999f1ce..0d0a18d865c0 100644
--- a/app-text/cmigemo/metadata.xml
+++ b/app-text/cmigemo/metadata.xml
@@ -5,6 +5,9 @@
<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>