forked from rizinorg/rz-bindgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcibw_before_all.sh
39 lines (32 loc) · 1.14 KB
/
cibw_before_all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# SPDX-FileCopyrightText: 2022 wingdeans <[email protected]>
# SPDX-License-Identifier: LGPL-3.0-only
set -ex
# Install deps
pip3 install meson ninja meson-python build
if command -v apt; then
set +e
grep VERSION_CODENAME=stretch /etc/os-release >/dev/null 2>/dev/null
if [[ $? == 0 ]] ; then
# Required because manylinux_2_24 uses Debian Stretch and the repos are not available anymore
echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list
echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
echo "Acquire::Check-Valid-Until no;" > /etc/apt/apt.conf.d/99no-check-valid-until
fi
set -e
apt update && apt install --assume-yes libclang-7-dev clang-7 llvm-7
elif command -v apk; then
apk update && apk add clang-dev
fi
pushd rizin
if [[ "$OSTYPE" =~ msys* ]]; then
meson setup --buildtype=release --prefix='c:/rizin' --vsenv build
else
meson setup --buildtype=release --libdir=lib build
fi
meson install -C build
popd
if command -v apt; then
if [ ! -e dist/*.tar.gz ] ; then
python3 -m build --sdist
fi
fi