Changeset 119864


Ignore:
Timestamp:
May 8, 2014, 2:22:19 PM (6 years ago)
Author:
ryandesign@…
Message:

minivmac-devel: update to 20140315, a development version of 3.4.0. With this
development series, hosting moves from SourceForge to the project's homepage.
The build system now supports opening a text file of configure arguments,
greatly simplifying the configuration process, removing the need for the
brittle AppleScript, and making the whole process much more robust.

Location:
trunk/dports/emulators/minivmac-devel
Files:
1 added
2 deleted
3 edited

Legend:

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

    r106506 r119864  
    1010set my_name             minivmac
    1111epoch                   3
    12 version                 3.3.2
    13 revision                1
     12version                 20140315
    1413set branch              [join [lrange [split ${version} .] 0 1] .]
    1514set my_version          [strsed ${version} {g/^20//}]
     
    1716maintainers             ryandesign
    1817license                 GPL-2
    19 homepage                http://minivmac.sourceforge.net/
     18homepage                http://www.gryphel.com/c/minivmac/
    2019use_zip                 yes
    2120platforms               macosx
     
    3938                        and SE FDHD, and work on Macintosh II emulation is in progress.
    4039
    41 master_sites            sourceforge:project/minivmac/minivmac/${version}:minivmacsource \
     40master_sites            http://www.gryphel.com/c/minivmac/c/:minivmacsource \
    4241                        sourceforge:project/minivmac/minivmac-extras/extras6:minivmacextras6 \
     42                        sourceforge:project/minivmac/minivmac-extras/extras11:minivmacextras11 \
    4343                        http://www.ryandesign.com/macports/distfiles/minivmac:bootstrap \
    4444                        http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/:apple
     
    4949set my_icons                                icnsosx-1.0.0
    5050set my_icons_distfile                       ${my_icons}.zip
     51set my_autoquit                             autquit7-1.3.1
     52set my_autoquit_distfile                    ${my_autoquit}.zip
    5153set my_system_disk_container                System_7.0.1.smi
    5254set my_system_disk_container_distfile       ${my_system_disk_container}.bin
     
    5557                        ${my_bootstrap_distfile}:bootstrap \
    5658                        ${my_icons_distfile}:minivmacextras6 \
     59                        ${my_autoquit_distfile}:minivmacextras11 \
    5760                        ${my_system_disk_container_distfile}:apple
    5861
    5962extract.only            ${my_src_distfile} \
    6063                        ${my_bootstrap_distfile} \
    61                         ${my_icons_distfile}
     64                        ${my_icons_distfile} \
     65                        ${my_autoquit_distfile}
    6266
    6367checksums               ${my_src_distfile} \
    64                         rmd160  a8a75847ed43a4d830930a98e3a20a2451144350 \
    65                         sha256  b5a02693a6106585622f2f928371f160c9b79656b834e7e25519de2d645eb1be \
     68                        rmd160  0798b4696764a04142b6d74a15e6abe06047f8d8 \
     69                        sha256  407708345d658bfd04c232844de9fcb42019257d7eb5f4339cbaeda226377778 \
    6670                        ${my_bootstrap_distfile} \
    6771                        rmd160  32e803a75d4f9ab6b7dfa5a7b1ec2ef9d3a057c2 \
     
    7175                        sha1    4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
    7276                        rmd160  cef6d7d7578464538d0042b0d98379ae7f18fab7 \
     77                        ${my_autoquit_distfile} \
     78                        rmd160  949ce06752fbcfa9a92787497dace45e7299eb41 \
     79                        sha256  a9aad37cfd2d6dbd4db5e307b8598348ba25aa5504aac968b8d570d5927e576a \
    7380                        ${my_system_disk_container_distfile} \
    7481                        md5     8a4776350b15b5a516cdf7dd18e27290 \
     
    7784
    7885depends_extract         port:bsdiff
     86
     87depends_build           port:timeout
     88
     89depends_skip_archcheck  bsdiff timeout
    7990
    8091set my_app_dir          "${applications_dir}/Mini vMac"
     
    146157build.dir               ${workpath}/build
    147158extract.mkdir           yes
    148 extract.asroot          yes
     159set my_mnvm_dat         "${worksrcpath}/${my_bootstrap_app}/Contents/mnvm_dat"
    149160
    150161post-extract {
     
    157168    set my_images {
    158169        {Disk Tools.image}    58368 eb1979132c843560ebab490faeb7520d9a94757ecef3121a21abace8d3ae63ff
    159         {Tidbits.image}     1902848 3e3600bed1b5c7c595bc176b5eaadcc8c1517032489efc548b9b781c0ee1f062
    160170    }
    161171#        {Fonts.image}        427264 8b06f086a96b75bd23b16ae018bd334696239cb56e65bfa20166ea00d14cdef0
     
    163173#        {Install 2.image}   1165056 0fc558475df55f3aed217d2eceebfa29e4a465a795807cd627b258740a9ec55b
    164174#        {Printing.image}    1533952 246cbf69ad1c2e588ee482fddec781135a67fbfe02734bb0f732eb055faa15fa
     175#        {Tidbits.image}     1902848 3e3600bed1b5c7c595bc176b5eaadcc8c1517032489efc548b9b781c0ee1f062
    165176   
    166177    # Extract the disk images from the system disk container image. `hdiutil` on OS X 10.8 Mountain Lion
     
    178189   
    179190    # Make the data directory, where Mini vMac looks for the files it needs.
    180     set my_mnvm_dat "${worksrcpath}/${my_bootstrap_app}/Contents/mnvm_dat"
    181191    file mkdir ${my_mnvm_dat}
    182192   
     
    184194    ln -s [my_real_rom_file] ${my_mnvm_dat}
    185195   
    186     # Symlink the disk images into the data directory with sequentially-numbered
    187     # names so Mini vMac will find them and automatically mount them.
    188     ln -s "${worksrcpath}/Disk Tools.image" "${my_mnvm_dat}/disk1.dsk"
    189     ln -s ${worksrcpath}/Tidbits.image "${my_mnvm_dat}/disk2.dsk"
    190     ln -s ${worksrcpath}/${my_src}/${my_src}.dsk "${my_mnvm_dat}/disk3.dsk"
    191    
    192196    # Use the prettier icon on the bootstrap app.
    193197    copy -force ${worksrcpath}/${my_icons}/icons//AppIcon.icns ${worksrcpath}/${my_bootstrap_app}/Contents/Resources/
     
    195199
    196200post-patch {
    197     # Place an 8192-byte TeachText file called "configure.args" (containing "@START@",
    198     # 8180 spaces, and "@END@") onto the Tidbits disk.
    199     system -W ${worksrcpath} "${prefix}/bin/bspatch Tidbits.image Tidbits.image.in '${filespath}/patch-Tidbits.image.bsdiff'"
    200    
    201     # Place an alias of the configure.args file in the Startup Items folder on the Disk Tools disk.
     201    # See README-binary-patchfiles.md in the files directory for instructions
     202    # on recreating these binary patchfiles.
     203   
     204    # Modify the AutQuit7 disk to have an alias "app" pointing to the MnvM_b34
     205    # application and an 8192-byte TeachText file called "doc" (containing
     206    # "@START@", 8180 periods and spaces, and "@END@").
     207    system -W ${worksrcpath}/${my_autoquit} "${prefix}/bin/bspatch '${my_autoquit}.dsk' '${my_autoquit}.dsk.tmp' '${filespath}/patch-${my_autoquit}.dsk.bsdiff'"
     208    move -force "${worksrcpath}/${my_autoquit}/${my_autoquit}.dsk.tmp" "${worksrcpath}/${my_autoquit}/${my_autoquit}.dsk"
     209   
     210    # Modify the Disk Tools disk to have an alias of AutQuit7 in the Startup
     211    # Items folder.
    202212    system -W ${worksrcpath} "${prefix}/bin/bspatch 'Disk Tools.image' 'Disk Tools.image.tmp' '${filespath}/patch-Disk Tools.image.bsdiff'"
    203213    move -force "${worksrcpath}/Disk Tools.image.tmp" "${worksrcpath}/Disk Tools.image"
     
    205215
    206216pre-configure {
    207     # Set the name of the bootstrap app in the configure script.
    208     xinstall -m 755 ${filespath}/configure.applescript.in ${worksrcpath}/configure.applescript
    209     reinplace "s|@BOOTSTRAP_APP@|${my_bootstrap_app}|g" ${worksrcpath}/configure.applescript
    210    
    211     # Copy the template Tidbits disk image.
    212     copy -force ${worksrcpath}/Tidbits.image.in ${worksrcpath}/Tidbits.image
     217    # Copy the disk images into the data directory with sequentially-numbered
     218    # names so Mini vMac will find them and automatically mount them.
     219    copy -force "${worksrcpath}/Disk Tools.image" "${my_mnvm_dat}/disk1.dsk"
     220    copy -force ${worksrcpath}/${my_autoquit}/${my_autoquit}.dsk "${my_mnvm_dat}/disk2.dsk"
     221    copy -force ${worksrcpath}/${my_src}/${my_src}.dsk "${my_mnvm_dat}/disk3.dsk"
    213222   
    214223    # Build up the combined configure args for all variations.
     
    229238    }
    230239   
    231     # Write the configure args into the configure.args file on the Tidbits disk image.
     240    # Write the configure args into the "doc" file on the AutQuit7 disk image.
    232241    set max_configure_args_length 8192
    233242    set padded_args [format "%-${max_configure_args_length}s" [join ${configure_args}]]
     
    235244        return -code error "configure args too long"
    236245    }
    237     reinplace -locale C "s|@START@ *@END@|${padded_args}|" ${worksrcpath}/Tidbits.image
    238    
    239     # Set the real configure.args that get passed to the AppleScript to the number
    240     # of variations being assembled, so that it knows how long to wait.
    241     configure.args ${i}
    242    
    243     # Launch the bootstrap Mini vMac so the configure AppleScript can talk to it.
    244     global my_bootstrap_pid
    245     if {[catch {exec "${worksrcpath}/${my_bootstrap_app}/Contents/MacOS/minivmac" &} my_bootstrap_pid]} {
    246         return -code error "couldn't launch bootstrap"
    247     }
    248 }
    249 
    250 configure.cmd           osascript
    251 configure.pre_args      ./configure.applescript
     246    reinplace -locale C "s|@START@\[ .\]*@END@|${padded_args}|" "${my_mnvm_dat}/disk2.dsk"
     247   
     248    # Set the number of seconds to wait before killing the bootstrap Mini vMac
     249    # app, in case it gets stuck.
     250    configure.pre_args [expr 10 * ${i}]
     251}
     252
     253configure {
     254    # Launch the bootstrap Mini vMac to run the configuration. When it's done
     255    # it should automatically quit, but if not, we time out after awhile.
     256    exec ${prefix}/bin/timeout ${configure.pre_args} "${worksrcpath}/${my_bootstrap_app}/Contents/MacOS/minivmac"
     257}
    252258
    253259post-configure {
    254     # Kill the bootstrap Mini vMac.
    255     global my_bootstrap_pid
    256     exec kill ${my_bootstrap_pid}
    257    
    258260    file mkdir ${build.dir}
    259261    set my_variation_dirs {}
     
    396398if {${version} != ${my_version}} {
    397399    # Development versions:
    398     livecheck.url       ${homepage}develop/index.html
     400    livecheck.url       ${homepage}download.html
    399401} else {
    400402    # Alpha versions:
  • trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md

    r106474 r119864  
    11# Creating binary patches
    22
    3 * Boot Mini vMac with System 7
     3## Prerequisites
    44
    5 ## 1. Create patch-Tidbits.image.bsdiff
     5* A copy of Mini vMac with support for writing to Disk Copy 4.2 images: either a version earlier than 3.2.2, or version 3.2.2 or later compiled with the build options `-sony-sum 1 -sony-tag 1`; the default build does not use these options. For example, custom build 1274 from the [Mini vMac custom variation service](http://www.gryphel.com/c/var/latest/index.html) works if you have a Mac Classic ROM.
     6* Disk Tools.image and Tidbits.image disk images from the System 7.0.1.smi disk image from Apple's legacy download area.
     7* autquit7-1.3.1.dsk (or other version) and the latest minivmac*.src.dsk disk images from the Mini vMac web site.
     8* A disk image with a copy of ResEdit 2.1.3 (optional).
    69
    7 * Get a fresh copy of Tidbits.image
    8 * Make a copy called Tidbits.image.orig
    9 * Mount Tidbits.image in Mini vMac
    10 * Make the configure.args file:
     10## Create autquit7-1.3.1.dsk.bsdiff
     11
     12* Boot Mini vMac with Disk Tools.image
     13* Get a fresh copy of autquit7-1.3.1.dsk
     14* Make a copy called autquit7-1.3.1.dsk.orig
     15* Mount autquit7-1.3.1.dsk in Mini vMac
     16* Make the "app" alias:
     17  * Get the latest minivmac*.src.dsk
     18  * Mount minivmac*.src.dsk in Mini vMac
     19  * Select the MnvM_b34 application on the MnvM_b34 volume
     20  * Choose Make Alias from the File menu
     21  * Rename the alias to "app"
     22  * Copy the alias to the AutQuit7 volume
     23* Make the "doc" file:
     24  * Mount Tidbits.image in Mini vMac
    1125  * Open TeachText on the Tidbits volume
    1226  * Type "@START@", 8180 spaces, "@END@"
    13   * Save as "configure.args" on the Desktop of the Tidbits volume
     27  * Save as "docs" on the AutQuit7 volume
    1428  * Use "Get Info" in the Finder to verify the file is exactly 8192 bytes long
    1529* Close all windows
    16 * Unmount the Tidbits volume
    17 * Run `bsdiff Tidbits.image.orig Tidbits.image patch-Tidbits.image.bsdiff`
     30* Choose Shut Down from the Special menu
     31* Run `bsdiff autquit7-1.3.1.dsk.orig autquit7-1.3.1.dsk patch-autquit7-1.3.1.dsk.bsdiff`
    1832
    19 ## 2. Create patch-Disk Tools.image.bsdiff
     33## Create patch-Disk Tools.image.bsdiff
    2034
    2135* Get a fresh copy of Disk Tools.image
    2236* Make a copy called Disk Tools.image.orig
    23 * Mount Disk Tools.image in Mini vMac
    24 * Make the configure.args alias:
    25   * Get a Tidbits.image patched to contain the configure.args file
    26   * Mount Tidbits.image in Mini vMac
     37* Boot Mini vMac with Disk Tools.image
     38* Make the AutQuit7 alias:
     39  * Mount autquit7-1.3.1.dsk in Mini vMac
     40  * Select the AutQuit7 application on the AutQuit7 volume
     41  * Choose Make Alias from the File menu
    2742  * Open the System Folder on the Disk Tools volume
    28   * Select the configure.args file on the Desktop
    29   * Choose Make Alias from the File menu
    30   * Copy or move the alias into the Startup Items folder
    31 * [Disable Finder zoom rects](http://tidbits.com/static/html/TidBITS-099.html#lnk5):
     43  * Copy the alias into the Startup Items folder
     44* [Disable Finder zoom rects](http://tidbits.com/static/html/TidBITS-099.html#lnk5) (optional, now that the build script no longer depends on precise timing):
    3245  * Mount an image containing ResEdit
    3346  * Open the Finder in ResEdit
     
    3750  * Save and quit
    3851* Close all windows
    39 * Unmount the Disk Tools volume
     52* Choose Shut Down from the Special menu
    4053* Run `bsdiff 'Disk Tools.image.orig' 'Disk Tools.image' 'patch-Disk Tools.image.bsdiff'`
Note: See TracChangeset for help on using the changeset viewer.