From a869cfd95d130fc806e78fe17b61bfb65010d858 Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi <9337627+albestro@users.noreply.github.com> Date: Wed, 4 Jan 2023 10:27:21 +0100 Subject: [PATCH] Fix libvterm and libtermkey packages (#34776) * fix PREFIX for both libvterm and libtermkey * minor: use libtool from dependency * switch to command-line prefix instead of replacing it in Makefile --- var/spack/repos/builtin/packages/libtermkey/package.py | 10 ++++++++-- var/spack/repos/builtin/packages/libvterm/package.py | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/libtermkey/package.py b/var/spack/repos/builtin/packages/libtermkey/package.py index 1b33472cc7..a456d8d317 100644 --- a/var/spack/repos/builtin/packages/libtermkey/package.py +++ b/var/spack/repos/builtin/packages/libtermkey/package.py @@ -6,7 +6,7 @@ from spack.package import * -class Libtermkey(Package): +class Libtermkey(MakefilePackage): """Easy keyboard entry processing for terminal programs""" homepage = "http://www.leonerd.org.uk/code/libtermkey/" @@ -20,9 +20,15 @@ class Libtermkey(Package): version("0.14", sha256="3d114d4509499b80a583ea39cd35f18268aacf4a7bbf56c142cd032632005c79") depends_on("libtool", type="build") + depends_on("unibilium") depends_on("pkgconfig") + def setup_build_environment(self, env): + env.set("LIBTOOL", self.spec["libtool"].prefix.bin.join("libtool")) + + def build(self, spec, prefix): + make("PREFIX=" + prefix) + def install(self, spec, prefix): - make() make("install", "PREFIX=" + prefix) diff --git a/var/spack/repos/builtin/packages/libvterm/package.py b/var/spack/repos/builtin/packages/libvterm/package.py index 1d6b37decb..c3a6e63109 100644 --- a/var/spack/repos/builtin/packages/libvterm/package.py +++ b/var/spack/repos/builtin/packages/libvterm/package.py @@ -7,7 +7,7 @@ from spack.package import * -class Libvterm(Package): +class Libvterm(MakefilePackage): """An abstract library implementation of a terminal emulator""" homepage = "http://www.leonerd.org.uk/code/libvterm/" @@ -25,6 +25,11 @@ class Libvterm(Package): depends_on("libtool", type="build") + def setup_build_environment(self, env): + env.set("LIBTOOL", self.spec["libtool"].prefix.bin.join("libtool")) + + def build(self, spec, prefix): + make("PREFIX=" + prefix) + def install(self, spec, prefix): - make() make("install", "PREFIX=" + prefix)