$NetBSD: patch-bootstrap,v 1.1 2022/04/25 12:25:58 nikita Exp $

patch bootstrap to work within pkgsrc context.

--- bootstrap.orig	2022-04-05 20:03:11.466752120 +0200
+++ bootstrap	2022-04-05 20:03:53.175125878 +0200
@@ -13,18 +13,18 @@
 
     %% Clear directories for builds since bootstrapping may require
     %% a changed structure from an older one
-    rm_rf("_build/bootstrap"),
+    %% rm_rf("_build/bootstrap"),
     %% When recompiling rebar3 itself, the path swaps and cleaning
     %% removes the modules in _build/bootstrap, but the VM still
     %% manages to discover those in _build/prod from previous builds and
     %% cause weird failures when compilers get modified between releases.
-    rm_rf("_build/prod"),
+    %% rm_rf("_build/prod"),
     %% The same pattern happens with default/ as well, particularly when
     %% developing new things.
     %% Keep other deps in <profile>/lib for build environments like Nix
     %% where internet access is disabled that deps are not downloadable.
-    rm_rf("_build/default/lib/rebar"),
-    rm_rf("_build/test/lib/rebar"),
+    %% rm_rf("_build/default/lib/rebar"),
+    %% rm_rf("_build/test/lib/rebar"),
 
     filelib:ensure_dir("_build/bootstrap/lib/rebar/ebin/"),
 
