Subject: pkg/8792: add mk.conf option to link bash statically
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@mines.edu>
List: netbsd-bugs
Date: 11/13/1999 21:01:00
>Number:         8792
>Category:       pkg
>Synopsis:       add mk.conf option to link bash statically
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 13 21:00:01 1999
>Last-Modified:
>Originator:     Jim Bernard
>Organization:
	Speaking for myself
>Release:        Nov. 13, 1999
>Environment:
System: NetBSD zoo 1.4L NetBSD 1.4L (ZOO) #0: Sat Oct 23 12:41:59 MDT 1999 local@zoo:/home/local/compile/sys/arch/i386/compile/ZOO i386


>Description:
	It's nice to be able to link shells statically, but the bash2 package
	doesn't provide any direct support for that, even though the bash
	source code does come with such support, in the form of an easily
	used configure option.

>How-To-Repeat:
	Build the package.

>Fix:
	This patch creates a new mk.conf option (BASH_STATIC here, but I'm
	not picky about the name) that can be set to enable static linking.
	It might also be nice to add similar capability for all the other
	shells in the package system, but I haven't looked into that.

	The mk.conf.example file should be suitably augmented; here's a
	possible entry (in agc's new format):
#BASH_STATIC=
# Used in bash2 package to enable static linking.
# Possible: defined, not defined
# Default: not defined

	
--- Makefile-dist	Mon Sep 20 07:20:24 1999
+++ Makefile	Sat Nov 13 20:42:08 1999
@@ -14,10 +14,16 @@
 HOMEPAGE=	http://www.gnu.org/software/bash/bash.html
 
 GNU_CONFIGURE=	yes
 USE_GTEXINFO=	yes
 
+.include "../../mk/bsd.prefs.mk"
+
+.if defined(BASH_STATIC)
+CONFIGURE_ARGS+=	--enable-static-link
+.endif
+
 pre-install:
 	strip ${WRKSRC}/bash
 
 post-install:
 	${CP} /etc/shells /etc/shells.bak
>Audit-Trail:
>Unformatted: