diff options
-rwxr-xr-x | configure | 1 | ||||
-rw-r--r-- | lib/crypto/bld.sub | 3 | ||||
-rw-r--r-- | mbld/config+plan9-x64.myr | 1 | ||||
-rw-r--r-- | mbld/deps.myr | 16 | ||||
-rw-r--r-- | mbld/install.myr | 12 | ||||
-rw-r--r-- | mbld/types.myr | 3 |
6 files changed, 24 insertions, 12 deletions
@@ -126,6 +126,7 @@ echo "const Runtime = \"_myrrt.o\"" >> mbld/config.myr echo "const Sharepath = \"share\"" >> mbld/config.myr echo "const Binpath = \"bin\"" >> mbld/config.myr echo "const Libpath = \"lib/myr\"" >> mbld/config.myr +echo "const Stripman = false" >> mbld/config.myr echo "const Env : (byte[:], byte[:])[:] = $env" >> mbld/config.myr diff --git a/lib/crypto/bld.sub b/lib/crypto/bld.sub index dcf68f5..a8f5565 100644 --- a/lib/crypto/bld.sub +++ b/lib/crypto/bld.sub @@ -15,10 +15,11 @@ lib crypto = # symmetric ciphers chacha20.myr aes.myr - aesgcm.myr + #aesgcm.myr # public key ciphers rsa.myr + x25519.myr # randomness entropy.myr # currently assumes a /dev/random diff --git a/mbld/config+plan9-x64.myr b/mbld/config+plan9-x64.myr index e246d4d..1fa7774 100644 --- a/mbld/config+plan9-x64.myr +++ b/mbld/config+plan9-x64.myr @@ -14,4 +14,5 @@ pkg config = const Binpath = "amd64/bin" const Libpath = "amd64/lib/myr" const Sharepath = "lib" + const Stripman = true ;; diff --git a/mbld/deps.myr b/mbld/deps.myr index ec5c09e..be12b4c 100644 --- a/mbld/deps.myr +++ b/mbld/deps.myr @@ -75,8 +75,8 @@ const myrdeps = {b, name, mt go.instdir = config.Libpath gu.instdir = config.Libpath ;; - go.instmod = 0o644 - gu.instmod = 0o644 + go.instmode = 0o644 + gu.instmode = 0o644 generates(g, gu, tu) generates(g, go, to) @@ -116,7 +116,7 @@ const myrdeps = {b, name, mt addnode(g, "all", go) if mt.install go.instdir = config.Binpath - go.instmod = 0o755 + go.instmode = 0o755 ;; ;; std.slfree(u) @@ -251,10 +251,14 @@ const mandeps = {b, name, mt n = leaf(b.deps, p) match std.strrfind(pg, ".") | `std.None: std.fatal("manpage {} missing section\n", pg) - | `std.Some i: r = std.strcat(config.Manpath, pg[i + 1:]) + | `std.Some i: + r = std.strcat(config.Manpath, pg[i + 1:]) + if config.Stripman + n.instname = std.sldup(pg[:i]) + ;; ;; n.instdir = r - n.instmod = 0o644 + n.instmode = 0o644 addnode(b.deps, "all", n) ;; } @@ -269,7 +273,7 @@ const datdeps = {b, name, dt if dt.path.len == 0 n.instdir = config.Sharepath ;; - n.instmod = 0o644 + n.instmode = 0o644 addnode(b.deps, "all", n) ;; } diff --git a/mbld/install.myr b/mbld/install.myr index e2119ed..9ab879e 100644 --- a/mbld/install.myr +++ b/mbld/install.myr @@ -20,7 +20,7 @@ const uninstall = {b } const movetargs = {b, rm - var inst + var inst, name inst = std.htgetv(b.deps.targs, "all", [][:]) for n : inst @@ -28,7 +28,11 @@ const movetargs = {b, rm continue ;; for g : n.gen - if !movefile(b, rm, g, n.instdir, n.instmod) + name = n.instname + if name.len == 0 + name = std.basename(g) + ;; + if !movefile(b, rm, g, n.instdir, name, n.instmode) -> false ;; ;; @@ -37,11 +41,11 @@ const movetargs = {b, rm } -const movefile = {b, rm, file, prefix, perm +const movefile = {b, rm, file, prefix, instname, perm var path, ok ok = true - path = std.pathjoin([opt_destdir, opt_instbase, prefix, std.basename(file)][:]) + path = std.pathjoin([opt_destdir, opt_instbase, prefix, instname][:]) if rm mbldput("\trm {}\n", path) if !std.remove(path) diff --git a/mbld/types.myr b/mbld/types.myr index 84db996..809a543 100644 --- a/mbld/types.myr +++ b/mbld/types.myr @@ -115,7 +115,8 @@ pkg bld = /* install info */ instdir : byte[:] - instmod : int64 + instname: byte[:] + instmode: int64 /* dependency names */ gen : byte[:][:] |