diff -Nru orig/nloptr/src/Makevars.ucrt patched/nloptr/src/Makevars.ucrt
--- orig/nloptr/src/Makevars.ucrt	1970-01-01 01:00:00.000000000 +0100
+++ patched/nloptr/src/Makevars.ucrt	2021-02-17 19:45:41.805633900 +0100
@@ -0,0 +1,23 @@
+# Copyright (C) 2010 Jelmer Ypma. All Rights Reserved.
+# This code is published under the L-GPL.
+#
+# File:   Makevars.win
+# Author: Jelmer Ypma
+# Date:   18 August 2010
+#
+# 09 June 2011: Windows support added thanks to Stefan Theussl and Uwe Ligges.
+#               NLOPT_HOME is the directory where a working installation of 
+#               NLopt is located (within subdirectories NLOPT_VERSION/R_ARCH)
+# 18 November 2011: Removed NLOPT_VERSION macro and adopted some other changes
+#                   proposed by Brian Ripley to make nloptr work with his new toolchain.
+#                   NLopt should now be located in NLOPT_HOME/R_ARCH (i.e. without
+#                   version number)
+# 19 February 2013: NLopt is compiled with --with-cxx option, in order to include
+#                   the StoGo algorithm. This means that we now need to link to 
+#                   with -lnlopt_cxx and also link to the c++ library, -lstdc++.
+# 7 November 2013: Changed PKG_CPPFLAGS to PKG_CFLAGS.
+# 2 May 2014: Added quotes around include paths to allow for spaces in NLOPT_HOME.
+
+# C Compiler options
+PKG_CFLAGS = 
+PKG_LIBS = -lnlopt
