ocaml-findlib (6847B)
1 #!/usr/bin/env pthbs-build 2 #+busybox.504428034e649f598212c8994966e36667178683ec90987355f495ad3ca4abac 3 #+busybox-bzip2.4ea548a271f41e7147568dc02e5071fb200eab38a9a22e733d3106b71e354812 4 #+busybox-gzip.0999e8c6a8b7df82fc1cf10ade2468fb2bc4352f76d4b1d2af5099a65ccada9b 5 #+busybox-lzop.f0d93621bfd8ca106a8590562d93158b05087e5ef48068c7a84d9967b67d2d25 6 #+busybox-unzip.737f61aac20ef6c0554fca59bb599bf98e4fb77fbd97fba65a3692ac9d4afb84 7 #+busybox-xz.639cf99dd37a7d6f719b937d13af92202e01adf11c130f8647574c1d9ef5b0d2 8 #+busybox-cpio.d22266c2b6c056c0ea96873402d06591aa23368ea24d91f1fbf8a8327cb210f8 9 #+busybox-dpkg.2b0dd2fa41e946e98f2f8948ae3d3a152a069c77460768d9c76d41f56974e514 10 #+busybox-rpm.62bb242b4fbb3fd51b233ed9ce6c257ab997b1ee3a68ef3048656addc98f3d97 11 #+busybox-tar.dd3d9b0075fc038df431ce2a16fc1b140de521e1aa6d154dc7b607f9403d5ac0 12 #+busybox-ed.6ff6cd59168705c6b256d800cde7e8c69dd05c556520317dae6a0b492029fe6b 13 #+busybox-sed.8793bcd2536ab32fa528bbb0c22f0c014663ac5e045193aa7bd113a07f58c5b9 14 #+busybox-vi.db3d29c62845a55b7c5491d057cb9ea6c6deba93c567f4ef9eb15f06be8ad171 15 #+busybox-xxd.9dff38f0c9dbf57856a0824bc23cc99cb31a67ce5138de7a6de2e255880a5696 16 #+busybox-process-extra.448a35fa5362e576a23ef306ec6e0da2f625adae08cc5c3b12a01d5d28f76ce6 17 #+busybox-procps.835712dc539d5583773d175255a5c4e27b5823d97e855948d27cc2c194247b0f 18 #+busybox-psmisc.f2434b74cd3e07ddea335da52c222567bc111b621f0f060afef8bcc26a8d96fd 19 #+busybox-ash.039eb4051853cdde4d03b8dbd5d6128957bf933be5ac398471666e5db0d33dab 20 #+busybox-bc.e731e83c11906525d676777835256a3f478779eafe7152701adfc46558d73009 21 #+busybox-coreutils.a57a12f85d58388c284d4f93f6c485d4bc2a7eac0d0f4be57b20d2ddbd4c8b8f 22 #+busybox-coreutils-extra.09de38ce2d65026888577e8314766e4b17205b2a99a4fecfdd5cd89c1cd82aed 23 #+busybox-daemontools.d12e277e7154028f0beaae44ad1e2c7e1cd12d28549b6861604fc634c3e09aaf 24 #+busybox-grep.474abd8ddad6afb320c55141078cb4507d02c4610181a4d72a4d98ba93434a60 25 #+busybox-misc.ea211db457ee098923eeff82a4388d5864254a6c2718f38471b5b2867c73d158 26 #+busybox-sh.49a7505969c9882c8a9a7ad3f5dba6d1382add3559f4da21ceafb2708d3fd4c8 27 #+busybox-util-linux-unpriv.95b792cd49d1f00d5488b15d93809166916ef3b8a63a69ea11f3bf6e92a74f24 28 #+busybox-findutils.db22f512240124b15d61cf8d0ceafebc98649f6f137608a2d1bd66f18e81ad8c 29 #+nawk.ec8a7f9ea4618a151470a1c1a0026f688a5032eb06b8e459510fe82316c17a60 30 #+busybox-diffutils.eed6ca067c994ab56e63b8b97a60f6e9f3625d3f9aeda53306e23bb42186ce78 31 #+musl-cross-make.4bca2cd43f4a72eaaeefc4befc0b0ce736a5906ec0245552a8db7dc56fa9e5ec 32 #+gnu-make.fb4cff1c46827d02016d0f94d5256a263e7710025f7480fffb7580dc922a6069 33 #+m4.3b766e732e3c57dd6ec18a8fa68d43ad094fca807d43cdcb68f8829a0c8f6905 34 #+netbsd-curses.5a8c9e0f305a914f61d9d68494804f65a3d7d70c2a5dcffa1849dda6861f4ee5 35 #+ocaml.bf89d3eeb0ba38f132986852f19631df96f531aa1e4f8c037f9cbcd8930f741f 36 #+ocamlbuild.3d77d9ce346e814e7a9bf6f5f95c5e43ca543d537b9491cb9c51553bd1800050 37 #@untar:-z:sha256:662c910f774e9fee3a19c4e057f380581ab2fc4ee52da4761304ac9c31b8869d:. 38 39 40 # - build script start - 41 42 linker_path_mcm='/home/ccx/versions/musl-cross-make.4bca2cd43f4a72eaaeefc4befc0b0ce736a5906ec0245552a8db7dc56fa9e5ec/x86_64-linux-musl/lib/ld-musl-x86_64.so.1' 43 linker_path_musl='/home/ccx/versions/musl.5aea4f44fd4fe9f9dd7c28a6780840121ba82303179f75a034e07f38ae99e513/library.so/ld-musl-x86_64.so.1' 44 check_dynamic() { 45 local exe || true 46 exe=$pthbs_destdir'/home/ccx/versions'/$pthbs_package/$1 47 if ! test -f $exe; then 48 printf '%s\n' "Error: file '$1' doesn't exist!" 49 exit 1 50 fi 51 local interp_info || true 52 interp_info=$(readelf --string-dump=.interp "$exe") || exit $? 53 case $interp_info in 54 ('') 55 printf '%s\n' "Error: '$1' is not a dynamic binary!" 56 exit 1 57 ;; 58 (*"$linker_path_mcm") 59 return 0 60 ;; 61 (*"$linker_path_musl") 62 return 0 63 ;; 64 (*) 65 printf '%s\n' "Error: '$1' unexpected linker path!" 66 ls -l "$linker_path_mcm" "$linker_path_musl" 67 exit 1 68 esac 69 } 70 71 prefix=/home/ccx/versions/$pthbs_package 72 dest=${pthbs_destdir%/}${prefix} 73 cd 'findlib-1.9.8' 74 75 76 ./configure -h || true 77 ./configure \ 78 -bindir "$prefix/command" \ 79 -mandir "$prefix/man" \ 80 -sitelib "$prefix/library.ocaml" \ 81 -config "$prefix/config/etc/findlib.conf" \ 82 -no-camlp4 83 84 85 make -j1 all opt 86 87 # workaround `topfind` getting installed to stdlib directory, this is not configurable 88 stdlib="$pthbs_destdir/home/ccx/versions/ocaml.bf89d3eeb0ba38f132986852f19631df96f531aa1e4f8c037f9cbcd8930f741f" 89 mkdir -p "${stdlib%/*}" 90 ln -s "$pthbs_package" "$stdlib" 91 make install prefix="$pthbs_destdir" 92 93 94 95 check_dynamic command/ocamlfind 96 97 98 99 cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" 100 find -type d -o -print | awk -F/ ' 101 BEGIN { 102 x["./command/ocamlfind"]=1 103 x["./library.ocaml/findlib/topfind.mli"]=1 104 x["./library.ocaml/findlib/topfind.cmi"]=1 105 x["./library.ocaml/findlib/META"]=1 106 x["./library.ocaml/topfind"]=1 107 # x["./library.ocaml/bigarray/META"]=1 108 x["./library.ocaml/bytes/META"]=1 109 # x["./library.ocaml/compiler-libs/META"]=1 110 # x["./library.ocaml/dynlink/META"]=1 111 # x["./library.ocaml/ocamldoc/META"]=1 112 # x["./library.ocaml/stdlib/META"]=1 113 # x["./library.ocaml/str/META"]=1 114 # x["./library.ocaml/threads/META"]=1 115 # x["./library.ocaml/unix/META"]=1 116 } 117 118 function r1(s) { 119 sub("^[.]/[^/]*", ".", s) 120 return s 121 } 122 function s1(repl, s) { 123 sub("^[.]/[^/]*", "./"repl, s) 124 return s 125 } 126 function link(src) { 127 x[$0]=0 128 printf "%s\t%s\n", $0, src 129 printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" 130 } 131 $1!="."{exit 1} 132 $2 == "env" { link($0); next } 133 $2 == ".env-template" { link($0); next } 134 135 $2 == "command" { link($0); next } 136 $2 == "command" { link($0); next } 137 $2 == "bin" { link(s1("command", $0)); next } 138 $2 == "sbin" { link(s1("command", $0)); next } 139 140 $2 == "library.so" { link($0); next } 141 $2 == "library" { link($0); next } 142 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } 143 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } 144 145 $2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } 146 $2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } 147 $2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } 148 149 $2 == "config" { link($0); next } 150 $2 == "man" { link($0); next } 151 $2 == "info" { link($0); next } 152 $2 == "doc" { link($0); next } 153 $2 == "data" { link($0); next } 154 $2 == "include" { link($0); next } 155 156 $2 == "share" && $3 ~ /^(icons|terminfo)$/ { link(r1($0)); next } 157 158 $2 == "library.ocaml" { link($0); next } 159 160 $2 == "keys" { link($0); next } 161 $2 == "zsh" { link($0); next } 162 $2 == "vimfiles" { link($0); next } 163 $2 == "icons" { link($0); next } 164 $2 == "terminfo" { link($0); next } 165 166 167 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } 168 169 END { 170 for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } 171 retcode = 0 172 for(fname in x) { 173 if(x[fname]) { 174 printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" 175 retcode = 3 176 } 177 } 178 exit retcode 179 }' >.install-links.new 180 mv .install-links.new .install-links 181