debian/0000755000000000000000000000000012161675701007174 5ustar debian/rules0000755000000000000000000000503212161675341010254 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif # shared library versions, option 1 version=2.0.5 major=2 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so #version=`ls src/.libs/lib*.so.* | \ # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` #major=`ls src/.libs/lib*.so.* | \ # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` config.status: configure dh_testdir # Add here commands to configure the package. dh_autoreconf CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: config.status dh_testdir # Add here commands to compile the package. $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) distclean dh_autoreconf_clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/tmp $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp cp -p debian/hocr-gtk.xpm debian/tmp/usr/share/pixmaps/ # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs dh_installexamples dh_install dh_installmenu dh_python2 --no-guessing-versions dh_installman dh_link dh_strip dh_compress dh_fixperms dh_perl dh_makeshlibs -V dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/source/0000755000000000000000000000000012161675700010473 5ustar debian/source/format0000644000000000000000000000001411616072141011673 0ustar 3.0 (quilt) debian/libhocr-dev.dirs0000644000000000000000000000002410434635273012252 0ustar usr/lib usr/include debian/compat0000644000000000000000000000000211616072142010364 0ustar 7 debian/patches/0000755000000000000000000000000012161675700010622 5ustar debian/patches/no-scanner.patch0000644000000000000000000000570111616072141013703 0ustar Description: Pop up a message when no scanner is present This is instead of exiting/failing with an exception. Author: Oron Peled Origin: https://bugzilla.redhat.com/show_bug.cgi?id=574259 --- a/examples/hocr-gtk/sane-pygtk +++ b/examples/hocr-gtk/sane-pygtk @@ -39,14 +39,14 @@ # set gettext support locale_dir = '/usr/share/locale' -try: - import locale - import gettext - locale.setlocale(locale.LC_ALL, "") - gtk.glade.bindtextdomain(app_name, locale_dir) - gettext.install(app_name, locale_dir, unicode=1) +try: + import locale + import gettext + locale.setlocale(locale.LC_ALL, "") + gtk.glade.bindtextdomain(app_name, locale_dir) + gettext.install(app_name, locale_dir, unicode=1) except (IOError,locale.Error), e: - print "WARNING: Can't load locale" + print "WARNING: Can't load locale" _ = lambda x : x # set global functions @@ -152,7 +152,6 @@ # get scanners in system self.sane_devices = sane.get_devices() - self.sane_devices_counter = len(self.sane_devices) # set the scanners combobox for device in self.sane_devices: @@ -205,13 +204,22 @@ dialog.destroy() - def button_preview_clicked_cb(self, obj): - "button_preview_clicked_cb activated" - + def open_scanner(self): + if len(self.sane_devices) <= 0: + show_error_message(_("No scanners reported by sane")) + raise RuntimeError("No scanners reported by sane\nRecheck your sane configuration") # open scanner scanner_number = self.config.getint('settings', 'scanner') - 1 + if scanner_number < 0 or scanner_number >= len(self.sane_devices): + show_error_message(_("Bad scanner number %d configured.\nPlease select a valid scanner from the list") % scanner_number) + raise RuntimeError("Invalid scanner %d" % scanner_number) scanner = sane.open(self.sane_devices[scanner_number][0]) - + return scanner + + def button_preview_clicked_cb(self, obj): + "button_preview_clicked_cb activated" + # open scanner + scanner = self.open_scanner() # options options = get_scanner_option (scanner, 'mode') if options: @@ -278,9 +286,7 @@ def button_scan_clicked_cb(self, obj): "button_scan_clicked_cb activated" # open scanner - scanner_number = self.config.getint('settings', 'scanner') - 1 - scanner = sane.open(self.sane_devices[scanner_number][0]) - + scanner = self.open_scanner() # options options = get_scanner_option (scanner, 'mode') if options: @@ -529,7 +535,7 @@ # reset settings options if scanner_number < len(self.sane_devices): try: - scanner = sane.open(self.sane_devices[scanner_number][0]) + scanner = self.open_scanner() # if scanner exist fill in all the settings debian/patches/sane-pygtk-desktop-icon.patch0000644000000000000000000000072311616072141016316 0ustar Description: Patch to fix sane-pygtk's icon in the desktop file Author: Lior Kaplan --- a/examples/hocr-gtk/sane-pygtk.desktop +++ b/examples/hocr-gtk/sane-pygtk.desktop @@ -7,7 +7,7 @@ Comment[fr]=Un programme d'acquisition d'images pour votre scanner. Comment[he]=תכנית בסיסית לשימוש בסורק. Exec=sane-pygtk -Icon=sane +Icon=scanner Terminal=false Type=Application Categories=GTK;Graphics;RasterGraphics;Scanning;OCR; debian/patches/manpage-whatis.patch0000644000000000000000000000067611616072141014553 0ustar Description: Patch to fix lintian warning manpage-has-bad-whatis-entry Author: Lior Kaplan --- a/docs/man/man1/hocr.1 +++ b/docs/man/man1/hocr.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH HOCR "1" "February 2008" "hocr - Hebrew OCR utility" "User Commands" .SH NAME -hocr \- manual page for hocr - Hebrew OCR utility +hocr \- Hebrew OCR utility .SH DESCRIPTION .SS "Usage:" .IP debian/patches/missing-includes.patch0000644000000000000000000000102411616072141015107 0ustar Description: Add some missing include statements Author: Oron Peled Origin: Fedora Project --- a/src/ho_recognize.c +++ b/src/ho_recognize.c @@ -41,6 +41,7 @@ #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" +#include "ho_linguistics.h" #include "fonts/ho_recognize_font_1.h" #include "fonts/ho_recognize_font_2.h" --- a/src/ho_segment.c +++ b/src/ho_segment.c @@ -39,6 +39,7 @@ #include "ho_bitmap.h" #include "ho_objmap.h" +#include "ho_dimentions.h" #include "ho_segment.h" debian/patches/series0000644000000000000000000000013311616072141012026 0ustar missing-includes.patch no-scanner.patch manpage-whatis.patch sane-pygtk-desktop-icon.patch debian/hocr-gtk.xpm0000644000000000000000000001233011616072142011431 0ustar /* XPM */ static char * hocr_gtk_xpm[] = { "24 24 252 2", " c None", ". c #000000", "+ c #181818", "@ c #2F2E2C", "# c #3A3835", "$ c #44423F", "% c #4D4C49", "& c #54524F", "* c #53524F", "= c #575653", "- c #565451", "; c #646362", "> c #959494", ", c #B1B1B1", "' c #747270", ") c #002360", "! c #00307E", "~ c #002F7D", "{ c #002E7C", "] c #002C7B", "^ c #204B8F", "/ c #19458B", "( c #A1B1CC", "_ c #DBE1EA", ": c #F3F5F8", "< c #FFFFFF", "[ c #85837F", "} c #013485", "| c #084BB2", "1 c #084BB3", "2 c #074BB5", "3 c #1E4D94", "4 c #1D4B91", "5 c #2E5CA3", "6 c #225DBB", "7 c #9FB7DA", "8 c #D9E1ED", "9 c #C2C4C7", "0 c #C2C2C1", "a c #D2D2D2", "b c #FBFBFB", "c c #F9F9F9", "d c #93918E", "e c #09357A", "f c #134CA9", "g c #124CA7", "h c #124AA5", "i c #193158", "j c #17253E", "k c #233450", "l c #2C60B2", "m c #98ABCC", "n c #C8CFDA", "o c #646667", "p c #4E4D4D", "q c #767676", "r c #D4D4D4", "s c #E4E4E4", "t c #DEDEDE", "u c #ECECEC", "v c #050505", "w c #969592", "x c #17458F", "y c #1F58B3", "z c #1D52A7", "A c #1C50A3", "B c #1E417B", "C c #19283E", "D c #212E42", "E c #3463AF", "F c #9AAECB", "G c #BEC5CF", "H c #626465", "I c #4E4E4E", "J c #757575", "K c #E2E2E2", "L c #D8D8D8", "M c #E0E0E0", "N c #121212", "O c #999795", "P c #1E4786", "Q c #204B8D", "R c #2556A1", "S c #25549F", "T c #264E8A", "U c #1C293C", "V c #232D3D", "W c #365A91", "X c #8B9BB4", "Y c #BFC5CF", "Z c #585959", "` c #4B4B4B", " . c #747474", ".. c #CDCDCD", "+. c #CBCBCB", "@. c #C4C4C4", "#. c #1F1F1F", "$. c #9E9C99", "%. c #2F5A9C", "&. c #3C74CC", "*. c #3C74CB", "=. c #3B74CB", "-. c #3A72C8", ";. c #1F2A3C", ">. c #283447", ",. c #35517D", "'. c #A3B5D0", "). c #C7CDD6", "!. c #626264", "~. c #525252", "{. c #E5E5E5", "]. c #D6D6D6", "^. c #E1E1E1", "/. c #2B2B2B", "(. c #A19F9D", "_. c #3B62A1", ":. c #487BCE", "<. c #3E6CB4", "[. c #406EB7", "}. c #3E6BB3", "|. c #2A3A54", "1. c #2B3546", "2. c #2F405C", "3. c #A0B0CC", "4. c #BBC0C8", "5. c #5E5F60", "6. c #7A7A7A", "7. c #DADADA", "8. c #CCCCCC", "9. c #EAEAEA", "0. c #282828", "a. c #A5A4A2", "b. c #456AA5", "c. c #4F7BC3", "d. c #4D78BE", "e. c #4870B1", "f. c #476FB1", "g. c #374E75", "h. c #2C3544", "i. c #293344", "j. c #94A3BA", "k. c #BCC1C9", "l. c #5D5E5F", "m. c #6B6B6B", "n. c #CFCFCF", "o. c #C7C7C7", "p. c #CACACA", "q. c #202020", "r. c #AAA8A6", "s. c #4C70A7", "t. c #5F8CD2", "u. c #5983C4", "v. c #5279B7", "w. c #5178B4", "x. c #46638F", "y. c #2D3543", "z. c #2A3443", "A. c #8E9AAE", "B. c #C9CED3", "C. c #474748", "D. c #4C4C4C", "E. c #808080", "F. c #B0AEAC", "G. c #496693", "H. c #6289C4", "I. c #6187C1", "J. c #6188C2", "K. c #6087C1", "L. c #6085BD", "M. c #313A47", "N. c #303846", "O. c #868D98", "P. c #707275", "Q. c #4A4A4A", "R. c #A9A9A9", "S. c #DBDBDB", "T. c #DDDDDD", "U. c #080808", "V. c #B3B1B0", "W. c #5878A9", "X. c #779FE0", "Y. c #84AAE6", "Z. c #8EAFE5", "`. c #7F99C4", " + c #384050", ".+ c #374050", "++ c #42464C", "@+ c #4D4D50", "#+ c #4B4B4C", "$+ c #898989", "%+ c #E9E9E9", "&+ c #D7D7D7", "*+ c #C6C6C6", "=+ c #D9D9D9", "-+ c #AFAEAC", ";+ c #5574A5", ">+ c #779FDF", ",+ c #566E92", "'+ c #2F3948", ")+ c #313B4C", "!+ c #36404F", "~+ c #313B4D", "{+ c #3B3F46", "]+ c #57595D", "^+ c #A7A8AA", "/+ c #E6E6E6", "(+ c #9C9A99", "_+ c #4A6795", ":+ c #6A90CC", "<+ c #6A91CE", "[+ c #42587A", "}+ c #233044", "|+ c #293A55", "1+ c #445876", "2+ c #57719A", "3+ c #A6B3C7", "4+ c #D2D8DF", "5+ c #D8D9DC", "6+ c #E3E3E3", "7+ c #414142", "8+ c #484744", "9+ c #595754", "0+ c #6B6966", "a+ c #6F6E6C", "b+ c #848382", "c+ c #8E8D8B", "d+ c #989794", "e+ c #9B9996", "f+ c #BBBBB9", "g+ c #CBCBCA", "h+ c #191919", "i+ c #3A3A3A", "j+ c #B0B0B0", "k+ c #C3C3C3", "l+ c #CECECE", "m+ c #B4B4B4", "n+ c #C0C0C0", "o+ c #373737", "p+ c #626262", "q+ c #848484", "r+ c #696969", "s+ c #5A5A5A", "t+ c #535353", "u+ c #454545", "v+ c #989898", "w+ c #A8A8A8", "x+ c #969696", "y+ c #2A2A2A", "z+ c #666666", "A+ c #7B7B7B", "B+ c #777777", "C+ c #2E2E2E", " ", " . + @ # $ % & * = - ; > , ", " . ' ) ! ~ ~ { ] ^ / ( _ : < < < < < < ", " . [ } | 1 2 3 4 5 6 7 8 9 0 a b c c < ", " . d e f g h i j k l m n o p q r s t u ", " v w x y z A B C D E F G H I J t K L M ", " N O P Q R S T U V W X Y Z ` ...+.@.a ", " #.$.%.&.*.=.-.;.>.,.'.).!.~. .{.].^.s ", " /.(._.:.<.[.}.|.1.2.3.4.5.` 6.7.L 8.9. ", " 0.a.b.c.d.e.f.g.h.i.j.k.l.` m.n.o.p.L ", " q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.r o.o.a ", " + F.G.H.I.J.K.L.M.N.O.P.Q.Q.R.8.S.r T. ", " U.V.W.X.X.Y.Z.`. +.+++@+#+$+%+&+8.*+=+ ", " . -+;+>+X.,+'+)+!+~+{+]+^+/+^.^.^.^./+ ", " . (+_+:+<+[+}+|+1+2+3+4+5+t t t t t 6+ ", " . 7+8+9+0+a+b+c+d+e+f+g+a ].].].].].S. ", " . . . . h+i+j+k++.l+l+l+l+l+a ", " Q.m+n+o.p.p.p.p.p.l+ ", " o+p+q+r+s+t+ ", " u+v+w+x+u+ ", " . y+z+A+B+C+N . ", " . . . . . . . ", " ", " "}; debian/changelog0000644000000000000000000000643212161675417011057 0ustar hocr (0.10.17-2) unstable; urgency=low [ Lior Kaplan ] * python-glade2 dependency missing for hocr-gtk (LP: #981802) * Update build dependency from libtiff4-dev to libtiff5-dev [ Daniel Schepler ] * Update libtool at build time using dh-autoreconf, in order to fix a build failure on x32 (Closes: #702058) -- Lior Kaplan Mon, 24 Jun 2013 01:43:41 +0300 hocr (0.10.17-1) unstable; urgency=low * The DebConf11 upload * New upstream release (LP: #199951) - Doesn't support the perl bindings. Dropping libhocr-perl. * Switch to dpkg-source 3.0 (quilt) format * Migrate from dh_pycentral to dh_python2 (Closes: #616843) -- Lior Kaplan Tue, 26 Jul 2011 23:26:49 +0200 hocr (0.8.2-7) unstable; urgency=low * Update Standards-Version to 3.9.1 - Dropped .la from -dev package per policy 10.2 (Closes: #620764) * Fix Lintian's errors and warnings (Closes: #476315) -- Lior Kaplan Tue, 05 Apr 2011 01:17:10 +0300 hocr (0.8.2-6.1) unstable; urgency=low * Non-maintainer upload. * Add ${shlib:Depends} to debian/control for libhocr-perl and libhocr-python to fix the missing library depends (e.g. on libc) (Closes: #553214, #553215) -- Patrick Schoenfeld Fri, 22 Jan 2010 17:06:50 +0100 hocr (0.8.2-6) unstable; urgency=low * Move Homepage from description to control field * Add Vcs-* fields * Do not ignore errors of make distclean * Update Standards-Version to 3.7.3, no changes needed -- Baruch Even Sat, 29 Dec 2007 17:52:56 +0200 hocr (0.8.2-5) unstable; urgency=low * Change menu according to the new menu policy, s/Apps/Applications/ -- Baruch Even Thu, 05 Jul 2007 08:59:31 +0300 hocr (0.8.2-4) unstable; urgency=low * Update debian/control so packages are binNMU safe. See http://wiki.debian.org/binNMU for more info. -- Lior Kaplan Fri, 22 Jun 2007 11:28:17 +0100 hocr (0.8.2-3) unstable; urgency=low [ Lior Kaplan ] * Fix typo in libhocr-perl description (Closes: #405646) [ Baruch Even ] * Upgrade dependency on python-central to >= 0.5 (Closes: #427281) -- Baruch Even Sun, 03 Jun 2007 02:28:13 +0300 hocr (0.8.2-2) unstable; urgency=low * Comply with the new Python policy. -- Lior Kaplan Wed, 5 Jul 2006 20:51:32 +0300 hocr (0.8.2-1) unstable; urgency=low * New upstream release - Adds Swedish translation to hocr-gtk (Closes: #349735) * debian/control: upgrade to standards version to 3.7.2.0 (no changes needed) * debian/menu: add menu icon to hocr-gtk -- Lior Kaplan Sun, 21 May 2006 01:02:51 -0500 hocr (0.8-1) unstable; urgency=low * New upstream release -- Baruch Even Sun, 15 Jan 2006 21:19:01 +0000 hocr (0.7.1-2) unstable; urgency=low * Add bindings for Python & Perl. * Add hocr-gtk to the Debian menu. -- Lior Kaplan Sat, 7 Jan 2006 11:53:40 +0200 hocr (0.7.1-1) unstable; urgency=low * New upstream release -- Lior Kaplan Tue, 3 Jan 2006 21:11:03 +0200 hocr (0.4.6-1) unstable; urgency=low * Initial release. Closes: #325342 -- Lior Kaplan Fri, 2 Dec 2005 15:30:45 +0200 debian/hocr-gtk.dirs0000644000000000000000000000010210434635273011567 0ustar usr/bin usr/share/applications usr/share/pixmaps usr/share/locale debian/libhocr-dev.install0000644000000000000000000000010111616072142012744 0ustar usr/include/* usr/lib/lib*.a usr/lib/lib*.so usr/lib/pkgconfig/* debian/libhocr0.dirs0000644000000000000000000000002010434635273011552 0ustar usr/lib usr/bin debian/libhocr-python.install0000644000000000000000000000002311616072142013512 0ustar /usr/lib/python*/* debian/hocr-gtk.menu0000644000000000000000000000022610643727006011577 0ustar ?package(hocr-gtk):needs="X11" section="Applications/Text"\ title="hocr-gtk" command="/usr/bin/hocr-gtk" \ icon="/usr/share/pixmaps/hocr-gtk.xpm" debian/control0000644000000000000000000000371412161675370010606 0ustar Source: hocr Priority: optional Maintainer: Debian Hebrew Packaging Team Uploaders: Baruch Even , Lior Kaplan , Shachar Shemesh , Tzafrir Cohen Build-Depends: debhelper (>= 5.0.37.2), libgtkspell-dev, libgtk2.0-dev, gettext, swig, python-dev (>= 2.6.6-3~), libfftw3-dev, libtiff5-dev, dh-autoreconf Standards-Version: 3.9.4 Section: libs Vcs-Svn: svn://svn.debian.org/svn/debian-hebrew/pkg/hocr Vcs-Browser: http://svn.debian.org/wsvn/debian-hebrew/pkg/hocr Homepage: http://hocr.berlios.de/ Package: libhocr-dev Section: libdevel Architecture: any Depends: libhocr0 (= ${binary:Version}), ${misc:Depends} Description: Developemnt files for hocr library Libhocr is an Hebrew OCR (Optical character recognition) library written in C/C++. . This package contains headers and support files required to build new applications with libhocr. Package: libhocr0 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: netpbm Description: Hebrew OCR library Libhocr is an Hebrew OCR (Optical character recognition) library written in C/C++. . This package contains the libhocr library and the hocr command line utility, which can process PBM file formats Package: hocr-gtk Section: graphics Architecture: all Depends: ${python:Depends}, libhocr-python (>= ${source:Version}), python-glade2, python-imaging-sane, aspell-he, ${misc:Depends} Description: GTK+ frontend for Hebrew OCR Hocr-gtk is a GTK+ based graphical interface to the libhocr library. It can open multiple image formats and uses aspell for internal spell checking. Package: libhocr-python Section: python Architecture: any Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} Description: Hebrew OCR library Python bindings Libhocr is an Hebrew OCR (Optical character recognition) library written in C/C++. . This package contains Python bindings to libhocr. debian/hocr-gtk.install0000644000000000000000000000021611616072142012273 0ustar usr/bin/hocr-gtk usr/bin/sane-pygtk usr/share/applications/* usr/share/hocr-gtk/ usr/share/locale/* usr/share/pixmaps/* usr/share/sane-pygtk/ debian/libhocr0.install0000644000000000000000000000007111616072142012256 0ustar usr/lib/lib*.so.* usr/share/man/man1/hocr.1 usr/bin/hocr debian/copyright0000644000000000000000000000205311546430550011124 0ustar This package was debianized by Lior Kaplan on Fri, 2 Dec 2005 15:30:45 +0200. It was downloaded from http://hocr.berlios.de/ Copyright Holder: Copyright 2005 Yaacov Zamir License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. debian/watch0000644000000000000000000000007412161671334010224 0ustar version=3 http://sf.net/hocr.berlios/libhocr-(.+)\.tar\.gz