diff --git a/srcpkgs/Uranium/patches/0002-Fix-install-prefix-symlink.patch b/srcpkgs/Uranium/patches/0002-Fix-install-prefix-symlink.patch new file mode 100644 index 00000000000..101d8ef90be --- /dev/null +++ b/srcpkgs/Uranium/patches/0002-Fix-install-prefix-symlink.patch @@ -0,0 +1,30 @@ +From 237dc959ca536ae4a45d1ba59d4ad6cf86a36946 Mon Sep 17 00:00:00 2001 +From: Ghostkeeper +Date: Mon, 25 Feb 2019 11:58:02 +0100 +Subject: [PATCH] Fix install prefix when installing in symlinked directory + +If /bin is a symlink to /usr/bin and /bin appears before /usr/bin on the user's PATH, it would get sys.argv[0]='/bin/python3'. This then messes up the install location ('/') which consequently messes up the data and config storage directories. +This solution is provided by CapnKernel and should resolve the symlink so that sys.argv[0]='/usr/bin/python3' again and the storage data and config storage directories become something like /usr/share/... again. +--- + UM/Application.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git UM/Application.py UM/Application.py +index 05adb8f3..f709438a 100644 +--- UM/Application.py ++++ UM/Application.py +@@ -398,9 +398,10 @@ class Application: + @staticmethod + def getInstallPrefix() -> str: + if "python" in os.path.basename(sys.executable): +- return os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")) ++ executable = sys.argv[0] + else: +- return os.path.abspath(os.path.join(os.path.dirname(sys.executable), "..")) ++ executable = sys.executable ++ return os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(executable)), "..")) + + __instance = None # type: Application + +-- +2.21.0 diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template index 1d237f5dc51..6f31c47ce79 100644 --- a/srcpkgs/Uranium/template +++ b/srcpkgs/Uranium/template @@ -1,7 +1,7 @@ # Template file for 'Uranium' pkgname=Uranium -version=3.6.0 -revision=2 +version=4.0.0 +revision=1 archs=noarch build_style=cmake pycompile_module="UM" @@ -15,4 +15,4 @@ maintainer="Karl Nilsson " license="LGPL-3.0-or-later" homepage="https://github.com/Ultimaker/Uranium" distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz" -checksum=9a63e7d02c57a818815f61ada53b41d6c04683f874db80baa32f68d34b51a245 +checksum=d405183b98b2e8db8c8c11ebe6f8838865cb4ac7f6a55ab0ac654b060edf9dd8