summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/fpocket/package.py
blob: 3b50ee68832398b7e5b2df157c93c3dbdf258581 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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.build_systems import makefile
from spack.package import *


class Fpocket(MakefilePackage):
    """The fpocket suite of programs is a very fast open source
    protein pocket detection algorithm based on Voronoi tessellation."""

    homepage = "https://github.com/Discngine/fpocket"
    url = "https://github.com/Discngine/fpocket/archive/refs/tags/4.1.tar.gz"

    license("MIT")

    version("4.1", "1a2af2d3f2df42de67301996db3b93c7eaff0375f866443c0468dcf4b1750688")

    depends_on("netcdf-c")
    depends_on("netcdf-cxx")
    depends_on("qhull")


class MakefileBuilder(makefile.MakefileBuilder):
    def setup_build_environment(self, env):
        if self.pkg.compiler.name == "gcc":
            env.set("CXX", "g++")

    def edit(self, pkg, spec, prefix):
        mkdirp(prefix.lib)
        makefile = FileFilter("makefile")
        makefile.filter("BINDIR .*", f"BINDIR = {prefix}/bin")
        makefile.filter("MANDIR .*", f"MANDIR = {prefix}/man/man8")
        makefile.filter("LIBDIR .*", f"LIBDIR = {prefix}/lib")