Skip to contentSkip to conversation

Introducing tesseract OCR engine package

PATCH Superseded Gilles Talis 2 participants 8 messages Mar 14, 2017 – Mar 15, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Introducing tesseract OCR engine package

This patch series introduces the tesseract OCR engine, some of its associated language data and the main library it depends on, leptonica.

Gilles Talis (3):
leptonica: new package
tesseract-ocr: new package
DEVELOPERS: add leptonica and tesseract-ocr to my list

 DEVELOPERS                                         |  2 +
 package/Config.in                                  |  3 ++
 package/leptonica/Config.in                        |  9 ++++
 package/leptonica/leptonica.hash                   |  2 +
 package/leptonica/leptonica.mk                     | 57 ++++++++++++++++++++++
 package/tesseract-ocr-data/Config.in               | 15 ++++++
 .../tesseract-ocr-data-chi-sim/Config.in           |  6 +++
 .../tesseract-ocr-data-chi-sim.hash                |  2 +
 .../tesseract-ocr-data-chi-sim.mk                  | 21 ++++++++
 .../tesseract-ocr-data-chi-tra/Config.in           |  6 +++
 .../tesseract-ocr-data-chi-tra.hash                |  2 +
 .../tesseract-ocr-data-chi-tra.mk                  | 21 ++++++++
 .../tesseract-ocr-data-eng/Config.in               |  6 +++
 .../tesseract-ocr-data-eng.hash                    |  2 +
 .../tesseract-ocr-data-eng.mk                      | 21 ++++++++
 .../tesseract-ocr-data-fra/Config.in               |  5 ++
 .../tesseract-ocr-data-fra.hash                    |  2 +
 .../tesseract-ocr-data-fra.mk                      | 21 ++++++++
 .../tesseract-ocr-data-ger/Config.in               |  5 ++
 .../tesseract-ocr-data-ger.hash                    |  2 +
 .../tesseract-ocr-data-ger.mk                      | 21 ++++++++
 .../tesseract-ocr-data-spa/Config.in               |  5 ++
 .../tesseract-ocr-data-spa.hash                    |  2 +
 .../tesseract-ocr-data-spa.mk                      | 21 ++++++++
 package/tesseract-ocr-data/tesseract-ocr-data.mk   | 10 ++++
 package/tesseract-ocr/Config.in                    | 35 +++++++++++++
 package/tesseract-ocr/tesseract-ocr.hash           |  3 ++
 package/tesseract-ocr/tesseract-ocr.mk             | 31 ++++++++++++
 28 files changed, 338 insertions(+)
 create mode 100644 package/leptonica/Config.in
 create mode 100644 package/leptonica/leptonica.hash
 create mode 100644 package/leptonica/leptonica.mk
 create mode 100644 package/tesseract-ocr-data/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/tesseract-ocr-data-chi-sim.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/tesseract-ocr-data-chi-sim.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/tesseract-ocr-data-chi-tra.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/tesseract-ocr-data-chi-tra.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-eng/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-eng/tesseract-ocr-data-eng.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-eng/tesseract-ocr-data-eng.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-fra/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-fra/tesseract-ocr-data-fra.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-fra/tesseract-ocr-data-fra.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-ger/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-ger/tesseract-ocr-data-ger.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-ger/tesseract-ocr-data-ger.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-spa/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-spa/tesseract-ocr-data-spa.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-spa/tesseract-ocr-data-spa.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data.mk
 create mode 100644 package/tesseract-ocr/Config.in
 create mode 100644 package/tesseract-ocr/tesseract-ocr.hash
 create mode 100644 package/tesseract-ocr/tesseract-ocr.mk
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/3 leptonica: new package

---
 package/Config.in                |  1 +
 package/leptonica/Config.in      |  9 +++++++
 package/leptonica/leptonica.hash |  2 ++
 package/leptonica/leptonica.mk   | 57 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+)
 create mode 100644 package/leptonica/Config.in
 create mode 100644 package/leptonica/leptonica.hash
 create mode 100644 package/leptonica/leptonica.mk
package/Config.in +1 -0
index 85e4dee..390560e 100644
@@ -1008,6 +1008,7 @@ menu "Graphics"
 	source "package/jpeg/Config.in"
 	source "package/kmsxx/Config.in"
 	source "package/lcms2/Config.in"
+	source "package/leptonica/Config.in"
 	source "package/lesstif/Config.in"
 	source "package/libart/Config.in"
 	source "package/libdmtx/Config.in"
package/leptonica/Config.in new file +9 -0
new file mode 100644
index 0000000..d485344
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LEPTONICA
+	bool "leptonica"
+
+	help
+	  Leptonica is a pedagogically-oriented open source site containing
+	  software that is broadly useful for image processing and image
+	  analysis applications.
+
+	  http://www.leptonica.org/
package/leptonica/leptonica.hash new file +2 -0
new file mode 100644
index 0000000..48da06b
@@ -0,0 +1,2 @@
+# locally computed hash
+sha256 746a517a47a3bd2a90bc8d581ca6464c10f30e91a60209735efe45b3778bec62  leptonica-1.74.1.tar.gz
package/leptonica/leptonica.mk new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
2.5.0
#2 lore raw

PATCH 1/3 leptonica: new package

Hello,

Quoted 7 lines · Gilles Talis
---
 package/Config.in                |  1 +
 package/leptonica/Config.in      |  9 +++++++
 package/leptonica/leptonica.hash |  2 ++
 package/leptonica/leptonica.mk   | 57 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+)

The change to the DEVELOPERS file for that specific package should be in this patch.

