execline:bootstrap (2951B)
1 #!/usr/bin/env pthbs-build 2 #@pragma:nosandbox 3 #+musl-cross-make.513f0acae3d9d88d67a9151a33515f34995d3ff3d69f38b47239070d1b02c731 4 #+gnu-make.0a6fbda1db6316eb5ed666a1697e7bf0e4604d371ac4cf5d24a5151e76280074 5 #+busybox.a0af8a5860e7fa278d39404f06a382633b7e2122d85c16bb2e22b1804cdd1654 6 #+skalibs.bbdbb2ba67e579c2d35158361a1aa7bf09386a7cd512c17bdd0fd03a699ddbb3 7 #@git:6c0957eb5e8eea2ffada4d7be08286f0e81d0527:execline 8 9 10 # - build script start - 11 12 prefix=/home/ccx/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='/home/ccx/versions/skalibs.bbdbb2ba67e579c2d35158361a1aa7bf09386a7cd512c17bdd0fd03a699ddbb3/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/home/ccx/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