Jelajahi Sumber

* fix compatibility with new Package Management system under Haiku
(patch by Olivier Coursiere, mantis #25051)

git-svn-id: trunk@25573 -

Jonas Maebe 12 tahun lalu
induk
melakukan
2c664ac6ae
1 mengubah file dengan 16 tambahan dan 0 penghapusan
  1. 16 0
      compiler/systems/t_haiku.pas

+ 16 - 0
compiler/systems/t_haiku.pas

@@ -170,6 +170,12 @@ end;
 *****************************************************************************}
 
 Constructor TLinkerHaiku.Create;
+const
+  HomeNonPackagedDevLib = '/boot/home/config/non-packaged/develop/lib';
+  HomeDevLib = '/boot/home/config/develop/lib';
+  CommonNonPackagedDevLib = '/boot/common/non-packaged/develop/lib';
+  CommonDevLib = '/boot/common/develop/lib';
+  SystemDevLib = '/boot/system/develop/lib';
 var
   s : string;
   i : integer;
@@ -184,7 +190,17 @@ begin
   { since that is what the compiler expects.              }
   if pos(';',s) = 0 then
     s:=s+';';
+
+  // Under Haiku with package management, BELIBRARIES is empty by default
+  // We have to look at those system paths, in this order.
+  // User can still customize BELIBRARIES. That is why it is looked at first.
   LibrarySearchPath.AddPath(sysrootpath,s,true); {format:'path1;path2;...'}
+
+  LibrarySearchPath.AddPath(sysrootpath, HomeNonPackagedDevLib, false);
+  LibrarySearchPath.AddPath(sysrootpath, HomeDevLib, false);
+  LibrarySearchPath.AddPath(sysrootpath, CommonNonPackagedDevLib, false);
+  LibrarySearchPath.AddPath(sysrootpath, CommonDevLib, false);
+  LibrarySearchPath.AddPath(sysrootpath, SystemDevLib, false);
 end;