ports/lang/fpc-devel/files/patch-compiler_globals.pas
Jose Alonso Cardenas Marquez c07729d7e4
lang/fpc-devel*: Update to 3.3.1.20240913
- Add support for aarch64
2024-09-14 00:44:40 -07:00

32 lines
1 KiB
ObjectPascal

--- compiler/globals.pas 2024-09-11 20:40:10.000000000 +0000
+++ compiler/globals.pas 2024-09-13 07:28:37.270196000 +0000
@@ -1042,6 +1042,19 @@
FreeEnvPChar(envvalue);
end;
{$endif openbsd}
+{$ifdef freebsd}
+ function GetFreeBSDLocalBase: ansistring;
+ var
+ envvalue: pchar;
+ begin
+ envvalue := GetEnvPChar('LOCALBASE');
+ if assigned(envvalue) then
+ Result:=envvalue
+ else
+ Result:='/usr/local';
+ FreeEnvPChar(envvalue);
+ end;
+{$endif freebsd}
var
envstr: string;
envvalue: pchar;
@@ -1081,6 +1094,9 @@
Replace(s,'$OPENBSD_LOCALBASE',GetOpenBSDLocalBase);
Replace(s,'$OPENBSD_X11BASE',GetOpenBSDX11Base);
{$endif openbsd}
+{$ifdef freebsd}
+ Replace(s,'$FREEBSD_LOCALBASE',GetFreeBSDLocalBase);
+{$endif freebsd}
{$ifdef xtensa}
if idf_version > 0 then
Replace(s,'$IDF_VERSION',idfversionstring(idf_version));