From c8c795e7dbde22dc47c9ae285a4dd59004b115b1 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 7 Oct 2019 04:11:17 -0500 Subject: watch: added new package (#13044) --- var/spack/repos/builtin/packages/watch/package.py | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 var/spack/repos/builtin/packages/watch/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/watch/package.py b/var/spack/repos/builtin/packages/watch/package.py new file mode 100644 index 0000000000..760bd8b187 --- /dev/null +++ b/var/spack/repos/builtin/packages/watch/package.py @@ -0,0 +1,49 @@ +# Copyright 2013-2019 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 Watch(AutotoolsPackage): + """Executes a program periodically, showing output fullscreen.""" + + # Note: there is a separate procps package, but it doesn't build on macOS. + # This package only contains the `watch` program, a subset of procps which + # does build on macOS. + # https://github.com/NixOS/nixpkgs/issues/18929#issuecomment-249388571 + homepage = "https://gitlab.com/procps-ng/procps" + git = "https://gitlab.com/procps-ng/procps.git" + + version('master', branch='master') + version('3.3.15', tag='v3.3.15') + + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') + depends_on('pkgconfig@0.9.0:', type='build') + depends_on('ncurses') + + # https://github.com/Homebrew/homebrew-core/blob/master/Formula/watch.rb + def autoreconf(self, spec, prefix): + sh = which('sh') + sh('autogen.sh') + + def configure_args(self): + return [ + '--with-ncurses', + # Required to avoid libintl linking errors + '--disable-nls', + ] + + def build(self, spec, prefix): + make('watch') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + mkdirp(prefix.man.man1) + + install('watch', prefix.bin) + install('watch.1', prefix.man.man1) -- cgit v1.2.3-70-g09d2