instow

:)
git clone https://git.sr.ht/~ashymad/instow
Log | Files | Refs | LICENSE

commit 8575a59a202232ee7d39d29049c37858df5f9584
parent ca8042154ff039ec253461933717efdf58861ffe
Author: Ashymad <szymon.mikulicz@posteo.net>
Date:   Wed, 18 Mar 2026 20:47:30 +0100

Fix meson and PATH

Diffstat:
Mbootstrap.sh | 2++
Msrc/main.janet | 21+++++++++++----------
2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/bootstrap.sh b/bootstrap.sh @@ -9,6 +9,8 @@ PREFIX="${PREFIX:-$HOME/.instow}" SRCDIR="${SRCDIR:-$PREFIX/var/src}" PKGDIR="${PKGDIR:-$PREFIX/var/pkg}" +PATH="$PATH:$PREFIX/bin" + mkdir -p "$SRCDIR" mkdir -p "$PKGDIR" ROOTDIR="$(mktemp -d)" diff --git a/src/main.janet b/src/main.janet @@ -42,7 +42,7 @@ (defn runp [state env & args] (def log_file (file/open "./instow.log" :a)) - (file/write log_file (string/join ["RUN:" ;args "\n"] " ")) + (file/write log_file (string "RUN: '" (string/join args "' '") "'\n")) (def proc (os/spawn args :e env)) (ev/gather (prinfer state log_file (proc :out)) @@ -139,7 +139,7 @@ :conf/meson (do (set builddir "build") - (checkrun :build/ninja :meson "setup" builddir (stropt "--prefix" prefix))) + (checkrun :build/meson :meson "setup" builddir (stropt "--prefix" prefix))) :conf/cmake (do @@ -150,10 +150,11 @@ (checkrun :install/make :make "-C" builddir - ;(if-let [mf (os/getenv "MAKEFLAGS")] (string/split " " mf) []) - ;(if (nil? (os/getenv "CC")) [] [(stropt "CC" (os/getenv "CC"))]) - ;(if (nil? (os/getenv "CXX")) [] [(stropt "CXX" (os/getenv "CXX"))]) - (string/format "-j%d" (libc/get_nprocs))) + (string/format "-j%d" (libc/get_nprocs)) + ;(if-let [cc (os/getenv "CC")] [cc] []) + ;(if-let[cxx (os/getenv "CXX")] [cxx] []) + "--" + ;(if-let [m (os/getenv "MAKETARGETS")] (string/split " " m) [])) :build/go (checkrun :install/go :go "build" "-v") @@ -167,8 +168,8 @@ :build/pep517 (checkrun :install/pep517 :python "-m" "build" "--wheel" "--no-isolation") - :build/ninja - (checkrun :install/ninja :ninja "-C" builddir) + :build/meson + (checkrun :install/meson :meson "compile" "-C" builddir) :build/jpm (checkrun :install/jpm :jpm "build") @@ -183,8 +184,8 @@ (stropt "DESTDIR" destdir) (stropt "INSTALL_ROOT" destdir)) - :install/ninja - (checkrun :move :ninja "-C" builddir "install" (stropt "DESTDIR" destdir)) + :install/meson + (checkrun :move :meson "install" "-C" builddir (stropt "--destdir" destdir)) :install/go (do