From f40080934e7817e8f7ba370c0e5dce86b3651f25 Mon Sep 17 00:00:00 2001 From: "Daryl W. Grunau" Date: Fri, 27 Mar 2020 11:57:04 -0600 Subject: New package lesstif (#15703) * new package lesstif * incorporate more of the Homebrew build recipe Co-authored-by: Daryl W. Grunau --- .../repos/builtin/packages/lesstif/package.py | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 var/spack/repos/builtin/packages/lesstif/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/lesstif/package.py b/var/spack/repos/builtin/packages/lesstif/package.py new file mode 100644 index 0000000000..c36b90e9b7 --- /dev/null +++ b/var/spack/repos/builtin/packages/lesstif/package.py @@ -0,0 +1,51 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Lesstif(AutotoolsPackage): + """LessTif is the Hungry Programmers' version of OSF/Motif.""" + + homepage = "https://sourceforge.net/projects/lesstif" + url = "https://sourceforge.net/projects/lesstif/files/lesstif/0.95.2/lesstif-0.95.2.tar.bz2/download" + + version('0.95.2', sha256='eb4aa38858c29a4a3bcf605cfe7d91ca41f4522d78d770f69721e6e3a4ecf7e3') + + variant('shared', default=True, description='Build shared libraries') + variant('static', default=False, description='Build static libraries') + + depends_on('libice') + depends_on('libsm') + depends_on('libxt') + + def patch(self): + filter_file("ACLOCALDIR=.*", + "ACLOCALDIR='${datarootdir}/aclocal'", + "configure") + + def setup_build_environment(self, env): + # 'sed' fails if LANG=en_US.UTF-8 as is often the case on Macs. + # The configure script finds our superenv sed wrapper, sets + # SED, but then doesn't use that variable. + env.set('LANG', 'C') + + def configure_args(self): + spec = self.spec + + args = [ + '--disable-debug', + '--enable-production', + '--disable-dependency-tracking', + '--enable-shared' if '+shared' in spec else '--disable-shared', + '--enable-static' if '+static' in spec else '--disable-static', + ] + + return args + + # LessTif won't install in parallel 'cause several parts of the + # Makefile will try to make the same directory and `mkdir` will fail. + def install(self, spec, prefix): + make('install', parallel=False) -- cgit v1.2.3-70-g09d2