I know we asked to do things differently in the past (i.e have the change to the DEVELOPERS in a separate commit), but we changed our mind, and now want the DEVELOPERS change with the patch adding the package.

package/leptonica/Config.in line 3

Quoted 9 lines
package/leptonica/Config.in new file +3 -0
new file mode 100644
index 0000000..d485344
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LEPTONICA
+	bool "leptonica"
+

Unneeded empty line.

There is no toolchain dependency? It builds fine with uClibc/musl/glibc, noMMU, static libraries only, etc. ?

Could you test this package with support/scripts/test-pkg ?

Quoted 6 lines
package/leptonica/leptonica.mk new file +0 -0
new file mode 100644
index 0000000..5f2da79

package/leptonica/leptonica.mk line 10

Quoted 10 lines
package/leptonica/leptonica.mk new file +10 -0
@@ -0,0 +1,57 @@
+################################################################################
+#
+# leptonica
+#
+################################################################################
+
+LEPTONICA_VERSION = 1.74.1
+LEPTONICA_SITE = http://www.leptonica.org/source
+LEPTONICA_LICENSE = BSD-2c
+LEPTONICA_LICENSE_FILES = leptonica-license.txt

OK, license verified, looks good to me.

package/leptonica/leptonica.mk line 16

Quoted 6 lines
package/leptonica/leptonica.mk new file +6 -0
+LEPTONICA_INSTALL_STAGING = YES
+
+LEPTONICA_CONF_OPTS += --disable-programs
+
+ifeq ($(BR2_PACKAGE_GIFLIB),y)
+LEPTONICA_DEPENDENCIES += giflib

Please explicitly pass:

LEPTONICA_CONF_OPTS += --with-giflib

here, and same for all other options below.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#3 lore raw

PATCH 1/3 leptonica: new package

Hi Thomas, all,

2017-03-14 21:34 GMT+01:00 Thomas Petazzoni
<[email protected]>:

Quoted 11 lines

Hello,

Quoted 7 lines · Gilles Talis
---
 package/Config.in                |  1 +
 package/leptonica/Config.in      |  9 +++++++
 package/leptonica/leptonica.hash |  2 ++
 package/leptonica/leptonica.mk   | 57 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+)
Quoted 7 lines

The change to the DEVELOPERS file for that specific package should be in this patch.

I know we asked to do things differently in the past (i.e have the change to the DEVELOPERS in a separate commit), but we changed our mind, and now want the DEVELOPERS change with the patch adding the package.

Understood. Will do.

Quoted 12 lines

package/leptonica/Config.in line 3

Quoted 10 lines
package/leptonica/Config.in new file +3 -0
new file mode 100644
index 0000000..d485344
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LEPTONICA
+     bool "leptonica"
+

Unneeded empty line.

OK

Quoted 5 lines

There is no toolchain dependency? It builds fine with uClibc/musl/glibc, noMMU, static libraries only, etc. ?

Could you test this package with support/scripts/test-pkg ?

OK. Will do.

Quoted 29 lines
Quoted 7 lines
package/leptonica/leptonica.mk new file +0 -0
new file mode 100644
index 0000000..5f2da79

package/leptonica/leptonica.mk line 10

Quoted 10 lines
package/leptonica/leptonica.mk new file +10 -0
@@ -0,0 +1,57 @@
+################################################################################
+#
+# leptonica
+#
+################################################################################
+
+LEPTONICA_VERSION = 1.74.1
+LEPTONICA_SITE = http://www.leptonica.org/source
+LEPTONICA_LICENSE = BSD-2c
+LEPTONICA_LICENSE_FILES = leptonica-license.txt

OK, license verified, looks good to me.

package/leptonica/leptonica.mk line 16

Quoted 6 lines
package/leptonica/leptonica.mk new file +6 -0
+LEPTONICA_INSTALL_STAGING = YES
+
+LEPTONICA_CONF_OPTS += --disable-programs
+
+ifeq ($(BR2_PACKAGE_GIFLIB),y)
+LEPTONICA_DEPENDENCIES += giflib

Please explicitly pass:

Quoted 3 lines

LEPTONICA_CONF_OPTS += --with-giflib

here, and same for all other options below.

OK. Thanks a lot for the review!

#4 lore raw

PATCH 2/3 tesseract-ocr: new package

