mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 15:36:35 -04:00
Free Pascal is a mature, versatile, open source Pascal compiler. It can target many processor architectures: Intel x86 (16 and 32 bit), AMD64/x86-64, PowerPC, PowerPC64, SPARC, SPARC64, ARM, AArch64, MIPS, Motorola 68k, AVR, and the JVM. Supported operating systems include Windows (16/32/64 bit, CE, and native NT), Linux, Mac OS X/iOS/iPhoneSimulator/Darwin, FreeBSD and other BSD flavors, DOS (16 bit, or 32 bit DPMI), OS/2, AIX, Android, Haiku, Nintendo GBA/DS/Wii, AmigaOS, MorphOS, AROS, Atari TOS, and various embedded platforms. Additionally, support for RISC-V (32/64), Xtensa, and Z80 architectures, and for the LLVM compiler infrastructure is available in the development version. Additionally, the Free Pascal team maintains a transpiler for pascal to Javascript called pas2js.
32 lines
1 KiB
ObjectPascal
32 lines
1 KiB
ObjectPascal
--- compiler/globals.pas 2023-10-27 23:30:38.797736000 -0500
|
|
+++ compiler/globals.pas 2023-10-27 23:31:45.729414000 -0500
|
|
@@ -1023,6 +1023,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;
|
|
@@ -1062,6 +1075,9 @@
|
|
Replace(s,'$OPENBSD_LOCALBASE',GetOpenBSDLocalBase);
|
|
Replace(s,'$OPENBSD_X11BASE',GetOpenBSDX11Base);
|
|
{$endif openbsd}
|
|
+{$ifdef freebsd}
|
|
+ Replace(s,'$FREEBSD_LOCALBASE',GetFreeBSDLocalBase);
|
|
+{$endif freebsd}
|
|
if not substitute_env_variables then
|
|
exit;
|
|
{ Replace environment variables between dollar signs }
|