Skip to content

Commit

Permalink
Use Weab-Chan's patch method for the PPA
Browse files Browse the repository at this point in the history
  • Loading branch information
MastaG committed Jul 2, 2024
1 parent 31cfcaa commit 8e2b333
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/turnip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 29 additions & 7 deletions build_ppa.sh
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down Expand Up @@ -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
Expand All @@ -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
1 change: 0 additions & 1 deletion turnip_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down

0 comments on commit 8e2b333

Please sign in to comment.