summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shells/ksh93/Makefile68
-rw-r--r--shells/ksh93/distinfo3
-rw-r--r--shells/ksh93/files/patch-src_cmd_INIT_mamake_c12
-rw-r--r--shells/ksh93/files/patch-src_cmd_INIT_proto_c52
-rw-r--r--shells/ksh93/files/patch-src_cmd_ksh93_Mamfile31
-rw-r--r--shells/ksh93/files/patch-src_cmd_ksh93_sh_1 (renamed from shells/ksh93/files/patch-aa)5
-rw-r--r--shells/ksh93/files/patch-src_lib_libast_features_limits_c21
-rw-r--r--shells/ksh93/files/patch-src_lib_libast_features_sfio9
-rw-r--r--shells/ksh93/files/patch-src_lib_libast_vmalloc_vmhdr_h18
-rw-r--r--shells/ksh93/pkg-comment2
-rw-r--r--shells/ksh93/pkg-descr11
-rw-r--r--shells/ksh93/pkg-plist1
12 files changed, 183 insertions, 50 deletions
diff --git a/shells/ksh93/Makefile b/shells/ksh93/Makefile
index 05bca07..d25cf60 100644
--- a/shells/ksh93/Makefile
+++ b/shells/ksh93/Makefile
@@ -1,51 +1,41 @@
-# New ports collection makefile for: ksh93
-# Date created: 1999-10-24
-# Whom: Christian Weisgerber <naddy@mips.rhein-neckar.de>
+# New ports collection makefile for: ksh93
+# Date created: 2000-12-26
+# Whom: Christian Weisgerber <naddy@mips.inka.de>
#
# $FreeBSD$
-#
-# ast-base-99 is linked dynamically for BSD/OS and will not work
-PORTNAME= ksh
-PORTVERSION= 19931228
-CATEGORIES= shells
-# Users must register with AT&T before downloading tarball.
-# You can use the following URL to register/download:
-# http://www.research.att.com/cgi-bin/access.cgi/as/vt/ext-software/www-ne-license.cgi?form.reuse.binary
-#MASTER_SITES= http://www.research.att.com/sw/tools/reuse/
-DISTNAME= ast-base-98.bsd.i386
-EXTRACT_SUFX= .tgz
+PORTNAME= ksh93
+PORTVERSION= ${VERSION:S/-//g}
+VERSION= 2001-01-01.0000
+CATEGORIES= shells
+MASTER_SITES= http://www.research.att.com/~gsf/download/tgz/
+
+MAINTAINER= Christian Weisgerber <naddy@mips.inka.de>
-MAINTAINER= naddy@mips.inka.de
+RESTRICTED= "Impenetrable license"
+IS_INTERACTIVE= yes # must acknowledge license
-ONLY_FOR_ARCHS= i386
-RESTRICTED= "Requires user to register with AT&T."
+DISTNAME= ${PORTNAME}-${VERSION}
+DISTFILES= INIT.${VERSION}.tgz ast-ksh.${VERSION}.tgz
+EXTRACT_ONLY= INIT.${VERSION}.tgz
-NO_BUILD= yes
NO_WRKSUBDIR= yes
+
MAN1= ksh93.1
-STRIP=
-
-do-fetch:
- @if [ ! -f ${DISTDIR}/${DISTFILES} ]; then \
- ${ECHO} ""; \
- ${ECHO} "Please read http://www.research.att.com/sw/tools/reuse/"; \
- ${ECHO} "for details of how to obtain the ksh93 binary. Put the"; \
- ${ECHO} "file ${DISTFILES} in the directory"; \
- ${ECHO} "${DISTDIR} and run make again."; \
- ${ECHO} ""; \
- exit 1; \
- fi
+
+post-extract:
+ @${MKDIR} ${WRKSRC}/lib/package/tgz
+ @${LN} -s ${DISTDIR}/ast-ksh.${VERSION}.tgz ${WRKSRC}/lib/package/tgz/
+ @cd ${WRKSRC}; bin/package read
+
+do-build:
+ @cd ${WRKSRC}; bin/package make \
+ CC='${CC}' CCFLAGS='${CFLAGS}' LDFLAGS=-static
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/ksh ${PREFIX}/bin/ksh93
- ${INSTALL_MAN} ${WRKSRC}/man/man1/sh.1 ${PREFIX}/man/man1/ksh93.1
-
-post-install:
- @${ECHO_MSG} "Updating /etc/shells"
- @${CP} /etc/shells /etc/shells.bak
- @(${GREP} -v ${PREFIX}/bin/ksh93 /etc/shells.bak; \
- ${ECHO} ${PREFIX}/bin/ksh93) > /etc/shells
- @${RM} /etc/shells.bak
+ ${INSTALL_PROGRAM} ${WRKSRC}/arch/freebsd.${ARCH}/bin/ksh \
+ ${PREFIX}/bin/ksh93
+ ${INSTALL_MAN} ${WRKSRC}/arch/freebsd.${ARCH}/man/man1/sh.1 \
+ ${PREFIX}/man/man1/ksh93.1
.include <bsd.port.mk>
diff --git a/shells/ksh93/distinfo b/shells/ksh93/distinfo
index 5237611..a7c3c03 100644
--- a/shells/ksh93/distinfo
+++ b/shells/ksh93/distinfo
@@ -1 +1,2 @@
-MD5 (ast-base-98.bsd.i386.tgz) = 17f5400480af4b0d6ae1835324e7d6ab
+MD5 (INIT.2001-01-01.0000.tgz) = 799b061ff85c22e7efc9a3b9e610e5c6
+MD5 (ast-ksh.2001-01-01.0000.tgz) = e823dfd2b97a85e7b6b06612a06711a7
diff --git a/shells/ksh93/files/patch-src_cmd_INIT_mamake_c b/shells/ksh93/files/patch-src_cmd_INIT_mamake_c
new file mode 100644
index 0000000..f17ac44
--- /dev/null
+++ b/shells/ksh93/files/patch-src_cmd_INIT_mamake_c
@@ -0,0 +1,12 @@
+$FreeBSD$
+--- src/cmd/INIT/mamake.c.orig Fri Sep 22 00:38:32 2000
++++ src/cmd/INIT/mamake.c Thu Dec 28 18:26:19 2000
+@@ -98,6 +98,8 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <ctype.h>
+ #include <sys/types.h>
diff --git a/shells/ksh93/files/patch-src_cmd_INIT_proto_c b/shells/ksh93/files/patch-src_cmd_INIT_proto_c
new file mode 100644
index 0000000..cbb284a
--- /dev/null
+++ b/shells/ksh93/files/patch-src_cmd_INIT_proto_c
@@ -0,0 +1,52 @@
+$FreeBSD$
+--- src/cmd/INIT/proto.c.orig Thu Oct 26 16:00:44 2000
++++ src/cmd/INIT/proto.c Thu Dec 28 18:26:19 2000
+@@ -1531,6 +1531,7 @@
+
+
+
++extern __MANGLE__ __V_* realloc __PROTO__((__V_*, int));
+ extern __MANGLE__ __V_* calloc __PROTO__((int, int));
+ extern __MANGLE__ char* ctime __PROTO__((time_t*));
+ extern __MANGLE__ void free __PROTO__((__V_*));
+@@ -3965,7 +3966,7 @@
+ if ((n = ip - bp - 1) > 0)
+ {
+ ip = bp;
+- do switch( n) { default : memcpy( op, ip, n); op += n; ip += n; break; case 7 : * op++ = * ip++; case 6 : * op++ = * ip++; case 5 : * op++ = * ip++; case 4 : * op++ = * ip++; case 3 : * op++ = * ip++; case 2 : * op++ = * ip++; case 1 : * op++ = * ip++; case 0 : break; } while (0);
++ do switch( n) { default : memcopy( op, ip, n); op += n; ip += n; break; case 7 : * op++ = * ip++; case 6 : * op++ = * ip++; case 5 : * op++ = * ip++; case 4 : * op++ = * ip++; case 3 : * op++ = * ip++; case 2 : * op++ = * ip++; case 1 : * op++ = * ip++; case 0 : break; } while (0);
+ ip++;
+ }
+ state = ~state;
+@@ -5835,11 +5836,11 @@
+ pppclose(b);
+ return flags | ((1<<13)<<0);
+ }
+- strcpy(buf, copy);
++ strcopy(buf, copy);
+ e = buf + n;
+ if (*file != '/')
+ *e++ = '/';
+- strcpy(e, file);
++ strcopy(e, file);
+ if ((fd = creat(buf, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0)
+ {
+ for (e = buf; *e == '/'; e++);
+@@ -5882,7 +5883,7 @@
+ if (file && (flags & ((1<<13)<<1)))
+ {
+ *e = '_';
+- strcpy(b, file);
++ strcopy(b, file);
+ *e = x;
+ if (replace(b, file, !(flags & (1<<0))))
+ proto_error(b, 2, "cannot rename to", file);
+@@ -5977,7 +5978,7 @@
+ else
+ {
+ *op++ = '\n';
+- memcpy(op, b, n + 1);
++ memcopy(op, b, n + 1);
+ op += n;
+ }
+ break;
diff --git a/shells/ksh93/files/patch-src_cmd_ksh93_Mamfile b/shells/ksh93/files/patch-src_cmd_ksh93_Mamfile
new file mode 100644
index 0000000..c3e0089
--- /dev/null
+++ b/shells/ksh93/files/patch-src_cmd_ksh93_Mamfile
@@ -0,0 +1,31 @@
+$FreeBSD$
+--- src/cmd/ksh93/Mamfile.orig Sat Feb 17 23:27:39 2001
++++ src/cmd/ksh93/Mamfile Sat Feb 17 23:28:35 2001
+@@ -1117,12 +1117,12 @@
+ done sh/shcomp.c
+ prev sh/shcomp.c
+ setv _BLD_shell -U_BLD_shell
+-exec - ${CC} -O -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSH_DICT='(void*)e_dict' -DKSHELL -D_PACKAGE_ast -DSHOPT_SUID_EXEC -DSHOPT_VSH -DSHOPT_ESH -c sh/shcomp.c
++exec - ${CC} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSH_DICT='(void*)e_dict' -DKSHELL -D_PACKAGE_ast -DSHOPT_SUID_EXEC -DSHOPT_VSH -DSHOPT_ESH -c sh/shcomp.c
+ done shcomp.o generated
+ prev libshell.a archive
+ setv mam_libshell `sed -e 's,-lshell,libshell.a,' shell.req`
+ prev ${mam_libdl}
+-exec - ${CC} -O ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${PACKAGE_ast_LIB}} -o shcomp shcomp.o ${mam_libshell} ${mam_libm} ${mam_cc_static} ${mam_cc_dynamic} ${mam_libast}
++exec - ${CC} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${PACKAGE_ast_LIB}} -o shcomp shcomp.o ${mam_libshell} ${mam_libm} ${mam_cc_static} ${mam_cc_dynamic} ${mam_libast}
+ done shcomp generated
+ make sh/suid_exec.c
+ prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+@@ -1139,10 +1139,10 @@
+ make suid_exec.o
+ prev sh/suid_exec.c
+ prev sh/suid_exec.c
+-exec - ${CC} -O -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c sh/suid_exec.c
++exec - ${CC} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c sh/suid_exec.c
+ done suid_exec.o generated
+ prev ${mam_libdl}
+-exec - ${CC} -O ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${PACKAGE_ast_LIB}} -o suid_exec suid_exec.o ${mam_cc_static} ${mam_libast} ${mam_cc_dynamic} ${mam_libm} ${mam_cc_static} ${mam_cc_dynamic} ${mam_libast}
++exec - ${CC} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${PACKAGE_ast_LIB}} -o suid_exec suid_exec.o ${mam_cc_static} ${mam_libast} ${mam_cc_dynamic} ${mam_libm} ${mam_cc_static} ${mam_cc_dynamic} ${mam_libast}
+ done suid_exec generated
+ make ${INSTALLROOT}/bin
+ exec - set -
diff --git a/shells/ksh93/files/patch-aa b/shells/ksh93/files/patch-src_cmd_ksh93_sh_1
index 94f5271..caba9d5 100644
--- a/shells/ksh93/files/patch-aa
+++ b/shells/ksh93/files/patch-src_cmd_ksh93_sh_1
@@ -1,5 +1,6 @@
---- man/man1/sh.1.orig Tue Apr 6 05:01:44 1999
-+++ man/man1/sh.1 Wed Oct 20 19:39:36 1999
+$FreeBSD$
+--- src/cmd/ksh93/sh.1.orig Wed Dec 27 23:10:30 2000
++++ src/cmd/ksh93/sh.1 Wed Dec 27 23:10:44 2000
@@ -4,7 +4,7 @@
.\"
.\" @(#)sh.1 (research!dgk) 12/28/93
diff --git a/shells/ksh93/files/patch-src_lib_libast_features_limits_c b/shells/ksh93/files/patch-src_lib_libast_features_limits_c
new file mode 100644
index 0000000..d6daa9d
--- /dev/null
+++ b/shells/ksh93/files/patch-src_lib_libast_features_limits_c
@@ -0,0 +1,21 @@
+$FreeBSD$
+--- src/lib/libast/features/limits.c.orig Tue Feb 9 15:23:43 1999
++++ src/lib/libast/features/limits.c Thu Dec 28 19:35:20 2000
+@@ -122,6 +122,7 @@
+ while (uc >>= 1) val++;
+ #endif
+ printf("#define CHAR_BIT %lu\n", val);
++#undef MB_LEN_MAX
+ #ifdef MB_LEN_MAX
+ val = MB_LEN_MAX;
+ printf("#undef MB_LEN_MAX\n");
+@@ -392,6 +393,9 @@
+ #endif
+ #ifdef _LIMITS_H_
+ printf("#define _LIMITS_H_\n");
++#endif
++#ifdef _MACHINE_LIMITS_H
++ printf("#define _MACHINE_LIMITS_H_");
+ #endif
+ #ifdef __LIMITS_H
+ printf("#define __LIMITS_H\n");
diff --git a/shells/ksh93/files/patch-src_lib_libast_features_sfio b/shells/ksh93/files/patch-src_lib_libast_features_sfio
new file mode 100644
index 0000000..fc7349b
--- /dev/null
+++ b/shells/ksh93/files/patch-src_lib_libast_features_sfio
@@ -0,0 +1,9 @@
+$FreeBSD$
+--- src/lib/libast/features/sfio.orig Thu Dec 28 02:40:45 2000
++++ src/lib/libast/features/sfio Thu Dec 28 02:40:52 2000
+@@ -1,4 +1,4 @@
+-hdr float,floatingpoint,math,values
++hdr float,floatingpoint,math
+ sys filio,ioctl
+ lib qfrexp,qldexp
+
diff --git a/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmhdr_h b/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmhdr_h
new file mode 100644
index 0000000..cab7898
--- /dev/null
+++ b/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmhdr_h
@@ -0,0 +1,18 @@
+$FreeBSD$
+--- src/lib/libast/vmalloc/vmhdr.h.orig Thu Dec 28 00:07:39 2000
++++ src/lib/libast/vmalloc/vmhdr.h Thu Dec 28 00:08:18 2000
+@@ -56,12 +56,12 @@
+ #include <ast_common.h>
+ #include "FEATURE/vmalloc"
+
++#endif /*_PACKAGE_ast*/
++
+ #if !_UWIN
+ #define _npt_getpagesize 1
+ #define _npt_sbrk 1
+ #endif
+-
+-#endif /*_PACKAGE_ast*/
+
+ #undef free
+ #undef malloc
diff --git a/shells/ksh93/pkg-comment b/shells/ksh93/pkg-comment
index 2719e28..f366540 100644
--- a/shells/ksh93/pkg-comment
+++ b/shells/ksh93/pkg-comment
@@ -1 +1 @@
-The official AT&T release of KornShell 93
+Official AT&T release of KornShell 93
diff --git a/shells/ksh93/pkg-descr b/shells/ksh93/pkg-descr
index 7142be5..ee3150b 100644
--- a/shells/ksh93/pkg-descr
+++ b/shells/ksh93/pkg-descr
@@ -1,16 +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
+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
+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
+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
+in performance. In addition, "sh" scripts can be run on KSH-93
without modification.
WWW: http://www.kornshell.com/
-
-- Christian Weisgerber
- naddy@mips.inka.de
diff --git a/shells/ksh93/pkg-plist b/shells/ksh93/pkg-plist
index 07a5f96..92fe399 100644
--- a/shells/ksh93/pkg-plist
+++ b/shells/ksh93/pkg-plist
@@ -1,3 +1,4 @@
+@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
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells
OpenPOWER on IntegriCloud