Skip to content

Commit

Permalink
Windows: update to mariadbcient 2.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Dec 30, 2018
1 parent 3a7febe commit f9c6377
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 45 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: RMySQL
Version: 0.10.15
Version: 0.10.16
Title: Database Interface and 'MySQL' Driver for R
Description: Legacy 'DBI' interface to 'MySQL' / 'MariaDB' based on old code
ported from S-PLUS. A modern 'MySQL' client based on 'Rcpp' is available
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Version 0.10.16

* Windows: Update mariadbclient to v2.3.7 + OpenSSL 1.1.1
* Fix for MySQL 8 (issue #223)

# Version 0.10.15

* Windows: Update mariadbclient to v 2.3.5
Expand Down
18 changes: 11 additions & 7 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
PKG_CPPFLAGS= -I../windows/libmariadbclient-2.3.5/include/mariadb
PKG_LIBS= -L../windows/libmariadbclient-2.3.5/lib${R_ARCH} \
-lmariadbclient -lssl -lcrypto -lgdi32 -lz -lws2_32 -pthread
VERSION = 2.3.7
RWINLIB = ../windows/libmariadbclient-$(VERSION)

all: clean winlibs
CXX_STD=CXX11
PKG_CPPFLAGS = -I$(RWINLIB)/include/mariadb
PKG_LIBS= -L$(RWINLIB)/lib${R_ARCH} \
-lmariadbclient -lssl -lcrypto -lcrypt32 -lgdi32 -lz -lws2_32 -pthread

winlibs:
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
all: clean winlibs

clean:
rm -f $(OBJECTS) $(SHLIB)
rm -f $(SHLIB) $(OBJECTS)

winlibs:
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" $(VERSION)
33 changes: 0 additions & 33 deletions tools/mysql-connector-c.rb

This file was deleted.

8 changes: 4 additions & 4 deletions tools/winlibs.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Link against mariadb native client static libraries
# Info and source code: https://downloads.mariadb.org/client-native/
if(!file.exists("../windows/libmariadbclient-2.3.5/include/mariadb/mysql.h")){
# Link against libmariadbclient static libraries
VERSION <- commandArgs(TRUE)
if(!file.exists(sprintf("../windows/libmariadbclient-%s/include/mariadb/mysql.h", VERSION))){
if(getRversion() < "3.3.0") setInternet2()
download.file("https://github.com/rwinlib/libmariadbclient/archive/v2.3.5.zip", "lib.zip")
download.file(sprintf("https://github.com/rwinlib/libmariadbclient/archive/v%s.zip", VERSION), "lib.zip", quiet = TRUE)
dir.create("../windows", showWarnings = FALSE)
unzip("lib.zip", exdir = "../windows")
unlink("lib.zip")
Expand Down

0 comments on commit f9c6377

Please sign in to comment.