Skip to content

Commit

Permalink
R-rtmpt: fix path to gsl
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Jun 1, 2024
1 parent a654680 commit 6d78568
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
9 changes: 8 additions & 1 deletion R/R-rtmpt/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup R 1.0

R.setup cran raphael.hartmann rtmpt 2.0-1
revision 2
revision 3
categories-append math
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
license GPL-2+
Expand All @@ -26,6 +26,13 @@ depends_lib-append port:gsl \
# error: 'isnan' was not declared in this scope; did you mean 'std::isnan'?
patchfiles patch-fix-math.diff

# Avoid brewisms to ensure correct linking.
patchfiles-append patch-fix-gsl-path.diff

post-patch {
reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/Makevars
}

depends_test-append port:R-knitr \
port:R-rmarkdown

Expand Down
11 changes: 11 additions & 0 deletions R/R-rtmpt/files/patch-fix-gsl-path.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/Makevars 2023-12-11 23:53:04.000000000 +0800
+++ src/Makevars 2024-06-01 22:51:53.000000000 +0800
@@ -1,6 +1,6 @@
# copied from sources of R package gsl
-GSL_CFLAGS = -I/usr/local/include
-GSL_LIBS = -L/usr/local/lib -lgsl -lgslcblas
+GSL_CFLAGS = -I@PREFIX@/include
+GSL_LIBS = -L@PREFIX@/lib -lgsl -lgslcblas

# combine to standard arguments for R
PKG_CFLAGS = $(GSL_CFLAGS)

0 comments on commit 6d78568

Please sign in to comment.