File tree Expand file tree Collapse file tree 5 files changed +19
-12
lines changed Expand file tree Collapse file tree 5 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 5050 needs : check
5151
5252 - uses : r-lib/actions/check-r-package@v2
53+ env :
54+ MAKEFLAGS : -j4
Original file line number Diff line number Diff line change 11Package: opencv
22Type: Package
33Title: Bindings to 'OpenCV' Computer Vision Library
4- Version: 0.5.0
4+ Version: 0.5.1
55Authors@R: c(
66 person("Jeroen", "Ooms", role = c("aut", "cre"), email = "
[email protected] ",
77 comment = c(ORCID = "0000-0002-4035-0289")),
Original file line number Diff line number Diff line change 11PKG_CPPFLAGS=@cflags@
22PKG_LIBS=@libs@
3+
4+ all: cleanup
5+
6+ cleanup: $(SHLIB)
7+ @rm -Rf ../.deps
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ $(info using $(PKG_CONFIG_NAME) from Rtools)
88PKG_CPPFLAGS := $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_NAME)) $(STATIC_CFLAGS)
99OPENCVDATA := $(shell $(PKG_CONFIG) --variable=prefix $(PKG_CONFIG_NAME))/share/opencv4
1010else
11- RWINLIB = ../windows /opencv
11+ RWINLIB = ../.deps /opencv
1212PKG_CPPFLAGS = -I$(RWINLIB)/include/opencv4 $(STATIC_CFLAGS)
1313OLDLIBDIR = lib${subst gcc,,${COMPILED_BY}}${R_ARCH}
1414PKG_LIBS = \
@@ -21,16 +21,16 @@ PKG_LIBS = \
2121OPENCVDATA = $(RWINLIB)/share
2222endif
2323
24- all: $(SHLIB) copydata
24+ all: copydata
2525
26- $(OBJECTS): $(RWINLIB)
26+ $(OBJECTS): | $(RWINLIB)
2727
2828$(RWINLIB):
2929 "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
3030
31- copydata:
31+ copydata: | $(RWINLIB)
3232 rm -Rf ../inst/share && mkdir -p ../inst
3333 cp -Rf $(OPENCVDATA) ../inst/share
3434
35- clean:
36- rm -f $(SHLIB) $(OBJECTS )
35+ cleanup: $(SHLIB)
36+ @ rm -Rf $(RWINLIB )
Original file line number Diff line number Diff line change 1- if (! file.exists(" ../windows /opencv/include/opencv4/opencv2/opencv.hpp" )){
2- unlink(" ../windows " , recursive = TRUE )
1+ if (! file.exists(" ../.deps /opencv/include/opencv4/opencv2/opencv.hpp" )){
2+ unlink(" ../.deps " , recursive = TRUE )
33 url <- if (grepl(" aarch" , R.version $ platform )){
44 " https://github.com/r-windows/bundles/releases/download/opencv-4.8.1/opencv-4.8.1-clang-aarch64.tar.xz"
55 } else if (grepl(" clang" , Sys.getenv(' R_COMPILED_BY' ))){
@@ -10,9 +10,9 @@ if(!file.exists("../windows/opencv/include/opencv4/opencv2/opencv.hpp")){
1010 " https://github.com/rwinlib/opencv/archive/refs/tags/v4.8.1.tar.gz"
1111 }
1212 download.file(url , basename(url ), quiet = TRUE )
13- dir.create(" ../windows " , showWarnings = FALSE )
14- untar(basename(url ), exdir = " ../windows " , tar = ' internal' )
13+ dir.create(" ../.deps " , showWarnings = FALSE )
14+ untar(basename(url ), exdir = " ../.deps " , tar = ' internal' )
1515 unlink(basename(url ))
16- setwd(" ../windows " )
16+ setwd(" ../.deps " )
1717 file.rename(list.files(), ' opencv' )
1818}
You can’t perform that action at this time.
0 commit comments