From 39a27340d9f60fd4b1b88f4c549434ef83c63afd Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sun, 23 Aug 2020 23:21:07 +0200 Subject: 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 --- app-text/yagf/Manifest | 1 + app-text/yagf/metadata.xml | 20 ++++++++++++++ app-text/yagf/yagf-0.9.5.ebuild | 61 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 app-text/yagf/Manifest create mode 100644 app-text/yagf/metadata.xml create mode 100644 app-text/yagf/yagf-0.9.5.ebuild (limited to 'app-text') 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 @@ + + + + + + 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). + + + Enable support for the app-text/cuneiform OCR engine. + Enable support for the app-text/tesseract OCR engine. + + 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 +} -- cgit v1.2.3-65-gdbad