diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2011-06-19 00:58:26 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2011-06-19 00:58:26 +0000 |
commit | e082dab1964eb75839578857962c2090babb1c8c (patch) | |
tree | 1b82dda31fa9aabf60d52458f37d4f79a5849dff /shells/ksh93 | |
parent | 02260425c80d6c4be05e108d64906412842a41b0 (diff) | |
download | ports-e082dab1964eb75839578857962c2090babb1c8c.tar.gz ports-e082dab1964eb75839578857962c2090babb1c8c.zip |
Notes
Diffstat (limited to 'shells/ksh93')
-rw-r--r-- | shells/ksh93/Makefile | 51 | ||||
-rw-r--r-- | shells/ksh93/pkg-plist | 13 |
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%% |