Commit a7051f6a authored by Jean-Francois Rey's avatar Jean-Francois Rey
Browse files

add rwinlib libdal download

parent 0e086ca4
Pipeline #683 passed with stages
in 45 minutes and 16 seconds
......@@ -2,8 +2,8 @@ Package: landsepi
Type: Package
Encoding: UTF-8
Title: Landscape Epidemiology and Evolution
Version: 0.0.7
Date: 2019-01-14
Version: 0.0.8
Date: 2019-10-04
Authors@R: c(person("Loup", "Rimbaud", role = "aut", email = "loup.rimbaud@inra.fr"),
person("Julien", "Papaix", role = "aut", email = "julien.papaix@inra.fr"),
person("Jean-Francois", "Rey", role = "cre", email = "jean-francois.rey@inra.fr"))
......
......@@ -36,8 +36,8 @@
#' @details \tabular{ll}{
#' Package: \tab landsepi\cr
#' Type: \tab Package\cr
#' Version: \tab 0.0.7\cr
#' Date: \tab 2019-01-14\cr
#' Version: \tab 0.0.8\cr
#' Date: \tab 2019-10-04\cr
#' License: \tab GPL (>=2)\cr
#' }
#'
......
#include Makeconf.win
VERSION = 2.2.3
COMPILED_BY ?= gcc-4.6.3
RWINLIB = ../windows/gdal2-$(VERSION)
TARGET = lib$(subst gcc,,$(COMPILED_BY))$(R_ARCH)
PKG_CPPFLAGS =\
-I$(RWINLIB)/include/gdal \
-I$(RWINLIB)/include/geos \
-I$(RWINLIB)/include/proj \
-DNDEBUG -DGDAL_VERSION=2
PKG_LIBS = \
-L$(RWINLIB)/$(TARGET) \
-L$(RWINLIB)/lib$(R_ARCH) \
-lgdal -lsqlite3 -lspatialite -lproj -lgeos_c -lgeos \
-ljson-c -lnetcdf -lmariadbclient -lpq -lintl -lwebp -lcurl -lssh2 -lssl -lcrypto \
-lkea -lhdf5_cpp -lhdf5_hl -lhdf5 -lexpat -lfreexl -lcfitsio \
-lmfhdf -ldf -lxdr \
-lopenjp2 -ljasper -lpng16 -ljpeg -ltiff -lgeotiff -lgif -lxml2 -llzma -lszip -lz \
-lodbc32 -lodbccp32 -liconv -lpsapi -lws2_32 -lcrypt32 -lwldap32 -lsecur32 -lgdi32 \
-lgsl -lgslcblas
all: clean winlibs
#CXX_STD = CXX11
GDAL_INC_DIR=$(GDAL_HOME)/include
GDAL_LIB_DIR=$(GDAL_HOME)/lib
PKG_CPPFLAGS=-I$(GDAL_INC_DIR) -I$(LIB_GSL)/include
ifeq "$(WIN)" "64"
PKG_LIBS=-L$(LIB_GSL)/lib/x64 -lgsl -lgslcblas -L$(GDAL_LIB_DIR)/x64 -lgdal -lproj -lexpat -lsqlite3 -lodbc32 -lodbccp32 -liconv -lws2_32
else
PKG_LIBS=-L$(LIB_GSL)/lib/i386 -lgsl -lgslcblas -L$(GDAL_LIB_DIR)/i386 -lgdal -lproj -lexpat -lsqlite3 -lodbc32 -lodbccp32 -liconv -lws2_32
endif
PKG_CPPFLAGS = -DNDEBUG -DGDAL_VERSION=1
#PKG_LIBS = \
# -lgsl \
# -lgdal -lsqlite3 -lspatialite -lproj -lgeos_c -lgeos \
# -ljson-c -lnetcdf -lpq -lintl -lwebp -lcurl -lssh2 -lssl -lcrypto \
# -lhdf5_hl -lhdf5 -lexpat -lfreexl -lcfitsio \
# -lpng16 -ljpeg -ltiff -lgeotiff -lgif -lxml2 -llzma -lszip -lz \
# -lodbc32 -lodbccp32 -liconv -lpsapi -lws2_32 -lcrypt32 -lwldap32 -lsecur32 -lgdi32
winlibs:
mkdir -p ../inst
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" --vanilla "../tools/winlibs.R" $(VERSION)
cp -r $(RWINLIB)/share/gdal ../inst/
cp -r $(RWINLIB)/share/proj ../inst/
clean:
rm -f $(SHLIB) $(OBJECTS)
.PHONY: all winlibs clean
if(getRversion() < "3.3.0") {
stop("Your version of R is too old. This package requires R-3.3.0 or newer on Windows.")
}
# For details see: https://github.com/rwinlib/gdal2
VERSION <- commandArgs(TRUE)
if(!file.exists(sprintf("../windows/gdal2-%s/include/gdal/gdal.h", VERSION))){
if(getRversion() < "3.3.0") setInternet2()
download.file(sprintf("https://github.com/rwinlib/gdal2/archive/v%s.zip", VERSION), "lib.zip", quiet = TRUE)
dir.create("../windows", showWarnings = FALSE)
unzip("lib.zip", exdir = "../windows")
unlink("lib.zip")
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment