public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/sdcv/, app-text/sdcv/files/
@ 2016-06-26  9:50 Andrew Savchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Savchenko @ 2016-06-26  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     a8c1783461969de640a2a84a1a97425b68e4a927
Author:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 26 09:48:08 2016 +0000
Commit:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Sun Jun 26 09:50:00 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8c17834

app-text/sdcv: remove old

Package-Manager: portage-2.3.0_rc1
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>

 app-text/sdcv/Manifest                             |  1 -
 app-text/sdcv/files/sdcv-0.4.2-crash.patch         | 27 -------------
 app-text/sdcv/files/sdcv-0.4.2-dash.patch          | 21 ----------
 app-text/sdcv/files/sdcv-0.4.2-g-handling.patch    | 21 ----------
 .../sdcv/files/sdcv-0.4.2-missing-headers.patch    | 47 ----------------------
 app-text/sdcv/files/sdcv-0.4.2-respect-HOME.patch  | 17 --------
 app-text/sdcv/sdcv-0.4.2.ebuild                    | 47 ----------------------
 7 files changed, 181 deletions(-)

diff --git a/app-text/sdcv/Manifest b/app-text/sdcv/Manifest
index 88c46f6..1cadede 100644
--- a/app-text/sdcv/Manifest
+++ b/app-text/sdcv/Manifest
@@ -1,2 +1 @@
-DIST sdcv-0.4.2.tar.bz2 181384 SHA256 a164f079e93986814ea2d39f3a49cf9d1b71b01aad908254457fe3d0ded9deb2 SHA512 0c701a64893c7531006617e190924e292bd755c2a4c3905fa7ab44002bf189b5d2c7694f331356093a3b5e9f690f89e50bca29b9c36a9fb9733603d2aef1b58b WHIRLPOOL e605ee39a38e405ddae1b438a6714b5f9bc684097fe264f4bd124955a2f05c39e4c3140fb22526ca5dee51f61803740321d6c4143212b6450c17bf507e869a6c
 DIST sdcv-0.5.0-beta2-Source.tar.bz2 51508 SHA256 386cfc96285a653c697f8baeab676cb3f1645cea029464d194872d0bbae14ffb SHA512 e00ce45042ddd289bdf41f8907c9b8ece983bb6c24356f4905c4b017741d664d590c8f9a159aff600e96d8c3edf792a568d6afdf01865484d1cd5d94f7786570 WHIRLPOOL 0e9cb7eaf6ccee6f9c7dbebbfee4d4a80c1cdca7444f2ba6f276a670924395dcdabd4ee7efe929bd940f3b3accc01e425f0270c2d7c897bcbd4adc03fd566a05

diff --git a/app-text/sdcv/files/sdcv-0.4.2-crash.patch b/app-text/sdcv/files/sdcv-0.4.2-crash.patch
deleted file mode 100644
index 264cffc..0000000
--- a/app-text/sdcv/files/sdcv-0.4.2-crash.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix unalligned access to buffer.
-
-On several architectures (arm, armel, sparc and ia64), unalligned access to
-integers is not allowed. Buffer in this function is not alligned at all and
-attempt to read integer from it causes crash of application on such
-architectures.
-
-Reported upstream at:
-https://sourceforge.net/tracker/index.php?func=detail&aid=2149388&group_id=122858&atid=694730
---- a/src/lib/lib.cpp
-+++ b/src/lib/lib.cpp
-@@ -496,9 +496,13 @@
- 		entries[i].keystr=p;
- 		len=strlen(p);
- 		p+=len+1;
--		entries[i].off=g_ntohl(*reinterpret_cast<guint32 *>(p));
-+        /*
-+         * Can not use typecasting here, because *data does not have
-+         * to be alligned and unalligned access fails on some architectures.
-+         */
-+		entries[i].off=((unsigned char)p[0] << 24) | ((unsigned char)p[1] << 16) | ((unsigned char)p[2] << 8) | (unsigned char)p[3];
- 		p+=sizeof(guint32);
--		entries[i].size=g_ntohl(*reinterpret_cast<guint32 *>(p));
-+		entries[i].size=((unsigned char)p[0] << 24) | ((unsigned char)p[1] << 16) | ((unsigned char)p[2] << 8) | (unsigned char)p[3];
- 		p+=sizeof(guint32);
- 	}
- }

