[arch-commits] Commit in ocrad/trunk (PKGBUILD ocrad-0.17-gcc43.patch ocrad.install)

Eric Bélanger eric at archlinux.org
Thu Apr 16 02:10:22 EDT 2009


    Date: Thursday, April 16, 2009 @ 02:10:22
  Author: eric
Revision: 35716

upgpkg: ocrad 0.17-2
    Added info page, Added man page, Added gcc 4.3 build patch

Added:
  ocrad/trunk/ocrad-0.17-gcc43.patch
  ocrad/trunk/ocrad.install
Modified:
  ocrad/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   19 +++++---
 ocrad-0.17-gcc43.patch |  101 +++++++++++++++++++++++++++++++++++++++++++++++
 ocrad.install          |   20 +++++++++
 3 files changed, 132 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-04-16 03:28:17 UTC (rev 35715)
+++ PKGBUILD	2009-04-16 06:10:22 UTC (rev 35716)
@@ -3,19 +3,22 @@
 
 pkgname=ocrad
 pkgver=0.17
-pkgrel=1
+pkgrel=2
 pkgdesc="OCR (Optical Character Recognition) program implemented as a filter and based on a feature extraction method"
 arch=("i686" "x86_64")
 url="http://www.gnu.org/software/ocrad/ocrad.html"
 license=('GPL3')
-depends=('gcc-libs')
-source=("http://ftp.gnu.org/gnu/ocrad/ocrad-$pkgver.tar.bz2")
-md5sums=('687c213b3334d5a6c2dcef97805c5882')
+depends=('gcc-libs' 'texinfo')
+install=ocrad.install
+source=("http://ftp.gnu.org/gnu/ocrad/ocrad-$pkgver.tar.bz2" ocrad-0.17-gcc43.patch)
+md5sums=('687c213b3334d5a6c2dcef97805c5882' 'ad9773c0582cccc6e36ffaef0090d046')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
-  ./configure --prefix=/usr
+  cd $srcdir/$pkgname-$pkgver
+  patch -p1 < ../ocrad-0.17-gcc43.patch || return 1
+  ./configure --prefix=/usr || return 1
   make || return 1
