[100379] trunk/dports/_resources/port1.0/group/select-1.0.tcl

raimue at macports.org raimue at macports.org
Mon Dec 10 01:29:24 PST 2012


Revision: 100379
          https://trac.macports.org/changeset/100379
Author:   raimue at macports.org
Date:     2012-12-10 01:29:24 -0800 (Mon, 10 Dec 2012)
Log Message:
-----------
group/select-1.0:
Allow installation of select files with a different name

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/select-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/select-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/select-1.0.tcl	2012-12-10 09:28:27 UTC (rev 100378)
+++ trunk/dports/_resources/port1.0/group/select-1.0.tcl	2012-12-10 09:29:24 UTC (rev 100379)
@@ -40,16 +40,21 @@
 
 namespace eval select {}
 
-proc select::install {group file} {
+proc select::install {group file {name ""}} {
     global prefix destroot frameworks_dir applications_dir developer_dir
 
+    # Optional argument specifies file name
+    if {${name} == ""} {
+        set name [file tail ${file}]
+    }
+
     xinstall -m 755 -d ${destroot}${prefix}/etc/select/${group}
-    xinstall -m 644 ${file} ${destroot}${prefix}/etc/select/${group}
+    xinstall -m 644 ${file} ${destroot}${prefix}/etc/select/${group}/${name}
 
-    reinplace s|\${prefix}|${prefix}|g ${destroot}${prefix}/etc/select/${group}/[file tail ${file}]
-    reinplace s|\${frameworks_dir}|${frameworks_dir}|g ${destroot}${prefix}/etc/select/${group}/[file tail ${file}]
-    reinplace s|\${applications_dir}|${applications_dir}|g ${destroot}${prefix}/etc/select/${group}/[file tail ${file}]
-    reinplace s|\${developer_dir}|${developer_dir}|g ${destroot}${prefix}/etc/select/${group}/[file tail ${file}]
+    reinplace s|\${prefix}|${prefix}|g ${destroot}${prefix}/etc/select/${group}/${name}
+    reinplace s|\${frameworks_dir}|${frameworks_dir}|g ${destroot}${prefix}/etc/select/${group}/${name}
+    reinplace s|\${applications_dir}|${applications_dir}|g ${destroot}${prefix}/etc/select/${group}/${name}
+    reinplace s|\${developer_dir}|${developer_dir}|g ${destroot}${prefix}/etc/select/${group}/${name}
 }
 
 post-destroot {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121210/50618c17/attachment.html>


More information about the macports-changes mailing list