In reply to Gilles Talis
---
 package/Config.in                                  |  2 ++
 package/tesseract-ocr-data/Config.in               | 15 ++++++++++
 .../tesseract-ocr-data-chi-sim/Config.in           |  6 ++++
 .../tesseract-ocr-data-chi-sim.hash                |  2 ++
 .../tesseract-ocr-data-chi-sim.mk                  | 21 +++++++++++++
 .../tesseract-ocr-data-chi-tra/Config.in           |  6 ++++
 .../tesseract-ocr-data-chi-tra.hash                |  2 ++
 .../tesseract-ocr-data-chi-tra.mk                  | 21 +++++++++++++
 .../tesseract-ocr-data-eng/Config.in               |  6 ++++
 .../tesseract-ocr-data-eng.hash                    |  2 ++
 .../tesseract-ocr-data-eng.mk                      | 21 +++++++++++++
 .../tesseract-ocr-data-fra/Config.in               |  5 ++++
 .../tesseract-ocr-data-fra.hash                    |  2 ++
 .../tesseract-ocr-data-fra.mk                      | 21 +++++++++++++
 .../tesseract-ocr-data-ger/Config.in               |  5 ++++
 .../tesseract-ocr-data-ger.hash                    |  2 ++
 .../tesseract-ocr-data-ger.mk                      | 21 +++++++++++++
 .../tesseract-ocr-data-spa/Config.in               |  5 ++++
 .../tesseract-ocr-data-spa.hash                    |  2 ++
 .../tesseract-ocr-data-spa.mk                      | 21 +++++++++++++
 package/tesseract-ocr-data/tesseract-ocr-data.mk   | 10 +++++++
 package/tesseract-ocr/Config.in                    | 35 ++++++++++++++++++++++
 package/tesseract-ocr/tesseract-ocr.hash           |  3 ++
 package/tesseract-ocr/tesseract-ocr.mk             | 31 +++++++++++++++++++
 24 files changed, 267 insertions(+)
 create mode 100644 package/tesseract-ocr-data/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/tesseract-ocr-data-chi-sim.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/tesseract-ocr-data-chi-sim.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/tesseract-ocr-data-chi-tra.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/tesseract-ocr-data-chi-tra.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-eng/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-eng/tesseract-ocr-data-eng.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-eng/tesseract-ocr-data-eng.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-fra/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-fra/tesseract-ocr-data-fra.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-fra/tesseract-ocr-data-fra.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-ger/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-ger/tesseract-ocr-data-ger.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-ger/tesseract-ocr-data-ger.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-spa/Config.in
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-spa/tesseract-ocr-data-spa.hash
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data-spa/tesseract-ocr-data-spa.mk
 create mode 100644 package/tesseract-ocr-data/tesseract-ocr-data.mk
 create mode 100644 package/tesseract-ocr/Config.in
 create mode 100644 package/tesseract-ocr/tesseract-ocr.hash
 create mode 100644 package/tesseract-ocr/tesseract-ocr.mk
package/Config.in +2 -0
index 390560e..a2834a6 100644
@@ -244,6 +244,8 @@ comment "Graphic applications"
 	source "package/mesa3d-demos/Config.in"
 	source "package/qt5cinex/Config.in"
 	source "package/rrdtool/Config.in"
+	source "package/tesseract-ocr/Config.in"
+	source "package/tesseract-ocr-data/Config.in"
 
 comment "Graphic libraries"
 	source "package/cegui06/Config.in"
