* rebased llvm/hotfix-sparcv9-not-64.diff
[t2sde.git] / scripts / Bootstrap
blobc05135b1206246d1093bea29c8eb89962cf79bb7
1 #!/usr/bin/env bash
2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # T2 SDE: scripts/Bootstrap
4 # Copyright (C) 2022 - 2024 The T2 SDE Project
5 #
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 set -e
15 pkg="bash zstd sed gawk"
17 mkdir -p src
19 SDECFG_PARALLEL="$(getconf _NPROCESSORS_ONLN)"
21 for p in $pkg; do
22 url=$(sed -n '/\[D\] /{ s,\[D\] [^ ]* \([^ ]*\) \([^ ]*\),\2\1, ; p; q; }' package/*/$p/$p.desc)
23 file=${url##*/}
25 [ ! -e src/$file ] && curl -L -C - -o src/$file.tmp "$url" && mv src/$file{.tmp,}
27 cd src
28 tar xf $file
29 cd ${file%.tar*}
30 [ -e configure -a ! -e Makefile ] && ./configure
31 make -j${SDECFG_PARALLEL:-1}
32 make install
34 done
36 mkdir -p /var/adm/flists /etc/profile.d
38 echo "Essential bootstrap done. To finalize a minimal t2/homebrew, simply first run:"
39 echo " scripts/Emerge-Pkg -deps=none xz coreutils findutils tar pkgconfig"
40 echo ""
41 echo "To use Subversion, also install:"
42 echo " scripts/Emerge-Pkg -deps=none apr apr-util openssl utf8proc python scons serf sqlite subversion"