mirror of
https://github.com/ivabus/pantry
synced 2025-06-08 08:20:32 +03:00
+portable meson (#130)
This commit is contained in:
parent
0240a4bfb1
commit
3291915ef4
2 changed files with 28 additions and 10 deletions
|
@ -10,20 +10,37 @@ versions:
|
|||
|
||||
dependencies:
|
||||
python.org: 3
|
||||
#TODO gnu.org/bash
|
||||
|
||||
build:
|
||||
script: |
|
||||
python3 -m venv {{prefix}}/libexec
|
||||
{{prefix}}/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed meson
|
||||
mkdir {{prefix}}/bin
|
||||
ln -s {{prefix}}/libexec/bin/meson {{prefix}}/bin/meson
|
||||
|
||||
# tidy up
|
||||
find \
|
||||
{{prefix}}/libexec/bin \
|
||||
-name easy_install\* -o -name activate\* -o -name Activate.ps1 \
|
||||
| xargs rm
|
||||
cd "{{prefix}}"
|
||||
|
||||
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
|
||||
|
||||
cd libexec/bin
|
||||
fix-shebangs.ts *
|
||||
|
||||
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
|
||||
|
||||
for x in python*; do
|
||||
ln -sf ../../../../python.org/v3/bin/$x $x
|
||||
done
|
||||
#FIXME enable {{ deps.python.org.version.major }}
|
||||
test:
|
||||
dependencies:
|
||||
ninja-build.org: 1
|
||||
|
|
|
@ -30,6 +30,7 @@ const cellar = useCellar()
|
|||
|
||||
const dry = Deno.args.map(parsePackageRequirement)
|
||||
const gha = !!Deno.env.get("GITHUB_ACTIONS")
|
||||
const group_it = gha && dry.length > 1
|
||||
|
||||
const rv: Package[] = []
|
||||
for (const pkgrq of dry) {
|
||||
|
@ -47,7 +48,7 @@ for (const pkgrq of dry) {
|
|||
}
|
||||
}
|
||||
|
||||
if (gha) {
|
||||
if (group_it) {
|
||||
console.log("::group::", `${pkg.project}@${pkg.version}`)
|
||||
} else {
|
||||
console.log({ building: pkgrq.project })
|
||||
|
@ -81,7 +82,7 @@ for (const pkgrq of dry) {
|
|||
|
||||
rv.push(pkg)
|
||||
|
||||
if (gha) {
|
||||
if (group_it) {
|
||||
console.log("::endgroup::")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue