aboutsummaryrefslogtreecommitdiff
path: root/shells/ksh2020
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2020-02-09 05:32:45 +0000
committerCy Schubert <cy@FreeBSD.org>2020-02-09 05:32:45 +0000
commit235a81d83cdb34c11be89b5e6c7bfea9b4bcf6fb (patch)
tree31b988805e78d0fae5cd8d57b88270663436c398 /shells/ksh2020
parent7aae71ff082920a1de8093c55caaa840b1a2518e (diff)
downloadports-235a81d83cdb34c11be89b5e6c7bfea9b4bcf6fb.tar.gz
ports-235a81d83cdb34c11be89b5e6c7bfea9b4bcf6fb.zip
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 https://github.com/att/ast/issues/1464 and https://github.com/att/ast/issues/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.
Notes
Notes: svn path=/head/; revision=525624
Diffstat (limited to 'shells/ksh2020')
-rw-r--r--shells/ksh2020/Makefile48
-rw-r--r--shells/ksh2020/distinfo3
-rw-r--r--shells/ksh2020/files/extra-patch-install-as-ksh9325
-rw-r--r--shells/ksh2020/files/extra-patch-install-as-ksh93-doc10
-rw-r--r--shells/ksh2020/files/patch-scripts_builtin_documentation.sh10
-rw-r--r--shells/ksh2020/pkg-descr13
-rw-r--r--shells/ksh2020/pkg-plist64
7 files changed, 173 insertions, 0 deletions
diff --git a/shells/ksh2020/Makefile b/shells/ksh2020/Makefile
new file mode 100644
index 000000000000..da526975bd01
--- /dev/null
+++ b/shells/ksh2020/Makefile
@@ -0,0 +1,48 @@
+# $FreeBSD$
+
+PORTNAME= ksh2020
+PORTVERSION= 2020
+CATEGORIES= shells
+
+MAINTAINER= cy@FreeBSD.org
+COMMENT= Development branch of AT&T KornShell 93
+
+LICENSE= EPL
+
+USES= compiler:c11 meson ninja python:build
+
+USE_GITHUB= yes
+GH_ACCOUNT= att
+GH_PROJECT= ast
+GH_TAGNAME= ksh2020
+
+KSH_CONFLICTS= pdksh-*
+KSH93_CONFLICTS= ksh93-* ast-ksh-*
+
+MESON_BUILD_DIR= build
+
+OPTIONS_DEFAULT= KSH93
+OPTIONS_SINGLE= BIN_KSH
+OPTIONS_SINGLE_BIN_KSH= KSH KSH93
+KSH_DESC= Install to ${PREFIX}/bin/ksh
+KSH93_DESC= Install to ${PREFIX}/bin/ksh93
+
+KSH93_EXTRA_PATCHES= ${FILESDIR}/extra-patch-install-as-ksh93 \
+ ${FILESDIR}/extra-patch-install-as-ksh93-doc
+
+KSH_PLIST_SUB= 93=""
+KSH93_PLIST_SUB= 93="93"
+
+.include <bsd.port.options.mk>
+
+post-patch:
+ @${REINPLACE_CMD} -e '/for name in/ s|python.*|${PYTHON_CMD}|g' ${WRKSRC}/scripts/python.sh
+ @${REINPLACE_CMD} -e 's|SF_FLAGS|SFIO_FLAGS|g' ${WRKSRC}/src/lib/libast/include/sfio*.h ${WRKSRC}/src/lib/libast/sfio/*.c
+.if ${PORT_OPTIONS:MKSH93}
+ @${MV} ${WRKSRC}/src/cmd/ksh93/docs/ksh.1 ${WRKSRC}/src/cmd/ksh93/docs/ksh93.1
+.endif
+.if ${PORT_OPTIONS:MKSH}
+ @# Keep portlint happy
+.endif
+
+.include <bsd.port.mk>
diff --git a/shells/ksh2020/distinfo b/shells/ksh2020/distinfo
new file mode 100644
index 000000000000..3574817c00a0
--- /dev/null
+++ b/shells/ksh2020/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1581224799
+SHA256 (att-ast-2020-ksh2020_GH0.tar.gz) = b90129a1c5234edfdd10326d41920bc9b5e4b274ab3022c6749a93be0ec898a7
+SIZE (att-ast-2020-ksh2020_GH0.tar.gz) = 2229912
diff --git a/shells/ksh2020/files/extra-patch-install-as-ksh93 b/shells/ksh2020/files/extra-patch-install-as-ksh93
new file mode 100644
index 000000000000..0ef50874bd81
--- /dev/null
+++ b/shells/ksh2020/files/extra-patch-install-as-ksh93
@@ -0,0 +1,25 @@
+--- src/cmd/ksh93/meson.build.orig 2020-01-30 18:34:35.000000000 -0800
++++ src/cmd/ksh93/meson.build 2020-01-30 20:47:13.410465000 -0800
+@@ -26,7 +26,7 @@
+ dependencies: [libm_dep, libexecinfo_dep, libdl_dep, libsocket_dep, libnsl_dep],
+ install: get_option('default_library') == 'shared')
+
+-ksh93_exe = executable('ksh', ['sh/pmain.c'], c_args: shared_c_args,
++ksh93_exe = executable('ksh93', ['sh/pmain.c'], c_args: shared_c_args,
+ include_directories: [configuration_incdir, ksh93_incdir],
+ link_with: [libksh, libast, libcmd, libdll],
+ dependencies: [libm_dep, libexecinfo_dep, libdl_dep],
+@@ -34,11 +34,11 @@
+
+ # Create a symlink for a restricted version of the ksh shell.
+ create_rksh_symlink = find_program(source_dir + '/scripts/create_rksh_symlink')
+-rksh93_exe = custom_target('rksh', input: ksh93_exe, output: 'rksh', build_by_default: true,
++rksh93_exe = custom_target('rksh', input: ksh93_exe, output: 'rksh93', build_by_default: true,
+ install: true, install_mode: 'rwxr-xr-x', install_dir: install_prefix + '/bin',
+ command: [create_rksh_symlink, '@INPUT@'])
+
+-shcomp_exe = executable('shcomp', ['sh/shcomp.c'], c_args: shared_c_args,
++shcomp_exe = executable('shcomp93', ['sh/shcomp.c'], c_args: shared_c_args,
+ include_directories: [configuration_incdir, ksh93_incdir],
+ link_with: [libksh, libast, libcmd, libdll],
+ dependencies: [libm_dep, libexecinfo_dep, libdl_dep, libsocket_dep, libnsl_dep],
diff --git a/shells/ksh2020/files/extra-patch-install-as-ksh93-doc b/shells/ksh2020/files/extra-patch-install-as-ksh93-doc
new file mode 100644
index 000000000000..35e8b7d6dd8e
--- /dev/null
+++ b/shells/ksh2020/files/extra-patch-install-as-ksh93-doc
@@ -0,0 +1,10 @@
+--- src/cmd/ksh93/docs/meson.build.orig 2019-09-16 17:08:04.000000000 -0700
++++ src/cmd/ksh93/docs/meson.build 2019-09-17 12:15:14.321848000 -0700
+@@ -3,6 +3,6 @@
+ # default man page directory: /usr/local/share/man/man1. The man pages for individual builtins will
+ # be installed in /usr/local/share/ksh/man.
+ #
+-install_man('ksh.1', install_mode: 'rw-r--r--')
++install_man('ksh93.1', install_mode: 'rw-r--r--')
+
+ # See also scripts/install_aux_files.sh which takes care of installing the private man pages.
diff --git a/shells/ksh2020/files/patch-scripts_builtin_documentation.sh b/shells/ksh2020/files/patch-scripts_builtin_documentation.sh
new file mode 100644
index 000000000000..d89bb531bcad
--- /dev/null
+++ b/shells/ksh2020/files/patch-scripts_builtin_documentation.sh
@@ -0,0 +1,10 @@
+--- scripts/builtin_documentation.sh.orig 2019-08-30 05:32:36.000000000 -0700
++++ scripts/builtin_documentation.sh 2019-08-30 12:40:24.125856000 -0700
+@@ -8,6 +8,6 @@
+ cmd_name=$(basename "$in_file" .1)
+ [ "$cmd_name" = ksh ] && continue
+ echo "const char sh_opt${cmd_name}[] ="
+- sed -e 's/\(.*\)/ "\1\\n"/' < "$in_file"
++ sed -e 's/"//g;s/\(.*\)/ "\1\\n"/' < "$in_file"
+ echo ";"
+ done
diff --git a/shells/ksh2020/pkg-descr b/shells/ksh2020/pkg-descr
new file mode 100644
index 000000000000..ee3150bac1cd
--- /dev/null
+++ b/shells/ksh2020/pkg-descr
@@ -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/
diff --git a/shells/ksh2020/pkg-plist b/shells/ksh2020/pkg-plist
new file mode 100644
index 000000000000..0e4d7d5e0b2f
--- /dev/null
+++ b/shells/ksh2020/pkg-plist
@@ -0,0 +1,64 @@
+@shell bin/ksh%%93%%
+@shell bin/rksh%%93%%
+bin/shcomp%%93%%
+man/man1/ksh%%93%%.1.gz
+share/ksh/config.ksh
+share/ksh/functions/cd
+share/ksh/functions/_ksh_print_help
+share/ksh/functions/dirs
+share/ksh/functions/man
+share/ksh/functions/mcd
+share/ksh/functions/popd
+share/ksh/functions/pushd
+share/ksh/man/man1/alias.1
+share/ksh/man/man1/basename.1
+share/ksh/man/man1/bg.1
+share/ksh/man/man1/break.1
+share/ksh/man/man1/builtin.1
+share/ksh/man/man1/cat.1
+share/ksh/man/man1/cd.1
+share/ksh/man/man1/chmod.1
+share/ksh/man/man1/cmp.1
+share/ksh/man/man1/command.1
+share/ksh/man/man1/compgen.1
+share/ksh/man/man1/complete.1
+share/ksh/man/man1/continue.1
+share/ksh/man/man1/cut.1
+share/ksh/man/man1/dirname.1
+share/ksh/man/man1/disown.1
+share/ksh/man/man1/echo.1
+share/ksh/man/man1/enum.1
+share/ksh/man/man1/eval.1
+share/ksh/man/man1/exec.1
+share/ksh/man/man1/exit.1
+share/ksh/man/man1/export.1
+share/ksh/man/man1/fg.1
+share/ksh/man/man1/head.1
+share/ksh/man/man1/hist.1
+share/ksh/man/man1/jobs.1
+share/ksh/man/man1/kill.1
+share/ksh/man/man1/let.1
+share/ksh/man/man1/logname.1
+share/ksh/man/man1/mkdir.1
+share/ksh/man/man1/print.1
+share/ksh/man/man1/printf.1
+share/ksh/man/man1/pwd.1
+share/ksh/man/man1/read.1
+share/ksh/man/man1/readonly.1
+share/ksh/man/man1/return.1
+share/ksh/man/man1/shcomp.1
+share/ksh/man/man1/shift.1
+share/ksh/man/man1/sleep.1
+share/ksh/man/man1/source.1
+share/ksh/man/man1/sync.1
+share/ksh/man/man1/test.1
+share/ksh/man/man1/times.1
+share/ksh/man/man1/trap.1
+share/ksh/man/man1/ulimit.1
+share/ksh/man/man1/umask.1
+share/ksh/man/man1/unalias.1
+share/ksh/man/man1/uname.1
+share/ksh/man/man1/unset.1
+share/ksh/man/man1/wait.1
+share/ksh/man/man1/wc.1
+share/ksh/man/man1/whence.1