1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Squashed 'cde/programs/dtksh/ksh93/' content from commit 66e1d4464

git-subtree-dir: cde/programs/dtksh/ksh93
git-subtree-split: 66e1d44642
This commit is contained in:
Jon Trulson 2021-06-26 14:53:01 -06:00
commit c9b8687604
1269 changed files with 369117 additions and 0 deletions

260
lib/package/CONVERT.mk Normal file
View file

@ -0,0 +1,260 @@
/*
* {automake|configure} => {nmake|iffe} conversion support
*
* The first command line target overrides the default original source
* directory name $(MAKEFILE:D). The hard work is in the makefile using
* these assertions, since it must (manually) provide the nmake makefiles
* and config equivalent iffe scripts. The conversion makefile is typically
* named lib/package/PACKAGE.cvt in an ast package $PACKAGEROOT directory,
* and the conversion is run from the $PACKAGEROOT directory, e.g.:
*
* nmake -I lib/package -f PACKAGE-VERSION/PACKAGE.cvt
*
* The conversion requires the ast nmake, pax and tw commands.
*
* After the conversion you will be liberated from ./configure, *.in,
* *.am, automake, autom4te, libtool, make depend, and makefile
* recursion ordering. You can build from $PACKAGEROOT using the ast
* package(1) (which sets up the { HOSTTYPE PATH VPATH } environment):
*
* package make
*
* or cd into any arch/$HOSTTYPE/src subdirectory and rebuild that portion
* of the hierarchy with the ast nmake(1) (after setting PATH and VPATH):
*
* nmake
*
* The conversion assertions are:
*
* package :CONVERT: file ...
*
* files in the original source directory are copied
* and converted into the ./src and ./lib subdirectories
* the default original source directory is ./original
*
* package package name
* file original source file that must exist
*
* :OMIT: pattern
*
* files matching pattern are not copied into the converted
* directory
*
* pattern ksh pattern of files to omit
*
* :COPY: from to [ file ... ]
*
* files in the from directory are copied to the to directory
* the action may contain :MOVE: exceptions to the copy
*
* from original directory subdirectory
* . names the original directory
* .. names the
* to converted subdirectory
* libNAME => src/lib/libNAME
* NAME => src/cmd/NAME
* file files or files in subdirectories to be copied;
* explicit files are copied to the to directory;
* if no files are specified then the from hierarchy
* is recursively copied to the converted directory
*
* :MOVE: to file ...
*
* :COPY: assertion exceptions placed in the assertion's action
*
* to files or subdirectory files are copied to this directory
* file file or files in subdirectories to be copied
*
* :FILE: to file <<!
* contents
* !
*
* the :FILE: action is copied to the named file in the to directory
* the :FILE: action is usually specified using the here syntax to
* avoid make comment, quote and variable expansion
*
* :EDIT: to file ... | - pattern <<!
* edit script
* !
*
* the :EDIT: action is an ed(1) script applied to each file in the
* to directory after it has been copied from the original source
* directory; if to is - then the :EDIT: action is a sed(1) script
* that is applied to all files matching the file pattern during the
* copy from the original source directory; a file may be subject to
* both a sed(1) and ed(1) :EDIT:; the :EDIT: action is usually
* specified using the here syntax to avoid make comment, quote and
* variable expansion
*/
.CONVERT.ID. = "@(#)$Id: CONVERT (AT&T Research) 2004-03-19 $"
set nojobs noscan nowriteobject writestate=$$(MAKEFILE).ms
package = $(PWD:B)
here = !-=-=-=-=-!
hierarchy = src src/cmd src/lib
omit = .*|*.?(l)[ao]
original = $(MAKEFILE:D)
showedit = $(-debug:?p??)
CPFLAGS = -u
PAXFLAGS = -u -v
STDEDFLAGS = -
TW = tw
TWFLAGS = -CP
all : .VIRTUAL file
file : .VIRTUAL edit
edit : .VIRTUAL copy
copy : .VIRTUAL init
init : .VIRTUAL
.MAKEINIT : .cvt.init
.cvt.init : .MAKE .VIRTUAL .FORCE
local D
if D = "$(~.ARGS:O=1)"
if "$(D:T>FD)"
original := $(D)
.ARGS : .CLEAR $(~.ARGS:O>1)
end
end
.cvt.filter =
.cvt.package =
.cvt.atom : .FUNCTION
local N V
V := $(%:O=1)
let .cvt.$(V) = .cvt.$(V) + 1
return .cvt.$(V).$(.cvt.$(V))
.cvt.omit : .FUNCTION
return -s',^\(\(?K)?(*/)($(omit))?(/*))$,,$(showedit)'
.cvt.to : .FUNCTION
if "$(%)" == "."
return src
end
if "$(%)" == "*/*"
return src/$(%)
end
if "$(%)" == "lib*"
return src/lib/$(%)
end
return src/cmd/$(%)
":CONVERT:" : .MAKE .OPERATOR
local I
package := $(<)
I := $(hierarchy:C,$,/Makefile)
init : .cvt.verify $(I)
$(I) : .ACCEPT
test -d $(<:D) || $(MKDIR) -p $(<:D)
echo :MAKE: > $(<)
.cvt.verify : .MAKE .FORCE .REPEAT
local I
if I = "$(.cvt.package:T!=F)"
error 3 $(original): not a $(package) source directory: missing $(I)
end
.cvt.package := $(>:C,^,$$(original)/,)
":COPY:" : .MAKE .OPERATOR
local F T I A
F := $(>:O=1)
T := $(.cvt.to $(>:O=2))
A := $(.cvt.atom copy)
copy : $(A)
$(A) : .VIRTUAL
if F == "."
$(A) : $(T)
$(T) :
test -d $(<) || $(MKDIR) -p $(<)
for I $(>:O>2)
eval
$$(A) : $(I:D=$(T):B:S)
$(I:D=$(T):B:S) : $$(original)/$(I)
$$(CP) $$(CPFLAGS) $$(*) $$(<)
end
end
elif "$(F:T=FF)" || "$(F:N=*.(pax|t[bg]z))"
eval
$$(A) : $$(F)
test -d $(T) || $$(MKDIR) -p $(T)
cd $(T)
$$(PAX) $$(PAXFLAGS) -rf $$(*:P=A) -s ',^$(>:O=2)/*,,' $(.cvt.omit) $(.cvt.filter)
end
else
F := $$(original)/$(F)
if ! "$(@:V)"
eval
$$(A) : .FORCE
test -d $(T) || $$(MKDIR) -p $(T)
cd $(F:V)
$$(TW) $$(TWFLAGS) | $$(PAX) $$(PAXFLAGS) -rw $(.cvt.omit) $(.cvt.filter) $(T:P=A)
end
else
.cvt.move =
: $(@:V:@R)
eval
$$(A) : .FORCE
test -d $(T) || $$(MKDIR) -p $(T)
cd $(F:V)
$$(TW) $$(TWFLAGS) | $$(PAX) $$(PAXFLAGS) -rw $(.cvt.omit) $(.cvt.move) $(.cvt.filter) $(T:P=A)
end
end
end
":EDIT:" : .MAKE .OPERATOR
local A D F
D := $(>:O=1)
if D == "-"
A := ^$(>:O=2)^$$(SED) -e $(@:Q:/'\n'/ -e /G)
.cvt.filter += --action=$(A:@Q)
else
D := $(.cvt.to $(D))
F := $(>:O>1:C,^,$(D)/,)
edit : $(F)
eval
$$(F) :
$$(STDED) $$(STDEDFLAGS) $$(<) <<'$(here)'
$(@:V)
w
q
$(here)
end
end
":FILE:" : .MAKE .OPERATOR
local ( D F ) $(>)
local A
A := $(.cvt.atom file)
$(A) := $(@:V)
D := $(.cvt.to $(D))
file : $(D)/$(F)
eval
$$(D)/$$(F) :
test -d $$(<:D) || $$(MKDIR) -p $$(<:D)
cat > $$(<) <<'$(here)'
$$($(A):V)
$(here)
end
":MOVE:" : .MAKE .OPERATOR
local T I
T := ../../../$(.cvt.to $(>:O=1))
for I $(>:O>1)
if I == "*/"
.cvt.move += -s',^\(\(?K)$(I)),$(T)/,$(showedit)'
.cvt.move += -s',^\(\(?K)$(I:C%/$%%))$,,$(showedit)'
else
.cvt.move += -s',^\(\(?K)$(I))$,$(T)/$(I:B:S),$(showedit)'
end
end
":OMIT:" : .MAKE .OPERATOR
local P
for P $(>)
omit := $(omit)|$(P)
end

