libcerf: Add new versions (#50089)
* update libcerf to use new URL and CMake for new versions but keep old URL and autoconf for 1.3 * add maintainer * fix comment --------- Co-authored-by: white238 <white238@users.noreply.github.com>
This commit is contained in:
parent
7cab3e2383
commit
2d212561fb
@ -3,24 +3,52 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
|
||||||
|
from spack.build_systems.autotools import AutotoolsBuilder
|
||||||
|
from spack.build_systems.cmake import CMakeBuilder
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
class Libcerf(AutotoolsPackage, SourceforgePackage):
|
class Libcerf(AutotoolsPackage, CMakePackage):
|
||||||
"""A self-contained C library providing complex error functions, based
|
"""A self-contained C library providing complex error functions, based
|
||||||
on Faddeeva's plasma dispersion function w(z). Also provides Dawson's
|
on Faddeeva's plasma dispersion function w(z). Also provides Dawson's
|
||||||
integral and Voigt's convolution of a Gaussian and a Lorentzian
|
integral and Voigt's convolution of a Gaussian and a Lorentzian"""
|
||||||
|
|
||||||
"""
|
homepage = "https://jugit.fz-juelich.de/mlz/libcerf/"
|
||||||
|
url = "https://jugit.fz-juelich.de/mlz/libcerf/-/archive/v2.4/libcerf-v2.4.tar.gz"
|
||||||
|
|
||||||
homepage = "https://sourceforge.net/projects/libcerf/"
|
license("MIT")
|
||||||
sourceforge_mirror_path = "libcerf/libcerf-1.3.tgz"
|
|
||||||
|
|
||||||
version("1.3", sha256="d7059e923d3f370c89fb4d19ed4f827d381bc3f0e36da5595a04aeaaf3e6a859")
|
maintainers("white238")
|
||||||
|
|
||||||
depends_on("c", type="build") # generated
|
version("2.4", sha256="080b30ae564c3dabe3b89264522adaf5647ec754021572bee54929697b276cdc")
|
||||||
depends_on("fortran", type="build") # generated
|
version("2.3", sha256="cceefee46e84ce88d075103390b4f9d04c34e4bc3b96d733292c36836d4f7065")
|
||||||
|
version(
|
||||||
|
"1.3",
|
||||||
|
sha256="d7059e923d3f370c89fb4d19ed4f827d381bc3f0e36da5595a04aeaaf3e6a859",
|
||||||
|
url="https://sourceforge.net/projects/libcerf/files/libcerf-1.3.tgz",
|
||||||
|
)
|
||||||
|
|
||||||
|
variant("cpp", default=False, when="@2:", description="Compile source as C++")
|
||||||
|
|
||||||
|
# Build system
|
||||||
|
build_system(
|
||||||
|
conditional("cmake", when="@2:"), conditional("autotools", when="@=1.3"), default="cmake"
|
||||||
|
)
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
depends_on("fortran", type="build")
|
||||||
|
|
||||||
|
|
||||||
|
class CMakeBuilder(CMakeBuilder):
|
||||||
|
def cmake_args(self):
|
||||||
|
args = []
|
||||||
|
|
||||||
|
args.append(self.define_from_variant("CERF_CPP", "cpp"))
|
||||||
|
|
||||||
|
return args
|
||||||
|
|
||||||
|
|
||||||
|
class AutotoolsBuilder(AutotoolsBuilder):
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
options = []
|
options = []
|
||||||
|
Loading…
Reference in New Issue
Block a user