commit:     8417b7d4e40d2f46b355cb5c0f4d78c99033eb43
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 31 20:42:37 2025 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Mon Mar 31 21:33:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8417b7d4

app-office/naps2: fix for ARM; use system tesseract

Closes: https://bugs.gentoo.org/952915
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 .../{naps2-8.1.1.ebuild => naps2-8.1.1-r1.ebuild}      | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/app-office/naps2/naps2-8.1.1.ebuild 
b/app-office/naps2/naps2-8.1.1-r1.ebuild
similarity index 96%
rename from app-office/naps2/naps2-8.1.1.ebuild
rename to app-office/naps2/naps2-8.1.1-r1.ebuild
index 5354ab7cf2e0..d65861cdb44a 100644
--- a/app-office/naps2/naps2-8.1.1.ebuild
+++ b/app-office/naps2/naps2-8.1.1-r1.ebuild
@@ -238,6 +238,7 @@ SLOT="0"
 RESTRICT="test"
 
 RDEPEND="
+       app-text/tesseract
        media-fonts/liberation-fonts
        media-fonts/noto
        media-fonts/noto-cjk
@@ -288,7 +289,22 @@ src_prepare() {
 
 src_install() {
        dotnet-pkg_src_install
-       find "${ED}/usr/share/${P}/_linux" -type f -exec chmod a+x {} + || die
+
+       local linux_dir=""
+       case "${ARCH}" in
+               arm* )
+                       linux_dir="/usr/share/${P}/_linuxarm"
+                       ;;
+               * )
+                       linux_dir="/usr/share/${P}/_linux"
+                       ;;
+       esac
+
+       # Use system tesseract.
+       rm -f "${ED}/${linux_dir}/tesseract" || die
+       dosym -r /usr/bin/tesseract "${linux_dir}/tesseract"
+
+       find "${ED}/${linux_dir}" -type f -exec chmod a+rx {} + || die
 
        newicon --size 128 ./NAPS2.Lib/Icons/scanner-128.png com.naps2.Naps2.png
        domenu ./NAPS2.Setup/config/linux/com.naps2.Naps2.desktop

Reply via email to