aboutsummaryrefslogtreecommitdiff
path: root/print/xdvi
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2005-03-25 06:11:28 +0000
committerHiroki Sato <hrs@FreeBSD.org>2005-03-25 06:11:28 +0000
commit5ea01e4a24cc4ec56a78ccce3a18511036516a12 (patch)
tree77b1f5520ad0aa6583c4228e88ea4f21a90b51a7 /print/xdvi
parent248fe32bb2387772af3df3517f791c47811f9626 (diff)
downloadports-5ea01e4a24cc4ec56a78ccce3a18511036516a12.tar.gz
ports-5ea01e4a24cc4ec56a78ccce3a18511036516a12.zip
Notes
Diffstat (limited to 'print/xdvi')
-rw-r--r--print/xdvi/Makefile25
-rw-r--r--print/xdvi/pkg-deinstall8
-rw-r--r--print/xdvi/pkg-install11
-rw-r--r--print/xdvi/pkg-plist6
-rw-r--r--print/xdvi/scripts/configure2
5 files changed, 27 insertions, 25 deletions
diff --git a/print/xdvi/Makefile b/print/xdvi/Makefile
index dc9c657e92f2..20843c690c6c 100644
--- a/print/xdvi/Makefile
+++ b/print/xdvi/Makefile
@@ -7,7 +7,7 @@
PORTNAME= xdvi
PORTVERSION= pl20
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
MASTER_SITE_SUBDIR= applications
@@ -19,10 +19,13 @@ COMMENT= A DVI Previewer for the X Window System
CONFLICTS= teTeX-*
-DIST_SUBDIR= xdvi # to share distfiles with japanese/xdvi
+DIST_SUBDIR= xdvi
USE_REINPLACE= yes
USE_IMAKE= yes
USE_GMAKE= yes
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+PLIST_SUB= LOCALBASE=${LOCALBASE}
XMKMF= xmkmf
.if defined(PACKAGE_BUILDING)
SCRIPTS_ENV= PACKAGE_BUILDING=${PACKAGE_BUILDING}
@@ -34,19 +37,13 @@ MAN1= xdvi.1
post-configure:
@${REINPLACE_CMD} -e "s=distclean::=distclean:=g" ${WRKSRC}/Makefile
-
-pre-install:
- @if ${LS} ${PKG_DBDIR} | grep -qi ^tetex; then\
- ${ECHO_MSG} "*** WARNING ***";\
- ${ECHO_MSG} "This port conflicts with teTeX! If you have already installed";\
- ${ECHO_MSG} "teTeX, you may want to backup the xdvi and MakeTeXPK commands.";\
- ${ECHO};\
- ${ECHO_MSG} "To cancel or suspend installation, press control-C or control-Z.";\
- for i in 1 2 3 4 5; do ${ECHO} -n ; sleep 1; done; fi
+.for F in pkg-install pkg-deinstall
+ ${SED} -e "s=%%PREFIX%%=${PREFIX}=" \
+ -e "s=%%LOCALBASE%%=${LOCALBASE}=" \
+ < ${PKGDIR}/${F} > ${WRKDIR}/${F}
+.endfor
do-install:
- @${MKDIR} ${PREFIX}/man/man1
- @${MKDIR} ${PREFIX}/bin
@(cd ${WRKSRC}; ${GMAKE} install.man \
MANDIR=${PREFIX}/man/man1 MANSUFFIX=1)
@(cd ${WRKSRC}; ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} xdvi.man)
@@ -54,6 +51,6 @@ do-install:
@(cd ${WRKSRC}; ${INSTALL_SCRIPT} MakeTeXPK ${PREFIX}/bin)
post-install:
- @if [ -f ${WRKDIR}/post-install ]; then sh ${WRKDIR}/post-install; fi
+ @if [ -f ${WRKDIR}/post-install ]; then ${SH} ${WRKDIR}/post-install; fi
.include <bsd.port.mk>
diff --git a/print/xdvi/pkg-deinstall b/print/xdvi/pkg-deinstall
index 2149add34d40..57c4944db74d 100644
--- a/print/xdvi/pkg-deinstall
+++ b/print/xdvi/pkg-deinstall
@@ -1,10 +1,14 @@
#!/bin/sh
-prefix=/usr/local
+prefix=%%PREFIX%%
+
+if [ "$2" != "DEINSTALL" ]; then
+ exit 0
+fi
cat << END
-Installing xdvi will remove $prefix/MakeTeXPK. This file may be used by
+Installing xdvi will remove $prefix/bin/MakeTeXPK. This file may be used by
dvips or other programs. If this is the case, you must make a backup of
this file now.
diff --git a/print/xdvi/pkg-install b/print/xdvi/pkg-install
index 0f2935bad65d..921a48c38a42 100644
--- a/print/xdvi/pkg-install
+++ b/print/xdvi/pkg-install
@@ -1,8 +1,9 @@
#!/bin/sh
-prefix=/usr/local
+prefix=%%PREFIX%%
+localbase=%%LOCALBASE%%
-if [ "$2" = "POST-INSTALL" ]; then
+if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
@@ -21,7 +22,7 @@ fi
cat << END
This package has been compiled with some defaults:
-1 fonts will be created in $prefix/lib/texmf/fonts/pk and this
+1 fonts will be created in ${localbase}/share/texmf/fonts/pk and this
directory will be made world writable
2 300 dpi fonts will be created with MODE=imagen
@@ -31,7 +32,7 @@ This package has been compiled with some defaults:
72 dpi fonts will be created with MODE=nextscreen
If you are not satisfied with 1, you need to recompile xdvi
-If you are not satisfied with 2, you will need to edit $prefix/MakeTeXPK
+If you are not satisfied with 2, you will need to edit $prefix/bin/MakeTeXPK
END
@@ -42,7 +43,7 @@ case $answ in
*) exit 1;;
esac
-mkdir -p $prefix/lib/texmf/fonts/pk; chmod 1777 $prefix/lib/texmf/fonts/pk
+mkdir -p ${localbase}/share/texmf/fonts/pk; chmod 1777 ${localbase}/share/texmf/fonts/pk
exit 0
diff --git a/print/xdvi/pkg-plist b/print/xdvi/pkg-plist
index ba2d0c9bc291..d1a14ecfbe5d 100644
--- a/print/xdvi/pkg-plist
+++ b/print/xdvi/pkg-plist
@@ -1,5 +1,5 @@
bin/xdvi
bin/MakeTeXPK
-@unexec rmdir %D/share/texmf/fonts/pk 2>/dev/null || true
-@unexec rmdir %D/share/texmf/fonts 2>/dev/null || true
-@unexec rmdir %D/share/texmf 2>/dev/null || true
+@unexec rmdir %%LOCALBASE%%/share/texmf/fonts/pk 2>/dev/null || true
+@unexec rmdir %%LOCALBASE%%/share/texmf/fonts 2>/dev/null || true
+@unexec rmdir %%LOCALBASE%%/share/texmf 2>/dev/null || true
diff --git a/print/xdvi/scripts/configure b/print/xdvi/scripts/configure
index fbbdd9884ea0..92d29abe2975 100644
--- a/print/xdvi/scripts/configure
+++ b/print/xdvi/scripts/configure
@@ -15,7 +15,7 @@ A4=n
prefix=$PREFIX;
if `echo $PREFIX |grep -q X11` ; then
- prefix=/usr/local
+ prefix=${LOCALBASE}
fi
CACHE=$prefix/share/texmf/fonts