-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Rogue Company patch and change injection method (#18)
* Fix syntax in rogue_company_reverts.patch * Add shebang and remove leading space * Change method of injecting fixes Make variables easier to change Add status messages * Change build options * unattended - build only, no user input * build - build only, after user input * default - build and install, after user input
- Loading branch information
Showing
6 changed files
with
63 additions
and
174 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,71 @@ | ||
# Enable/disable each fix we offer | ||
_reenable_dt_hash="true" | ||
_rogue_company_fix="false" | ||
_disable_tests="true" # They are very playful and seem to fail randomly in different ways depending on the machine, so let's disable them by default - https://github.com/Frogging-Family/glibc-eac/issues/2 | ||
_upstream_commit="" # 2.39-4 commit was 31da30f23cddd36db29d5b6a1c7619361b271fb4 | ||
#!/usr/bin/env bash | ||
|
||
rm -rf ./glibc && git clone --depth=1 --single-branch -b main https://gitlab.archlinux.org/archlinux/packaging/packages/glibc.git | ||
cd ./glibc | ||
# Enable/disable each fix we offer | ||
: ${_reenable_dt_hash=true} | ||
: ${_rogue_company_fix=false} | ||
: ${_disable_tests=true} # random fails on different machines | ||
: ${_upstream_commit=} # 2.40+r16+gaa533d58ff = aa533d58ff12e27771d9c960a727d74992a3f2a3 | ||
|
||
if [ "$_reenable_dt_hash" = "true" ]; then | ||
patch -Np1 -i ../inject_reenable_DT_HASH.patch && cp ../reenable_DT_HASH.patch ./ | ||
fi | ||
rm -rf ./glibc && git clone --depth=1 --single-branch -b main https://gitlab.archlinux.org/archlinux/packaging/packages/glibc.git | ||
cd ./glibc | ||
|
||
if [ "$_rogue_company_fix" = "true" ]; then | ||
patch -Np1 -i ../inject_rogue_company_reverts.patch && cp ../rogue_company_reverts.patch ./ | ||
fi | ||
if [[ "${_reenable_dt_hash::1}" =~ t|y|1 ]]; then | ||
echo "::: Fixing DT_HASH..." | ||
cat >> PKGBUILD << 'END' | ||
export LDFLAGS+=" -Wl,--hash-style=both" | ||
END | ||
fi | ||
|
||
if [ "$_disable_tests" = "true" ]; then | ||
patch -Np1 -i ../disable_tests.patch | ||
fi | ||
if [[ "${_rogue_company_fix::1}" =~ t|y|1 ]]; then | ||
echo "::: Fixing Rogue Company..." | ||
cp ../rogue_company_reverts.patch ./ | ||
cat >> PKGBUILD << 'END' | ||
source+=('rogue_company_reverts.patch') | ||
b2sums+=('SKIP') | ||
if [ -n "$_upstream_commit" ]; then | ||
sed -i "s/_commit=.*/_commit=$_upstream_commit/g" PKGBUILD | ||
fi | ||
eval _orig_"$(declare -f prepare)" | ||
prepare() { | ||
(_orig_prepare) | ||
if [ "$1" = "build" ]; then | ||
cd glibc | ||
# Reverts for Rogue Company to work again | ||
# 7a5db2e82fbb6c3a6e3fdae02b7166c5d0e8c7a8 | ||
# 8208be389bce84be0e1c35a3daa0c3467418f921 | ||
# 6bf789d69e6be48419094ca98f064e00297a27d5 | ||
# b89d5de2508215ef3131db7bed76ac50b3f4c205 | ||
# 86f0179bc003ffc34ffaa8d528a7a90153ac06c6 | ||
patch -Np1 -F100 -i "../rogue_company_reverts.patch" | ||
} | ||
END | ||
fi | ||
|
||
# https://github.com/Frogging-Family/glibc-eac/issues/2 | ||
if [[ "${_disable_tests::1}" =~ t|y|1 ]]; then | ||
echo "::: Disabling unit tests..." | ||
cat >> PKGBUILD << 'END' | ||
unset checkdepends | ||
unset -f check | ||
END | ||
fi | ||
|
||
if [ -n "$_upstream_commit" ]; then | ||
echo -n "::: Using commit: $_upstream_commit" | ||
sed -i "s/_commit=.*/_commit=$_upstream_commit/g" PKGBUILD | ||
fi | ||
|
||
case "$1" in | ||
unattended) | ||
echo "::: Building in unattended mode..." | ||
makepkg --noconfirm --skipinteg -sc | ||
;; | ||
build) | ||
echo "::: Build only. If you want to build and install, re-run without options." | ||
read -rp "Press enter to continue or hit ctrl+c to leave" | ||
makepkg --noconfirm --skipinteg -sc | ||
else | ||
echo "############################################################################################" | ||
echo "! Defaulting to building then installing ! If you only want to build, run './glibc_eac.sh build'" | ||
echo "############################################################################################" | ||
;; | ||
*) | ||
echo "::: Build and install. If you want to build only, run: './glibc_eac.sh build'" | ||
read -rp "Press enter to continue or hit ctrl+c to leave" | ||
makepkg --noconfirm --skipinteg -sic | ||
fi | ||
;; | ||
esac |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters