<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2162f808a88f3cda6cda747b66d57ddedb750766">https://github.com/macports/macports-ports/commit/2162f808a88f3cda6cda747b66d57ddedb750766</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 2162f808a88f3cda6cda747b66d57ddedb750766
</span>Author: Sergey Fedorov <barracuda@macos-powerpc.org>
AuthorDate: Sat Jun 15 05:10:27 2024 +0800

<span style='display:block; white-space:pre;color:#404040;'>    R-duckdb: update to 1.0.0
</span>---
 R/R-duckdb/Portfile                   |  9 +++---
 R/R-duckdb/files/patch-Makevars.diff  |  8 ++---
 R/R-duckdb/files/patch-fix-cmath.diff | 59 +++++++----------------------------
 3 files changed, 21 insertions(+), 55 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-duckdb/Portfile b/R/R-duckdb/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ce971eb55b3..43d1cdcc69c 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/R/R-duckdb/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-duckdb/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -7,7 +7,7 @@ PortGroup           legacysupport 1.1
</span> # _SC_PHYS_PAGES
 legacysupport.newest_darwin_requires_legacy 15
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-R.setup             cran duckdb duckdb 0.10.2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+R.setup             cran duckdb duckdb 1.0.0
</span> revision            0
 categories-append   databases
 maintainers         nomaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,15 +15,16 @@ license             MIT
</span> description         DBI package for the DuckDB database management system
 long_description    {*}${description}
 homepage            https://github.com/duckdb/duckdb-r
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums           rmd160  83751a632718218aaa8532408a8fd662dfaf3673 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    sha256  72e0b94b1cc321236fe95e0c3100017182bc5f22de816a1e18c4404b71a0cdd7 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    size    4205337
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums           rmd160  e5e356ef1c0f554960a928ec620b1a6609d5e176 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    sha256  a57eda804033f16a003443acb9939b1faa032822ff3ffb563bcd1cc7dcca0c22 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    size    4398683
</span> 
 depends_lib-append  port:R-DBI
 
 compiler.cxx_standard 2017
 
 # https://github.com/duckdb/duckdb-r/issues/152
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Partly fixed, but a patch still needed.
</span> patchfiles-append   patch-fix-cmath.diff
 
 if {${os.platform} eq "darwin" && ${os.major} < 16} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-duckdb/files/patch-Makevars.diff b/R/R-duckdb/files/patch-Makevars.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 03e112f3f09..0854b544191 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/R/R-duckdb/files/patch-Makevars.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-duckdb/files/patch-Makevars.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,11 +1,11 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/Makevars   2024-04-30 10:20:53.000000000 +0800
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/Makevars   2024-05-06 11:17:24.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/Makevars   2024-06-06 12:20:16.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/Makevars   2024-06-15 02:01:56.000000000 +0800
</span> @@ -15,5 +15,6 @@
  include Makevars.duckdb
  
  CXX_STD = CXX17
