rPackages.PICS: fix build

Strict R headers are now the default. This removes the legacy
definitions of ‘PI’, ‘Calloc’, ‘Realloc’ and ‘Free’: use ‘M_PI’,
‘R_Calloc’, ‘R_Realloc’ or ‘R_Free’ instead.
This commit is contained in:
László Kupcsik
2025-04-22 22:22:00 +02:00
parent 3d76d853a8
commit cf13f52b70

View File

@@ -1787,6 +1787,14 @@ let
'';
});
PICS = old.PICS.overrideAttrs (attrs: {
postPatch = ''
# https://developer.r-project.org/blosxom.cgi/R-devel/NEWS/2025/01/08#n2025-01-08
substituteInPlace "src/segment.c" \
--replace-fail "Calloc" "R_Calloc"
'';
});
lwgeom = old.lwgeom.overrideAttrs (attrs: {
configureFlags = [
"--with-proj-lib=${pkgs.lib.getLib pkgs.proj}/lib"