xabclib: added package at v1.03 (#16271)
This commit is contained in:
parent
35717b556b
commit
0477f829a2
60
var/spack/repos/builtin/packages/xabclib/package.py
Normal file
60
var/spack/repos/builtin/packages/xabclib/package.py
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# 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 Xabclib(MakefilePackage):
|
||||||
|
"""
|
||||||
|
Xabclib (eXtended ABCLib) is a numerical library with auto-tuning facility.
|
||||||
|
"""
|
||||||
|
|
||||||
|
homepage = "http://www.abc-lib.org/Xabclib/index.html"
|
||||||
|
url = "http://www.abc-lib.org/Xabclib/Release/Xabclib-v1.03.tar.gz"
|
||||||
|
|
||||||
|
version('1.03', sha256='9d200f40f1db87abc26cfe75a22db3a6d972988a28fc0ce8421a0c88cc574d1a')
|
||||||
|
|
||||||
|
def edit(self, spec, prefix):
|
||||||
|
cc = [spack_cc, '-O3', self.compiler.openmp_flag]
|
||||||
|
fc = [spack_fc, '-O3', self.compiler.openmp_flag]
|
||||||
|
if spec.satisfies('%gcc'):
|
||||||
|
fc.extend(['-ffixed-form', '-cpp'])
|
||||||
|
filter_file(
|
||||||
|
'^rm libOpenAT.a$',
|
||||||
|
'rm -f libOpenAT.a',
|
||||||
|
'make.all'
|
||||||
|
)
|
||||||
|
for makefile in find('.', 'makefile', recursive=True):
|
||||||
|
m = FileFilter(makefile)
|
||||||
|
m.filter(
|
||||||
|
'F90 += .*$',
|
||||||
|
'F90 = {0}'.format(' '.join(fc))
|
||||||
|
)
|
||||||
|
m.filter(
|
||||||
|
'F90O3 += .*$',
|
||||||
|
'F90O3 = {0}'.format(' '.join(fc))
|
||||||
|
)
|
||||||
|
m.filter(
|
||||||
|
'CC += .*$',
|
||||||
|
'CC = {0}'.format(' '.join(cc))
|
||||||
|
)
|
||||||
|
m.filter(
|
||||||
|
'LD += .*$',
|
||||||
|
'LD = {0}'.format(' '.join(fc))
|
||||||
|
)
|
||||||
|
|
||||||
|
def build(self, spec, prefix):
|
||||||
|
sh = which('sh')
|
||||||
|
sh('./make.all')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
mkdir(prefix.lib)
|
||||||
|
mkdir(prefix.doc)
|
||||||
|
install('libOpenAT.a', prefix.lib)
|
||||||
|
install('Readme.pdf', prefix.doc)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def libs(self):
|
||||||
|
return find_libraries('libOpenAT', self.prefix.lib, shared=False)
|
Loading…
Reference in New Issue
Block a user