Tue Oct 4 11:47:45 2022 UTC ()
bootstrap: Add mktools to special preserve handling.


(jperkin)
diff -r1.316 -r1.317 pkgsrc/bootstrap/bootstrap

cvs diff -r1.316 -r1.317 pkgsrc/bootstrap/bootstrap (expand / switch to unified diff)

--- pkgsrc/bootstrap/bootstrap 2022/09/29 02:25:15 1.316
+++ pkgsrc/bootstrap/bootstrap 2022/10/04 11:47:45 1.317
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# $NetBSD: bootstrap,v 1.316 2022/09/29 02:25:15 charlotte Exp $ 3# $NetBSD: bootstrap,v 1.317 2022/10/04 11:47:45 jperkin Exp $
4# 4#
5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> 5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
6# All rights reserved. 6# All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
16# 16#
@@ -1422,35 +1422,41 @@ fi @@ -1422,35 +1422,41 @@ fi
1422echo ".endif # end pkgsrc settings" >> ${TARGET_MKCONF} 1422echo ".endif # end pkgsrc settings" >> ${TARGET_MKCONF}
1423echo ".endif # end pkgsrc settings" >> ${BOOTSTRAP_MKCONF} 1423echo ".endif # end pkgsrc settings" >> ${BOOTSTRAP_MKCONF}
1424 1424
1425# build and register packages 1425# build and register packages
1426# usage: build_package <packagedirectory> 1426# usage: build_package <packagedirectory>
1427build_package() { 1427build_package() {
1428 run_cmd "(cd $pkgsrcdir/$1 && $bmake $make_quiet_flags MAKE_JOBS=${make_jobs} PKG_COMPRESSION=none -DPKG_PRESERVE PKGSRC_KEEP_BIN_PKGS=no MAKECONF=${BOOTSTRAP_MKCONF} install)" 1428 run_cmd "(cd $pkgsrcdir/$1 && $bmake $make_quiet_flags MAKE_JOBS=${make_jobs} PKG_COMPRESSION=none -DPKG_PRESERVE PKGSRC_KEEP_BIN_PKGS=no MAKECONF=${BOOTSTRAP_MKCONF} install)"
1429} 1429}
1430build_package_nopreserve() { 1430build_package_nopreserve() {
1431 run_cmd "(cd $pkgsrcdir/$1 && $bmake $make_quiet_flags MAKE_JOBS=${make_jobs} PKG_COMPRESSION=none PKGSRC_KEEP_BIN_PKGS=no MAKECONF=${BOOTSTRAP_MKCONF} install)" 1431 run_cmd "(cd $pkgsrcdir/$1 && $bmake $make_quiet_flags MAKE_JOBS=${make_jobs} PKG_COMPRESSION=none PKGSRC_KEEP_BIN_PKGS=no MAKECONF=${BOOTSTRAP_MKCONF} install)"
1432} 1432}
1433 1433
1434# 1434#
1435# cwrappers is special, we don't want to set it as a BOOTSTRAP_PKG but must 1435# Special packages that we don't want marked with BOOTSTRAP_PKG, but must be
1436# build it (if required) without -DPKG_PRESERVE set so that it can be deleted. 1436# built (if required) without -DPKG_PRESERVE set so that they can be deleted.
1437# 1437#
1438use_cwrappers=`(cd $pkgsrcdir/devel/bmake && $bmake show-var VARNAME=_USE_CWRAPPERS)` 1438use_cwrappers=`(cd $pkgsrcdir/devel/bmake && $bmake show-var VARNAME=_USE_CWRAPPERS)`
1439case "$use_cwrappers" in 1439case "$use_cwrappers" in
1440yes) 1440yes)
1441 build_package_nopreserve "pkgtools/cwrappers" 1441 build_package_nopreserve "pkgtools/cwrappers"
1442 ;; 1442 ;;
1443esac 1443esac
 1444use_mktools=`(cd $pkgsrcdir/devel/bmake && $bmake show-var VARNAME=_PKGSRC_USE_MKTOOLS)`
 1445case "$use_mktools" in
 1446yes)
 1447 build_package_nopreserve "pkgtools/mktools"
 1448 ;;
 1449esac
1444 1450
1445# 1451#
1446# Please make sure that the following packages and 1452# Please make sure that the following packages and
1447# only the following packages set BOOTSTRAP_PKG=yes. 1453# only the following packages set BOOTSTRAP_PKG=yes.
1448# 1454#
1449echo_msg "Installing packages" 1455echo_msg "Installing packages"
1450build_package "pkgtools/bootstrap-mk-files" 1456build_package "pkgtools/bootstrap-mk-files"
1451case "$need_bsd_install" in 1457case "$need_bsd_install" in
1452yes) 1458yes)
1453 if [ "$use_bsdinstall" = "yes" ]; then 1459 if [ "$use_bsdinstall" = "yes" ]; then
1454 build_package "sysutils/bsdinstall" 1460 build_package "sysutils/bsdinstall"
1455 else 1461 else
1456 build_package "sysutils/install-sh" 1462 build_package "sysutils/install-sh"