build: Rework InstallSourceArchive into AddHaikuImageSourcePackages.

Also add AddHaikuImageSourcePackages invocations for all relevant
(i.e. [L]GPL'ed) packages.

Doesn't truly fix #9990 as PackageKit cannot be used to install source
packages, but this is enough for creating a redistributable image,
so that ticket can be moved out of the beta1 milestone now.
This commit is contained in:
Augustin Cavalier 2018-07-01 14:25:10 -04:00
parent 9e9fc9f1a3
commit 8547d09e97
4 changed files with 56 additions and 32 deletions

11
Jamfile
View File

@ -40,6 +40,17 @@ AddHaikuImagePackages [ FFilterByBuildFeatures
tar tcpdump unzip wget which zip
}@
] ;
AddHaikuImageSourcePackages [ FFilterByBuildFeatures
bash bc coreutils
regular_image @{
ctags expat ffmpeg findutils gawk grep gutenprint
gzip
less libicns
sed sharutils
tar wget which
}@
] ;
if $(HAIKU_PACKAGING_ARCHS[1]) != x86_gcc2 {
AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ;
}

View File

@ -77,7 +77,6 @@ rule DefineDefaultBuildProfiles
AddHaikuImagePackages
bepdf
cvs
keymapswitcher
llvm
man
@ -90,7 +89,6 @@ rule DefineDefaultBuildProfiles
pdfwriter
pe
python
# subversion
timgmsoundfont
vision
wpa_supplicant
@ -100,6 +98,14 @@ rule DefineDefaultBuildProfiles
xz_utils@!gcc2
gcc2 @{ xz_utils_x86@secondary_x86 }@
;
AddHaikuImageSourcePackages
bepdf
man
mercurial
nano
p7zip
gcc
;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
@ -120,6 +126,7 @@ rule DefineDefaultBuildProfiles
case "alpha-*" : {
Echo The alpha-* build profiles have been renamed to release-* ;
Exit ;
}
case "nightly-*" : {
@ -148,6 +155,12 @@ rule DefineDefaultBuildProfiles
xz_utils@!gcc2
gcc2 @{ xz_utils_x86@secondary_x86 }@
;
AddHaikuImageSourcePackages
man
nano
p7zip
gcc
;
AddOptionalHaikuImagePackages Development Git ;
@ -159,6 +172,17 @@ rule DefineDefaultBuildProfiles
}
}
case "minimum-*" : {
Echo Building Haiku Minimum Target ;
HAIKU_IMAGE_HOST_NAME ?= shredder ;
if $(DEBUG) != 0 {
HAIKU_IMAGE_SIZE ?= 450 ;
}
AddHaikuImagePackages
;
}
case "bootstrap-*" : {
Echo Building Haiku Bootstrap ;
HAIKU_IMAGE_HOST_NAME ?= shredder ;
@ -216,17 +240,6 @@ rule DefineDefaultBuildProfiles
AddOptionalHaikuImagePackages DevelopmentMin ;
}
case "minimum-*" : {
Echo Building Haiku Minimum Target ;
HAIKU_IMAGE_HOST_NAME ?= shredder ;
if $(DEBUG) != 0 {
HAIKU_IMAGE_SIZE ?= 450 ;
}
AddHaikuImagePackages
;
}
}

View File

@ -1129,6 +1129,15 @@ rule AddHaikuImagePackages packages
}
}
rule AddHaikuImageSourcePackages packages
{
# AddHaikuImageSourcePackages <packages> ;
# Adds the given source packages for <packages> to the image.
if $(HAIKU_INCLUDE_SOURCES) = 1 {
AddHaikuImagePackages $(packages)_source ;
}
}
rule IsHaikuImagePackageAdded package
{
@ -1168,17 +1177,6 @@ actions BuildHaikuImagePackageList
}
rule InstallSourceArchive file : url
{
if $(HAIKU_INCLUDE_SOURCES) = 1 {
# download archive file
local archiveFile = [ DownloadFile $(file) : $(url) ] ;
# copy directly into image
AddFilesToHaikuImage _sources_ : $(archiveFile) ;
}
}
rule AddEntryToHaikuImageUserGroupFile file : entry
{
local allEntries = [ on $(file) return $(HAIKU_IMAGE_USER_GROUP_ENTRIES) ] ;

View File

@ -85,9 +85,11 @@ if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
if [ IsOptionalHaikuImagePackageAdded Development ] {
# auto tools and perl
AddHaikuImagePackages autoconf automake perl texinfo ;
AddHaikuImageSourcePackages autoconf automake texinfo ;
# some other build tools
AddHaikuImagePackages pkgconfig scons ;
AddHaikuImageSourcePackages pkgconfig ;
# devel packages for mandatory packages
local architectureObject ;
@ -107,11 +109,13 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ] {
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
AddHaikuImagePackages binutils gcc ;
AddHaikuImageSourcePackages binutils gcc ;
}
}
# other commonly used tools
AddHaikuImagePackages bison cdrtools flex jam m4 make mkdepend nasm patch ;
AddHaikuImageSourcePackages bison cdrtools m4 make patch ;
}
@ -141,19 +145,17 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
if [ IsOptionalHaikuImagePackageAdded FFMpeg ] {
local packages = ffmpeg speex libtheora libvorbis libogg libvpx3 ;
AddHaikuImagePackages $(packages) ;
}
# FFmpeg-devel
if [ IsOptionalHaikuImagePackageAdded FFMpeg-devel ] {
local packages = ffmpeg speex libtheora libvorbis libogg libvpx3 ;
AddHaikuImagePackages $(packages)_devel ;
AddHaikuImageSourcePackages ffmpeg ;
if [ IsOptionalHaikuImagePackageAdded FFMpeg-devel ] {
AddHaikuImagePackages $(packages)_devel ;
}
}
# Git
if [ IsOptionalHaikuImagePackageAdded Git ] {
AddHaikuImagePackages git git_arch git_daemon git_email ;
AddHaikuImagePackages git git_daemon ;
AddHaikuImageSourcePackages git ;
}