diff options
author | Christoph Weber <96774182+Christoph-TU@users.noreply.github.com> | 2023-09-26 15:15:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 08:15:12 -0500 |
commit | 0e72ff4a0d09cdeb26fefe6d302065da111beec7 (patch) | |
tree | 3fefd83a27e414852ac45ed8ae11c9f675e870c9 /var | |
parent | 90edd18d1f99bc08baff11806a33c80119780196 (diff) | |
download | spack-0e72ff4a0d09cdeb26fefe6d302065da111beec7.tar.gz spack-0e72ff4a0d09cdeb26fefe6d302065da111beec7.tar.bz2 spack-0e72ff4a0d09cdeb26fefe6d302065da111beec7.tar.xz spack-0e72ff4a0d09cdeb26fefe6d302065da111beec7.zip |
ploticus: new package (#39881)
Co-authored-by: Bernhard Kaindl <contact@bernhard.kaindl.dev>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ploticus/package.py | 41 |
1 files changed, 41 insertions, 0 deletions
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) |