Skip to content

Commit e90f403

Browse files
authored
Merge 7d9e3e0 into 8dbd1b8
2 parents 8dbd1b8 + 7d9e3e0 commit e90f403

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.github/workflows/check-standard.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ jobs:
4040
http-user-agent: ${{ matrix.config.http-user-agent }}
4141
use-public-rspm: true
4242

43-
- name: Install openssl (MacOS)
43+
- name: Debug OSX
4444
if: runner.os == 'MacOS'
4545
run: |
46-
brew reinstall pkg-config openssl@1.1
47-
echo "$PKG_CONFIG_PATH"
48-
export PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig
49-
echo "$PKG_CONFIG_PATH"
50-
pkg-config --cflags openssl
46+
brew --prefix openssl@1.1 || true
47+
ls $(brew --prefix openssl@1.1) || true
48+
brew install openssl@1.1
49+
brew --prefix openssl@1.1 || true
50+
ls $(brew --prefix openssl@1.1) || true
51+
ls /opt/homebrew/opt/openssl@1.1 || true
5152
5253
- uses: r-lib/actions/setup-r-dependencies@v1
5354
with:

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# s2 (development version)
22

3+
- Fix for s2 build on Windows with R <= 3.6.x (#142)
4+
35
# s2 1.0.7
46

57
- Update the internal copy of s2geometry to use updated Abseil,

configure

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ elif [ "$PKGCONFIG_CFLAGS" ] || [ "$PKGCONFIG_LIBS" ]; then
3333
elif [ `uname` = "Darwin" ]; then
3434
brew --version 2>/dev/null
3535
if [ $? -eq 0 ]; then
36-
BREWDIR=`brew --prefix`
37-
PKG_CFLAGS="-I$BREWDIR/opt/openssl/include"
38-
PKG_LIBS="-L$BREWDIR/opt/openssl/lib $PKG_LIBS"
36+
BREWDIR=`brew --prefix openssl@1.1`
37+
PKG_CFLAGS="-I$BREWDIR/include"
38+
PKG_LIBS="-L$BREWDIR/lib $PKG_LIBS"
3939
else
4040
curl -sfL "https://autobrew.github.io/scripts/$PKG_BREW_NAME" > autobrew
4141
. autobrew

src/Makevars.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PKG_CPPFLAGS = -DS2_USE_EXACTFLOAT -D_USE_MATH_DEFINES -DNDEBUG -DIS_LITTLE_ENDIAN -I../windows/openssl-1.1.1k/include -I../src
1+
PKG_CPPFLAGS = -DS2_USE_EXACTFLOAT -D_USE_MATH_DEFINES -DNDEBUG -DIS_LITTLE_ENDIAN -DOMIT_STRPTIME -I../windows/openssl-1.1.1k/include -I../src
22
PKG_LIBS = -Ls2 -ls2static -L../windows/openssl-1.1.1k/lib${R_ARCH}${CRT} -lssl -lcrypto -lcrypt32 -lws2_32
33

44
CXX_STD = CXX11

src/absl/time/internal/cctz/src/time_zone_format.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace detail {
5656

5757
namespace {
5858

59-
#if !HAS_STRPTIME
59+
#if !HAS_STRPTIME && !defined(OMIT_STRPTIME)
6060
// Build a strptime() using C++11's std::get_time().
6161
char* strptime(const char* s, const char* fmt, std::tm* tm) {
6262
std::istringstream input(s);
@@ -67,6 +67,13 @@ char* strptime(const char* s, const char* fmt, std::tm* tm) {
6767
}
6868
#endif
6969

70+
#if defined(OMIT_STRPTIME)
71+
// Dummy version of strptime() (not needed for s2 and not accessible via old rtools)
72+
char* strptime(const char* s, const char* fmt, std::tm* tm) {
73+
return (char*) s;
74+
}
75+
#endif
76+
7077
// Convert a cctz::weekday to a tm_wday value (0-6, Sunday = 0).
7178
int ToTmWday(weekday wd) {
7279
switch (wd) {

0 commit comments

Comments
 (0)