summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZerophase2018-04-08 17:14:33 -0500
committerZerophase2018-04-08 17:15:11 -0500
commitd5420e2e37a8442654e744351e675e0c241f78e1 (patch)
treeaf62714f0be7b59ef401a069711cd9726d99382f
parent9565efd54a6e56281fce1d8c23315bda71e5a582 (diff)
downloadaur-d5420e2e37a8442654e744351e675e0c241f78e1.tar.gz
Add Clang 6.0 support
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD21
-rw-r--r--clang60-support.patch15
3 files changed, 37 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bcabdcfc5d51..ed114434d3b4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Sun Apr 8 22:13:55 UTC 2018
pkgbase = unreal-engine
pkgdesc = A 3D game engine by Epic Games which can be used non-commercially for free.
pkgver = 4.19.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.unrealengine.com/
arch = x86_64
license = custom:UnrealEngine
@@ -15,6 +17,7 @@ pkgbase = unreal-engine
depends = sdl2
depends = qt4
depends = python
+ depends = lld
options = !strip
source = git+ssh://git@github.com/EpicGames/UnrealEngine.git#tag=4.19.0-release
source = UE4Editor.desktop
@@ -22,12 +25,14 @@ pkgbase = unreal-engine
source = disable-pie.patch
source = only-generate-makefile.patch
source = html5-build.patch
+ source = clang60-support.patch
sha256sums = SKIP
sha256sums = 46871ed662a3c97698be609d27da280d9000ec97183f1fa6592986f9910a2118
sha256sums = 918dff809a7e815343a8d233f704f52a910b8f01a9cb3d29de541a0334fecc7c
sha256sums = a8bb46ad630c077dd302cd8397f2c8d79d6bb13dbff1cbfbbdad447033ad3c6e
sha256sums = dba4b1910dd6424d50a8d95a461c5cf3a96f3e7df0b015624d9bf1c97dc317d3
sha256sums = 9fd6d16d56fbe0489a2580b86359df84b83a6987b5760a9e57ae0898f51943ac
+ sha256sums = 5583481dc7e08ebce1d0865b36bd50124b8be0d2347fec20aad3c37a346b3eb4
pkgname = unreal-engine
diff --git a/PKGBUILD b/PKGBUILD
index e5760ba3c290..3e0cf2ef7829 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,16 +5,20 @@
# The source is over 8 GiB, with an extra 3 GiB of dependencies downloaded in build(), and may take several hours to compile.
+# Allows enlargement of /tmp to fit Unreal.
+# set enlargetmp to any value.
+enlargetmp=
+
pkgname='unreal-engine'
pkgver=4.19.0
# shellcheck disable=SC2034
{
- pkgrel=1
+ pkgrel=2
pkgdesc='A 3D game engine by Epic Games which can be used non-commercially for free.'
arch=('x86_64')
url='https://www.unrealengine.com/'
makedepends=('clang' 'mono' 'dos2unix' 'cmake' 'git')
- depends=('icu' 'xdg-user-dirs' 'sdl2' 'qt4' 'python')
+ depends=('icu' 'xdg-user-dirs' 'sdl2' 'qt4' 'python' 'lld')
license=('custom:UnrealEngine')
source=(
@@ -24,6 +28,7 @@ pkgver=4.19.0
'disable-pie.patch'
'only-generate-makefile.patch'
'html5-build.patch'
+ 'clang60-support.patch'
)
sha256sums=('SKIP'
@@ -31,7 +36,8 @@ sha256sums=('SKIP'
'918dff809a7e815343a8d233f704f52a910b8f01a9cb3d29de541a0334fecc7c'
'a8bb46ad630c077dd302cd8397f2c8d79d6bb13dbff1cbfbbdad447033ad3c6e'
'dba4b1910dd6424d50a8d95a461c5cf3a96f3e7df0b015624d9bf1c97dc317d3'
- '9fd6d16d56fbe0489a2580b86359df84b83a6987b5760a9e57ae0898f51943ac')
+ '9fd6d16d56fbe0489a2580b86359df84b83a6987b5760a9e57ae0898f51943ac'
+ '5583481dc7e08ebce1d0865b36bd50124b8be0d2347fec20aad3c37a346b3eb4')
# Package is 3 Gib smaller with "strip" but it's skipped because it takes a long time and generates many warnings
options=(!strip)
@@ -40,9 +46,14 @@ sha256sums=('SKIP'
prepare() {
export TERM=xterm
# shellcheck disable=SC2154
+ # remount /tmp so unreal fits fully in ram if there is enough memory
+ [[ -z "$enlargetmp" ]] || { (( $(free -g | grep Mem | awk '{print $2}') > 64 )) && sudo mount -o remount, size=72G,noatime /tmp ; }
+
ue4src="$srcdir/UnrealEngine/Engine/Source"
- patch "$ue4src/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs" ignore-return-value-error.patch
- patch "$ue4src/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs" disable-pie.patch
+ linuxToolChain="$ue4src/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs"
+ patch "$linuxToolChain" clang60-support.patch
+ patch "$linuxToolChain" ignore-return-value-error.patch
+ patch "$linuxToolChain" disable-pie.patch
patch -p0 -i only-generate-makefile.patch
# Source Code Accessors
diff --git a/clang60-support.patch b/clang60-support.patch
new file mode 100644
index 000000000000..f15bc28be33e
--- /dev/null
+++ b/clang60-support.patch
@@ -0,0 +1,15 @@
+--- LinuxToolChain.cs 2018-04-08 08:35:31.859546383 -0500
++++ LinuxToolChain_new.cs 2018-04-08 08:49:48.646351026 -0500
+@@ -95,10 +95,10 @@
+ throw new BuildException("clang 3.4.x is known to miscompile the engine - refusing to register the Linux toolchain.");
+ }
+ // prevent unknown clangs since the build is likely to fail on too old or too new compilers
+- else if ((CompilerVersionMajor * 10 + CompilerVersionMinor) > 50 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 35)
++ else if ((CompilerVersionMajor * 10 + CompilerVersionMinor) > 60 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 35)
+ {
+ throw new BuildException(
+- string.Format("This version of the Unreal Engine can only be compiled with clang 5.0, 4.0, 3.9, 3.8, 3.7, 3.6 and 3.5. clang {0} may not build it - please use a different version.",
++ string.Format("This version of the Unreal Engine can only be compiled with clang 6.0, 5.0, 4.0, 3.9, 3.8, 3.7, 3.6 and 3.5. clang {0} may not build it - please use a different version.",
+ CompilerVersionString)
+ );
+ }