diff -ur grass-7.8.4/lib/cairodriver/text.c ../lib/cairodriver/text.c
--- grass-7.8.4/lib/cairodriver/text.c	2020-10-05 08:39:31.000000000 +0200
+++ ../lib/cairodriver/text.c	2020-11-08 17:25:27.051487800 +0100
@@ -15,7 +15,7 @@
 #include <grass/glocale.h>
 #include "cairodriver.h"
 
-#if CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FC_FONT
 #include <cairo-ft.h>
 #include <fontconfig/fontconfig.h>
 #endif
@@ -170,7 +170,7 @@
     G_free(font);
 }
 
-#if CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FC_FONT
 
 static void fc_init(void)
 {
@@ -281,7 +281,7 @@
 */
 void Cairo_set_font(const char *name)
 {
-#if CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FC_FONT
     if (is_toy_font(name))
 	set_font_toy(name);
     else
@@ -322,7 +322,7 @@
 void Cairo_font_list(char ***list, int *count)
 {
     font_list_toy(list, count, 0);
-#if CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FC_FONT
     font_list_fc(list, count, 0);
 #endif
 }
@@ -336,8 +336,7 @@
 void Cairo_font_info(char ***list, int *count)
 {
     font_list_toy(list, count, 1);
-#if CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FC_FONT
     font_list_fc(list, count, 1);
 #endif
 }
-
diff -ur grass-7.8.4/mswindows/env.bat ../mswindows/env.bat
--- grass-7.8.4/mswindows/env.bat	2020-10-05 08:39:31.000000000 +0200
+++ ../mswindows/env.bat	2020-11-08 18:03:04.107861600 +0100
@@ -11,8 +11,6 @@
 set GDAL_DATA=%GISBASE%\share\gdal
 set GEOTIFF_CSV=%GISBASE%\share\epsg_csv
 
-set FONTCONFIG_FILE=%GISBASE%\etc\fonts.conf
-
 set PATH=%GISBASE%\extrabin;%GISBASE%\bin;%PATH%
 
 REM set RStudio temporarily to %PATH% if it exists
diff -ur grass-7.8.4/mswindows/osgeo4w/env.bat.tmpl ../mswindows/osgeo4w/env.bat.tmpl
--- grass-7.8.4/mswindows/osgeo4w/env.bat.tmpl	2020-10-05 08:39:31.000000000 +0200
+++ ../mswindows/osgeo4w/env.bat.tmpl	2020-11-08 18:01:50.115323200 +0100
@@ -2,8 +2,6 @@
 REM Environmental variables for GRASS OSGeo4W installer
 REM
 
-call "%OSGEO4W_ROOT%\bin\py3_env.bat"
-
 set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@
 
 REM Uncomment if you want to use Bash instead of Cmd
@@ -12,13 +10,3 @@
 
 set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python3.exe
 set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj
-
-set FONTCONFIG_FILE=%GISBASE%\etc\fonts.conf
-
-REM
-REM RStudio-related
-REM
-REM set RStudio temporarily to %PATH% if it exists
-IF EXIST "%ProgramFiles%\RStudio\bin\rstudio.exe" set PATH=%PATH%;%ProgramFiles%\RStudio\bin
-REM set R_USER if %USERPROFILE%\Documents\R\ exists to catch most common cases of private R libraries
-IF EXIST "%USERPROFILE%\Documents\R\" set R_USER=%USERPROFILE%\Documents\
diff -ur grass-7.8.4/mswindows/osgeo4w/package.sh ../mswindows/osgeo4w/package.sh
--- grass-7.8.4/mswindows/osgeo4w/package.sh	2020-10-05 08:39:31.000000000 +0200
+++ ../mswindows/osgeo4w/package.sh	2020-11-08 17:46:45.471455600 +0100
@@ -29,19 +29,8 @@
     PACKAGE_POSTFIX=""
 fi
 
-# OSGeo4W directory postfix
-# eg. '64' for 64bit, empty for 32bit
-if [ -z $OSGEO4W_POSTFIX ]; then
-    OSGEO4W_POSTFIX=""
-fi
-if [ "$OSGEO4W_POSTFIX" = "64" ]; then
-    MINGW_POSTFIX=64
-else
-    MINGW_POSTFIX=32
-fi
-
-export OSGEO4W_ROOT_MSYS="/c/OSGeo4W${OSGEO4W_POSTFIX}"
-export OSGEO4W_ROOT=$(cygpath -w "$OSGEO4W_ROOT_MSYS")
+[ -n "$OSGEO4W_ROOT_MSYS" ]
+echo "OSGEO4W_ROOT_MSYS:$OSGEO4W_ROOT_MSYS OSGEO4W_ROOT:$OSGEO4W_ROOT"
 
 fetchenv() {
     local IFS
@@ -56,19 +45,15 @@
     cmd.exe //c "call `cygpath -w $batch` $args \>nul 2\>nul \& set" >$dstenv
     diff -u $srcenv $dstenv | sed -f mswindows/osgeo4w/envdiff.sed >$diffenv
     . $diffenv
-    PATH=$PATH:/usr/bin:/mingw${MINGW_POSTFIX}/bin/:$PWD/mswindows/osgeo4w/lib:$PWD/mswindows/osgeo4w:/c/windows32/system32:/c/windows:/c/windows32/system32:/c/windows
+    PATH=$PATH:/usr/bin:/mingw64/bin/:$PWD/mswindows/osgeo4w/lib:$PWD/mswindows/osgeo4w:/c/windows32/system32:/c/windows:/c/windows32/system32:/c/windows
     rm -f $srcenv $dstenv $diffenv
 }
 
-# Avoid GRASS' old msys
-! [ -f $OSGEO4W_ROOT_MSYS/etc/ini/msys.bat ] || mv $OSGEO4W_ROOT_MSYS/etc/ini/msys.bat $OSGEO4W_ROOT_MSYS/etc/ini/msys.bat.off
-
 fetchenv $OSGEO4W_ROOT_MSYS/bin/o4w_env.bat
-fetchenv $OSGEO4W_ROOT_MSYS/bin/py3_env.bat
-
-! [ -f $OSGEO4W_ROOT_MSYS/etc/ini/msys.bat.off ] || mv $OSGEO4W_ROOT_MSYS/etc/ini/msys.bat.off $OSGEO4W_ROOT_MSYS/etc/ini/msys.bat
 
-PATH=/mingw${MINGW_POSTFIX}/lib/ccache/bin:$PATH
+PATH=/mingw64/lib/ccache/bin:$PATH
+echo "$0: PATH:$PATH"
+type -p gdal302.dll
 
 T0=$(date +%s)
 LT=$T0
@@ -125,42 +110,19 @@
 
 exec 3>&1 > >(tee mswindows/osgeo4w/package.log) 2>&1
 
-if [ "$MINGW_POSTFIX" = "64" ]; then
-	mingw_libgcc=libgcc_s_seh-1.dll
-else
-	mingw_libgcc=libgcc_s_dw2-1.dll
-fi
-
-DLLS="/mingw${MINGW_POSTFIX}/bin/zlib1.dll
-	/mingw${MINGW_POSTFIX}/bin/libbz2-1.dll
-	/mingw${MINGW_POSTFIX}/bin/libiconv-2.dll
-	/mingw${MINGW_POSTFIX}/bin/libexpat-1.dll
-	/mingw${MINGW_POSTFIX}/bin/libfontconfig-1.dll
-	/mingw${MINGW_POSTFIX}/bin/libintl-8.dll
-	/mingw${MINGW_POSTFIX}/bin/libsystre-0.dll
-	/mingw${MINGW_POSTFIX}/bin/libtre-5.dll
-	/mingw${MINGW_POSTFIX}/bin/libwinpthread-1.dll
-	/mingw${MINGW_POSTFIX}/bin/libcairo-2.dll
-	/mingw${MINGW_POSTFIX}/bin/libpixman-1-0.dll
-	/mingw${MINGW_POSTFIX}/bin/libpng16-16.dll
-	/mingw${MINGW_POSTFIX}/bin/libfreetype-6.dll
-	/mingw${MINGW_POSTFIX}/bin/libharfbuzz-0.dll
-	/mingw${MINGW_POSTFIX}/bin/libglib-2.0-0.dll
-	/mingw${MINGW_POSTFIX}/bin/libgraphite2.dll
-	/mingw${MINGW_POSTFIX}/bin/libpcre-1.dll
-	/mingw${MINGW_POSTFIX}/bin/libstdc++-6.dll
-	/mingw${MINGW_POSTFIX}/bin/$mingw_libgcc"
-
-if [ "$MINGW_POSTFIX" = "64" ]; then
-	conf_host=x86_64-w64-mingw32
-	# https://trac.osgeo.org/osgeo4w/ticket/550
-	conf_opts="--with-liblas=$PWD/mswindows/osgeo4w/liblas-config"
-else
-	conf_host=i386-w64-mingw32
-	# https://trac.osgeo.org/osgeo4w/ticket/539
-	#  LAS support hopefully only temporarily disabled on 32bit
-	conf_opts=
-fi
+DLLS="
+	/mingw64/bin/zlib1.dll
+	/mingw64/bin/libbz2-1.dll
+	/mingw64/bin/libiconv-2.dll
+	/mingw64/bin/libintl-8.dll
+	/mingw64/bin/libsystre-0.dll
+	/mingw64/bin/libtre-5.dll
+	/mingw64/bin/libwinpthread-1.dll
+	/mingw64/bin/libpng16-16.dll
+	/mingw64/bin/libpcre-1.dll
+	/mingw64/bin/libstdc++-6.dll
+	/mingw64/bin/libgcc_s_seh-1.dll
+"
 
 if ! [ -f mswindows/osgeo4w/configure-stamp ]; then
 	if [ -e include/Make/Platform.make ] ; then
@@ -171,17 +133,17 @@
 	log remove old logs
 	rm -f mswindows/osgeo4w/package.log.*
 
-	mkdir -p dist.$conf_host/bin
-	cp -uv $DLLS dist.$conf_host/bin
+	mkdir -p dist.x86_64-w64-mingw32/bin
+	cp -uv $DLLS dist.x86_64-w64-mingw32/bin
 
 	mkdir -p mswindows/osgeo4w/lib
 	cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/pq.lib
-	cp -uv $OSGEO4W_ROOT_MSYS/lib/proj_i.lib mswindows/osgeo4w/lib/proj.lib
 	cp -uv $OSGEO4W_ROOT_MSYS/lib/sqlite3_i.lib mswindows/osgeo4w/lib/sqlite3.lib
+	cp -uv $OSGEO4W_ROOT_MSYS/lib/cairo.lib mswindows/osgeo4w/lib/libcairo.lib
 
 	log configure
 	./configure \
-	        --host=$conf_host \
+	        --host=x86_64-w64-mingw32 \
 		--with-libs="$OSGEO4W_ROOT/lib" \
 		--with-includes=$OSGEO4W_ROOT_MSYS/include \
                 --libexecdir=$OSGEO4W_ROOT_MSYS/bin \
@@ -194,10 +156,10 @@
 		--enable-largefile \
 		--with-fftw \
 		--with-freetype \
-		--with-freetype-includes=/mingw${MINGW_POSTFIX}/include/freetype2 \
+		--with-freetype-includes=$OSGEO4W_ROOT_MSYS/include/freetype2 \
 		--with-proj-share=$OSGEO4W_ROOT_MSYS/share/proj \
 		--with-proj-includes=$OSGEO4W_ROOT_MSYS/include \
-		--with-proj-libs=$PWD/mswindows/osgeo4w/lib \
+		--with-proj-libs=$OSGEO4W_ROOT_MSYS/lib \
 		--with-postgres \
 		--with-postgres-includes=$OSGEO4W_ROOT_MSYS/include \
 		--with-postgres-libs=$PWD/mswindows/osgeo4w/lib \
@@ -211,10 +173,11 @@
 		--with-zstd \
 		--with-odbc \
 	        --with-cairo \
+		--with-cairo-includes=$OSGEO4W_ROOT_MSYS/include \
+		--with-cairo-ldflags="-L$PWD/mswindows/osgeo4w/lib -lcairo" \
 	        --with-opengl=windows \
-                --with-bzlib $conf_opts
-# see #3047
-#	        --with-mysql
+                --with-bzlib \
+		--with-liblas=$PWD/mswindows/osgeo4w/liblas-config
 
 	touch mswindows/osgeo4w/configure-stamp
 fi
@@ -267,8 +230,6 @@
 
     # copy dependencies (TODO: to be reduced)
     cp -uv $DLLS apps/grass/grass$POSTFIX/bin
-    cp -uv /mingw${MINGW_POSTFIX}/etc/fonts/fonts.conf \
-	apps/grass/grass$POSTFIX/etc
 
     # creating grass package
     /bin/tar -cjf $PDIR/grass$PACKAGE_POSTFIX-$VERSION-$PACKAGE_PATCH.tar.bz2 \
@@ -277,7 +238,6 @@
 	bin/python-${GRASS_EXECUTABLE}.bat \
 	etc/postinstall/grass${PACKAGE_POSTFIX}.bat \
 	etc/preremove/grass${PACKAGE_POSTFIX}.bat
-
 fi
 
 log
