Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Changeset 36708

Show
Ignore:
Timestamp:
05/12/08 20:27:25 (7 months ago)
Author:
ryandesign@…
Message:

Allow distfiles to be disk images with new "use_dmg yes" port option; #13509.

Location:
trunk/base/src/port1.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portextract.tcl

    r31028 r36708  
    5959 
    6060proc extract_init {args} { 
    61     global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir distfiles use_bzip2 use_zip workpath 
     61    global extract.only extract.dir extract.cmd extract.pre_args extract.post_args extract.mkdir distfiles use_bzip2 use_zip use_dmg workpath 
    6262 
    6363    # should the distfiles be extracted to worksrcpath instead? 
     
    7575        option extract.pre_args -q 
    7676        option extract.post_args "-d [option extract.dir]" 
     77    } elseif {[tbool use_dmg]} { 
     78        global worksrcdir 
     79        set dmg_tmp_dir [exec mktemp -d -q "/tmp/mports.XXXXXXXX"] 
     80        set dmg_mount ${dmg_tmp_dir}/${worksrcdir} 
     81        file mkdir ${dmg_mount} 
     82        option extract.cmd [binaryInPath "hdiutil"] 
     83        option extract.pre_args attach 
     84        option extract.post_args "-private -readonly -nobrowse -mountpoint ${dmg_mount} && [binaryInPath "cp"] -Rp ${dmg_mount} ${extract.dir} && ${extract.cmd} detach ${dmg_mount} && [binaryInPath "rmdir"] ${dmg_mount} ${dmg_tmp_dir}" 
    7785    } 
    7886} 
  • trunk/base/src/port1.0/portfetch.tcl

    r36688 r36708  
    4242 
    4343# define options: distname master_sites 
    44 options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 dist_subdir \ 
     44options master_sites patch_sites extract.suffix distfiles patchfiles use_zip use_bzip2 use_dmg dist_subdir \ 
    4545        fetch.type fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert \ 
    4646        master_sites.mirror_subdir patch_sites.mirror_subdir portname \ 
     
    9999option_proc use_bzip2 fix_extract_suffix 
    100100option_proc use_zip fix_extract_suffix 
     101option_proc use_dmg fix_extract_suffix 
    101102 
    102103proc fix_extract_suffix {option action args} { 
     
    110111                set extract.suffix .zip 
    111112            } 
     113            use_dmg { 
     114                set extract.suffix .dmg 
     115            } 
    112116        } 
    113117    } 
     
    120124set_ui_prefix 
    121125 
    122 # Given a distname, return a suffix based on the use_zip / use_bzip2 / extract.suffix options 
     126# Given a distname, return a suffix based on the use_zip / use_bzip2 / use_dmg / extract.suffix options 
    123127proc suffix {distname} { 
    124128    global extract.suffix fetch.type