git: e4fcc03cae65 - main - math/R-cran-XLConnect: adding a R package for manipulating Microsoft Excel files

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Sun, 01 May 2022 20:12:21 UTC
The branch main has been updated by thierry:

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

commit e4fcc03cae65a93331a2b4a27ab1eb877edfc605
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-04-29 13:02:26 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-05-01 20:12:16 +0000

    math/R-cran-XLConnect: adding a R package for manipulating Microsoft Excel files
---
 math/Makefile                                |   1 +
 math/R-cran-XLConnect/Makefile               |  37 ++++++++
 math/R-cran-XLConnect/distinfo               |   3 +
 math/R-cran-XLConnect/files/patch-R_onLoad.R |  48 ++++++++++
 math/R-cran-XLConnect/pkg-descr              |   5 +
 math/R-cran-XLConnect/pkg-plist              | 133 +++++++++++++++++++++++++++
 6 files changed, 227 insertions(+)

diff --git a/math/Makefile b/math/Makefile
index cb22cbfe7d05..b3392659e3a3 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -33,6 +33,7 @@
     SUBDIR += R-cran-SQUAREM
     SUBDIR += R-cran-SparseM
     SUBDIR += R-cran-VGAM
+    SUBDIR += R-cran-XLConnect
     SUBDIR += R-cran-Zelig
     SUBDIR += R-cran-acepack
     SUBDIR += R-cran-alabama
