diff options
author | Neko-san | 2022-08-31 13:33:04 -0500 |
---|---|---|
committer | Neko-san | 2022-08-31 13:33:04 -0500 |
commit | a6a1069d2aa5035b564c8459063be34dc9628feb (patch) | |
tree | 206b949ac9cca025bc0e440467b677bf94c27d0a /PKGBUILD | |
parent | 41a20e6170809e7607030eb60cb65f184e9adb89 (diff) | |
download | aur-a6a1069d2aa5035b564c8459063be34dc9628feb.tar.gz |
Edited the PKGBUILD
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 43 |
1 files changed, 26 insertions, 17 deletions
@@ -9,9 +9,9 @@ pkgname=unreal-engine pkgver=5.0.3 pkgrel=0 pkgdesc='A 3D game engine by Epic Games which can be used non-commercially for free.' -arch=('x86_64' 'x86_64_v2' 'x86_64_v3' 'x86_64_v4') +arch=('x86_64' 'x86_64_v2' 'x86_64_v3' 'x86_64_v4' 'aarch64') url=https://www.unrealengine.com/ -makedepends=('git' 'openssh') +makedepends=('git' 'openssh' 'coreutils') depends=('icu63' 'sdl2' 'python' 'lld' 'xdg-user-dirs' 'dos2unix') optdepends=('qt5-base: qmake build system for projects' 'cmake: build system for projects' @@ -50,24 +50,33 @@ arch_auto=false if [[ ${arch_auto} == auto ]] then ## Architecture checks and compile flag adjustments - shellcheck throws a fit about the build function but it looks fine to me; checks for the highest available x64 support level and falls back to "native" if either not available - if test "$(/lib/ld-linux-x86-64.so.2 --help | grep -w '^ x86-64-v4' | cut -d ',' -f 1)" == ' x86-64-v4 (supported'; then - export CFLAGS="${CFLAGS} -march=x86-64-v4 -mtune=x86-64-v4 -O3 -pipe" - export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" - export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" - elif test "$(/lib/ld-linux-x86-64.so.2 --help | grep -w '^ x86-64-v3' | cut -d ',' -f 1)" == ' x86-64-v3 (supported'; then - export CFLAGS="${CFLAGS} -march=x86-64-v3 -mtune=x86-64-v3 -O3 -pipe" - export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" - export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" - elif test "$(/lib/ld-linux-x86-64.so.2 --help | grep -w '^ x86-64-v2' | cut -d ',' -f 1)" == ' x86-64-v2 (supported'; then - export CFLAGS="${CFLAGS} -march=x86-64-v2 -mtune=x86-64-v2 -O3 -pipe" - export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" - export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" - elif test "$(/lib/ld-linux-x86-64.so.2 --help | grep -w '^ x86_64 (AT_PLATFORM; supported' | cut -d ',' -f 1)" == ' x86_64 (AT_PLATFORM; supported'; then - export CFLAGS="${CFLAGS} -march=x86-64 -mtune=x86-64 -O3 -pipe" + if [ "$(uname -m)" == "x86_64" ]; then + if [ "$(/lib/ld-linux-x86-64.so.2 --help | grep -w 'x86-64-v4' | cut -d ',' -f 1 | sed 's/^ //' | sed 's/ (/ - /')" == ' x86-64-v4 - supported' ]; then + export CFLAGS="${CFLAGS} -march=x86-64-v4 -mtune=x86-64-v4 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection" + export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" + export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" + elif [ "$(/lib/ld-linux-x86-64.so.2 --help | grep -w 'x86-64-v3' | cut -d ',' -f 1 | sed 's/^ //' | sed 's/ (/ - /')" == 'x86-64-v3 - supported' ]; then + export CFLAGS="${CFLAGS} -march=x86-64-v3 -mtune=x86-64-v3 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection" + export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" + export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" + elif [ "$(/lib/ld-linux-x86-64.so.2 --help | grep -w 'x86-64-v2' | cut -d ',' -f 1 | sed 's/^ //' | sed 's/ (/ - /')" == 'x86-64-v2 - supported' ]; then + export CFLAGS="${CFLAGS} -march=x86-64-v2 -mtune=x86-64-v2 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection" + export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" + export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" + elif [ "$(/lib/ld-linux-x86-64.so.2 --help | grep 'x86_64' | grep 'supported' | cut -d ',' -f 1 | sed 's/^ //' | sed 's/ (/ - /' | grep -w '^x86_64 - supported')" == 'x86_64 - supported' ]; then + export CFLAGS="${CFLAGS} -march=x86-64 -mtune=x86-64 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection" + export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" + export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" + fi + elif [ "$(uname -m)" == "aarch64" ]; then + export CFLAGS="${CFLAGS} -march=aarch64 -mtune=aarch64 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection" export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" + else + echo "Architecture '$(uname -m)' is not supported! Exiting." + return fi -elif [[ arch_auto == native ]]; then +elif [[ "${arch_auto}" == native ]]; then export CFLAGS="${CFLAGS} -march=native -mtune=native -O3 -pipe" export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS" export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" |