From 4fc9b508f80babce8bb8ac5b858109cf79d47521 Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 4 Jan 2019 21:05:33 +0000 Subject: Simplify tesseract tasks using simplified / improved make branches --- roles/devami/tasks/tesseract.yml | 42 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/roles/devami/tasks/tesseract.yml b/roles/devami/tasks/tesseract.yml index 7ad7da3..3cbdb4e 100644 --- a/roles/devami/tasks/tesseract.yml +++ b/roles/devami/tasks/tesseract.yml @@ -6,10 +6,6 @@ with_items: - gcc-c++ - make - - autoconf - - automake - - libtool - - pkgconfig - libpng12-devel - libjpeg-turbo-devel - libtiff-devel @@ -29,14 +25,14 @@ - name: Clone leptonica repository git: - repo: https://github.com/DanBloomberg/leptonica - dest: /home/ec2-user/leptonica - version: 1.77.0 + repo: https://github.com/nickjwhite/leptonica + dest: /home/ec2-user/src/leptonica + version: addinstall depth: 1 - name: Configure leptonica environ.h lineinfile: - dest: /home/ec2-user/leptonica/src/environ.h + dest: /home/ec2-user/src/leptonica/src/environ.h line: {{ item }} insertbefore: "^#endif * LEPTONICA_ENVIRON_H" with_items: @@ -45,34 +41,16 @@ - name: Build leptonica make: - chdir: /home/ec2-user/leptonica/src - target: "-f makefile.static shared" + chdir: /home/ec2-user/src/leptonica/src + target: "-f makefile.static install" params: SHARED=yes -# TODO: in due course replace this with our repo and branch - name: Clone tesseract repository git: - repo: https://github.com/tesseract-ocr/tesseract - dest: /home/ec2-user/tesseract - version: 4.0.0 + repo: https://github.com/nickjwhite/tesseract + dest: /home/ec2-user/src/tesseract + version: simplemakev4 depth: 1 -- name: Run autogen.sh for tesseract - command: /home/ec2-user/tesseract/autogen.sh - args: - chdir: /home/ec2-user/tesseract - creates: /home/ec2-user/tesseract/configure - -# NOTE: lept headers and libs dirs are probably incorrect -# TODO: split the shell line if possible -- name: Run configure for tesseract - shell: LIBLEPT_HEADERSDIR=$HOME/leptonica/src/ /home/ec2-user/tesseract/configure --prefix=$HOME/tessinstall/ --with-extra-libraries=$HOME/leptonica/src - args: - chdir: /home/ec2-user/tesseract - creates: /home/ec2-user/tesseract/makefile - - name: Build and install tesseract - make: chdir=/home/ec2-user/tesseract target=install - -- name: Build and install tesseract training tools - make: chdir=/home/ec2-user/tesseract target=training-install + make: chdir=/home/ec2-user/src/tesseract target=install -- cgit v1.2.1-24-ge1ad