summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pokorny <martin@truffulatree.org>2021-03-23 12:05:41 -0600
committerGitHub <noreply@github.com>2021-03-23 18:05:41 +0000
commitc4b38e51022d1ecd49ceb917c8a5e3d91d00384d (patch)
tree86d6abd94201d5bc87f01e216eca61f55c92f749
parent495b9bcb60947160b119ab921f07ee111a8053cd (diff)
downloadspack-c4b38e51022d1ecd49ceb917c8a5e3d91d00384d.tar.gz
spack-c4b38e51022d1ecd49ceb917c8a5e3d91d00384d.tar.bz2
spack-c4b38e51022d1ecd49ceb917c8a5e3d91d00384d.tar.xz
spack-c4b38e51022d1ecd49ceb917c8a5e3d91d00384d.zip
Initial version of libsakura (#22488)
-rw-r--r--var/spack/repos/builtin/packages/libsakura/cmakelists.patch38
-rw-r--r--var/spack/repos/builtin/packages/libsakura/package.py31
2 files changed, 69 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libsakura/cmakelists.patch b/var/spack/repos/builtin/packages/libsakura/cmakelists.patch
new file mode 100644
index 0000000000..458b4435da
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsakura/cmakelists.patch
@@ -0,0 +1,38 @@
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2016-09-15 02:39:32.000000000 -0600
++++ b/CMakeLists.txt 2021-03-10 10:00:28.227544744 -0700
+@@ -46,10 +46,7 @@
+
+ message(STATUS "CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}")
+
+-
+-find_path(GTEST_INCLUDE_DIRS gtest/gtest.h PATHS ${PROJECT_SOURCE_DIR}/gtest/include)
+-set(GTEST_LIBRARIES ${PROJECT_BINARY_DIR}/bingtest/libgtest.a)
+-set(GTEST_MAIN_LIBRARIES ${PROJECT_BINARY_DIR}/bingtest/libgtest_main.a)
++list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
+
+ # sakura root directory
+ set(SAKURA_ROOT_DIR ${PROJECT_SOURCE_DIR})
+@@ -57,5 +54,3 @@
+ #set(CMAKE_BUILD_TYPE Release)
+
+ add_subdirectory(src bin)
+-add_subdirectory(gtest bingtest)
+-add_subdirectory(test bintest)
+diff -ur a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt 2016-09-15 02:39:32.000000000 -0600
++++ spack-src/src/CMakeLists.txt 2021-03-10 09:56:22.399794093 -0700
+@@ -25,12 +25,10 @@
+
+ project(libsakura)
+
+-set(CMAKE_MODULE_PATH ../cmake-modules CACHE STRING "List of directories to search for CMake modules")
+-
+ find_package(Threads)
+ find_package(Eigen3 3.2.0 REQUIRED)
+ find_package(Log4Cxx)
+-find_package(FFTW3 3.3.2 REQUIRED)
++find_package(FFTW3 3.3.2 MODULE REQUIRED)
+ include(SetArchFlags)
+
+ set(CMAKE_INSTALL_PREFIX /usr/local)
diff --git a/var/spack/repos/builtin/packages/libsakura/package.py b/var/spack/repos/builtin/packages/libsakura/package.py
new file mode 100644
index 0000000000..e74b9afe84
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsakura/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 Libsakura(CMakePackage):
+ """High-performance, thread-safe library compatible with C and C++
+ that is optimized for data analysis of astronomy and astrophysics.
+ """
+
+ homepage = "https://alma-intweb.mtk.nao.ac.jp/~sakura/api/html/index.html"
+ url = "https://alma-dl.mtk.nao.ac.jp/ftp/sakura/releases/src/libsakura-4.0.2065/libsakura-4.0.2065.tar.gz"
+
+ maintainers = ['mpokorny']
+
+ version('4.0.2065', sha256='3fde3713b1ca539f0b2397ec72a0086a3138ef63f89dce4be51ee60585df995f')
+ version('3.0.2025', sha256='381a49d57cbc88dea15e08f7ed64ba57481d25bce8e5f68938dd4b6a30589c16')
+
+ depends_on('cmake@2.8:', type='build')
+
+ depends_on('eigen@3.2:')
+ depends_on('fftw@3.3.2:')
+ depends_on('log4cxx')
+
+ patch('cmakelists.patch')
+
+ def cmake_args(self):
+ args = ['-DSIMD_ARCH=native', '-DBUILD_DOC:BOOL=OFF']
+ return args