guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: r-sgloptim: Apply patch to fix build.


From: guix-commits
Subject: 01/02: gnu: r-sgloptim: Apply patch to fix build.
Date: Mon, 19 Feb 2024 08:11:05 -0500 (EST)

rekado pushed a commit to branch master
in repository guix.

commit 549a72f1289b3ad27410f248b92b1a10b838d123
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Mon Feb 19 14:07:29 2024 +0100

    gnu: r-sgloptim: Apply patch to fix build.
    
    * gnu/packages/patches/r-sgloptim.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/cran.scm (r-sgloptim)[source]: Apply it.
    
    Change-Id: I6435ec1dfadcffac684c378cd074777a19cd0d7f
---
 gnu/local.mk                          |  1 +
 gnu/packages/cran.scm                 |  3 +-
 gnu/packages/patches/r-sgloptim.patch | 53 +++++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index c08b27f94d..58011d1149 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1973,6 +1973,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch     \
   %D%/packages/patches/r-httpuv-1.6.6-unvendor-libuv.patch     \
   %D%/packages/patches/r-sapa-lapack.patch                     \
+  %D%/packages/patches/r-sgloptim.patch                                \
   %D%/packages/patches/ri-li-modernize_cpp.patch               \
   %D%/packages/patches/ripperx-missing-file.patch              \
   %D%/packages/patches/rpcbind-CVE-2017-8779.patch             \
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 2822da369a..a076a52640 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -33337,7 +33337,8 @@ filter.")
        (uri (cran-uri "sglOptim" version))
        (sha256
         (base32
-         "15bkkvgp9v9vsp65wps48g3c2fa0fj1025hbrziywq14j7wayyjr"))))
+         "15bkkvgp9v9vsp65wps48g3c2fa0fj1025hbrziywq14j7wayyjr"))
+       (patches (search-patches "r-sgloptim.patch"))))
     (properties
      `((upstream-name . "sglOptim")))
     (build-system r-build-system)
diff --git a/gnu/packages/patches/r-sgloptim.patch 
b/gnu/packages/patches/r-sgloptim.patch
new file mode 100644
index 0000000000..efba2c7013
--- /dev/null
+++ b/gnu/packages/patches/r-sgloptim.patch
@@ -0,0 +1,53 @@
+From cb9a15eb9d558b2b4b67f9e6806b394f65bff01f Mon Sep 17 00:00:00 2001
+From: Dirk Eddelbuettel <edd@debian.org>
+Date: Wed, 30 Nov 2022 20:15:42 -0600
+Subject: [PATCH] Simplify includes and only include RcppArmadillo.h
+
+---
+ inst/include/sgl.h | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/inst/include/sgl.h b/inst/include/sgl.h
+index a36011e..869a295 100644
+--- a/inst/include/sgl.h
++++ b/inst/include/sgl.h
+@@ -21,13 +21,12 @@
+ 
+ #define R_NO_REMAP
+ 
++//R, Rcpp, RcppArmadillo
++#include <RcppArmadillo.h>
++
+ //Progress monitor
+ #include <progress.hpp>
+ 
+-//Rcpp ect
+-#include <RcppCommon.h>
+-#include <Rconfig.h>
+-#include <RcppArmadilloConfig.h>
+ 
+ // Debugging
+ #ifdef SGL_DEBUG
+@@ -45,8 +44,10 @@
+ #else
+ // Do no debugging
+ #define ARMA_NO_DEBUG
++#ifndef NDEBUG
+ #define NDEBUG
+ #endif
++#endif
+ 
+ // Registration helper macros
+ #define STR_VALUE(x) #x
+@@ -59,11 +60,6 @@
+ 
+ #define CALL_METHOD(METHOD, MODULE, ARGS) 
{GET_STR_VALUE(FUN_NAME(METHOD,MODULE)), (DL_FUNC) &r_ ## MODULE ## _ ## 
METHOD, ARGS}
+ 
+-//Support for xl matrices
+-//#define ARMA_64BIT_WORD
+-
+-#include <armadillo>
+-#include <Rcpp.h>
+ 
+ //Boost
+ #include <boost/math/special_functions/fpclassify.hpp>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]