spack/var/spack/repos/builtin/packages/ape/package.py
Massimiliano Culpo 14599f09be
Separate Apple Clang from LLVM Clang (#17110)
* Separate Apple Clang from LLVM Clang

Apple Clang is a compiler of its own. All places
referring to "-apple" suffix have been updated.

* Hack to use a dash in 'apple-clang'

To be able to use autodoc from Sphinx we need
a valid Python name for the module that contains
Apple's Clang code.

* Updated packages to account for the existence of apple-clang

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Added unit test for XCode related functions

Co-authored-by: Gregory Becker <becker33@llnl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-06-25 11:18:48 -05:00

46 lines
1.6 KiB
Python

# Copyright 2013-2020 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 import *
class Ape(Package):
"""A tool for generating atomic pseudopotentials within a Density-Functional
Theory framework"""
homepage = "http://www.tddft.org/programs/APE/"
url = "http://www.tddft.org/programs/APE/sites/default/files/ape-2.2.1.tar.gz"
version('2.2.1', sha256='1bdb7f987fde81f8a5f335da6b59fa884e6d185d4a0995c90fde7c04376ce9e3')
depends_on('gsl')
depends_on('libxc@:2.2.2')
def install(self, spec, prefix):
args = []
args.extend([
'--prefix=%s' % prefix,
'--with-gsl-prefix=%s' % spec['gsl'].prefix,
'--with-libxc-prefix=%s' % spec['libxc'].prefix
])
# When preprocessor expands macros (i.e. CFLAGS) defined as quoted
# strings the result may be > 132 chars and is terminated.
# This will look to a compiler as an Unterminated character constant
# and produce Line truncated errors. To overcome this, add flags to
# let compiler know that the entire line is meaningful.
# TODO: For the lack of better approach, assume that clang is mixed
# TODO: with GNU fortran.
if (spec.satisfies('%apple-clang') or
spec.satisfies('%clang') or
spec.satisfies('%gcc')):
args.extend([
'FCFLAGS=-O2 -ffree-line-length-none'
])
configure(*args)
make()
make('install')