From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-text/clara/Manifest | 8 ++ app-text/clara/clara-20031214-r1.ebuild | 54 +++++++++++++ app-text/clara/clara-20031214.ebuild | 53 +++++++++++++ .../clara/files/clara-20031214-debian-vararg.patch | 90 ++++++++++++++++++++++ app-text/clara/files/clara_open_mode.patch | 20 +++++ app-text/clara/metadata.xml | 5 ++ 6 files changed, 230 insertions(+) create mode 100644 app-text/clara/Manifest create mode 100644 app-text/clara/clara-20031214-r1.ebuild create mode 100644 app-text/clara/clara-20031214.ebuild create mode 100644 app-text/clara/files/clara-20031214-debian-vararg.patch create mode 100644 app-text/clara/files/clara_open_mode.patch create mode 100644 app-text/clara/metadata.xml (limited to 'app-text/clara') diff --git a/app-text/clara/Manifest b/app-text/clara/Manifest new file mode 100644 index 000000000000..04d8a2d31745 --- /dev/null +++ b/app-text/clara/Manifest @@ -0,0 +1,8 @@ +AUX clara-20031214-debian-vararg.patch 1768 SHA256 182f119de487727fb853a03f215f85d527a56d6a0d79cbdca767f42bff64b153 SHA512 3ec7c2bb9a11721c670ac1f74f2038f0909d0282392381be8c2bb2b9fd564b32dc94b56ab9458d95a63bf701816729610501e8cea2ca9088f64db62f560611bb WHIRLPOOL 19b3542b889a7724dd0aefd52b97a332c6cbd8e162a47f970f808c6af1932405ed66cc742b3ef08c9a2dba8bfb9f2ac3646244a7e6705b0bedc859195cc6c329 +AUX clara_open_mode.patch 567 SHA256 644267ddd9e8ade43ea90a49e008a2544e73c78e9eb885a88fb37ae0ac3b9222 SHA512 787972048c6ddcea4727b72a0b327486349876de2978358fcc4386010d5f43415e6573bf01d4c48ad747195718186954403ddae63a09f1bf5471995b17d27b34 WHIRLPOOL b8ac53f7f7c7edef04c2fecdb85776362c4f4e03d1bf02a07a5f70eee41efb266ad43a1487d9fad613a72dd3a89bb24cb99721f5c1d1f6a303b52ae137bed804 +DIST clara-20031214.tar.gz 451539 SHA256 baae846923004ac1b5b91f73057d5faf042eb499434e163b7ab6db88410bbce1 SHA512 260d710132a3903d71b6c4c0885ac1709b60d520861e3dcd5e4b75a3bf5627549c94423670be08245e7a9db6a870a93a9526c8d318fadaddcce00cbf02985f49 WHIRLPOOL 19d229f9e4f391eb7e40d93799467a44de23dc202be012265c6580d08a55f2a4c2fac59323df1ee61798435b763aa0cf73e8425da02cc34cd9009eececadddb6 +EBUILD clara-20031214-r1.ebuild 1262 SHA256 fe8da18a3a214cec0dbebbd86ff5a2956e9a93129d0ce961e31667ef1e33b621 SHA512 499a121d78c780e025ba45b9f56e1e8b8c16d7776ec2b21b1bd1af5b60b4c1526f5bd443c19ea697c12d5c7d519e902a17a15756c3d42f1cbe2972c49773335b WHIRLPOOL 7b02e6c11bf28fa4e7ba22d31f5cd60e0945dc08b891e4fe27f8b84e68d4b27896550894c8a9b995934d7a7944573b8f867937bf2b1774d6ebf9189406019180 +EBUILD clara-20031214.ebuild 1237 SHA256 138343f1357d16e0c4c8f51eb152d3bf9b85b398986f3923e99ad8f0e642fef5 SHA512 64b71ffa2203dbe8a579796787f1cdcf3c24576f2c4d59d710666c115d7c0c97bbe9a2dee3731900209d8158d5d729d01d3e1e720674f3af1cf40b3bdb05365e WHIRLPOOL cd820bca206a7bbe1d49cf05490ed262bd7adc9ca3e40fe54a0a050eb813db8b7d355bddf3cae39eeecd745cbe26617d12e18b0b535464a4160f30c0887d6048 +MISC ChangeLog 2866 SHA256 73a2e764527ded26f870550371f17ea3910d3d06d29647d39803e869dd13eb16 SHA512 09242a4fca1a071714f3f227eb46c46e03193ef652850296ae33f3ece3c7176466c3ae8576711fb5339c791d23ae84bfb58a3e4a75789e050afea6d88dbaf128 WHIRLPOOL 7b3588c75b8152162680bc74dbe735c21145db4812dfaa34c6ceef55b4010c5f27703ba60e97f96de640b62444d73edb21f9861d60a47b9515722033e89f18f6 +MISC ChangeLog-2015 2769 SHA256 2717a662efc46931474aa90626f89997bb0f0067d3796eff4427030ffa7e320a SHA512 55c750759e0146f8709f81120437f92f495377b633c3bd82bfcde57dcc9a7773787000f757435f38963c0f8fdae3d914e82d1ef98e7ac386813ad2ed20f2123b WHIRLPOOL 7f7b1a6c3e588e62041dd97a24957eca080cefc3d29c5477b0fa77dafa7785780aab7f8d747c5ffe771e85d1bacfdde7ada59bd727d64493978abad14b05fe27 +MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968 diff --git a/app-text/clara/clara-20031214-r1.ebuild b/app-text/clara/clara-20031214-r1.ebuild new file mode 100644 index 000000000000..758415dfd6af --- /dev/null +++ b/app-text/clara/clara-20031214-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="An OCR (Optical Character Recognition) program" +SRC_URI="mirror://gentoo/${P}.tar.gz" +HOMEPAGE="http://www.claraocr.org/" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~x86 ~ppc-macos ~sparc-solaris" +IUSE="" + +RDEPEND="x11-libs/libX11" +DEPEND="${RDEPEND}" + +# The test provided by clara doesn't seem to make any sense. It just +# calls the binary with an unsupported option, which results in an +# error. +RESTRICT="test" + +src_prepare() { + sed -i -re "s/(C|LD)FLAGS =/\1FLAGS +=/" Makefile + epatch "${FILESDIR}/${PN}_open_mode.patch" + epatch "${FILESDIR}/${P}-debian-vararg.patch" +} + +src_compile() { + emake CC="$(tc-getCC)" || die + emake doc || die +} + +src_install() { + dobin ${PN} selthresh + doman doc/${PN}*.1 selthresh.1 + + dodoc ANNOUNCE CHANGELOG doc/FAQ + insinto /usr/share/doc/${P} + doins imre.pbm + + dohtml doc/*.html +} + +pkg_postinst() { + elog + elog "Please note that Clara OCR has to be trained to recognize text," + elog "without a training session it simply won't work. Have a look at" + elog "the docs in /usr/share/doc/${P}/html/ to get more " + elog "info about the training procedure." + elog +} diff --git a/app-text/clara/clara-20031214.ebuild b/app-text/clara/clara-20031214.ebuild new file mode 100644 index 000000000000..e4243a261efe --- /dev/null +++ b/app-text/clara/clara-20031214.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils toolchain-funcs + +DESCRIPTION="An OCR (Optical Character Recognition) program" +SRC_URI="mirror://gentoo/clara-20031214.tar.gz" +HOMEPAGE="http://www.claraocr.org/" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 ppc x86 ~ppc-macos ~sparc-solaris" +IUSE="" + +RDEPEND="x11-libs/libX11" +DEPEND="${RDEPEND}" + +# The test provided by clara doesn't seem to make any sense. It just +# calls the binary with an unsupported option, which results in an +# error. +RESTRICT="test" + +src_unpack() { + unpack ${A} + cd "${S}" + sed -i -re "s/(C|LD)FLAGS =/\1FLAGS +=/" Makefile + epatch "${FILESDIR}/clara_open_mode.patch" +} + +src_compile() { + emake CC="$(tc-getCC)" || die + emake doc || die +} + +src_install() { + dobin clara selthresh + doman doc/clara*.1 selthresh.1 + + dodoc ANNOUNCE CHANGELOG doc/FAQ + insinto /usr/share/doc/${P} + doins imre.pbm + + dohtml doc/*.html +} + +pkg_postinst() { + elog + elog "Please note that Clara OCR has to be trained to recognize text," + elog "without a training session it simply won't work. Have a look at" + elog "the docs in /usr/share/doc/${P}/html/ to get more " + elog "info about the training procedure." + elog +} diff --git a/app-text/clara/files/clara-20031214-debian-vararg.patch b/app-text/clara/files/clara-20031214-debian-vararg.patch new file mode 100644 index 000000000000..570bc4018993 --- /dev/null +++ b/app-text/clara/files/clara-20031214-debian-vararg.patch @@ -0,0 +1,90 @@ +--- clara-20031214.orig/clara.c ++++ clara-20031214/clara.c +@@ -751,11 +751,12 @@ + s[128] = 0; + logmsg(s); + +- if (!trace) +- return; +- va_start(args,m); +- vfprintf(stderr,m,args); +- fprintf(stderr,"\n"); ++ if (trace) { ++ vfprintf(stderr,m,args); ++ fprintf(stderr,"\n"); ++ } ++ ++ va_end(args); + } + + /* +@@ -775,10 +776,12 @@ + logmsg(s); + + /* send to stderr if requested */ +- if (!debug) +- return; +- vfprintf(stderr,m,args); +- fprintf(stderr,"\n"); ++ if (debug) { ++ vfprintf(stderr,m,args); ++ fprintf(stderr,"\n"); ++ } ++ ++ va_end(args); + } + + /* +@@ -797,9 +800,10 @@ + s[128] = 0; + logmsg(s); + +- va_start(args,m); + vfprintf(stderr,m,args); + fprintf(stderr,"\n"); ++ ++ va_end(args); + } + + /* (devel) +--- clara-20031214.orig/event.c ++++ clara-20031214/event.c +@@ -638,6 +638,8 @@ + } + } + ++ va_end(args); ++ + /* + printf("request (priority %d, mclip=%d, redraw=%d) to draw the message \"%s\"\n",f,mclip,redraw_stline,s); + */ +--- clara-20031214.orig/html.c ++++ clara-20031214/html.c +@@ -1548,11 +1548,12 @@ + va_list args; + int n=0,f; + +- va_start(args, fmt); + for (f=0; f==0; ) { + + /* try to write */ ++ va_start(args, fmt); + n = vsnprintf(*t+*top+1,*sz-*top-1,fmt,args); ++ va_end(args); + + /* + Some implementations of vsnprintf return -1 when +@@ -1589,11 +1590,12 @@ + va_list args; + int n=0,f; + +- va_start(args, fmt); + for (f=0; f==0; ) { + + /* try to write */ ++ va_start(args, fmt); + n = vsnprintf(text+topt+1,textsz-topt-1,fmt,args); ++ va_end(args); + + /* + Some implementations of vsnprintf return -1 when diff --git a/app-text/clara/files/clara_open_mode.patch b/app-text/clara/files/clara_open_mode.patch new file mode 100644 index 000000000000..3f73f466ab8c --- /dev/null +++ b/app-text/clara/files/clara_open_mode.patch @@ -0,0 +1,20 @@ +--- pgmblock.c 2002-04-29 14:26:13.000000000 +0000 ++++ pgmblock.c 2009-03-05 02:51:43.000000000 +0000 +@@ -161,7 +161,7 @@ + + printf("%d rare pixels (%1.4f)\n",t,((float)t)/(w*h)); + +- F = open("map",O_WRONLY|O_CREAT); ++ F = open("map",O_WRONLY|O_CREAT, 0644); + write(F,m,h*bpl); + write(F,map,256); + close(F); +@@ -197,7 +197,7 @@ + { + int i,j,F; + +- F = open("map",O_RDONLY|O_CREAT); ++ F = open("map",O_RDONLY|O_CREAT, 0644); + read(F,m,h*bpl); + read(F,map,256); + close(F); diff --git a/app-text/clara/metadata.xml b/app-text/clara/metadata.xml new file mode 100644 index 000000000000..6f49eba8f496 --- /dev/null +++ b/app-text/clara/metadata.xml @@ -0,0 +1,5 @@ + + + + + -- cgit v1.2.3