From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DA158158083 for ; Tue, 24 Sep 2024 00:36:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1FB68E2A57; Tue, 24 Sep 2024 00:36:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0249EE2A57 for ; Tue, 24 Sep 2024 00:36:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 12634343223 for ; Tue, 24 Sep 2024 00:36:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 725E41897 for ; Tue, 24 Sep 2024 00:36:43 +0000 (UTC) From: "Yixun Lan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Yixun Lan" Message-ID: <1727138185.7ca7f0f5f2e4a32ee7b81740b5c6734da468d3ee.dlan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/sdcv/, app-text/sdcv/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/sdcv/Manifest app-text/sdcv/files/sdcv-0.5.5-read-history.patch app-text/sdcv/sdcv-0.5.5.ebuild X-VCS-Directories: app-text/sdcv/ app-text/sdcv/files/ X-VCS-Committer: dlan X-VCS-Committer-Name: Yixun Lan X-VCS-Revision: 7ca7f0f5f2e4a32ee7b81740b5c6734da468d3ee X-VCS-Branch: master Date: Tue, 24 Sep 2024 00:36:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8a945554-df02-495e-931d-c432d1d12619 X-Archives-Hash: 4c4795e53493a97cad9df5a92d11c845 commit: 7ca7f0f5f2e4a32ee7b81740b5c6734da468d3ee Author: Yixun Lan gentoo org> AuthorDate: Tue Sep 24 00:34:42 2024 +0000 Commit: Yixun Lan gentoo org> CommitDate: Tue Sep 24 00:36:25 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ca7f0f5 app-text/sdcv: add 0.5.5 Signed-off-by: Yixun Lan gentoo.org> app-text/sdcv/Manifest | 1 + app-text/sdcv/files/sdcv-0.5.5-read-history.patch | 23 +++++++ app-text/sdcv/sdcv-0.5.5.ebuild | 74 +++++++++++++++++++++++ 3 files changed, 98 insertions(+) diff --git a/app-text/sdcv/Manifest b/app-text/sdcv/Manifest index 0425d328344b..7b40988ae61d 100644 --- a/app-text/sdcv/Manifest +++ b/app-text/sdcv/Manifest @@ -1 +1,2 @@ DIST sdcv-0.5.4.tar.gz 66706 BLAKE2B 9cb481f497483b502bec18765b9cbc31e8dd278e30ebd29005158a724669e171181a82c837b63016b9e88a84973831587d2b137bbbdb2290a89a73d3f0917f81 SHA512 6bae3a2c0f37ed9380f54715626efeea0df75d2525baa583c0915bba4d082d9ece40ee799a1e1bb5d36b7ccebace853653b6fab57d472a432b910f690235ee21 +DIST sdcv-0.5.5.tar.gz 67016 BLAKE2B 8a563b042e98af487dc4acfd9b158be72bebf3162ccdef48d3c4418fc548ce4ac9ba048e5fe44de2e6eb8b18d723be95c809a8de99d2dd40ff5a82362a608300 SHA512 6059e1ddc43a023f7cb0e2a8d99929bcb204c211863fce4dece2dc30b92e7d1ce91bc25d2ed4bc54b713f61671264ac7e906d2b9ce078fa943cc5d81cd5d37dd diff --git a/app-text/sdcv/files/sdcv-0.5.5-read-history.patch b/app-text/sdcv/files/sdcv-0.5.5-read-history.patch new file mode 100644 index 000000000000..fff601b29874 --- /dev/null +++ b/app-text/sdcv/files/sdcv-0.5.5-read-history.patch @@ -0,0 +1,23 @@ +Subject: [PATCH] fix: read_history() multiple times will add repeat histories to history lists + +backport from upstream +--- + src/libwrapper.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/libwrapper.cpp b/src/libwrapper.cpp +index 6be59c5..80077ac 100644 +--- a/src/libwrapper.cpp ++++ b/src/libwrapper.cpp +@@ -415,10 +415,9 @@ search_result Library::process_phrase(const char *loc_str, IReadLine &io, bool f + colorize_output_ ? ESC_END : ""); + } + int choise; +- std::unique_ptr choice_readline(create_readline_object()); + for (;;) { + std::string str_choise; +- choice_readline->read(_("Your choice[-1 to abort]: "), str_choise); ++ io.read(_("Your choice[-1 to abort]: "), str_choise); + sscanf(str_choise.c_str(), "%d", &choise); + if (choise >= 0 && choise < int(res_list.size())) { + sdcv_pager pager; diff --git a/app-text/sdcv/sdcv-0.5.5.ebuild b/app-text/sdcv/sdcv-0.5.5.ebuild new file mode 100644 index 000000000000..565d95a6c4f3 --- /dev/null +++ b/app-text/sdcv/sdcv-0.5.5.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PLOCALES="cs fr ru sk uk zh_CN zh_TW" +inherit cmake plocale + +DESCRIPTION="Console version of Stardict program" +HOMEPAGE="https://dushistov.github.io/sdcv/" +SRC_URI="https://github.com/Dushistov/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" +IUSE="darkterm nls readline test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-libs/glib-2.36 + sys-libs/zlib + readline? ( sys-libs/readline:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + nls? ( >=sys-devel/gettext-0.14.1 ) + test? ( app-misc/jq ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.5.3-t_list.patch" + "${FILESDIR}/${PN}-t_interactive.patch" + "${FILESDIR}/${P}-read-history.patch" +) + +src_prepare() { + if use darkterm; then + sed -i 's/;34m/;36m/' src/libwrapper.cpp || die + fi + + rm_loc() { + rm "po/${1}.po" || die + } + plocale_for_each_disabled_locale rm_loc + + # do not install locale-specific man pages unless asked to + if ! has uk ${LINGUAS-uk}; then + sed -ni '/share\/man\/uk/!p' CMakeLists.txt || die + fi + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_NLS="$(usex nls)" + -DWITH_READLINE="$(usex readline)" + -DBUILD_TESTS="$(usex test ON OFF)" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + use nls && cmake_src_compile lang +} + +src_install() { + # with USE=nls, but empty intersection of LINGUAS and list of + # supported translations, this directory is required, see bug 583386 + mkdir -p "${BUILD_DIR}/locale" + cmake_src_install + dodoc doc/DICTFILE_FORMAT +}