Changeset 51530


Ignore:
Timestamp:
May 27, 2009, 3:48:31 PM (11 years ago)
Author:
ryandesign@…
Message:

minivmac portfiles: whitespace changes only (tabs to spaces)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/emulators/minivmac/Portfile

    r44609 r51530  
    11# $Id$
    22
    3 PortSystem          1.0
     3PortSystem              1.0
    44
    5 name                minivmac
    6 version             2.8.2
    7 revision            2
    8 categories          emulators aqua
    9 maintainers         ryandesign
    10 homepage            http://minivmac.sourceforge.net/
    11 master_sites        sourceforge
    12 use_configure       no
    13 worksrcdir          projects/bgcmachs
     5name                    minivmac
     6version                 2.8.2
     7revision                2
     8categories              emulators aqua
     9maintainers             ryandesign
     10homepage                http://minivmac.sourceforge.net/
     11master_sites            sourceforge
     12use_configure           no
     13worksrcdir              projects/bgcmachs
    1414build.target
    15 platforms           darwin
    16 universal_variant   no
    17 use_parallel_build  yes
     15platforms               darwin
     16universal_variant       no
     17use_parallel_build      yes
    1818
    1919description \
    20         a Mac 128K, Mac 512K, Mac 512KE, Mac Plus and Mac SE emulator
     20    a Mac 128K, Mac 512K, Mac 512KE, Mac Plus and Mac SE emulator
    2121
    2222long_description \
    23         Mini vMac is a Macintosh emulator. It emulates the earliest Macs, \
    24         from the original Mac 128K (built 1984-85) to the Mac SE (1987-1990). \
    25         The default is to emulate a Mac Plus (1986-1990)\; this is also \
    26         the best-tested and therefore recommended emulation.
     23    Mini vMac is a Macintosh emulator. It emulates the earliest Macs, \
     24    from the original Mac 128K (built 1984-85) to the Mac SE (1987-1990). \
     25    The default is to emulate a Mac Plus (1986-1990)\; this is also \
     26    the best-tested and therefore recommended emulation.
    2727
    2828distfiles \
    29         ${distname}.prj.tgz \
    30         ${distname}.src.tgz
     29    ${distname}.prj.tgz \
     30    ${distname}.src.tgz
    3131
    3232checksums \
    33         ${distname}.prj.tgz \
    34                 md5 cfd3c6b60080d2184d6895b84c616fbf \
    35                 sha1 8aa54b5708e280d1ed0c1f68aca8a38965cad4e2 \
    36                 rmd160 d0e8d7734109b12caaf909efea231fe2a3a55979 \
    37         ${distname}.src.tgz \
    38                 md5 ff6e67f654f09098ffbb8f26a5a7ae20 \
    39                 sha1 6cdc4b514f3b45869a9fd2c5ee528499e772ad5e \
    40                 rmd160 dc7a827fc1821014b2ac0f9b5cd025e1133d83ef
     33    ${distname}.prj.tgz \
     34        md5    cfd3c6b60080d2184d6895b84c616fbf \
     35        sha1    8aa54b5708e280d1ed0c1f68aca8a38965cad4e2 \
     36        rmd160 d0e8d7734109b12caaf909efea231fe2a3a55979 \
     37    ${distname}.src.tgz \
     38        md5    ff6e67f654f09098ffbb8f26a5a7ae20 \
     39        sha1    6cdc4b514f3b45869a9fd2c5ee528499e772ad5e \
     40        rmd160 dc7a827fc1821014b2ac0f9b5cd025e1133d83ef
    4141
    42 set romfile vMac.ROM
    43 set romfile_model "Macintosh Plus or 512Ke"
     42set romfile             vMac.ROM
     43set romfile_model       "Macintosh Plus or 512Ke"
    4444
    4545post-extract {
    46         reinplace "s|maintained by unknown|maintained by MacPorts|" \
    47                 ${worksrcpath}/config/Info.plist
    48         reinplace "s|#define kMaintainerName \"unknown\"|#define kMaintainerName \"MacPorts\"|" \
    49                 ${worksrcpath}/config/CNFGGLOB.h
     46    reinplace "s|maintained by unknown|maintained by MacPorts|" \
     47        ${worksrcpath}/config/Info.plist
     48    reinplace "s|#define kMaintainerName \"unknown\"|#define kMaintainerName \"MacPorts\"|" \
     49        ${worksrcpath}/config/CNFGGLOB.h
    5050}
    5151
    5252destroot {
    53         xinstall -m 755 -d ${destroot}${applications_dir}
    54         file copy ${worksrcpath}/minivmac.app \
    55                 ${destroot}${applications_dir}/Mini\ vMac.app
     53    xinstall -m 755 -d ${destroot}${applications_dir}
     54    file copy ${worksrcpath}/minivmac.app \
     55        ${destroot}${applications_dir}/Mini\ vMac.app
    5656}
    5757
    5858post-install {
    59         if { ! [file exists ${applications_dir}/${romfile}] } {
    60                 ui_msg "**************************************************************"
    61                 ui_msg "Mini vMac requires a ROM file from the type of machine you're"
    62                 ui_msg "emulating in order to work. The ROM file is not included with"
    63                 ui_msg "this package because it is copyrighted Apple software."
    64                 ui_msg "Download the CopyRoms program from the Mini vMac web site"
    65                 ui_msg "(${homepage} > More > Extras)"
    66                 ui_msg "and transfer it to a real physical ${romfile_model}"
    67                 ui_msg "that you own. Run the CopyRoms program there, then transfer"
    68                 ui_msg "the ROM file back to this Mac, name it ${romfile},"
    69                 ui_msg "and put it in ${applications_dir}."
    70                 ui_msg "**************************************************************"
    71         }
     59    if { ! [file exists ${applications_dir}/${romfile}] } {
     60        ui_msg "**************************************************************"
     61        ui_msg "Mini vMac requires a ROM file from the type of machine you're"
     62        ui_msg "emulating in order to work. The ROM file is not included with"
     63        ui_msg "this package because it is copyrighted Apple software."
     64        ui_msg "Download the CopyRoms program from the Mini vMac web site"
     65        ui_msg "(${homepage} > More > Extras)"
     66        ui_msg "and transfer it to a real physical ${romfile_model}"
     67        ui_msg "that you own. Run the CopyRoms program there, then transfer"
     68        ui_msg "the ROM file back to this Mac, name it ${romfile},"
     69        ui_msg "and put it in ${applications_dir}."
     70        ui_msg "**************************************************************"
     71    }
    7272}
    7373
    7474if { ![variant_isset mac128k] && ![variant_isset mac512k] && ![variant_isset mac512ke] && ![variant_isset macse] } {
    75         default_variants +macplus
     75    default_variants +macplus
    7676}
    7777
    7878variant mac128k conflicts mac512k mac512ke macplus macse description {Emulate a Macintosh with 128K RAM and 2 drives} {
    79         patchfiles-append patch-CNFGGLOB.h-mac128k.diff
    80         set romfile Mac128K.ROM
    81         set romfile_model "Macintosh 128K or 512K"
     79    patchfiles-append patch-CNFGGLOB.h-mac128k.diff
     80    set romfile Mac128K.ROM
     81    set romfile_model "Macintosh 128K or 512K"
    8282}
    8383
    8484variant mac512k conflicts mac128k mac512ke macplus macse description {Emulate a Macintosh 512K with 512K RAM and 2 drives} {
    85         patchfiles-append patch-CNFGGLOB.h-mac512k.diff
    86         set romfile Mac128K.ROM
    87         set romfile_model "Macintosh 128K or 512K"
     85    patchfiles-append patch-CNFGGLOB.h-mac512k.diff
     86    set romfile Mac128K.ROM
     87    set romfile_model "Macintosh 128K or 512K"
    8888}
    8989
    9090variant mac512ke conflicts mac128k mac512k macplus macse description {Emulate a Macintosh 512Ke with 512K RAM and 6 drives} {
    91         patchfiles-append patch-CNFGGLOB.h-mac512ke.diff
     91    patchfiles-append patch-CNFGGLOB.h-mac512ke.diff
    9292}
    9393
    9494variant macplus conflicts mac128k mac512k mac512ke macse description {Emulate a Macintosh Plus with 4 MB RAM and 6 drives (default)} {
    95         # Mac Plus emulation is the default so we don't need to do anything here
     95    # Mac Plus emulation is the default so we don't need to do anything here
    9696}
    9797
    9898variant macse conflicts mac128k mac512k mac512ke macplus description {Emulate a Macintosh SE with 4 MB RAM and 6 drives} {
    99         patchfiles-append patch-CNFGGLOB.h-macse.diff
    100         set romfile MacSE.ROM
    101         set romfile_model "Macintosh SE"
     99    patchfiles-append patch-CNFGGLOB.h-macse.diff
     100    set romfile MacSE.ROM
     101    set romfile_model "Macintosh SE"
    102102}
    103103
    104 livecheck.check     regex
    105 livecheck.url       ${homepage}download.html
    106 livecheck.regex     ${name}-(\[0-9.\]+)\\.src
     104livecheck.check         regex
     105livecheck.url           ${homepage}download.html
     106livecheck.regex         ${name}-(\[0-9.\]+)\\.src
  • users/ryandesign/minivmac-devel/Portfile

    r51490 r51530  
    11# $Id$
    22
    3 PortSystem          1.0
     3PortSystem              1.0
    44
    55name                    minivmac-devel
     
    99set version_date        [lindex [split ${version} -] 1]
    1010set version_short_date  [string range ${version_date} 2 end]
    11 categories          emulators aqua
    12 maintainers         ryandesign
    13 homepage            http://minivmac.sourceforge.net/
    14 use_zip             yes
    15 platforms           macosx
    16 universal_variant   no
     11categories              emulators aqua
     12maintainers             ryandesign
     13homepage                http://minivmac.sourceforge.net/
     14use_zip                 yes
     15platforms               macosx
     16universal_variant       no
    1717build.target
    18 use_parallel_build  yes
     18use_parallel_build      yes
    1919dist_subdir             ${my_name}
    2020
    2121description \
    22         a Mac 128K, Mac 512K, Mac 512KE, Mac Plus and Mac SE emulator
     22    a Mac 128K, Mac 512K, Mac 512KE, Mac Plus and Mac SE emulator
    2323
    2424long_description \
    25         Mini vMac is a Macintosh emulator. It emulates the earliest Macs, \
    26         from the original Mac 128K (built 1984-85) to the Mac SE (1987-1990). \
    27         The default is to emulate a Mac Plus (1986-1990)\; this is also \
    28         the best-tested and therefore recommended emulation.
     25    Mini vMac is a Macintosh emulator. It emulates the earliest Macs, \
     26    from the original Mac 128K (built 1984-85) to the Mac SE (1987-1990). \
     27    The default is to emulate a Mac Plus (1986-1990)\; this is also \
     28    the best-tested and therefore recommended emulation.
    2929
    3030master_sites            sourceforge:${my_name}
    3131
    32 distname                                    ${my_name}${version_short_date}
    33 set my_src                                  ${distname}.src
    34 set my_src_compressed                       ${my_src}.zip
    35 set my_icons                                icnsosx-1.0.0
    36 set my_icons_compressed                     ${my_icons}.zip
     32distname                ${my_name}${version_short_date}
     33set my_src              ${distname}.src
     34set my_src_compressed   ${my_src}.zip
     35set my_icons            icnsosx-1.0.0
     36set my_icons_compressed ${my_icons}.zip
    3737
    3838distfiles \
    39         ${my_src_compressed} \
    40         ${my_icons_compressed}
     39    ${my_src_compressed} \
     40    ${my_icons_compressed}
    4141
    4242checksums \
    43         ${my_src_compressed} \
    44                 md5     7defdcb859cdda0df3bdc3c252370a70 \
    45                 sha1    f4a80b326380746b88993d53eeb6a7d46768358b \
    46                 rmd160  828eb032ea3ac0f52054d0c8af1d6910ded1dff0 \
    47         ${my_icons_compressed} \
    48                 md5 2af006506de7549be14f94317918d59a \
    49                 sha1 4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
    50                 rmd160 cef6d7d7578464538d0042b0d98379ae7f18fab7
     43    ${my_src_compressed} \
     44        md5     7defdcb859cdda0df3bdc3c252370a70 \
     45        sha1    f4a80b326380746b88993d53eeb6a7d46768358b \
     46        rmd160  828eb032ea3ac0f52054d0c8af1d6910ded1dff0 \
     47    ${my_icons_compressed} \
     48        md5    2af006506de7549be14f94317918d59a \
     49        sha1    4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
     50        rmd160 cef6d7d7578464538d0042b0d98379ae7f18fab7
    5151
    5252depends_build \
    53         bin:expect:expect
     53    bin:expect:expect
    5454
    5555patchfiles \
    56         patch-build.diff
    57 
    58 set my_appdir "${applications_dir}/Mini vMac"
    59 set romfile vMac.ROM
    60 set romfile_model "Macintosh Plus or 512Ke"
    61 set my_options_file options.txt
    62 set my_base_options "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx -nex"
    63 set my_target ""
    64 set my_machine Plus
     56    patch-build.diff
     57
     58set my_appdir           "${applications_dir}/Mini vMac"
     59set romfile             vMac.ROM
     60set romfile_model       "Macintosh Plus or 512Ke"
     61set my_options_file     options.txt
     62set my_base_options     "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx -nex"
     63set my_target           ""
     64set my_machine          Plus
    6565set my_variation_machine mac[string tolower ${my_machine}]
    6666
    6767platform powerpc {
    68         set my_target mach
     68    set my_target mach
    6969}
    7070
    7171platform i386 {
    72         set my_target imch
     72    set my_target imch
    7373}
    7474
    7575pre-fetch {
    76         if { ! [file exists ${my_appdir}/${romfile}] } {
    77                 ui_msg "**************************************************************"
    78                 ui_msg "Mini vMac requires a ROM file from the type of machine you're"
    79                 ui_msg "emulating in order to work. The ROM file is not included with"
    80                 ui_msg "this package because it is copyrighted Apple software."
    81                 ui_msg "Download the CopyRoms program from the Mini vMac web site"
    82                 ui_msg "(${homepage} > More > Extras)"
    83                 ui_msg "and transfer it to a real physical ${romfile_model}"
    84                 ui_msg "that you own. Run the CopyRoms program there, then transfer"
    85                 ui_msg "the ROM file back to this Mac, name it ${romfile},"
    86                 ui_msg "and put it in ${my_appdir}."
    87                 ui_msg "**************************************************************"
    88                 return -code error "missing ROM file"
    89         }
     76    if { ! [file exists ${my_appdir}/${romfile}] } {
     77        ui_msg "**************************************************************"
     78        ui_msg "Mini vMac requires a ROM file from the type of machine you're"
     79        ui_msg "emulating in order to work. The ROM file is not included with"
     80        ui_msg "this package because it is copyrighted Apple software."
     81        ui_msg "Download the CopyRoms program from the Mini vMac web site"
     82        ui_msg "(${homepage} > More > Extras)"
     83        ui_msg "and transfer it to a real physical ${romfile_model}"
     84        ui_msg "that you own. Run the CopyRoms program there, then transfer"
     85        ui_msg "the ROM file back to this Mac, name it ${romfile},"
     86        ui_msg "and put it in ${my_appdir}."
     87        ui_msg "**************************************************************"
     88        return -code error "missing ROM file"
     89    }
    9090}
    9191
    9292post-extract {
    93         xinstall -W ${filespath} attach.exp runbuild.sh ${workpath}
    94        
    95         # The disk image mounter likes images to have the .img extension.
    96         file rename ${workpath}/${my_src}/${my_src}.dsk ${workpath}/src.img
    97        
    98         # Mount the source disk image.
    99         set my_src_disk_mount [my_attach_disk_image ${workpath}/src.img 0]
    100        
    101         # Copy the source from the disk image into the workpath.
    102         file mkdir ${worksrcpath}
    103         foreach thing {COPYING.txt README.txt output projects source} {
    104                 copy ${my_src_disk_mount}/${thing} ${worksrcpath}
    105         }
    106        
    107         # Unmount the disk image.
    108         my_detach_disk_image ${my_src_disk_mount}
    109        
    110         # Convert CR to LF line endings.
    111         fs-traverse thing ${worksrcpath} {
    112                 if {[file isfile ${thing}]} {
    113                         foreach extension {.a .c .h .i .plist .r Makefile} {
    114                                 if {[string match "*${extension}" ${thing}]} {
    115                                         reinplace "s/\r/\\\n/g" ${thing}
    116                                 }
    117                         }
    118                 }
    119         }
     93    xinstall -W ${filespath} attach.exp runbuild.sh ${workpath}
     94   
     95    # The disk image mounter likes images to have the .img extension.
     96    file rename ${workpath}/${my_src}/${my_src}.dsk ${workpath}/src.img
     97   
     98    # Mount the source disk image.
     99    set my_src_disk_mount [my_attach_disk_image ${workpath}/src.img 0]
     100   
     101    # Copy the source from the disk image into the workpath.
     102    file mkdir ${worksrcpath}
     103    foreach thing {COPYING.txt README.txt output projects source} {
     104        copy ${my_src_disk_mount}/${thing} ${worksrcpath}
     105    }
     106   
     107    # Unmount the disk image.
     108    my_detach_disk_image ${my_src_disk_mount}
     109   
     110    # Convert CR to LF line endings.
     111    fs-traverse thing ${worksrcpath} {
     112        if {[file isfile ${thing}]} {
     113            foreach extension {.a .c .h .i .plist .r Makefile} {
     114                if {[string match "*${extension}" ${thing}]} {
     115                    reinplace "s/\r/\\\n/g" ${thing}
     116                }
     117            }
     118        }
     119    }
    120120}
    121121
    122122configure {
    123         # Build the build system.
    124         if {![file exists ${worksrcpath}/Build.app]} {
    125                 set my_cmd "cd ${worksrcpath}/projects/gcc_${my_target} && make"
    126                 ui_debug ${my_cmd}
    127                 system ${my_cmd}
    128                 file rename ${worksrcpath}/projects/gcc_${my_target}/Build.app ${worksrcpath}
    129         }
    130        
    131         # Write our options file.
    132         set my_variation [my_get_variation]
    133         set my_options "${my_base_options} -t ${my_target} -m ${my_machine} -n ${my_variation}"
    134         set my_options_file_id [open ${worksrcpath}/${my_options_file} "w"]
    135         puts -nonewline ${my_options_file_id} ${my_options}
    136         close ${my_options_file_id}
    137        
    138         # Run the build system.
    139         set my_cmd "${workpath}/runbuild.sh ${worksrcpath} ${worksrcpath}/${my_options_file}"
    140         ui_debug ${my_cmd}
    141         system ${my_cmd}
    142        
    143         # Get the build product.
    144         file rename ${worksrcpath}/output/${my_variation} ${workpath}
     123    # Build the build system.
     124    if {![file exists ${worksrcpath}/Build.app]} {
     125        set my_cmd "cd ${worksrcpath}/projects/gcc_${my_target} && make"
     126        ui_debug ${my_cmd}
     127        system ${my_cmd}
     128        file rename ${worksrcpath}/projects/gcc_${my_target}/Build.app ${worksrcpath}
     129    }
     130   
     131    # Write our options file.
     132    set my_variation [my_get_variation]
     133    set my_options "${my_base_options} -t ${my_target} -m ${my_machine} -n ${my_variation}"
     134    set my_options_file_id [open ${worksrcpath}/${my_options_file} "w"]
     135    puts -nonewline ${my_options_file_id} ${my_options}
     136    close ${my_options_file_id}
     137   
     138    # Run the build system.
     139    set my_cmd "${workpath}/runbuild.sh ${worksrcpath} ${worksrcpath}/${my_options_file}"
     140    ui_debug ${my_cmd}
     141    system ${my_cmd}
     142   
     143    # Get the build product.
     144    file rename ${worksrcpath}/output/${my_variation} ${workpath}
    145145}
    146146
    147147pre-build {
    148         set my_variation [my_get_variation]
    149         build.dir ${workpath}/${my_variation}
     148    set my_variation [my_get_variation]
     149    build.dir ${workpath}/${my_variation}
    150150}
    151151
    152152post-build {
    153         set my_variation [my_get_variation]
    154         eval xinstall -m 644 [glob ${workpath}/${my_icons}/icons/*.icns] ${workpath}/${my_variation}/minivmac.app/Contents/Resources
     153    set my_variation [my_get_variation]
     154    eval xinstall -m 644 [glob ${workpath}/${my_icons}/icons/*.icns] ${workpath}/${my_variation}/minivmac.app/Contents/Resources
    155155}
    156156
    157157destroot {
    158         set my_variation [my_get_variation]
    159         xinstall -d ${destroot}${my_appdir}
    160         file copy ${workpath}/${my_variation}/minivmac.app \
    161                 ${destroot}${my_appdir}/Mini\ vMac\ ${my_machine}.app
     158    set my_variation [my_get_variation]
     159    xinstall -d ${destroot}${my_appdir}
     160    file copy ${workpath}/${my_variation}/minivmac.app \
     161        ${destroot}${my_appdir}/Mini\ vMac\ ${my_machine}.app
    162162}
    163163
    164164if { ![variant_isset mac128k] && ![variant_isset mac512k] && ![variant_isset mac512ke] && ![variant_isset macse] } {
    165         default_variants +macplus
     165    default_variants +macplus
    166166}
    167167
    168168variant mac128k conflicts mac512k mac512ke macplus macse description {Emulate a Macintosh with 128K RAM and 2 drives} {
    169         patchfiles-append patch-CNFGGLOB.h-mac128k.diff
    170         set romfile Mac128K.ROM
    171         set romfile_model "Macintosh 128K or 512K"
     169    patchfiles-append patch-CNFGGLOB.h-mac128k.diff
     170    set romfile Mac128K.ROM
     171    set romfile_model "Macintosh 128K or 512K"
    172172}
    173173
    174174variant mac512k conflicts mac128k mac512ke macplus macse description {Emulate a Macintosh 512K with 512K RAM and 2 drives} {
    175         patchfiles-append patch-CNFGGLOB.h-mac512k.diff
    176         set romfile Mac128K.ROM
    177         set romfile_model "Macintosh 128K or 512K"
     175    patchfiles-append patch-CNFGGLOB.h-mac512k.diff
     176    set romfile Mac128K.ROM
     177    set romfile_model "Macintosh 128K or 512K"
    178178}
    179179
    180180variant mac512ke conflicts mac128k mac512k macplus macse description {Emulate a Macintosh 512Ke with 512K RAM and 6 drives} {
    181         patchfiles-append patch-CNFGGLOB.h-mac512ke.diff
     181    patchfiles-append patch-CNFGGLOB.h-mac512ke.diff
    182182}
    183183
    184184variant macplus conflicts mac128k mac512k mac512ke macse description {Emulate a Macintosh Plus with 4 MB RAM and 6 drives (default)} {
    185         # Mac Plus emulation is the default so we don't need to do anything here
     185    # Mac Plus emulation is the default so we don't need to do anything here
    186186}
    187187
    188188variant macse conflicts mac128k mac512k mac512ke macplus description {Emulate a Macintosh SE with 4 MB RAM and 6 drives} {
    189         patchfiles-append patch-CNFGGLOB.h-macse.diff
    190         set romfile MacSE.ROM
    191         set romfile_model "Macintosh SE"
     189    patchfiles-append patch-CNFGGLOB.h-macse.diff
     190    set romfile MacSE.ROM
     191    set romfile_model "Macintosh SE"
    192192}
    193193
    194194proc my_attach_disk_image {disk_image allow_writing} {
    195         global name workpath
    196         set mountpoint [exec mktemp -d -q -t ${name}]
    197         # Use this expect script instead of using hdiutil directly, because the
    198         # system disk image has a license agreement we must agree to.
    199         system "${workpath}/attach.exp '${disk_image}' '${mountpoint}' '${allow_writing}'"
    200         return ${mountpoint}
     195    global name workpath
     196    set mountpoint [exec mktemp -d -q -t ${name}]
     197    # Use this expect script instead of using hdiutil directly, because the
     198    # system disk image has a license agreement we must agree to.
     199    system "${workpath}/attach.exp '${disk_image}' '${mountpoint}' '${allow_writing}'"
     200    return ${mountpoint}
    201201}
    202202
    203203proc my_detach_disk_image {mountpoint} {
    204         system "hdiutil detach ${mountpoint} -force"
    205         file delete -force ${mountpoint}
     204    system "hdiutil detach ${mountpoint} -force"
     205    file delete -force ${mountpoint}
    206206}
    207207
    208208proc my_get_variation {} {
    209         global version revision my_variation_machine
    210         # Due to limitations of the build system, the variation name cannot be longer than 27 characters.
    211         return ${version}_${revision}-${my_variation_machine}
    212 }
    213 
    214 livecheck.check     regex
    215 livecheck.version   ${version_short_date}
    216 livecheck.url       ${homepage}develop/
    217 livecheck.regex     ${my_name}(\[0-9\]+)\\.src
     209    global version revision my_variation_machine
     210    # Due to limitations of the build system, the variation name cannot be longer than 27 characters.
     211    return ${version}_${revision}-${my_variation_machine}
     212}
     213
     214livecheck.check         regex
     215livecheck.version       ${version_short_date}
     216livecheck.url           ${homepage}develop/
     217livecheck.regex         ${my_name}(\[0-9\]+)\\.src
  • users/ryandesign/minivmac/Portfile

    r44609 r51530  
    11# $Id$
    22
    3 PortSystem          1.0
    4 
    5 name                minivmac
    6 version             3.0.4
    7 revision            1
    8 categories          emulators aqua
    9 maintainers         ryandesign
    10 homepage            http://minivmac.sourceforge.net/
    11 use_zip             yes
    12 platforms           macosx
    13 universal_variant   no
     3PortSystem              1.0
     4
     5name                    minivmac
     6version                 3.0.4
     7revision                1
     8categories              emulators aqua
     9maintainers             ryandesign
     10homepage                http://minivmac.sourceforge.net/
     11use_zip                 yes
     12platforms               macosx
     13universal_variant       no
    1414build.target
    15 use_parallel_build  yes
     15use_parallel_build      yes
    1616
    1717description \
    18         a Mac 128K, Mac 512K, Mac 512KE, Mac Plus and Mac SE emulator
     18    a Mac 128K, Mac 512K, Mac 512KE, Mac Plus and Mac SE emulator
    1919
    2020long_description \
    21         Mini vMac is a Macintosh emulator. It emulates the earliest Macs, \
    22         from the original Mac 128K (built 1984-85) to the Mac SE (1987-1990). \
    23         The default is to emulate a Mac Plus (1986-1990)\; this is also \
    24         the best-tested and therefore recommended emulation.
     21    Mini vMac is a Macintosh emulator. It emulates the earliest Macs, \
     22    from the original Mac 128K (built 1984-85) to the Mac SE (1987-1990). \
     23    The default is to emulate a Mac Plus (1986-1990)\; this is also \
     24    the best-tested and therefore recommended emulation.
    2525
    2626master_sites \
    27         sourceforge:${name}:minivmac \
    28         http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-International/Macintosh/System/Full_Installs/:apple
     27    sourceforge:${name}:minivmac \
     28    http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-International/Macintosh/System/Full_Installs/:apple
    2929
    3030set my_src                                  ${distname}.src
     
    4141
    4242distfiles \
    43         ${my_src_compressed}:minivmac \
    44         ${my_icons_compressed}:minivmac \
    45         ${my_autoquit_compressed}:minivmac \
    46         ${my_system_disk_container_compressed}:apple
     43    ${my_src_compressed}:minivmac \
     44    ${my_icons_compressed}:minivmac \
     45    ${my_autoquit_compressed}:minivmac \
     46    ${my_system_disk_container_compressed}:apple
    4747
    4848extract.only \
    49         ${my_src_compressed} \
    50         ${my_icons_compressed} \
    51         ${my_autoquit_compressed}
     49    ${my_src_compressed} \
     50    ${my_icons_compressed} \
     51    ${my_autoquit_compressed}
    5252
    5353checksums \
    54         ${my_src_compressed} \
    55                 md5 ab308459e98bd5103ad8bbb7dd158eb6 \
    56                 sha1 ff99aa72da0868a5306631f0d06ae190cbd2a03a \
    57                 rmd160 b8f1f5269d21835ff3e9e428da12a7b6c224e60e \
    58         ${my_bootstrap_compressed} \
    59                 md5 298565ec1ccfe6876768156aaf5f76a0 \
    60                 sha1 34212dedb1cfb744e6ca8124693f2f6e40094833 \
    61                 rmd160 042eacfb9ec853589d661c86ffb99d509061eb0f \
    62         ${my_icons_compressed} \
    63                 md5 2af006506de7549be14f94317918d59a \
    64                 sha1 4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
    65                 rmd160 cef6d7d7578464538d0042b0d98379ae7f18fab7 \
    66         ${my_autoquit_compressed} \
    67                 md5 eebe87a27d6db8e8f247f0fffe0f2bd5 \
    68                 sha1 8199e1da12d01fc210ae1eaa50f794e5b8c479c1 \
    69                 rmd160 f493a59fd637caa8a7937fbefaf6ebdf4a07c7f5 \
    70         ${my_system_disk_container_compressed} \
    71                 md5 5e7b4c0ce13e65546eb795c35879751a \
    72                 sha1 bf37fde76dfd9d4ed35526954c149566d761c2a6 \
    73                 rmd160 08788cbcca023ea9a0713ecec4781c35aa5a9185
     54    ${my_src_compressed} \
     55        md5    ab308459e98bd5103ad8bbb7dd158eb6 \
     56        sha1    ff99aa72da0868a5306631f0d06ae190cbd2a03a \
     57        rmd160 b8f1f5269d21835ff3e9e428da12a7b6c224e60e \
     58    ${my_bootstrap_compressed} \
     59        md5    298565ec1ccfe6876768156aaf5f76a0 \
     60        sha1    34212dedb1cfb744e6ca8124693f2f6e40094833 \
     61        rmd160 042eacfb9ec853589d661c86ffb99d509061eb0f \
     62    ${my_icons_compressed} \
     63        md5    2af006506de7549be14f94317918d59a \
     64        sha1    4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
     65        rmd160 cef6d7d7578464538d0042b0d98379ae7f18fab7 \
     66    ${my_autoquit_compressed} \
     67        md5    eebe87a27d6db8e8f247f0fffe0f2bd5 \
     68        sha1    8199e1da12d01fc210ae1eaa50f794e5b8c479c1 \
     69        rmd160 f493a59fd637caa8a7937fbefaf6ebdf4a07c7f5 \
     70    ${my_system_disk_container_compressed} \
     71        md5    5e7b4c0ce13e65546eb795c35879751a \
     72        sha1    bf37fde76dfd9d4ed35526954c149566d761c2a6 \
     73        rmd160 08788cbcca023ea9a0713ecec4781c35aa5a9185
    7474
    7575depends_build \
    76         port:macutil \
    77         bin:expect:expect
    78 
    79 set my_appdir "${applications_dir}/Mini vMac"
    80 set romfile vMac.ROM
    81 set romfile_model "Macintosh Plus or 512Ke"
    82 set my_mnvm_dat "${workpath}/${my_bootstrap}/Contents/mnvm_dat"
    83 set my_options_file options.txt
    84 set my_base_options "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx -nex"
    85 set my_target ""
    86 set my_machine Plus
     76    port:macutil \
     77    bin:expect:expect
     78
     79set my_appdir           "${applications_dir}/Mini vMac"
     80set romfile             vMac.ROM
     81set romfile_model       "Macintosh Plus or 512Ke"
     82set my_mnvm_dat         "${workpath}/${my_bootstrap}/Contents/mnvm_dat"
     83set my_options_file     options.txt
     84set my_base_options     "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx -nex"
     85set my_target           ""
     86set my_machine          Plus
    8787set my_variation_machine mac[string tolower ${my_machine}]
    8888
    8989platform powerpc {
    90         set my_target mach
     90    set my_target mach
    9191}
    9292
    9393platform i386 {
    94         set my_target imch
     94    set my_target imch
    9595}
    9696
    9797pre-fetch {
    98         if { ! [file exists ${my_appdir}/${romfile}] } {
    99                 ui_msg "**************************************************************"
    100                 ui_msg "Mini vMac requires a ROM file from the type of machine you're"
    101                 ui_msg "emulating in order to work. The ROM file is not included with"
    102                 ui_msg "this package because it is copyrighted Apple software."
    103                 ui_msg "Download the CopyRoms program from the Mini vMac web site"
    104                 ui_msg "(${homepage} > More > Extras)"
    105                 ui_msg "and transfer it to a real physical ${romfile_model}"
    106                 ui_msg "that you own. Run the CopyRoms program there, then transfer"
    107                 ui_msg "the ROM file back to this Mac, name it ${romfile},"
    108                 ui_msg "and put it in ${my_appdir}."
    109                 ui_msg "**************************************************************"
    110                 return -code error "missing ROM file"
    111         }
     98    if { ! [file exists ${my_appdir}/${romfile}] } {
     99        ui_msg "**************************************************************"
     100        ui_msg "Mini vMac requires a ROM file from the type of machine you're"
     101        ui_msg "emulating in order to work. The ROM file is not included with"
     102        ui_msg "this package because it is copyrighted Apple software."
     103        ui_msg "Download the CopyRoms program from the Mini vMac web site"
     104        ui_msg "(${homepage} > More > Extras)"
     105        ui_msg "and transfer it to a real physical ${romfile_model}"
     106        ui_msg "that you own. Run the CopyRoms program there, then transfer"
     107        ui_msg "the ROM file back to this Mac, name it ${romfile},"
     108        ui_msg "and put it in ${my_appdir}."
     109        ui_msg "**************************************************************"
     110        return -code error "missing ROM file"
     111    }
    112112}
    113113
    114114post-extract {
    115         system "tar -x -z -C ${workpath} -f ${distpath}/${my_bootstrap_compressed}"
    116        
    117         xinstall -W ${filespath} attach.exp demacbinary.sh ${workpath}
    118        
    119         system "${workpath}/demacbinary.sh ${distpath}/${my_system_disk_container_compressed} ${workpath}"
    120        
    121         file mkdir ${my_mnvm_dat}
    122         ln -s ${my_appdir}/${romfile} ${my_mnvm_dat}
    123        
    124         # Copy the Disk Tools and Tidbits images from the container image.
    125         set my_system_disk_container_mount [my_attach_disk_image ${workpath}/${my_system_disk_container} 0]
    126         file copy "${my_system_disk_container_mount}/Disk Tools.image" ${workpath}/startup.img
    127         file copy "${my_system_disk_container_mount}/Tidbits.image" ${workpath}/tidbits.img
    128         my_detach_disk_image ${my_system_disk_container_mount}
    129        
    130         # The disk image mounter likes images to have the .img extension.
    131         file rename ${workpath}/${my_src}/${my_src}.dsk ${workpath}/src.img
    132         file rename ${workpath}/${my_autoquit}/${my_autoquit}.dsk ${workpath}/autoquit.img
    133        
    134         # Mount the startup disk and make room on it for our things.
    135         set my_startup_disk_mount [my_attach_disk_image ${workpath}/startup.img 1]
    136         file delete "${my_startup_disk_mount}/Apple HD SC Setup" "${my_startup_disk_mount}/Disk First Aid"
    137        
    138         # Copy autoquit to the startup disk and make it open at startup.
    139         # Need to use ditto to preserve the resource fork.
    140         set my_autoquit_disk_mount [my_attach_disk_image ${workpath}/autoquit.img 0]
    141         set my_startup_disk_autoquit_dir "${my_startup_disk_mount}/autoquit"
    142         file mkdir "${my_startup_disk_autoquit_dir}"
    143         system "ditto --rsrc ${my_autoquit_disk_mount}/AutQuit7 ${my_startup_disk_autoquit_dir}"
    144         my_detach_disk_image ${my_autoquit_disk_mount}
    145         my_make_alias "${my_startup_disk_autoquit_dir}/AutQuit7" "${my_startup_disk_mount}/System Folder/Startup Items"
    146        
    147         # Mount the source disk.
    148         set my_src_disk_mount [my_attach_disk_image ${workpath}/src.img 1]
    149        
    150         # Copy TeachText to the source disk. (No room on the startup disk.)
    151         set my_tidbits_disk_mount [my_attach_disk_image ${workpath}/tidbits.img 0]
    152         system "ditto --rsrc ${my_tidbits_disk_mount}/TeachText ${my_src_disk_mount}"
    153         my_detach_disk_image ${my_tidbits_disk_mount}
    154        
    155         # Force a rebuild of the Desktop files, both to add info about TeachText and
    156         # to remove that of Apple HD SC Setup and Disk First Aid (to make more room).
    157         file delete ${my_startup_disk_mount}/Desktop ${my_src_disk_mount}/Desktop
    158        
    159         # Create an empty options file so we can make an alias to it.
    160         set my_options_file_id [open ${my_src_disk_mount}/${my_options_file} "w"]
    161         close ${my_options_file_id}
    162         system "/Developer/Tools/SetFile -c ttxt -t TEXT ${my_src_disk_mount}/${my_options_file}"
    163        
    164         # Have autoquit launch the build system. If there's an alias "app" in the same directory,
    165         # autoquit will open it. If there's also an alias "doc" in the same directory, autoquit
    166         # will open the document "doc" into the application "app".
    167         my_make_alias "${my_src_disk_mount}/Build" "${my_startup_disk_autoquit_dir}/app"
    168         # The build system doesn't support reading text files yet.
    169 #       my_make_alias "${my_src_disk_mount}/${my_options_file}" "${my_startup_disk_autoquit_dir}/doc"
    170         my_make_alias "${my_src_disk_mount}/${my_options_file}" "${my_startup_disk_mount}/System Folder/Startup Items"
    171        
    172         # Unmount disk images.
    173         my_detach_disk_image ${my_startup_disk_mount}
    174         my_detach_disk_image ${my_src_disk_mount}
    175        
    176         # Mini vMac looks for disks named disk1.dsk through disk3.dsk and automounts them.
    177         file rename "${workpath}/startup.img" "${my_mnvm_dat}/disk1.dsk"
     115    system "tar -x -z -C ${workpath} -f ${distpath}/${my_bootstrap_compressed}"
     116   
     117    xinstall -W ${filespath} attach.exp demacbinary.sh ${workpath}
     118   
     119    system "${workpath}/demacbinary.sh ${distpath}/${my_system_disk_container_compressed} ${workpath}"
     120   
     121    file mkdir ${my_mnvm_dat}
     122    ln -s ${my_appdir}/${romfile} ${my_mnvm_dat}
     123   
     124    # Copy the Disk Tools and Tidbits images from the container image.
     125    set my_system_disk_container_mount [my_attach_disk_image ${workpath}/${my_system_disk_container} 0]
     126    file copy "${my_system_disk_container_mount}/Disk Tools.image" ${workpath}/startup.img
     127    file copy "${my_system_disk_container_mount}/Tidbits.image" ${workpath}/tidbits.img
     128    my_detach_disk_image ${my_system_disk_container_mount}
     129   
     130    # The disk image mounter likes images to have the .img extension.
     131    file rename ${workpath}/${my_src}/${my_src}.dsk ${workpath}/src.img
     132    file rename ${workpath}/${my_autoquit}/${my_autoquit}.dsk ${workpath}/autoquit.img
     133   
     134    # Mount the startup disk and make room on it for our things.
     135    set my_startup_disk_mount [my_attach_disk_image ${workpath}/startup.img 1]
     136    file delete "${my_startup_disk_mount}/Apple HD SC Setup" "${my_startup_disk_mount}/Disk First Aid"
     137   
     138    # Copy autoquit to the startup disk and make it open at startup.
     139    # Need to use ditto to preserve the resource fork.
     140    set my_autoquit_disk_mount [my_attach_disk_image ${workpath}/autoquit.img 0]
     141    set my_startup_disk_autoquit_dir "${my_startup_disk_mount}/autoquit"
     142    file mkdir "${my_startup_disk_autoquit_dir}"
     143    system "ditto --rsrc ${my_autoquit_disk_mount}/AutQuit7 ${my_startup_disk_autoquit_dir}"
     144    my_detach_disk_image ${my_autoquit_disk_mount}
     145    my_make_alias "${my_startup_disk_autoquit_dir}/AutQuit7" "${my_startup_disk_mount}/System Folder/Startup Items"
     146   
     147    # Mount the source disk.
     148    set my_src_disk_mount [my_attach_disk_image ${workpath}/src.img 1]
     149   
     150    # Copy TeachText to the source disk. (No room on the startup disk.)
     151    set my_tidbits_disk_mount [my_attach_disk_image ${workpath}/tidbits.img 0]
     152    system "ditto --rsrc ${my_tidbits_disk_mount}/TeachText ${my_src_disk_mount}"
     153    my_detach_disk_image ${my_tidbits_disk_mount}
     154   
     155    # Force a rebuild of the Desktop files, both to add info about TeachText and
     156    # to remove that of Apple HD SC Setup and Disk First Aid (to make more room).
     157    file delete ${my_startup_disk_mount}/Desktop ${my_src_disk_mount}/Desktop
     158   
     159    # Create an empty options file so we can make an alias to it.
     160    set my_options_file_id [open ${my_src_disk_mount}/${my_options_file} "w"]
     161    close ${my_options_file_id}
     162    system "/Developer/Tools/SetFile -c ttxt -t TEXT ${my_src_disk_mount}/${my_options_file}"
     163   
     164    # Have autoquit launch the build system. If there's an alias "app" in the same directory,
     165    # autoquit will open it. If there's also an alias "doc" in the same directory, autoquit
     166    # will open the document "doc" into the application "app".
     167    my_make_alias "${my_src_disk_mount}/Build" "${my_startup_disk_autoquit_dir}/app"
     168    # The build system doesn't support reading text files yet.
     169#   my_make_alias "${my_src_disk_mount}/${my_options_file}" "${my_startup_disk_autoquit_dir}/doc"
     170    my_make_alias "${my_src_disk_mount}/${my_options_file}" "${my_startup_disk_mount}/System Folder/Startup Items"
     171   
     172    # Unmount disk images.
     173    my_detach_disk_image ${my_startup_disk_mount}
     174    my_detach_disk_image ${my_src_disk_mount}
     175   
     176    # Mini vMac looks for disks named disk1.dsk through disk3.dsk and automounts them.
     177    file rename "${workpath}/startup.img" "${my_mnvm_dat}/disk1.dsk"
    178178}
    179179
    180180configure {
    181         # Write our options file.
    182         set my_variation [my_get_variation]
    183         set my_options "${my_base_options} -t ${my_target} -m ${my_machine} -n ${my_variation}"
    184         set my_src_disk_mount [my_attach_disk_image ${workpath}/src.img 1]
    185         set my_options_file_id [open ${my_src_disk_mount}/${my_options_file} "w"]
    186         puts -nonewline ${my_options_file_id} ${my_options}
    187         close ${my_options_file_id}
    188         my_detach_disk_image ${my_src_disk_mount}
    189        
    190         # Move the source disk where Mini vMac will find it.
    191         file rename "${workpath}/src.img" "${my_mnvm_dat}/disk2.dsk"
    192        
    193         # Run the build system.
    194         system "'${workpath}/${my_bootstrap}/Contents/MacOS/minivmac'"
    195        
    196         # Give the source disk image the .img extension to appease the disk image mounter.
    197         file rename "${my_mnvm_dat}/disk2.dsk" "${workpath}/src.img"
    198        
    199         # Get the build product.
    200         set my_src_disk_mount [my_attach_disk_image ${workpath}/src.img 1]
    201         if {[file exists ${my_src_disk_mount}/output/${my_variation}]} {
    202                 file copy ${my_src_disk_mount}/output/${my_variation} ${workpath}
    203                 file delete -force ${my_src_disk_mount}/output/${my_variation}
    204         }
    205         my_detach_disk_image ${my_src_disk_mount}
     181    # Write our options file.
     182    set my_variation [my_get_variation]
     183    set my_options "${my_base_options} -t ${my_target} -m ${my_machine} -n ${my_variation}"
     184    set my_src_disk_mount [my_attach_disk_image ${workpath}/src.img 1]
     185    set my_options_file_id [open ${my_src_disk_mount}/${my_options_file} "w"]
     186    puts -nonewline ${my_options_file_id} ${my_options}
     187    close ${my_options_file_id}
     188    my_detach_disk_image ${my_src_disk_mount}
     189   
     190    # Move the source disk where Mini vMac will find it.
     191    file rename "${workpath}/src.img" "${my_mnvm_dat}/disk2.dsk"
     192   
     193    # Run the build system.
     194    system "'${workpath}/${my_bootstrap}/Contents/MacOS/minivmac'"
     195   
     196    # Give the source disk image the .img extension to appease the disk image mounter.
     197    file rename "${my_mnvm_dat}/disk2.dsk" "${workpath}/src.img"
     198   
     199    # Get the build product.
     200    set my_src_disk_mount [my_attach_disk_image ${workpath}/src.img 1]
     201    if {[file exists ${my_src_disk_mount}/output/${my_variation}]} {
     202        file copy ${my_src_disk_mount}/output/${my_variation} ${workpath}
     203        file delete -force ${my_src_disk_mount}/output/${my_variation}
     204    }
     205    my_detach_disk_image ${my_src_disk_mount}
    206206}
    207207
    208208pre-build {
    209         set my_variation [my_get_variation]
    210         build.dir ${workpath}/${my_variation}
     209    set my_variation [my_get_variation]
     210    build.dir ${workpath}/${my_variation}
    211211}
    212212
    213213post-build {
    214         set my_variation [my_get_variation]
    215         eval xinstall -m 644 [glob ${workpath}/${my_icons}/icons/*.icns] ${workpath}/${my_variation}/minivmac.app/Contents/Resources
     214    set my_variation [my_get_variation]
     215    eval xinstall -m 644 [glob ${workpath}/${my_icons}/icons/*.icns] ${workpath}/${my_variation}/minivmac.app/Contents/Resources
    216216}
    217217
    218218destroot {
    219         set my_variation [my_get_variation]
    220         xinstall -d ${destroot}${my_appdir}
    221         file copy ${workpath}/${my_variation}/minivmac.app \
    222                 ${destroot}${my_appdir}/Mini\ vMac\ ${my_machine}.app
     219    set my_variation [my_get_variation]
     220    xinstall -d ${destroot}${my_appdir}
     221    file copy ${workpath}/${my_variation}/minivmac.app \
     222        ${destroot}${my_appdir}/Mini\ vMac\ ${my_machine}.app
    223223}
    224224
    225225if { ![variant_isset mac128k] && ![variant_isset mac512k] && ![variant_isset mac512ke] && ![variant_isset macse] } {
    226         default_variants +macplus
     226    default_variants +macplus
    227227}
    228228
    229229variant mac128k conflicts mac512k mac512ke macplus macse description {Emulate a Macintosh with 128K RAM and 2 drives} {
    230         patchfiles-append patch-CNFGGLOB.h-mac128k.diff
    231         set romfile Mac128K.ROM
    232         set romfile_model "Macintosh 128K or 512K"
     230    patchfiles-append patch-CNFGGLOB.h-mac128k.diff
     231    set romfile Mac128K.ROM
     232    set romfile_model "Macintosh 128K or 512K"
    233233}
    234234
    235235variant mac512k conflicts mac128k mac512ke macplus macse description {Emulate a Macintosh 512K with 512K RAM and 2 drives} {
    236         patchfiles-append patch-CNFGGLOB.h-mac512k.diff
    237         set romfile Mac128K.ROM
    238         set romfile_model "Macintosh 128K or 512K"
     236    patchfiles-append patch-CNFGGLOB.h-mac512k.diff
     237    set romfile Mac128K.ROM
     238    set romfile_model "Macintosh 128K or 512K"
    239239}
    240240
    241241variant mac512ke conflicts mac128k mac512k macplus macse description {Emulate a Macintosh 512Ke with 512K RAM and 6 drives} {
    242         patchfiles-append patch-CNFGGLOB.h-mac512ke.diff
     242    patchfiles-append patch-CNFGGLOB.h-mac512ke.diff
    243243}
    244244
    245245variant macplus conflicts mac128k mac512k mac512ke macse description {Emulate a Macintosh Plus with 4 MB RAM and 6 drives (default)} {
    246         # Mac Plus emulation is the default so we don't need to do anything here
     246    # Mac Plus emulation is the default so we don't need to do anything here
    247247}
    248248
    249249variant macse conflicts mac128k mac512k mac512ke macplus description {Emulate a Macintosh SE with 4 MB RAM and 6 drives} {
    250         patchfiles-append patch-CNFGGLOB.h-macse.diff
    251         set romfile MacSE.ROM
    252         set romfile_model "Macintosh SE"
     250    patchfiles-append patch-CNFGGLOB.h-macse.diff
     251    set romfile MacSE.ROM
     252    set romfile_model "Macintosh SE"
    253253}
    254254
    255255proc my_attach_disk_image {disk_image allow_writing} {
    256         global name workpath
    257         set mountpoint [exec mktemp -d -q -t ${name}]
    258         # Use this expect script instead of using hdiutil directly, because the
    259         # system disk image has a license agreement we must agree to.
    260         system "${workpath}/attach.exp '${disk_image}' '${mountpoint}' '${allow_writing}'"
    261         return ${mountpoint}
     256    global name workpath
     257    set mountpoint [exec mktemp -d -q -t ${name}]
     258    # Use this expect script instead of using hdiutil directly, because the
     259    # system disk image has a license agreement we must agree to.
     260    system "${workpath}/attach.exp '${disk_image}' '${mountpoint}' '${allow_writing}'"
     261    return ${mountpoint}
    262262}
    263263
    264264proc my_detach_disk_image {mountpoint} {
    265         system "hdiutil detach ${mountpoint} -force"
    266         file delete -force ${mountpoint}
     265    system "hdiutil detach ${mountpoint} -force"
     266    file delete -force ${mountpoint}
    267267}
    268268
    269269proc my_make_alias {src dst} {
    270         set dst_is_dir [file isdirectory "${dst}"]
    271         if {${dst_is_dir}} {
    272                 set dst_dir "${dst}"
    273         } else {
    274                 set dst_dir "[file dirname ${dst}]"
    275         }
    276         system "osascript -e 'set src to POSIX file \"${src}\"' -e 'set dst_dir to POSIX file \"${dst_dir}\"' -e 'tell app \"Finder\" to make new alias file at dst_dir to src' -e 'return'"
    277         if {!${dst_is_dir}} {
    278                 file rename "[file join ${dst_dir} [file tail ${src}]]" "${dst}"
    279         }
     270    set dst_is_dir [file isdirectory "${dst}"]
     271    if {${dst_is_dir}} {
     272        set dst_dir "${dst}"
     273    } else {
     274        set dst_dir "[file dirname ${dst}]"
     275    }
     276    system "osascript -e 'set src to POSIX file \"${src}\"' -e 'set dst_dir to POSIX file \"${dst_dir}\"' -e 'tell app \"Finder\" to make new alias file at dst_dir to src' -e 'return'"
     277    if {!${dst_is_dir}} {
     278        file rename "[file join ${dst_dir} [file tail ${src}]]" "${dst}"
     279    }
    280280}
    281281
    282282proc my_get_variation {} {
    283         global name version revision my_variation_machine my_target
    284         return ${name}-${version}_${revision}-${my_variation_machine}-${my_target}
    285 }
    286 
    287 livecheck.check     regex
    288 livecheck.url       ${homepage}download.html
    289 livecheck.regex     ${name}-(\[0-9.\]+)\\.src
     283    global name version revision my_variation_machine my_target
     284    return ${name}-${version}_${revision}-${my_variation_machine}-${my_target}
     285}
     286
     287livecheck.check         regex
     288livecheck.url           ${homepage}download.html
     289livecheck.regex         ${name}-(\[0-9.\]+)\\.src
Note: See TracChangeset for help on using the changeset viewer.