app-i18n/canna: update pkg_postinst
authorAkinori Hattori <hattya@gentoo.org>
Sat, 8 Jul 2017 06:58:33 +0000 (15:58 +0900)
committerAkinori Hattori <hattya@gentoo.org>
Sat, 8 Jul 2017 06:58:33 +0000 (15:58 +0900)
Package-Manager: Portage-2.3.6, Repoman-2.3.1

app-i18n/canna/canna-3.7_p3-r1.ebuild
app-i18n/canna/canna-3.7_p3-r2.ebuild

index 51effafc6b7787501f9537508750f274ce0483f7..2d56ee7ccd628729db6a059e809aa52a9e8294ee 100644 (file)
@@ -112,8 +112,12 @@ src_install() {
 
 pkg_postinst() {
        update-cannadic-dir
-       elog
-       elog "Canna dictionary format has been changed."
-       elog "You should rebuild app-dict/canna-* after emerge."
-       elog
+
+       if ! locale -a | grep -iq "ja_JP.eucjp"; then
+               elog "Some dictionary tools in this package require ja_JP.EUC-JP locale."
+               elog
+               elog "# echo 'ja_JP.EUC-JP EUC-JP' >> /etc/locale.gen"
+               elog "# locale-gen"
+               elog
+       fi
 }
index 0f222e9dac216ba7685d521430f3918fc7ab3544..0a609c5c94ed5e25b3b380c5c12f4b26c2b349a6 100644 (file)
@@ -124,16 +124,9 @@ src_install() {
 
 pkg_postinst() {
        update-cannadic-dir
-       elog
-       elog "Canna dictionary format has been changed."
-       elog "You should rebuild app-dict/canna-* after emerge."
-       elog
-
-       local localearchive="${ROOT}usr/$(get_libdir)/locale/locale-archive"
-       if [ -f "${localearchive}" -a -x /usr/bin/localedef ] && \
-               ! /usr/bin/localedef --list-archive "${localearchive}" | grep -i 'ja_JP.eucjp' >/dev/null 2>&1 ; then
-               elog "Some dictionary tools in this package require ja_JP.eucJP locale."
-               elog "Please add ja_JP.eucJP locale to /etc/locale.gen:"
+
+       if ! locale -a | grep -iq "ja_JP.eucjp"; then
+               elog "Some dictionary tools in this package require ja_JP.EUC-JP locale."
                elog
                elog "# echo 'ja_JP.EUC-JP EUC-JP' >> /etc/locale.gen"
                elog "# locale-gen"