pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
R-Rcpp: Seamless R and C++ integration
Module Name: pkgsrc-wip
Committed By: Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By: outpaddling
Date: Thu Nov 28 08:44:59 2024 -0600
Changeset: e855065f6d17755d92f02c90ffd6ffe221b24a16
Modified Files:
Makefile
Added Files:
R-Rcpp/DESCR
R-Rcpp/Makefile
R-Rcpp/buildlink3.mk
R-Rcpp/distinfo
R-Rcpp/patches/patch-inst_include_Rcpp_exceptions.h
R-Rcpp/patches/patch-inst_include_Rcpp_exceptions_cpp11_exceptions.h
R-Rcpp/patches/patch-inst_include_Rcpp_exceptions_cpp98_exceptions.h
R-Rcpp/patches/patch-inst_include_Rcpp_utils_tinyformat.h
Log Message:
R-Rcpp: Seamless R and C++ integration
Import to WIP for testing Darwin patches
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e855065f6d17755d92f02c90ffd6ffe221b24a16
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 4 ++
R-Rcpp/DESCR | 24 ++++++++++
R-Rcpp/Makefile | 56 ++++++++++++++++++++++
R-Rcpp/buildlink3.mk | 12 +++++
R-Rcpp/distinfo | 9 ++++
.../patches/patch-inst_include_Rcpp_exceptions.h | 15 ++++++
...inst_include_Rcpp_exceptions_cpp11_exceptions.h | 15 ++++++
...inst_include_Rcpp_exceptions_cpp98_exceptions.h | 15 ++++++
.../patch-inst_include_Rcpp_utils_tinyformat.h | 15 ++++++
9 files changed, 165 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 40b933ea2f..fa1b0f49b4 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,7 @@ SUBDIR+= R-BiocGenerics
SUBDIR+= R-C50
SUBDIR+= R-Matrix
SUBDIR+= R-MySQL
+SUBDIR+= R-Rcpp
SUBDIR+= R-Rgraphviz
SUBDIR+= R-Rserve
SUBDIR+= R-arrow
@@ -121,6 +122,7 @@ SUBDIR+= ad2vcf
SUBDIR+= ada_gnat
SUBDIR+= ada_xmlada
SUBDIR+= adamem
+SUBDIR+= adasat
SUBDIR+= adept
SUBDIR+= adguardhome
SUBDIR+= adjustmtu
@@ -1269,6 +1271,7 @@ SUBDIR+= gmrender-resurrect-git
SUBDIR+= gmrun
SUBDIR+= gnatcoll-bindings
SUBDIR+= gnatcoll-core
+SUBDIR+= gnatcoll-db
SUBDIR+= gnocchi
SUBDIR+= gnochm
SUBDIR+= gnokii
@@ -2487,6 +2490,7 @@ SUBDIR+= ncbi-bin
SUBDIR+= ncbi-blast+
SUBDIR+= ncbi-c++-lib
SUBDIR+= ncbi-lib
+SUBDIR+= ncnn
SUBDIR+= ncp
SUBDIR+= ncrack
SUBDIR+= neateqn
diff --git a/R-Rcpp/DESCR b/R-Rcpp/DESCR
new file mode 100644
index 0000000000..0b47a0eca5
--- /dev/null
+++ b/R-Rcpp/DESCR
@@ -0,0 +1,24 @@
+The Rcpp package provides R functions as well as a C++ library which
+facilitate the integration of R and C++.
+
+R data types (SEXP) are matched to C++ objects in a class hierarchy.
+All R types are supported (vectors, functions, environment, etc ...)
+and each type is mapped to a dedicated class. For example, numeric
+vectors are represented as instances of the Rcpp::NumericVector class,
+environments are represented as instances of Rcpp::Environment,
+functions are represented as Rcpp::Function, etc ... The
+"Rcpp-introduction" vignette provides a good entry point to Rcpp.
+
+Rcpp also provides Rcpp modules, a framework that allows exposing C++
+functions and classes to the R level. The "Rcpp-modules" vignette
+details the current set of features of Rcpp-modules.
+
+Rcpp includes a concept called Rcpp sugar that brings many R functions
+into C++. Sugar takes advantage of lazy evaluation and expression
+templates to achieve great performance while exposing a syntax that is
+much nicer to use than the equivalent low-level loop code. The
+"Rcpp-sugar" vignette gives an overview of the feature.
+
+Additional documentation is available via the paper by Eddelbuettel
+and Francois (2011, JSS) paper and the book by Eddelbuettel (2013,
+Springer); see 'citation("Rcpp")' for details.
diff --git a/R-Rcpp/Makefile b/R-Rcpp/Makefile
new file mode 100644
index 0000000000..438525f1ae
--- /dev/null
+++ b/R-Rcpp/Makefile
@@ -0,0 +1,56 @@
+# $NetBSD: Makefile,v 1.34 2024/11/07 13:51:37 mef Exp $
+
+R_PKGNAME= Rcpp
+R_PKGVER= 1.0.13-1
+CATEGORIES= devel
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+COMMENT= Seamless R and C++ integration
+LICENSE= gnu-gpl-v2 OR gnu-gpl-v3
+
+# !pdfTeX error: pdflatex (file tcrm1000): Font tcrm1000 at 600 not found
+
+TEST_DEPENDS+= R-RUnit-[0-9]*:../../devel/R-RUnit
+TEST_DEPENDS+= R-inline-[0-9]*:../../devel/R-inline
+TEST_DEPENDS+= R-knitr-[0-9]*:../../print/R-knitr
+TEST_DEPENDS+= R-markdown-[0-9]*:../../textproc/R-markdown
+TEST_DEPENDS+= R-pkgKitten>=0.1.2:../../devel/R-pkgKitten
+TEST_DEPENDS+= R-rbenchmark>=1.0.0:../../benchmarks/R-rbenchmark
+TEST_DEPENDS+= R-tinytest-[0-9]*:../../devel/R-tinytest
+
+TEST_DEPENDS+= tex-pdfpages-[0-9]*:../../print/tex-pdfpages
+TEST_DEPENDS+= tex-fancyvrb-[0-9]*:../../print/tex-fancyvrb
+TEST_DEPENDS+= tex-iftex-[0-9]*:../../print/tex-iftex
+TEST_DEPENDS+= tex-pdflscape-[0-9]*:../../print/tex-pdflscape
+TEST_DEPENDS+= tex-ae-[0-9]*:../../fonts/tex-ae
+TEST_DEPENDS+= tex-ec-[0-9]*:../../fonts/tex-ec
+TEST_DEPENDS+= tex-inconsolata-[0-9]*:../../fonts/tex-inconsolata
+TEST_DEPENDS+= tex-url-[0-9]*:../../print/tex-url
+TEST_DEPENDS+= tex-xkeyval-[0-9]*:../../print/tex-xkeyval
+
+USE_LANGUAGES+= c++
+USE_CXX_FEATURES+= c++11
+
+REPLACE_R+= inst/examples/*/*.r
+REPLACE_R+= inst/examples/SugarPerformance/sugarBenchmarks.R
+
+REPLACE_RSCRIPT+= inst/discovery/cxx0x.R
+
+REPLACE_SH+= inst/examples/ConvolveBenchmarks/buildAndRun.sh
+REPLACE_SH+= inst/examples/ConvolveBenchmarks/overhead.sh
+
+REPLACE_INTERPRETER+= R
+REPLACE.R.old= /usr/bin/env r
+REPLACE.R.new= ${PREFIX}/bin/R
+REPLACE_FILES.R= ${REPLACE_R}
+
+REPLACE_INTERPRETER+= Rscript
+REPLACE.Rscript.old= .*Rscript
+REPLACE.Rscript.new= ${PREFIX}/bin/Rscript
+REPLACE_FILES.Rscript= ${REPLACE_RSCRIPT}
+
+CHECK_SSP_SKIP+= lib/R/library/Rcpp/*/bin/*/*.deb
+CHECK_RELRO_SKIP+= ${CHECK_SSP_SKIP}
+
+.include "../../math/R/Makefile.extension"
+.include "../../mk/bsd.pkg.mk"
diff --git a/R-Rcpp/buildlink3.mk b/R-Rcpp/buildlink3.mk
new file mode 100644
index 0000000000..b91e21a814
--- /dev/null
+++ b/R-Rcpp/buildlink3.mk
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.2 2019/07/31 15:00:16 brook Exp $
+
+BUILDLINK_TREE+= R-Rcpp
+
+.if !defined(R_RCPP_BUILDLINK3_MK)
+R_RCPP_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.R-Rcpp+= R-Rcpp>=1.0.2
+BUILDLINK_PKGSRCDIR.R-Rcpp?= ../../wip/R-Rcpp
+.endif # R_RCPP_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -R-Rcpp
diff --git a/R-Rcpp/distinfo b/R-Rcpp/distinfo
new file mode 100644
index 0000000000..31fdf092f2
--- /dev/null
+++ b/R-Rcpp/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.27 2024/11/07 13:51:37 mef Exp $
+
+BLAKE2s (R/Rcpp_1.0.13-1.tar.gz) = 2beaaaca299d5071ff3505917ac57f0effeca994d51a479e08e729167496f538
+SHA512 (R/Rcpp_1.0.13-1.tar.gz) = f94df7519db70e37f8746dfbee473226f6f472c05c774004bf13a3dc7f833157dde3610117672f31914be77262f1cb547ff25501167553c7e4ad90efd772321c
+Size (R/Rcpp_1.0.13-1.tar.gz) = 3435726 bytes
+SHA1 (patch-inst_include_Rcpp_exceptions.h) = 15bf2b84e1fcb0828b8231632b0178880fcfa331
+SHA1 (patch-inst_include_Rcpp_exceptions_cpp11_exceptions.h) = 37aeaa6907ec9b576f2655caddd98e45f991e198
+SHA1 (patch-inst_include_Rcpp_exceptions_cpp98_exceptions.h) = f507c1982b0dc3de7ab6884fd6c903cbf4926efc
+SHA1 (patch-inst_include_Rcpp_utils_tinyformat.h) = a9dc28bfa8e12298c03901fa89527b24d634f917
diff --git a/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions.h b/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions.h
new file mode 100644
index 0000000000..c541324fff
--- /dev/null
+++ b/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Unbreak build on macOS 15.0 aarch64
+
+--- inst/include/Rcpp/exceptions.h.orig 2024-11-28 14:37:22.635316035 +0000
++++ inst/include/Rcpp/exceptions.h
+@@ -114,7 +114,7 @@ namespace Rcpp {
+ ::Rf_warning("%s", message.c_str());
+ } // #nocov end
+
+- inline void NORET stop(const std::string& message) { // #nocov start
++ NORET inline void stop(const std::string& message) { // #nocov start
+ throw Rcpp::exception(message.c_str());
+ } // #nocov end
+
diff --git a/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions_cpp11_exceptions.h b/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions_cpp11_exceptions.h
new file mode 100644
index 0000000000..a472cb376c
--- /dev/null
+++ b/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions_cpp11_exceptions.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Unbreak build on macOS 15.0 aarch64
+
+--- inst/include/Rcpp/exceptions/cpp11/exceptions.h.orig 2024-11-28 14:38:44.773960705 +0000
++++ inst/include/Rcpp/exceptions/cpp11/exceptions.h
+@@ -48,7 +48,7 @@ inline void warning(const char* fmt, Arg
+ }
+
+ template <typename... Args>
+-inline void NORET stop(const char* fmt, Args&&... args) {
++NORET inline void stop(const char* fmt, Args&&... args) {
+ throw Rcpp::exception( tfm::format(fmt, std::forward<Args>(args)... ).c_str() );
+ }
+
diff --git a/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions_cpp98_exceptions.h b/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions_cpp98_exceptions.h
new file mode 100644
index 0000000000..f3d92fc94c
--- /dev/null
+++ b/R-Rcpp/patches/patch-inst_include_Rcpp_exceptions_cpp98_exceptions.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Unbreak build on macOS 15.0 aarch64
+
+--- inst/include/Rcpp/exceptions/cpp98/exceptions.h.orig 2024-11-28 14:39:28.908549027 +0000
++++ inst/include/Rcpp/exceptions/cpp98/exceptions.h
+@@ -123,7 +123,7 @@ inline void warning(const char* fmt, con
+ // -- Start Rcpp::stop declaration
+
+ template <typename T1>
+-inline void NORET stop(const char* fmt, const T1& arg1) {
++NORET inline void stop(const char* fmt, const T1& arg1) {
+ throw Rcpp::exception(tfm::format(fmt, arg1).c_str());
+ }
+
diff --git a/R-Rcpp/patches/patch-inst_include_Rcpp_utils_tinyformat.h b/R-Rcpp/patches/patch-inst_include_Rcpp_utils_tinyformat.h
new file mode 100644
index 0000000000..6679cd89fe
--- /dev/null
+++ b/R-Rcpp/patches/patch-inst_include_Rcpp_utils_tinyformat.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Unbreak build on macOS 15.0 aarch64
+
+--- inst/include/Rcpp/utils/tinyformat.h.orig 2024-11-28 14:40:26.847508847 +0000
++++ inst/include/Rcpp/utils/tinyformat.h
+@@ -24,7 +24,7 @@
+ #define Rcpp_tinyformat_h
+
+ namespace Rcpp {
+-void stop(const std::string& message);
++NORET void stop(const std::string& message);
+ }
+ #define TINYFORMAT_ERROR(REASON) ::Rcpp::stop(REASON)
+
Home |
Main Index |
Thread Index |
Old Index