|
@@ -164,6 +164,8 @@ Var
|
|
FPMakeSrc : string;
|
|
FPMakeSrc : string;
|
|
NeedFPMKUnitSource,
|
|
NeedFPMKUnitSource,
|
|
HaveFpmake : boolean;
|
|
HaveFpmake : boolean;
|
|
|
|
+ FPMKUnitDepAvailable: Boolean;
|
|
|
|
+ FPMKUnitDepPackage: TFPPackage;
|
|
P : TFPPackage;
|
|
P : TFPPackage;
|
|
begin
|
|
begin
|
|
P:=PackageManager.PackageByName(PackageName, pkgpkAvailable);
|
|
P:=PackageManager.PackageByName(PackageName, pkgpkAvailable);
|
|
@@ -192,7 +194,22 @@ begin
|
|
AddOption('-dCOMPILED_BY_FPPKG');
|
|
AddOption('-dCOMPILED_BY_FPPKG');
|
|
for i:=0 to high(FPMKUnitDeps) do
|
|
for i:=0 to high(FPMKUnitDeps) do
|
|
begin
|
|
begin
|
|
- if FPMKUnitDeps[i].available then
|
|
|
|
|
|
+ FPMKUnitDepAvailable := FPMKUnitDeps[i].available;
|
|
|
|
+ if FPMKUnitDepAvailable then
|
|
|
|
+ begin
|
|
|
|
+ // Do not try to use packages which are broken. This can happen when
|
|
|
|
+ // fixbroken is being called and one of the fpmkunit-dependencies itself
|
|
|
|
+ // is broken. In that case, build fpmake without the dependency.
|
|
|
|
+ // (Plugins are also fpmkunit-dependencies)
|
|
|
|
+ FPMKUnitDepPackage := PackageManager.FindPackage(FPMKUnitDeps[i].package, pkgpkInstalled);
|
|
|
|
+ if Assigned(FPMKUnitDepPackage) then
|
|
|
|
+ begin
|
|
|
|
+ if PackageManager.PackageIsBroken(FPMKUnitDepPackage, nil) then
|
|
|
|
+ FPMKUnitDepAvailable := False;
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ if FPMKUnitDepAvailable then
|
|
begin
|
|
begin
|
|
if CheckUnitDir(FPMKUnitDeps[i].package,DepDir) then
|
|
if CheckUnitDir(FPMKUnitDeps[i].package,DepDir) then
|
|
AddOption('-Fu'+DepDir)
|
|
AddOption('-Fu'+DepDir)
|