python3-sabyenc3: fix cross-build

This commit is contained in:
Đoàn Trần Công Danh 2023-01-05 23:05:58 +07:00
parent 767c3d5f20
commit 5bffd08fdd

View file

@ -12,3 +12,18 @@ license="LGPL-3.0-or-later"
homepage="https://github.com/sabnzbd/sabyenc/"
distfiles="$PYPI_SITE/s/sabyenc3/sabyenc3-$version.tar.gz"
checksum=f3d65f2a70bcb13ef1beae0ff6bb3b69adae18497035f8cd4ffe4e5af1aa2f41
pre_configure() {
vsed -i -e '
/-O3/d
/IS_X86 =/s/=.*/= False/
/IS_MACOS =/s/=.*/= False/
/IS_ARM =/s/=.*/= False/
' setup.py
case "$XBPS_TARGET_MACHINE" in
x86_64* | i686*)
vsed -i -e '/IS_X86 =/s/=.*/= True/' setup.py ;;
aarch64* | arm*)
vsed -i -e '/IS_ARM =/s/=.*/= True/' setup.py ;;
esac
}