Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/shells/mksh mksh: Don't set PKG_SHELL when used for bo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/daf946f2927a
branches:  trunk
changeset: 435618:daf946f2927a
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Jul 10 11:24:24 2020 +0000

description:
mksh: Don't set PKG_SHELL when used for bootstrap.

This can cause circular problems where the +INSTALL script requires the shell
itself, but also avoids issues trying to add to /etc/shells during bootstrap
where it may not be appropriate, or done outside of the context of where the
bootstrap tarball will finally be installed.

Users who use mksh as a bootstrap shell can simply add to /etc/shells manually
after installing or extracting the bootstrap as required.

While here remove unnecessary extra indents.

diffstat:

 shells/mksh/Makefile |  48 +++++++++++++++++++++++++++++-------------------
 1 files changed, 29 insertions(+), 19 deletions(-)

diffs (59 lines):

diff -r 333ecbb1b399 -r daf946f2927a shells/mksh/Makefile
--- a/shells/mksh/Makefile      Fri Jul 10 11:18:20 2020 +0000
+++ b/shells/mksh/Makefile      Fri Jul 10 11:24:24 2020 +0000
@@ -1,26 +1,36 @@
-# $NetBSD: Makefile,v 1.40 2020/07/06 10:11:34 jperkin Exp $
+# $NetBSD: Makefile,v 1.41 2020/07/10 11:24:24 jperkin Exp $
+
+DISTNAME=              mksh-R59b
+PKGNAME=               ${DISTNAME:S/-R/-/}
+CATEGORIES=            shells
+MASTER_SITES=          # maintained locally
+DISTFILES=             # empty
 
-DISTNAME=                      mksh-R59b
-PKGNAME=                       ${DISTNAME:S/-R/-/}
-CATEGORIES=                    shells
-MASTER_SITES=                  # maintained locally
-DISTFILES=                     # empty
+MAINTAINER=            jperkin%pkgsrc.org@localhost
+HOMEPAGE=              http://mirbsd.de/mksh
+COMMENT=               MirBSD Korn Shell
+LICENSE=               miros
+
+BOOTSTRAP_PKG=         yes
+NO_CHECKSUM=           yes
 
-MAINTAINER=                    jperkin%pkgsrc.org@localhost
-HOMEPAGE=                      http://mirbsd.de/mksh
-COMMENT=                       MirBSD Korn Shell
-LICENSE=                       miros
+WRKSRC=                        ${WRKDIR}/mksh
+
+LIBS.Interix+=         -lcrypt
 
-BOOTSTRAP_PKG=                 yes
-NO_CHECKSUM=                   yes
+INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1 share/examples/mksh
+
+.include "../../mk/bsd.prefs.mk"
 
-WRKSRC=                                ${WRKDIR}/mksh
-
-PKG_SHELL=                     bin/mksh
-
-LIBS.Interix+=                 -lcrypt
-
-INSTALLATION_DIRS=             bin ${PKGMANDIR}/man1 share/examples/mksh
+#
+# If mksh is currently in use as the bootstrap shell then do not enable
+# PKG_SHELL as it can cause circular problems (its +INSTALL script will
+# require the shell itself).  This match is deliberate to catch both of
+# the prefixes used during bootstrap, we can't simply use LOCALBASE.
+#
+.if ${TOOLS_PLATFORM.sh:N?*/bin/mksh}
+PKG_SHELL=             bin/mksh
+.endif
 
 do-extract:
        ${CP} -R ${FILESDIR} ${WRKSRC}



Home | Main Index | Thread Index | Old Index