aboutsummaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-04-19 15:11:51 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-04-19 15:11:51 +0000
commit6808e35e8d3fabfa3642a68719578c6f21dc4d6f (patch)
tree283fff889624ed0d29e0d630165912ce8effb54e /chinese
parent5199342778d57ed41897de44ce257f08b2025fa8 (diff)
downloadports-6808e35e8d3fabfa3642a68719578c6f21dc4d6f.tar.gz
ports-6808e35e8d3fabfa3642a68719578c6f21dc4d6f.zip
Notes
Diffstat (limited to 'chinese')
-rw-r--r--chinese/cwtex/Makefile5
-rw-r--r--chinese/cwtex/pkg-deinstall17
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