diff --git a/build-package.sh b/build-package.sh index 8cdf1238..f3d09d31 100755 --- a/build-package.sh +++ b/build-package.sh @@ -33,6 +33,19 @@ do touch "${PACKAGES_TO_BUILD_DIR}/${pkg}" done < "${SRC_DIR}/built_packages.txt" +patches() { + pkgname="${1}" + + if [ "${BUILD_ARCH}" = "x86-64-v3" ] + then + if [[ "${pkgname}" = "proton"* ]] + then + echo "[i] Proton patches" + sed -i 's|-march=nocona -mtune=core-avx2|-march=x86-64-v3|g' PKGBUILD + fi + fi +} + built() { pkgname="${1}" pkgdir="${SRC_DIR}/packages/${pkgname}" @@ -62,6 +75,10 @@ built() { cd "${BUILD_DIR}/${pkgname}" + # run custom patches + echo "[i] Running custom patches..." + patches "${pkgname}" + echo "[i] Installing dependencies..." for (( i=0; i<15; i++ )) do @@ -80,7 +97,7 @@ built() { done # custom env for AUR packages - if [ "${pkgname}" = "linux-xanmod"* ] + if [[ "${pkgname}" = "linux-xanmod"* ]] then if [ "${BUILD_ARCH}" = "x86-64-v3" ] then diff --git a/packages/proton-ge-custom/built.conf b/packages/proton-ge-custom/built.conf new file mode 100644 index 00000000..14c0a8f5 --- /dev/null +++ b/packages/proton-ge-custom/built.conf @@ -0,0 +1,2 @@ +AUR_NAME="proton-ge-custom" +AUR_UPDATED="1652018466"