summaryrefslogtreecommitdiff
path: root/app-text/sdcv/sdcv-0.5.3.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /app-text/sdcv/sdcv-0.5.3.ebuild
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'app-text/sdcv/sdcv-0.5.3.ebuild')
-rw-r--r--app-text/sdcv/sdcv-0.5.3.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/app-text/sdcv/sdcv-0.5.3.ebuild b/app-text/sdcv/sdcv-0.5.3.ebuild
new file mode 100644
index 000000000000..8b7225b3c9d1
--- /dev/null
+++ b/app-text/sdcv/sdcv-0.5.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PLOCALES="cs fr ru sk uk zh_CN zh_TW"
+inherit cmake l10n
+
+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 ~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}/${PN}-synonyms-bin-search.patch"
+)
+
+src_prepare() {
+ if use darkterm; then
+ sed -i 's/;34m/;36m/' src/libwrapper.cpp || die
+ fi
+
+ rm_loc() {
+ rm "po/${1}.po" || die
+ }
+ l10n_for_each_disabled_locale_do 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
+}