Minivmac-devel version 3.2-20091014 - How to Download and Install on Mac OS X
Sunday the 22nd of November, 2009

    minivmac-devel  most recent diff


    version 3.2-20091014

      View the most recent changes for the minivmac-devel port at: minivmac-devel.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for minivmac-devel.
      The raw portfile for minivmac-devel 3.2-20091014 is located here:
      http://minivmac-devel.darwinports.com/dports/emulators/minivmac-devel/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/minivmac-devel


      The minivmac-devel Portfile 59733 2009-10-21 06:46:34Z ryandesign macports.org $

      PortSystem 1.0

      Name: minivmac-devel
      conflicts minivmac
      set my_name minivmac
      Version: 3.2-20091014
      set my_version [strsed ${version} {g/^.*-20//}]
      Category: emulators aqua
      Maintainers: ryandesign
      license GPLv2
      Homepage: http://minivmac.sourceforge.net/
      use_zip yes
      Platform: macosx
      universal_variant no
      use_parallel_build yes
      dist_subdir ${my_name}

      Description: a Mac 128K, Mac 512K, Mac 512KE, Mac Plus and Mac SE emulator

      Long Description: Mini vMac is a Macintosh emulator. It emulates the earliest Macs, from the original Mac 128K (built 1984-85) to the Mac SE (1987-1990). The default is to emulate a Mac Plus (1986-1990)\; this is also the best-tested and therefore recommended emulation.

      Master Sites: sourceforge:${my_name}:minivmac macports:${my_name}:macports http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/:apple

      # Alpha and beta versions:
      #distname ${my_name}-${version}

      # Development versions:
      distname ${my_name}${my_version}

      set my_src ${distname}.src
      set my_src_distfile ${my_src}.zip
      set my_bootstrap_distfile ${my_name}-bootstrap-3.1.2_1.zip
      set my_blanks blanks
      set my_blanks_distfile ${my_blanks}-0.2.0.zip
      set my_clipin clipin-1.1.0
      set my_clipin_distfile ${my_clipin}.zip
      set my_icons icnsosx-1.0.0
      set my_icons_distfile ${my_icons}.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}:minivmac ${my_bootstrap_distfile}:macports ${my_icons_distfile}:minivmac ${my_clipin_distfile}:minivmac ${my_blanks_distfile}:minivmac ${my_system_disk_container_distfile}:apple

      extract.only ${my_src_distfile} ${my_bootstrap_distfile} ${my_icons_distfile} ${my_blanks_distfile} ${my_clipin_distfile}

      Checksums: ${my_src_distfile} md5 c6e1bbb78aaf28165f0e8212fd58fefd sha1 1020efd3061c21f0b49828e3cc0e80bec389fbdc rmd160 944573fe86fc00d394ab1c1c025c863e66182e80 ${my_bootstrap_distfile} md5 65fa9b7fb19a24dc6c9e711387c1bc30 sha1 4ad44559e75894d45e91ae62cc7ddb420062f968 rmd160 58884cac487a537b5d00fc6093fdfecb6ccc5a2f ${my_icons_distfile} md5 2af006506de7549be14f94317918d59a sha1 4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 rmd160 cef6d7d7578464538d0042b0d98379ae7f18fab7 ${my_clipin_distfile} md5 e094de97d1c6c214a80fb74895124c3e sha1 725f622ad6681c77e7f9f4a64d05ac1d6a103beb rmd160 5699b56c8db62b2568c8de88b6d419180b1fb73d ${my_blanks_distfile} md5 b16321d0d78048d5ec9b635f4f86b19c sha1 9b8d7e77bd05633709907f8806d976279d7a20b7 rmd160 a0784c17c5a5ca2e159762fb836c1c800762b213 ${my_system_disk_container_distfile} md5 8a4776350b15b5a516cdf7dd18e27290 sha1 d4c8b8653de9c7a9b2594dd6126ec7120e3e2e9e rmd160 89fc3780c9c5d575a8da4068dc810c1f56c70211

      depends_extract port:macutil port:bsdiff bin:expect:expect

      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"
      set my_rom_file vMac.ROM
      set my_base_options "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx -nex"
      set my_archs {}

      options my_variations
      my_variations {128K} {-m 128K} {512K} {-m 128K -mem 512K} {512Ke} {-m 512Ke} {Plus} {-m Plus -im 1} {SE} {-m SE} {SE FDHD} {-m SEFDHD} {Classic} {-m Classic}

      Variant: unsupported description {Also build unfinished Macintosh II and IIx emulators} {
      my_variations-append {II} {-m II -mem 8M -hres 800 -vres 600 -depth 3} {IIx} {-m IIx -mem 8M -hres 800 -vres 600 -depth 3}
      }

      # The universal variant is disabled until MacPorts 1.8.2 is released.
      if {0} {
      # To build the bootstrap, use "sudo port install bootstrap=yes".
      # The variant is hidden because it is useful only to the port maintainer.
      if {[tbool bootstrap]} {
      variant bootstrap conflicts unsupported requires universal description {Build the bootstrap version of Mini vMac} {
      my_variations {Bootstrap} {-m Plus -sound 0 -bg 1 -speed a}
      depends_build-append port:p7zip
      post-destroot {
      exec 7za a ${destroot}${my_app_dir}/${my_name}-bootstrap-${version}_${revision}.zip ${destroot}${my_app_dir}/${my_bootstrap_app}
      }
      }
      default_variants +bootstrap
      }

      Variant: universal {
      configure.universal_args
      configure.universal_archs ppc i386
      set my_archs ${configure.universal_archs}
      }
      }
      if {![variant_exists universal] || ![variant_isset universal]} {
      switch ${os.arch} {
      powerpc {
      configure.build_arch ppc
      }
      default {
      configure.build_arch ${os.arch}
      }
      }
      set my_archs ${configure.build_arch}
      }

      pre-fetch {
      set my_real_rom_dir [exec osascript ${filespath}/readalias.applescript [file normalize ${my_rom_dir}]]
      if {![file exists ${my_real_rom_dir}/${my_rom_file}] && ![file exists ${my_app_dir}/${my_rom_file}]} {
      ui_msg "****************************************************************"
      ui_msg "To build Mini vMac, you will need a ROM file from a Macintosh"
      ui_msg "Plus or 512Ke. And to run it, you need a ROM file from the type"
      ui_msg "of Mac you want to emulate. ROM files are not included with this"
      ui_msg "package because they are copyrighted Apple software."
      ui_msg "To create a ROM file, download the CopyRoms program from"
      ui_msg "${homepage}extras/copyroms.html"
      ui_msg "and transfer it to a real physical early Macintosh that you own."
      ui_msg "Run the CopyRoms program there, then transfer the ROM file back"
      ui_msg "to this Mac and put it in ${my_rom_dir}"
      ui_msg "(which can be an alias or symlink if desired) or"
      ui_msg "${my_app_dir}."
      ui_msg "****************************************************************"
      return -code error "${my_rom_file} not found"
      }
      }

      worksrcdir stuff
      extract.mkdir yes

      post-extract {
      # Decode the system disk container image.
      my_system "sh ${filespath}/demacbinary.sh ${distpath}/${my_system_disk_container_distfile} ${worksrcpath}"

      # Copy the Disk Tools image from the container image. The binary patchfile applied with bspatch
      # places an alias of the output disk at System Folder:Preferences:Gryphel:Build:output.
      set my_system_disk_container_mount [my_attach_disk_image ${worksrcpath}/${my_system_disk_container}]
      my_system "bspatch '${my_system_disk_container_mount}/Disk Tools.image' '${worksrcpath}/Disk Tools.dsk' '${filespath}/Disk Tools.dsk.bsdiff'"
      my_detach_disk_image ${my_system_disk_container_mount}

      # Get a large empty disk image to store the output.
      my_system "unzip -q ${worksrcpath}/${my_blanks}/hfs24M.zip -d ${worksrcpath}"

      # 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_app_dir}/${my_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.dsk" "${my_mnvm_dat}/disk1.dsk"
      ln -s ${worksrcpath}/output.img "${my_mnvm_dat}/disk2.dsk"
      ln -s ${worksrcpath}/${my_src}/${my_src}.dsk "${my_mnvm_dat}/disk3.dsk"
      ln -s ${worksrcpath}/${my_clipin}/${my_clipin}.dsk "${my_mnvm_dat}/disk4.dsk"
      }

      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 large blank disk image to store the output.
      # Use the .img extension so that we can mount it on Mac OS X later.
      copy -force ${worksrcpath}/hfs24M.DSK ${worksrcpath}/output.img

      # Unrestrict the permissions on the output disk image so the Build program
      # can write its output to it.
      file attributes ${worksrcpath}/output.img -permissions 0777

      # Build up the combined configure args for all variations.
      set i 0
      foreach my_arch ${my_archs} {
      set my_target [my_arch_to_target ${my_arch}]
      foreach {my_machine my_variation_options} ${my_variations} {
      if {${i} > 0} {
      configure.args-append {\;}
      }
      configure.args-append ${my_base_options} -t ${my_target} ${my_variation_options} -n ${version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-${my_target}
      incr i
      }
      }

      # Launch the bootstrap Mini vMac so the configure script can talk to it.
      my_system "open '${worksrcpath}/${my_bootstrap_app}'"
      }

      configure.cmd osascript
      configure.pre_args ./configure.applescript

      build.dir ${workpath}/variations

      post-configure {
      file mkdir ${build.dir}
      set my_variation_dirs {}
      set my_output_disk_mount [my_attach_disk_image ${worksrcpath}/output.img]
      foreach my_arch ${my_archs} {
      file mkdir ${build.dir}/${my_arch}
      set my_target [my_arch_to_target ${my_arch}]
      foreach {my_machine unused} ${my_variations} {
      set my_src_dir ${my_output_disk_mount}/${version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-${my_target}
      if {[file isdirectory ${my_src_dir}]} {
      set my_variation_dir ${my_arch}/${my_machine}
      lappend my_variation_dirs [strsed ${my_variation_dir} {g/ /\\\\ /}]

      # Get the configured source code.
      file copy ${my_src_dir} ${build.dir}/${my_variation_dir}

      # Use the right compiler.
      reinplace "s|gcc|${configure.cc}|g" ${build.dir}/${my_variation_dir}/Makefile

      # Remove references to SDKs -- the 10.4u SDK is not installed by default on 10.6
      # and even if you install it manually it does not work here.
      reinplace -E {s|-isysroot /Developer/SDKs/[^ ]+||g} ${build.dir}/${my_variation_dir}/Makefile
      }
      }
      }
      my_detach_disk_image ${my_output_disk_mount}

      # Set up the global Makefile.
      xinstall ${filespath}/Makefile.in ${build.dir}/Makefile
      reinplace "s| SUBDIRS |[join ${my_variation_dirs}]|" ${build.dir}/Makefile

      # If no variation directoriess were produced by configuration, either the flags we
      # passed in were bad, or the automation script got out of sync with the emulator;
      # if the latter, the delays in configure.applescript may need to be adjusted.
      if {"" == ${my_variation_dirs}} {
      return -code error "configuration failed!"
      }
      }

      set my_share_dir ${prefix}/share/${my_name}

      post-build {
      set i 0
      foreach my_arch ${my_archs} {
      set my_target [my_arch_to_target ${my_arch}]
      foreach {my_machine unused} ${my_variations} {
      if {[variant_exists universal] && [variant_isset universal]} {
      reinplace "s|${my_target}|umch|" ${build.dir}/${my_arch}/${my_machine}/minivmac.app/Contents/Info.plist
      }
      if {![variant_exists bootstrap] || ![variant_isset bootstrap]} {
      # To save space, keep only a single copy of the Resources directory.
      set my_resources_dir ${build.dir}/${my_arch}/${my_machine}/minivmac.app/Contents/Resources
      if {0 == ${i}} {
      move ${my_resources_dir} ${build.dir}
      } else {
      delete ${my_resources_dir}
      }
      ln -s ${my_share_dir}/Resources ${my_resources_dir}
      }
      incr i
      }
      }

      if {![variant_exists bootstrap] || ![variant_isset bootstrap]} {
      # Install the prettier icons.
      eval xinstall -m 644 [glob ${worksrcpath}/${my_icons}/icons/*.icns] ${build.dir}/Resources
      }
      }

      destroot {
      if {![variant_exists bootstrap] || ![variant_isset bootstrap]} {
      # Install the global Resources directory.
      xinstall -d ${destroot}${my_share_dir}
      copy ${build.dir}/Resources ${destroot}${my_share_dir}
      }

      # Install the programs.
      foreach my_arch ${my_archs} {
      if {[variant_exists universal] && [variant_isset universal]} {
      set my_dest ${workpath}/pre-dest/${my_arch}
      } else {
      set my_dest ${destroot}
      }
      xinstall -d ${my_dest}${my_app_dir}
      foreach {my_machine unused} ${my_variations} {
      copy ${build.dir}/${my_arch}/${my_machine}/minivmac.app "${my_dest}${my_app_dir}/Mini vMac ${my_machine}.app"
      }
      }
      if {[variant_exists universal] && [variant_isset universal]} {
      merge ${workpath}/pre-dest
      }
      }

      # Converts normal arch names into Mini vMac target names.
      proc my_arch_to_target {arch} {
      switch ${arch} {
      i386 {
      return imch
      }
      ppc {
      return mach
      }
      default {
      return -code error "unsupported architecture ${arch}"
      }
      }
      }

      # Mounts a disk image.
      proc my_attach_disk_image {disk_image} {
      global my_name filespath
      set mountpoint [mkdtemp "/tmp/${my_name}.XXXXXXXX"]
      # Use this expect script instead of using hdiutil directly, because the
      # system disk image has a license agreement we must agree to.
      my_system "expect ${filespath}/attach.exp '${disk_image}' '${mountpoint}'"
      return ${mountpoint}
      }

      # Unmounts a disk image.
      proc my_detach_disk_image {mountpoint} {
      my_system "hdiutil detach ${mountpoint} -force"
      file delete -force ${mountpoint}
      }

      proc my_system {cmd} {
      ui_debug ${cmd}
      system ${cmd}
      }

      livecheck.type regex
      livecheck.version ${my_version}
      livecheck.regex ${my_name}-?(\[0-9.\]+)\\.src

      # Alpha versions:
      #livecheck.url ${homepage}alpha/index.html

      # Beta versions:
      #livecheck.url ${homepage}beta/index.html

      # Development versions:
      livecheck.url ${homepage}develop/index.html

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/minivmac-devel
      % sudo port install minivmac-devel
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching minivmac-devel
      ---> Verifying checksum for minivmac-devel
      ---> Extracting minivmac-devel
      ---> Configuring minivmac-devel
      ---> Building minivmac-devel with target all
      ---> Staging minivmac-devel into destroot
      ---> Installing minivmac-devel
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using minivmac-devel with these commands:
      %  man minivmac-devel
      % apropos minivmac-devel
      % which minivmac-devel
      % locate minivmac-devel

     Where to find more information:

    Darwin Ports



    Lightbox this page.