From 0e72ff4a0d09cdeb26fefe6d302065da111beec7 Mon Sep 17 00:00:00 2001 From: Christoph Weber <96774182+Christoph-TU@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:15:12 +0200 Subject: ploticus: new package (#39881) Co-authored-by: Bernhard Kaindl --- .../repos/builtin/packages/ploticus/package.py | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ploticus/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/ploticus/package.py b/var/spack/repos/builtin/packages/ploticus/package.py new file mode 100644 index 0000000000..cff43fae29 --- /dev/null +++ b/var/spack/repos/builtin/packages/ploticus/package.py @@ -0,0 +1,41 @@ +# Copyright 2013-2023 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 Ploticus(MakefilePackage): + """Ploticus can produce various types of plots and graphs.""" + + homepage = "http://ploticus.sourceforge.net/doc/welcome.html" + + maintainers("Christoph-TU") + + version("2.42", sha256="3f29e4b9f405203a93efec900e5816d9e1b4381821881e241c08cab7dd66e0b0") + + depends_on("zlib-api") + depends_on("libpng") + + build_directory = "src" + + def url_for_version(self, version): + # spack's default url_for_version may replace "242_src" with 2.42_src, causing a 404. + # Returning the correct url here instead of as 'url =' fixes this issue: + return ( + "https://sourceforge.net/projects/ploticus/files/ploticus/2.42/ploticus242_src.tar.gz" + ) + + def setup_run_environment(self, env): + env.set("PLOTICUS_PREFABS", self.prefix.prefabs) + + def edit(self, spec, prefix): + makefile = FileFilter("src/Makefile") + makefile.filter("CC = .*", "CC = {0}".format(spack_cc)) + + def install(self, spec, prefix): + mkdir(prefix.bin) + mkdir(prefix.prefabs) + install("src/pl", prefix.bin) + install_tree("prefabs", prefix.prefabs) -- cgit v1.2.3-60-g2f50