Skip setting env vars for winesync if the patchset isn't available for selected kernel

master
Tk-Glitch 2021-04-28 00:32:05 +07:00
parent 86fc89bc99
commit 4cd7091d0b
2 changed files with 6 additions and 4 deletions

@ -554,7 +554,7 @@ hackbase() {
install -Dm644 "${srcdir}"/customization-full.cfg "${pkgdir}/usr/share/doc/${pkgbase}/customization.cfg"
# workaround for missing header with winesync
if [ -e ""${srcdir}/${_srcpath}"/include/uapi/linux/winesync.h" ]; then
if [ -e "${srcdir}/${_srcpath}/include/uapi/linux/winesync.h" ]; then
msg2 "Workaround missing winesync header"
install -Dm644 "${srcdir}/${_srcpath}"/include/uapi/linux/winesync.h "${pkgdir}/usr/include/linux/winesync.h"
fi

@ -1194,9 +1194,11 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n
if [[ "$CONDITION_winesync" =~ [yY] ]] || [ "$_winesync" = "true" ]; then
msg2 "Patching winesync/fastsync support"
tkgpatch="$srcdir/0007-v${_basekernel}-winesync.patch" && _tkg_patcher
echo "CONFIG_WINESYNC=m" >> ./.config
echo "KERNEL==\"winesync\", MODE=\"0644\"" > ../winesync.rules
echo "winesync" > ../winesync.conf
if [ "$_skip" != "true" ]; then
echo "CONFIG_WINESYNC=m" >> ./.config
echo "KERNEL==\"winesync\", MODE=\"0644\"" > ../winesync.rules
echo "winesync" > ../winesync.conf
fi
fi
# Anbox modules