public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/mozc/
Date: Fri,  9 Jun 2023 07:35:17 +0000 (UTC)	[thread overview]
Message-ID: <1686296101.7c6d22d36d75b98c922f4dd8b75b9b2977924574.sam@gentoo> (raw)

commit:     7c6d22d36d75b98c922f4dd8b75b9b2977924574
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  9 07:32:20 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun  9 07:35:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c6d22d3

app-i18n/mozc: use savedconfig

Closes: https://bugs.gentoo.org/877765
Closes: https://bugs.gentoo.org/843227
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-i18n/mozc/metadata.xml              |  1 -
 app-i18n/mozc/mozc-2.28.5029.102.ebuild | 37 ++++++++++++++++++---------------
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/app-i18n/mozc/metadata.xml b/app-i18n/mozc/metadata.xml
index 36b5449ea94d..7fd885c8d62f 100644
--- a/app-i18n/mozc/metadata.xml
+++ b/app-i18n/mozc/metadata.xml
@@ -13,7 +13,6 @@
 		<flag name="fcitx4">Enable support for <pkg>app-i18n/fcitx</pkg> 4</flag>
 		<flag name="gui">Install graphical user interface tool (mozc_tool)</flag>
 		<flag name="ibus">Enable support for <pkg>app-i18n/ibus</pkg></flag>
-		<flag name="mozcdic-ut">Enable support for Mozc UT Dictionaries. Must be placed at compile time at /tmp/mozcdic-ut.txt</flag>
 		<flag name="renderer">Enable native candidate window</flag>
 	</use>
 	<upstream>

diff --git a/app-i18n/mozc/mozc-2.28.5029.102.ebuild b/app-i18n/mozc/mozc-2.28.5029.102.ebuild
index 366320f57f8f..d12f141d9a99 100644
--- a/app-i18n/mozc/mozc-2.28.5029.102.ebuild
+++ b/app-i18n/mozc/mozc-2.28.5029.102.ebuild
@@ -5,7 +5,7 @@ EAPI="8"
 
 PYTHON_COMPAT=( python3_{10..11} )
 
-inherit edo elisp-common multiprocessing python-any-r1 toolchain-funcs desktop xdg
+inherit desktop edo elisp-common multiprocessing python-any-r1 savedconfig toolchain-funcs xdg
 
 if [[ "${PV}" == "9999" ]]; then
 	inherit git-r3
@@ -46,18 +46,21 @@ fi
 LICENSE="BSD BSD-2 ipadic public-domain unicode"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-IUSE="debug emacs fcitx4 +gui ibus renderer test mozcdic-ut"
+IUSE="debug emacs fcitx4 +gui ibus renderer test"
 REQUIRED_USE="|| ( emacs fcitx4 ibus )"
 RESTRICT="!test? ( test )"
 
-BDEPEND="$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+BDEPEND="
+	$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
 	>=dev-libs/protobuf-3.0.0
 	dev-util/gyp
 	dev-util/ninja
 	virtual/pkgconfig
 	emacs? ( app-editors/emacs:* )
-	fcitx4? ( sys-devel/gettext )"
-DEPEND="dev-cpp/abseil-cpp:=[cxx17(+)]
+	fcitx4? ( sys-devel/gettext )
+"
+DEPEND="
+	dev-cpp/abseil-cpp:=[cxx17(+)]
 	>=dev-libs/protobuf-3.0.0:=
 	fcitx4? (
 		app-i18n/fcitx:4
@@ -83,7 +86,8 @@ DEPEND="dev-cpp/abseil-cpp:=[cxx17(+)]
 		>=dev-cpp/gtest-1.8.0
 		dev-libs/jsoncpp
 	)"
-RDEPEND="dev-cpp/abseil-cpp:=[cxx17(+)]
+RDEPEND="
+	dev-cpp/abseil-cpp:=[cxx17(+)]
 	>=dev-libs/protobuf-3.0.0:=
 	emacs? ( app-editors/emacs:* )
 	fcitx4? (
@@ -105,7 +109,8 @@ RDEPEND="dev-cpp/abseil-cpp:=[cxx17(+)]
 		x11-libs/cairo
 		x11-libs/gtk+:2
 		x11-libs/pango
-	)"
+	)
+"
 
 S="${WORKDIR}/${P}/src"
 
