build-cran-binaries/local/patches/fs/force-vendored-libuv.patch
pat-s c7825c0652
fix(patches): force fs to build vendored static libuv
fs 2.x configure links system libuv whenever pkg-config finds libuv-devel
(installed as a build-time sysreq), producing an fs.so with NEEDED libuv.so.1.
That binary fails to dyn.load on consumer machines lacking runtime libuv,
because install.packages/renv do not install SystemRequirements. Add a
configure patch that short-circuits to the bundled static libuv build (cmake)
so the fs binary is self-contained on every platform.
2026-07-07 18:10:15 +00:00

19 lines
770 B
Diff

diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -11,6 +11,15 @@
PKG_TEST_HEADER="<uv.h>"
PKG_LIBS="-luv"
+# bincraft patch: force the vendored static libuv so the resulting binary
+# is self-contained. fs configure otherwise links system libuv whenever
+# pkg-config finds libuv-devel (installed as a build-time sysreq), yielding
+# an fs.so with NEEDED libuv.so.1 that fails to dyn.load on machines lacking
+# runtime libuv (install.packages/renv do not install SystemRequirements).
+echo "Building static libuv (bincraft: forced vendored)" 1>&2
+cp -f src/Makevars.vendor src/Makevars
+exit 0
+
# Use pkg-config if available
if [ `command -v pkg-config` ]; then
PKGCONFIG_CFLAGS=`pkg-config --cflags --silence-errors ${PKG_CONFIG_NAME}`