Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2001 22:15:07 -0600
From:      "Jacques A. Vidrine" <n@nectar.com>
To:        Steve Price <steve@havk.org>
Cc:        naddy@mips.inka.de, freebsd-ports@freebsd.org
Subject:   Re: ksh93 (was Re: cvs commit: ports/shells/ksh93 [...])
Message-ID:  <20010226221507.A45071@spawn.nectar.com>
In-Reply-To: <20010226220748.S426@bsd.havk.org>; from steve@havk.org on Mon, Feb 26, 2001 at 10:07:48PM -0600
References:  <200102260514.f1Q5EHJ96328@freefall.freebsd.org> <20010226215311.A44937@spawn.nectar.com> <20010226220748.S426@bsd.havk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 26, 2001 at 10:07:48PM -0600, Steve Price wrote:
> On Mon, Feb 26, 2001 at 09:53:11PM -0600, Jacques A. Vidrine wrote:
> > I notice that this installs the Korn shell as a static binary.  While
> > this might be useful for some environments, it has the disadvantage that
> > it nullifies the Korn shell's very useful dynamic loading of `builtin'
> > functions (see the man page's description of `builtin').
> > 
> > I think this should default to building a dynamic executable.  A knob
> > for building a static version would be nice.  Heck, I wouldn't mind if
> > it built & installed one of each!  But that would probably be somewhat
> > hairy to add to the build procedure.
> 
> I'm cool with that.  If someone wants to work up a patch, then I'd
> be glad to get it committed.

The following is all that is needed, but I'll defer to the maintainer.

--- Makefile.orig       Mon Feb 26 22:09:18 2001
+++ Makefile    Mon Feb 26 22:09:51 2001
@@ -30,7 +30,7 @@
 
 do-build:
        @cd ${WRKSRC}; bin/package make \
-           CC='${CC}' CCFLAGS='${CFLAGS}' LDFLAGS=-static
+           CC='${CC}' CCFLAGS='${CFLAGS}' 
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/arch/freebsd.${ARCH}/bin/ksh \


Actually, I should add something else unrelated: `bin/package make' should be
`bin/package make SHELL=/bin/sh'.  Otherwise the port-user's shell may get in
the way (e.g. zsh barfs somewhere during the build).

Aw hell, let me just include the port I made up for ksh93 and used locally, but
never committed.  I didn't find any patches necessary.  Christian, I hope you
find something useful in here.
-- 
Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	ksh93
#	ksh93/Makefile
#	ksh93/pkg-descr
#	ksh93/pkg-comment
#	ksh93/distinfo
#	ksh93/pkg-plist
#	ksh93/scripts
#	ksh93/scripts/license
#	ksh93/files
#
echo c - ksh93
mkdir -p ksh93 > /dev/null 2>&1
echo x - ksh93/Makefile
sed 's/^X//' >ksh93/Makefile << 'END-of-ksh93/Makefile'
X# New ports collection makefile for:	ast-ksh
X# Date created:							2001-02-09
X# Whom:									Jacques Vidrine <nectar@FreeBSD.org
X#
X# $FreeBSD$
X
XPORTNAME=		ast-ksh
XPORTVERSION=	2001-01-01
XCATEGORIES=		shells
XMASTER_SITES=	http://www.research.att.com/~gsf/download/tgz/
XDISTFILES=		INIT.${PORTVERSION}.0000.tgz ast-ksh.${PORTVERSION}.0000.tgz
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=		nectar@FreeBSD.org
X
XNO_WRKSUBDIR=	yes
XMAN1=			ksh.1
X
Xdo-configure:
X	@${SETENV} WRKSRC=${WRKSRC} ${SH} ${SCRIPTDIR}/license
X
Xdo-build:
X	@${SETENV} WRKSRC=${WRKSRC} ${SH} ${SCRIPTDIR}/license
X	@(cd ${WRKSRC} && ./bin/package make SHELL=/bin/sh)
X
Xdo-install:
X	@${SETENV} WRKSRC=${WRKSRC} ${SH} ${SCRIPTDIR}/license
X	${MKDIR} ${PREFIX}/bin ${PREFIX}/man/man1
X	${INSTALL_PROGRAM} ${WRKSRC}/arch/freebsd.${ARCH}/bin/ksh \
X		${PREFIX}/bin/ksh
X	${INSTALL_MAN} ${WRKSRC}/arch/freebsd.${ARCH}/man/man1/sh.1 \
X		${PREFIX}/man/man1/ksh.1
X
X.include <bsd.port.mk>
END-of-ksh93/Makefile
echo x - ksh93/pkg-descr
sed 's/^X//' >ksh93/pkg-descr << 'END-of-ksh93/pkg-descr'
XThis is the ast-open package of the AT&T Lab's Advanced Software
XTechnologies open source collection.  This includes ksh93, libraries,
Xand tools such as `coshell - network shell coprocess server', `cql - C
Xquery language', `troff2html - convert troff/groff input to html',
X`nmake - maintain and update files', and others.
X
XWWW: http://www.research.att.com/sw/download/
X-- Jacques Vidrine <nectar@FreeBSD.org>
END-of-ksh93/pkg-descr
echo x - ksh93/pkg-comment
sed 's/^X//' >ksh93/pkg-comment << 'END-of-ksh93/pkg-comment'
XAT&T Research Lab's Advance Software Technologies open source collection.
END-of-ksh93/pkg-comment
echo x - ksh93/distinfo
sed 's/^X//' >ksh93/distinfo << 'END-of-ksh93/distinfo'
XMD5 (INIT.2001-01-01.0000.tgz) = 799b061ff85c22e7efc9a3b9e610e5c6
XMD5 (ast-ksh.2001-01-01.0000.tgz) = e823dfd2b97a85e7b6b06612a06711a7
END-of-ksh93/distinfo
echo x - ksh93/pkg-plist
sed 's/^X//' >ksh93/pkg-plist << 'END-of-ksh93/pkg-plist'
Xbin/ksh
END-of-ksh93/pkg-plist
echo c - ksh93/scripts
mkdir -p ksh93/scripts > /dev/null 2>&1
echo x - ksh93/scripts/license
sed 's/^X//' >ksh93/scripts/license << 'END-of-ksh93/scripts/license'
X#! /bin/sh
XLICENSE=${WRKSRC}/lib/package/LICENSES/ast
XACCEPT=${WRKSRC}/lib/package/gen/ast.license.accepted
X
Xif [ -f ${ACCEPT} ]; then
X    exit 0;
Xfi
X
Xecho "Press ENTER to see the AST license."
Xread dummy
X${PAGER:-/usr/bin/more} ${LICENSE}
Xdialog --title "AST License" \
X       --yesno "Do you except the AST license terms?" 5 66
Xif [ "$?" = "0" ]; then
X    touch ${ACCEPT}
X    exit 0
Xelse
X    echo "You must accept the AST license terms in order to build ksh."
X    exit 1
Xfi
END-of-ksh93/scripts/license
echo c - ksh93/files
mkdir -p ksh93/files > /dev/null 2>&1
exit


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010226221507.A45071>