Sun Mar 21 19:42:52 2021 UTC ()
Move all SUBST_STAGE to pre-configure


(scole)
diff -r1.17 -r1.18 pkgsrc/textproc/split-thai/Makefile

cvs diff -r1.17 -r1.18 pkgsrc/textproc/split-thai/Makefile (expand / switch to unified diff)

--- pkgsrc/textproc/split-thai/Makefile 2021/03/21 18:25:22 1.17
+++ pkgsrc/textproc/split-thai/Makefile 2021/03/21 19:42:52 1.18
@@ -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
3ST_VERSION= 2.1 3ST_VERSION= 2.1
4PKGNAME= split-thai-${ST_VERSION} 4PKGNAME= split-thai-${ST_VERSION}
5CATEGORIES= textproc 5CATEGORIES= textproc
6 6
7MAINTAINER= scole@NetBSD.org 7MAINTAINER= scole@NetBSD.org
8HOMEPAGE= https://ftp.NetBSD.org/pub/pkgsrc/distfiles/LOCAL_PORTS/ 8HOMEPAGE= https://ftp.NetBSD.org/pub/pkgsrc/distfiles/LOCAL_PORTS/
9COMMENT= Utilities and an emacs library to split UTF-8 Thai text into words 9COMMENT= 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
11LICENSE= 2-clause-bsd AND public-domain AND mit AND gnu-gpl-v2 11LICENSE= 2-clause-bsd AND public-domain AND mit AND gnu-gpl-v2
12 12
13GITHUB_ICU_TAG= 61607c27732906d36c5bd4d23ecc092f89f53a2b 13GITHUB_ICU_TAG= 61607c27732906d36c5bd4d23ecc092f89f53a2b
14DISTFILES= split-thai-${ST_VERSION}.tgz thaidict-${GITHUB_ICU_TAG}.txt 14DISTFILES= 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
34ST_SHARE_BIN= bin 34ST_SHARE_BIN= bin
35INSTALLATION_DIRS= ${ST_SHARE_BIN} ${ST_SHARE_DIR} 35INSTALLATION_DIRS= ${ST_SHARE_BIN} ${ST_SHARE_DIR}
36 36
37ST_SHARE_FILES= README.txt pthai.el sampledict.txt words words.tri 37ST_SHARE_FILES= README.txt pthai.el sampledict.txt words words.tri
38 38
39# xxx REPLACE_EMACS_SCRIPT 39# xxx REPLACE_EMACS_SCRIPT
40SUBST_CLASSES+= st-emacs-app 40SUBST_CLASSES+= st-emacs-app
41SUBST_STAGE.st-emacs-app= pre-configure 41SUBST_STAGE.st-emacs-app= pre-configure
42SUBST_MESSAGE.st-emacs-app= Fixing emacs script paths. 42SUBST_MESSAGE.st-emacs-app= Fixing emacs script paths.
43SUBST_FILES.st-emacs-app= st-emacs 43SUBST_FILES.st-emacs-app= st-emacs
44SUBST_SED.st-emacs-app= -e 's,!/bin/emacs,!${PREFIX}/bin/emacs,g' 44SUBST_SED.st-emacs-app= -e 's,!/bin/emacs,!${PREFIX}/bin/emacs,g'
45 45
46SUBST_CLASSES+= dictionary-app 46SUBST_CLASSES+= dictionary-app
47SUBST_STAGE.dictionary-app= post-extract 47SUBST_STAGE.dictionary-app= pre-configure
48SUBST_MESSAGE.dictionary-app= Fixing dictionary paths. 48SUBST_MESSAGE.dictionary-app= Fixing dictionary paths.
49SUBST_FILES.dictionary-app= st-emacs st-swath st-wordbreak pthai.el 49SUBST_FILES.dictionary-app= st-emacs st-swath st-wordbreak pthai.el
50SUBST_SED.dictionary-app= -e 's,ST_SHARE_DIR,${PREFIX}/${ST_SHARE_DIR},g' 50SUBST_SED.dictionary-app= -e 's,ST_SHARE_DIR,${PREFIX}/${ST_SHARE_DIR},g'
51SUBST_SED.dictionary-app+= -e 's,ST_SHARE_BIN,${PREFIX}/${ST_SHARE_BIN},g' 51SUBST_SED.dictionary-app+= -e 's,ST_SHARE_BIN,${PREFIX}/${ST_SHARE_BIN},g'
52 52
53pre-build: 53pre-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 | \