artiq/windows/PKGBUILD.common

30 lines
745 B
Plaintext
Raw Normal View History

2022-04-05 10:12:29 +08:00
arch=("any")
mingw_arch=("clang64")
2022-04-05 10:12:29 +08:00
pkgver=${DRV_VERSION}
url="https://m-labs.hk"
source=("source.tar")
sha256sums=("SKIP")
build() {
mkdir clang64
export PYTHONPATH=`pwd`/clang64/lib/python3.11/site-packages
2022-04-05 10:12:29 +08:00
chmod +w -R source
cd source
wine-msys2-build python setup.py install --single-version-externally-managed --prefix=../clang64 --record=setuptools-sucks.txt
2022-04-05 10:12:29 +08:00
cd ..
2022-04-05 18:04:49 +08:00
# patch broken shebangs (Z:/nix/store/...)
for entrypoint in clang64/bin/*-script.py; do
2022-04-05 18:04:49 +08:00
[ -f "$entrypoint" ] || continue
sed -i "1s|#!.*|#!python|" $entrypoint
done
for entrypoint in clang64/bin/*-script.pyw; do
2022-04-05 18:04:49 +08:00
[ -f "$entrypoint" ] || continue
sed -i "1s|#!.*|#!pythonw|" $entrypoint
done
2022-04-05 10:12:29 +08:00
}
package() {
cp -R clang64 ${pkgdir}
2022-04-05 10:12:29 +08:00
}