aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shells/ch/Makefile9
-rw-r--r--shells/ch/files/ch.in7
2 files changed, 12 insertions, 4 deletions
diff --git a/shells/ch/Makefile b/shells/ch/Makefile
index a75a4a6951e7..e70431251280 100644
--- a/shells/ch/Makefile
+++ b/shells/ch/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ch
PORTVERSION= 5.1.0
+PORTREVISION= 1
CATEGORIES= shells
MASTER_SITES= http://www.softintegration.com/download/software/release/FreeBSD/
DISTNAME= chstandard-${PORTVERSION}.freebsd5.1
@@ -14,13 +15,13 @@ DISTNAME= chstandard-${PORTVERSION}.freebsd5.1
MAINTAINER= alepulver@FreeBSD.org
COMMENT= An embeddable C/C++ interpreter/shell
-# possibly ia64?
-ONLY_FOR_ARCHS= i386 amd64
-ONLY_FOR_ARCHS_REASON= is an i386 binary
+IA32_BINARY_PORT= yes
NO_BUILD= yes
DATADIR= ${PREFIX}/${PORTNAME}
+SUB_FILES= ${PORTNAME}
+
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 500000
@@ -34,7 +35,7 @@ LIB_DEPENDS+= c.4:${PORTSDIR}/misc/compat4x
do-install:
${MKDIR} ${DATADIR}
${TAR} zxf ${WRKSRC}/ch.bin -C ${DATADIR}
- ${LN} -s ${DATADIR}/bin/ch ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
post-install:
@if ${GREP} -q '${PREFIX}/bin/ch' /etc/shells; then ${TRUE}; else \
diff --git a/shells/ch/files/ch.in b/shells/ch/files/ch.in
new file mode 100644
index 000000000000..1974bd8825b2
--- /dev/null
+++ b/shells/ch/files/ch.in
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# This program needs to know where to find its data, so we pass that
+# information using the CHHOME environment variable.
+
+export CHHOME="%%DATADIR%%"
+exec "$CHHOME/bin/ch" "$@"