1029
lib/package/INIT.README Normal file

File diff suppressed because it is too large Load diff

1007
lib/package/INIT.html Normal file

File diff suppressed because it is too large Load diff

12
lib/package/INIT.pkg Normal file
View file

@ -0,0 +1,12 @@
INIT :PACKAGE:
:CATEGORY: admin utils
:INDEX: the package command with support scripts and utilities
:DESCRIPTION:
The INIT package is required by all but the standalone
and self extracting archive packages. It contains
the package command, support scripts, and utilities.
The package command installs binary packages, makes
source packages, and generates new package tarballs.

0
lib/package/INIT.req Normal file
View file

1
lib/package/INIT.ver Normal file
View file

@ -0,0 +1 @@
INIT 2012-08-01 2012-08-01 1

11
lib/package/ast-ast.pkg Normal file
View file

@ -0,0 +1,11 @@
ast-ast :PACKAGE: libast
:LICENSE: *.open
:CATEGORY: devel libs
:INDEX: the ast library, period
:DESCRIPTION:
The AT&T Software Technology ast-ast package from AT&T Research
contains the ast library.

22
lib/package/ast-base.pkg Normal file
View file

@ -0,0 +1,22 @@
ast-base :PACKAGE: \
ksh93 pax html proto bzip tw builtin libast libardir libcmd \
libdll libexpr libodelta librecsort libsum libuu libvdelta \
libbz libz tests 3d coshell cpp cs mam msgcc nmake probe ss \
libcoshell libcs libmam libpp libcodex paxlib codexlib \
libdss libpz dsslib libtaso
:COVERS: ast-make ast-ksh ast-ast
:LICENSE: *.open
:CATEGORY: devel libs shells
:INDEX: ksh, ksh builtin commands, pax, nmake, tw, sfio, and ast libraries
:DESCRIPTION:
The AT&T Software Technology ast-base package from AT&T Research
contains commands and libraries required by all other ast based
packages. Included are ksh93, ksh93 builtin commands, a pax that
generates compact delta archives, nmake, the 3d user level versioning
filesystem, coshell for network execution, a multi-dialect C preprocessor
and companion library, and libraries shared by the other ast packages.

