diff --git a/bin/pkg-build b/bin/pkg-build index e4b66612..75b83929 100755 --- a/bin/pkg-build +++ b/bin/pkg-build @@ -40,22 +40,32 @@ fi PKGS="$(sort.ts $PKGS --delimiter ' ')" # ^^ ensures that pkgs build topologically +gum() { + tea gum format -- "$@" +} + for PKG in $PKGS; do + gum "# building $PKG" + PKG="$(resolve.ts "$PKG")" ZIP="$(query.ts "$PKG" --src)" PREFIX="$(query.ts "$PKG" --prefix)" SRCDIR="$(query.ts "$PKG" --srcdir)" if test -n "$ZIP"; then + gum "# fetching $ZIP" fetch.ts "$PKG" -o "$ZIP" fi if test -f "$ZIP"; then + gum "# extracing $SRCDIR" extract.ts "$ZIP" --pkg "$PKG" --output-dir "$SRCDIR" else mkdir -p "$SRCDIR" fi + gum "# staging for build" + DEPS=$(deps.ts "$PKG" --build) # eg. nodejs.org^4 # shellcheck disable=SC2086 @@ -70,8 +80,12 @@ for PKG in $PKGS; do BASH="tea bash" fi + gum "# running build" + $BASH -e "$BUILD_SCRIPT" + gum "# fixing up built products" + DEPS="$(deps.ts "$PKG")" # needs to be runtime deps AND include self # shellcheck disable=SC2086 DEPS=$(install.ts $DEPS) @@ -79,6 +93,8 @@ for PKG in $PKGS; do find "$PREFIX" -type f -name \*.la -delete + gum "# symlinking installations" + link.ts "$PREFIX" "$PKG" if test -n "$GITHUB_ACTIONS"; then diff --git a/libexec/fixup.ts b/libexec/fixup.ts index 6ca37c33..634561f9 100755 --- a/libexec/fixup.ts +++ b/libexec/fixup.ts @@ -29,7 +29,7 @@ case 'darwin': ...['bin', 'lib', 'libexec'].compact(x => pkg_prefix.join(x).isDirectory()) ], env: { - GEM_HOME: usePrefix().join('gem').string + GEM_HOME: usePrefix().join('tea/local/share/ruby/gem').string } }) break diff --git a/libexec/stage.ts b/libexec/stage.ts index 203a763d..de77c3c8 100755 --- a/libexec/stage.ts +++ b/libexec/stage.ts @@ -68,13 +68,13 @@ const text = undent` mkdir -p "$HOME" export PATH=${brewkit}:"$PATH" + export CFLAGS="-w $CFLAGS" # warnings are noise ${pantry_sh} ` /// write out build script -const sh = srcdir.join("xyz.tea.build.sh").write({ text, force: true }) - +const sh = srcdir.join("xyz.tea.build.sh").write({ text, force: true }).chmod(0o755) /// copy in auxillary files from pantry directory for await (const [path, {isFile}] of pantry.getYAML(pkg).path.parent().ls()) { diff --git a/share/brewkit/python-venv.sh b/share/brewkit/python-venv.sh index b412ccc9..c54fbc22 100755 --- a/share/brewkit/python-venv.sh +++ b/share/brewkit/python-venv.sh @@ -25,7 +25,17 @@ git commit -mnil --allow-empty git tag -a "$VERSION" -m "Version $VERSION" --force cd "$VIRTUAL_ENV" -bin/pip install "$SRCROOT" --verbose + +# force tmp files to be somewhere useful for debugging purposes +# also why we have --no-clean later +mkdir -p $SRCROOT/xyz.tea.python.build + +TMPDIR=$SRCROOT/xyz.tea.python.build \ + bin/pip install \ + "$SRCROOT" \ + --verbose \ + --no-clean \ + --require-virtualenv # python virtual-envs are not relocatable # our only working choice is to rewrite these files and symlinks every time