Browse Source

ocrad: new package

GNU Ocrad is an OCR (Optical Character Recognition) program
based on a feature extraction method.
It reads images in pbm (bitmap), pgm (greyscale) or ppm (color) formats
and produces text in byte (8-bit) or UTF-8 formats.

[Peter: fixup whitespace, install into STAGING_DIR, use make install, BR2_GNU_MIRROR]
Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
gilles.talis@gmail.com 12 years ago
parent
commit
8716535421
3 changed files with 46 additions and 0 deletions
  1. 1 0
      package/Config.in
  2. 14 0
      package/ocrad/Config.in
  3. 31 0
      package/ocrad/ocrad.mk

+ 1 - 0
package/Config.in

@@ -132,6 +132,7 @@ source "package/fb-test-app/Config.in"
 source "package/imagemagick/Config.in"
 source "package/linux-fusion/Config.in"
 source "package/lite/Config.in"
+source "package/ocrad/Config.in"
 source "package/sawman/Config.in"
 source "package/sdl/Config.in"
 source "package/sdl_image/Config.in"

+ 14 - 0
package/ocrad/Config.in

@@ -0,0 +1,14 @@
+config BR2_PACKAGE_OCRAD
+	bool "ocrad"
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  GNU Ocrad is an OCR (Optical Character Recognition) program
+	  based on a feature extraction method.
+	  It reads images in pbm (bitmap), pgm (greyscale) or
+	  ppm (color) formats and produces text in byte (8-bit) or
+	  UTF-8 formats.
+
+	  http://www.gnu.org/software/ocrad/
+
+comment "ocrad needs a toolchain with C++ support"
+	depends on !BR2_INSTALL_LIBSTDCPP

+ 31 - 0
package/ocrad/ocrad.mk

@@ -0,0 +1,31 @@
+################################################################################
+#
+# ocrad
+#
+################################################################################
+
+OCRAD_VERSION = 0.21
+OCRAD_SITE = $(BR2_GNU_MIRROR)/ocrad
+OCRAD_LICENSE = GPLv3+
+OCRAD_LICENSE_FILES = COPYING
+OCRAD_INSTALL_STAGING = YES
+
+# This is not a true autotools package.
+define OCRAD_CONFIGURE_CMDS
+	cd $(@D) && \
+	./configure --prefix=/usr --sysconfdir=/etc $(TARGET_CONFIGURE_OPTS)
+endef
+
+define OCRAD_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
+
+define OCRAD_INSTALL_STAGING_CMDS
+	$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+define OCRAD_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))