Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: update to hiredix 1.2.0 + arm64 support #59

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ elif [ `uname` = "Darwin" ]; then
PKG_LIBS="-L$BREWDIR/opt/$PKG_BREW_NAME/lib $PKG_LIBS"
else
curl -sfL "https://autobrew.github.io/scripts/$PKG_BREW_NAME" > autobrew
. autobrew
. ./autobrew
fi
fi

Expand Down
2 changes: 0 additions & 2 deletions src/Makevars.ucrt

This file was deleted.

9 changes: 7 additions & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# -*- makefile -*-
PKG_CPPFLAGS=-I../windows/hiredis-1.0.0/include/hiredis -DSTRICT_R_HEADERS
PKG_LIBS=-L../windows/hiredis-1.0.0/lib${R_ARCH}${CRT} -lhiredis -lws2_32
PKG_CPPFLAGS=-I../windows/hiredis/include/hiredis -DSTRICT_R_HEADERS

ifeq ($(R_COMPILED_BY),gcc 8.3.0)
LEGACY_ARCH=$(R_ARCH) # Enables 32-bit support in R 4.1
endif

PKG_LIBS=-L../windows/hiredis/lib$(LEGACY_ARCH) -lhiredis -lws2_32

all: clean winlibs

Expand Down
21 changes: 16 additions & 5 deletions tools/winlibs.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
if (!file.exists("../windows/hiredis-1.0.0/include/hiredis/hiredis.h")) {
if (getRversion() < "3.3.0") setInternet2()
download.file("https://github.com/rwinlib/hiredis/archive/v1.0.0.zip", "lib.zip", quiet = TRUE)
if(!file.exists("../windows/hiredis/include/hiredis/hiredis.h")){
unlink("../windows", recursive = TRUE)
url <- if(grepl("aarch", R.version$platform)){
"https://github.com/r-windows/bundles/releases/download/hiredis-1.2.0/hiredis-1.2.0-clang-aarch64.tar.xz"
} else if(grepl("clang", Sys.getenv('R_COMPILED_BY'))){
"https://github.com/r-windows/bundles/releases/download/hiredis-1.2.0/hiredis-1.2.0-clang-x86_64.tar.xz"
} else if(getRversion() >= "4.2") {
"https://github.com/r-windows/bundles/releases/download/hiredis-1.2.0/hiredis-1.2.0-ucrt-x86_64.tar.xz"
} else {
"https://github.com/rwinlib/hiredis/archive/v1.0.0.tar.gz"
}
download.file(url, basename(url), quiet = TRUE)
dir.create("../windows", showWarnings = FALSE)
unzip("lib.zip", exdir = "../windows")
unlink("lib.zip")
untar(basename(url), exdir = "../windows", tar = 'internal')
unlink(basename(url))
setwd("../windows")
file.rename(list.files(), 'hiredis')
}
Loading