Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 1 | SUMMARY = "tesseract-ocr language files" |
| 2 | |
| 3 | LICENSE = "Apache-2.0" |
Andrew Geissler | 97771a3 | 2021-03-05 15:23:11 -0600 | [diff] [blame] | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 5 | |
Andrew Geissler | 97771a3 | 2021-03-05 15:23:11 -0600 | [diff] [blame] | 6 | SRCREV = "4767ea922bcc460e70b87b1d303ebdfed0897da8" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 7 | SRC_URI = "git://github.com/tesseract-ocr/tessdata.git" |
Brad Bishop | 779d0ac | 2019-09-27 08:23:48 -0400 | [diff] [blame] | 8 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 9 | S = "${WORKDIR}/git" |
| 10 | |
| 11 | inherit allarch |
| 12 | |
| 13 | do_install() { |
| 14 | install -d ${D}${datadir}/tessdata |
Brad Bishop | 779d0ac | 2019-09-27 08:23:48 -0400 | [diff] [blame] | 15 | cp -R --no-dereference --preserve=mode,links -v ${S}/*.traineddata ${D}${datadir}/tessdata |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 16 | } |
| 17 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 18 | python populate_packages:prepend () { |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 19 | tessdata_dir= d.expand('${datadir}/tessdata') |
| 20 | pkgs = do_split_packages(d, tessdata_dir, '^([a-z_]*)\.*', '${BPN}-%s', 'tesseract-ocr language files for %s', extra_depends='') |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | pn = d.getVar('PN') |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 22 | d.appendVar('RDEPENDS:' + pn, ' '+' '.join(pkgs)) |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | PACKAGES_DYNAMIC += "^${BPN}-.*" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | ALLOW_EMPTY:${PN} = "1" |