summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorketsubouchi <kenta.tsubouchi@allin-one.jp>2021-02-17 01:03:48 +0900
committerGitHub <noreply@github.com>2021-02-16 17:03:48 +0100
commit04cff1136b83bd6f7382719da7eda92d665c9945 (patch)
treea61a178a6df0a3895e2b3294d85df6adcd97939d
parentcec1f9bd47d5c18d499d52c406aab4c6be924bd3 (diff)
downloadspack-04cff1136b83bd6f7382719da7eda92d665c9945.tar.gz
spack-04cff1136b83bd6f7382719da7eda92d665c9945.tar.bz2
spack-04cff1136b83bd6f7382719da7eda92d665c9945.tar.xz
spack-04cff1136b83bd6f7382719da7eda92d665c9945.zip
cqrlib: new package (#21532)
-rw-r--r--var/spack/repos/builtin/packages/cqrlib/cqr.patch20
-rw-r--r--var/spack/repos/builtin/packages/cqrlib/package.py28
2 files changed, 48 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cqrlib/cqr.patch b/var/spack/repos/builtin/packages/cqrlib/cqr.patch
new file mode 100644
index 0000000000..8473a54181
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cqrlib/cqr.patch
@@ -0,0 +1,20 @@
+--- a/cqrlib.h 2021-01-27 16:52:35.771183668 +0900
++++ b/cqrlib.h 2021-01-27 16:53:22.371528465 +0900
+@@ -573,7 +573,7 @@
+ {
+ CPPQR vquat( 0.0, v[0], v[1], v[2] );
+ const CPPQR wquat = (*this)*vquat;
+- const CPPQR qconj = *this.Conjugate( );
++ const CPPQR qconj = (*this).Conjugate();
+ vquat = wquat * qconj;
+ w[0] = vquat.x; w[1] = vquat.y; w[2] = vquat.z;
+ return;
+@@ -583,7 +583,7 @@
+ {
+ CPPQR vquat( 0.0, v[0], v[1], v[2] );
+ const CPPQR wquat = (*this)*vquat;
+- const CPPQR qconj = *this.Conjugate( );
++ const CPPQR qconj = (*this).Conjugate();
+ vquat = wquat * qconj;
+ return VectorType(vquat.x, vquat.y, vquat.z);
+ }
diff --git a/var/spack/repos/builtin/packages/cqrlib/package.py b/var/spack/repos/builtin/packages/cqrlib/package.py
new file mode 100644
index 0000000000..97d587f277
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cqrlib/package.py
@@ -0,0 +1,28 @@
+# 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 Cqrlib(MakefilePackage):
+ """CQRlib -- ANSI C API for Quaternion Rotations"""
+
+ homepage = "http://cqrlib.sourceforge.net/"
+ url = "https://downloads.sourceforge.net/project/cqrlib/cqrlib/CQRlib-1.1.2/CQRlib-1.1.2.tar.gz"
+
+ version('1.1.2', sha256='af3cf2402974579f3c6efc6a6174a5da52786db4bfee9d38d504d93bc42410fd')
+
+ depends_on('libtool', type='build')
+
+ patch('cqr.patch')
+
+ def edit(self, spec, prefix):
+ mf = FileFilter('Makefile')
+ mf.filter(r'^CC.+', "CC = {0}".format(spack_cc))
+ mf.filter(r'^CXX.+', "CXX = {0}".format(spack_cxx))
+ mf.filter(r'^INSTALLDIR .+', "INSTALLDIR = {0}".format(prefix))
+
+ def build(self, spec, prefix):
+ pass