mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
Switch to using the vendored libsolv.
Package dependency resolution seems to still be working OK.
This commit is contained in:
parent
f491972ca9
commit
bc2428853f
4
Jamfile
4
Jamfile
@ -20,7 +20,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
||||
# Include required packages:
|
||||
# primary architecture
|
||||
AddHaikuImageSystemPackages [ FFilterByBuildFeatures
|
||||
bash bc freetype libsolv zlib
|
||||
bash bc freetype zlib
|
||||
|
||||
!gcc2 @{ coreutils icu74 }@
|
||||
gcc2 @{ coreutils_x86 icu icu74_x86@secondary_x86 }@
|
||||
@ -66,7 +66,7 @@ if $(HAIKU_PACKAGING_ARCHS[2]) {
|
||||
in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
|
||||
on $(architectureObject) {
|
||||
AddHaikuImageSystemPackages [ FFilterByBuildFeatures
|
||||
freetype icu libsolv zlib
|
||||
freetype icu zlib
|
||||
|
||||
regular_image @{
|
||||
ffmpeg6 glu jasper jpeg libavif libicns libpng16 libwebp mesa
|
||||
|
@ -510,30 +510,6 @@ if [ IsPackageAvailable libedit_devel ] {
|
||||
}
|
||||
|
||||
|
||||
# libsolv
|
||||
if [ IsPackageAvailable libsolv_devel ] {
|
||||
ExtractBuildFeatureArchives libsolv :
|
||||
file: base libsolv
|
||||
runtime: lib
|
||||
file: devel libsolv_devel
|
||||
depends: base
|
||||
libraries:
|
||||
$(developLibDir)/libsolv.so
|
||||
$(developLibDir)/libsolvext.so
|
||||
headers: $(developHeadersDir)
|
||||
# sources are required for the primary architecture only
|
||||
primary @{
|
||||
file: source libsolv_source
|
||||
sources: develop/sources/%portRevisionedName%/sources
|
||||
}@
|
||||
;
|
||||
|
||||
EnableBuildFeatures libsolv ;
|
||||
} else {
|
||||
unavailableBuildFeatures += libsolv ;
|
||||
}
|
||||
|
||||
|
||||
# qrencode
|
||||
if [ IsPackageAvailable qrencode_kdl_devel ] {
|
||||
ExtractBuildFeatureArchives libqrencode_kdl :
|
||||
|
@ -218,7 +218,6 @@ rule DefineDefaultBuildProfiles
|
||||
freetype
|
||||
gcc
|
||||
icu@gcc2 icu74@!gcc2
|
||||
libsolv
|
||||
libedit
|
||||
ncurses6
|
||||
zlib
|
||||
|
@ -1,9 +1,6 @@
|
||||
SubDir HAIKU_TOP src build libpackage solver ;
|
||||
|
||||
UseBuildFeatureHeaders libsolv ;
|
||||
|
||||
local libsolvHeaders = [ BuildFeatureAttribute libsolv : headers : path ] ;
|
||||
UseHeaders [ FDirName $(libsolvHeaders) solv ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs libsolv ] : true ;
|
||||
|
||||
UsePrivateHeaders shared ;
|
||||
|
||||
@ -19,10 +16,7 @@ BuildPlatformSharedLibrary libpackage-add-on-libsolv_build.so
|
||||
:
|
||||
LibsolvSolver.cpp
|
||||
:
|
||||
libsolvext_build.so libsolv_build.so
|
||||
libsolvext_build.a libsolv_build.a
|
||||
libpackage_build.so
|
||||
libbe_build.so $(HOST_LIBSTDC++)
|
||||
;
|
||||
|
||||
Includes [ FGristFiles LibsolvSolver.cpp ]
|
||||
: [ BuildFeatureAttribute libsolv : headers ] ;
|
||||
|
@ -1,21 +1,15 @@
|
||||
SubDir HAIKU_TOP src build libsolv ;
|
||||
|
||||
local libsolvSourceBaseDirectory
|
||||
= [ BuildFeatureAttribute libsolv : sources : path ] ;
|
||||
local libsolvSourceDirectory = [ FDirName $(libsolvSourceBaseDirectory) src ] ;
|
||||
= [ FDirName $(HAIKU_TOP) src libs libsolv ] ;
|
||||
local libsolvSourceDirectory
|
||||
= [ FDirName $(libsolvSourceBaseDirectory) solv ] ;
|
||||
local libsolvextSourceDirectory
|
||||
= [ FDirName $(libsolvSourceBaseDirectory) ext ] ;
|
||||
|
||||
local libsolvMajor = 0 ;
|
||||
local libsolvMinor = 3 ;
|
||||
local libsolvPatch = 0 ;
|
||||
local libsolvVersion = $(libsolvMajor).$(libsolvMinor).$(libsolvPatch) ;
|
||||
|
||||
DEFINES =
|
||||
LIBSOLV_INTERNAL
|
||||
HAIKU
|
||||
ENABLE_HAIKU
|
||||
VERSION=\\\"$(libsolvVersion)\\\"
|
||||
_GNU_SOURCE
|
||||
;
|
||||
|
||||
@ -40,6 +34,9 @@ switch $(HOST_PLATFORM) {
|
||||
|
||||
SubDirCcFlags -Wno-sign-compare -Wno-missing-prototypes ;
|
||||
|
||||
SubDirCcFlags $(HOST_PIC_CCFLAGS) ;
|
||||
SubDirC++Flags $(HOST_PIC_C++FLAGS) ;
|
||||
|
||||
|
||||
# libsolv
|
||||
|
||||
@ -54,11 +51,8 @@ local libsolvSources = [ FGristFiles
|
||||
] ;
|
||||
|
||||
LOCATE on $(libsolvSources) = $(libsolvSourceDirectory) ;
|
||||
Depends $(libsolvSources) : [ BuildFeatureAttribute libsolv : sources ] ;
|
||||
|
||||
MakeLocate libsolv_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;
|
||||
|
||||
BuildPlatformSharedLibrary libsolv_build.so
|
||||
BuildPlatformStaticLibrary libsolv_build.a
|
||||
:
|
||||
$(libsolvSources)
|
||||
;
|
||||
@ -73,44 +67,10 @@ local libsolvextSources = [ FGristFiles
|
||||
] ;
|
||||
|
||||
LOCATE on $(libsolvextSources) = $(libsolvextSourceDirectory) ;
|
||||
Depends $(libsolvextSources) : [ BuildFeatureAttribute libsolv : sources ] ;
|
||||
|
||||
USES_BE_API on libsolvext_build.so = true ;
|
||||
USES_BE_API on libsolvext_build.a = true ;
|
||||
|
||||
MakeLocate libsolvext_build.so : $(HOST_BUILD_COMPATIBILITY_LIB_DIR) ;
|
||||
|
||||
BuildPlatformSharedLibrary libsolvext_build.so
|
||||
BuildPlatformStaticLibrary libsolvext_build.a
|
||||
:
|
||||
$(libsolvextSources)
|
||||
:
|
||||
libsolv_build.so
|
||||
libpackage_build.so
|
||||
z
|
||||
;
|
||||
|
||||
|
||||
# generate solvversion.h
|
||||
|
||||
actions GenerateLibsolvVersionHeader
|
||||
{
|
||||
sed -e s,@VERSION@,$(LIBSOLV_VERSION),g \
|
||||
-e s,@LIBSOLV_MAJOR@,$(LIBSOLV_MAJOR),g \
|
||||
-e s,@LIBSOLV_MINOR@,$(LIBSOLV_MINOR),g \
|
||||
-e s,@LIBSOLV_PATCH@,$(LIBSOLV_PATCH),g \
|
||||
$(2) > $(1)
|
||||
}
|
||||
|
||||
local versionHeaderIn = solvversion.h.in ;
|
||||
LOCATE on $(versionHeaderIn) = $(libsolvSourceDirectory) ;
|
||||
Depends $(versionHeaderIn) : [ BuildFeatureAttribute libsolv : sources ] ;
|
||||
|
||||
local versionHeader = [ FGristFiles solvversion.h ] ;
|
||||
MakeLocate $(versionHeader) : $(LOCATE_SOURCE) ;
|
||||
Depends $(versionHeader) : $(versionHeaderIn) ;
|
||||
LIBSOLV_VERSION on $(versionHeader) = $(libsolvVersion) ;
|
||||
LIBSOLV_MAJOR on $(versionHeader) = $(libsolvMajor) ;
|
||||
LIBSOLV_MINOR on $(versionHeader) = $(libsolvMinor) ;
|
||||
LIBSOLV_PATCH on $(versionHeader) = $(libsolvPatch) ;
|
||||
GenerateLibsolvVersionHeader $(versionHeader) : $(versionHeaderIn) ;
|
||||
|
||||
Includes $(libsolvSources) $(libsolvextSources) : $(versionHeader) ;
|
||||
|
@ -101,10 +101,6 @@ requires {
|
||||
#ifdef HAIKU_BUILD_FEATURE_%HAIKU_PACKAGING_ARCH%_ncurses_ENABLED
|
||||
lib:libncurses >= 6.0
|
||||
#endif
|
||||
#ifdef HAIKU_BUILD_FEATURE_%HAIKU_PACKAGING_ARCH%_libsolv_ENABLED
|
||||
lib:libsolv
|
||||
lib:libsolvext
|
||||
#endif
|
||||
#ifdef HAIKU_BUILD_FEATURE_%HAIKU_PACKAGING_ARCH%_openssl_ENABLED
|
||||
lib:libssl
|
||||
lib:libcrypto
|
||||
|
@ -36,7 +36,5 @@ requires {
|
||||
lib:libtiff_%HAIKU_SECONDARY_PACKAGING_ARCH% >= 5.2
|
||||
lib:libwebp_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
#endif
|
||||
lib:libsolv_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libsolvext_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libz_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
}
|
||||
|
@ -33,8 +33,6 @@ requires {
|
||||
lib:libjpeg_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libpng_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
#endif
|
||||
lib:libsolv_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libsolvext_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
#ifndef HAIKU_SECONDARY_PACKAGING_ARCH_X86_GCC2
|
||||
lib:libstdc++_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libsupc++_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
|
@ -43,8 +43,6 @@ requires {
|
||||
lib:libswresample_%HAIKU_SECONDARY_PACKAGING_ARCH% >= 4
|
||||
lib:libzstd_%HAIKU_SECONDARY_PACKAGING_ARCH% >= 1
|
||||
#endif
|
||||
lib:libsolv_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libsolvext_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libstdc++_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libsupc++_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
lib:libz_%HAIKU_SECONDARY_PACKAGING_ARCH%
|
||||
|
@ -6,25 +6,20 @@ local architectureObject ;
|
||||
for architectureObject in [ MultiArchSubDirSetup ] {
|
||||
on $(architectureObject) {
|
||||
|
||||
UseBuildFeatureHeaders libsolv ;
|
||||
|
||||
local libsolvHeaders
|
||||
= [ BuildFeatureAttribute libsolv : headers : path ] ;
|
||||
UseHeaders [ FDirName $(libsolvHeaders) solv ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs libsolv ] : true ;
|
||||
UsePrivateHeaders shared ;
|
||||
|
||||
AddResources $(libsolv) :
|
||||
LibsolvSolver.rdef
|
||||
;
|
||||
|
||||
UsePrivateHeaders shared ;
|
||||
|
||||
SharedLibrary
|
||||
[ MultiArchDefaultGristFiles libpackage-add-on-libsolv.so ]
|
||||
:
|
||||
LibsolvSolver.cpp
|
||||
:
|
||||
package
|
||||
[ BuildFeatureAttribute libsolv : libraries ]
|
||||
[ MultiArchDefaultGristFiles libsolv.a libsolvext.a ]
|
||||
be [ TargetLibstdc++ ]
|
||||
;
|
||||
|
||||
@ -32,8 +27,5 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
||||
# External headers use the C++20 reserved keyword `requires`
|
||||
ObjectC++Flags LibsolvSolver.cpp : -Wno-error=c++20-compat ;
|
||||
}
|
||||
|
||||
Includes [ FGristFiles LibsolvSolver.cpp ]
|
||||
: [ BuildFeatureAttribute libsolv : headers ] ;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ SubInclude HAIKU_TOP src libs glut ;
|
||||
SubInclude HAIKU_TOP src libs gnu ;
|
||||
SubInclude HAIKU_TOP src libs icon ;
|
||||
SubInclude HAIKU_TOP src libs iconv ;
|
||||
SubInclude HAIKU_TOP src libs libsolv ;
|
||||
SubInclude HAIKU_TOP src libs libtelnet ;
|
||||
SubInclude HAIKU_TOP src libs linprog ;
|
||||
SubInclude HAIKU_TOP src libs mapm ;
|
||||
|
40
src/libs/libsolv/Jamfile
Normal file
40
src/libs/libsolv/Jamfile
Normal file
@ -0,0 +1,40 @@
|
||||
SubDir HAIKU_TOP src libs libsolv ;
|
||||
|
||||
DEFINES =
|
||||
LIBSOLV_INTERNAL
|
||||
HAIKU
|
||||
_GNU_SOURCE
|
||||
|
||||
HAVE_STRCHRNUL
|
||||
HAVE_FOPENCOOKIE
|
||||
;
|
||||
|
||||
SubDirCcFlags -Wno-sign-compare -Wno-missing-prototypes ;
|
||||
|
||||
local architectureObject ;
|
||||
for architectureObject in [ MultiArchSubDirSetup ] {
|
||||
on $(architectureObject) {
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) solv ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) ext ] ;
|
||||
|
||||
UseBuildFeatureHeaders zlib ;
|
||||
Includes [ FGristFiles solv_xfopen.c ]
|
||||
: [ BuildFeatureAttribute zlib : headers ] ;
|
||||
|
||||
StaticLibrary [ MultiArchDefaultGristFiles libsolv.a ] :
|
||||
bitmap.c chksum.c md5.c sha1.c sha2.c
|
||||
pool.c poolarch.c poolvendor.c poolid.c strpool.c dirpool.c
|
||||
solver.c solverdebug.c solvable.c
|
||||
repo_solv.c repo_write.c repo.c repodata.c repopage.c
|
||||
selection.c transaction.c policy.c rules.c problems.c
|
||||
evr.c util.c queue.c
|
||||
solvversion.c
|
||||
;
|
||||
|
||||
StaticLibrary [ MultiArchDefaultGristFiles libsolvext.a ] :
|
||||
repo_haiku.cpp
|
||||
solv_xfopen.c
|
||||
testcase.c
|
||||
;
|
||||
}
|
||||
}
|
1
src/libs/libsolv/solv/repo_haiku.h
Symbolic link
1
src/libs/libsolv/solv/repo_haiku.h
Symbolic link
@ -0,0 +1 @@
|
||||
../ext/repo_haiku.h
|
@ -10,6 +10,5 @@ BuildPlatformMain <build>get_package_dependencies :
|
||||
get_package_dependencies.cpp
|
||||
:
|
||||
libpackage-add-on-libsolv_build.so
|
||||
libsolvext_build.so libsolv_build.so
|
||||
libpackage_build.so $(HOST_LIBBE) $(HOST_LIBSUPC++) $(HOST_LIBSTDC++)
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user