dsfmt: new package (#27415)
This commit is contained in:
parent
d1df044b42
commit
9573eb5315
31
var/spack/repos/builtin/packages/dsfmt/package.py
Normal file
31
var/spack/repos/builtin/packages/dsfmt/package.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Copyright 2013-2021 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 Dsfmt(MakefilePackage):
|
||||||
|
"""Double precision SIMD-oriented Fast Mersenne Twister"""
|
||||||
|
|
||||||
|
homepage = "http://www.math.sci.hiroshima-u.ac.jp/m-mat/MT/SFMT/"
|
||||||
|
url = "http://www.math.sci.hiroshima-u.ac.jp/m-mat/MT/SFMT/dSFMT-src-2.2.3.tar.gz"
|
||||||
|
|
||||||
|
maintainers = ['haampie']
|
||||||
|
|
||||||
|
# This package does not have a target to build a library nor a make install target,
|
||||||
|
# so we add it for them.
|
||||||
|
patch('targets.patch')
|
||||||
|
|
||||||
|
version('2.2.3', sha256='82344874522f363bf93c960044b0a6b87b651c9565b6312cf8719bb8e4c26a0e')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def libs(self):
|
||||||
|
return find_libraries('libdSFMT', root=self.prefix, recursive=True)
|
||||||
|
|
||||||
|
def make(self, spec, prefix):
|
||||||
|
make('library')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
make('PREFIX={0}'.format(prefix), 'install')
|
28
var/spack/repos/builtin/packages/dsfmt/targets.patch
Normal file
28
var/spack/repos/builtin/packages/dsfmt/targets.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From a78e6df557b1dfaead886fdac9fda0a3a9086493 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harmen Stoppels <harmenstoppels@gmail.com>
|
||||||
|
Date: Mon, 8 Nov 2021 10:18:54 +0100
|
||||||
|
Subject: [PATCH] Add a library/install target
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 5cc4ed6..a9dcd99 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -196,3 +196,10 @@ test-sse2-M216091: test.c dSFMT.c dSFMT.h
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *~ test-*-M*
|
||||||
|
+
|
||||||
|
+library: dSFMT.c
|
||||||
|
+ $(CC) $(CCFLAGS) -shared -fPIC dSFMT.c -o libdSFMT.so
|
||||||
|
+
|
||||||
|
+install: library
|
||||||
|
+ install -d $(PREFIX)/lib/
|
||||||
|
+ install -m 644 libdSFMT.so $(PREFIX)/lib/
|
||||||
|
\ No newline at end of file
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user