0
lib/package/ast-base.req Normal file
View file

1
lib/package/ast-base.ver Normal file
View file

@ -0,0 +1 @@
ast-base 2012-08-01 2012-08-01 1

13
lib/package/ast-dss.pkg Normal file
View file

@ -0,0 +1,13 @@
ast-dss :PACKAGE: dss libdss libpz dsslib
:REQUIRES: ast-base
:LICENSE: *.(open|proprietary|special)
:CATEGORY: algorithms database utils
:INDEX: data stream scan command and support libraries
:DESCRIPTION:
The AT&T Software Technology ast-dss package from AT&T Research
contains the dss command, plugins and support libraries.

89
lib/package/ast-ksh.pkg Normal file
View file

@ -0,0 +1,89 @@
ast-ksh :PACKAGE: ksh93 libast libcmd libcoshell libsum libdll
:COVERS: ksh
:LICENSE: *.open
:CATEGORY: shells
:INDEX: ksh and support libraries
:DESCRIPTION:
The AT&T Software Technology ast-ksh package from AT&T Research
contains ksh and support libraries. This is the minimal set of
components needed to build ksh.
:DETAILS: cyg
:README:
This package installs a standalone ksh93 executable ksh93.exe
and its man page ksh93.1. If /bin/ksh.exe does not exist then
these symlinks
/bin/ksh.exe => ksh93.exe
/usr/share/man/man1/ksh93.1 => ksh.1
are created. This allows alternative ksh impelementations,
e.g., /bin/pdksh.exe, to be selected by changing the ksh.exe
and ksh.1 symbolic links. In addition, ksh and ksh93 paths are
added to /etc/shells if not already present.
$()
Each builtin or special command accepts the --man and --html
options to list the man page on the standard error. The --???
option describes the self documenting options available to all
builtin and special commands.
$()
The stanadlone ksh is statically linked with the ast libcmd
library which provides several builtin versions of /bin
commands. "builtin | grep /opt/ast/bin" lists the libcmd
builtins on the standard output. /opt/ast/bin/FOO accesses
the FOO builtin, whether the /opt/ast/bin directory exists
or not. "builtin FOO" allows /opt/ast/bin/FOO to be accessed
as FOO, bypassing the $PATH setting. To enable all libcmd
builtins do one of the following:
(a) create the directory /opt/ast/bin and the file
/opt/ast/bin/.paths with this line
BUILTIN_LIB=.
and place /opt/ast/bin before /bin and /usr/bin in $PATH
(this will affect all ksh subshells and scripts)
(b) run "builtin $( builtin | sed -e '/\//!d' -e 's,.*/,,' )"
(this will affect only the current shell)
Some scripts may run significantly faster with libcmd builtins
enabled.
$()
The ast library checks the DOSPATHVARS environment variable
for variable path values to convert to and from native windows
format when cross-executing between cygwin and non-cygwin
programs. The value is a space separated list of environment
variables to convert. PATH is handled by cygwin so it is not
converted by the ast library.
$()
The astksh cygwin source package provides a bootstrap build
environment that is not suited for an edit/build/debug cycle.
If you want to explore and modify the source then you should
install the (non-cygwinized) ast-base package which includes
AT&T nmake. With ast-base you will also be able to regenerate
the astksh cygwin source and binary packages.
$()
For more information on ksh and other AT&T ast tools see
http://www.research.att.com/sw/download/
:EXPORT:
SHOPT_CMDLIB_DIR=1
bin/ksh93.exe :INSTALL: bin/ksh.exe
share/man/man1/ksh93.1 :INSTALL: man/man1/sh.1
:POSTINSTALL:
if [ ! -e /bin/ksh.exe ]
then ln -fs ksh93.exe /bin/ksh.exe
ln -fs ksh93.1 /usr/share/man/man1/ksh.1
else echo "/bin/ksh.exe already exists"
fi
if [ -f /etc/shells ]
then for i in /bin/ksh93 /bin/ksh /usr/bin/ksh93 /usr/bin/ksh
do if grep $i /etc/shells >/dev/null 2>&1
then echo "$i already in /etc/shells"
else echo $i >> /etc/shells
echo "$i added to /etc/shells"
fi
done
else echo "no /etc/shells file"
fi
exit 0
:TEST: bin/ksh
KSH=$<; cd src/cmd/ksh93/tests; CYGWIN="$$CYGWIN ntsec binmode" SHELL=$$KSH $$KSH shtests

