1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

textproc/R-cran-downlit: new port, Syntax Highlighting and Automatic Linking

Syntax highlighting of R code, specifically designed for the needs of
'RMarkdown' packages like 'pkgdown', 'hugodown', and 'bookdown'. It includes
linking of function calls to their documentation on the web, and automatic
translation of ANSI escapes in output to the equivalent HTML.

The math/R doesn't ship grid library's vignette so should remove one
test.

This port is needed to update of devel/R-cran-devtools.
This commit is contained in:
Zsolt Udvari 2024-08-13 07:37:50 +02:00
parent ec7bdd9c2b
commit ad83ddc0b4
5 changed files with 57 additions and 0 deletions

View File

@ -9,6 +9,7 @@
SUBDIR += R-cran-brew
SUBDIR += R-cran-cellranger
SUBDIR += R-cran-commonmark
SUBDIR += R-cran-downlit
SUBDIR += R-cran-formatR
SUBDIR += R-cran-highr
SUBDIR += R-cran-htmlTable

View File

@ -0,0 +1,36 @@
PORTNAME= downlit
DISTVERSION= 0.4.4
CATEGORIES= textproc
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= uzsolt@FreeBSD.org
COMMENT= Syntax Highlighting and Automatic Linking
WWW= https://cran.r-project.org/web/packages/downlit/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
CRAN_DEPENDS= R-cran-brio>0:devel/R-cran-brio \
R-cran-desc>0:devel/R-cran-desc \
R-cran-digest>0:security/R-cran-digest \
R-cran-evaluate>0:devel/R-cran-evaluate \
R-cran-fansi>0:devel/R-cran-fansi \
R-cran-memoise>0:devel/R-cran-memoise \
R-cran-rlang>0:devel/R-cran-rlang \
R-cran-vctrs>0:devel/R-cran-vctrs \
R-cran-withr>0:devel/R-cran-withr \
R-cran-yaml>0:textproc/R-cran-yaml
BUILD_DEPENDS= ${CRAN_DEPENDS}
RUN_DEPENDS= ${CRAN_DEPENDS}
TEST_DEPENDS= R-cran-covr>0:devel/R-cran-covr \
R-cran-htmltools>0:textproc/R-cran-htmltools \
R-cran-jsonlite>0:converters/R-cran-jsonlite \
R-cran-pkgload>0:devel/R-cran-pkgload \
R-cran-rmarkdown>0:textproc/R-cran-rmarkdown \
R-cran-testthat>0:devel/R-cran-testthat \
R-cran-tidyverse>0:devel/R-cran-tidyverse \
R-cran-xml2>0:textproc/R-cran-xml2
USES= cran:auto-plist
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1723491653
SHA256 (downlit_0.4.4.tar.gz) = 55c377dcee4adc48c1060e14079f3d1832453d066a2cf070530caa210c48f828
SIZE (downlit_0.4.4.tar.gz) = 37162

View File

@ -0,0 +1,13 @@
--- tests/testthat/test-link.R.orig 2024-08-13 05:33:03 UTC
+++ tests/testthat/test-link.R
@@ -217,10 +217,6 @@ test_that("looks in attached packages", {
href_expr_(vignette("sha1")),
"https://cran.rstudio.com/web/packages/digest/vignettes/sha1.html"
)
- expect_equal(
- href_expr_(vignette("moveline")),
- "https://cran.rstudio.com/web/packages/grid/vignettes/moveline.pdf"
- )
})
test_that("fail gracefully with non-working calls", {

View File

@ -0,0 +1,4 @@
Syntax highlighting of R code, specifically designed for the needs of
'RMarkdown' packages like 'pkgdown', 'hugodown', and 'bookdown'. It includes
linking of function calls to their documentation on the web, and automatic
translation of ANSI escapes in output to the equivalent HTML.