kits/package: Break LibsolvSolver add-on out

* BSolver is implemented by solver add-ons
* We may want to (unlikely) leverage another
  package solver in the future.
* We may want to (likely) implement a dummy
  solver when libsolv is unavailable on new
  architectures without bootstrap.
* This also makes solving missing libsolv a little
  more graceful vs the "include "libsolv.h" not
  found.

Change-Id: Iedd9d0f022fb743c4c7606bd33a4b6dbef0576f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/819
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Alexander von Gluck IV 2019-01-03 09:39:45 -06:00 committed by Alex von Gluck IV
parent c5aa9dfb4c
commit ca7a630e20
7 changed files with 37 additions and 39 deletions

View File

@ -10,7 +10,7 @@ UsePrivateHeaders shared ;
USES_BE_API on libpackage-add-on-libsolv_build.so = true ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package solver ] ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package solver libsolv ] ;
MakeLocate libpackage-add-on-libsolv_build.so
: $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;
@ -24,6 +24,5 @@ BuildPlatformSharedLibrary libpackage-add-on-libsolv_build.so
libbe_build.so $(HOST_LIBSTDC++)
;
Includes [ FGristFiles LibsolvSolver.cpp ]
: [ BuildFeatureAttribute libsolv : headers ] ;

View File

@ -71,10 +71,6 @@ for architectureObject in [ MultiArchSubDirSetup ] {
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package manager ] ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package solver ] ;
AddResources $(libsolv) :
LibsolvSolver.rdef
;
SharedLibrary [ MultiArchDefaultGristFiles libpackage.so ]
:
ActivateRepositoryCacheJob.cpp

View File

@ -1,41 +1,10 @@
SubDir HAIKU_TOP src kits package solver ;
# add-on implementing a libsolv based BSolver
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
UseBuildFeatureHeaders libsolv ;
local libsolvHeaders
= [ BuildFeatureAttribute libsolv : headers : path ] ;
UseHeaders [ FDirName $(libsolvHeaders) solv ] ;
AddResources $(libsolv) :
LibsolvSolver.rdef
;
UsePrivateHeaders shared ;
SharedLibrary
[ MultiArchDefaultGristFiles libpackage-add-on-libsolv.so ]
:
LibsolvSolver.cpp
:
package
[ BuildFeatureAttribute libsolv : libraries ]
be [ TargetLibstdc++ ]
;
Includes [ FGristFiles LibsolvSolver.cpp ]
: [ BuildFeatureAttribute libsolv : headers ] ;
}
}
DoCatalogs libsolv :
x-vnd.Haiku-libsolvsolver
:
SolverProblem.cpp
SolverProblemSolution.cpp
;
HaikuSubInclude libsolv ;

View File

@ -0,0 +1,34 @@
SubDir HAIKU_TOP src kits package solver libsolv ;
# add-on implementing a libsolv based BSolver
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
UseBuildFeatureHeaders libsolv ;
local libsolvHeaders
= [ BuildFeatureAttribute libsolv : headers : path ] ;
UseHeaders [ FDirName $(libsolvHeaders) solv ] ;
AddResources $(libsolv) :
LibsolvSolver.rdef
;
UsePrivateHeaders shared ;
SharedLibrary
[ MultiArchDefaultGristFiles libpackage-add-on-libsolv.so ]
:
LibsolvSolver.cpp
:
package
[ BuildFeatureAttribute libsolv : libraries ]
be [ TargetLibstdc++ ]
;
Includes [ FGristFiles LibsolvSolver.cpp ]
: [ BuildFeatureAttribute libsolv : headers ] ;
}
}