pkgsrc-Changes archive

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

CVS commit: pkgsrc/bootstrap



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Jul  6 10:21:01 UTC 2020

Modified Files:
        pkgsrc/bootstrap: bootstrap

Log Message:
bootstrap: Enable support for building mksh.

Over time, and as they are tested, platforms will be migrated over to
shells/mksh ($need_mksh) instead of shells/pdksh ($need_ksh) when a
bootstrap shell is required.  Once mksh is selected, it takes precedence
over pdksh.

Our shells/pdksh has been unmaintained for many years and has known
issues, shells/mksh is expected to provide a portable, fast, and well
maintained alternative.


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 pkgsrc/bootstrap/bootstrap

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/bootstrap/bootstrap
diff -u pkgsrc/bootstrap/bootstrap:1.283 pkgsrc/bootstrap/bootstrap:1.284
--- pkgsrc/bootstrap/bootstrap:1.283    Mon Jun 29 12:38:03 2020
+++ pkgsrc/bootstrap/bootstrap  Mon Jul  6 10:21:01 2020
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.283 2020/06/29 12:38:03 jperkin Exp $
+# $NetBSD: bootstrap,v 1.284 2020/07/06 10:21:01 jperkin Exp $
 #
 # Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -871,6 +871,11 @@ yes)
        ;;
 esac
 
+# mksh and ksh are mutually exclusive, prefer mksh while we transition to it.
+case "$need_mksh" in
+yes)   need_ksh=no ;;
+esac
+
 case "$quiet" in
 yes)
        configure_quiet_flags="--quiet"
@@ -1174,6 +1179,20 @@ echo_msg "Building libnbcompat"
 copy_src $pkgsrcdir/pkgtools/libnbcompat/files libnbcompat
 run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir --enable-bsd-getopt --enable-db && 
$bmake $make_quiet_flags -j$make_jobs)"
 
+# bootstrap mksh if necessary
+case "$need_mksh" in
+yes)   echo_msg "Bootstrapping mksh"
+       copy_src $pkgsrcdir/shells/mksh/files mksh
+       run_cmd "(cd $wrkdir/mksh && env $BSTRAP_ENV CC=\"${CC}\" $shprog Build.sh -r)"
+       run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/mksh/mksh $wrkdir/bin/mksh"
+       echo "TOOLS_PLATFORM.sh?=               $prefix/bin/mksh" >> ${TARGET_MKCONF}
+       echo "TOOLS_PLATFORM.sh?=               $wrkdir/bin/mksh" >> ${BOOTSTRAP_MKCONF}
+       echo_msg "Rebootstrapping bmake for mksh"
+       bmakexargs="$bmakexargs --with-defshell=$wrkdir/bin/mksh"
+       bootstrap_bmake
+       ;;
+esac
+
 # bootstrap ksh if necessary
 case "$need_ksh" in
 yes)   echo_msg "Bootstrapping ksh"
@@ -1351,6 +1370,9 @@ yes)
        fi
        ;;
 esac
+case "$need_mksh" in
+yes)   build_package "shells/mksh";;
+esac
 case "$need_ksh" in
 yes)   build_package "shells/pdksh";;
 esac



Home | Main Index | Thread Index | Old Index