diff --git a/.github/workflows/turnip.yml b/.github/workflows/turnip.yml index c36861e..6245987 100644 --- a/.github/workflows/turnip.yml +++ b/.github/workflows/turnip.yml @@ -17,7 +17,6 @@ jobs: sudo sed -i 's/^Types: deb$/Types: deb deb-src/g' /etc/apt/sources.list.d/*.sources sudo apt update sudo apt build-dep mesa -y - sudo apt install -y python3-mako meson - name: Execute build script run: bash ./turnip_builder.sh diff --git a/build_ppa.sh b/build_ppa.sh index e6600fe..4d05651 100755 --- a/build_ppa.sh +++ b/build_ppa.sh @@ -1,11 +1,21 @@ #!/bin/bash +patches=( + "fix-for-anon-file;../../../turnip-patches/fix-for-anon-file.patch;" + "fix-for-getprogname;../../../turnip-patches/fix-for-getprogname.patch;" + "fix-stringmapiterator;../../../turnip-patches/fix-stringmapiterator.patch;" + "mesa-2934e1f-termux-x11-dri3;../../../turnip-patches/mesa-2934e1f-termux-x11-dri3.patch;" + "zink_fixes;../../../turnip-patches/zink_fixes.patch;" + "descr-prefetching-optimization-a7xx;merge_requests/29873;" + "make-gmem-work-with-preemption;merge_requests/29871;" + "VK_EXT_fragment_density_map;merge_requests/29938;" +) export DEBEMAIL="${EMAIL}" export DEBFULLNAME="MastaG" sudo apt update # Disable system-upgrade for the github runner # sudo apt -y upgrade # sudo apt -y dist-upgrade -sudo apt install -y devscripts dpkg-dev build-essential fakeroot dput-ng git software-properties-common +sudo apt install -y devscripts dpkg-dev build-essential fakeroot dput-ng git software-properties-common curl echo "${PUBKEY}" | base64 --decode | gpg --batch --import echo "${PRIVKEY}" | base64 --decode | gpg --batch --import git config --global user.email "${EMAIL}" @@ -60,13 +70,24 @@ do dch --newversion "${newversion}" "Rebuild mesa-turnip-kgsl with the following patches:" dch -r -u high "Rebuild mesa-turnip-kgsl with the following patches:" cd debian/patches - ls ../../../turnip-patches/*.patch | while read line + for patch in ${patches[@]} do - patch="$(ls ${line} | sed 's:.*/::')" - dch -a ${patch} - echo "Adding: ${patch}" - echo "${patch}" >> series - cp -f "${line}" . + echo "Applying patch ${patch}" + patch_source="$(echo ${patch} | cut -d ";" -f 2 | xargs)" + patch_name="$(echo ${patch} | cut -d ";" -f 1 | xargs)" + dch -a "${patch_name} - ${patch_source}" + if [[ ${patch_source} == *"../../.."* ]] + then + apply="$(echo ${patch_source} | sed 's:.*/::')" + cp -f ${patch_source} . + echo "${apply}" >> series + else + patch_file="${patch_source#*\/}" + patch_args=$(echo ${patch} | cut -d ";" -f 3 | xargs) + curl --output "${patch_file}".patch -k --retry-delay 30 --retry 5 -f --retry-all-errors https://gitlab.freedesktop.org/mesa/mesa/-/"${patch_source}".patch + sleep 1 + echo "${patch_file}".patch >> series + fi done cd ../.. # Enable kgsl @@ -80,5 +101,6 @@ do done if ls *.changes 1> /dev/null 2>&1 then + echo "Push to launchpad" dput --force ppa:mastag/mesa-turnip-kgsl *.changes fi diff --git a/turnip_builder.sh b/turnip_builder.sh index ecb1432..60c0ac6 100755 --- a/turnip_builder.sh +++ b/turnip_builder.sh @@ -19,7 +19,6 @@ patches=( "zink_fixes;../../turnip-patches/zink_fixes.patch;" "descr-prefetching-optimization-a7xx;merge_requests/29873;" "make-gmem-work-with-preemption;merge_requests/29871;" - "VK_KHR_shader_clock;merge_requests/29860;" "VK_EXT_fragment_density_map;merge_requests/29938;" ) commit=""