@@ -116,7 +121,7 @@ PATCHES=(
 )
 
 python_check_deps() {
-	has_version -b "dev-python/six[${PYTHON_USEDEP}]"
+	python_has_version "dev-python/six[${PYTHON_USEDEP}]"
 }
 
 src_unpack() {
@@ -189,15 +194,11 @@ src_prepare() {
 		-e "/'-stdlib=libc++'/d" \
 		-i gyp/common.gypi || die
 
-	# Add mozcdic-ut
-	if use mozcdic-ut; then
-		if [ ! -f "${BROOT}"/tmp/mozcdic-ut.txt ]; then
-			ewarn "No mozcdic-ut.txt found. Please place your customized mozcdic-ut.txt in /tmp/.";
-			die
-		else
-			einfo "mozcdic-ut.txt found. Adding to mozc dictionary..."
-			cat "${BROOT}"/tmp/mozcdic-ut.txt >> "${WORKDIR}/${P}/src/data/dictionary_oss/dictionary00.txt" || die
-		fi
+	# bug #877765
+	restore_config mozcdic-ut.txt
+	if [[ -f /mozcdic-ut.txt && -s mozcdic-ut.txt ]]; then
+		einfo "mozcdic-ut.txt found. Adding to mozc dictionary..."
+		cat mozcdic-ut.txt >> "${WORKDIR}/${P}/src/data/dictionary_oss/dictionary00.txt" || die
 	fi
 }
 
@@ -287,6 +288,8 @@ src_install() {
 	exeinto /usr/libexec/mozc
 	doexe out_linux/${BUILD_TYPE}/mozc_server
 
+	[[ -s mozcdic-ut.txt ]] && save_config mozcdic-ut.txt
+
 	if use gui; then
 		doexe out_linux/${BUILD_TYPE}/mozc_tool
 	fi


             reply	other threads:[~2023-06-09  7:35 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09  7:35 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-02  6:00 [gentoo-commits] repo/gentoo:master commit in: app-i18n/mozc/ WANG Xuerui
2024-08-28  4:47 WANG Xuerui
2024-06-30 12:13 Sam James
2023-12-12 13:39 Andreas Sturmlechner
2023-12-07 16:25 Arthur Zamarin
2023-09-07 20:04 Sam James
2023-06-09  7:37 Sam James
2023-06-09  7:35 Sam James
2023-06-09  7:35 Sam James
2022-12-25 20:02 Andreas Sturmlechner
2022-07-02 14:07 Sam James
2022-05-01  7:30 Michał Górny
2022-03-09 23:36 Sam James
2022-03-09  8:59 Jakov Smolić
2022-01-29 15:20 Yixun Lan
2022-01-29 15:20 Yixun Lan
2021-12-10  0:29 Sam James
2021-05-25 11:10 Sam James
2021-05-25 11:10 Sam James
2021-04-27 22:02 Sam James
2021-04-05 19:06 Mike Gilbert
2020-10-20 20:35 Mike Gilbert
2020-07-04 13:53 Mike Gilbert
2019-08-16 17:03 Mike Gilbert
2019-08-09 18:39 Mike Gilbert
2019-04-19 16:39 Mike Gilbert
2018-05-22 18:24 Mike Gilbert
2018-04-16 18:29 Mike Gilbert
2018-03-15 19:23 Sergei Trofimovich
2018-03-08 19:33 Mike Gilbert
2018-02-12 19:16 Mike Gilbert
2018-01-08 21:31 Mike Gilbert
2017-12-10  9:27 Ulrich Müller
2017-10-05 18:57 Mike Gilbert
2017-10-05 18:57 Mike Gilbert
2017-10-02 17:36 Mike Gilbert
2017-09-28 17:18 Mike Gilbert
2017-04-20  7:59 David Seifert
2016-03-23 15:43 Mike Gilbert
2015-09-01 18:51 Tobias Klausmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1686296101.7c6d22d36d75b98c922f4dd8b75b9b2977924574.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox