[67048] trunk/base/src
jmr at macports.org
jmr at macports.org
Tue Apr 27 19:26:35 PDT 2010
Revision: 67048
http://trac.macports.org/changeset/67048
Author: jmr at macports.org
Date: 2010-04-27 19:26:34 -0700 (Tue, 27 Apr 2010)
Log Message:
-----------
set default developer_dir in port1.0
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/pextlib1.0/tracelib.c
trunk/base/src/port1.0/portdestroot.tcl
trunk/base/src/port1.0/portmain.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2010-04-28 01:47:54 UTC (rev 67047)
+++ trunk/base/src/macports1.0/macports.tcl 2010-04-28 02:26:34 UTC (rev 67048)
@@ -784,14 +784,6 @@
set macports::macportsuser $macports::autoconf::macportsuser
}
- # Default Xcode Tools path
- if {![info exists macports::developer_dir]} {
- if {$os_platform != "darwin" || $os_major < 9
- || [catch {set macports::developer_dir [exec xcode-select -print-path]}]} {
- set macports::developer_dir "/Developer"
- }
- }
-
# Default mp universal options
if {![info exists macports::universal_archs]} {
if {$os_major >= 10} {
Modified: trunk/base/src/pextlib1.0/tracelib.c
===================================================================
--- trunk/base/src/pextlib1.0/tracelib.c 2010-04-28 01:47:54 UTC (rev 67047)
+++ trunk/base/src/pextlib1.0/tracelib.c 2010-04-28 02:26:34 UTC (rev 67048)
@@ -272,13 +272,13 @@
append_allow("/bin", 0);
append_allow("/sbin", 0);
append_allow("/dev", 0);
- append_allow(Tcl_GetVar(interp, "macports::prefix", TCL_GLOBAL_ONLY), 2);
+ append_allow(Tcl_GetVar(interp, "prefix", TCL_GLOBAL_ONLY), 2);
/* If there is no SDK we will allow everything in /usr /System/Library etc, else add binaries to allow, and redirect root to SDK. */
if(sdk&&*sdk)
{
char buf[260];
buf[0] = '\0';
- strlcat(buf, Tcl_GetVar(interp, "macports::developer_dir", TCL_GLOBAL_ONLY), 260);
+ strlcat(buf, Tcl_GetVar(interp, "developer_dir", TCL_GLOBAL_ONLY), 260);
strlcat(buf, "/SDKs/", 260);
strlcat(buf, sdk, 260);
@@ -294,7 +294,7 @@
append_allow("/usr", 0);
append_allow("/System/Library", 0);
append_allow("/Library", 0);
- append_allow(Tcl_GetVar(interp, "macports::developer_dir", TCL_GLOBAL_ONLY), 0);
+ append_allow(Tcl_GetVar(interp, "developer_dir", TCL_GLOBAL_ONLY), 0);
}
}else
append_allow("/", 0);
Modified: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl 2010-04-28 01:47:54 UTC (rev 67047)
+++ trunk/base/src/port1.0/portdestroot.tcl 2010-04-28 02:26:34 UTC (rev 67048)
@@ -136,7 +136,7 @@
proc portdestroot::destroot_finish {args} {
global UI_PREFIX destroot prefix name startupitem.create destroot.violate_mtree
- global applications_dir frameworks_dir developer_dir destroot.keepdirs
+ global applications_dir frameworks_dir destroot.keepdirs
global os.platform os.version
variable oldmask
Modified: trunk/base/src/port1.0/portmain.tcl
===================================================================
--- trunk/base/src/port1.0/portmain.tcl 2010-04-28 01:47:54 UTC (rev 67047)
+++ trunk/base/src/port1.0/portmain.tcl 2010-04-28 02:26:34 UTC (rev 67048)
@@ -62,7 +62,7 @@
default prefix /opt/local
default applications_dir /Applications/MacPorts
default frameworks_dir {${prefix}/Library/Frameworks}
-default developer_dir {/Developer}
+default developer_dir {[portmain::get_developer_dir]}
default destdir destroot
default destpath {${workpath}/${destdir}}
# destroot is provided as a clearer name for the "destpath" variable
@@ -119,6 +119,13 @@
default compiler.cpath {${prefix}/include}
default compiler.library_path {${prefix}/lib}
+proc portmain::get_developer_dir {} {
+ if {![catch {binaryInPath xcode-select}]} {
+ return [exec xcode-select -print-path]
+ }
+ return "/Developer"
+}
+
# start gsoc08-privileges
# Record initial euid/egid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100427/552c6d34/attachment.html>
More information about the macports-changes
mailing list