diff options
Diffstat (limited to 'app-text/sdcv')
-rw-r--r-- | app-text/sdcv/Manifest | 3 | ||||
-rw-r--r-- | app-text/sdcv/metadata.xml | 16 | ||||
-rw-r--r-- | app-text/sdcv/sdcv-0.5.0_beta2-r1.ebuild | 65 |
3 files changed, 84 insertions, 0 deletions
diff --git a/app-text/sdcv/Manifest b/app-text/sdcv/Manifest new file mode 100644 index 000000000000..c7a8a4b4fc11 --- /dev/null +++ b/app-text/sdcv/Manifest @@ -0,0 +1,3 @@ +DIST sdcv-0.5.0-beta2-Source.tar.bz2 51508 BLAKE2B f2cca4dea35df82015607c88b225da593780d027978f5cd9c03d6f31b03d7ca134e0f2be3bd7ad6c4ed71f7c4ce8fab1bdd546914867b247e6c814ca669e7da5 SHA512 e00ce45042ddd289bdf41f8907c9b8ece983bb6c24356f4905c4b017741d664d590c8f9a159aff600e96d8c3edf792a568d6afdf01865484d1cd5d94f7786570 +EBUILD sdcv-0.5.0_beta2-r1.ebuild 1426 BLAKE2B 6711cb854f6f010a06bf7e016de9739d719a3429e400005009847ee53087c4c1c2b49bd64e342b365cbe70d1fd9efbf333bf3287470537585ef29da1f7fe8023 SHA512 c721c50436f5f3224412f6229ca2796ab685bec580702025a341656b1d3b62400e5cbddbeea13ef0178e7635b55ee7616db6ac39c06ce4640ac464d837423d00 +MISC metadata.xml 523 BLAKE2B a3ccbb4d5965978e7eeeda8acc971d81d6ce65f04e4ab0342c1da8d3de0dc5512c8f172a7642b5d1c6f201717f52f6a850f459dfcf61e10fa041a35998c9f0a2 SHA512 d1c4be3dea4d7cf435bb98f6a02cce92925c113fc17c505377659095b53c1857b2730fa2363910630e51dda847f6d85f9dd6dd80abece74b844995ca7a09c8c8 diff --git a/app-text/sdcv/metadata.xml b/app-text/sdcv/metadata.xml new file mode 100644 index 000000000000..ef1706e494f2 --- /dev/null +++ b/app-text/sdcv/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bircoph@gentoo.org</email> + <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> +</pkgmetadata> 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..f521e22ff60e --- /dev/null +++ b/app-text/sdcv/sdcv-0.5.0_beta2-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 ! has uk ${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() { + # with USE=nls, but empty intersection of LINGUAS and list of + # supported translations, this directory is required, see bug 583386 + # failure is ok here (e.g. if dir exists) + mkdir "${BUILD_DIR}/locale" + cmake-utils_src_install +} |