diff -Nru orig/gslnls/cleanup.win patched/gslnls/cleanup.win
--- orig/gslnls/cleanup.win	2024-02-23 22:10:08.000000000 +0100
+++ patched/gslnls/cleanup.win	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#! /bin/sh
-rm -f src/*.o src/*.so src/Makevars.win src/symbols.rds \
-       *~ */*~
-exit 0
diff -Nru orig/gslnls/configure.win patched/gslnls/configure.win
--- orig/gslnls/configure.win	2024-04-24 13:52:06.000000000 +0200
+++ patched/gslnls/configure.win	1970-01-01 01:00:00.000000000 +0100
@@ -1,47 +0,0 @@
-#!/usr/bin/env sh
-
-: ${R_HOME=`R RHOME`}
-if test -z "${R_HOME}"; then
-  echo "could not determine R_HOME"
-  exit 1
-fi
-CC=`"${R_HOME}/bin/R" CMD config CC`
-CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
-LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS`
-R_VER=`"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" --vanilla -e "cat(paste0(version[['major']], as.integer(version[['minor']])))"`
-
-# Set LIB_GSL for gh-actions and r-winbuilder
-if [ -z "${LIB_GSL}" ]; then
-  if [ "${R_VER}" = '42' ] && [ -n "${RTOOLS42_HOME}" ] && [ -f "${RTOOLS42_HOME}/x86_64-w64-mingw32.static.posix/lib/libgsl.a" ]; then
-    echo "** LIB_GSL is missing, detected GSL installation in ${RTOOLS42_HOME}"
-    LIB_GSL="${RTOOLS42_HOME}/x86_64-w64-mingw32.static.posix"
-  elif [ "${R_VER}" = '43' ] && [ -n "${RTOOLS43_HOME}" ] && [ -f "${RTOOLS43_HOME}/x86_64-w64-mingw32.static.posix/lib/libgsl.a" ]; then
-    echo "** LIB_GSL is missing, detected GSL installation in ${RTOOLS43_HOME}"
-    LIB_GSL="${RTOOLS43_HOME}/x86_64-w64-mingw32.static.posix"
-  elif [ "${R_VER}" = '44' -o "${R_VER}" = '45' ] && [ -n "${RTOOLS44_HOME}" ] && [ -f "${RTOOLS44_HOME}/x86_64-w64-mingw32.static.posix/lib/libgsl.a" ]; then
-    echo "** LIB_GSL is missing, detected GSL installation in ${RTOOLS44_HOME}"
-    LIB_GSL="${RTOOLS44_HOME}/x86_64-w64-mingw32.static.posix"
-  else
-    echo "------------------------- LIBGSL ERROR ---------------------------------"
-    echo "Configuration failed because environment variable LIB_GSL was not found."
-    echo "Set variable LIB_GSL to the parent of the directory containing libgsl.a,"
-    echo "for instance \${RTOOLS43_HOME}/x86_64-w64-mingw32.static.posix. Note the"
-    echo "use of forward instead of backward slashes in the directory path. If GSL"
-    echo "(>= 2.2) is not yet installed, preferably install GSL using the Rtools"
-    echo "package manager, e.g. pacman -S mingw-w64-{i686,x86_64}-gsl. (See the"
-    echo "Rtools documentation for additional details)."
-    echo "------------------------------------------------------------------------"
-    exit 1;
-  fi
-fi
-
-# Use LIB_GSL for header and linker arguments
-GSL_CFLAGS='-I"${LIB_GSL}/include"'
-GSL_LIBS='-L${LIB_GSL}/lib -lgsl -lgslcblas'
-
-sed \
-  -e "s|@GSL_CFLAGS@|${GSL_CFLAGS}|" \
-  -e "s|@GSL_LIBS@|${GSL_LIBS}|" \
-  src/Makevars.win.in > src/Makevars.win
-
-exit 0
diff -Nru orig/gslnls/src/Makevars.win patched/gslnls/src/Makevars.win
--- orig/gslnls/src/Makevars.win	1970-01-01 01:00:00.000000000 +0100
+++ patched/gslnls/src/Makevars.win	2024-04-30 08:32:27.797738000 +0200
@@ -0,0 +1,2 @@
+PKG_LIBS = -lgsl -lgslcblas -lm
+
diff -Nru orig/gslnls/src/Makevars.win.in patched/gslnls/src/Makevars.win.in
--- orig/gslnls/src/Makevars.win.in	2024-02-23 22:10:08.000000000 +0100
+++ patched/gslnls/src/Makevars.win.in	1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-
-# set by configure.win
-GSL_CFLAGS = @GSL_CFLAGS@
-GSL_LIBS   = @GSL_LIBS@
-
-# combine with standard arguments for R
-PKG_CPPFLAGS = $(GSL_CFLAGS)
-PKG_LIBS = $(GSL_LIBS)
-
