summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaryl W. Grunau <DarylGrunau@gmail.com>2020-03-27 11:57:04 -0600
committerGitHub <noreply@github.com>2020-03-27 12:57:04 -0500
commitf40080934e7817e8f7ba370c0e5dce86b3651f25 (patch)
treef189f9f39bbbac50212ffbcca084c030000d6c08
parentb6d2abf8856c1c19d92ce73e81e643e720694493 (diff)
downloadspack-f40080934e7817e8f7ba370c0e5dce86b3651f25.tar.gz
spack-f40080934e7817e8f7ba370c0e5dce86b3651f25.tar.bz2
spack-f40080934e7817e8f7ba370c0e5dce86b3651f25.tar.xz
spack-f40080934e7817e8f7ba370c0e5dce86b3651f25.zip
New package lesstif (#15703)
* new package lesstif * incorporate more of the Homebrew build recipe Co-authored-by: Daryl W. Grunau <dwg@lanl.gov>
-rw-r--r--var/spack/repos/builtin/packages/lesstif/package.py51
1 files changed, 51 insertions, 0 deletions
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)