diff options
Diffstat (limited to 'graphics/tesseract/patches/patch-tessdata_Makefile.am')
-rw-r--r-- | graphics/tesseract/patches/patch-tessdata_Makefile.am | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/graphics/tesseract/patches/patch-tessdata_Makefile.am b/graphics/tesseract/patches/patch-tessdata_Makefile.am new file mode 100644 index 00000000000..922206f961d --- /dev/null +++ b/graphics/tesseract/patches/patch-tessdata_Makefile.am @@ -0,0 +1,34 @@ +$NetBSD: patch-tessdata_Makefile.am,v 1.1 2017/02/21 17:51:18 fhajny Exp $ + +Revert a trunk commit that broke install-lang for tesseract<4. + +--- tessdata/Makefile.am.orig 2017-02-16 17:59:48.000000000 +0000 ++++ tessdata/Makefile.am +@@ -44,6 +44,27 @@ langdata = bul.traineddata mlt.trainedda + ita.cube.nn fra.cube.size eng.cube.bigrams ara.cube.lm \ + rus.cube.nn spa.cube.nn hin.cube.bigrams + ++.PHONY: install-langs ++install-langs: ++ @if [ ! -d $(DESTDIR)$(datadir) ]; then mkdir -p $(DESTDIR)$(datadir); fi; ++ @if test "${LANGS}" != ""; then \ ++ for lang_code in ${LANGS}; do \ ++ echo "installing data for $$lang_code"; \ ++ $(INSTALL) -m 644 $(srcdir)/$$lang_code.* $(DESTDIR)$(datadir); \ ++ done; \ ++ else \ ++ for l in ./*.traineddata; do \ ++ filename=`basename $$l`; \ ++ lang_code=$${filename%.*}; \ ++ if test "$$lang_code" == "*"; then \ ++ echo "No lang present."; \ ++ break; \ ++ fi; \ ++ echo "installing data for $$lang_code"; \ ++ $(INSTALL) -m 644 $(srcdir)/$$lang_code.* $(DESTDIR)$(datadir); \ ++ done; \ ++ fi; ++ + uninstall-local: + cd $(DESTDIR)$(datadir); \ + rm -f $(langdata) |