Fix meson (#135)

This commit is contained in:
Max Howell 2022-09-14 17:45:56 -04:00 committed by GitHub
parent 9b0cf3d92a
commit 97a351cf43
2 changed files with 20 additions and 13 deletions

View file

@ -5,12 +5,9 @@ distributable:
versions:
github: mesonbuild/meson/tags
#FIXME
# we need to fix the virtual-env of this thing
dependencies:
python.org: 3
#TODO gnu.org/bash
gnu.org/bash: '>=2' # for our venv/relocation scripts: feel free to fix that
build:
script: |
@ -21,17 +18,16 @@ build:
libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed meson
mkdir bin
cat <<EOF> bin/meson
#!/bin/bash
LIBEXEC="\$(cd "\$(dirname "\${BASH_SOURCE[0]}")"/../libexec/bin && pwd)"
source "\$LIBEXEC/activate"
"\$LIBEXEC"/meson "\$@"
EOF
chmod ugo+x bin/meson
mv libexec/bin/meson libexec/bin/meson.py
cd libexec/bin
cd bin
ln -s ../libexec/bin/meson meson
cd ../libexec/bin
fix-shebangs.ts *
cp {{ pkg.pantry-prefix}}/shim meson
rm Activate.ps1 activate.csh activate.fish
sed -i.bak 's|VIRTUAL_ENV=".*"|VIRTUAL_ENV="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. \&\& pwd)"|' activate
@ -40,7 +36,7 @@ build:
for x in python*; do
ln -sf ../../../../python.org/v3/bin/$x $x
done
#FIXME enable {{ deps.python.org.version.major }}
#FIXME tea provides: {{ deps.python.org.version.major }}
test:
dependencies:
ninja-build.org: 1

11
projects/mesonbuild.com/shim Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
self="${BASH_SOURCE[0]}"
if test -L "$self"; then
prefix="$(dirname "$self")"
suffix="$(dirname $(readlink $self))"
LIBEXEC="$(cd $prefix/$suffix && pwd)"
else
LIBEXEC="$(cd "$(dirname "$self")" && pwd)"
fi
source "$LIBEXEC/activate"
exec "$LIBEXEC"/meson.py "$@"