Skip to content

Commit 2e6a631

Browse files
committed
att/ast on Github has branched ksh2020 and reverted mainline back to
ksh93u+ and v-. See github commit 0be82553e98be77238577bc0eaafda0f1cf807fe. To learn how and why our att/ast upstream made this decision see att/ast#1464 and att/ast#1466. The next steps will be to update shells/ksh93-devel to att/ast master. shells/ksh93 will likely be based on att/ast master at 0be82553e98be77238577bc0eaafda0f1cf807fe or some future tag or branch. git-svn-id: svn+ssh://svn.freebsd.org/ports/head@525624 35697150-7ecd-e111-bb59-0022644237b5
1 parent 1ef949d commit 2e6a631

8 files changed

+174
-0
lines changed

shells/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
SUBDIR += ion
2626
SUBDIR += jailkit
2727
SUBDIR += klish
28+
SUBDIR += ksh2020
2829
SUBDIR += ksh93
2930
SUBDIR += ksh93-devel
3031
SUBDIR += lshell

shells/ksh2020/Makefile

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# $FreeBSD$
2+
3+
PORTNAME= ksh2020
4+
PORTVERSION= 2020
5+
CATEGORIES= shells
6+
7+
MAINTAINER= cy@FreeBSD.org
8+
COMMENT= Development branch of AT&T KornShell 93
9+
10+
LICENSE= EPL
11+
12+
USES= compiler:c11 meson ninja python:build
13+
14+
USE_GITHUB= yes
15+
GH_ACCOUNT= att
16+
GH_PROJECT= ast
17+
GH_TAGNAME= ksh2020
18+
19+
KSH_CONFLICTS= pdksh-*
20+
KSH93_CONFLICTS= ksh93-* ast-ksh-*
21+
22+
MESON_BUILD_DIR= build
23+
24+
OPTIONS_DEFAULT= KSH93
25+
OPTIONS_SINGLE= BIN_KSH
26+
OPTIONS_SINGLE_BIN_KSH= KSH KSH93
27+
KSH_DESC= Install to ${PREFIX}/bin/ksh
28+
KSH93_DESC= Install to ${PREFIX}/bin/ksh93
29+
30+
KSH93_EXTRA_PATCHES= ${FILESDIR}/extra-patch-install-as-ksh93 \
31+
${FILESDIR}/extra-patch-install-as-ksh93-doc
32+
33+
KSH_PLIST_SUB= 93=""
34+
KSH93_PLIST_SUB= 93="93"
35+
36+
.include <bsd.port.options.mk>
37+
38+
post-patch:
39+
@${REINPLACE_CMD} -e '/for name in/ s|python.*|${PYTHON_CMD}|g' ${WRKSRC}/scripts/python.sh
40+
@${REINPLACE_CMD} -e 's|SF_FLAGS|SFIO_FLAGS|g' ${WRKSRC}/src/lib/libast/include/sfio*.h ${WRKSRC}/src/lib/libast/sfio/*.c
41+
.if ${PORT_OPTIONS:MKSH93}
42+
@${MV} ${WRKSRC}/src/cmd/ksh93/docs/ksh.1 ${WRKSRC}/src/cmd/ksh93/docs/ksh93.1
43+
.endif
44+
.if ${PORT_OPTIONS:MKSH}
45+
@# Keep portlint happy
46+
.endif
47+
48+
.include <bsd.port.mk>

shells/ksh2020/distinfo

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
TIMESTAMP = 1581224799
2+
SHA256 (att-ast-2020-ksh2020_GH0.tar.gz) = b90129a1c5234edfdd10326d41920bc9b5e4b274ab3022c6749a93be0ec898a7
3+
SIZE (att-ast-2020-ksh2020_GH0.tar.gz) = 2229912
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--- src/cmd/ksh93/meson.build.orig 2020-01-30 18:34:35.000000000 -0800
2+
+++ src/cmd/ksh93/meson.build 2020-01-30 20:47:13.410465000 -0800
3+
@@ -26,7 +26,7 @@
4+
dependencies: [libm_dep, libexecinfo_dep, libdl_dep, libsocket_dep, libnsl_dep],
5+
install: get_option('default_library') == 'shared')
6+
7+
-ksh93_exe = executable('ksh', ['sh/pmain.c'], c_args: shared_c_args,
8+
+ksh93_exe = executable('ksh93', ['sh/pmain.c'], c_args: shared_c_args,
9+
include_directories: [configuration_incdir, ksh93_incdir],
10+
link_with: [libksh, libast, libcmd, libdll],
11+
dependencies: [libm_dep, libexecinfo_dep, libdl_dep],
12+
@@ -34,11 +34,11 @@
13+
14+
# Create a symlink for a restricted version of the ksh shell.
15+
create_rksh_symlink = find_program(source_dir + '/scripts/create_rksh_symlink')
16+
-rksh93_exe = custom_target('rksh', input: ksh93_exe, output: 'rksh', build_by_default: true,
17+
+rksh93_exe = custom_target('rksh', input: ksh93_exe, output: 'rksh93', build_by_default: true,
18+
install: true, install_mode: 'rwxr-xr-x', install_dir: install_prefix + '/bin',
19+
command: [create_rksh_symlink, '@INPUT@'])
20+
21+
-shcomp_exe = executable('shcomp', ['sh/shcomp.c'], c_args: shared_c_args,
22+
+shcomp_exe = executable('shcomp93', ['sh/shcomp.c'], c_args: shared_c_args,
23+
include_directories: [configuration_incdir, ksh93_incdir],
24+
link_with: [libksh, libast, libcmd, libdll],
25+
dependencies: [libm_dep, libexecinfo_dep, libdl_dep, libsocket_dep, libnsl_dep],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- src/cmd/ksh93/docs/meson.build.orig 2019-09-16 17:08:04.000000000 -0700
2+
+++ src/cmd/ksh93/docs/meson.build 2019-09-17 12:15:14.321848000 -0700
3+
@@ -3,6 +3,6 @@
4+
# default man page directory: /usr/local/share/man/man1. The man pages for individual builtins will
5+
# be installed in /usr/local/share/ksh/man.
6+
#
7+
-install_man('ksh.1', install_mode: 'rw-r--r--')
8+
+install_man('ksh93.1', install_mode: 'rw-r--r--')
9+
10+
# See also scripts/install_aux_files.sh which takes care of installing the private man pages.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- scripts/builtin_documentation.sh.orig 2019-08-30 05:32:36.000000000 -0700
2+
+++ scripts/builtin_documentation.sh 2019-08-30 12:40:24.125856000 -0700
3+
@@ -8,6 +8,6 @@
4+
cmd_name=$(basename "$in_file" .1)
5+
[ "$cmd_name" = ksh ] && continue
6+
echo "const char sh_opt${cmd_name}[] ="
7+
- sed -e 's/\(.*\)/ "\1\\n"/' < "$in_file"
8+
+ sed -e 's/"//g;s/\(.*\)/ "\1\\n"/' < "$in_file"
9+
echo ";"
10+
done

shells/ksh2020/pkg-descr

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

shells/ksh2020/pkg-plist

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
@shell bin/ksh%%93%%
2+
@shell bin/rksh%%93%%
3+
bin/shcomp%%93%%
4+
man/man1/ksh%%93%%.1.gz
5+
share/ksh/config.ksh
6+
share/ksh/functions/cd
7+
share/ksh/functions/_ksh_print_help
8+
share/ksh/functions/dirs
9+
share/ksh/functions/man
10+
share/ksh/functions/mcd
11+
share/ksh/functions/popd
12+
share/ksh/functions/pushd
13+
share/ksh/man/man1/alias.1
14+
share/ksh/man/man1/basename.1
15+
share/ksh/man/man1/bg.1
16+
share/ksh/man/man1/break.1
17+
share/ksh/man/man1/builtin.1
18+
share/ksh/man/man1/cat.1
19+
share/ksh/man/man1/cd.1
20+
share/ksh/man/man1/chmod.1
21+
share/ksh/man/man1/cmp.1
22+
share/ksh/man/man1/command.1
23+
share/ksh/man/man1/compgen.1
24+
share/ksh/man/man1/complete.1
25+
share/ksh/man/man1/continue.1
26+
share/ksh/man/man1/cut.1
27+
share/ksh/man/man1/dirname.1
28+
share/ksh/man/man1/disown.1
29+
share/ksh/man/man1/echo.1
30+
share/ksh/man/man1/enum.1
31+
share/ksh/man/man1/eval.1
32+
share/ksh/man/man1/exec.1
33+
share/ksh/man/man1/exit.1
34+
share/ksh/man/man1/export.1
35+
share/ksh/man/man1/fg.1
36+
share/ksh/man/man1/head.1
37+
share/ksh/man/man1/hist.1
38+
share/ksh/man/man1/jobs.1
39+
share/ksh/man/man1/kill.1
40+
share/ksh/man/man1/let.1
41+
share/ksh/man/man1/logname.1
42+
share/ksh/man/man1/mkdir.1
43+
share/ksh/man/man1/print.1
44+
share/ksh/man/man1/printf.1
45+
share/ksh/man/man1/pwd.1
46+
share/ksh/man/man1/read.1
47+
share/ksh/man/man1/readonly.1
48+
share/ksh/man/man1/return.1
49+
share/ksh/man/man1/shcomp.1
50+
share/ksh/man/man1/shift.1
51+
share/ksh/man/man1/sleep.1
52+
share/ksh/man/man1/source.1
53+
share/ksh/man/man1/sync.1
54+
share/ksh/man/man1/test.1
55+
share/ksh/man/man1/times.1
56+
share/ksh/man/man1/trap.1
57+
share/ksh/man/man1/ulimit.1
58+
share/ksh/man/man1/umask.1
59+
share/ksh/man/man1/unalias.1
60+
share/ksh/man/man1/uname.1
61+
share/ksh/man/man1/unset.1
62+
share/ksh/man/man1/wait.1
63+
share/ksh/man/man1/wc.1
64+
share/ksh/man/man1/whence.1

0 commit comments

Comments
 (0)