Skip to content

Commit

Permalink
version 2023.8.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
doccstat authored and cran-robot committed Oct 1, 2023
1 parent 9f1f037 commit 390f904
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 20 deletions.
8 changes: 5 additions & 3 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Type: Package
Package: abseil
Title: 'C++' Header Files from 'Abseil'
Version: 2023.8.2.0
Version: 2023.8.2.1
Authors@R: c(
person("Xingchi", "Li", , "anthony.li@stat.tamu.edu", role = c("ctb", "cre", "cph"),
comment = c(ORCID = "0009-0006-2493-0853")),
Expand All @@ -15,10 +15,12 @@ License: Apache License (>= 2)
Suggests: Rcpp
Encoding: UTF-8
RoxygenNote: 7.2.3
URL: https://abseil.xingchi.li, https://github.com/doccstat/abseil-r
BugReports: https://github.com/doccstat/abseil-r/issues
NeedsCompilation: no
Packaged: 2023-09-30 15:16:20 UTC; doccstat
Packaged: 2023-10-01 18:38:17 UTC; doccstat
Author: Xingchi Li [ctb, cre, cph] (<https://orcid.org/0009-0006-2493-0853>),
Abseil Team [aut, cph]
Maintainer: Xingchi Li <anthony.li@stat.tamu.edu>
Repository: CRAN
Date/Publication: 2023-10-01 16:40:13 UTC
Date/Publication: 2023-10-01 22:50:02 UTC
18 changes: 9 additions & 9 deletions MD5
@@ -1,9 +1,9 @@
420d4480d3d29aa6c405b58842f8ce7f *DESCRIPTION
8cc6ab89c352b0d16d218d3eb15695f3 *DESCRIPTION
dc21c19f0d6968ee25d441b2cf46017d *NAMESPACE
db68c01222168a014a5a1f8cf04d56bc *NEWS.md
466c7c9d06489af94ea3d8f33e0f3c94 *R/abseil.R
e73200e27c0144115377fdb50dd07c21 *README.md
917fccde1402f755105e227b8a3ca421 *inst/CITATION
7e6ee17619868d738c2683178273534c *NEWS.md
b75f4388b7f015caa32d9b71b52496ea *R/abseil.R
e45c96e832b0613958fc262b7f9b3c67 *README.md
75ff2b6b4fc1c1c6c7048398be116998 *inst/CITATION
6671c48969b210874702496cb853fcd3 *inst/include/absl/BUILD.bazel
9c6b62d3e3da11e3a81201d6a99d4c1a *inst/include/absl/CMakeLists.txt
2de898606511ac75b6cb508796e6110b *inst/include/absl/abseil.podspec.gen.py
Expand All @@ -21,7 +21,7 @@ c0d6f03af34157221b4c2e95f013852b *inst/include/absl/base/bit_cast_test.cc
81d05c7c54c395a443e245424950a754 *inst/include/absl/base/call_once.h
e0c86c4e83f1ea235ace6dbba243a28a *inst/include/absl/base/call_once_test.cc
a3c3c3c975cbf041e0c20f18b3d24246 *inst/include/absl/base/casts.h
10c04780af3fd448a559a1d8ed4a272e *inst/include/absl/base/config.h
3c24c1212041ce3f69bafcd3467bbf18 *inst/include/absl/base/config.h
1670845d7760644679ed90a42c4b6969 *inst/include/absl/base/config_test.cc
f787189f34e273f4314344b53f5ccae9 *inst/include/absl/base/const_init.h
b0a7ef61570e527723bb5993405558a8 *inst/include/absl/base/dynamic_annotations.h
Expand Down Expand Up @@ -81,7 +81,7 @@ c539936fcdd6094a16fdd58a1f56710e *inst/include/absl/base/internal/spinlock.h
8c75ee873aa3e514edd1390f3056f89a *inst/include/absl/base/internal/strerror.h
b4089cfb74709d9a2612e0dc47988b4e *inst/include/absl/base/internal/strerror_benchmark.cc
7a70551f9fef351177f3ef7167bd6851 *inst/include/absl/base/internal/strerror_test.cc
7d8cbe8fbbdd112864f27603815fd36a *inst/include/absl/base/internal/sysinfo.cc
c8063c0d03642361b15a17ac27fd9818 *inst/include/absl/base/internal/sysinfo.cc
89920866f6792bd96338cb6f9587f3a9 *inst/include/absl/base/internal/sysinfo.h
c2821efb081724fadeb03ca642f3f227 *inst/include/absl/base/internal/sysinfo_test.cc
0bd2e8070750adf4fd964cf55411bcf4 *inst/include/absl/base/internal/thread_annotations.h
Expand Down Expand Up @@ -766,7 +766,7 @@ e73298b63659e21f9fc6c39b70892874 *inst/include/absl/synchronization/internal/sem
62414a3dde6e79aabae3a8647ee9de9b *inst/include/absl/synchronization/internal/stdcpp_waiter.cc
8ec80402cc06d55fe1438ac22e78cc17 *inst/include/absl/synchronization/internal/stdcpp_waiter.h
6ef821ff0e894111c9eafae3e1e6d1c4 *inst/include/absl/synchronization/internal/thread_pool.h
b7635fefdd56ffcecbb9a2582847270c *inst/include/absl/synchronization/internal/waiter.h
6010ff1c571812ffde7709b795330a31 *inst/include/absl/synchronization/internal/waiter.h
8450035424b87b1063bb24d0c0d4d6cf *inst/include/absl/synchronization/internal/waiter_base.cc
6b90e0bd52463d42eb37150271809f88 *inst/include/absl/synchronization/internal/waiter_base.h
7bf5283d30903b97d6729ff483524012 *inst/include/absl/synchronization/internal/waiter_test.cc
Expand Down Expand Up @@ -1473,4 +1473,4 @@ ece611a6ca6c9ccf9c28650ea2c099c0 *inst/include/absl/utility/BUILD.bazel
df8159480b75d1f54ac378d666c8bd22 *inst/include/absl/utility/internal/if_constexpr_test.cc
9b15fdb150cb72ea63d34d08fffd39c2 *inst/include/absl/utility/utility.h
514dfcb1b92275af6b1525a9cd1cb1eb *inst/include/absl/utility/utility_test.cc
e01216f29de5cf8f9b3bff9f731ef611 *man/abseil-package.Rd
34c82647d17cbf6a951eeca29ddb4d9a *man/abseil-package.Rd
6 changes: 6 additions & 0 deletions NEWS.md
@@ -1,3 +1,9 @@
# abseil 2023.8.2.1

* Import Abseil LTS version 20230802.1.
* abseil-cpp changes:
https://github.com/abseil/abseil-cpp/releases/tag/20230802.1

# abseil 2023.8.2.0

* Import Abseil LTS version 20230802.0
Expand Down
3 changes: 3 additions & 0 deletions R/abseil.R
Expand Up @@ -8,12 +8,15 @@
#' @name abseil
#' @rdname abseil-package
#' @examples
#' \donttest{
#' Rcpp::cppFunction(r"{
#' #include "absl/strings/str_join.h"
#' std::string joinString() {
#' std::vector<std::string> v = {"foo","bar","baz"};
#' return absl::StrJoin(v, "-");
#' }
#' }", depends = "abseil")
#'
#' joinString()
#' }
NULL
77 changes: 71 additions & 6 deletions README.md
Expand Up @@ -3,11 +3,15 @@

# abseil: Abseil Headers for R

[![CRAN
status](https://www.r-pkg.org/badges/version-last-release/abseil)](https://cran.r-project.org/package=abseil)
[![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/abseil)](https://cran.r-project.org/package=abseil)
[![R-CMD-check](https://github.com/doccstat/abseil-r/workflows/R-CMD-check/badge.svg)](https://github.com/doccstat/abseil-r/actions)
[![Last
Commit](https://img.shields.io/github/last-commit/doccstat/abseil-r)](https://github.com/doccstat/abseil-r)
[![r-universe](https://doccstat.r-universe.dev/badges/abseil)](https://doccstat.r-universe.dev)

### Synopsis
## Synopsis

This package provides [R](https://www.r-project.org) with access to
[Abseil](https://abseil.io) header files.
Expand All @@ -19,21 +23,65 @@ It can be used via the `LinkingTo:` field in the `DESCRIPTION` field of
an R package — and the R package infrastructure tools will then know how
to set include flags correctly on all architectures supported by R.

### Installation
## Installation

``` r
# Install from CRAN
install.packages("abseil")
```

<details close>
<summary>
Development version
</summary>

``` r
# Development version from r-universe with CRAN version as a fallback
install.packages(
"abseil",
repos = c("https://doccstat.r-universe.dev", "https://cloud.r-project.org")
)

## install.packages("pak")
pak::pak("doccstat/abseil-r")

## install.packages("devtools")
devtools::install_github("doccstat/abseil-r")
```

### Example
</details>

## Example

<details open>
<summary>
Directly usage in R
</summary>

``` r
Rcpp::cppFunction(r"{
#include "absl/strings/str_join.h"
std::string joinString() {
std::vector<std::string> v = {"foo","bar","baz"};
return absl::StrJoin(v, "-");
}
}", depends = "abseil")

joinString()
#> [1] "foo-bar-baz"
```

</details>
<details close>
<summary>
Usage in Rcpp package
</summary>

``` cpp
#include <Rcpp.h>
// [[Rcpp::depends(abseil)]]
#include "absl/strings/str_join.h"

//' @export
// [[Rcpp::export]]
std::string joinString() {
std::vector<std::string> v = {"foo","bar","baz"};
Expand All @@ -44,9 +92,26 @@ std::string joinString() {
Bare minimum R package using the `abseil` package can be found at
[doccstat/abseil-r-example](https://github.com/doccstat/abseil-r-example).

### Authors
</details>

## Authors

Abseil Team, Xingchi Li

## Contact us

For bugs related to Abseil logistics, please report the issue to the
official [Abseil GitHub Repo](https://github.com/abseil/abseil-cpp).

1. File a ticket at [GitHub
Issues](https://github.com/doccstat/abseil-r/issues).
2. Contact the authors specified in
[DESCRIPTION](https://github.com/doccstat/abseil-r/blob/main/DESCRIPTION#L5-L9).

## Stargazers over time

Xingchi (Anthony) Li
[![Stargazers over
time](https://starchart.cc/doccstat/abseil-r.svg)](https://starchart.cc/doccstat/abseil-r)

## License

Expand Down
3 changes: 2 additions & 1 deletion inst/CITATION
Expand Up @@ -3,7 +3,8 @@ bibentry(
title = "abseil: C++ Header Files from Abseil",
author = c(
person("Xingchi", "Li", , "anthony.li@stat.tamu.edu", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0009-0006-2493-0853"))
comment = c(ORCID = "0009-0006-2493-0853")),
person("Abseil Team", role = c("aut", "cph"))
),
year = 2023,
note = sprintf("R package version %s", meta$Version),
Expand Down
2 changes: 1 addition & 1 deletion inst/include/absl/base/config.h
Expand Up @@ -112,7 +112,7 @@
// LTS releases can be obtained from
// https://github.com/abseil/abseil-cpp/releases.
#define ABSL_LTS_RELEASE_VERSION 20230802
#define ABSL_LTS_RELEASE_PATCH_LEVEL 0
#define ABSL_LTS_RELEASE_PATCH_LEVEL 1

// Helper macro to convert a CPP variable to a string literal.
#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
Expand Down
20 changes: 20 additions & 0 deletions inst/include/absl/base/internal/sysinfo.cc
Expand Up @@ -34,6 +34,14 @@
#include <sys/sysctl.h>
#endif

#ifdef __FreeBSD__
#include <pthread_np.h>
#endif

#ifdef __NetBSD__
#include <lwp.h>
#endif

#if defined(__myriad2__)
#include <rtems.h>
#endif
Expand Down Expand Up @@ -432,6 +440,18 @@ pid_t GetTID() {
return static_cast<pid_t>(tid);
}

#elif defined(__FreeBSD__)

pid_t GetTID() { return static_cast<pid_t>(pthread_getthreadid_np()); }

#elif defined(__OpenBSD__)

pid_t GetTID() { return getthrid(); }

#elif defined(__NetBSD__)

pid_t GetTID() { return static_cast<pid_t>(_lwp_self()); }

#elif defined(__native_client__)

pid_t GetTID() {
Expand Down
2 changes: 2 additions & 0 deletions inst/include/absl/synchronization/internal/waiter.h
Expand Up @@ -40,6 +40,8 @@
#define ABSL_WAITER_MODE ABSL_WAITER_MODE_SEM
#elif defined(ABSL_INTERNAL_HAVE_PTHREAD_WAITER)
#define ABSL_WAITER_MODE ABSL_WAITER_MODE_CONDVAR
#elif defined(ABSL_INTERNAL_HAVE_STDCPP_WAITER)
#define ABSL_WAITER_MODE ABSL_WAITER_MODE_STDCPP
#else
#error ABSL_WAITER_MODE is undefined
#endif
Expand Down
3 changes: 3 additions & 0 deletions man/abseil-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 390f904

Please sign in to comment.