[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/45: gnu: Add aoflagger.
From: |
guix-commits |
Subject: |
06/45: gnu: Add aoflagger. |
Date: |
Thu, 4 Aug 2022 06:07:07 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit cdff1423c0d03e7d3e8445cf14f1123f694468c8
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Sun Jun 26 18:34:58 2022 +0100
gnu: Add aoflagger.
* gnu/packages/astronomy.scm (aoflagger): New variable.
* gnu/packages/patches/aoflagger-use-system-provided-pybind11.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/local.mk | 1 +
gnu/packages/astronomy.scm | 63 ++++++++++++++++++++++
.../aoflagger-use-system-provided-pybind11.patch | 38 +++++++++++++
3 files changed, 102 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 2484320038..cbfe880d6e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -858,6 +858,7 @@ dist_patch_DATA =
\
%D%/packages/patches/antiword-CVE-2014-8123.patch \
%D%/packages/patches/antlr3-3_1-fix-java8-compilation.patch \
%D%/packages/patches/antlr3-3_3-fix-java8-compilation.patch \
+ %D%/packages/patches/aoflagger-use-system-provided-pybind11.patch \
%D%/packages/patches/apr-skip-getservbyname-test.patch \
%D%/packages/patches/ark-skip-xar-test.patch \
%D%/packages/patches/aspell-default-dict-dir.patch \
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 336ef02d66..3c4c92619e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -142,6 +142,69 @@ moment, supported SPICE files are:
@end itemize\n")
(license license:cecill)))
+(define-public aoflagger
+ (package
+ (name "aoflagger")
+ (version "3.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/aroffringa/aoflagger")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1dcbfrbiybhpbypna2xhddx1wk7yifh38ha2r6p5rzsikzwlsin1"))
+ (patches
+ (search-patches "aoflagger-use-system-provided-pybind11.patch"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ ;; XXX: Tests require external files download from
+ ;; https://www.astron.nl/citt/ci_data/aoflagger/
+ ;; FIXME: runtest is not found
+ #:tests? #f
+ #:configure-flags
+ #~(list (string-append "-DCASACORE_ROOT_DIR="
+ #$(this-package-input "casacore")))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; aocommon and pybind11 are expected to be found as git submodules,
+ ;; link them before build.
+ (add-after 'unpack 'link-submodule-package
+ (lambda _
+ (rmdir "external/aocommon")
+ (symlink #$(this-package-native-input "aocommon")
+ (string-append (getcwd) "/external/aocommon")))))))
+ (native-inputs
+ (list aocommon
+ boost
+ pkg-config
+ python
+ pybind11))
+ (inputs
+ (list casacore
+ cfitsio
+ fftw
+ gsl
+ gtkmm-3
+ hdf5
+ lapack
+ libpng
+ libsigc++
+ libxml2
+ lua
+ openblas
+ zlib))
+ (home-page "https://gitlab.com/aroffringa/aoflagger")
+ (synopsis "Astronomical tool that can find and remove radio-frequency
interference")
+ (description
+ "AOFlagger is a tool that can find and remove radio-frequency
+interference (RFI) in radio astronomical observations. It can make use of Lua
+scripts to make flagging strategies flexible, and the tools are applicable to a
+wide set of telescopes.")
+ (license license:gpl3+)))
+
(define-public casacore
(package
(name "casacore")
diff --git a/gnu/packages/patches/aoflagger-use-system-provided-pybind11.patch
b/gnu/packages/patches/aoflagger-use-system-provided-pybind11.patch
new file mode 100644
index 0000000000..76bc52a4ba
--- /dev/null
+++ b/gnu/packages/patches/aoflagger-use-system-provided-pybind11.patch
@@ -0,0 +1,38 @@
+This patch was borrowed from Debian's package:
+https://salsa.debian.org/debian-astro-team/aoflagger/-/blob/0484ef75a663e3e07738550cdade46f433a53dac/debian/patches/Use-system-provided-pybind11.patch
+Description: Use system provided pybind11
+Author: Ole Streicher <olebole@debian.org>
+Origin: Debian
+Last-Update: Mon, 30 Aug 2021 11:05:37 +0200
+---
+ CMakeLists.txt | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 655ea5e..824ee2a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -62,11 +62,6 @@ foreach(ExternalSubmodule IN LISTS
ExternalSubmoduleDirectories)
+ endif()
+ endforeach()
+
+-# Include aocommon/pybind11 headers
+-include_directories("${CMAKE_SOURCE_DIR}/external/aocommon/include")
+-add_subdirectory("${CMAKE_SOURCE_DIR}/external/pybind11")
+-include_directories(SYSTEM ${pybind11_INCLUDE_DIR})
+-
+ find_package(
+ HDF5
+ COMPONENTS C CXX
+@@ -101,6 +96,11 @@ find_package(PythonInterp REQUIRED)
+ message(STATUS "Using python version ${PYTHON_VERSION_STRING}")
+ include_directories(SYSTEM ${PYTHON_INCLUDE_DIRS})
+
++# Include pybind11 headers
++find_package(pybind11 REQUIRED)
++include_directories("${CMAKE_SOURCE_DIR}/external/aocommon/include")
++include_directories(${pybind11_INCLUDE_DIR})
++
+ # boost::alignment requires Boost 1.56
+ find_package(Boost 1.56.0 REQUIRED COMPONENTS date_time filesystem system
+ unit_test_framework)
- 19/45: gnu: Add libomp-7., (continued)
- 19/45: gnu: Add libomp-7., guix-commits, 2022/08/04
- 05/45: gnu: Add aocommon., guix-commits, 2022/08/04
- 24/45: gnu: Add ruby-wapiti., guix-commits, 2022/08/04
- 16/45: gnu: clang-toolchain-9: Use libomp-9., guix-commits, 2022/08/04
- 41/45: gnu: ruby-anystyle: Initialize dictionary files., guix-commits, 2022/08/04
- 34/45: gnu: Add ruby-citeproc., guix-commits, 2022/08/04
- 07/45: gnu: libomp-14: Reference llvm-14 version string., guix-commits, 2022/08/04
- 12/45: gnu: clang-toolchain-11: Use libomp-11., guix-commits, 2022/08/04
- 26/45: gnu: Add itex2mml., guix-commits, 2022/08/04
- 43/45: gnu: anystyle: Use GDBM by default., guix-commits, 2022/08/04
- 06/45: gnu: Add aoflagger.,
guix-commits <=
- 25/45: gnu: Add ruby-namae., guix-commits, 2022/08/04
- 13/45: gnu: Add libomp-10., guix-commits, 2022/08/04
- 37/45: gnu: Add ruby-anystyle-data., guix-commits, 2022/08/04
- 15/45: gnu: Add libomp-9., guix-commits, 2022/08/04
- 02/45: gnu: python-args: Patch reference to basestring., guix-commits, 2022/08/04
- 35/45: gnu: Add ruby-edtf., guix-commits, 2022/08/04
- 09/45: gnu: Add libomp-12., guix-commits, 2022/08/04
- 23/45: gnu: make-clang-toolchain: Require explicit libomp., guix-commits, 2022/08/04
- 10/45: gnu: clang-toolchain-12: Use libomp-12., guix-commits, 2022/08/04
- 36/45: gnu: Add ruby-gli., guix-commits, 2022/08/04