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