[40636] trunk/dports/net/wap11gui/Portfile

jmr at macports.org jmr at macports.org
Wed Oct 8 23:31:55 PDT 2008


Revision: 40636
          http://trac.macports.org/changeset/40636
Author:   jmr at macports.org
Date:     2008-10-08 23:31:55 -0700 (Wed, 08 Oct 2008)
Log Message:
-----------
wap11gui: remove use of cd, and respect applications_dir

Modified Paths:
--------------
    trunk/dports/net/wap11gui/Portfile

Modified: trunk/dports/net/wap11gui/Portfile
===================================================================
--- trunk/dports/net/wap11gui/Portfile	2008-10-09 06:22:54 UTC (rev 40635)
+++ trunk/dports/net/wap11gui/Portfile	2008-10-09 06:31:55 UTC (rev 40636)
@@ -53,31 +53,33 @@
 
 post-build		{
 	if {[file isfile ${prefix}/include/qt3/qt_mac.h]} {
-		cd ${worksrcpath}/${name}
 		set appName [string toupper ${name}]
-		xinstall -d -m 0755 ${appName}.app/Contents
+		xinstall -d -m 0755 ${worksrcpath}/${name}/${appName}.app/Contents
 		set plist ${appName}.app/Contents/Info.plist
-		xinstall -m 0644 ${filespath}/Info.plist.in ${plist}
-		reinplace "s|@APPLNAME@|${appName}|" ${plist}
-		reinplace "s|@VERSION@|${version}|" ${plist}
-		system "echo 'APPL????' >${appName}.app/Contents/PkgInfo"
-		xinstall -d -m 0755 ${appName}.app/Contents/Resources
+		xinstall -m 0644 ${filespath}/Info.plist.in ${worksrcpath}/${name}/${plist}
+		reinplace "s|@APPLNAME@|${appName}|" ${worksrcpath}/${name}/${plist}
+		reinplace "s|@VERSION@|${version}|" ${worksrcpath}/${name}/${plist}
+		system "echo 'APPL????' >${worksrcpath}/${name}/${appName}.app/Contents/PkgInfo"
+		xinstall -d -m 0755 ${worksrcpath}/${name}/${appName}.app/Contents/Resources
 		set icns ${appName}.app/Contents/Resources/wap11.icns
-		xinstall -m 0644 ${filespath}/[file tail ${icns}] ${icns}
-		reinplace "s|@ICONFILE@|[file tail ${icns}]|" ${plist}
-		xinstall -d -m 0755 ${appName}.app/Contents/MacOS
-		xinstall -m 0755 ${name} ${appName}.app/Contents/MacOS/${appName}
-		reinplace "s|@EXECFILE@|${appName}|" ${plist}
+		xinstall -m 0644 ${filespath}/[file tail ${icns}] ${worksrcpath}/${name}/${icns}
+		reinplace "s|@ICONFILE@|[file tail ${icns}]|" ${worksrcpath}/${name}/${plist}
+		xinstall -d -m 0755 ${worksrcpath}/${name}/${appName}.app/Contents/MacOS
+		xinstall -m 0755 ${worksrcpath}/${name}/${name} ${worksrcpath}/${name}/${appName}.app/Contents/MacOS/${appName}
+		reinplace "s|@EXECFILE@|${appName}|" ${worksrcpath}/${name}/${plist}
 	}
 }
 
+if {![info exists applications_dir]} {
+    set applications_dir /Applications/MacPorts
+}
+
 post-destroot	{
 	if {[file isfile ${prefix}/include/qt3/qt_mac.h]} {
-		cd ${worksrcpath}/${name}
-		set appPath ${destroot}/Applications/MacPorts
+		set appPath ${destroot}${applications_dir}
 		set appName [string toupper ${name}]
 		xinstall -d -m 0755 ${appPath}
-		system "cp -R ${appName}.app ${appPath}/${appName}.app"
+		system "cp -R ${worksrcpath}/${name}/${appName}.app ${appPath}/${appName}.app"
 		file delete ${destroot}${prefix}/bin/${name}
 	}
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081008/496ebb7d/attachment-0001.html 


More information about the macports-changes mailing list