diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-09-25 01:25:44 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-09-25 01:25:44 +0100 |
commit | c25088d4fc442a7d6dc3a8d0498b43024888318d (patch) | |
tree | fdb19b6a9b3a20669ecb49f0ba8d9f435fbb4b1a /app-text/sdcv | |
parent | d80b870c42fbe218389ffaf86f0f2a39404deca1 (diff) |
gentoo auto-resync : 25:09:2024 - 01:25:44
Diffstat (limited to 'app-text/sdcv')
-rw-r--r-- | app-text/sdcv/Manifest | 3 | ||||
-rw-r--r-- | app-text/sdcv/files/sdcv-0.5.5-read-history.patch | 23 | ||||
-rw-r--r-- | app-text/sdcv/sdcv-0.5.5.ebuild | 74 |
3 files changed, 100 insertions, 0 deletions
diff --git a/app-text/sdcv/Manifest b/app-text/sdcv/Manifest index 23396344f561..3d88efc0af83 100644 --- a/app-text/sdcv/Manifest +++ b/app-text/sdcv/Manifest @@ -1,5 +1,8 @@ AUX sdcv-0.5.3-t_list.patch 592 BLAKE2B 7f1618750a8d9c452f8db257a2b4791b803f45f10334789dd6f6d13f46335d9daf4a1a070ad03a38d40e6937d5e70371502ba26361c4d62486031888645843c3 SHA512 1aad632517f04423fd0a985256d760a06e5e38c3c9335f814f6997559ed3e3fb33fe1dba25e49b8298eda6570526323c2fdef18be83ab3363caa074cd59db107 +AUX sdcv-0.5.5-read-history.patch 1005 BLAKE2B 244765028d0f3959e9cdd306d8120caaf93b4ddda9a0f08829345f9071fc4bfb15da4b0e0070596814e4636bf8409afb000ecd9d24bcdc7548cedfb74aeb23c5 SHA512 9624612f39fe5810dc3fd74f3c03d6abe1b156bd1ce25cd1772fb5633b29d3ea12411ac3141812ceb0a5c8754dae52ae10f95805eef24a46872720b010854e08 AUX sdcv-t_interactive.patch 324 BLAKE2B ecdb0d89c4a26050927272f244e43b28e945e3ef5cb93167eaea7c09912e504af2061ec34c2b5f5a32665c784093e2d35ed92e10a00824b619da71e53049e5dc SHA512 9067330c6fa95910b5dd67716c9bc378d29a9ccc5d60c1eb0c1aca12e58478ea381b91c5122c1951bd2f4c9e8b629243ea885bdbbc87a2f88174340919f5cf8d DIST sdcv-0.5.4.tar.gz 66706 BLAKE2B 9cb481f497483b502bec18765b9cbc31e8dd278e30ebd29005158a724669e171181a82c837b63016b9e88a84973831587d2b137bbbdb2290a89a73d3f0917f81 SHA512 6bae3a2c0f37ed9380f54715626efeea0df75d2525baa583c0915bba4d082d9ece40ee799a1e1bb5d36b7ccebace853653b6fab57d472a432b910f690235ee21 +DIST sdcv-0.5.5.tar.gz 67016 BLAKE2B 8a563b042e98af487dc4acfd9b158be72bebf3162ccdef48d3c4418fc548ce4ac9ba048e5fe44de2e6eb8b18d723be95c809a8de99d2dd40ff5a82362a608300 SHA512 6059e1ddc43a023f7cb0e2a8d99929bcb204c211863fce4dece2dc30b92e7d1ce91bc25d2ed4bc54b713f61671264ac7e906d2b9ce078fa943cc5d81cd5d37dd EBUILD sdcv-0.5.4.ebuild 1571 BLAKE2B 99374342a32041b01df246819ab8ca350be3fec9c4716b7909d8023d1dcc84477227f20cfa706bdd191e45616859a12159d3b0568358acc6b62d8ad496c78421 SHA512 0ec8f4c1d3141a36544251c4739f1ad2186fb1bf6c0d7fced6ac8b0229ae5680d5bb5d6859de3c38a526b52c64efdec6e35f3276357f5f3cbaa55712450d317d +EBUILD sdcv-0.5.5.ebuild 1612 BLAKE2B bb566cf3679d31f5f05be95354323686ec0de1b30c0c85edd00df6bb222427b7fd7ebd42d796a3c8718eb1c35760e984715d8f7df28ea058b2333dd39e34344c SHA512 d32f432390f6e8d286e2f18a7d3ab0129a5816602b4448f3640c516af6c8adb8b98172ad28dfcc6d749442a2e615a53a58d1f3d71db51d82f0d05b8b27771561 MISC metadata.xml 366 BLAKE2B 2fc876317e40aa447a6d87e67f52d3bc2b6683648afd0f86e5a71ca715fe21252a10b1c19d9768c98b28faf84618aa44913e9bf916157f92e2c12302223dc507 SHA512 7369543566d1ca340b8c767aebf7f610912a6f9d8e744b3f2b64178774b69aa6d78271a9307c9fca5510956bc2ca2ed0bec9949cb22b15b261a8c664cbe39a22 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<IReadLine> 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 +} |