[119864] trunk/dports/emulators/minivmac-devel

ryandesign at macports.org ryandesign at macports.org
Thu May 8 07:22:19 PDT 2014


Revision: 119864
          https://trac.macports.org/changeset/119864
Author:   ryandesign at macports.org
Date:     2014-05-08 07:22:19 -0700 (Thu, 08 May 2014)
Log 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.

Modified Paths:
--------------
    trunk/dports/emulators/minivmac-devel/Portfile
    trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md
    trunk/dports/emulators/minivmac-devel/files/patch-Disk Tools.image.bsdiff

Added Paths:
-----------
    trunk/dports/emulators/minivmac-devel/files/patch-autquit7-1.3.1.dsk.bsdiff

Removed Paths:
-------------
    trunk/dports/emulators/minivmac-devel/files/configure.applescript.in
    trunk/dports/emulators/minivmac-devel/files/patch-Tidbits.image.bsdiff

Modified: trunk/dports/emulators/minivmac-devel/Portfile
===================================================================
--- trunk/dports/emulators/minivmac-devel/Portfile	2014-05-08 13:12:40 UTC (rev 119863)
+++ trunk/dports/emulators/minivmac-devel/Portfile	2014-05-08 14:22:19 UTC (rev 119864)
@@ -9,14 +9,13 @@
 conflicts               minivmac
 set my_name             minivmac
 epoch                   3
