I don't understand what's up with the PKGBUILD, but it has several issues:
- the build step is wrapped in a
while
loop, meaning that you can't stop it with ctrl+C - since
package()
does amv
ofLocalBuilds/Engine/Linux
to thepkg
directory, runningmakepkg -R
wipes half of the compilation output (that made things fun to debug) - the script is missing a
mkdir -p "${pkgdir}/usr/bin"
before copying theunreal-engine-4.sh
file - the
sed
s at the end ofpackage()
are broken, they don't target the correct file - in the
.sh
file, the correct condition should be[ ! -L ~/.steampath ]
, otherwise it attempts to create the steampath file even though it shouldn't - in the
.sh
file, a~/.cnfig
folder is created for no reason - the
.desktop
file generated is broken, as it calls the.sh
file, which itself calls the.desktop
file, creating an infinite recursion that cannot be stopped with ctrl+C, ctrl+Z, or killing the parent shell.
The last point is the one I'm most confused with. The .sh
file already calls the .desktop
file, so why change the .desktop
file?
Pinned Comments
Neko-san commented on 2023-07-13 04:15 (UTC)
The issue with me including the
Commit.gitdeps.xml
alsongside the PKGBUILD manually is that it might be subject to a legal grey area since the UE repo is private and is technically a part of the source;because the repo is private, having the PKGBUILD access it directly isn't a simple task because Github requires the URL request to have a generated timed authentication token that expires.
Meaning that I can't simply grab the URL and paste it into the PKBUILD willy-nilly because it is both not tied to your account and because the links have an expiration attached. I get why Epic chose this approach but their flawed "open-source" methodology is what makes this difficult.
Neko-san commented on 2022-10-15 20:50 (UTC) (edited on 2022-10-15 20:54 (UTC) by Neko-san)
I updated it to not use the Arch Clang compiler by default; I thought I had this opt-out but I didn't - the reason being that for UE4, there's actually a hard-coded reference to look for a Windows compiler (thanks Epic...) and using the Arch compiler has been the solution on the AUR for UE4 for a long time
That said, if it fails to compile by default now (at least if strictly using
makepkg
), the fault is entirely on Epic for not properly having the Unreal Build Tool (UBT) not handle the Linux build properly - proper support for this was implemented in UE5, so they should honestly backport that to UE4's codebaseI left a user toggle-able switch in the PKGBUILD if anyone wants to try the Arch Clang compiler patch again, for whatever reason
If anyone manages to figure out how to this otherwise, let me know and I'll add the fix