0
lib/package/ast-ksh.req Normal file
View file

1
lib/package/ast-ksh.ver Normal file
View file

@ -0,0 +1 @@
ast-ksh 2012-08-01 2012-08-01 1

19
lib/package/ast-make.pkg Normal file
View file

@ -0,0 +1,19 @@
ast-make :PACKAGE: \
nmake cpp probe 3d ksh93 coshell cs ss pax paxlib tw \
libast libardir libcmd libsum libdll libcoshell libpp
:AUXILIARY: bin/proto bin/pax
:LICENSE: *.open
:COVERS: ast-ksh ast-ast
:CATEGORY: devel libs shells
:INDEX: ksh, pax, nmake
:DESCRIPTION:
The AT&T Software Technology ast-make package from AT&T Research
contains an almost minimal set of commands and libraries required
to run ast nmake. ksh, coshell, pax, tw, and the 3d user-level
filesystem are also included.

20
lib/package/ast-open.pkg Normal file
View file

@ -0,0 +1,20 @@
ast-open :PACKAGE: \
ksh93 kshlib pax html proto bzip libast libardir libcmd libdll \
libexpr libodelta librecsort libsum libuu libvdelta libbz \
libz tests 3d coshell cpp cs mam msgcc nmake probe ss \
libcoshell libcs libmam libpp libcodex paxlib codexlib \
at builtin codex dss dsslib ie mailx mam ncsl pack pzip \
re sort sortlib std tksh tw warp libdss libpz \
libtksh libtk vczip libvcodex libvgraph libtaso jcl libjcl
:COVERS: ast-base ast-dss
:LICENSE: *.open
:CATEGORY: devel libs mail shells utils
:INDEX: ksh, pax, nmake, sfio, and ast open source commands and libraries
:DESCRIPTION:
The AT&T Software Technology ast-open package from AT&T Research
contains all of the ast open source commands and libraries.

0
lib/package/ast-open.req Normal file
View file

1
lib/package/ast-open.ver Normal file
View file

@ -0,0 +1 @@
ast-open 2012-08-01 2012-08-01 1

