From patchwork Sun Jun 26 17:46:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 40336 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1B79C27BBEA; Sun, 26 Jun 2022 19:09:45 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4B99B27BBE9 for ; Sun, 26 Jun 2022 19:09:44 +0100 (BST) Received: from localhost ([::1]:43302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5Whb-0001BA-Dl for patchwork@mira.cbaines.net; Sun, 26 Jun 2022 14:09:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5WLp-0003Lw-Cd for guix-patches@gnu.org; Sun, 26 Jun 2022 13:47:16 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5WLe-0008Uo-99 for guix-patches@gnu.org; Sun, 26 Jun 2022 13:47:12 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5WLe-0000eo-7U for guix-patches@gnu.org; Sun, 26 Jun 2022 13:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56238] [PATCH 2/2]: gnu: Add aoflagger References: In-Reply-To: Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Jun 2022 17:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56238 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56238@debbugs.gnu.org Received: via spool by 56238-submit@debbugs.gnu.org id=B56238.16562655972487 (code B ref 56238); Sun, 26 Jun 2022 17:47:02 +0000 Received: (at 56238) by debbugs.gnu.org; 26 Jun 2022 17:46:37 +0000 Received: from localhost ([127.0.0.1]:48954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5WLF-0000e3-Fo for submit@debbugs.gnu.org; Sun, 26 Jun 2022 13:46:37 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:37880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5WLD-0000dm-QR for 56238@debbugs.gnu.org; Sun, 26 Jun 2022 13:46:36 -0400 Received: by mail-ed1-f51.google.com with SMTP id c65so10098011edf.4 for <56238@debbugs.gnu.org>; Sun, 26 Jun 2022 10:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=NJgS8zA/s1u/1EsPwi8HMWPxXCBkvG+0YKQcmdJtixU=; b=mifbO2lYSSGn++DgZM1KUrfJuwyqpginMkPqHpxy8elnY6VSzFbhHh4rQuWej/cydR eNw+7HXLflmiiZfOYrLDguxg/hu84rloN+iGWsuQj/i+ep2YBakXixO3Z+X4pqL+IBt4 dP0cUB8hB3LsUFirsyirVmHDkMVTIyhwV4SFHq/Oy93LVol419nPjIyTmtaeIr7gUQ2D DJF9m8uYzKVKKVBlIl1MJhnhGWSuMfKbv1D/TYfRY/wAdvhVzv2XR9Cj2jb+2E9G+UOk 5RIA5dg99qomnzf5X4x60dRR/FnlFmCOU/zQUPheEgogEe0MnJtu1SwLIJZfedT6sIuO 9GVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=NJgS8zA/s1u/1EsPwi8HMWPxXCBkvG+0YKQcmdJtixU=; b=YOVeXoijAY37w+nGX8yrmBSRIpFl3oQHyEKrXM8hsV8jRc4uHmeoLhGhRtD5HGvWFn daWNlSj3+UFnkZovWX8hySuKd707yO5za3Cbr0f5Q5FkT0htBmb6vqq5RHb5LAbN3eRN 3B1X04a0XidsGAIJd5uPe66dOqBRA3aBeKzi8gHoETmeY6/DAxJYcR7i1AlmI8ZWt3WS Z+MqmbQSR/qYQe3Lc8IuTBHOn9Utfv4VHb3ZxWCYNcmzO3dycAe/loHdZZNkWnPnTnbX VY0Q4hMeoJCP9ncCfge4Pv7XwcNbXuvP1p5k1eDT2eRoNF0L6rsZTj8vJYmpHeo3SQgg CF1g== X-Gm-Message-State: AJIora8BTl1mfgG6+h0Dvzs46AS67wYZNUfrgDq1IzUWTspblvQ78xOc 2hg1e6AtCmy1lC0RefdmgDaeuFC9OtEQT/8liqbjE7kmuZU= X-Google-Smtp-Source: AGRyM1syMd25Yh8vuSkFfWwNT/z0L+6AZZmnheVyz118XnEFg72fOUQmGJbED2pBl5JhHW6dG9MXLbbAApodduKiqRc= X-Received: by 2002:aa7:d296:0:b0:435:7f33:38bc with SMTP id w22-20020aa7d296000000b004357f3338bcmr12184123edq.399.1656265589921; Sun, 26 Jun 2022 10:46:29 -0700 (PDT) MIME-Version: 1.0 From: Sharlatan Hellseher Date: Sun, 26 Jun 2022 18:46:18 +0100 Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches -- … наш разум - превосходная объяснительная машина которая способна найти смысл почти в чем угодно, истолковать любой феномен, но совершенно не в состоянии принять мысль о непредсказуемости. From bec695ac513c9f2e187484863f6c6e8e375ba2c4 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 26 Jun 2022 18:34:58 +0100 Subject: [PATCH 2/2] gnu: Add aoflagger * gnu/packages/astronomy.scm (aoflagger): New vaiable * gnu/packages/patches (aoflagger-use-system-provided-pybind11.patch): Releated patch. --- gnu/packages/astronomy.scm | 63 +++++++++++++++++++ ...flagger-use-system-provided-pybind11.patch | 38 +++++++++++ 2 files changed, 101 insertions(+) create mode 100644 gnu/packages/patches/aoflagger-use-system-provided-pybind11.patch diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 27f7fa1c3b..afa2733c1a 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -140,6 +140,69 @@ (define-public calceph @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 + ;; NOTE: (Sharlatan-20220626T175728+0100): 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 + ;; NOTE: (Sharlatan-20220626T163240+0100): 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 +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) -- 2.36.0