cqrlib: new package (#21532)
This commit is contained in:
parent
cec1f9bd47
commit
04cff1136b
20
var/spack/repos/builtin/packages/cqrlib/cqr.patch
Normal file
20
var/spack/repos/builtin/packages/cqrlib/cqr.patch
Normal file
@ -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);
|
||||
}
|
28
var/spack/repos/builtin/packages/cqrlib/package.py
Normal file
28
var/spack/repos/builtin/packages/cqrlib/package.py
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user