summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorNeko-san2022-11-23 04:43:21 -0600
committerNeko-san2022-11-23 04:43:21 -0600
commite9d8c3a9c4b8fae752c9d098b1867a114189d11c (patch)
treea0dca1113ff0357363a9a9f90b0ba58b37a82226 /PKGBUILD
parentc193ba822fb0133b06c2f7c457a105e349649a41 (diff)
downloadaur-e9d8c3a9c4b8fae752c9d098b1867a114189d11c.tar.gz
Edited the directory search logic for the loop on line 204
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD25
1 files changed, 13 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2909fc67e527..8d3121125208 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -71,24 +71,24 @@ 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 [ "$(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 -fsanitize=bounds,alignment,object-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
+ export CFLAGS="${CFLAGS} -march=x86-64-v4 -mtune=x86-64-v4 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -fsanitize=bounds,alignment,dir-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
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 -fsanitize=bounds,alignment,object-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
+ export CFLAGS="${CFLAGS} -march=x86-64-v3 -mtune=x86-64-v3 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -fsanitize=bounds,alignment,dir-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
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 -fsanitize=bounds,alignment,object-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
+ export CFLAGS="${CFLAGS} -march=x86-64-v2 -mtune=x86-64-v2 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -fsanitize=bounds,alignment,dir-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
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 -fsanitize=bounds,alignment,object-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
+ export CFLAGS="${CFLAGS} -march=x86-64 -mtune=x86-64 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -fsanitize=bounds,alignment,dir-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
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 -fsanitize=bounds,alignment,object-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
+ export CFLAGS="${CFLAGS} -march=aarch64 -mtune=aarch64 -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -fsanitize=bounds,alignment,dir-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
else
@@ -96,7 +96,7 @@ then
return
fi
elif [[ "${arch_auto}" == native ]]; then
- export CFLAGS="${CFLAGS} -march=native -mtune=native -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -fsanitize=bounds,alignment,object-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
+ export CFLAGS="${CFLAGS} -march=native -mtune=native -O3 -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -fsanitize=bounds,alignment,dir-size -fsanitize-undefined-trap-on-error -Wformat -Werror=format-security -Warray-bounds -Wvla -Wimplicit-fallthrough -Wno-unused-result -Wno-unneeded-internal-declaration"
export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
fi
@@ -201,15 +201,16 @@ package() {
install -dm777 "${pkgdir}/${_install_dir}/Engine"
# Move all folders into the package directory; mv has to be used this way to prevent "cannot mv, directory not empty" errors
- for object in ${srcdir}/${pkgname}; do
- if [ -d "${object}" ]; then
- if [ "${object}" == "LocalBuilds" ]; then
+ cd "${srcdir}/${pkgname}" || return
+ for dir in */ ; do
+ if [ -d "${dir}" ]; then
+ if [ "${dir}" == "LocalBuilds" ]; then
if [ -d LocalBuilds/Engine/Linux/ ]; then
- mv "${srcdir}"/"${pkgname}"/LocalBuilds/Engine/Linux/* "${pkgdir}/${_install_dir}/"
+ mv LocalBuilds/Engine/Linux/* "${pkgdir}/${_install_dir}/"
fi
else
- mkdir -p "${pkgdir}/${_install_dir}/${object}"
- mv "${srcdir}/${pkgname}/${object}"/* "${pkgdir}/${_install_dir}/${object}"
+ mkdir -p "${pkgdir}/${_install_dir}/${dir}"
+ mv "${dir}"/* "${pkgdir}/${_install_dir}/${dir}"
fi
fi
done