diff options
author | rafan <rafan@FreeBSD.org> | 2007-04-19 23:11:51 +0800 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2007-04-19 23:11:51 +0800 |
commit | 3a13e0dd4df90b5e8aea3dd3dcf65de426600656 (patch) | |
tree | b1f43a565c106557a1de44fe18e9fb0d8b2106ed /chinese/cwtex | |
parent | e73a38d9e0cc33a5852257d162857eb70fd14d7b (diff) | |
download | freebsd-ports-gnome-3a13e0dd4df90b5e8aea3dd3dcf65de426600656.tar.gz freebsd-ports-gnome-3a13e0dd4df90b5e8aea3dd3dcf65de426600656.tar.zst freebsd-ports-gnome-3a13e0dd4df90b5e8aea3dd3dcf65de426600656.zip |
- Use kpsewhich to find correct dvips's config
Diffstat (limited to 'chinese/cwtex')
-rw-r--r-- | chinese/cwtex/Makefile | 5 | ||||
-rw-r--r-- | chinese/cwtex/pkg-deinstall | 17 |
2 files changed, 13 insertions, 9 deletions
diff --git a/chinese/cwtex/Makefile b/chinese/cwtex/Makefile index a5a989dff555..8854b7840193 100644 --- a/chinese/cwtex/Makefile +++ b/chinese/cwtex/Makefile @@ -7,6 +7,7 @@ PORTNAME= cwtex PORTVERSION= 16.6 +PORTREVISION= 1 CATEGORIES= chinese MASTER_SITES= http://ftp.ussg.iu.edu/FreeBSD/distfiles/ \ http://ftp.nara.wide.ad.jp/pub/FreeBSD/distfiles/ @@ -29,11 +30,13 @@ do-install: cd ${WRKSRC}/share && ${FIND} * \ | ${CPIO} -dpum --quiet -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share ${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/bin/ - ${CAT} ${FILESDIR}/config.ps >> ${PREFIX}/share/texmf/dvips/config/config.ps + ${CAT} ${FILESDIR}/config.ps >> ${PSFONTSMAP} mktexlsr .include <bsd.port.pre.mk> +PSFONTSMAP!= ${LOCALBASE}/bin/kpsewhich -format 'dvips config' config.ps + .if ${ARCH} == "ia64" || ${ARCH} == "sparc64" BROKEN= Does not install on ia64 or sparc64 .endif diff --git a/chinese/cwtex/pkg-deinstall b/chinese/cwtex/pkg-deinstall index 495112032868..d55189a489ee 100644 --- a/chinese/cwtex/pkg-deinstall +++ b/chinese/cwtex/pkg-deinstall @@ -5,13 +5,14 @@ if [ "x$2" != "xDEINSTALL" ]; then exit 0 fi -TEXMFMAIN=`kpsexpand '$TEXMFMAIN'` -PSFONTSMAP=${TEXMFMAIN}/dvips/config/config.ps +PSFONTSMAP=`kpsewhich -format 'dvips config' config.ps` -# Edit dvips/config/config.ps -sed -e /%cwtex_begin/,/%cwtex_end/d $PSFONTSMAP > $PSFONTSMAP.tmp -if [ -s "$PSFONTSMAP.tmp" ]; then - mv $PSFONTSMAP.tmp $PSFONTSMAP -else - rm $PSFONTSMAP.tmp $PSFONTSMAP +if [ -f "${PSFONTSMAP}" ]; then + # Edit dvips/config/config.ps + sed -e /%cwtex_begin/,/%cwtex_end/d $PSFONTSMAP > $PSFONTSMAP.tmp + if [ -s "$PSFONTSMAP.tmp" ]; then + mv $PSFONTSMAP.tmp $PSFONTSMAP + else + rm $PSFONTSMAP.tmp $PSFONTSMAP + fi fi |