Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jan 2025 14:38:15 GMT
From:      Nuno Teixeira <eduardo@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2a132052a967 - main - devel/R-cran-data.table: Update to 1.16.4
Message-ID:  <202501031438.503EcFWs029725@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2a132052a96744d4032b6bd8e707e13f87de9e7d

commit 2a132052a96744d4032b6bd8e707e13f87de9e7d
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2025-01-03 14:31:00 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2025-01-03 14:38:03 +0000

    devel/R-cran-data.table: Update to 1.16.4
    
    - Use openmp by default
    - Fix tests with upstream patch
    
    ChangeLog: https://cran.r-project.org/web/packages/data.table/news/news.html
---
 devel/R-cran-data.table/Makefile               | 15 +++++++++-----
 devel/R-cran-data.table/distinfo               |  6 +++---
 devel/R-cran-data.table/files/extra-patch-test | 27 ++++++++++++++++++++++++++
 devel/R-cran-data.table/files/patch-configure  | 16 +++++++++++++++
 4 files changed, 56 insertions(+), 8 deletions(-)

diff --git a/devel/R-cran-data.table/Makefile b/devel/R-cran-data.table/Makefile
index 100dbe683927..5c41fed0ba59 100644
--- a/devel/R-cran-data.table/Makefile
+++ b/devel/R-cran-data.table/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	data.table
-DISTVERSION=	1.15.4
+DISTVERSION=	1.16.4
 CATEGORIES=	devel
 DISTNAME=	${PORTNAME}_${DISTVERSION}
 
@@ -10,14 +10,19 @@ WWW=		https://cran.r-project.org/web/packages/data.table/
 LICENSE=	MPL20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+TEST_DEPENDS=	R-cran-bit64>0:devel/R-cran-bit64 \
+		R-cran-knitr>0:print/R-cran-knitr
+# Tests fail if no /etc/locatime symlink defined
+
 USES=		cran:auto-plist,compiles pkgconfig
 
-NO_ARCH_IGNORE=	data_table.so
+EXTRA_PATCHES=	${FILESDIR}/extra-patch-test:-p1
 
-OPTIONS_DEFINE=		OPENMP
-OPTIONS_DEFAULT=	OPENMP
+NO_ARCH_IGNORE=	data_table.so
 
-OPENMP_CONFIGURE_ENABLE=	openmp
+# Decompress so patch could be applied. Tests will run from uncompressed file.
+pre-patch:
+	${BZIP2_CMD} -d ${WRKSRC}/inst/tests/tests.Rraw.bz2
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/R/library/data.table/libs/data_table.so
diff --git a/devel/R-cran-data.table/distinfo b/devel/R-cran-data.table/distinfo
index 497612d9aa61..4ec9c30412cb 100644
--- a/devel/R-cran-data.table/distinfo
+++ b/devel/R-cran-data.table/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1711960872
-SHA256 (data.table_1.15.4.tar.gz) = ab8065ff946d59ecaaf5eaf91a975495c07c30caad97a71205c72e41a740cb53
-SIZE (data.table_1.15.4.tar.gz) = 5387593
+TIMESTAMP = 1735906834
+SHA256 (data.table_1.16.4.tar.gz) = 72764bb3aebc111de60223cfb32b6111a47081e3a1e7f6d20c78eb7f30269cdf
+SIZE (data.table_1.16.4.tar.gz) = 5490632
diff --git a/devel/R-cran-data.table/files/extra-patch-test b/devel/R-cran-data.table/files/extra-patch-test
new file mode 100644
index 000000000000..f96280f75fc1
--- /dev/null
+++ b/devel/R-cran-data.table/files/extra-patch-test
@@ -0,0 +1,27 @@
+From 71bfe065ad5c6ddc40b0b5831802b48d9459c56e Mon Sep 17 00:00:00 2001
+From: Ivan K <krylov.r00t@gmail.com>
+Date: Thu, 10 Oct 2024 16:07:02 +0300
+Subject: [PATCH] tests: Detect session encoding incapable of U+00F1
+
+iconv() does not necessarily fail to convert U+00F1 to ASCII. For
+example, FreeBSD iconv() succeeds and returns '?' instead of the
+character in question. Use identical() to compare the result of the
+conversion back to the original (which internally converts both to
+UTF-8).
+---
+ inst/tests/tests.Rraw | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw
+index f79bec0d7f..c530b2fd12 100644
+--- a/inst/tests/tests.Rraw
++++ b/inst/tests/tests.Rraw
+@@ -18768,7 +18768,7 @@ if (test_bit64) local({
+ # non-ASCII plain symbol in by, #4708
+ # NB: recall we can't use non-ASCII symbols in the test script. The text is a-<n-tilde>-o (year in Spanish)
+ native_ano = iconv("a\U00F1o", "UTF-8", "")
+-if (!is.na(native_ano)) { # #6339: symbol must be represented in native encoding
++if (identical(native_ano, "a\U00F1o")) { # #6339: symbol must be represented in native encoding
+   DT = data.table(a = rep(1:3, 2))
+   setnames(DT, "a", native_ano)
+   test(2266, eval(parse(text=sprintf("DT[ , .N, %s]$N[1L]", native_ano))), 2L)
diff --git a/devel/R-cran-data.table/files/patch-configure b/devel/R-cran-data.table/files/patch-configure
new file mode 100644
index 000000000000..cfb8205ea9e9
--- /dev/null
+++ b/devel/R-cran-data.table/files/patch-configure
@@ -0,0 +1,16 @@
+Enable openmp by default
+
+See also:
+https://github.com/Rdatatable/data.table/issues/6559#issuecomment-2407642567
+
+--- configure.orig	2025-01-03 12:25:30 UTC
++++ configure
+@@ -84,7 +84,7 @@ detect_openmp () {
+ 
+ detect_openmp () {
+ 
+-  if [ "$(uname)" = "Linux" ]; then
++  if [ "$(uname)" = "Linux" ] || [ "$(uname)" = "FreeBSD" ]; then
+ 
+     printf "%s" "* checking if R installation supports OpenMP without any extra hints... "
+     if "${R_HOME}/bin/R" CMD SHLIB test-omp.c >> config.log 2>&1; then



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501031438.503EcFWs029725>