diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2016-05-17 21:22:53 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2016-05-17 21:30:32 +0300 |
commit | 12510826f989bec90c5ffa54e6144b086f1eaebe (patch) | |
tree | 506d2b06ceb73337228c8f2b161630d8b59e785e /app-text/sdcv | |
parent | media-libs/libdiscid: arm stable, bug #578932 (diff) | |
download | gentoo-12510826f989bec90c5ffa54e6144b086f1eaebe.tar.gz gentoo-12510826f989bec90c5ffa54e6144b086f1eaebe.tar.bz2 gentoo-12510826f989bec90c5ffa54e6144b086f1eaebe.zip |
app-text/sdcv: improve ebuild
- improve readability on dark terminals;
- port to EAPI 6;
- respect LINGUAS (for gettext localisation and man pages).
Package-Manager: portage-2.3.0_rc1
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-text/sdcv')
-rw-r--r-- | app-text/sdcv/metadata.xml | 4 | ||||
-rw-r--r-- | app-text/sdcv/sdcv-0.5.0_beta2-r1.ebuild | 63 |
2 files changed, 67 insertions, 0 deletions
diff --git a/app-text/sdcv/metadata.xml b/app-text/sdcv/metadata.xml index d82ae6e9a81b..ef1706e494f2 100644 --- a/app-text/sdcv/metadata.xml +++ b/app-text/sdcv/metadata.xml @@ -6,6 +6,10 @@ <name>Andrew Savchenko</name> </maintainer> <longdescription>sdcv - console version of StarDict program.</longdescription> + <use> + <flag name="darkterm">Improve readability of color output on terminals with + dark background.</flag> + </use> <upstream> <remote-id type="sourceforge">sdcv</remote-id> </upstream> diff --git a/app-text/sdcv/sdcv-0.5.0_beta2-r1.ebuild b/app-text/sdcv/sdcv-0.5.0_beta2-r1.ebuild new file mode 100644 index 000000000000..21fea92c4444 --- /dev/null +++ b/app-text/sdcv/sdcv-0.5.0_beta2-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PLOCALES="cs fr ru sk uk zh_CN zh_TW" +: ${CMAKE_MAKEFILE_GENERATOR:="ninja"} + +inherit cmake-utils l10n + +DESCRIPTION="Console version of Stardict program" +HOMEPAGE="http://sdcv.sourceforge.net" +MY_PV="${PV/_beta/-beta}-Source" +MY_PF="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_PF}" +SRC_URI="mirror://sourceforge/${PN}/${MY_PF}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="darkterm nls" + +RDEPEND="sys-libs/zlib + sys-libs/readline:= + >=dev-libs/glib-2.6.1" +DEPEND="${RDEPEND} + nls? ( >=sys-devel/gettext-0.14.1 )" + +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 ! use linguas_uk; then + sed -ni '/share\/man\/uk/!p' CMakeLists.txt || die + fi + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_NLS="$(usex nls)" + ) + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + use nls && cmake-utils_src_compile lang +} + +src_install() { + cmake-utils_src_install + dodoc AUTHORS NEWS +} |