From 8a47c6dfcfa24d1505577a94b1309e8233624cd3 Mon Sep 17 00:00:00 2001 From: Alejandro Pulver Date: Fri, 20 Oct 2006 18:08:06 +0000 Subject: [PATCH] - Add wrapper script to respect PREFIX at runtime. - Use IA32_BINARY_PORT instead of ONLY_FOR_ARCHS. - Bump PORTREVISION. Approved by: portmgr (erwin) --- shells/ch/Makefile | 9 +++++---- shells/ch/files/ch.in | 7 +++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 shells/ch/files/ch.in 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 .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" "$@"