Fpocket: fix installation (#40499)

* Fpocket: fix edit() positional args + add install()

* Remove comments

* Fix line too long

* Fix line too long

* Remove extension specification in version

Co-authored-by: Alec Scott <alec@bcs.sh>

* Use f-strings

Co-authored-by: Alec Scott <alec@bcs.sh>

* Fix styling

* Use the default MakefilePackage install stage

---------

Co-authored-by: Alec Scott <alec@bcs.sh>
This commit is contained in:
Gabriel Cretin 2023-10-13 20:30:20 +02:00 committed by GitHub
parent 02c680ec3a
commit edf4aa9f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,23 +3,27 @@
# #
# SPDX-License-Identifier: (Apache-2.0 OR MIT) # SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import * from spack.package import *
class Fpocket(MakefilePackage): class Fpocket(MakefilePackage):
"""fpocket is a very fast open source protein pocket detection algorithm """The fpocket suite of programs is a very fast open source
based on Voronoi tessellation.""" protein pocket detection algorithm based on Voronoi tessellation."""
homepage = "https://github.com/Discngine/fpocket" homepage = "https://github.com/Discngine/fpocket"
version("master", branch="master", git="https://github.com/Discngine/fpocket.git") url = "https://github.com/Discngine/fpocket/archive/refs/tags/4.1.tar.gz"
version("4.1", "1a2af2d3f2df42de67301996db3b93c7eaff0375f866443c0468dcf4b1750688")
depends_on("netcdf-c") depends_on("netcdf-c")
depends_on("netcdf-cxx")
def setup_build_environment(self, env): def setup_build_environment(self, env):
if self.compiler.name == "gcc": if self.compiler.name == "gcc":
env.set("CXX", "g++") env.set("CXX", "g++")
def edit(self): def edit(self, spec, prefix):
makefile = FileFilter("makefile") makefile = FileFilter("makefile")
makefile.filter("BINDIR .*", "BINDIR = %s/bin" % self.prefix) makefile.filter("BINDIR .*", f"BINDIR = {prefix}/bin")
makefile.filter("MANDIR .*", "MANDIR = %s/man/man8" % self.prefix) makefile.filter("MANDIR .*", f"MANDIR = {prefix}/man/man8")