49
lib/package/ast.def Normal file
View file

@ -0,0 +1,49 @@
#
# ast default license info
#
message_set=3
contributor+=(
[gsf]="Glenn Fowler <gsf@research.att.com>"
[dgk]="David Korn <dgk@research.att.com>"
[kpv]="Phong Vo <kpv@research.att.com>"
[aedgar]="Adam Edgar <aedgar@research.att.com>"
[alb]="Adam Buchsbaum <alb@adambuchsbaum.com>"
[ashaikh]="Aman Shaikh <ashaikh@research.att.com>"
[bala]="Bala Krishnamurthy <bala@research.att.com>"
[brussell]="Brian Russell <brussell@research.att.com>"
[chen]="Robin Chen <chen@research.att.com>"
[dfwc]="Don Caldwell <dfwc@research.att.com>"
[ek]="Lefty Koutsofios <ek@research.att.com>"
[gruber]="Bob Gruber <bob.gruber@gmail.com>"
[jiawang]="Jia Wang <jiawang@research.att.com>"
[jkf]="Jeff Fellin <jkf@research.att.com>"
[jlk]="Jeff Korn <@google.com>"
[kfisher]="Kathleen Fisher <kfisher@research.att.com>"
[kwc]="Ken Church <@microsoft.com>"
[bwk]="Brian Kernigham <bwk@research.bell-labs.com>"
[dmr]="Dennis Ritchie <dmr@research.bell-labs.com>"
[doug]="Doug McIlroy <doug@research.bell-labs.com>"
[ekrell]="Eduardo Krell <ekrell@adexus.cl>"
[jjs]="John Snyder <jjs@adexus.cl>"
[rao]="Herman Rao <rao@fareastone.att.com.tw>"
[ast-users]="AST users mailgroup <ast-users@research.att.com>"
[ast-developers]="AST developers mailgroup <ast-developers@research.att.com>"
)
license+=(
organization="Information and Software Systems Research"
domain=research.att.com
parent="AT&T"
corporation="Intellectual Property"
company="Research"
location="Florham Park NJ"
package=ast
since=1986
author=gsf+dgk+kpv
)

5
lib/package/ast.lic Normal file
View file

@ -0,0 +1,5 @@
. ast.def
. epl.def
license+=(
start=2011
)

45
lib/package/bsd.def Normal file
View file

@ -0,0 +1,45 @@
message_set=18
contributor+=(
[bj]="Bill Joy"
)
license+=(
company="The Regents of the University of California"
package=BSD
since=1979
type=bsd
name="${license.package} Open Source"
url=http://www.opensource.org/licenses/bsd-license
urlmd5=5bfd485a7ffdb6249d1097da94ae75fc
notice='
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the University nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
'
)

1
lib/package/bsd.lic Normal file
View file

@ -0,0 +1 @@
. bsd.def

8
lib/package/epl.def Normal file
View file

@ -0,0 +1,8 @@
license+=(
type=epl
id=eclipse
name="Eclipse Public License"
version=1.0
url=http://www.eclipse.org/org/documents/${license.type}-v${license.version//./}.html
urlmd5=b35adb5213ca9657e911e9befb180842
)

14
lib/package/ksh.pkg Normal file
View file

@ -0,0 +1,14 @@
ksh :PACKAGE:
:LICENSE: *.open
:CATEGORY: shells
:INDEX: standalone AT&T ksh executable
:DESCRIPTION:
The AT&T Software Technology ksh package from AT&T Research
contains the AT&T ksh executable implemented by David Korn.
The download file is a gzipped ksh executable. If you want
to build ksh from the source then download one of the ast-ksh,
ast-base or ast-open packages.

1537
lib/package/package.mk Normal file

File diff suppressed because it is too large Load diff

39
lib/package/zlib.def Normal file
View file

@ -0,0 +1,39 @@
message_set=20
contributor+=(
[jlg]="Jean-loup Gailly"
[ma]="Mark Adler"
)
license+=(
company="Jean-loup Gailly and Mark Adler"
package=zlib
since=1995
type=zlib
name="${license.package} Open Source"
url=http://www.opensource.org/licenses/Zlib
urlmd5=4cfd2c17b0340c2f3c80b577a8e45bee
notice='
This software is provided "as-is", without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would
be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
'
)

1
lib/package/zlib.lic Normal file
View file

@ -0,0 +1 @@
. zlib.def