diff --git a/math/R-cran-XLConnect/Makefile b/math/R-cran-XLConnect/Makefile
new file mode 100644
index 000000000000..e54ef3cb770f
--- /dev/null
+++ b/math/R-cran-XLConnect/Makefile
@@ -0,0 +1,37 @@
+# Created by: Thierry Thomas <thierry@pompo.net>
+
+PORTNAME=	XLConnect
+PORTVERSION=	1.0.5
+CATEGORIES=	math
+DISTNAME=	${PORTNAME}_${PORTVERSION}
+
+MAINTAINER=	thierry@FreeBSD.org
+COMMENT=	R package for manipulating Microsoft Excel files
+
+LICENSE=	GPLv3
+
+BUILD_DEPENDS=	R-cran-rJava>0:devel/R-cran-rJava
+RUN_DEPENDS=	R-cran-rJava>0:devel/R-cran-rJava	\
+		apache-poi>0:textproc/apache-poi	\
+		SparseBitSet>0:devel/sparsebitset	\
+		apache-xmlbeans>0:textproc/apache-xmlbeans	\
+		apache-commons-math>0:math/apache-commons-math	\
+		apache-commons-codec>0:java/apache-commons-codec	\
+		apache-commons-compress>0:archivers/apache-commons-compress \
+		apache-commons-collections4>0:java/apache-commons-collections4
+
+USES=		cran
+USE_JAVA=	yes
+
+DEP_JARS=	commons-codec commons-collections4 commons-compress	\
+		ooxml-schemas poi poi-ooxml poi-ooxml-schemas		\
+		SparseBitSet xmlbeans
+
+post-install:
+.for j in ${DEP_JARS}
+	${LN} -sf ${JAVALIBDIR}/${j}.jar ${STAGEDIR}${PREFIX}/${R_MOD_DIR}/java/
+.endfor
+	${LN} -sf ${JAVALIBDIR}/commons-math.jar	\
+		${STAGEDIR}${PREFIX}/${R_MOD_DIR}/java/commons-math3.jar
+
+.include <bsd.port.mk>
diff --git a/math/R-cran-XLConnect/distinfo b/math/R-cran-XLConnect/distinfo
new file mode 100644
index 000000000000..48108ec25e6a
--- /dev/null
+++ b/math/R-cran-XLConnect/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1651219653
+SHA256 (XLConnect_1.0.5.tar.gz) = 975c2ef57f28ccfac79ae5d285b7e82e60791fb121052616c10bc52e2bca16ad
+SIZE (XLConnect_1.0.5.tar.gz) = 1406818
diff --git a/math/R-cran-XLConnect/files/patch-R_onLoad.R b/math/R-cran-XLConnect/files/patch-R_onLoad.R
new file mode 100644
index 000000000000..6ac40d1aeecb
--- /dev/null
+++ b/math/R-cran-XLConnect/files/patch-R_onLoad.R
@@ -0,0 +1,48 @@
+--- R/onLoad.R.orig	2021-09-30 08:28:06 UTC
++++ R/onLoad.R
+@@ -54,44 +54,7 @@
+     repo <- "https://repo1.maven.org/maven2"
+   }
+   apachePrefix <- paste0(repo, "/org/apache")
+-  sharedPaths <- tryCatch({
+-    c(
+-      xlcEnsureDependenciesFor(
+-      paste0(apachePrefix, "/poi/poi-ooxml-schemas/4.1.2/poi-ooxml-schemas-4.1.2.jar"), "poi-ooxml-schemas.jar", 
+-      "4\\.[1-9].*",  libname, pkgname, debianpkg = "libapache-poi-java", rpmpkg="apache-poi"),
+-    xlcEnsureDependenciesFor(
+-      paste0(apachePrefix, "/poi/poi-ooxml/4.1.2/poi-ooxml-4.1.2.jar"), "poi-ooxml.jar", 
+-      "4\\.[1-9].*",  libname, pkgname, debianpkg = "libapache-poi-java", rpmpkg="apache-poi"),
+-    xlcEnsureDependenciesFor(
+-      paste0(apachePrefix, "/poi/poi/4.1.2/poi-4.1.2.jar"), "poi.jar", 
+-      "4\\.[1-9].*",  libname, pkgname, debianpkg = "libapache-poi-java", rpmpkg="apache-poi"),
+-    xlcEnsureDependenciesFor(
+-      paste0(apachePrefix, "/commons/commons-compress/1.20/commons-compress-1.20.jar"), "commons-compress.jar",
+-      "1\\.(1[8-9]|[2-9][0-9]).*",  libname, pkgname, debianpkg = "libcommons-compress-java", rpmpkg="apache-commons-compress"),
+-    xlcEnsureDependenciesFor(
+-      paste0(apachePrefix, "/xmlbeans/xmlbeans/3.1.0/xmlbeans-3.1.0.jar"), "xmlbeans.jar",
+-      "3\\..*",  libname, pkgname, debianpkg="libxmlbeans-java"),
+-    xlcEnsureDependenciesFor(
+-      paste0(apachePrefix, "/commons/commons-collections4/4.4/commons-collections4-4.4.jar"), "commons-collections4.jar",
+-      "4-4\\.([2-9]|1[0-9]).*",  libname, pkgname, debianpkg="libcommons-collections4-java", rpmpkg="apache-commons-collections4"),
+-    xlcEnsureDependenciesFor(
+-      paste0(apachePrefix, "/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar"), "commons-math3.jar",
+-      "3\\.([6-9]|1[0-9]).*",  libname, pkgname, debianpkg="libcommons-math3-java"),
+-    xlcEnsureDependenciesFor(
+-      paste0(repo, "/commons-codec/commons-codec/1.15/commons-codec-1.15.jar"), "commons-codec-1.15.jar",
+-      "1\\.(1[1-9]|[2-9][0-9]).*",  libname, pkgname, debianpkg="libcommons-codec-java", rpmpkg="apache-commons-codec"),
+-    xlcEnsureDependenciesFor(
+-      paste0(apachePrefix, "/poi/ooxml-schemas/1.4/ooxml-schemas-1.4.jar"), "ooxml-schemas.jar",
+-      "1\\.([4-9]|[1-9][0-9]).*",  libname, pkgname),
+-    xlcEnsureDependenciesFor(
+-      paste0(repo, "/com/zaxxer/SparseBitSet/1.2/SparseBitSet-1.2.jar"), "SparseBitSet.jar",
+-      "1\\.([2-9]|[1-9][0-9]).*",  libname, pkgname)
+-    )
+-  },
+-  error=function(e) {
+-          e
+-        }
+-  )
++  sharedPaths <- ""
+   .jpackage(name = pkgname, jars = "*", morePaths = sharedPaths)
+   # Perform general XLConnect settings - pass package description
+   XLConnectSettings(packageDescription(pkgname))
diff --git a/math/R-cran-XLConnect/pkg-descr b/math/R-cran-XLConnect/pkg-descr
new file mode 100644
index 000000000000..0d0bcf9fe4cf
--- /dev/null
+++ b/math/R-cran-XLConnect/pkg-descr
@@ -0,0 +1,5 @@
+XLConnect is a comprehensive and cross-platform R package for manipulating
+Microsoft Excel files from within R.
+
+WWW: https://cran.r-project.org/package=XLConnect
+WWW: https://github.com/miraisolutions/xlconnect
diff --git a/math/R-cran-XLConnect/pkg-plist b/math/R-cran-XLConnect/pkg-plist
new file mode 100644
index 000000000000..ae3c443b865f
--- /dev/null
+++ b/math/R-cran-XLConnect/pkg-plist
@@ -0,0 +1,133 @@
+%%R_MOD_DIR%%/COPYRIGHTS
+%%R_MOD_DIR%%/DESCRIPTION
+%%R_MOD_DIR%%/INDEX
+%%R_MOD_DIR%%/Meta/Rd.rds
+%%R_MOD_DIR%%/Meta/data.rds
+%%R_MOD_DIR%%/Meta/demo.rds
+%%R_MOD_DIR%%/Meta/features.rds
+%%R_MOD_DIR%%/Meta/hsearch.rds
+%%R_MOD_DIR%%/Meta/links.rds
+%%R_MOD_DIR%%/Meta/nsInfo.rds
+%%R_MOD_DIR%%/Meta/package.rds
+%%R_MOD_DIR%%/Meta/vignette.rds
+%%R_MOD_DIR%%/NAMESPACE
+%%R_MOD_DIR%%/NEWS
+%%R_MOD_DIR%%/R/XLConnect
+%%R_MOD_DIR%%/R/XLConnect.rdb
+%%R_MOD_DIR%%/R/XLConnect.rdx
+%%R_MOD_DIR%%/XLConnect.R
+%%R_MOD_DIR%%/data/Rdata.rdb
+%%R_MOD_DIR%%/data/Rdata.rds
+%%R_MOD_DIR%%/data/Rdata.rdx
+%%R_MOD_DIR%%/demo/addImage.R
+%%R_MOD_DIR%%/demo/cellsize.R
+%%R_MOD_DIR%%/demo/cellstyles1.R
+%%R_MOD_DIR%%/demo/cellstyles2.R
+%%R_MOD_DIR%%/demo/cellstyles3.R
+%%R_MOD_DIR%%/demo/dataformat.R
+%%R_MOD_DIR%%/demo/hideSheets.R
+%%R_MOD_DIR%%/demo/readNamedRegion.R
+%%R_MOD_DIR%%/demo/readWorksheet.R
+%%R_MOD_DIR%%/demo/summary.R
+%%R_MOD_DIR%%/demo/withWorkbook.R
+%%R_MOD_DIR%%/demo/writeLargeData.R
+%%R_MOD_DIR%%/demo/writeNamedRegion.R
+%%R_MOD_DIR%%/demo/writeWorksheet.R
+%%R_MOD_DIR%%/demoFiles/SwitzerlandFlag.jpg
+%%R_MOD_DIR%%/demoFiles/conversion.xlsx
+%%R_MOD_DIR%%/demoFiles/errorCell.xlsx
+%%R_MOD_DIR%%/demoFiles/mtcars.xlsx
+%%R_MOD_DIR%%/demoFiles/multiregion.xls
+%%R_MOD_DIR%%/demoFiles/multiregion.xlsx
+%%R_MOD_DIR%%/demoFiles/mydata.xlsx
+%%R_MOD_DIR%%/demoFiles/template.xlsx
+%%R_MOD_DIR%%/demoFiles/template2.xlsx
+%%R_MOD_DIR%%/doc/XLConnect.R
+%%R_MOD_DIR%%/doc/XLConnect.Rnw
+%%R_MOD_DIR%%/doc/XLConnect.pdf
+%%R_MOD_DIR%%/doc/XLConnectImpatient.Rnw
+%%R_MOD_DIR%%/doc/XLConnectImpatient.pdf
+%%R_MOD_DIR%%/doc/index.html
+%%R_MOD_DIR%%/help/AnIndex
+%%R_MOD_DIR%%/help/XLConnect.rdb
+%%R_MOD_DIR%%/help/XLConnect.rdx
+%%R_MOD_DIR%%/help/aliases.rds
+%%R_MOD_DIR%%/help/figures/logo.png
+%%R_MOD_DIR%%/help/paths.rds
+%%R_MOD_DIR%%/html/00Index.html
+%%R_MOD_DIR%%/html/R.css
+%%R_MOD_DIR%%/java/SparseBitSet.jar
+%%R_MOD_DIR%%/java/XLConnect-1.0.3.jar
+%%R_MOD_DIR%%/java/commons-codec.jar
+%%R_MOD_DIR%%/java/commons-collections4.jar
+%%R_MOD_DIR%%/java/commons-compress.jar
+%%R_MOD_DIR%%/java/commons-math3.jar
+%%R_MOD_DIR%%/java/curvesapi-1.06.jar
+%%R_MOD_DIR%%/java/ooxml-schemas.jar
+%%R_MOD_DIR%%/java/poi-ooxml-schemas.jar
+%%R_MOD_DIR%%/java/poi-ooxml.jar
+%%R_MOD_DIR%%/java/poi.jar
+%%R_MOD_DIR%%/java/xmlbeans.jar
+%%R_MOD_DIR%%/tests/run_tests.R
+%%R_MOD_DIR%%/unitTests/resources/testBug106.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testBug49.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testBug52.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testBug53.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testBug61.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testCachedValues.xls
+%%R_MOD_DIR%%/unitTests/resources/testCachedValues.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testLoadWorkbook.xls
+%%R_MOD_DIR%%/unitTests/resources/testLoadWorkbook.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testReadWorksheetSparseBitSet.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWithWorkbook.xls
+%%R_MOD_DIR%%/unitTests/resources/testWithWorkbook.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookCellFormula.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookCellFormula.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookDefinedNames.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookDefinedNames.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookErrorCell.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookErrorCell.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookExistsNameAndSheet.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookExistsNameAndSheet.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookForceRecalc.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookForceRecalc.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookMissingValue.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookMissingValue.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookReadNamedRegion.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookReadNamedRegion.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookReadWorksheet.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookReadWorksheet.xlsx
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookSheets.xls
+%%R_MOD_DIR%%/unitTests/resources/testWorkbookSheets.xlsx
+%%R_MOD_DIR%%/unitTests/runit.arefidx.R
+%%R_MOD_DIR%%/unitTests/runit.colidx.R
+%%R_MOD_DIR%%/unitTests/runit.crefidx.R
+%%R_MOD_DIR%%/unitTests/runit.dataframeConversion.R
+%%R_MOD_DIR%%/unitTests/runit.dumpAndRestore.R
+%%R_MOD_DIR%%/unitTests/runit.extractSheetName.R
+%%R_MOD_DIR%%/unitTests/runit.loadWorkbook.R
+%%R_MOD_DIR%%/unitTests/runit.with.workbook.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.cellstyles.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.createName.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.createSheet.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.existsName.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.existsSheet.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.extraction.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.getBoundingBox.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.getDefinedNames.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.getSheetPos.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.getSheets.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.hideSheet.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.onErrorCell.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.readNamedRegion.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.readWorksheet.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.renameSheet.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.saveWorkbook.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.setMissingValue.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.setSheetPos.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.writeNamedRegion.R
+%%R_MOD_DIR%%/unitTests/runit.workbook.writeWorksheet.R
+%%R_MOD_DIR%%/unitTests/runit.writeAndReadNamedRegion.R
+%%R_MOD_DIR%%/unitTests/runit.writeAndReadWorksheet.R
+%%R_MOD_DIR%%/unitTests/runit.writeNamedRegionToFile.R
+%%R_MOD_DIR%%/unitTests/runit.writeWorksheetToFile.R