Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2001 15:42:26 +0100
From:      Christian Weisgerber <naddy@mips.inka.de>
To:        "Jacques A. Vidrine" <n@nectar.com>, Steve Price <steve@FreeBSD.org>, freebsd-ports@freebsd.org
Subject:   Re: ksh93
Message-ID:  <20010227154226.A36915@kemoauc.mips.inka.de>
In-Reply-To: <20010226215311.A44937@spawn.nectar.com>; from n@nectar.com on Mon, Feb 26, 2001 at 09:53:11PM -0600
References:  <200102260514.f1Q5EHJ96328@freefall.freebsd.org> <20010226215311.A44937@spawn.nectar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jacques A. Vidrine:

> I notice that this installs the Korn shell as a static binary.

I was under the impression that it is our policy to build shells
statically.  Looking into ports/shells, I see that the actual
picture is one of confusion.

> 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').

Does anybody use this?
You probably can't built extension objects without libshell, which
the port doesn't install.  (It depends in turn on libast, and you
end up installing much of the AST environment, which IMO is beyond
the scope of a ksh port and should be left to a port of the ast-open
package.)

> I think this should default to building a dynamic executable.  A knob
> for building a static version would be nice.

Fine with me.  I also picked up your suggestion for setting SHELL.
(Is this required for the extraction step, too?)

========================================================================
diff -uNr /usr/ports/shells/ksh93/Makefile ksh93/Makefile
--- /usr/ports/shells/ksh93/Makefile	Tue Feb 27 13:20:40 2001
+++ ksh93/Makefile	Tue Feb 27 14:40:02 2001
@@ -20,6 +20,10 @@
 EXTRACT_ONLY=	INIT.${VERSION}.tgz
 
 NO_WRKSUBDIR=	yes
+MAKE_ARGS=	CC='${CC}' CCFLAGS='${CFLAGS}' SHELL='${SH}'
+.if defined(WANT_STATIC)
+MAKE_ARGS+=	LDFLAGS=-static
+.endif
 
 MAN1=		ksh93.1
 
@@ -29,8 +33,7 @@
 	@cd ${WRKSRC}; bin/package read
 
 do-build:
-	@cd ${WRKSRC}; bin/package make \
-	    CC='${CC}' CCFLAGS='${CFLAGS}' LDFLAGS=-static
+	@cd ${WRKSRC}; bin/package make ${MAKE_ARGS}
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/arch/freebsd.${ARCH}/bin/ksh \
========================================================================

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de

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?20010227154226.A36915>