git: 59ecb667b3c4 - main - misc/R-cran-optimx: Update to 2024-12.2

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Fri, 20 Dec 2024 08:50:03 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=59ecb667b3c4dc4df97f1abc29d84a5e1e91ad5b

commit 59ecb667b3c4dc4df97f1abc29d84a5e1e91ad5b
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-12-20 08:47:31 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-12-20 08:49:44 +0000

    misc/R-cran-optimx: Update to 2024-12.2
    
    - Use pre-test to install missing R packages not ported yet so we can have
      a complete unittest
    
    ChangeLog: https://cran.r-project.org/web/packages/optimx/NEWS
---
 misc/R-cran-optimx/Makefile | 12 +++++++++++-
 misc/R-cran-optimx/distinfo |  6 +++---
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/misc/R-cran-optimx/Makefile b/misc/R-cran-optimx/Makefile
index 503c1ec43743..c9008e30586a 100644
--- a/misc/R-cran-optimx/Makefile
+++ b/misc/R-cran-optimx/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	optimx
-DISTVERSION=	2023-10.21
+DISTVERSION=	2024-12.2
 CATEGORIES=	misc
 DISTNAME=	${PORTNAME}_${DISTVERSION}
 
@@ -14,7 +14,17 @@ CRAN_DEPENDS=	R-cran-nloptr>0:math/R-cran-nloptr \
 		R-cran-pracma>0:math/R-cran-pracma
 BUILD_DEPENDS=	${CRAN_DEPENDS}
 RUN_DEPENDS=	${CRAN_DEPENDS}
+TEST_DEPENDS=	R-cran-minqa>0:math/R-cran-minqa \
+		R-cran-testthat>0:devel/R-cran-testthat
 
 USES=		cran:auto-plist
 
+pre-test:
+
+# Test depends not ported yet
+.for pkg in BB R.rsp dfoptim lbfgsb3c subplex ucminf
+	@${LOCALBASE}/bin/Rscript -e 'install.packages("${pkg}", \
+		repos = "https://cloud.r-project.org")'
+.endfor
+
 .include <bsd.port.mk>
diff --git a/misc/R-cran-optimx/distinfo b/misc/R-cran-optimx/distinfo
index 5880d1000d3d..03fe913606a5 100644
--- a/misc/R-cran-optimx/distinfo
+++ b/misc/R-cran-optimx/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1711701172
-SHA256 (optimx_2023-10.21.tar.gz) = 0d732d5604c26af59cfb95b80ed4e226c9c10422e2d82a6cc06b92f9ba6a44b5
-SIZE (optimx_2023-10.21.tar.gz) = 3735842
+TIMESTAMP = 1734680794
+SHA256 (optimx_2024-12.2.tar.gz) = b2a5dda261ba556da34223add599ea38044174fe311c5751ebaefe0817ba2a2f
+SIZE (optimx_2024-12.2.tar.gz) = 2259525