| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.17 2021/03/21 18:25:22 scole Exp $ | | 1 | # $NetBSD: Makefile,v 1.18 2021/03/21 19:42:52 scole Exp $ |
2 | | | 2 | |
3 | ST_VERSION= 2.1 | | 3 | ST_VERSION= 2.1 |
4 | PKGNAME= split-thai-${ST_VERSION} | | 4 | PKGNAME= split-thai-${ST_VERSION} |
5 | CATEGORIES= textproc | | 5 | CATEGORIES= textproc |
6 | | | 6 | |
7 | MAINTAINER= scole@NetBSD.org | | 7 | MAINTAINER= scole@NetBSD.org |
8 | HOMEPAGE= https://ftp.NetBSD.org/pub/pkgsrc/distfiles/LOCAL_PORTS/ | | 8 | HOMEPAGE= https://ftp.NetBSD.org/pub/pkgsrc/distfiles/LOCAL_PORTS/ |
9 | COMMENT= Utilities and an emacs library to split UTF-8 Thai text into words | | 9 | COMMENT= Utilities and an emacs library to split UTF-8 Thai text into words |
10 | # pthai.el, other code, icu dict, swath dict | | 10 | # pthai.el, other code, icu dict, swath dict |
11 | LICENSE= 2-clause-bsd AND public-domain AND mit AND gnu-gpl-v2 | | 11 | LICENSE= 2-clause-bsd AND public-domain AND mit AND gnu-gpl-v2 |
12 | | | 12 | |
13 | GITHUB_ICU_TAG= 61607c27732906d36c5bd4d23ecc092f89f53a2b | | 13 | GITHUB_ICU_TAG= 61607c27732906d36c5bd4d23ecc092f89f53a2b |
14 | DISTFILES= split-thai-${ST_VERSION}.tgz thaidict-${GITHUB_ICU_TAG}.txt | | 14 | DISTFILES= split-thai-${ST_VERSION}.tgz thaidict-${GITHUB_ICU_TAG}.txt |
| @@ -34,27 +34,27 @@ ST_SHARE_DIR= share/split-thai | | | @@ -34,27 +34,27 @@ ST_SHARE_DIR= share/split-thai |
34 | ST_SHARE_BIN= bin | | 34 | ST_SHARE_BIN= bin |
35 | INSTALLATION_DIRS= ${ST_SHARE_BIN} ${ST_SHARE_DIR} | | 35 | INSTALLATION_DIRS= ${ST_SHARE_BIN} ${ST_SHARE_DIR} |
36 | | | 36 | |
37 | ST_SHARE_FILES= README.txt pthai.el sampledict.txt words words.tri | | 37 | ST_SHARE_FILES= README.txt pthai.el sampledict.txt words words.tri |
38 | | | 38 | |
39 | # xxx REPLACE_EMACS_SCRIPT | | 39 | # xxx REPLACE_EMACS_SCRIPT |
40 | SUBST_CLASSES+= st-emacs-app | | 40 | SUBST_CLASSES+= st-emacs-app |
41 | SUBST_STAGE.st-emacs-app= pre-configure | | 41 | SUBST_STAGE.st-emacs-app= pre-configure |
42 | SUBST_MESSAGE.st-emacs-app= Fixing emacs script paths. | | 42 | SUBST_MESSAGE.st-emacs-app= Fixing emacs script paths. |
43 | SUBST_FILES.st-emacs-app= st-emacs | | 43 | SUBST_FILES.st-emacs-app= st-emacs |
44 | SUBST_SED.st-emacs-app= -e 's,!/bin/emacs,!${PREFIX}/bin/emacs,g' | | 44 | SUBST_SED.st-emacs-app= -e 's,!/bin/emacs,!${PREFIX}/bin/emacs,g' |
45 | | | 45 | |
46 | SUBST_CLASSES+= dictionary-app | | 46 | SUBST_CLASSES+= dictionary-app |
47 | SUBST_STAGE.dictionary-app= post-extract | | 47 | SUBST_STAGE.dictionary-app= pre-configure |
48 | SUBST_MESSAGE.dictionary-app= Fixing dictionary paths. | | 48 | SUBST_MESSAGE.dictionary-app= Fixing dictionary paths. |
49 | SUBST_FILES.dictionary-app= st-emacs st-swath st-wordbreak pthai.el | | 49 | SUBST_FILES.dictionary-app= st-emacs st-swath st-wordbreak pthai.el |
50 | SUBST_SED.dictionary-app= -e 's,ST_SHARE_DIR,${PREFIX}/${ST_SHARE_DIR},g' | | 50 | SUBST_SED.dictionary-app= -e 's,ST_SHARE_DIR,${PREFIX}/${ST_SHARE_DIR},g' |
51 | SUBST_SED.dictionary-app+= -e 's,ST_SHARE_BIN,${PREFIX}/${ST_SHARE_BIN},g' | | 51 | SUBST_SED.dictionary-app+= -e 's,ST_SHARE_BIN,${PREFIX}/${ST_SHARE_BIN},g' |
52 | | | 52 | |
53 | pre-build: | | 53 | pre-build: |
54 | cd ${WRKSRC} && ${UTF8_ENV} emacs --batch \ | | 54 | cd ${WRKSRC} && ${UTF8_ENV} emacs --batch \ |
55 | --eval='(setq pthai-bootstrap t)' \ | | 55 | --eval='(setq pthai-bootstrap t)' \ |
56 | --eval='(load-file "pthai.el")' \ | | 56 | --eval='(load-file "pthai.el")' \ |
57 | --eval='(pthai-twt-table-save "thai-word-dict")' | | 57 | --eval='(pthai-twt-table-save "thai-word-dict")' |
58 | cp ${WRKDIR}/thaidict-${GITHUB_ICU_TAG}.txt ${WRKSRC}/icu-dict | | 58 | cp ${WRKDIR}/thaidict-${GITHUB_ICU_TAG}.txt ${WRKSRC}/icu-dict |
59 | cd ${PREFIX}/share/swath && \ | | 59 | cd ${PREFIX}/share/swath && \ |
60 | ${UTF8_ENV} trietool swathdic list | \ | | 60 | ${UTF8_ENV} trietool swathdic list | \ |