[57391] trunk/dports/_resources/port1.0/group/select-1.0.tcl
raimue at macports.org
raimue at macports.org
Thu Sep 10 07:04:44 PDT 2009
Revision: 57391
http://trac.macports.org/changeset/57391
Author: raimue at macports.org
Date: 2009-09-10 07:04:44 -0700 (Thu, 10 Sep 2009)
Log Message:
-----------
PortGroup select:
New namespace and a helper function (which is meant to be used by python_select)
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 2009-09-10 13:54:35 UTC (rev 57390)
+++ trunk/dports/_resources/port1.0/group/select-1.0.tcl 2009-09-10 14:04:44 UTC (rev 57391)
@@ -38,15 +38,23 @@
default select.group ""
default select.file ""
+namespace eval select {}
+
+proc select::install {group file} {
+ global prefix destroot frameworks_dir applications_dir
+
+ xinstall -m 755 -d ${destroot}${prefix}/etc/select/${group}
+ xinstall -m 644 ${file} ${destroot}${prefix}/etc/select/${group}
+
+ 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}]
+}
+
post-destroot {
if {${select.file} != "" || ${select.group} != ""} {
- xinstall -m 755 -d ${destroot}${prefix}/etc/select/${select.group}
- xinstall -m 644 ${select.file} ${destroot}${prefix}/etc/select/${select.group}
-
- reinplace s|\${prefix}|${prefix}|g ${destroot}${prefix}/etc/select/${select.group}/[file tail ${select.file}]
- reinplace s|\${frameworks_dir}|${frameworks_dir}|g ${destroot}${prefix}/etc/select/${select.group}/[file tail ${select.file}]
- reinplace s|\${applications_dir}|${applications_dir}|g ${destroot}${prefix}/etc/select/${select.group}/[file tail ${select.file}]
+ select::install ${select.group} ${select.file}
} else {
- ui_debug "PortGroup select: select.group and select.file not set"
+ ui_debug "PortGroup select: select.group or select.file not set"
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090910/2acadbaf/attachment.html>
More information about the macports-changes
mailing list