[128291] trunk/dports/games/mystonline-cider

ryandesign at macports.org ryandesign at macports.org
Tue Nov 18 08:19:32 PST 2014


Revision: 128291
          https://trac.macports.org/changeset/128291
Author:   ryandesign at macports.org
Date:     2014-11-18 08:19:32 -0800 (Tue, 18 Nov 2014)
Log Message:
-----------
mystonline-cider: fix extract failure (#45923)

Modified Paths:
--------------
    trunk/dports/games/mystonline-cider/Portfile

Removed Paths:
-------------
    trunk/dports/games/mystonline-cider/files/attach.exp

Modified: trunk/dports/games/mystonline-cider/Portfile
===================================================================
--- trunk/dports/games/mystonline-cider/Portfile	2014-11-18 15:57:51 UTC (rev 128290)
+++ trunk/dports/games/mystonline-cider/Portfile	2014-11-18 16:19:32 UTC (rev 128291)
@@ -27,8 +27,6 @@
                             sha1    253e14987a9375d66f92373b11e2dda43872b2a8 \
                             rmd160  c156b0edd20a691248269f6e3ab9996fddae74c8
 
-depends_extract             bin:expect:expect
-
 depends_run                 port:mystonline-bootstrap
 
 set libexec_dir             ${prefix}/libexec/${name}
@@ -40,8 +38,7 @@
 set app_package             ${applications_dir}/${app_name}.app
 
 post-extract {
-    copy ${distpath}/${installer_dmg} ${worksrcpath}
-    set my_dmg_mount [my_attach_disk_image ${worksrcpath}/${installer_dmg}]
+    set my_dmg_mount [my_attach_disk_image ${distpath}/${installer_dmg}]
     copy "${my_dmg_mount}/Myst Online.app" ${worksrcpath}/app
     my_detach_disk_image ${my_dmg_mount}
     
@@ -146,17 +143,18 @@
 
 # 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,
-    # so that we can agree to the license agreement.
-    system "expect ${filespath}/attach.exp '${disk_image}' '${mountpoint}'"
+    global workpath
+    set tmp_disk_image_dir [mkdtemp "${workpath}/.tmp/disk_image.XXXXXXXX"]
+    set tmp_disk_image ${tmp_disk_image_dir}/[file tail ${disk_image}].cdr
+    system "hdiutil convert -quiet -ov -format UDTO -o '${tmp_disk_image}' '${disk_image}'"
+    set mountpoint [mkdtemp "${workpath}/.tmp/mountpoint.XXXXXXXX"]
+    system "hdiutil attach -quiet '${tmp_disk_image}' -mountpoint '${mountpoint}' -private -nobrowse -noautoopen -noautofsck -noverify -readonly"
     return ${mountpoint}
 }
 
 # Unmounts a disk image.
 proc my_detach_disk_image {mountpoint} {
-    system "hdiutil detach ${mountpoint} -force"
+    system "hdiutil detach '${mountpoint}' -force"
     file delete -force ${mountpoint}
 }
 

Deleted: trunk/dports/games/mystonline-cider/files/attach.exp
===================================================================
--- trunk/dports/games/mystonline-cider/files/attach.exp	2014-11-18 15:57:51 UTC (rev 128290)
+++ trunk/dports/games/mystonline-cider/files/attach.exp	2014-11-18 16:19:32 UTC (rev 128291)
@@ -1,19 +0,0 @@
-#!/usr/bin/env expect --
-
-# $Id$
-
-spawn hdiutil attach "[lindex $argv 0]" -mountpoint "[lindex $argv 1]" -private -nobrowse -noautoopen -noautofsck -noverify -readonly
-
-expect {
-	"License Agreement" {
-		exp_send "q"
-		exp_continue
-	}
-	"Agree Y/N?" {
-		exp_send "y\r"
-		exp_continue
-	}
-	"/dev/" {
-		interact
-	}
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141118/f12bdf7f/attachment.html>


More information about the macports-changes mailing list