Ticket #5110: IncludeSources.2.patch

File IncludeSources.2.patch, 3.4 KB (added by mmadia, 10 years ago)

updates for HAIKU_INCLUDE_SOURCES

  • configure

     
    6464                              implement patented ideas and techniques. This
    6565                              option only disables code that is currently known
    6666                              to be problematic.
     67  --include-sources           Includes the source code of projects that require
     68                              either an offer of source code or a copy of the
     69                              patched sources. This is preferable when
     70                              distributing on physical mediums.
    6771  --include-3rdparty          Include 3rdparty/ in the build system.
    6872  -j<n>                       Only relevant for --build-cross-tools and
    6973                              --build-cross-tools-gcc4. Is passed on to the
     
    355359        --help | -h)    usage; exit 0;;
    356360        --include-gpl-addons)   includeGPLAddOns=1; shift 1;;
    357361        --include-patented-code)    includePatentedCode=1; shift 1;;
     362        --include-sources) includeSources=1; shift 1;;
    358363        --include-3rdparty) include3rdParty=1; shift 1;;
    359364        -j*)                buildCrossToolsJobs="$1"; shift 1;;
    360365        --target=*)     target=`echo $1 | cut -d'=' -f2-`; shift 1;;
     
    476481
    477482BOCHS_DEBUG_HACK                    ?= "${bochsDebug}" ;
    478483INCLUDE_GPL_ADDONS                  ?= "${includeGPLAddOns}" ;
     484HAIKU_INCLUDE_SOURCES               ?= "${includeSources}" ;
    479485HAIKU_INCLUDE_PATENTED_CODE         ?= "${includePatentedCode}" ;
    480486HAIKU_INCLUDE_3RDPARTY              ?= "${include3rdParty}" ;
    481487HAIKU_ENABLE_MULTIUSER              ?= "${enableMultiuser}" ;
  • build/jam/FileRules

     
    358358    $(2[1]) $(DATA_VARIABLE) $(SIZE_VARIABLE) $(2[2]) $(1)
    359359}
    360360
    361 rule DownloadFile target : url
     361rule DownloadLocatedFile target : url
    362362{
    363363    URL on $(target) = $(url) ;
    364364
    365     DownloadFile1 $(target) ;
     365    DownloadLocatedFile1 $(target) ;
    366366}
    367367
    368 actions DownloadFile1
     368actions DownloadLocatedFile1
    369369{
    370370    wget -O $(1) $(URL)
    371371}
    372372
    373 rule DownloadOptionalPackage package : url
     373rule DownloadFile file : url
    374374{
    375     # download zip file
    376     local zipFile = $(package:G=download).zip ;
     375    file = $(file:G=download) ;
    377376
    378377    # Request the download only once.
    379     if [ on $(zipFile) return $(HAIKU_OPTIONAL_PACKAGE_DOWNLOAD) ] {
    380         return $(zipFile) ;
     378    if [ on $(file) return $(HAIKU_FILE_DOWNLOAD) ] {
     379        return $(file) ;
    381380    }
    382381
    383     HAIKU_OPTIONAL_PACKAGE_DOWNLOAD on $(zipFile) = 1 ;
     382    HAIKU_FILE_DOWNLOAD on $(file) = 1 ;
    384383
    385     MakeLocate $(zipFile) : $(HAIKU_DOWNLOAD_DIR) ;
    386     DownloadFile $(zipFile) : $(url) ;
     384    MakeLocate $(file) : $(HAIKU_DOWNLOAD_DIR) ;
     385    DownloadLocatedFile $(file) : $(url) ;
    387386
    388     return $(zipFile) ;
     387    return $(file) ;
    389388}
     389
     390rule DownloadOptionalPackage package : url
     391{
     392    return [ DownloadFile $(package).zip : $(url) ] ;
     393}
  • build/jam/ImageRules

     
    758758    }
    759759}
    760760
     761rule InstallSourceArchive file : url
     762{
     763    if $(HAIKU_INCLUDE_SOURCES) {
     764        # download archive file
     765        local archiveFile = [ DownloadFile $(file) : $(url) ] ;
     766   
     767        # copy directly into image
     768        AddFilesToHaikuImage develop sources : $(archiveFile) ;
     769    }
     770}
     771
    761772rule InstallOptionalHaikuImagePackage package : url : dirTokens : isCDPackage
    762773{
    763774    # download zip file