diff --git a/blueprints/dev-utils/_windows/git/git.py b/blueprints/dev-utils/_windows/git/git.py index e818e55bf..dc61086f2 100644 --- a/blueprints/dev-utils/_windows/git/git.py +++ b/blueprints/dev-utils/_windows/git/git.py @@ -1,64 +1,66 @@ # -*- coding: utf-8 -*- # Copyright Hannah von Reth # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. import info from Package.MaybeVirtualPackageBase import * class subinfo(info.infoclass): def setTargets(self): ver = "2.20.0" build = "1" self.targets[ver] = f"https://github.com/git-for-windows/git/releases/download/v{ver}.windows.{build}/PortableGit-{ver}-64-bit.7z.exe" self.archiveNames[ver] = f"PortableGit-{ver}-64-bit.7z" self.targetInstallPath[ver] = os.path.join("dev-utils", "git") self.targetDigests[ver] = (["4f0c60a1d0ac23637d600531da34b48700fcaee7ecd79d36e2f5369dc8fcaef6"], CraftHash.HashAlgorithm.SHA256) + + self.patchLevel["2.20.0"] = 1 self.defaultTarget = ver def setDependencies(self): self.buildDependencies["dev-utils/7zip"] = None self.buildDependencies["dev-utils/wget"] = None self.buildDependencies["dev-utils/kshim"] = None from Package.BinaryPackageBase import * class GitPackage(BinaryPackageBase): def __init__(self): BinaryPackageBase.__init__(self) def postInstall(self): return utils.createShim(os.path.join(self.imageDir(), "dev-utils", "bin", "git.exe"), os.path.join(self.imageDir(), "dev-utils", "git", "bin", "git.exe")) def postQmerge(self): gitDir = os.path.join(CraftStandardDirs.craftRoot(), self.subinfo.targetInstallPath[self.buildTarget]) utils.system([os.path.join(gitDir, "git-cmd.exe"), "--no-cd", "--command=post-install.bat"], cwd=gitDir) return True class Package(VirtualIfSufficientVersion): def __init__(self): VirtualIfSufficientVersion.__init__(self, app="git", version="2.20.0", classA=GitPackage) diff --git a/blueprints/dev-utils/cmake/cmake.py b/blueprints/dev-utils/cmake/cmake.py index 11e03444e..8d3293e6f 100644 --- a/blueprints/dev-utils/cmake/cmake.py +++ b/blueprints/dev-utils/cmake/cmake.py @@ -1,66 +1,68 @@ import info class subinfo(info.infoclass): def setTargets(self): for ver in ["3.8.0", "3.8.1", "3.9.1", "3.10.2", "3.10.3", "3.11.0", "3.11.1", "3.11.3", "3.12.0", "3.12.2", "3.13.0", "3.13.2"]: majorMinorStr = '.'.join(ver.split('.')[0:2]) if CraftCore.compiler.isWindows: self.targets[ver] = f"https://www.cmake.org/files/v{majorMinorStr}/cmake-{ver}-win{CraftCore.compiler.bits}-{CraftCore.compiler.architecture}.zip" self.targetInstSrc[ver] = f"cmake-{ver}-win{CraftCore.compiler.bits}-{CraftCore.compiler.architecture}" elif CraftCore.compiler.isMacOS: self.targets[ver] = f"https://www.cmake.org/files/v{majorMinorStr}/cmake-{ver}-Darwin-{CraftCore.compiler.gnuArchitecture}.tar.gz" self.targetInstSrc[ver] = f"cmake-{ver}-Darwin-{CraftCore.compiler.gnuArchitecture}" elif CraftCore.compiler.isLinux: self.targets[ver] = f"https://cmake.org/files/v{majorMinorStr}/cmake-{ver}-Linux-x86_64.tar.gz" self.targetInstSrc[ver] = f"cmake-{ver}-Linux-x86_64" self.targetInstallPath[ver] = os.path.join("dev-utils", "cmake") self.targetDigestUrls[ver] = (f"https://cmake.org/files/v{majorMinorStr}/cmake-{ver}-SHA-256.txt", CraftHash.HashAlgorithm.SHA256) if CraftCore.compiler.isLinux and self.options.dynamic.checkForNightlies: suffix = 'zip' if CraftCore.compiler.isWindows else 'tar.gz' for ver in CraftCore.cache.getNightlyVersionsFromUrl("https://cmake.org/files/dev/?C=M;O=D;F=0", f"\d.\d.\d\d\d\d\d\d\d\d-[0-9A-Za-z]{5,8}{re.escape('-win32-x86' if OsUtils.isWin() else '-Darwin-x86_64')}"): self.targets[ver] = f"{nightlyUrl}/cmake-{ver}.{suffix}" self.targetInstSrc[ver] = f"cmake-{ver}" self.targetInstallPath[ver] = os.path.join("dev-utils", "cmake") self.description = "CMake, the cross-platform, open-source build system." self.webpage = "http://www.cmake.org/" + self.patchLevel["3.13.2"] = 1 + self.defaultTarget = "3.13.2" def setDependencies(self): self.buildDependencies["dev-utils/ninja"] = None self.buildDependencies["dev-utils/kshim"] = None def registerOptions(self): self.options.dynamic.registerOption("checkForNightlies", False) from Package.BinaryPackageBase import * from Package.MaybeVirtualPackageBase import * class Package(BinaryPackageBase): def __init__(self): BinaryPackageBase.__init__(self) def postInstall(self): binaryPath = os.path.join(self.imageDir(), "dev-utils", "cmake", "bin") if OsUtils.isMac(): binaryPath = os.path.join(self.imageDir(), "dev-utils", "cmake", "CMake.app", "Contents", "bin") for name in ["cmake", "cmake-gui", "cmcldeps", "cpack", "ctest"]: sourceBinary = os.path.join(binaryPath, f"{name}{CraftCore.compiler.executableSuffix}") targetBinary = os.path.join(self.imageDir(), "dev-utils", "bin", f"{name}{CraftCore.compiler.executableSuffix}") if os.path.exists(sourceBinary): if not utils.createShim(targetBinary, sourceBinary): return False return True def postQmerge(self): CraftCore.cache.clear() return True diff --git a/blueprints/dev-utils/python2/python2.py b/blueprints/dev-utils/python2/python2.py index 893ba3a13..747dc2ffc 100644 --- a/blueprints/dev-utils/python2/python2.py +++ b/blueprints/dev-utils/python2/python2.py @@ -1,34 +1,34 @@ import info from Package.BinaryPackageBase import * class subinfo(info.infoclass): def setTargets(self): self.targets["2"] = "" self.defaultTarget = "2" self.targetInstallPath["2"] = "dev-utils" - self.patchLevel["2"] = 1 + self.patchLevel["2"] = 2 class Package(BinaryPackageBase): def __init__(self): BinaryPackageBase.__init__(self) self.subinfo.options.package.disableBinaryCache = True def install(self): if not BinaryPackageBase.install(self): return False python2 = CraftCore.cache.findApplication("python2.7") if CraftCore.compiler.isWindows: if not python2 and ("Paths", "PYTHON27") in CraftCore.settings: python2 = CraftCore.cache.findApplication("python", CraftCore.settings.get("Paths", "PYTHON27")) if not python2: CraftCore.log.critical(f"Please have a look on {CraftCore.settings.iniPath} and make sure that\n" "\t[Paths]\n" "\tPYTHON27\n" "Points to a valid Python installation.") return False return (utils.createShim(os.path.join(self.installDir(), "bin", f"python{CraftCore.compiler.executableSuffix}"), python2, useAbsolutePath=True) and utils.createShim(os.path.join(self.installDir(), "bin", f"python2{CraftCore.compiler.executableSuffix}"), python2, useAbsolutePath=True)) diff --git a/blueprints/dev-utils/python3/python3.py b/blueprints/dev-utils/python3/python3.py index ec0ed9d27..fe6fef866 100644 --- a/blueprints/dev-utils/python3/python3.py +++ b/blueprints/dev-utils/python3/python3.py @@ -1,21 +1,21 @@ import info from Package.BinaryPackageBase import * class subinfo(info.infoclass): def setTargets(self): self.targets["3"] = "" - self.patchLevel["3"] = 2 + self.patchLevel["3"] = 3 self.targetInstallPath["3"] = "dev-utils" self.defaultTarget = "3" class Package(BinaryPackageBase): def __init__(self): BinaryPackageBase.__init__(self) self.subinfo.options.package.disableBinaryCache = True def install(self): if not BinaryPackageBase.install(self): return False return utils.createShim(os.path.join(self.installDir(), "bin", f"python3{CraftCore.compiler.executableSuffix}"), sys.executable, useAbsolutePath=True)