fix ttf-ms-win11-auto
This commit is contained in:
parent
5b5b3b44d4
commit
760f988efa
35
repo/ttf-ms-win11-auto/lilac.py
Normal file
35
repo/ttf-ms-win11-auto/lilac.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
from lilaclib import *
|
||||
|
||||
import subprocess
|
||||
|
||||
def apply_patch(filename, patch):
|
||||
patch_proc = subprocess.Popen(["patch", "-p1", filename], stdin=subprocess.PIPE, text=True)
|
||||
patch_proc.communicate(patch)
|
||||
|
||||
def pre_build():
|
||||
aur_pre_build()
|
||||
apply_patch('PKGBUILD', PATCH)
|
||||
|
||||
PATCH=r"""
|
||||
diff --git a/PKGBUILD b/PKGBUILD
|
||||
index 7c63329..457ba24 100644
|
||||
--- a/PKGBUILD
|
||||
+++ b/PKGBUILD
|
||||
@@ -401,13 +401,11 @@ prepare() {
|
||||
echo "- Fonts are missing"
|
||||
echo -ne "- Mount filesystems as a non-privileged user: "
|
||||
touch test.mount
|
||||
- _unprivilegedMountAllowed=false
|
||||
- _testLoopDev=$(udisksctl loop-setup -r -f test.mount --no-user-interaction | awk '{print $NF}') && _unprivilegedMountAllowed=true
|
||||
- _testLoopDev=${_testLoopDev::-1}
|
||||
- udisksctl loop-delete -b "$_testLoopDev" --no-user-interaction
|
||||
+ _mount=
|
||||
+ udisksctl loop-setup -r -f test.mount --no-user-interaction >/dev/null 2>&1 && _mount=true
|
||||
rm test.mount
|
||||
|
||||
- if [ $_unprivilegedMountAllowed ]; then
|
||||
+ if [ $_mount ]; then
|
||||
echo "allowed"
|
||||
echo "- Downloading fonts directly"
|
||||
mkdir -p mnt/http
|
||||
"""
|
|
@ -7,8 +7,6 @@ repo_depends:
|
|||
|
||||
build_prefix: extra-x86_64
|
||||
|
||||
pre_build: aur_pre_build
|
||||
|
||||
post_build: aur_post_build
|
||||
|
||||
update_on:
|
||||
|
|
Loading…
Reference in a new issue