From 2f4266161c112dc63ae649afaa87a1908241bc97 Mon Sep 17 00:00:00 2001 From: Arne Becker <101113822+EbiArnie@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:03:00 +0000 Subject: [PATCH] perl-chart-gnuplot: new package (#42983) Adds Chart::Gnuplot --- .../packages/perl-chart-gnuplot/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/perl-chart-gnuplot/package.py diff --git a/var/spack/repos/builtin/packages/perl-chart-gnuplot/package.py b/var/spack/repos/builtin/packages/perl-chart-gnuplot/package.py new file mode 100644 index 0000000000..5ca4bd1e4d --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-chart-gnuplot/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2024 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.package import * + + +class PerlChartGnuplot(PerlPackage): + """Plot graph using Gnuplot in Perl on the fly""" + + homepage = "https://metacpan.org/pod/Chart::Gnuplot" + url = "https://cpan.metacpan.org/authors/id/K/KW/KWMAK/Chart/Gnuplot/Chart-Gnuplot-0.23.tar.gz" + + maintainers("EbiArnie") + + license("Artistic-1.0-Perl OR GPL-1.0-or-later") + + version("0.23", sha256="dcb46c0f93436464bdc3403469c828c6c33e954123a2adf4092fbb30bb244b6c") + + def test_use(self): + """Test 'use module'""" + options = ["-we", 'use strict; use Chart::Gnuplot; print("OK\n")'] + + perl = self.spec["perl"].command + out = perl(*options, output=str.split, error=str.split) + assert "OK" in out