summaryrefslogtreecommitdiffstats
path: root/print/teTeX-base
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2006-05-20 16:40:55 +0000
committerhrs <hrs@FreeBSD.org>2006-05-20 16:40:55 +0000
commit7b5d96e4f1dba06d1c92f7655e7ad03541dbeeb2 (patch)
tree366a76a9124cba0e68854b5fe49926bfa9896129 /print/teTeX-base
parent6d2f130408ec8058c1e6261e58f30038f229169e (diff)
downloadFreeBSD-ports-7b5d96e4f1dba06d1c92f7655e7ad03541dbeeb2.zip
FreeBSD-ports-7b5d96e4f1dba06d1c92f7655e7ad03541dbeeb2.tar.gz
Add a wrapper script for texdoctk(1).
PR: ports/59553 Submitted by: Rong-En Fan (rafan at infor dot org)
Diffstat (limited to 'print/teTeX-base')
-rw-r--r--print/teTeX-base/Makefile6
-rw-r--r--print/teTeX-base/files/texdoctk.wrapper.in15
-rw-r--r--print/teTeX-base/pkg-plist1
3 files changed, 20 insertions, 2 deletions
diff --git a/print/teTeX-base/Makefile b/print/teTeX-base/Makefile
index 2397f5c..b489701 100644
--- a/print/teTeX-base/Makefile
+++ b/print/teTeX-base/Makefile
@@ -7,7 +7,7 @@
PORTNAME= teTeX-base
PORTVERSION= 3.0
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_TEX_CTAN} \
ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex/dvips/:1
@@ -139,7 +139,7 @@ PLIST_SUB+= TEXMFDIR=${TEXMFDIR} \
FMTUTIL_SYS=${FMTUTIL_SYS} \
UPDMAP_SYS=${UPDMAP_SYS} \
SETENV=${SETENV}
-SUB_FILES= pkg-message
+SUB_FILES= pkg-message texdoctk.wrapper
SUB_LIST= TEXMFDIR=${TEXMFDIR} \
TEXMFDISTDIR=${TEXMFDISTDIR} \
PREFIX=${PREFIX}
@@ -171,6 +171,8 @@ pre-su-install:
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/utils/texinfo/util/texi2dvi ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/utils/texinfo/util/texi2pdf ${PREFIX}/bin
+ ${MV} -f ${PREFIX}/bin/texdoctk ${PREFIX}/bin/texdoctk.real
+ ${INSTALL_SCRIPT} ${WRKDIR}/texdoctk.wrapper ${PREFIX}/bin/texdoctk
${MKTEXLSR}
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
diff --git a/print/teTeX-base/files/texdoctk.wrapper.in b/print/teTeX-base/files/texdoctk.wrapper.in
new file mode 100644
index 0000000..6c9e83a
--- /dev/null
+++ b/print/teTeX-base/files/texdoctk.wrapper.in
@@ -0,0 +1,15 @@
+#!/bin/sh
+# $FreeBSD$
+
+# Check if Tk module installed or not.
+%%PREFIX%%/bin/perl -MTk -e '' 2>/dev/null
+
+if [ $? -ne 0 ]; then
+ echo "You do not have Perl module Tk installed. To use $0,"
+ echo "install the p5-Tk package (x11-toolkits/p5-Tk)"
+ echo "(this package requires Perl 5.8 or higher)."
+ echo "Then, try it again."
+ exit 1
+fi
+
+exec %%PREFIX%%/bin/texdoctk.real "$@"
diff --git a/print/teTeX-base/pkg-plist b/print/teTeX-base/pkg-plist
index d7b222b..991e7e4 100644
--- a/print/teTeX-base/pkg-plist
+++ b/print/teTeX-base/pkg-plist
@@ -86,6 +86,7 @@ bin/texconfig-dialog
bin/texconfig-sys
bin/texdoc
bin/texdoctk
+bin/texdoctk.real
bin/texexec
bin/texlinks
bin/updmap
OpenPOWER on IntegriCloud