pantry/projects/mesonbuild.com/package.yml

59 lines
1.6 KiB
YAML
Raw Normal View History

2022-08-10 21:58:22 +03:00
distributable:
url: https://github.com/mesonbuild/meson/releases/download/{{ version }}/meson-{{ version }}.tar.gz
strip-components: 1
versions:
github: mesonbuild/meson/tags
dependencies:
python.org: 3
2022-09-15 00:45:56 +03:00
gnu.org/bash: '>=2' # for our venv/relocation scripts: feel free to fix that
2022-08-10 21:58:22 +03:00
build:
script: |
2022-09-25 16:06:12 +03:00
python -m venv {{prefix}}/libexec
2022-08-10 21:58:22 +03:00
2022-09-13 18:05:04 +03:00
cd "{{prefix}}"
2022-08-10 21:58:22 +03:00
2022-09-13 18:05:04 +03:00
libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed meson
mkdir bin
2022-09-15 00:45:56 +03:00
mv libexec/bin/meson libexec/bin/meson.py
cd bin
ln -s ../libexec/bin/meson meson
2022-09-13 18:05:04 +03:00
2022-09-15 00:45:56 +03:00
cd ../libexec/bin
2022-09-13 18:05:04 +03:00
fix-shebangs.ts *
2022-09-25 16:06:12 +03:00
cp "$SRCROOT"/props/shim.bash meson
2022-09-27 17:19:55 +03:00
chmod +x meson
2022-09-15 00:45:56 +03:00
2022-09-13 18:05:04 +03:00
rm Activate.ps1 activate.csh activate.fish
sed -i.bak 's|VIRTUAL_ENV=".*"|VIRTUAL_ENV="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. \&\& pwd)"|' activate
rm activate.bak
# FIXME a lot: this "updates" the `venv` on each run for relocatability
cat <<EOF>>activate
sed -i.bak \\
-e "s|$TEA_PREFIX/python.org/v{{deps.python.org.version}}|\$TEA_PREFIX/python.org/v{{deps.python.org.version.major}}|" \\
-e 's|bin/python{{deps.python.org.version.major}}.{{deps.python.org.version.minor}}|bin/python|' \\
-e "s|{{prefix}}/libexec|\$TEA_PREFIX/mesonbuild.com/v{{version}}/libexec|" \\
\$VIRTUAL_ENV/pyvenv.cfg
rm \$VIRTUAL_ENV/pyvenv.cfg.bak
EOF
2022-09-13 18:05:04 +03:00
for x in python*; do
2022-09-25 16:06:12 +03:00
ln -sf ../../../../python.org/v{{ deps.python.org.version.major }}/bin/$x $x
2022-09-13 18:05:04 +03:00
done
2022-08-10 21:58:22 +03:00
test:
dependencies:
ninja-build.org: 1
tea.xyz/gx/cc: c99
script: |
2022-08-31 21:05:21 +03:00
meson ..
2022-08-10 21:58:22 +03:00
test -f build.ninja
2022-08-31 21:05:21 +03:00
working-directory: build