Revision
38874
Author
ryandesign@macports.org
Date
2008-08-01 05:05:41 -0700 (Fri, 01 Aug 2008)

Log Message

atanks:

 * use ${applications_dir}; don't assume /Applications/MacPorts
 * create symlink using tcl ln command instead of system

Modified Paths

Diff

Modified: trunk/dports/games/atanks/Portfile (38873 => 38874)


--- trunk/dports/games/atanks/Portfile	2008-08-01 12:01:01 UTC (rev 38873)
+++ trunk/dports/games/atanks/Portfile	2008-08-01 12:05:41 UTC (rev 38874)
@@ -46,10 +46,15 @@
         ${destroot}${prefix}/share/atanks
 }
 
+# Can be removed once MacPorts 1.7.0 is released
+if {![info exists applications_dir]} {
+    set applications_dir /Applications/MacPorts
+}
+
 platform darwin {
     post-destroot {
-        xinstall -d -m 755 ${destroot}/Applications/MacPorts/ATanks.app/Contents/MacOS
-        system "ln -s ${prefix}/bin/atanks \
-            ${destroot}/Applications/MacPorts/ATanks.app/Contents/MacOS/ATanks"
+        xinstall -d ${destroot}${applications_dir}/ATanks.app/Contents/MacOS
+        ln -s ${prefix}/bin/atanks \
+            ${destroot}${applications_dir}/ATanks.app/Contents/MacOS/ATanks
     }
 }