diff --git a/app-text/sdcv/files/sdcv-0.4.2-dash.patch b/app-text/sdcv/files/sdcv-0.4.2-dash.patch
deleted file mode 100644
index 35d15ae..0000000
--- a/app-text/sdcv/files/sdcv-0.4.2-dash.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/tests/t_datadir b/tests/t_datadir
-index 116ae7e..327e5b5 100755
---- a/tests/t_datadir
-+++ b/tests/t_datadir
-@@ -1 +1 @@
--#!/bin/sh
-+#!/bin/bash
-diff --git a/tests/t_list b/tests/t_list
-index 42ae137..62e52fd 100755
---- a/tests/t_list
-+++ b/tests/t_list
-@@ -1 +1 @@
--#!/bin/sh
-+#!/bin/bash
-diff --git a/tests/t_utf8input b/tests/t_utf8input
-index 7ae88c4..e692ab0 100755
---- a/tests/t_utf8input
-+++ b/tests/t_utf8input
-@@ -1 +1 @@
--#!/bin/sh
-+#!/bin/bash

diff --git a/app-text/sdcv/files/sdcv-0.4.2-g-handling.patch b/app-text/sdcv/files/sdcv-0.4.2-g-handling.patch
deleted file mode 100644
index 72fb690..0000000
--- a/app-text/sdcv/files/sdcv-0.4.2-g-handling.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://sourceforge.net/tracker/index.php?func=detail&aid=2125962&group_id=122858&atid=694730
-
-Fixes displaying of 'g' (gtk markup) entries.
---- a/src/libwrapper.cpp
-+++ b/src/libwrapper.cpp
-@@ -118,7 +118,6 @@
- 		switch (*p++) {
- 		case 'm':
- 		case 'l': //need more work...
--		case 'g':
- 			sec_size = strlen(p);
- 			if (sec_size) {
- 				res+="\n";
-@@ -128,6 +127,7 @@
- 			}
- 			sec_size++;
- 			break;
-+		case 'g':
- 		case 'x':
- 			sec_size = strlen(p);
- 			if (sec_size) {

diff --git a/app-text/sdcv/files/sdcv-0.4.2-missing-headers.patch b/app-text/sdcv/files/sdcv-0.4.2-missing-headers.patch
deleted file mode 100644
index 8c96c65..0000000
--- a/app-text/sdcv/files/sdcv-0.4.2-missing-headers.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -ur sdcv-0.4.2-orig/src/lib/lib.cpp sdcv-0.4.2/src/lib/lib.cpp
---- sdcv-0.4.2-orig/src/lib/lib.cpp	2009-07-25 17:44:48.000000000 -0400
-+++ sdcv-0.4.2/src/lib/lib.cpp	2009-07-25 17:39:11.000000000 -0400
-@@ -517,7 +517,7 @@
- {
- 	fseek(idxfile, wordoffset[page_idx], SEEK_SET);
- 	guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx];
--	fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
-+	fread(wordentry_buf, std::min(sizeof(wordentry_buf), (size_t)page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
- 	return wordentry_buf;
- }
- 
-diff -ur sdcv-0.4.2-orig/src/libwrapper.cpp sdcv-0.4.2/src/libwrapper.cpp
---- sdcv-0.4.2-orig/src/libwrapper.cpp	2009-07-25 17:44:48.000000000 -0400
-+++ sdcv-0.4.2/src/libwrapper.cpp	2009-07-25 17:39:11.000000000 -0400
-@@ -24,6 +24,7 @@
- 
- #include <glib/gi18n.h>
- #include <map>
-+#include <cstring>
- 
- #include "utils.hpp"
- 
-diff -ur sdcv-0.4.2-orig/src/readline.cpp sdcv-0.4.2/src/readline.cpp
---- sdcv-0.4.2-orig/src/readline.cpp	2009-07-25 17:44:48.000000000 -0400
-+++ sdcv-0.4.2/src/readline.cpp	2009-07-25 17:39:11.000000000 -0400
-@@ -23,6 +23,7 @@
- #endif
- 
- #include <cstdio>
-+#include <cstdlib>
- #ifdef WITH_READLINE
- #  include <readline/readline.h>
- #  include <readline/history.h>
-diff -ur sdcv-0.4.2-orig/src/utils.cpp sdcv-0.4.2/src/utils.cpp
---- sdcv-0.4.2-orig/src/utils.cpp	2009-07-25 17:44:48.000000000 -0400
-+++ sdcv-0.4.2/src/utils.cpp	2009-07-25 17:44:17.000000000 -0400
-@@ -22,6 +22,8 @@
- #  include "config.h"
- #endif
- 
-+#include <cstdio>
-+#include <cstdlib>
- #include <glib.h>
- #include <glib/gi18n.h>
- 
-Only in sdcv-0.4.2/src: utils.o

diff --git a/app-text/sdcv/files/sdcv-0.4.2-respect-HOME.patch b/app-text/sdcv/files/sdcv-0.4.2-respect-HOME.patch
deleted file mode 100644
index 5b61650..0000000
--- a/app-text/sdcv/files/sdcv-0.4.2-respect-HOME.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-=== modified file 'src/sdcv.cpp'
---- src/sdcv.cpp	2008-11-18 12:43:28 +0000
-+++ src/sdcv.cpp	2008-11-18 12:43:41 +0000
-@@ -161,7 +161,11 @@
- 
- 	strlist_t dicts_dir_list;
- 
--	dicts_dir_list.push_back(std::string(g_get_home_dir())+G_DIR_SEPARATOR+
-+	const char *homedir = g_getenv ("HOME");
-+	if (!homedir)
-+		homedir = g_get_home_dir ();
-+
-+	dicts_dir_list.push_back(std::string(homedir)+G_DIR_SEPARATOR+
- 				 ".stardict"+G_DIR_SEPARATOR+"dic");
- 	dicts_dir_list.push_back(data_dir);   
- 
-

diff --git a/app-text/sdcv/sdcv-0.4.2.ebuild b/app-text/sdcv/sdcv-0.4.2.ebuild
deleted file mode 100644
index 45b4806..0000000
--- a/app-text/sdcv/sdcv-0.4.2.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils
-
-DESCRIPTION="Console version of Stardict program"
-HOMEPAGE="http://sdcv.sourceforge.net"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="nls test"
-
-RDEPEND="sys-libs/zlib
-	sys-libs/readline
-	>=dev-libs/glib-2.6.1"
-DEPEND="${RDEPEND}
-	test? ( app-dicts/stardict-quick-ru-en )
-	nls? ( >=sys-devel/gettext-0.14.1 )"
-
-src_unpack() {
-	unpack ${A}
-	cd "${S}"
-	epatch "${FILESDIR}/${P}-missing-headers.patch"
-	epatch "${FILESDIR}/${P}-crash.patch"
-	epatch "${FILESDIR}/${P}-g-handling.patch"
-	epatch "${FILESDIR}/${P}-respect-HOME.patch"
-	epatch "${FILESDIR}"/${P}-dash.patch
-}
-
-src_compile() {
-	econf $(use_enable nls)
-	emake || die "emake failed"
-}
-
-src_test() {
-	export HOME=${T}
-	mkdir -p "${HOME}/.stardict/dic"
-	emake check || die
-}
-
-src_install() {
-	emake DESTDIR="${D}" install || die
-	dodoc AUTHORS BUGS ChangeLog NEWS README TODO
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/sdcv/, app-text/sdcv/files/
@ 2018-08-26 12:46 Andrew Savchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Savchenko @ 2018-08-26 12:46 UTC (permalink / raw
  To: gentoo-commits

commit:     e216cd8652873446227e4bffac6f6bb038afad92
Author:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 26 12:45:38 2018 +0000
Commit:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Sun Aug 26 12:46:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e216cd86

app-text/sdcv: version bump

- Readline support is now optional.
- Tests are available.

Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
Package-Manager: Portage-2.3.48, Repoman-2.3.10

 app-text/sdcv/Manifest                       |  1 +
 app-text/sdcv/files/sdcv-t_interactive.patch | 11 +++++
 app-text/sdcv/files/sdcv-t_list.patch        | 17 +++++++
 app-text/sdcv/sdcv-0.5.2.ebuild              | 73 ++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+)

diff --git a/app-text/sdcv/Manifest b/app-text/sdcv/Manifest
index 3fd8aad357f..06470ecce51 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 00000000000..83d503136c0
--- /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 00000000000..8bd23892fc7
--- /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 00000000000..722ad64a802
--- /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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/sdcv/, app-text/sdcv/files/
@ 2024-09-24  0:36 Yixun Lan
  0 siblings, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2024-09-24  0:36 UTC (permalink / raw
  To: gentoo-commits

commit:     7ca7f0f5f2e4a32ee7b81740b5c6734da468d3ee
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 24 00:34:42 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Sep 24 00:36:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ca7f0f5

app-text/sdcv: add 0.5.5

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-text/sdcv/Manifest                            |  1 +
 app-text/sdcv/files/sdcv-0.5.5-read-history.patch | 23 +++++++
 app-text/sdcv/sdcv-0.5.5.ebuild                   | 74 +++++++++++++++++++++++
 3 files changed, 98 insertions(+)

diff --git a/app-text/sdcv/Manifest b/app-text/sdcv/Manifest
index 0425d328344b..7b40988ae61d 100644
--- a/app-text/sdcv/Manifest
+++ b/app-text/sdcv/Manifest
@@ -1 +1,2 @@
 DIST sdcv-0.5.4.tar.gz 66706 BLAKE2B 9cb481f497483b502bec18765b9cbc31e8dd278e30ebd29005158a724669e171181a82c837b63016b9e88a84973831587d2b137bbbdb2290a89a73d3f0917f81 SHA512 6bae3a2c0f37ed9380f54715626efeea0df75d2525baa583c0915bba4d082d9ece40ee799a1e1bb5d36b7ccebace853653b6fab57d472a432b910f690235ee21
+DIST sdcv-0.5.5.tar.gz 67016 BLAKE2B 8a563b042e98af487dc4acfd9b158be72bebf3162ccdef48d3c4418fc548ce4ac9ba048e5fe44de2e6eb8b18d723be95c809a8de99d2dd40ff5a82362a608300 SHA512 6059e1ddc43a023f7cb0e2a8d99929bcb204c211863fce4dece2dc30b92e7d1ce91bc25d2ed4bc54b713f61671264ac7e906d2b9ce078fa943cc5d81cd5d37dd

diff --git a/app-text/sdcv/files/sdcv-0.5.5-read-history.patch b/app-text/sdcv/files/sdcv-0.5.5-read-history.patch
new file mode 100644
index 000000000000..fff601b29874
--- /dev/null
+++ b/app-text/sdcv/files/sdcv-0.5.5-read-history.patch
@@ -0,0 +1,23 @@
+Subject: [PATCH] fix: read_history() multiple times will add repeat histories to history lists
+
+backport from upstream
+---
+ src/libwrapper.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/libwrapper.cpp b/src/libwrapper.cpp
+index 6be59c5..80077ac 100644
+--- a/src/libwrapper.cpp
++++ b/src/libwrapper.cpp
+@@ -415,10 +415,9 @@ search_result Library::process_phrase(const char *loc_str, IReadLine &io, bool f
+                        colorize_output_ ? ESC_END : "");
+             }
+             int choise;
+-            std::unique_ptr<IReadLine> choice_readline(create_readline_object());
+             for (;;) {
+                 std::string str_choise;
+-                choice_readline->read(_("Your choice[-1 to abort]: "), str_choise);
++                io.read(_("Your choice[-1 to abort]: "), str_choise);
+                 sscanf(str_choise.c_str(), "%d", &choise);
+                 if (choise >= 0 && choise < int(res_list.size())) {
+                     sdcv_pager pager;

diff --git a/app-text/sdcv/sdcv-0.5.5.ebuild b/app-text/sdcv/sdcv-0.5.5.ebuild
new file mode 100644
index 000000000000..565d95a6c4f3
--- /dev/null
+++ b/app-text/sdcv/sdcv-0.5.5.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PLOCALES="cs fr ru sk uk zh_CN zh_TW"
+inherit cmake plocale
+
+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 ~arm ~arm64 ~riscv ~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}/${P}-read-history.patch"
+)
+
+src_prepare() {
+	if use darkterm; then
+		sed -i 's/;34m/;36m/' src/libwrapper.cpp || die
+	fi
+
+	rm_loc() {
+		rm "po/${1}.po" || die
+	}
+	plocale_for_each_disabled_locale 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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-24  0:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-26 12:46 [gentoo-commits] repo/gentoo:master commit in: app-text/sdcv/, app-text/sdcv/files/ Andrew Savchenko
  -- strict thread matches above, loose matches on Subject: below --
2024-09-24  0:36 Yixun Lan
2016-06-26  9:50 Andrew Savchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox