From ccb38ab90df4c975bcc18b25a41f2d451fd86753 Mon Sep 17 00:00:00 2001 From: Joe Kappus Date: Wed, 8 Apr 2026 02:21:33 -0400 Subject: [PATCH] app-dicts/crow-translate: new package, add 4.0.2 Signed-off-by: Joe Kappus --- app-dicts/crow-translate/Manifest | 1 + .../crow-translate-4.0.2.ebuild | 53 +++++++++++++++++++ .../crow-translate-4.0.2-system-qhotkey.patch | 13 +++++ app-dicts/crow-translate/metadata.xml | 21 ++++++++ 4 files changed, 88 insertions(+) create mode 100644 app-dicts/crow-translate/Manifest create mode 100644 app-dicts/crow-translate/crow-translate-4.0.2.ebuild create mode 100644 app-dicts/crow-translate/files/crow-translate-4.0.2-system-qhotkey.patch create mode 100644 app-dicts/crow-translate/metadata.xml diff --git a/app-dicts/crow-translate/Manifest b/app-dicts/crow-translate/Manifest new file mode 100644 index 0000000000..8fc4357ad0 --- /dev/null +++ b/app-dicts/crow-translate/Manifest @@ -0,0 +1 @@ +DIST crow-translate-4.0.2.tar.gz 24572246 BLAKE2B 7be14a5de284c2a2d64f60d990a05c14d0e365f13a146207cf2bbb05ca4996d723ff62c41572a504cb10359cb1250eff02cbe08c358c2c7ff3e48e819c3cc606 SHA512 5ec505522386afd1c2c350e5180dcbbdc4b63e021223d8f7c52150a2f7db3311a1c102678a5b4c7923f541deb06ea2e38365236f6f3385a902672b85b3a7ed0b diff --git a/app-dicts/crow-translate/crow-translate-4.0.2.ebuild b/app-dicts/crow-translate/crow-translate-4.0.2.ebuild new file mode 100644 index 0000000000..efe4dce70f --- /dev/null +++ b/app-dicts/crow-translate/crow-translate-4.0.2.ebuild @@ -0,0 +1,53 @@ +# Copyright 2023-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Application that allows you to translate and speak text" +HOMEPAGE="https://invent.kde.org/office/crow-translate" +SRC_URI="https://download.kde.org/stable/${PN}/${PV}/${P}.tar.gz" +S="${WORKDIR}/${PN}" + +LICENSE="GPL-3+ CC-BY-SA-4.0 CC0-1.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="piper-tts wayland" + +DEPEND=" + app-text/tesseract + dev-libs/qhotkey + dev-qt/qtbase:6[concurrent,dbus,gui,network,widgets] + dev-qt/qtmultimedia:6 + dev-qt/qtscxml:6 + dev-qt/qtspeech:6 + x11-libs/libxcb + wayland? ( kde-plasma/kwayland:6 ) + piper-tts? ( sci-libs/onnxruntime ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + >=kde-frameworks/extra-cmake-modules-6.4.0 + dev-qt/qttools:6[linguist] +" + +RESTRICT="mirror" + +PATCHES=( + "${FILESDIR}/${P}-system-qhotkey.patch" +) + +src_prepare() { + sed -i 's/\r$//' CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=OFF + -DWITH_KWAYLAND=$(usex wayland) + -DWITH_PIPER_TTS=$(usex piper-tts) + ) + cmake_src_configure +} diff --git a/app-dicts/crow-translate/files/crow-translate-4.0.2-system-qhotkey.patch b/app-dicts/crow-translate/files/crow-translate-4.0.2-system-qhotkey.patch new file mode 100644 index 0000000000..a1f7081c9a --- /dev/null +++ b/app-dicts/crow-translate/files/crow-translate-4.0.2-system-qhotkey.patch @@ -0,0 +1,13 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -87,8 +87,8 @@ + kde_clang_format(${CLANG_FORMAT_SOURCES}) + set(QAPPLICATION_CLASS QApplication) +-option(QHOTKEY_INSTALL OFF) + set(BUILD_SHARED_LIBS OFF) + add_subdirectory(src/3rdparty/singleapplication) +-add_subdirectory(src/3rdparty/qhotkey) ++find_package(QHotkey REQUIRED) ++add_library(QHotkey::QHotkey ALIAS qhotkey) + + find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Network LinguistTools Concurrent StateMachine TextToSpeech) diff --git a/app-dicts/crow-translate/metadata.xml b/app-dicts/crow-translate/metadata.xml new file mode 100644 index 0000000000..ae20473ff0 --- /dev/null +++ b/app-dicts/crow-translate/metadata.xml @@ -0,0 +1,21 @@ + + + + + joe@wt.gd + Joe Kappus + + + Crow Translate is a simple and lightweight translator that allows + translating and speaking text using the Mozhi translation API. + It features global shortcuts, text-to-speech, OCR via Tesseract, + and a popup translation window. + + + office/crow-translate + + + Enable Piper neural text-to-speech support (requires onnxruntime and bundled espeak-ng) + Enable improved Wayland integration via KWayland + +