package/tesseract-ocr-data/Config.in new file +15 -0
new file mode 100644
index 0000000..6fba5bf
@@ -0,0 +1,15 @@
+menuconfig BR2_PACKAGE_TESSERACT_OCR_DATA
+	bool "tesseract-ocr languages training data"
+	depends on BR2_PACKAGE_TESSERACT_OCR
+	help
+	  This will install the language training data files for tesseract-ocr
+
+if BR2_PACKAGE_TESSERACT_OCR_DATA
+source "package/tesseract-ocr-data/tesseract-ocr-data-eng/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-fra/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-ger/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-spa/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/Config.in"
+endif
+
package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/Config.in new file +6 -0
new file mode 100644
index 0000000..9e82ef5
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_TESSERACT_OCR_DATA_CHI_SIM
+	bool "Simplified Chinese"
+	depends on BR2_PACKAGE_TESSERACT_OCR_DATA
+	help
+	  This will install Simplified Chinese language training data files
+	  for tesseract-ocr
package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/tesseract-ocr-data-chi-sim.hash new file +2 -0
new file mode 100644
index 0000000..ccbdbaf
@@ -0,0 +1,2 @@
+# locally computed
+sha256  323ae74d4a2ff49e932dbb4d6282fe0e67ddfafda075ec85803ecd077207454c  chi_sim.traineddata
package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/tesseract-ocr-data-chi-sim.mk new file +21 -0
new file mode 100644
index 0000000..ad31ed5
@@ -0,0 +1,21 @@
+################################################################################
+#
+# tesseract-ocr-data-chi_sim
+#
+################################################################################
+
+TESSERACT_OCR_DATA_CHI_SIM_VERSION = $(TESSERACT_OCR_DATA_VERSION)
+TESSERACT_OCR_DATA_CHI_SIM_SOURCE = chi_sim.traineddata
+TESSERACT_OCR_DATA_CHI_SIM_SITE = $(TESSERACT_OCR_DATA_SITE)
+TESSERACT_OCR_DATA_CHI_SIM_LICENSE = Apache-2.0
+
+define TESSERACT_OCR_DATA_CHI_SIM_EXTRACT_CMDS
+	cp $(DL_DIR)/$(TESSERACT_OCR_DATA_CHI_SIM_SOURCE) $(@D)
+endef
+
+define TESSERACT_OCR_DATA_CHI_SIM_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/$(TESSERACT_OCR_DATA_CHI_SIM_SOURCE) \
+		$(TARGET_DIR)/usr/share/tessdata/$(TESSERACT_OCR_DATA_CHI_SIM_SOURCE)
+endef
+
+$(eval $(generic-package))
package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/Config.in new file +6 -0
new file mode 100644
index 0000000..c8f2fea
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_TESSERACT_OCR_DATA_CHI_TRA
+	bool "Traditional Chinese"
+	depends on BR2_PACKAGE_TESSERACT_OCR_DATA
+	help
+	  This will install Traditional Chinese language training data files
+	  for tesseract-ocr
package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/tesseract-ocr-data-chi-tra.hash new file +2 -0
new file mode 100644
index 0000000..9b537bf
@@ -0,0 +1,2 @@
+# locally computed
+sha256  774d566bd0b36e4b6c07415dfa5b6b57feb2575b1f5f231d7fe01a52dac5dd0e  chi_tra.traineddata
package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/tesseract-ocr-data-chi-tra.mk new file +21 -0
new file mode 100644
index 0000000..e2eb732
@@ -0,0 +1,21 @@
+################################################################################
+#
+# tesseract-ocr-data-chi_tra
+#
+################################################################################
+
+TESSERACT_OCR_DATA_CHI_TRA_VERSION = $(TESSERACT_OCR_DATA_VERSION)
+TESSERACT_OCR_DATA_CHI_TRA_SOURCE = chi_tra.traineddata
+TESSERACT_OCR_DATA_CHI_TRA_SITE = $(TESSERACT_OCR_DATA_SITE)
+TESSERACT_OCR_DATA_CHI_TRA_LICENSE = Apache-2.0
+
+define TESSERACT_OCR_DATA_CHI_TRA_EXTRACT_CMDS
+	cp $(DL_DIR)/$(TESSERACT_OCR_DATA_CHI_TRA_SOURCE) $(@D)
+endef
+
+define TESSERACT_OCR_DATA_CHI_TRA_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/$(TESSERACT_OCR_DATA_CHI_TRA_SOURCE) \
+		$(TARGET_DIR)/usr/share/tessdata/$(TESSERACT_OCR_DATA_CHI_TRA_SOURCE)
+endef
+
+$(eval $(generic-package))
package/tesseract-ocr-data/tesseract-ocr-data-eng/Config.in new file +6 -0
new file mode 100644
index 0000000..f23b9b2
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_TESSERACT_OCR_DATA_ENG
+	bool "English"
+	default y
+	depends on BR2_PACKAGE_TESSERACT_OCR_DATA
+	help
+	  This will install English language training data files for tesseract-ocr
package/tesseract-ocr-data/tesseract-ocr-data-eng/tesseract-ocr-data-eng.hash new file +2 -0
new file mode 100644
index 0000000..e46e7d6
@@ -0,0 +1,2 @@
+# locally computed
+sha256  c0515c9f1e0c79e1069fcc05c2b2f6a6841fb5e1082d695db160333c1154f06d  eng.traineddata
package/tesseract-ocr-data/tesseract-ocr-data-eng/tesseract-ocr-data-eng.mk new file +21 -0
new file mode 100644
index 0000000..0972dc3
@@ -0,0 +1,21 @@
+################################################################################
+#
+# tesseract-ocr-data-eng
+#
+################################################################################
+
+TESSERACT_OCR_DATA_ENG_VERSION = $(TESSERACT_OCR_DATA_VERSION)
+TESSERACT_OCR_DATA_ENG_SOURCE = eng.traineddata
+TESSERACT_OCR_DATA_ENG_SITE = $(TESSERACT_OCR_DATA_SITE)
+TESSERACT_OCR_DATA_ENG_LICENSE = Apache-2.0
+
+define TESSERACT_OCR_DATA_ENG_EXTRACT_CMDS
+	cp $(DL_DIR)/$(TESSERACT_OCR_DATA_ENG_SOURCE) $(@D)
+endef
+
+define TESSERACT_OCR_DATA_ENG_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/$(TESSERACT_OCR_DATA_ENG_SOURCE) \
+		$(TARGET_DIR)/usr/share/tessdata/$(TESSERACT_OCR_DATA_ENG_SOURCE)
+endef
+
+$(eval $(generic-package))
package/tesseract-ocr-data/tesseract-ocr-data-fra/Config.in new file +5 -0
new file mode 100644
index 0000000..404cd2f
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_TESSERACT_OCR_DATA_FRA
+	bool "French"
+	depends on BR2_PACKAGE_TESSERACT_OCR_DATA
+	help
+	  This will install French language training data files for tesseract-ocr
package/tesseract-ocr-data/tesseract-ocr-data-fra/tesseract-ocr-data-fra.hash new file +2 -0
new file mode 100644
index 0000000..fc82376
@@ -0,0 +1,2 @@
+# locally computed
+sha256  86afb23ad146467f263e8ade56fd3951b1cc28f8c4eebc34f993d3c02d88a7ab  fra.traineddata
package/tesseract-ocr-data/tesseract-ocr-data-fra/tesseract-ocr-data-fra.mk new file +21 -0
new file mode 100644
index 0000000..60908af
@@ -0,0 +1,21 @@
+################################################################################
+#
+# tesseract-ocr-data-fra
+#
+################################################################################
+
+TESSERACT_OCR_DATA_FRA_VERSION = $(TESSERACT_OCR_DATA_VERSION)
+TESSERACT_OCR_DATA_FRA_SOURCE = fra.traineddata
+TESSERACT_OCR_DATA_FRA_SITE = $(TESSERACT_OCR_DATA_SITE)
+TESSERACT_OCR_DATA_FRA_LICENSE = Apache-2.0
+
+define TESSERACT_OCR_DATA_FRA_EXTRACT_CMDS
+	cp $(DL_DIR)/$(TESSERACT_OCR_DATA_FRA_SOURCE) $(@D)
+endef
+
+define TESSERACT_OCR_DATA_FRA_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/$(TESSERACT_OCR_DATA_FRA_SOURCE) \
+		$(TARGET_DIR)/usr/share/tessdata/$(TESSERACT_OCR_DATA_FRA_SOURCE)
+endef
+
+$(eval $(generic-package))
package/tesseract-ocr-data/tesseract-ocr-data-ger/Config.in new file +5 -0
new file mode 100644
index 0000000..d3c6e85
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_TESSERACT_OCR_DATA_GER
+	bool "German"
+	depends on BR2_PACKAGE_TESSERACT_OCR_DATA
+	help
+	  This will install German language training data files for tesseract-ocr
package/tesseract-ocr-data/tesseract-ocr-data-ger/tesseract-ocr-data-ger.hash new file +2 -0
new file mode 100644
index 0000000..7f7f9c9
@@ -0,0 +1,2 @@
+# locally computed
+sha256  cb7eb42a7e972cec7ef904fe81825d7b547c46df684c814fdb11a930b13bca3a  deu.traineddata
package/tesseract-ocr-data/tesseract-ocr-data-ger/tesseract-ocr-data-ger.mk new file +21 -0
new file mode 100644
index 0000000..dcb2a39
@@ -0,0 +1,21 @@
+################################################################################
+#
+# tesseract-ocr-data-ger
+#
+################################################################################
+
+TESSERACT_OCR_DATA_GER_VERSION = $(TESSERACT_OCR_DATA_VERSION)
+TESSERACT_OCR_DATA_GER_SOURCE = deu.traineddata
+TESSERACT_OCR_DATA_GER_SITE = $(TESSERACT_OCR_DATA_SITE)
+TESSERACT_OCR_DATA_GER_LICENSE = Apache-2.0
+
+define TESSERACT_OCR_DATA_GER_EXTRACT_CMDS
+	cp $(DL_DIR)/$(TESSERACT_OCR_DATA_GER_SOURCE) $(@D)
+endef
+
+define TESSERACT_OCR_DATA_GER_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/$(TESSERACT_OCR_DATA_GER_SOURCE) \
+		$(TARGET_DIR)/usr/share/tessdata/$(TESSERACT_OCR_DATA_GER_SOURCE)
+endef
+
+$(eval $(generic-package))
package/tesseract-ocr-data/tesseract-ocr-data-spa/Config.in new file +5 -0
new file mode 100644
index 0000000..4edb3be
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_TESSERACT_OCR_DATA_SPA
+	bool "Spanish"
+	depends on BR2_PACKAGE_TESSERACT_OCR_DATA
+	help
+	  This will install Spanish language training data files for tesseract-ocr
package/tesseract-ocr-data/tesseract-ocr-data-spa/tesseract-ocr-data-spa.hash new file +2 -0
new file mode 100644
index 0000000..ce993a0
@@ -0,0 +1,2 @@
+# locally computed
+sha256  f23985996bbcfe2b57864ccb082783c1c74c87429f04411a04a6ba4d3da2efda  spa.traineddata
package/tesseract-ocr-data/tesseract-ocr-data-spa/tesseract-ocr-data-spa.mk new file +21 -0
new file mode 100644
index 0000000..20016fa
@@ -0,0 +1,21 @@
+################################################################################
+#
+# tesseract-ocr-data-spa
+#
+################################################################################
+
+TESSERACT_OCR_DATA_SPA_VERSION = $(TESSERACT_OCR_DATA_VERSION)
+TESSERACT_OCR_DATA_SPA_SOURCE = spa.traineddata
+TESSERACT_OCR_DATA_SPA_SITE = $(TESSERACT_OCR_DATA_SITE)
+TESSERACT_OCR_DATA_SPA_LICENSE = Apache-2.0
+
+define TESSERACT_OCR_DATA_SPA_EXTRACT_CMDS
+	cp $(DL_DIR)/$(TESSERACT_OCR_DATA_SPA_SOURCE) $(@D)
+endef
+
+define TESSERACT_OCR_DATA_SPA_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/$(TESSERACT_OCR_DATA_SPA_SOURCE) \
+		$(TARGET_DIR)/usr/share/tessdata/$(TESSERACT_OCR_DATA_SPA_SOURCE)
+endef
+
+$(eval $(generic-package))
package/tesseract-ocr-data/tesseract-ocr-data.mk new file +10 -0
new file mode 100644
index 0000000..9434d0c
@@ -0,0 +1,10 @@
+################################################################################
+#
+# tesseract-ocr-data
+#
+################################################################################
+
+TESSERACT_OCR_DATA_VERSION = 3.04.00
+TESSERACT_OCR_DATA_SITE = https://github.com/tesseract-ocr/tessdata/raw/$(TESSERACT_OCR_DATA_VERSION)
+
+include $(sort $(wildcard package/tesseract-ocr-data/*/*.mk))
package/tesseract-ocr/Config.in new file +35 -0
new file mode 100644
index 0000000..7aa4ca6
@@ -0,0 +1,35 @@
+comment "tesseract-ocr needs a toolchain w/ threads, C++, gcc >= 4.8 (C++11)"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+        !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+menuconfig BR2_PACKAGE_TESSERACT_OCR
+	bool "tesseract-ocr"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	select BR2_PACKAGE_LEPTONICA
+	select BR2_PACKAGE_TESSERACT_OCR_DATA
+	help
+	  Tesseract is an OCR (Optical Character Recognition) engine,
+	  It can be used directly, or (for programmers) using an API.
+	  It supports a wide variety of languages.
+
+	  https://github.com/tesseract-ocr/tesseract
+
+if BR2_PACKAGE_TESSERACT_OCR
+
+config BR2_PACKAGE_TESSERACT_OCR_JPEG
+    bool "JPEG support"
+    select BR2_PACKAGE_JPEG
+    default y
+
+config BR2_PACKAGE_TESSERACT_OCR_PNG
+    bool "PNG support"
+    select BR2_PACKAGE_LIBPNG
+    default y
+
+config BR2_PACKAGE_TESSERACT_OCR_TIFF
+    bool "TIFF support"
+    select BR2_PACKAGE_TIFF
+
+endif
package/tesseract-ocr/tesseract-ocr.hash new file +3 -0
new file mode 100644
index 0000000..84c5ad9
@@ -0,0 +1,3 @@
+# locally computed
+sha256  3fe83e06d0f73b39f6e92ed9fc7ccba3ef734877b76aa5ddaaa778fac095d996  tesseract-ocr-3.05.00.tar.gz
+
package/tesseract-ocr/tesseract-ocr.mk new file +31 -0
new file mode 100644
index 0000000..37ac72f
@@ -0,0 +1,31 @@
+################################################################################
+#
+# tesseract-ocr
+#
+################################################################################
+
+TESSERACT_OCR_VERSION = 3.05.00
+TESSERACT_OCR_SITE = $(call github,tesseract-ocr,tesseract,$(TESSERACT_OCR_VERSION))
+TESSERACT_OCR_LICENSE = Apache-2.0
+TESSERACT_OCR_LICENSE_FILES = COPYING
+
+TESSERACT_OCR_AUTORECONF = YES
+
+TESSERACT_OCR_DEPENDENCIES += leptonica \
+	$(if $(BR2_PACKAGE_TESSERACT_OCR_JPEG),jpeg) \
+	$(if $(BR2_PACKAGE_TESSERACT_OCR_PNG),libpng) \
+	$(if $(BR2_PACKAGE_TESSERACT_OCR_TIFF),tiff)
+
+TESSERACT_OCR_INSTALL_STAGING = YES
+
+TESSERACT_OCR_CONF_ENV += \
+    LIBLEPT_HEADERSDIR=$(STAGING_DIR)/usr/include/leptonica
+
+define TESSERACT_OCR_PRECONFIGURE
+    # Autoreconf step fails due to missing m4 directory
+    mkdir -p $(@D)/m4
+endef
+
+TESSERACT_OCR_PRE_CONFIGURE_HOOKS += TESSERACT_OCR_PRECONFIGURE
+
+$(eval $(autotools-package))
Signature · 1 line
2.5.0
#5 lore raw

PATCH 2/3 tesseract-ocr: new package

Hello,

Quoted 10 lines · Gilles Talis
package/tesseract-ocr-data/Config.in new file +4 -0
new file mode 100644
index 0000000..6fba5bf
@@ -0,0 +1,15 @@
+menuconfig BR2_PACKAGE_TESSERACT_OCR_DATA
+	bool "tesseract-ocr languages training data"
+	depends on BR2_PACKAGE_TESSERACT_OCR
+	help

package/tesseract-ocr-data/Config.in line 14

Quoted 10 lines
package/tesseract-ocr-data/Config.in new file +10 -0
+	  This will install the language training data files for tesseract-ocr
+
+if BR2_PACKAGE_TESSERACT_OCR_DATA
+source "package/tesseract-ocr-data/tesseract-ocr-data-eng/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-fra/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-ger/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-spa/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/Config.in"
+endif

I am not sure we want one package per language here, I'll propose a different solution below.

package/tesseract-ocr/Config.in line 1

Quoted 7 lines
package/tesseract-ocr/Config.in new file +1 -0
new file mode 100644
index 0000000..7aa4ca6
@@ -0,0 +1,35 @@
+comment "tesseract-ocr needs a toolchain w/ threads, C++, gcc >= 4.8 (C++11)"

Remove the (C++11) comment, and put it like this:

# gcc 4.8 needed for C++11
Quoted 13 lines
package/tesseract-ocr/Config.in new file +13 -0
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+        !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+menuconfig BR2_PACKAGE_TESSERACT_OCR
+	bool "tesseract-ocr"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	select BR2_PACKAGE_LEPTONICA
+	select BR2_PACKAGE_TESSERACT_OCR_DATA
+	help
+	  Tesseract is an OCR (Optical Character Recognition) engine,
+	  It can be used directly, or (for programmers) using an API.

package/tesseract-ocr/Config.in line 24

Quoted 10 lines
package/tesseract-ocr/Config.in new file +10 -0
+	  It supports a wide variety of languages.
+
+	  https://github.com/tesseract-ocr/tesseract
+
+if BR2_PACKAGE_TESSERACT_OCR
+
+config BR2_PACKAGE_TESSERACT_OCR_JPEG
+    bool "JPEG support"
+    select BR2_PACKAGE_JPEG
+    default y

Indentation of config properties should use one tab, not spaces (fix this throughout the file).

package/tesseract-ocr/Config.in line 33

Quoted 9 lines
package/tesseract-ocr/Config.in new file +9 -0
+
+config BR2_PACKAGE_TESSERACT_OCR_PNG
+    bool "PNG support"
+    select BR2_PACKAGE_LIBPNG
+    default y
+
+config BR2_PACKAGE_TESSERACT_OCR_TIFF
+    bool "TIFF support"
+    select BR2_PACKAGE_TIFF

Does it really make sense to have sub-options for these, instead of just enabling jpeg, libpng, tiff support when the necessary packages are available?

package/tesseract-ocr/tesseract-ocr.hash line 3

Quoted 9 lines
package/tesseract-ocr/tesseract-ocr.hash new file +3 -0
new file mode 100644
index 0000000..84c5ad9
@@ -0,0 +1,3 @@
+# locally computed
+sha256  3fe83e06d0f73b39f6e92ed9fc7ccba3ef734877b76aa5ddaaa778fac095d996  tesseract-ocr-3.05.00.tar.gz
+

Useless empty line.

Quoted 6 lines
package/tesseract-ocr/tesseract-ocr.mk new file +0 -0
new file mode 100644
index 0000000..37ac72f

package/tesseract-ocr/tesseract-ocr.mk line 8

Quoted 8 lines
package/tesseract-ocr/tesseract-ocr.mk new file +8 -0
@@ -0,0 +1,31 @@
+################################################################################
+#
+# tesseract-ocr
+#
+################################################################################
+
+TESSERACT_OCR_VERSION = 3.05.00
+TESSERACT_OCR_SITE = $(call github,tesseract-ocr,tesseract,$(TESSERACT_OCR_VERSION))

Here is what you could do for the data files:

ifeq ($(BR2_PACKAGE_TESSERACT_OCR_DATA_FRENCH),y)
TESSERACT_OCR_DATA_FILES += fra.traineddata
endif

ifeq ($(BR2_PACKAGE_TESSERACT_OCR_DATA_SPANISH),y) TESSERACT_OCR_DATA_FILES += spa.traineddata endif

...

TESSERACT_OCR_EXTRA_DOWNLOADS = \
	$(addprefix https://github.com/tesseract-ocr/tessdata/raw/$(TESSERACT_OCR_DATA_VERSION),\
		$(TESSERACT_OCR_DATA_FILES))

and then use $(DL_DIR)/fra.traineddata the way you want to.

package/tesseract-ocr/tesseract-ocr.mk line 12

Quoted 4 lines
package/tesseract-ocr/tesseract-ocr.mk new file +4 -0
+TESSERACT_OCR_LICENSE = Apache-2.0
+TESSERACT_OCR_LICENSE_FILES = COPYING
+
+TESSERACT_OCR_AUTORECONF = YES

A comment that says "Source from github, no configure script provided" would be nice.

package/tesseract-ocr/tesseract-ocr.mk line 17

Quoted 5 lines
package/tesseract-ocr/tesseract-ocr.mk new file +5 -0
+
+TESSERACT_OCR_DEPENDENCIES += leptonica \
+	$(if $(BR2_PACKAGE_TESSERACT_OCR_JPEG),jpeg) \
+	$(if $(BR2_PACKAGE_TESSERACT_OCR_PNG),libpng) \
+	$(if $(BR2_PACKAGE_TESSERACT_OCR_TIFF),tiff)

Are libpng/jpeg really optional dependencies? I don't see them being mentioned in configure.ac (but I only had a quick look).

package/tesseract-ocr/tesseract-ocr.mk line 19

Quoted 1 line
package/tesseract-ocr/tesseract-ocr.mk new file +1 -0
+TESSERACT_OCR_INSTALL_STAGING = YES

It installs some libraries?

package/tesseract-ocr/tesseract-ocr.mk line 31

Quoted 12 lines
package/tesseract-ocr/tesseract-ocr.mk new file +12 -0
+
+TESSERACT_OCR_CONF_ENV += \
+    LIBLEPT_HEADERSDIR=$(STAGING_DIR)/usr/include/leptonica
+
+define TESSERACT_OCR_PRECONFIGURE
+    # Autoreconf step fails due to missing m4 directory
+    mkdir -p $(@D)/m4
+endef
+
+TESSERACT_OCR_PRE_CONFIGURE_HOOKS += TESSERACT_OCR_PRECONFIGURE
+
+$(eval $(autotools-package))

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#6 lore raw

PATCH 2/3 tesseract-ocr: new package

Hi Thomas, all,

2017-03-14 21:41 GMT+01:00 Thomas Petazzoni
<[email protected]>:

Quoted 38 lines

Hello,

Quoted 10 lines · Gilles Talis
package/tesseract-ocr-data/Config.in new file +4 -0
new file mode 100644
index 0000000..6fba5bf
@@ -0,0 +1,15 @@
+menuconfig BR2_PACKAGE_TESSERACT_OCR_DATA
+     bool "tesseract-ocr languages training data"
+     depends on BR2_PACKAGE_TESSERACT_OCR
+     help

package/tesseract-ocr-data/Config.in line 14

Quoted 10 lines
package/tesseract-ocr-data/Config.in new file +10 -0
+       This will install the language training data files for tesseract-ocr
+
+if BR2_PACKAGE_TESSERACT_OCR_DATA
+source "package/tesseract-ocr-data/tesseract-ocr-data-eng/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-fra/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-ger/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-spa/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-chi-sim/Config.in"
+source "package/tesseract-ocr-data/tesseract-ocr-data-chi-tra/Config.in"
+endif

I am not sure we want one package per language here, I'll propose a different solution below.

package/tesseract-ocr/Config.in line 1

Quoted 7 lines
package/tesseract-ocr/Config.in new file +1 -0
new file mode 100644
index 0000000..7aa4ca6
@@ -0,0 +1,35 @@
+comment "tesseract-ocr needs a toolchain w/ threads, C++, gcc >= 4.8 (C++11)"

Remove the (C++11) comment, and put it like this:

Quoted 1 line
# gcc 4.8 needed for C++11

Understood.

Quoted 19 lines
Quoted 19 lines
package/tesseract-ocr/Config.in new file +18 -0
+     depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+        !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+menuconfig BR2_PACKAGE_TESSERACT_OCR
+     bool "tesseract-ocr"
+     depends on BR2_INSTALL_LIBSTDCPP
+     depends on BR2_TOOLCHAIN_HAS_THREADS
+     depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+     select BR2_PACKAGE_LEPTONICA
+     select BR2_PACKAGE_TESSERACT_OCR_DATA
+     help
+       Tesseract is an OCR (Optical Character Recognition) engine,
+       It can be used directly, or (for programmers) using an API.
+       It supports a wide variety of languages.
+
+       https://github.com/tesseract-ocr/tesseract
+
+if BR2_PACKAGE_TESSERACT_OCR
Quoted 8 lines

package/tesseract-ocr/Config.in line 24

Quoted 5 lines
package/tesseract-ocr/Config.in new file +5 -0
+
+config BR2_PACKAGE_TESSERACT_OCR_JPEG
+    bool "JPEG support"
+    select BR2_PACKAGE_JPEG
+    default y

Indentation of config properties should use one tab, not spaces (fix this throughout the file).

OK. I was quite sure I used tabs. I will be more cautious next time.

Quoted 14 lines

package/tesseract-ocr/Config.in line 33

Quoted 10 lines
package/tesseract-ocr/Config.in new file +9 -0
+
+config BR2_PACKAGE_TESSERACT_OCR_PNG
+    bool "PNG support"
+    select BR2_PACKAGE_LIBPNG
+    default y
+
+config BR2_PACKAGE_TESSERACT_OCR_TIFF
+    bool "TIFF support"
+    select BR2_PACKAGE_TIFF

Does it really make sense to have sub-options for these, instead of just enabling jpeg, libpng, tiff support when the necessary packages are available?

OK. Will do it that way.

Quoted 12 lines

package/tesseract-ocr/tesseract-ocr.hash line 3

Quoted 10 lines
package/tesseract-ocr/tesseract-ocr.hash new file +3 -0
new file mode 100644
index 0000000..84c5ad9
@@ -0,0 +1,3 @@
+# locally computed
+sha256  3fe83e06d0f73b39f6e92ed9fc7ccba3ef734877b76aa5ddaaa778fac095d996  tesseract-ocr-3.05.00.tar.gz
+

Useless empty line.

OK.

Quoted 26 lines
Quoted 7 lines
package/tesseract-ocr/tesseract-ocr.mk new file +0 -0
new file mode 100644
index 0000000..37ac72f

package/tesseract-ocr/tesseract-ocr.mk line 8

Quoted 8 lines
package/tesseract-ocr/tesseract-ocr.mk new file +8 -0
@@ -0,0 +1,31 @@
+################################################################################
+#
+# tesseract-ocr
+#
+################################################################################
+
+TESSERACT_OCR_VERSION = 3.05.00
+TESSERACT_OCR_SITE = $(call github,tesseract-ocr,tesseract,$(TESSERACT_OCR_VERSION))

Here is what you could do for the data files:

ifeq ($(BR2_PACKAGE_TESSERACT_OCR_DATA_FRENCH),y)
TESSERACT_OCR_DATA_FILES += fra.traineddata
endif

ifeq ($(BR2_PACKAGE_TESSERACT_OCR_DATA_SPANISH),y) TESSERACT_OCR_DATA_FILES += spa.traineddata endif

Quoted 7 lines

...

TESSERACT_OCR_EXTRA_DOWNLOADS = \
        $(addprefix https://github.com/tesseract-ocr/tessdata/raw/$(TESSERACT_OCR_DATA_VERSION),\
                $(TESSERACT_OCR_DATA_FILES))

and then use $(DL_DIR)/fra.traineddata the way you want to.

Understood. Will do that

Quoted 8 lines

package/tesseract-ocr/tesseract-ocr.mk line 12

Quoted 5 lines
package/tesseract-ocr/tesseract-ocr.mk new file +4 -0
+TESSERACT_OCR_LICENSE = Apache-2.0
+TESSERACT_OCR_LICENSE_FILES = COPYING
+
+TESSERACT_OCR_AUTORECONF = YES

A comment that says "Source from github, no configure script provided" would be nice.

OK.

Quoted 10 lines

package/tesseract-ocr/tesseract-ocr.mk line 17

Quoted 6 lines
package/tesseract-ocr/tesseract-ocr.mk new file +5 -0
+
+TESSERACT_OCR_DEPENDENCIES += leptonica \
+     $(if $(BR2_PACKAGE_TESSERACT_OCR_JPEG),jpeg) \
+     $(if $(BR2_PACKAGE_TESSERACT_OCR_PNG),libpng) \
+     $(if $(BR2_PACKAGE_TESSERACT_OCR_TIFF),tiff)

Are libpng/jpeg really optional dependencies? I don't see them being mentioned in configure.ac (but I only had a quick look).

Quoted 3 lines
Quoted 1 line

+TESSERACT_OCR_INSTALL_STAGING = YES

It installs some libraries?

Yes it does. It installs both a library and a program

Quoted 15 lines

package/tesseract-ocr/tesseract-ocr.mk line 31

Quoted 13 lines
package/tesseract-ocr/tesseract-ocr.mk new file +12 -0
+
+TESSERACT_OCR_CONF_ENV += \
+    LIBLEPT_HEADERSDIR=$(STAGING_DIR)/usr/include/leptonica
+
+define TESSERACT_OCR_PRECONFIGURE
+    # Autoreconf step fails due to missing m4 directory
+    mkdir -p $(@D)/m4
+endef
+
+TESSERACT_OCR_PRE_CONFIGURE_HOOKS += TESSERACT_OCR_PRECONFIGURE
+
+$(eval $(autotools-package))

Thanks!

Thanks for your review!

#7 lore raw

PATCH 3/3 DEVELOPERS: add leptonica and tesseract-ocr to my list

In reply to Gilles Talis
---
 DEVELOPERS | 2 ++
 1 file changed, 2 insertions(+)
DEVELOPERS +2 -0
index e08b65d..ebc9ce5 100644
@@ -587,7 +587,9 @@ N:	Gilles Talis <[email protected]>
 F:	package/fdk-aac/
 F:	package/httping/
 F:	package/iozone/
+F:	package/leptonica/
 F:	package/ocrad/
+F:	package/tesseract-ocr/
 F:	package/webp/
 
 N:	Gregory Dymarek <[email protected]>
Signature · 1 line
2.5.0