execline:bootstrap (2924B)
1 #!/usr/bin/env pthbs-build 2 #@pragma:nosandbox 3 #+musl-cross-make.473310ee8dd6c0b20a1b81598700e61a0e38dcfe0b8503bd5cdbb9bf4f9af4fc 4 #+gnu-make.47af7543e52e6b72ac25e13223e2ce78703c58993166ba25c56cba245e48dbfa 5 #+busybox.73a23c9ea571875b0e9e166a6974b6b314b540c8c247783d9cf96e10a59fcd73 6 #+skalibs.4d9bb8936cbc1be9e4b0025b7d2f676d51646b050917d8789e8cab642ed1e31a 7 #@git:6c0957eb5e8eea2ffada4d7be08286f0e81d0527:execline 8 9 10 # - build script start - 11 12 prefix=/versions/$pthbs_package 13 dest=${pthbs_destdir%/}${prefix} 14 cd 'execline' 15 16 export CC="$pthbs_build_environment/command/x86_64-linux-musl-gcc" 17 export CXX="$pthbs_build_environment/command/x86_64-linux-musl-g++" 18 export LD="$pthbs_build_environment/command/x86_64-linux-musl-ld" 19 export AR="$pthbs_build_environment/command/x86_64-linux-musl-ar" 20 export CFLAGS="-O2 -ggdb" 21 22 ./configure \ 23 --prefix="$prefix" \ 24 --sysdepdir="${prefix}/sysdeps" \ 25 --binprefix="${prefix}/command" \ 26 --extbinprefix="${prefix}/command" \ 27 --dynlibdir="${prefix}/library.so" \ 28 --libdir="${prefix}/library" \ 29 --includedir="${prefix}/include" \ 30 --with-sysdeps='/versions/skalibs.4d9bb8936cbc1be9e4b0025b7d2f676d51646b050917d8789e8cab642ed1e31a/sysdeps' \ 31 --with-include="$pthbs_build_environment/include" \ 32 --with-lib="$pthbs_build_environment/library" \ 33 --with-dynlib="$pthbs_build_environment/library.so" \ 34 --disable-shared --enable-static --enable-allstatic --enable-static-libc --absolute-paths 35 36 make -j${JOBS:-1} -l$((1+${JOBS:-1})) 37 38 make DESTDIR="$pthbs_destdir" install 39 40 41 42 43 44 cd "$pthbs_destdir/versions/$pthbs_package" 45 find -type d -o -print | awk -F/ ' 46 BEGIN {} 47 48 function r1(s) { 49 sub("^[.]/[^/]*", ".", s) 50 return s 51 } 52 function s1(repl, s) { 53 sub("^[.]/[^/]*", "./"repl, s) 54 return s 55 } 56 function link(src) { 57 x[$0]=0 58 printf "%s\t%s\n", $0, src 59 printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" 60 } 61 $1!="."{exit 1} 62 63 64 $2 == "config" { link($0); next } 65 $2 == "keys" { link($0); next } 66 $2 == "zsh" { link($0); next } 67 $2 == "env" { link($0); next } 68 $2 == "command" { link($0); next } 69 $2 == "bin" { link(s1("command", $0)); next } 70 71 $2 == "library.so" { link($0); next } 72 $2 == "library" { link($0); next } 73 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } 74 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } 75 76 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } 77 78 $2 == "man" { link($0); next } 79 $2 == "info" { link($0); next } 80 $2 == "doc" { link($0); next } 81 $2 == "icons" { link($0); next } 82 $2 == "terminfo" { link($0); next } 83 $2 == "data" { link($0); next } 84 $2 == "include" { link($0); next } 85 86 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } 87 88 END { 89 for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } 90 for(fname in x) { 91 if(x[fname]) { 92 printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" 93 exit 3 94 } 95 } 96 }' >.install-links.new 97 mv .install-links.new .install-links 98