diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/dsfmt/package.py | 31 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/dsfmt/targets.patch | 28 |
2 files changed, 59 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dsfmt/package.py b/var/spack/repos/builtin/packages/dsfmt/package.py new file mode 100644 index 0000000000..80a19bad5f --- /dev/null +++ b/var/spack/repos/builtin/packages/dsfmt/package.py @@ -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') diff --git a/var/spack/repos/builtin/packages/dsfmt/targets.patch b/var/spack/repos/builtin/packages/dsfmt/targets.patch new file mode 100644 index 0000000000..88f37c12f1 --- /dev/null +++ b/var/spack/repos/builtin/packages/dsfmt/targets.patch @@ -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 + |