summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-01-05 03:43:59 +0000
committerNick White <git@njw.name>2019-01-05 03:43:59 +0000
commita4bd4d3370c9f6a8503a2b954d3f006c0f1aadd6 (patch)
treed8fa076198011c93b76883f07cbe5b927cb31531
parenta9d79ba289195fb9e681f8d6bc85b8d5533822b6 (diff)
Get rid of unnecessary leptonica config and correct tesseract build rule
-rw-r--r--roles/tesseractor/tasks/tesseract.yml18
-rw-r--r--roles/tesstrainer/tasks/tesstraining.yml18
2 files changed, 10 insertions, 26 deletions
diff --git a/roles/tesseractor/tasks/tesseract.yml b/roles/tesseractor/tasks/tesseract.yml
index ce05089..903853c 100644
--- a/roles/tesseractor/tasks/tesseract.yml
+++ b/roles/tesseractor/tasks/tesseract.yml
@@ -22,21 +22,13 @@
dest: /home/ec2-user/src/leptonica
version: addinstall
depth: 1
-
-- name: Configure leptonica environ.h
- lineinfile:
- dest: /home/ec2-user/src/leptonica/src/environ.h
- line: "{{ item }}"
- insertbefore: "^#endif * LEPTONICA_ENVIRON_H"
- with_items:
- - "#define HAVE_FMEMOPEN 1"
- - "#define HAVE_FSTATAT 1"
+ force: yes
- name: Build leptonica
- make:
+ command: make -f makefile.static SHARED=yes install
+ args:
chdir: /home/ec2-user/src/leptonica/src
- target: "-f makefile.static install"
- params: SHARED=yes
+ creates: /usr/local/lib/liblept.a
- name: Clone tesseract repository
git:
@@ -46,4 +38,4 @@
depth: 1
- name: Build and install tesseract
- make: chdir=/home/ec2-user/src/tesseract target=install
+ make: chdir=/home/ec2-user/src/tesseract/simplemake target=install
diff --git a/roles/tesstrainer/tasks/tesstraining.yml b/roles/tesstrainer/tasks/tesstraining.yml
index d00003f..2ef234d 100644
--- a/roles/tesstrainer/tasks/tesstraining.yml
+++ b/roles/tesstrainer/tasks/tesstraining.yml
@@ -29,21 +29,13 @@
dest: /home/ec2-user/src/leptonica
version: addinstall
depth: 1
-
-- name: Configure leptonica environ.h
- lineinfile:
- dest: /home/ec2-user/src/leptonica/src/environ.h
- line: "{{ item }}"
- insertbefore: "^#endif * LEPTONICA_ENVIRON_H"
- with_items:
- - "#define HAVE_FMEMOPEN 1"
- - "#define HAVE_FSTATAT 1"
+ force: yes
- name: Build leptonica
- make:
+ command: make -f makefile.static SHARED=yes install
+ args:
chdir: /home/ec2-user/src/leptonica/src
- target: "-f makefile.static install"
- params: SHARED=yes
+ creates: /usr/local/lib/liblept.a
- name: Clone tesseract repository
git:
@@ -53,4 +45,4 @@
depth: 1
- name: Build and install tesseract training tools
- make: chdir=/home/ec2-user/src/tesseract target=install-training
+ make: chdir=/home/ec2-user/src/tesseract/simplemake target=install-training