summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2018-08-26 15:45:38 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2018-08-26 15:46:09 +0300
commite216cd8652873446227e4bffac6f6bb038afad92 (patch)
treea7a6520694c34af553870c4d937242dcac80a272 /app-text/sdcv
parentmedia-plugins/vdr-skinelchi: cleanup old (diff)
downloadgentoo-e216cd8652873446227e4bffac6f6bb038afad92.tar.gz
gentoo-e216cd8652873446227e4bffac6f6bb038afad92.tar.bz2
gentoo-e216cd8652873446227e4bffac6f6bb038afad92.zip
app-text/sdcv: version bump
- Readline support is now optional. - Tests are available. Signed-off-by: Andrew Savchenko <bircoph@gentoo.org> Package-Manager: Portage-2.3.48, Repoman-2.3.10
Diffstat (limited to 'app-text/sdcv')
-rw-r--r--app-text/sdcv/Manifest1
-rw-r--r--app-text/sdcv/files/sdcv-t_interactive.patch11
-rw-r--r--app-text/sdcv/files/sdcv-t_list.patch17
-rw-r--r--app-text/sdcv/sdcv-0.5.2.ebuild73
4 files changed, 102 insertions, 0 deletions
diff --git a/app-text/sdcv/Manifest b/app-text/sdcv/Manifest
index 3fd8aad357fd..06470ecce517 100644
--- a/app-text/sdcv/Manifest
+++ b/app-text/sdcv/Manifest
@@ -1 +1,2 @@
DIST sdcv-0.5.0-beta2-Source.tar.bz2 51508 BLAKE2B f2cca4dea35df82015607c88b225da593780d027978f5cd9c03d6f31b03d7ca134e0f2be3bd7ad6c4ed71f7c4ce8fab1bdd546914867b247e6c814ca669e7da5 SHA512 e00ce45042ddd289bdf41f8907c9b8ece983bb6c24356f4905c4b017741d664d590c8f9a159aff600e96d8c3edf792a568d6afdf01865484d1cd5d94f7786570
+DIST sdcv-0.5.2.tar.gz 61541 BLAKE2B 3b86b69c1e781c311ebbd427d09f8e1c8f97a9fc7b72e22f812ec4619fb4f3cd673ea5548cfdd89554e1613877d20676b8830fd5921082d7a13facb761001c00 SHA512 8752a225aebcc28cd8911591333410a0da94db9a7718cee744f8fbc6ceeae14bbf13c6d5a02a05652ff032276765537573e216acd49980f80c06319dac7075fb
diff --git a/app-text/sdcv/files/sdcv-t_interactive.patch b/app-text/sdcv/files/sdcv-t_interactive.patch
new file mode 100644
index 000000000000..83d503136c0f
--- /dev/null
+++ b/app-text/sdcv/files/sdcv-t_interactive.patch
@@ -0,0 +1,11 @@
+--- sdcv-0.5.2/tests/t_interactive.orig 2018-08-26 15:04:39.174389830 +0300
++++ sdcv-0.5.2/tests/t_interactive 2018-08-26 15:05:01.494995830 +0300
+@@ -10,7 +10,7 @@
+
+ "$PATH_TO_SDCV" -n >/dev/null 2>&1 &
+ PID=$!
+-sleep 1
++sleep 5
+
+ if kill -0 $PID >/dev/null 2>&1 ; then
+ echo "process wait input: $PID, test failed" >&2
diff --git a/app-text/sdcv/files/sdcv-t_list.patch b/app-text/sdcv/files/sdcv-t_list.patch
new file mode 100644
index 000000000000..8bd23892fc7a
--- /dev/null
+++ b/app-text/sdcv/files/sdcv-t_list.patch
@@ -0,0 +1,17 @@
+--- sdcv-0.5.2/tests/t_list.orig 2017-08-16 10:14:23.000000000 +0300
++++ sdcv-0.5.2/tests/t_list 2018-08-26 15:12:31.501052398 +0300
+@@ -1,11 +1,10 @@
+ #!/bin/sh
+
+ PATH_TO_SDCV="$1"
+-ndicts=`"$PATH_TO_SDCV" -l | wc -l`
++TEST_DIR="$2"
++ndicts=`"$PATH_TO_SDCV" --data-dir "${TEST_DIR}" -l | wc -l`
+ ndicts=$(($ndicts-1))
+-ncom=`find /usr/share/stardict/dic -name "*.ifo" | wc -l`
+-nspe=`find "${HOME}"/.stardict/dic -name "*.ifo" | wc -l`
+-nmy=$(($ncom+$nspe))
++nmy=`find "${TEST_DIR}" -name "*.ifo" | wc -l`
+
+ if [ $nmy -ne $ndicts ]; then
+ echo "should be: $nmy, we have: $ndicts" >&2
diff --git a/app-text/sdcv/sdcv-0.5.2.ebuild b/app-text/sdcv/sdcv-0.5.2.ebuild
new file mode 100644
index 000000000000..722ad64a802e
--- /dev/null
+++ b/app-text/sdcv/sdcv-0.5.2.ebuild
@@ -0,0 +1,73 @@
+# 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="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"
+
+RDEPEND="
+ >=dev-libs/glib-2.6.1
+ sys-libs/zlib
+ readline? ( sys-libs/readline:= )
+"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.14.1 )
+ test? ( app-misc/jq )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-t_list.patch"
+ "${FILESDIR}/${PN}-t_interactive.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-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_NLS="$(usex nls)"
+ -DWITH_READLINE="$(usex readline)"
+ -DBUILD_TESTS="$(usex test ON OFF)"
+ )
+ 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
+ mkdir -p "${BUILD_DIR}/locale"
+ cmake-utils_src_install
+ dodoc doc/DICTFILE_FORMAT
+}