Skip to content

Commit 463c7e9

Browse files
committed
Update fallback libs
1 parent 83f7351 commit 463c7e9

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

Diff for: DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: xml2
22
Title: Parse XML
3-
Version: 1.3.7
3+
Version: 1.3.7.9000
44
Authors@R: c(
55
person("Hadley", "Wickham", role = "aut"),
66
person("Jim", "Hester", role = "aut"),

Diff for: src/Makevars.win

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ ifneq ($(PKG_LIBS),)
77
$(info using $(PKG_CONFIG_NAME) from Rtools)
88
PKG_CPPFLAGS := $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_NAME)) $(STATIC_CFLAGS)
99
else
10-
RWINLIB = ../windows/libxml2-2.10.3
10+
RWINLIB = ../windows/libxml2
1111
PKG_CPPFLAGS = -I$(RWINLIB)/include -I$(RWINLIB)/include/libxml2 $(STATIC_CFLAGS)
12-
PKG_LIBS = -L$(RWINLIB)/lib${subst gcc,,$(COMPILED_BY)}$(R_ARCH) \
13-
-L$(RWINLIB)/lib$(R_ARCH) -lxml2 -llzma -liconv -lz -lws2_32
12+
PKG_LIBS = -L$(RWINLIB)/lib$(subst gcc,,$(COMPILED_BY))$(R_ARCH) -L$(RWINLIB)/lib \
13+
-lxml2 -llzma -liconv -lz -lws2_32
1414
endif
1515

1616
all: $(SHLIB)

Diff for: tools/winlibs.R

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
# Build against static libraries from rwinlib
2-
if(!file.exists("../windows/libxml2-2.10.3/include/libxml2/libxml/parser.h")){
3-
download.file("https://github.com/rwinlib/libxml2/archive/v2.10.3.zip", "lib.zip", quiet = TRUE)
1+
if(!file.exists("../windows/libxml2/include/libxml2/libxml")){
2+
unlink("../windows", recursive = TRUE)
3+
url <- if(grepl("aarch", R.version$platform)){
4+
"https://github.com/r-windows/bundles/releases/download/libxml2-2.11.5/libxml2-2.11.5-clang-aarch64.tar.xz"
5+
} else if(grepl("clang", Sys.getenv('R_COMPILED_BY'))){
6+
"https://github.com/r-windows/bundles/releases/download/libxml2-2.11.5/libxml2-2.11.5-clang-x86_64.tar.xz"
7+
} else if(getRversion() >= "4.2") {
8+
"https://github.com/r-windows/bundles/releases/download/libxml2-2.11.5/libxml2-2.11.5-ucrt-x86_64.tar.xz"
9+
} else {
10+
"https://github.com/rwinlib/libxml2/archive/v2.10.3.tar.gz"
11+
}
12+
download.file(url, basename(url), quiet = TRUE)
413
dir.create("../windows", showWarnings = FALSE)
5-
unzip("lib.zip", exdir = "../windows")
6-
unlink("lib.zip")
14+
untar(basename(url), exdir = "../windows", tar = 'internal')
15+
unlink(basename(url))
16+
setwd("../windows")
17+
file.rename(list.files(), 'libxml2')
718
}

0 commit comments

Comments
 (0)