-  make prefix=$startdir/pkg/usr install
+  make DESTDIR=$pkgdir install install-man || return 1
+  rm $pkgdir/usr/share/info/dir
+  gzip $pkgdir/usr/share/info/*
 }
-

Added: ocrad-0.17-gcc43.patch
===================================================================
--- ocrad-0.17-gcc43.patch	                        (rev 0)
+++ ocrad-0.17-gcc43.patch	2009-04-16 06:10:22 UTC (rev 35716)
@@ -0,0 +1,101 @@
+diff -up ocrad-0.17/textblock.cc.gcc43 ocrad-0.17/textblock.cc
+--- ocrad-0.17/textblock.cc.gcc43	2007-06-29 14:29:13.000000000 +0200
++++ ocrad-0.17/textblock.cc	2008-02-19 19:36:25.000000000 +0100
+@@ -18,6 +18,7 @@
+ #include <algorithm>
+ #include <cstdio>
+ #include <vector>
++#include <string>
+ 
+ #include "common.h"
+ #include "rational.h"
+diff -up ocrad-0.17/page_image_layout.cc.gcc43 ocrad-0.17/page_image_layout.cc
+--- ocrad-0.17/page_image_layout.cc.gcc43	2007-06-29 14:29:13.000000000 +0200
++++ ocrad-0.17/page_image_layout.cc	2008-02-19 19:36:25.000000000 +0100
+@@ -18,6 +18,8 @@
+ #include <algorithm>
+ #include <cstdio>
+ #include <vector>
++#include <cstdlib>
++#include <string>
+ 
+ #include "common.h"
+ #include "rational.h"
+diff -up ocrad-0.17/track.cc.gcc43 ocrad-0.17/track.cc
+--- ocrad-0.17/track.cc.gcc43	2008-02-19 19:37:08.000000000 +0100
++++ ocrad-0.17/track.cc	2008-02-19 19:37:30.000000000 +0100
+@@ -17,6 +17,7 @@
+ 
+ #include <algorithm>
+ #include <vector>
++#include <cstdio>
+ 
+ #include "common.h"
+ #include "rectangle.h"
+diff -up ocrad-0.17/textline.cc.gcc43 ocrad-0.17/textline.cc
+--- ocrad-0.17/textline.cc.gcc43	2007-06-29 14:29:13.000000000 +0200
++++ ocrad-0.17/textline.cc	2008-02-19 19:36:25.000000000 +0100
+@@ -19,6 +19,7 @@
+ #include <cctype>
+ #include <cstdio>
+ #include <vector>
++#include <string>
+ 
+ #include "common.h"
+ #include "rational.h"
+diff -up ocrad-0.17/common.cc.gcc43 ocrad-0.17/common.cc
+--- ocrad-0.17/common.cc.gcc43	2007-06-29 14:29:13.000000000 +0200
++++ ocrad-0.17/common.cc	2008-02-19 19:36:25.000000000 +0100
+@@ -17,6 +17,7 @@
+ 
+ #include <algorithm>
+ #include <cstdio>
++#include <cstring>
+ #include <cstdlib>
+ #include "common.h"
+ 
+diff -up ocrad-0.17/textpage.cc.gcc43 ocrad-0.17/textpage.cc
+--- ocrad-0.17/textpage.cc.gcc43	2007-06-29 14:29:13.000000000 +0200
++++ ocrad-0.17/textpage.cc	2008-02-19 19:36:25.000000000 +0100
+@@ -18,6 +18,7 @@
+ #include <cstdio>
+ #include <string>
+ #include <vector>
++#include <algorithm>
+ 
+ #include "common.h"
+ #include "rectangle.h"
+diff -up ocrad-0.17/textline_r2.cc.gcc43 ocrad-0.17/textline_r2.cc
+--- ocrad-0.17/textline_r2.cc.gcc43	2007-06-29 14:29:13.000000000 +0200
++++ ocrad-0.17/textline_r2.cc	2008-02-19 19:36:25.000000000 +0100
+@@ -18,6 +18,7 @@
+ #include <cctype>
+ #include <cstdio>
+ #include <vector>
++#include <cstdlib>
+ 
+ #include "common.h"
+ #include "rectangle.h"
+diff -up ocrad-0.17/page_image.cc.gcc43 ocrad-0.17/page_image.cc
+--- ocrad-0.17/page_image.cc.gcc43	2007-06-29 14:29:13.000000000 +0200
++++ ocrad-0.17/page_image.cc	2008-02-19 19:36:25.000000000 +0100
+@@ -19,6 +19,8 @@
+ #include <cctype>
+ #include <cstdio>
+ #include <vector>
++#include <climits>
++#include <string>
+ 
+ #include "common.h"
+ #include "rational.h"
+diff -up ocrad-0.17/character_r12.cc.gcc43 ocrad-0.17/character_r12.cc
+--- ocrad-0.17/character_r12.cc.gcc43	2007-06-29 14:29:13.000000000 +0200
++++ ocrad-0.17/character_r12.cc	2008-02-19 19:36:25.000000000 +0100
+@@ -17,6 +17,7 @@
+ 
+ #include <cstdio>
+ #include <vector>
++#include <cstdlib>
+ #include "common.h"
+ #include "rectangle.h"
+ #include "ucs.h"

Added: ocrad.install
===================================================================
--- ocrad.install	                        (rev 0)
+++ ocrad.install	2009-04-16 06:10:22 UTC (rev 35716)
@@ -0,0 +1,20 @@
+infodir=/usr/share/info
+filelist=(ocrad.info.gz)
+
+post_install() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info $infodir/$file $infodir/dir 2> /dev/null
+  done
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+  done
+}



More information about the arch-commits mailing list