Binary files orig/gdalcubes/src/.Makevars.ucrt.swp and patched/gdalcubes/src/.Makevars.ucrt.swp differ
diff -Nru orig/gdalcubes/src/Makevars.ucrt patched/gdalcubes/src/Makevars.ucrt
--- orig/gdalcubes/src/Makevars.ucrt	2023-04-12 14:02:53.000000000 +0200
+++ patched/gdalcubes/src/Makevars.ucrt	2023-10-10 11:49:02.302936800 +0200
@@ -50,7 +50,8 @@
 
 LIBSHARPYUV = $(or $(and $(wildcard $(R_TOOLS_SOFT)/lib/libsharpyuv.a),-lsharpyuv),)
 
-PKG_LIBS = \
+ifeq (,$(shell pkg-config --version 2>/dev/null))
+  PKG_LIBS = \
   -fopenmp -lgdal -larmadillo -lopenblas -lgfortran -lquadmath -lpq -lpgcommon -lpgport -lodbc32 \
   -lodbccp32 -lblosc -lkea -lhdf5_cpp -lhdf5 -lpoppler -llcms2 -lfreetype -lharfbuzz -lfreetype -llz4 \
   -lpcre2-8 -lxml2 -lopenjp2 -lnetcdf -lmysqlclient -lspatialite -lgeos_c -lgeos -lminizip -lgeos \
@@ -59,7 +60,9 @@
   -lcurl -lbcrypt -lrtmp -lssl -lssh2 -lidn2 -lunistring -liconv -lgcrypt -lcrypto -lgpg-error \
   -lws2_32 -ltiff -llzma -ljpeg -lz -lcfitsio -lzstd -lwebpdecoder -lwebp $(LIBSHARPYUV) -lsbml-static -lgeotiff \
   -lproj -lsqlite3 -lbz2 -lcrypt32 -lwldap32 -lsecur32
-
+else
+  PKG_LIBS = $(shell pkg-config --libs netcdf sqlite3 gdal)
+endif
 
 all: clean winlibs
 