<span style='display:block; white-space:pre;background:#ffe0e0;'>--PKG_CPPFLAGS = -Iinclude -I../inst/include -DDUCKDB_DISABLE_PRINT -DDUCKDB_R_BUILD -Iduckdb/src/include -Iduckdb/third_party/concurrentqueue -Iduckdb/third_party/fast_float -Iduckdb/third_party/fastpforlib -Iduckdb/third_party/fmt/include -Iduckdb/third_party/fsst -Iduckdb/third_party/httplib -Iduckdb/third_party/hyperloglog -Iduckdb/third_party/jaro_winkler -Iduckdb/third_party/jaro_winkler/details -Iduckdb/third_party/libpg_query -Iduckdb/third_party/libpg_query/include -Iduckdb/third [...]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-PKG_CPPFLAGS = -Iinclude -I../inst/include -DDUCKDB_DISABLE_PRINT -DDUCKDB_R_BUILD -Iduckdb/src/include -Iduckdb/third_party/concurrentqueue -Iduckdb/third_party/fast_float -Iduckdb/third_party/fastpforlib -Iduckdb/third_party/fmt/include -Iduckdb/third_party/fsst -Iduckdb/third_party/httplib -Iduckdb/third_party/hyperloglog -Iduckdb/third_party/jaro_winkler -Iduckdb/third_party/jaro_winkler/details -Iduckdb/third_party/libpg_query -Iduckdb/third_party/libpg_query/include -Iduckdb/third [...]
</span> -OBJECTS=rfuns.o database.o connection.o statement.o register.o relational.o scan.o transform.o utils.o reltoaltrep.o types.o cpp11.o $(SOURCES)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+PKG_CPPFLAGS = -Iinclude -I../inst/include -DDUCKDB_DISABLE_PRINT -DDUCKDB_R_BUILD -Iduckdb/src/include -Iduckdb/third_party/concurrentqueue -Iduckdb/third_party/fast_float -Iduckdb/third_party/fastpforlib -Iduckdb/third_party/fmt/include -Iduckdb/third_party/fsst -Iduckdb/third_party/httplib -Iduckdb/third_party/hyperloglog -Iduckdb/third_party/jaro_winkler -Iduckdb/third_party/jaro_winkler/details -Iduckdb/third_party/libpg_query -Iduckdb/third_party/libpg_query/include -Iduckdb/third [...]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++PKG_CPPFLAGS = -Iinclude -I../inst/include -DDUCKDB_DISABLE_PRINT -DDUCKDB_R_BUILD -Iduckdb/src/include -Iduckdb/third_party/concurrentqueue -Iduckdb/third_party/fast_float -Iduckdb/third_party/fastpforlib -Iduckdb/third_party/fmt/include -Iduckdb/third_party/fsst -Iduckdb/third_party/httplib -Iduckdb/third_party/hyperloglog -Iduckdb/third_party/jaro_winkler -Iduckdb/third_party/jaro_winkler/details -Iduckdb/third_party/libpg_query -Iduckdb/third_party/libpg_query/include -Iduckdb/third [...]
</span> +OBJECTS = rfuns.o database.o connection.o statement.o register.o relational.o scan.o transform.o utils.o reltoaltrep.o types.o cpp11.o $(SOURCES)
 +PKG_LIBS = @LEGACY_LFLAG@ @ATOMIC@
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-duckdb/files/patch-fix-cmath.diff b/R/R-duckdb/files/patch-fix-cmath.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 6240fb42899..e57fde98c26 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/R/R-duckdb/files/patch-fix-cmath.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-duckdb/files/patch-fix-cmath.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,41 +1,6 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/rfuns.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/rfuns.cpp  2024-05-03 22:24:42.000000000 +0800
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -4,6 +4,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <math.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <climits>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#include <cmath>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- namespace duckdb {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- namespace rfuns {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -29,7 +30,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-   BinaryExecutor::ExecuteWithNulls<double, double, double>(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-       parts.lefts, parts.rights, result, args.size(), [&](double left, double right, ValidityMask &mask, idx_t idx) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--              if (isnan(left) || isnan(right)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+              if (std::isnan(left) || std::isnan(right)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                       mask.SetInvalid(idx);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                       return 0.0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-               }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -38,7 +39,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- double ExecuteBaseRPlusFunctionIntDouble(int32_t left, double right, ValidityMask &mask, idx_t idx) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--  if (isnan(right)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+  if (std::isnan(right)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-           mask.SetInvalid(idx);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-           return 0.0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-   }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -108,7 +109,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- template <>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int32_t cast<double>(double input, ValidityMask &mask, idx_t idx) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--  if (isnan(input)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+  if (std::isnan(input)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-           mask.SetInvalid(idx);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-   }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-   return check_range(input, mask, idx);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -228,7 +229,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/rfuns.cpp  2024-06-04 13:44:27.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/rfuns.cpp  2024-06-15 03:49:59.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -247,7 +247,7 @@
</span>           if (ValidityMask::AllValid(validity_entry)) {
                        // all valid: check with isnan()
                        for (; base_idx < next; base_idx++) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -44,7 +9,7 @@
</span>                   }
                } else if (ValidityMask::NoneValid(validity_entry)) {
                        // None valid:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -241,7 +242,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -260,7 +260,7 @@
</span>                   for (; base_idx < next; base_idx++) {
                                if (ValidityMask::RowIsValid(validity_entry, base_idx - start)) {
                                        D_ASSERT(mask.RowIsValid(base_idx));
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -53,12 +18,12 @@
</span>                           } else {
                                        result_data[base_idx] = true;
                                }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -627,7 +628,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -292,7 +292,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   auto result_data = ConstantVector::GetData<bool>(result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   auto ldata = ConstantVector::GetData<double>(input);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-                  *result_data = ConstantVector::IsNull(input) || isnan(*ldata);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                  *result_data = ConstantVector::IsNull(input) || std::isnan(*ldata);
</span>  
<span style='display:block; white-space:pre;background:#ffe0e0;'>- template <>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bool set_null<double>(double value, ValidityMask &mask, idx_t idx) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--  if (isnan(value)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+  if (std::isnan(value)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-           mask.SetInvalid(idx);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-           return true;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-   }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           }
</span></pre><pre style='margin:0'>

</pre>