Ticket #12280: macports-makejobs.patch

File macports-makejobs.patch, 2.9 KB (added by afb@…, 17 years ago)

macports-makejobs.patch

  • doc/macports.conf.in

     
    4046# Supported types: tgz (default), tar, tbz, tbz2, xar, zip, cpgz, cpio
    4147portarchivetype         tgz
    4248
     49# Number of simultaneous make jobs (commands) to use when building ports
     50buildmakejobs           1
     51
    4352# Set whether to automatically execute "clean" after "install" of ports
    4453portautoclean           yes
    4554
  • src/macports1.0/macports.tcl

     
    4343        portinstalltype portarchivemode portarchivepath portarchivetype portautoclean \
    4444        porttrace portverbose destroot_umask variants_conf rsync_server rsync_options \
    4545        rsync_dir startupitem_type place_worksymlink xcodeversion xcodebuildcmd \
    46         mp_remote_url mp_remote_submit_url"
     46        mp_remote_url mp_remote_submit_url buildmakejobs"
    4747    variable user_options "submitter_name submitter_email submitter_key"
    4848    variable portinterp_options "\
    4949        portdbpath portpath portbuildpath auto_path prefix prefix_frozen portsharepath \
    5050        registry.path registry.format registry.installtype portarchivemode portarchivepath \
    5151        portarchivetype portautoclean porttrace portverbose destroot_umask rsync_server \
    5252        rsync_options rsync_dir startupitem_type place_worksymlink \
    53         mp_remote_url mp_remote_submit_url \
     53        mp_remote_url mp_remote_submit_url buildmakejobs \
    5454        $user_options"
    5555   
    5656    # deferred options are only computed when needed.
     
    286286        global macports::variants_conf
    287287        global macports::xcodebuildcmd
    288288        global macports::xcodeversion
     289        global macports::buildmakejobs
    289290
    290291        # Set the system encoding to utf-8
    291292        encoding system utf-8
  • src/port1.0/portbuild.tcl

     
    4040
    4141# define options
    4242options build.target
     43options build.jobs
     44options build.max_jobs
    4345commands build
    4446# defaults
    4547default build.dir {${workpath}/${worksrcdir}}
    46 default build.cmd {[build_getmaketype]}
     48default build.cmd {[build_getmaketype][build_getmakejobs]}
     49default build.jobs {${buildmakejobs}}
    4750default build.pre_args {${build.target}}
    4851default build.target "all"
    4952
     
    9193    }
    9294}
    9395
     96proc build_getmakejobs {args} {
     97    if {![exists build.jobs]} {
     98       return ""
     99    }
     100    set jobs [option build.jobs]
     101    if {$jobs == 1} {
     102       return ""
     103    }
     104    if {[exists build.max_jobs]} {
     105       if {$jobs > [option build.max_jobs]} {
     106           set jobs [option build.max_jobs]
     107       }
     108    }
     109    return " -j$jobs"
     110}
     111
    94112proc build_start {args} {
    95113    global UI_PREFIX
    96114