Browse Source

app-text/qstardict: new package, add 4.0.0, 9999 (#243)

* Recover the package previously removed by
  f0f6548b2c9bd5b1b7e37a1e70a0f5694221ab06.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Golubev Alexander 2 days ago
parent
commit
51cb6dfef3

+ 1 - 0
app-text/qstardict/Manifest

@@ -0,0 +1 @@
+DIST qstardict-4.0.0.tar.gz 570180 BLAKE2B 76ff6521afeda59cf85f4fc7d67e9171bd49f766f5f91e9c8ccee35af600a7958e343b916140ae2df54b0690061b81dc1b04a337efc57f45a017fbac3f680241 SHA512 daac9808493aa866053c3978d1a860347f8400ffda0487cd1cb5d6a2b6f83b923b805b53f31ed4d0b744c47738138cf7c6ba59d178cbb1a65f92b2b4b9d26a87

+ 22 - 0
app-text/qstardict/files/qstardict-4.0.0-fix-version.patch

@@ -0,0 +1,22 @@
+From c206a52dc1f97cec5aec3499f9bb96884ece4a3f Mon Sep 17 00:00:00 2001
+From: Golubev Alexander <fatzer2@gmail.com>
+Date: Tue, 22 Jul 2025 06:42:15 +0300
+Subject: [PATCH] Bump up the version to 4.0.0
+
+---
+ qstardict.pri | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qstardict.pri b/qstardict.pri
+index 639b0d0..831103d 100644
+--- a/qstardict.pri
++++ b/qstardict.pri
+@@ -18,7 +18,7 @@
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.               #
+ #############################################################################
+ 
+-VERSION = 3.0.0
++VERSION = 4.0.0
+ 
+ QT = \
+     core \

+ 17 - 0
app-text/qstardict/metadata.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>rion4ik@gmail.com</email>
+	</maintainer>
+	<maintainer type="person">
+		<email>fatzer2@gmail.com</email>
+	</maintainer>
+	<use>
+		<flag name='stardict'>Build backend plugin to use stardict dictionaties</flag>
+		<flag name='web'>Build backend plugin to use online dictionaties</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">a-rodin/qstardict</remote-id>
+	</upstream>
+</pkgmetadata>

+ 70 - 0
app-text/qstardict/qstardict-4.0.0.ebuild

@@ -0,0 +1,70 @@
+# Copyright 1999-2025 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="8"
+
+inherit qmake-utils
+
+DESCRIPTION="QStarDict is a StarDict clone written with using Qt"
+HOMEPAGE="http://qstardict.ylsoftware.com/"
+LICENSE="GPL-2"
+SLOT="0"
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/a-rodin/qstardict.git"
+else
+	SRC_URI="https://github.com/a-rodin/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+IUSE="+dbus nls +stardict +web"
+REQUIRED_USE="
+	|| ( stardict web )
+"
+
+RDEPEND="
+	dev-qt/qtbase:6=[gui]
+	dbus? ( dev-qt/qtbase:6=[dbus] )
+	dev-libs/glib:2
+	sys-libs/zlib:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-qt/qtbase:6
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-version.patch"
+)
+
+src_prepare() {
+	find -name '*pr?' -exec sed "s:/lib\(64\)\?:/$(get_libdir):" -i '{}' \; || die "libdir fix failed"
+
+	# Avoid a warning about a missing file
+	touch "plugins/plugins.pri"
+
+	default
+}
+
+src_configure() {
+	local my_qmake_flags=() enabled_plugins=()
+
+	use dbus || my_qmake_flags+=( "NO_DBUS=1" )
+	use nls || my_qmake_flags+=( "NO_TRANSLATIONS=1" )
+
+	use stardict && enabled_plugins+="stardict "
+	use web && enabled_plugins+="web "
+
+	my_qmake_flags+=( ENABLED_PLUGINS="${enabled_plugins}" )
+	my_qmake_flags+=( INSTALL_PREFIX="${EPREFIX}/usr" )
+	my_qmake_flags+=( DOCS_DIR="${EPREFIX}/usr/share/doc/${P}" )
+
+	eqmake6 "${PN}".pro "${my_qmake_flags[@]}"
+}
+
+src_install() {
+	emake INSTALL_ROOT="${D}" install
+	dodoc README.md
+}

+ 65 - 0
app-text/qstardict/qstardict-9999.ebuild

@@ -0,0 +1,65 @@
+# Copyright 1999-2025 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="8"
+
+inherit qmake-utils
+
+DESCRIPTION="QStarDict is a StarDict clone written with using Qt"
+HOMEPAGE="http://qstardict.ylsoftware.com/"
+LICENSE="GPL-2"
+SLOT="0"
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/a-rodin/qstardict.git"
+else
+	SRC_URI="https://github.com/a-rodin/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+IUSE="+dbus nls +stardict +web"
+REQUIRED_USE="
+	|| ( stardict web )
+"
+
+RDEPEND="
+	dev-qt/qtbase:6=[gui]
+	dbus? ( dev-qt/qtbase:6=[dbus] )
+	dev-libs/glib:2
+	sys-libs/zlib:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-qt/qtbase:6
+"
+
+src_prepare() {
+	find -name '*pr?' -exec sed "s:/lib\(64\)\?:/$(get_libdir):" -i '{}' \; || die "libdir fix failed"
+
+	# Avoid a warning about a missing file
+	touch "plugins/plugins.pri"
+
+	default
+}
+
+src_configure() {
+	local my_qmake_flags=() enabled_plugins=()
+
+	use dbus || my_qmake_flags+=( "NO_DBUS=1" )
+	use nls || my_qmake_flags+=( "NO_TRANSLATIONS=1" )
+
+	use stardict && enabled_plugins+="stardict "
+	use web && enabled_plugins+="web "
+
+	my_qmake_flags+=( ENABLED_PLUGINS="${enabled_plugins}" )
+	my_qmake_flags+=( INSTALL_PREFIX="${EPREFIX}/usr" )
+	my_qmake_flags+=( DOCS_DIR="${EPREFIX}/usr/share/doc/${P}" )
+
+	eqmake6 "${PN}".pro "${my_qmake_flags[@]}"
+}
+
+src_install() {
+	emake INSTALL_ROOT="${D}" install
+}