mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
Patch by Matt Madia:
* Renamed DownloadFile to DownloadLocatedFile. * Pulled a generalized rule DownloadFile out of DownloadOptionalPackage. * Added InstallSourceArchive rule which can be used in OptionalPackages to add sources for installed packages to the image. * Added configure option --include-sources to enable including the sources for third party software in the image. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35617 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3cd300bc61
commit
76fa0be374
@ -369,32 +369,36 @@ actions DataFileToSourceFile1
|
||||
$(2[1]) $(DATA_VARIABLE) $(SIZE_VARIABLE) $(2[2]) $(1)
|
||||
}
|
||||
|
||||
rule DownloadFile target : url
|
||||
rule DownloadLocatedFile target : url
|
||||
{
|
||||
URL on $(target) = $(url) ;
|
||||
|
||||
DownloadFile1 $(target) ;
|
||||
DownloadLocatedFile1 $(target) ;
|
||||
}
|
||||
|
||||
actions DownloadFile1
|
||||
actions DownloadLocatedFile1
|
||||
{
|
||||
wget -O $(1) $(URL)
|
||||
}
|
||||
|
||||
rule DownloadOptionalPackage package : url
|
||||
rule DownloadFile file : url
|
||||
{
|
||||
# download zip file
|
||||
local zipFile = $(package:G=download).zip ;
|
||||
file = $(file:G=download) ;
|
||||
|
||||
# Request the download only once.
|
||||
if [ on $(zipFile) return $(HAIKU_OPTIONAL_PACKAGE_DOWNLOAD) ] {
|
||||
return $(zipFile) ;
|
||||
if [ on $(file) return $(HAIKU_FILE_DOWNLOAD) ] {
|
||||
return $(file) ;
|
||||
}
|
||||
|
||||
HAIKU_OPTIONAL_PACKAGE_DOWNLOAD on $(zipFile) = 1 ;
|
||||
HAIKU_FILE_DOWNLOAD on $(file) = 1 ;
|
||||
|
||||
MakeLocate $(zipFile) : $(HAIKU_DOWNLOAD_DIR) ;
|
||||
DownloadFile $(zipFile) : $(url) ;
|
||||
MakeLocate $(file) : $(HAIKU_DOWNLOAD_DIR) ;
|
||||
DownloadLocatedFile $(file) : $(url) ;
|
||||
|
||||
return $(zipFile) ;
|
||||
return $(file) ;
|
||||
}
|
||||
|
||||
rule DownloadOptionalPackage package : url
|
||||
{
|
||||
return [ DownloadFile $(package).zip : $(url) ] ;
|
||||
}
|
||||
|
@ -758,6 +758,17 @@ rule OptionalPackageDependencies package : dependencies
|
||||
}
|
||||
}
|
||||
|
||||
rule InstallSourceArchive file : url
|
||||
{
|
||||
if $(HAIKU_INCLUDE_SOURCES) = 1 {
|
||||
# download archive file
|
||||
local archiveFile = [ DownloadFile $(file) : $(url) ] ;
|
||||
|
||||
# copy directly into image
|
||||
AddFilesToHaikuImage develop sources : $(archiveFile) ;
|
||||
}
|
||||
}
|
||||
|
||||
rule InstallOptionalHaikuImagePackage package : url : dirTokens : isCDPackage
|
||||
{
|
||||
# download zip file
|
||||
|
7
configure
vendored
7
configure
vendored
@ -62,6 +62,10 @@ options:
|
||||
implement patented ideas and techniques. This
|
||||
option only disables code that is currently known
|
||||
to be problematic.
|
||||
--include-sources Includes the source code of projects that require
|
||||
either an offer of source code or a copy of the
|
||||
patched sources. This is preferable when
|
||||
distributing on physical mediums.
|
||||
--include-3rdparty Include 3rdparty/ in the build system.
|
||||
-j<n> Only relevant for --build-cross-tools and
|
||||
--build-cross-tools-gcc4. Is passed on to the
|
||||
@ -279,6 +283,7 @@ HOST_GCC_RAW_VERSION=`gcc -dumpversion`
|
||||
HOST_GCC_MACHINE=`gcc -dumpmachine`
|
||||
HAIKU_INCLUDE_GPL_ADDONS=0
|
||||
HAIKU_INCLUDE_PATENTED_CODE=0
|
||||
HAIKU_INCLUDE_SOURCES=0
|
||||
HAIKU_INCLUDE_3RDPARTY=0
|
||||
HAIKU_ENABLE_MULTIUSER=0
|
||||
HAIKU_DISTRO_COMPATIBILITY=default
|
||||
@ -390,6 +395,7 @@ while [ $# -gt 0 ] ; do
|
||||
--help | -h) usage; exit 0;;
|
||||
--include-gpl-addons) HAIKU_INCLUDE_GPL_ADDONS=1; shift 1;;
|
||||
--include-patented-code) HAIKU_INCLUDE_PATENTED_CODE=1; shift 1;;
|
||||
--include-sources) HAIKU_INCLUDE_SOURCES=1; shift 1;;
|
||||
--include-3rdparty) HAIKU_INCLUDE_3RDPARTY=1; shift 1;;
|
||||
-j*) buildCrossToolsJobs="$1"; shift 1;;
|
||||
--target=*) TARGET_PLATFORM=`echo $1 | cut -d'=' -f2-`; shift 1;;
|
||||
@ -514,6 +520,7 @@ HOST_PLATFORM ?= "${HOST_PLATFORM}" ;
|
||||
|
||||
HAIKU_INCLUDE_GPL_ADDONS ?= "${HAIKU_INCLUDE_GPL_ADDONS}" ;
|
||||
HAIKU_INCLUDE_PATENTED_CODE ?= "${HAIKU_INCLUDE_PATENTED_CODE}" ;
|
||||
HAIKU_INCLUDE_SOURCES ?= "${HAIKU_INCLUDE_SOURCES}" ;
|
||||
HAIKU_INCLUDE_3RDPARTY ?= "${HAIKU_INCLUDE_3RDPARTY}" ;
|
||||
HAIKU_ENABLE_MULTIUSER ?= "${HAIKU_ENABLE_MULTIUSER}" ;
|
||||
HAIKU_DISTRO_COMPATIBILITY ?= "${HAIKU_DISTRO_COMPATIBILITY}" ;
|
||||
|
Loading…
Reference in New Issue
Block a user