1 |
commit: e216cd8652873446227e4bffac6f6bb038afad92 |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 26 12:45:38 2018 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 26 12:46:09 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e216cd86 |
7 |
|
8 |
app-text/sdcv: version bump |
9 |
|
10 |
- Readline support is now optional. |
11 |
- Tests are available. |
12 |
|
13 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
14 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
15 |
|
16 |
app-text/sdcv/Manifest | 1 + |
17 |
app-text/sdcv/files/sdcv-t_interactive.patch | 11 +++++ |
18 |
app-text/sdcv/files/sdcv-t_list.patch | 17 +++++++ |
19 |
app-text/sdcv/sdcv-0.5.2.ebuild | 73 ++++++++++++++++++++++++++++ |
20 |
4 files changed, 102 insertions(+) |
21 |
|
22 |
diff --git a/app-text/sdcv/Manifest b/app-text/sdcv/Manifest |
23 |
index 3fd8aad357f..06470ecce51 100644 |
24 |
--- a/app-text/sdcv/Manifest |
25 |
+++ b/app-text/sdcv/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST sdcv-0.5.0-beta2-Source.tar.bz2 51508 BLAKE2B f2cca4dea35df82015607c88b225da593780d027978f5cd9c03d6f31b03d7ca134e0f2be3bd7ad6c4ed71f7c4ce8fab1bdd546914867b247e6c814ca669e7da5 SHA512 e00ce45042ddd289bdf41f8907c9b8ece983bb6c24356f4905c4b017741d664d590c8f9a159aff600e96d8c3edf792a568d6afdf01865484d1cd5d94f7786570 |
28 |
+DIST sdcv-0.5.2.tar.gz 61541 BLAKE2B 3b86b69c1e781c311ebbd427d09f8e1c8f97a9fc7b72e22f812ec4619fb4f3cd673ea5548cfdd89554e1613877d20676b8830fd5921082d7a13facb761001c00 SHA512 8752a225aebcc28cd8911591333410a0da94db9a7718cee744f8fbc6ceeae14bbf13c6d5a02a05652ff032276765537573e216acd49980f80c06319dac7075fb |
29 |
|
30 |
diff --git a/app-text/sdcv/files/sdcv-t_interactive.patch b/app-text/sdcv/files/sdcv-t_interactive.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..83d503136c0 |
33 |
--- /dev/null |
34 |
+++ b/app-text/sdcv/files/sdcv-t_interactive.patch |
35 |
@@ -0,0 +1,11 @@ |
36 |
+--- sdcv-0.5.2/tests/t_interactive.orig 2018-08-26 15:04:39.174389830 +0300 |
37 |
++++ sdcv-0.5.2/tests/t_interactive 2018-08-26 15:05:01.494995830 +0300 |
38 |
+@@ -10,7 +10,7 @@ |
39 |
+ |
40 |
+ "$PATH_TO_SDCV" -n >/dev/null 2>&1 & |
41 |
+ PID=$! |
42 |
+-sleep 1 |
43 |
++sleep 5 |
44 |
+ |
45 |
+ if kill -0 $PID >/dev/null 2>&1 ; then |
46 |
+ echo "process wait input: $PID, test failed" >&2 |
47 |
|
48 |
diff --git a/app-text/sdcv/files/sdcv-t_list.patch b/app-text/sdcv/files/sdcv-t_list.patch |
49 |
new file mode 100644 |
50 |
index 00000000000..8bd23892fc7 |
51 |
--- /dev/null |
52 |
+++ b/app-text/sdcv/files/sdcv-t_list.patch |
53 |
@@ -0,0 +1,17 @@ |
54 |
+--- sdcv-0.5.2/tests/t_list.orig 2017-08-16 10:14:23.000000000 +0300 |
55 |
++++ sdcv-0.5.2/tests/t_list 2018-08-26 15:12:31.501052398 +0300 |
56 |
+@@ -1,11 +1,10 @@ |
57 |
+ #!/bin/sh |
58 |
+ |
59 |
+ PATH_TO_SDCV="$1" |
60 |
+-ndicts=`"$PATH_TO_SDCV" -l | wc -l` |
61 |
++TEST_DIR="$2" |
62 |
++ndicts=`"$PATH_TO_SDCV" --data-dir "${TEST_DIR}" -l | wc -l` |
63 |
+ ndicts=$(($ndicts-1)) |
64 |
+-ncom=`find /usr/share/stardict/dic -name "*.ifo" | wc -l` |
65 |
+-nspe=`find "${HOME}"/.stardict/dic -name "*.ifo" | wc -l` |
66 |
+-nmy=$(($ncom+$nspe)) |
67 |
++nmy=`find "${TEST_DIR}" -name "*.ifo" | wc -l` |
68 |
+ |
69 |
+ if [ $nmy -ne $ndicts ]; then |
70 |
+ echo "should be: $nmy, we have: $ndicts" >&2 |
71 |
|
72 |
diff --git a/app-text/sdcv/sdcv-0.5.2.ebuild b/app-text/sdcv/sdcv-0.5.2.ebuild |
73 |
new file mode 100644 |
74 |
index 00000000000..722ad64a802 |
75 |
--- /dev/null |
76 |
+++ b/app-text/sdcv/sdcv-0.5.2.ebuild |
77 |
@@ -0,0 +1,73 @@ |
78 |
+# Copyright 1999-2018 Gentoo Foundation |
79 |
+# Distributed under the terms of the GNU General Public License v2 |
80 |
+ |
81 |
+EAPI=6 |
82 |
+ |
83 |
+PLOCALES="cs fr ru sk uk zh_CN zh_TW" |
84 |
+: ${CMAKE_MAKEFILE_GENERATOR:="ninja"} |
85 |
+ |
86 |
+inherit cmake-utils l10n |
87 |
+ |
88 |
+DESCRIPTION="Console version of Stardict program" |
89 |
+HOMEPAGE="https://dushistov.github.io/sdcv/" |
90 |
+SRC_URI="https://github.com/Dushistov/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
91 |
+ |
92 |
+LICENSE="GPL-2" |
93 |
+SLOT="0" |
94 |
+KEYWORDS="~amd64 ~x86" |
95 |
+IUSE="darkterm nls readline test" |
96 |
+ |
97 |
+RDEPEND=" |
98 |
+ >=dev-libs/glib-2.6.1 |
99 |
+ sys-libs/zlib |
100 |
+ readline? ( sys-libs/readline:= ) |
101 |
+" |
102 |
+DEPEND="${RDEPEND} |
103 |
+ nls? ( >=sys-devel/gettext-0.14.1 ) |
104 |
+ test? ( app-misc/jq ) |
105 |
+" |
106 |
+ |
107 |
+PATCHES=( |
108 |
+ "${FILESDIR}/${PN}-t_list.patch" |
109 |
+ "${FILESDIR}/${PN}-t_interactive.patch" |
110 |
+) |
111 |
+ |
112 |
+src_prepare() { |
113 |
+ if use darkterm; then |
114 |
+ sed -i 's/;34m/;36m/' src/libwrapper.cpp || die |
115 |
+ fi |
116 |
+ |
117 |
+ rm_loc() { |
118 |
+ rm "po/${1}.po" || die |
119 |
+ } |
120 |
+ l10n_for_each_disabled_locale_do rm_loc |
121 |
+ |
122 |
+ # do not install locale-specific man pages unless asked to |
123 |
+ if ! has uk ${LINGUAS-uk}; then |
124 |
+ sed -ni '/share\/man\/uk/!p' CMakeLists.txt || die |
125 |
+ fi |
126 |
+ |
127 |
+ cmake-utils_src_prepare |
128 |
+} |
129 |
+ |
130 |
+src_configure() { |
131 |
+ local mycmakeargs=( |
132 |
+ -DENABLE_NLS="$(usex nls)" |
133 |
+ -DWITH_READLINE="$(usex readline)" |
134 |
+ -DBUILD_TESTS="$(usex test ON OFF)" |
135 |
+ ) |
136 |
+ cmake-utils_src_configure |
137 |
+} |
138 |
+ |
139 |
+src_compile() { |
140 |
+ cmake-utils_src_compile |
141 |
+ use nls && cmake-utils_src_compile lang |
142 |
+} |
143 |
+ |
144 |
+src_install() { |
145 |
+ # with USE=nls, but empty intersection of LINGUAS and list of |
146 |
+ # supported translations, this directory is required, see bug 583386 |
147 |
+ mkdir -p "${BUILD_DIR}/locale" |
148 |
+ cmake-utils_src_install |
149 |
+ dodoc doc/DICTFILE_FORMAT |
150 |
+} |