aboutsummaryrefslogtreecommitdiffstats
path: root/shells/ksh93
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2011-06-19 08:58:26 +0800
committersunpoet <sunpoet@FreeBSD.org>2011-06-19 08:58:26 +0800
commiteba45f04f761395fa7a87bd88158cfeb32f2f8e8 (patch)
tree36f6fa83700fd6e196577317da6d89506c453e65 /shells/ksh93
parentbe63dd772ba924f7fad575ddddaadb39f4691f60 (diff)
downloadfreebsd-ports-gnome-eba45f04f761395fa7a87bd88158cfeb32f2f8e8.tar.gz
freebsd-ports-gnome-eba45f04f761395fa7a87bd88158cfeb32f2f8e8.tar.zst
freebsd-ports-gnome-eba45f04f761395fa7a87bd88158cfeb32f2f8e8.zip
- Remove INSTALLROOT completely
- Add OPTIONS: STATIC - Change manipulation on /etc/shells - Respect PORTEXAMPLES - Bump PORTREVISION for PLIST change
Diffstat (limited to 'shells/ksh93')
-rw-r--r--shells/ksh93/Makefile51
-rw-r--r--shells/ksh93/pkg-plist13
2 files changed, 31 insertions, 33 deletions
diff --git a/shells/ksh93/Makefile b/shells/ksh93/Makefile
index 2cd8d07a0045..db00ae7b2360 100644
--- a/shells/ksh93/Makefile
+++ b/shells/ksh93/Makefile
@@ -16,59 +16,58 @@
#
PORTNAME= ksh93
-PORTVERSION= ${VERSION:S/-//g}
+PORTVERSION= ${KSHVERSION:S/-//g}
+PORTREVISION= 1
CATEGORIES= shells
MASTER_SITES= http://www.research.att.com/~gsf/download/tgz/
-DISTNAME= ${PORTNAME}-${VERSION}
-DISTFILES= INIT.${VERSION}.tgz ast-ksh.${VERSION}.tgz
+DISTFILES= INIT.${KSHVERSION}.tgz ast-ksh.${KSHVERSION}.tgz
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Official AT&T release of KornShell 93
-MANUAL_PACKAGE_BUILD=Doesn't build in tinderbox environment
+OPTIONS= STATIC "Static linking" off
-VERSION= 2011-02-08
+MANUAL_PACKAGE_BUILD= Does not build in tinderbox environment
RESTRICTED= Source recipient must acknowledge license
FETCH_ARGS= -Rr
FETCH_ENV= HTTP_AUTH='basic:*:I accept www.opensource.org/licenses/cpl:.'
-NO_WRKSUBDIR= yes
MAKE_ENV= CCFLAGS="${CFLAGS}"
-.if defined(WANT_STATIC)
-MAKE_ENV+= LDFLAGS=-static
-.endif
+NO_WRKSUBDIR= yes
MAN1= ksh93.1
-INSTALLROOT= ${WRKSRC}/arch/freebsd.${ARCH}
+KSHVERSION= 2011-02-08
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_STATIC)
+MAKE_ENV+= LDFLAGS=-static
+.endif
post-patch:
- @${REINPLACE_CMD} -e '1825 D' ${WRKSRC}/bin/package
+ @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' \
+ ${WRKSRC}/bin/package ${WRKSRC}/src/cmd/INIT/package.sh
do-build:
- @cd ${WRKSRC} && ${SETENV} -i ${MAKE_ENV} ${SH} bin/package make
+ @cd ${WRKSRC} && ${SETENV} -i ${MAKE_ENV} ${SH} bin/package flat make
do-install:
- ${INSTALL_PROGRAM} ${INSTALLROOT}/bin/ksh ${PREFIX}/bin/ksh93
- ${INSTALL_MAN} ${INSTALLROOT}/man/man1/sh.1 \
- ${MANPREFIX}/man/man1/ksh93.1
- ${MKDIR} ${PREFIX}/share/examples/ksh93
-.for fun in dirs popd pushd
- ${INSTALL_SCRIPT} ${INSTALLROOT}/fun/${fun} \
- ${PREFIX}/share/examples/ksh93/
-.endfor
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/ksh ${PREFIX}/bin/ksh93
+ ${INSTALL_MAN} ${WRKSRC}/man/man1/sh.1 ${MAN1PREFIX}/man/man1/ksh93.1
+.if !defined(NOPORTEXAMPLES)
+ ${MKDIR} ${EXAMPLESDIR}/
+ cd ${WRKSRC}/fun/ && ${INSTALL_SCRIPT} dirs popd pushd ${EXAMPLESDIR}/
+.endif
post-install:
@${ECHO} "Updating /etc/shells"
- @${CP} /etc/shells /etc/shells.bak
- @(${GREP} -v ${PREFIX}/bin/ksh93 /etc/shells.bak; \
- ${ECHO_CMD} ${PREFIX}/bin/ksh93) >/etc/shells
- @${RM} -f /etc/shells.bak
+ @${SED} -i '' '\|${PREFIX}/bin/ksh93|d' /etc/shells
+ @${ECHO} ${PREFIX}/bin/ksh93 >> /etc/shells
test: build
@cd ${WRKSRC}/src/cmd/ksh93/tests && \
- ${SETENV} SHELL=${INSTALLROOT}/bin/ksh \
- ${INSTALLROOT}/bin/ksh shtests
+ ${SETENV} SHELL=${WRKSRC}/bin/ksh ${WRKSRC}/bin/ksh shtests
.include <bsd.port.mk>
diff --git a/shells/ksh93/pkg-plist b/shells/ksh93/pkg-plist
index fa4cb8a5e905..255ace3072f6 100644
--- a/shells/ksh93/pkg-plist
+++ b/shells/ksh93/pkg-plist
@@ -1,8 +1,7 @@
-@comment $FreeBSD$
bin/ksh93
-@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
-@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
-%%EXAMPLESDIR%%/dirs
-%%EXAMPLESDIR%%/popd
-%%EXAMPLESDIR%%/pushd
-@dirrm %%EXAMPLESDIR%%
+@exec echo "Updating /etc/shells"; sed -i "" "\|%D/%F|d" /etc/shells; echo %D/%F >> /etc/shells
+@unexec echo "Updating /etc/shells"; sed -i "" "\|%D/%F|d" /etc/shells
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dirs
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/popd
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pushd
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%