-version                 3.3.2
-revision                1
+version                 20140315
 set branch              [join [lrange [split ${version} .] 0 1] .]
 set my_version          [strsed ${version} {g/^20//}]
 categories              emulators aqua
 maintainers             ryandesign
 license                 GPL-2
-homepage                http://minivmac.sourceforge.net/
+homepage                http://www.gryphel.com/c/minivmac/
 use_zip                 yes
 platforms               macosx
 use_parallel_build      yes
@@ -38,8 +37,9 @@
                         also emulations of the Macintosh 128K, 512K, 512Ke, SE, Classic, \
                         and SE FDHD, and work on Macintosh II emulation is in progress.
 
-master_sites            sourceforge:project/minivmac/minivmac/${version}:minivmacsource \
+master_sites            http://www.gryphel.com/c/minivmac/c/:minivmacsource \
                         sourceforge:project/minivmac/minivmac-extras/extras6:minivmacextras6 \
+                        sourceforge:project/minivmac/minivmac-extras/extras11:minivmacextras11 \
                         http://www.ryandesign.com/macports/distfiles/minivmac:bootstrap \
                         http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/:apple
 
@@ -48,21 +48,25 @@
 set my_bootstrap_distfile                   ${my_name}-bootstrap-3.2.3_0.zip
 set my_icons                                icnsosx-1.0.0
 set my_icons_distfile                       ${my_icons}.zip
+set my_autoquit                             autquit7-1.3.1
+set my_autoquit_distfile                    ${my_autoquit}.zip
 set my_system_disk_container                System_7.0.1.smi
 set my_system_disk_container_distfile       ${my_system_disk_container}.bin
 
 distfiles               ${my_src_distfile}:minivmacsource \
                         ${my_bootstrap_distfile}:bootstrap \
                         ${my_icons_distfile}:minivmacextras6 \
+                        ${my_autoquit_distfile}:minivmacextras11 \
                         ${my_system_disk_container_distfile}:apple
 
 extract.only            ${my_src_distfile} \
                         ${my_bootstrap_distfile} \
-                        ${my_icons_distfile}
+                        ${my_icons_distfile} \
+                        ${my_autoquit_distfile}
 
 checksums               ${my_src_distfile} \
-                        rmd160  a8a75847ed43a4d830930a98e3a20a2451144350 \
-                        sha256  b5a02693a6106585622f2f928371f160c9b79656b834e7e25519de2d645eb1be \
+                        rmd160  0798b4696764a04142b6d74a15e6abe06047f8d8 \
+                        sha256  407708345d658bfd04c232844de9fcb42019257d7eb5f4339cbaeda226377778 \
                         ${my_bootstrap_distfile} \
                         rmd160  32e803a75d4f9ab6b7dfa5a7b1ec2ef9d3a057c2 \
                         sha256  e6fe692683ab54e08b0350fe9901e872f7bf3c3a62f69b45773254fce45a4fae \
@@ -70,6 +74,9 @@
                         md5     2af006506de7549be14f94317918d59a \
                         sha1    4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
                         rmd160  cef6d7d7578464538d0042b0d98379ae7f18fab7 \
+                        ${my_autoquit_distfile} \
+                        rmd160  949ce06752fbcfa9a92787497dace45e7299eb41 \
+                        sha256  a9aad37cfd2d6dbd4db5e307b8598348ba25aa5504aac968b8d570d5927e576a \
                         ${my_system_disk_container_distfile} \
                         md5     8a4776350b15b5a516cdf7dd18e27290 \
                         sha1    d4c8b8653de9c7a9b2594dd6126ec7120e3e2e9e \
@@ -77,6 +84,10 @@
 
 depends_extract         port:bsdiff
 
+depends_build           port:timeout
+
+depends_skip_archcheck  bsdiff timeout
+
 set my_app_dir          "${applications_dir}/Mini vMac"
 set my_rom_dir          "~/Library/Preferences/Gryphel/mnvm_rom"
 set my_bootstrap_app    "Mini vMac Bootstrap.app"
@@ -145,7 +156,7 @@
 worksrcdir              configure
 build.dir               ${workpath}/build
 extract.mkdir           yes
-extract.asroot          yes
+set my_mnvm_dat         "${worksrcpath}/${my_bootstrap_app}/Contents/mnvm_dat"
 
 post-extract {
     # Decompress the system disk container image.
@@ -156,12 +167,12 @@
     # The images on the container image. Images we don't need are commented out for future reference.
     set my_images {
         {Disk Tools.image}    58368 eb1979132c843560ebab490faeb7520d9a94757ecef3121a21abace8d3ae63ff
-        {Tidbits.image}     1902848 3e3600bed1b5c7c595bc176b5eaadcc8c1517032489efc548b9b781c0ee1f062
     }
 #        {Fonts.image}        427264 8b06f086a96b75bd23b16ae018bd334696239cb56e65bfa20166ea00d14cdef0
 #        {Install 1.image}    796160 8c3ea898eeb88b795041108cd8a09bf4ebdf920d7d4763e4419df14713dbd952
 #        {Install 2.image}   1165056 0fc558475df55f3aed217d2eceebfa29e4a465a795807cd627b258740a9ec55b
 #        {Printing.image}    1533952 246cbf69ad1c2e588ee482fddec781135a67fbfe02734bb0f732eb055faa15fa
+#        {Tidbits.image}     1902848 3e3600bed1b5c7c595bc176b5eaadcc8c1517032489efc548b9b781c0ee1f062
     
     # Extract the disk images from the system disk container image. `hdiutil` on OS X 10.8 Mountain Lion
     # does not mount this disk image correctly, so extract the files manually using `dd`.
@@ -177,40 +188,38 @@
     delete ${worksrcpath}/${my_system_disk_container_decompressed}
     
     # Make the data directory, where Mini vMac looks for the files it needs.
-    set my_mnvm_dat "${worksrcpath}/${my_bootstrap_app}/Contents/mnvm_dat"
     file mkdir ${my_mnvm_dat}
     
     # Symlink the ROM file into the data directory.
     ln -s [my_real_rom_file] ${my_mnvm_dat}
     
-    # Symlink the disk images into the data directory with sequentially-numbered
-    # names so Mini vMac will find them and automatically mount them.
-    ln -s "${worksrcpath}/Disk Tools.image" "${my_mnvm_dat}/disk1.dsk"
-    ln -s ${worksrcpath}/Tidbits.image "${my_mnvm_dat}/disk2.dsk"
-    ln -s ${worksrcpath}/${my_src}/${my_src}.dsk "${my_mnvm_dat}/disk3.dsk"
-    
     # Use the prettier icon on the bootstrap app.
     copy -force ${worksrcpath}/${my_icons}/icons//AppIcon.icns ${worksrcpath}/${my_bootstrap_app}/Contents/Resources/
 }
 
 post-patch {
-    # Place an 8192-byte TeachText file called "configure.args" (containing "@START@",
-    # 8180 spaces, and "@END@") onto the Tidbits disk.
-    system -W ${worksrcpath} "${prefix}/bin/bspatch Tidbits.image Tidbits.image.in '${filespath}/patch-Tidbits.image.bsdiff'"
+    # See README-binary-patchfiles.md in the files directory for instructions
+    # on recreating these binary patchfiles.
     
-    # Place an alias of the configure.args file in the Startup Items folder on the Disk Tools disk.
+    # Modify the AutQuit7 disk to have an alias "app" pointing to the MnvM_b34
+    # application and an 8192-byte TeachText file called "doc" (containing
+    # "@START@", 8180 periods and spaces, and "@END@").
+    system -W ${worksrcpath}/${my_autoquit} "${prefix}/bin/bspatch '${my_autoquit}.dsk' '${my_autoquit}.dsk.tmp' '${filespath}/patch-${my_autoquit}.dsk.bsdiff'"
+    move -force "${worksrcpath}/${my_autoquit}/${my_autoquit}.dsk.tmp" "${worksrcpath}/${my_autoquit}/${my_autoquit}.dsk"
+    
+    # Modify the Disk Tools disk to have an alias of AutQuit7 in the Startup
+    # Items folder.
     system -W ${worksrcpath} "${prefix}/bin/bspatch 'Disk Tools.image' 'Disk Tools.image.tmp' '${filespath}/patch-Disk Tools.image.bsdiff'"
     move -force "${worksrcpath}/Disk Tools.image.tmp" "${worksrcpath}/Disk Tools.image"
 }
 
 pre-configure {
-    # Set the name of the bootstrap app in the configure script.
-    xinstall -m 755 ${filespath}/configure.applescript.in ${worksrcpath}/configure.applescript
-    reinplace "s|@BOOTSTRAP_APP@|${my_bootstrap_app}|g" ${worksrcpath}/configure.applescript
+    # Copy the disk images into the data directory with sequentially-numbered
+    # names so Mini vMac will find them and automatically mount them.
+    copy -force "${worksrcpath}/Disk Tools.image" "${my_mnvm_dat}/disk1.dsk"
+    copy -force ${worksrcpath}/${my_autoquit}/${my_autoquit}.dsk "${my_mnvm_dat}/disk2.dsk"
+    copy -force ${worksrcpath}/${my_src}/${my_src}.dsk "${my_mnvm_dat}/disk3.dsk"
     
-    # Copy the template Tidbits disk image.
-    copy -force ${worksrcpath}/Tidbits.image.in ${worksrcpath}/Tidbits.image
-    
     # Build up the combined configure args for all variations.
     set i 0
     foreach my_arch ${my_archs} {
@@ -228,33 +237,26 @@
         }
     }
     
-    # Write the configure args into the configure.args file on the Tidbits disk image.
+    # Write the configure args into the "doc" file on the AutQuit7 disk image.
     set max_configure_args_length 8192
     set padded_args [format "%-${max_configure_args_length}s" [join ${configure_args}]]
     if {[string length ${padded_args}] > ${max_configure_args_length}} {
         return -code error "configure args too long"
     }
-    reinplace -locale C "s|@START@ *@END@|${padded_args}|" ${worksrcpath}/Tidbits.image
+    reinplace -locale C "s|@START@\[ .\]*@END@|${padded_args}|" "${my_mnvm_dat}/disk2.dsk"
     
-    # Set the real configure.args that get passed to the AppleScript to the number
-    # of variations being assembled, so that it knows how long to wait.
-    configure.args ${i}
-    
-    # Launch the bootstrap Mini vMac so the configure AppleScript can talk to it.
-    global my_bootstrap_pid
-    if {[catch {exec "${worksrcpath}/${my_bootstrap_app}/Contents/MacOS/minivmac" &} my_bootstrap_pid]} {
-        return -code error "couldn't launch bootstrap"
-    }
+    # Set the number of seconds to wait before killing the bootstrap Mini vMac
+    # app, in case it gets stuck.
+    configure.pre_args [expr 10 * ${i}]
 }
 
-configure.cmd           osascript
-configure.pre_args      ./configure.applescript
+configure {
+    # Launch the bootstrap Mini vMac to run the configuration. When it's done
+    # it should automatically quit, but if not, we time out after awhile.
+    exec ${prefix}/bin/timeout ${configure.pre_args} "${worksrcpath}/${my_bootstrap_app}/Contents/MacOS/minivmac"
+}
 
 post-configure {
-    # Kill the bootstrap Mini vMac.
-    global my_bootstrap_pid
-    exec kill ${my_bootstrap_pid}
-    
     file mkdir ${build.dir}
     set my_variation_dirs {}
     foreach my_arch ${my_archs} {
@@ -395,7 +397,7 @@
 
 if {${version} != ${my_version}} {
     # Development versions:
-    livecheck.url       ${homepage}develop/index.html
+    livecheck.url       ${homepage}download.html
 } else {
     # Alpha versions:
     livecheck.url       ${homepage}doc-${branch}/download.html

Modified: trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md
===================================================================
--- trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md	2014-05-08 13:12:40 UTC (rev 119863)
+++ trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md	2014-05-08 14:22:19 UTC (rev 119864)
@@ -1,34 +1,47 @@
 # Creating binary patches
 
-* Boot Mini vMac with System 7
+## Prerequisites
 
-## 1. Create patch-Tidbits.image.bsdiff
+* 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.
+* Disk Tools.image and Tidbits.image disk images from the System 7.0.1.smi disk image from Apple's legacy download area.
+* autquit7-1.3.1.dsk (or other version) and the latest minivmac*.src.dsk disk images from the Mini vMac web site.
+* A disk image with a copy of ResEdit 2.1.3 (optional).
 
-* Get a fresh copy of Tidbits.image
-* Make a copy called Tidbits.image.orig
-* Mount Tidbits.image in Mini vMac
-* Make the configure.args file:
+## Create autquit7-1.3.1.dsk.bsdiff
+
+* Boot Mini vMac with Disk Tools.image
+* Get a fresh copy of autquit7-1.3.1.dsk
+* Make a copy called autquit7-1.3.1.dsk.orig
+* Mount autquit7-1.3.1.dsk in Mini vMac
+* Make the "app" alias:
+  * Get the latest minivmac*.src.dsk
+  * Mount minivmac*.src.dsk in Mini vMac
+  * Select the MnvM_b34 application on the MnvM_b34 volume
+  * Choose Make Alias from the File menu
+  * Rename the alias to "app"
+  * Copy the alias to the AutQuit7 volume
+* Make the "doc" file:
+  * Mount Tidbits.image in Mini vMac
   * Open TeachText on the Tidbits volume
   * Type "@START@", 8180 spaces, "@END@"
-  * Save as "configure.args" on the Desktop of the Tidbits volume
+  * Save as "docs" on the AutQuit7 volume
   * Use "Get Info" in the Finder to verify the file is exactly 8192 bytes long
 * Close all windows
-* Unmount the Tidbits volume
-* Run `bsdiff Tidbits.image.orig Tidbits.image patch-Tidbits.image.bsdiff`
+* Choose Shut Down from the Special menu
+* Run `bsdiff autquit7-1.3.1.dsk.orig autquit7-1.3.1.dsk patch-autquit7-1.3.1.dsk.bsdiff`
 
-## 2. Create patch-Disk Tools.image.bsdiff
+## Create patch-Disk Tools.image.bsdiff
 
 * Get a fresh copy of Disk Tools.image
 * Make a copy called Disk Tools.image.orig
-* Mount Disk Tools.image in Mini vMac
-* Make the configure.args alias:
-  * Get a Tidbits.image patched to contain the configure.args file
-  * Mount Tidbits.image in Mini vMac
+* Boot Mini vMac with Disk Tools.image
+* Make the AutQuit7 alias:
+  * Mount autquit7-1.3.1.dsk in Mini vMac
+  * Select the AutQuit7 application on the AutQuit7 volume
+  * Choose Make Alias from the File menu
   * Open the System Folder on the Disk Tools volume
-  * Select the configure.args file on the Desktop
-  * Choose Make Alias from the File menu
-  * Copy or move the alias into the Startup Items folder
-* [Disable Finder zoom rects](http://tidbits.com/static/html/TidBITS-099.html#lnk5):
+  * Copy the alias into the Startup Items folder
+* [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):
   * Mount an image containing ResEdit
   * Open the Finder in ResEdit
   * Open CODE resource 4, decompressing it when prompted
@@ -36,5 +49,5 @@
   * Change to 205F 700A DEC0 4ED0
   * Save and quit
 * Close all windows
-* Unmount the Disk Tools volume
+* Choose Shut Down from the Special menu
 * Run `bsdiff 'Disk Tools.image.orig' 'Disk Tools.image' 'patch-Disk Tools.image.bsdiff'`

Deleted: trunk/dports/emulators/minivmac-devel/files/configure.applescript.in
===================================================================
--- trunk/dports/emulators/minivmac-devel/files/configure.applescript.in	2014-05-08 13:12:40 UTC (rev 119863)
+++ trunk/dports/emulators/minivmac-devel/files/configure.applescript.in	2014-05-08 14:22:19 UTC (rev 119864)
@@ -1,72 +0,0 @@
--- $Id$
-
-global configuration_delay
-
-property lf : ASCII character 10
-
-on run argv
-	set number_of_variations to item 1 of argv
-	
-	-- Base the delay for the configuration run on the processor speed.
-	-- The multiplier was chosen based on observations of a 2.2-GHz
-	-- MacBook Pro and a 466-MHz Power Mac G4.
-	set cpu_mhz to (system attribute "pclk") / 1000000
-	set configuration_delay to 1400 * number_of_variations / cpu_mhz
-	
-	delay 3 -- wait 1 second for each disk image Mini vMac needs to mount
-	
-	my menu_edit_select_all() -- select the contents of the configure.args file which has been automatically opened
-	my menu_edit_copy() -- copy it
-	my menu_file_quit() -- quit
-	
-	my key_code(46) -- "M" -- select the MnvM_bld program
-	my menu_file_open() -- open it
-	my menu_edit_paste() -- paste the configure args into the window
-	my menu_file_go() -- do the configuration
-	
-	return "Variations: " & number_of_variations & lf & "CPU speed: " & (round cpu_mhz rounding up) & " MHz" & lf & "Configuration delay: " & ((round configuration_delay * 100 rounding up) / 100) & " seconds"
-end run
-
-on key_code(key_code)
-	my key_code_with_modifiers(key_code, {})
-end key_code
-
--- Key codes are used instead of keystrokes because keystrokes would be
--- translated through the currently-selected Mac OS X keyboard layout
--- but the system software being used on the emulated machine is using
--- the US English keyboard layout.
-on key_code_with_modifiers(key_code, key_modifiers)
-	activate application "@BOOTSTRAP_APP@"
-	tell application "System Events"
-		tell process "Mini vMac"
-			delay 0.3
-			key code key_code using key_modifiers
-		end tell
-	end tell
-end key_code_with_modifiers
-
-on menu_file_open()
-	my key_code_with_modifiers(31, {command down}) -- "Command-O"
-	delay 0.5 -- wait for zoomrects to draw
-end menu_file_open
-
-on menu_file_go()
-	my key_code_with_modifiers(5, {command down}) -- "Command-G"
-	delay configuration_delay -- wait for configuration to run
-end menu_file_go
-
-on menu_file_quit()
-	my key_code_with_modifiers(12, {command down}) -- "Command-Q"
-end menu_file_quit
-
-on menu_edit_copy()
-	my key_code_with_modifiers(8, {command down}) -- "Command-C"
-end menu_edit_copy
-
-on menu_edit_paste()
-	my key_code_with_modifiers(9, {command down}) -- "Command-V"
-end menu_edit_paste
-
-on menu_edit_select_all()
-	my key_code_with_modifiers(0, {command down}) -- "Command-A"
-end menu_edit_select_all

Modified: trunk/dports/emulators/minivmac-devel/files/patch-Disk Tools.image.bsdiff
===================================================================
(Binary files differ)

Deleted: trunk/dports/emulators/minivmac-devel/files/patch-Tidbits.image.bsdiff
===================================================================
(Binary files differ)

Added: trunk/dports/emulators/minivmac-devel/files/patch-autquit7-1.3.1.dsk.bsdiff
===================================================================
(Binary files differ)


Property changes on: trunk/dports/emulators/minivmac-devel/files/patch-autquit7-1.3.1.dsk.bsdiff
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140508/920bdf5a/attachment-0001.html>


More information about the macports-changes mailing list