shells/ksh93: Introduce new ksh port

Now that ksh development has resumed under a new account on github,
this introduces the fourth stable release (1.0.3) of ksh93/ksh to ports
This commit is contained in:
Cy Schubert 2022-08-28 12:17:30 -07:00
parent 736e2d7674
commit 039bde8216
5 changed files with 98 additions and 0 deletions

View File

@ -23,6 +23,7 @@
SUBDIR += ion
SUBDIR += jailkit
SUBDIR += klish
SUBDIR += ksh
SUBDIR += ksh-devel
SUBDIR += ksh2020
SUBDIR += ksh93

75
shells/ksh/Makefile Normal file
View File

@ -0,0 +1,75 @@
# Make sure that your configuration DOES NOT set ANY gcc-related
# variables. ksh93 will not compile if you set even the seemingly
# most unrelated variable related to gcc configuration. This means
# especially any flag which attempts to set the cputype. Setting the
# cputype does absolutely nothing except cause systems to fail in
# horrible ways. For any modern processor, setting the cputype only
# serves to expose gcc bugs and does nothing to speed up any known
# program. If you are really unconvinced, go ahead but do not
# complain to me about it.
DISTVERSIONPREFIX= v
PORTNAME= ksh
PORTVERSION= 1.0.3
CATEGORIES= shells
MAINTAINER= cy@FreeBSD.org
COMMENT= Development branch of AT&T KornShell 93
LICENSE= EPL
BROKEN_aarch64= Fails to link: missing sbrk
BROKEN_riscv64= Fails to link: missing sbrk
USES= compiler:c11
USE_GITHUB= yes
GH_ACCOUNT= ksh93
GH_PROJECT= ksh
# IMPORTANT: Disabling conflicts, i.e. -DDISABLE_CONFLICTS will result in
# arcane build failures due to already installed ksh/ksh93 in
# $PATH.
KSH_CONFLICTS= pdksh
KSH93_CONFLICTS= ksh2020 ksh93 ast-ksh ksh-devel
OPTIONS_DEFAULT= KSH93 EXAMPLES
OPTIONS_DEFINE= EXAMPLES STATIC
OPTIONS_SINGLE= BIN_KSH
OPTIONS_SINGLE_BIN_KSH= KSH KSH93
KSH_DESC= Install to ${PREFIX}/bin/ksh
KSH93_DESC= Install to ${PREFIX}/bin/ksh93
CFLAGS+= -DMAP_TYPE
LDFLAGS+= -lm
MAKE_ENV= CCFLAGS="-Wno-unused-value -Wno-parentheses -Wno-logical-op-parentheses" CFLAGS="${CFLAGS}"
STATIC_MAKE_ENV= LDFLAGS+=-static
KSH_PLIST_SUB= 93=""
KSH93_PLIST_SUB= 93="93"
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MKSH93}
PNAME= ksh93
.else
PNAME= ksh
.endif
post-patch:
@${REINPLACE_CMD} -e 's|SF_FLAGS|SFIO_FLAGS|g' ${WRKSRC}/src/lib/libast/include/sfio*.h ${WRKSRC}/src/lib/libast/sfio/*.c
do-build:
@cd ${WRKSRC}/ && ${SETENV} -i ${MAKE_ENV} ${SH} bin/package flat make
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/ksh ${STAGEDIR}${PREFIX}/bin/${PNAME}
${INSTALL_MAN} ${WRKSRC}/man/man1/sh.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/${PNAME}.1
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
cd ${WRKSRC}/fun/ && ${INSTALL_SCRIPT} dirs popd pushd ${STAGEDIR}${EXAMPLESDIR}/
do-test:
cd ${WRKSRC}/src/cmd/ksh93/tests/ && ${SETENV} SHELL=${WRKSRC}/bin/ksh ${WRKSRC}/bin/ksh shtests
.include <bsd.port.mk>

3
shells/ksh/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1661710772
SHA256 (ksh93-ksh-v1.0.3_GH0.tar.gz) = e554a96ecf7b64036ecb730fcc2affe1779a2f14145eb6a95d0dfe8b1aba66b5
SIZE (ksh93-ksh-v1.0.3_GH0.tar.gz) = 2110771

13
shells/ksh/pkg-descr Normal file
View File

@ -0,0 +1,13 @@
KSH-93 is the most recent version of the KornShell Language described
in "The KornShell Command and Programming Language," by Morris
Bolsky and David Korn of AT&T Bell Laboratories. The KornShell is
a shell programming language, which is upward compatible with "sh"
(the Bourne Shell), and is intended to conform to the IEEE P1003.2/ISO
9945.2 Shell and Utilities standard. KSH-93 provides an enhanced
programming environment in addition to the major command-entry
features of the BSD shell "csh". With KSH-93, medium-sized programming
tasks can be performed at shell-level without a significant loss
in performance. In addition, "sh" scripts can be run on KSH-93
without modification.
WWW: http://www.kornshell.com/

6
shells/ksh/pkg-plist Normal file
View File

@ -0,0 +1,6 @@
@shell bin/ksh%%93%%
man/man1/ksh%%93%%.1.gz
share/examples/ksh/dirs
share/examples/ksh/popd
share/examples/ksh/pushd