summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-08-23 23:21:07 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-08-23 23:21:07 +0200
commit39a27340d9f60fd4b1b88f4c549434ef83c63afd (patch)
tree9d46f147226f00acee7b3c59bbabd15b89260ca5 /app-text
parentapp-text/tuxcards: Import 2.2.1-r1 from before last-rites (diff)
downloadkde-sunset-39a27340d9f60fd4b1b88f4c549434ef83c63afd.tar.gz
kde-sunset-39a27340d9f60fd4b1b88f4c549434ef83c63afd.tar.bz2
kde-sunset-39a27340d9f60fd4b1b88f4c549434ef83c63afd.zip
app-text/yagf: Import 0.9.5 from before last-rites
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/yagf/Manifest1
-rw-r--r--app-text/yagf/metadata.xml20
-rw-r--r--app-text/yagf/yagf-0.9.5.ebuild61
3 files changed, 82 insertions, 0 deletions
diff --git a/app-text/yagf/Manifest b/app-text/yagf/Manifest
new file mode 100644
index 00000000..12aa789a
--- /dev/null
+++ b/app-text/yagf/Manifest
@@ -0,0 +1 @@
+DIST yagf-0.9.5.tar.gz 427018 BLAKE2B 4aace2cf06cafc22e08b1b670727e46234509bb40f15e537d3878ee41c0d0cf2aecc22b9a443f87182498180b1d1791a51b1870172267e4a24a1c4f9f7edfa03 SHA512 a0b77e49c11be0ed043d3f44b1c48122cdabf0ae4ae69d84bc01eee0a8b084dae8201234e08816065d449e4d47bd704f282b1cd3b31c3539d201e9f32dfef05c
diff --git a/app-text/yagf/metadata.xml b/app-text/yagf/metadata.xml
new file mode 100644
index 00000000..76b22cdd
--- /dev/null
+++ b/app-text/yagf/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ YAGF is a graphical front-end for cuneiform and tesseract OCR tools.
+ With YAGF you can open already scanned image files or obtain new images
+ via XSane (scanning results are automatically passed to YAGF).
+ Once you have a scanned image you can prepare it for recognition, select
+ particular image areas for recognition, set the recognition language and
+ so no. Recognized text is displayed in a editor window where it can be
+ corrected, saved to disk or copied to clipboard.
+ YAGF also provides some facilities for a multi-page recognition (see
+ the online help for more details).
+ </longdescription>
+ <use>
+ <flag name="cuneiform">Enable support for the <pkg>app-text/cuneiform</pkg> OCR engine.</flag>
+ <flag name="tesseract">Enable support for the <pkg>app-text/tesseract</pkg> OCR engine.</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-text/yagf/yagf-0.9.5.ebuild b/app-text/yagf/yagf-0.9.5.ebuild
new file mode 100644
index 00000000..4ab72881
--- /dev/null
+++ b/app-text/yagf/yagf-0.9.5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PLOCALES="fr ru"
+inherit cmake-utils l10n multilib
+
+DESCRIPTION="Graphical front-end for cuneiform and tesseract OCR tools"
+HOMEPAGE="http://sourceforge.net/projects/yagf-ocr/"
+SRC_URI="mirror://sourceforge/project/yagf-ocr/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="scanner cuneiform +tesseract pdf"
+
+REQUIRED_USE="|| ( cuneiform tesseract )"
+
+DEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ app-text/aspell
+"
+RDEPEND="${DEPEND}
+ cuneiform? ( app-text/cuneiform )
+ tesseract? ( app-text/tesseract )
+ scanner? ( media-gfx/xsane )
+ pdf? ( || ( app-text/poppler[utils] app-text/ghostscript-gpl ) )
+"
+
+DOCS=( AUTHORS ChangeLog DESCRIPTION README )
+
+src_prepare() {
+ # uk translation generation is broken
+ rm src/translations/yagf_uk.ts || die
+ # respect CFLAGS and fix translations path
+ sed -i \
+ -e '/add_definitions(-Wall -g)/d' \
+ -e '/-DQML_INSTALL_PATH=/s:${QML_DESTINATION}:/${QML_DESTINATION}:' \
+ CMakeLists.txt || die 'sed on CMakeLists.txt failed'
+
+ l10n_find_plocales_changes "src/translations" "${PN}_" '.ts'
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local libdir="$(get_libdir)"
+ local mycmakeargs=(
+ -DLIB_PATH_SUFFIX=${libdir#lib}
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ remove_translation() {
+ rm "${ED}/usr/share/yagf/translations/${PN}_${1}.qm" || die "remove '${PN}_${1}.qm' file failed"
+ }
+ cmake-utils_src_install
+ l10n_for_each_disabled_locale_do remove_translation
+}