[52528] branches/images-and-archives/base

blb at macports.org blb at macports.org
Thu Jun 18 01:14:37 PDT 2009


Revision: 52528
          http://trac.macports.org/changeset/52528
Author:   blb at macports.org
Date:     2009-06-18 01:14:36 -0700 (Thu, 18 Jun 2009)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/images-and-archives/base/aclocal.m4
    branches/images-and-archives/base/configure
    branches/images-and-archives/base/doc/macports.conf.5
    branches/images-and-archives/base/src/macports1.0/macports.tcl
    branches/images-and-archives/base/src/port1.0/portbuild.tcl
    branches/images-and-archives/base/src/port1.0/portconfigure.tcl
    branches/images-and-archives/base/src/port1.0/portfetch.tcl
    branches/images-and-archives/base/src/port1.0/portlivecheck.tcl
    branches/images-and-archives/base/src/port1.0/porttrace.tcl
    branches/images-and-archives/base/src/port1.0/portutil.tcl

Property Changed:
----------------
    branches/images-and-archives/base/


Property changes on: branches/images-and-archives/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-52330
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:50249-52527
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/images-and-archives/base/aclocal.m4
===================================================================
--- branches/images-and-archives/base/aclocal.m4	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/aclocal.m4	2009-06-18 08:14:36 UTC (rev 52528)
@@ -489,16 +489,22 @@
 # MP_UNIVERSAL_OPTIONS
 #---------------------------------------
 AC_DEFUN([MP_UNIVERSAL_OPTIONS],[
+  AC_ARG_WITH(universal-archs,[AS_HELP_STRING([--with-universal-archs="CPU"],[Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
 
-    AC_ARG_WITH(universal-archs,[AS_HELP_STRING([--with-universal-archs="CPU"],[Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
+  if test "x$UNIVERSAL_ARCHS" = "x"; then
+    case "$MACOSX_VERSION" in
+      10.[[0-5]]*)
+        UNIVERSAL_ARCHS="i386 ppc"
+        ;;
+      *)
+        UNIVERSAL_ARCHS="x86_64 i386"
+        ;;
+    esac
+  fi
 
-	if test "x$UNIVERSAL_ARCHS" = "x"; then
-	    UNIVERSAL_ARCHS="ppc i386"
-	fi
-
-    AC_MSG_CHECKING([for Universal CPU architectures])
-    AC_MSG_RESULT([$UNIVERSAL_ARCHS])
-    AC_SUBST(UNIVERSAL_ARCHS)
+  AC_MSG_CHECKING([for Universal CPU architectures])
+  AC_MSG_RESULT([$UNIVERSAL_ARCHS])
+  AC_SUBST(UNIVERSAL_ARCHS)
 ])
 
 # MP_LIB_MD5

Modified: branches/images-and-archives/base/configure
===================================================================
--- branches/images-and-archives/base/configure	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/configure	2009-06-18 08:14:36 UTC (rev 52528)
@@ -8068,20 +8068,26 @@
 # Check for universal options
 
 
-
 # Check whether --with-universal-archs was given.
 if test "${with_universal_archs+set}" = set; then
   withval=$with_universal_archs; UNIVERSAL_ARCHS=${withval}
 fi
 
 
-	if test "x$UNIVERSAL_ARCHS" = "x"; then
-	    UNIVERSAL_ARCHS="ppc i386"
-	fi
+  if test "x$UNIVERSAL_ARCHS" = "x"; then
+    case "$MACOSX_VERSION" in
+      10.[0-5]*)
+        UNIVERSAL_ARCHS="i386 ppc"
+        ;;
+      *)
+        UNIVERSAL_ARCHS="x86_64 i386"
+        ;;
+    esac
+  fi
 
-    { $as_echo "$as_me:$LINENO: checking for Universal CPU architectures" >&5
+  { $as_echo "$as_me:$LINENO: checking for Universal CPU architectures" >&5
 $as_echo_n "checking for Universal CPU architectures... " >&6; }
-    { $as_echo "$as_me:$LINENO: result: $UNIVERSAL_ARCHS" >&5
+  { $as_echo "$as_me:$LINENO: result: $UNIVERSAL_ARCHS" >&5
 $as_echo "$UNIVERSAL_ARCHS" >&6; }
 
 

Modified: branches/images-and-archives/base/doc/macports.conf.5
===================================================================
--- branches/images-and-archives/base/doc/macports.conf.5	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/doc/macports.conf.5	2009-06-18 08:14:36 UTC (rev 52528)
@@ -168,7 +168,10 @@
 Regular architectures include: ppc, i386, ppc64, x86_64
 .br
 .Ic Default:
-ppc i386
+x86_64 i386
+.br
+.Ic Default (10.5 and earlier):
+i386 ppc
 .It Va startupitem_type
 Set the default type of startupitems to be generated, overridable by Portfiles that explicitly state a
 startupitem.type key. If set to "default", then a type will be selected that's appropriate to the OS.

Modified: branches/images-and-archives/base/src/macports1.0/macports.tcl
===================================================================
--- branches/images-and-archives/base/src/macports1.0/macports.tcl	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/src/macports1.0/macports.tcl	2009-06-18 08:14:36 UTC (rev 52528)
@@ -615,7 +615,11 @@
 
     # Default mp universal options
     if {![info exists macports::universal_archs]} {
-        set macports::universal_archs {ppc i386}
+        if {[lindex [split $tcl_platform(osVersion) .] 0] >= 10} {
+            set macports::universal_archs {x86_64 i386}
+        } else {
+            set macports::universal_archs {i386 ppc}
+        }
     }
 
     # Platform Settings

Modified: branches/images-and-archives/base/src/port1.0/portbuild.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portbuild.tcl	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/src/port1.0/portbuild.tcl	2009-06-18 08:14:36 UTC (rev 52528)
@@ -53,7 +53,7 @@
 default build.dir {${workpath}/${worksrcdir}}
 default build.cmd {[portbuild::build_getmaketype]}
 default build.nice {${buildnicevalue}}
-default build.jobs {${buildmakejobs}}
+default build.jobs {[portbuild::build_getjobs]}
 default build.pre_args {${build.target}}
 default build.target "all"
 default use_parallel_build yes
@@ -114,18 +114,9 @@
     return "[findBinary nice $portutil::autoconf::nice_path] -n $nice "
 }
 
-proc portbuild::build_getmakejobs {args} {
-    # check if port allows a parallel build
-    global use_parallel_build
-    if {![tbool use_parallel_build]} {
-        ui_debug "port disallows a parallel build"
-        return ""
-    }
-
-    if {![exists build.jobs] || !([string match "*make*" [option build.cmd]] || [string match "*scons*" [option build.cmd]])} {
-        return ""
-    }
-    set jobs [option build.jobs]
+proc portbuild::build_getjobs {args} {
+    global buildmakejobs
+    set jobs $buildmakejobs
     # if set to '0', use the number of cores for the number of jobs
     if {$jobs == 0} {
         if {[catch {set jobs [exec "/usr/sbin/sysctl" "-n" "hw.availcpu"]}]} {
@@ -135,9 +126,23 @@
         }
     }
     if {![string is integer -strict $jobs] || $jobs <= 1} {
+        set jobs 1
+    }
+    return $jobs
+}
+
+proc portbuild::build_getjobsarg {args} {
+    # check if port allows a parallel build
+    global use_parallel_build
+    if {![tbool use_parallel_build]} {
+        ui_debug "port disallows a parallel build"
         return ""
     }
-    return " -j$jobs"
+
+    if {![exists build.jobs] || !([string match "*make*" [option build.cmd]] || [string match "*scons*" [option build.cmd]])} {
+        return ""
+    }
+    return " -j[option build.jobs]"
 }
 
 proc portbuild::build_start {args} {
@@ -150,7 +155,7 @@
     global build.cmd
 
     set nice_prefix [build_getnicevalue]
-    set jobs_suffix [build_getmakejobs]
+    set jobs_suffix [build_getjobsarg]
 
     set realcmd ${build.cmd}
     set build.cmd "$nice_prefix${build.cmd}$jobs_suffix"

Modified: branches/images-and-archives/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portconfigure.tcl	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/src/port1.0/portconfigure.tcl	2009-06-18 08:14:36 UTC (rev 52528)
@@ -229,33 +229,33 @@
 
 # internal function to determine the CPPFLAGS for the compiler
 proc portconfigure::configure_get_universal_cppflags {args} {
-    global os.arch os.major
+    global os.arch os.major developer_dir
     set flags ""
     # include sysroot in CPPFLAGS too (twice), for the benefit of autoconf
     if {${os.arch} == "powerpc" && ${os.major} == "8"} {
-        set flags "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+        set flags "-isysroot ${developer_dir}/SDKs/MacOSX10.4u.sdk"
     }
     return $flags
 }
 
 # internal function to determine the CFLAGS for the compiler
 proc portconfigure::configure_get_universal_cflags {args} {
-    global os.arch os.major
+    global os.arch os.major developer_dir
     set flags [configure_get_universal_archflags]
     # these flags should be valid for C/C++ and similar compiler frontends
     if {${os.arch} == "powerpc" && ${os.major} == "8"} {
-        set flags "-isysroot /Developer/SDKs/MacOSX10.4u.sdk ${flags}"
+        set flags "-isysroot ${developer_dir}/SDKs/MacOSX10.4u.sdk ${flags}"
     }
     return $flags
 }
 
 # internal function to determine the LDFLAGS for the compiler
 proc portconfigure::configure_get_universal_ldflags {args} {
-    global os.arch os.major
+    global os.arch os.major developer_dir
     set flags [configure_get_universal_archflags]
     # works around linking without using the CFLAGS, outside of automake
     if {${os.arch} == "powerpc" && ${os.major} == "8"} {
-        set flags "-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk ${flags}"
+        set flags "-Wl,-syslibroot,${developer_dir}/SDKs/MacOSX10.4u.sdk ${flags}"
     }
     return $flags
 }

Modified: branches/images-and-archives/base/src/port1.0/portfetch.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portfetch.tcl	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/src/port1.0/portfetch.tcl	2009-06-18 08:14:36 UTC (rev 52528)
@@ -225,38 +225,39 @@
     set ret [list]
     foreach element $portfetch::mirror_sites::sites($mirrors) {
 
-    # here we have the chance to take a look at tags, that possibly
-    # have been assigned in mirror_sites.tcl
-    set splitlist [split $element :]
-    # every element is a URL, so we'll always have multiple elements. no need to check
-    set element "[lindex $splitlist 0]:[lindex $splitlist 1]"
-    set mirror_tag "[lindex $splitlist 2]"
+        # here we have the chance to take a look at tags, that possibly
+        # have been assigned in mirror_sites.tcl
+        set splitlist [split $element :]
+        # every element is a URL, so we'll always have multiple elements. no need to check
+        set element "[lindex $splitlist 0]:[lindex $splitlist 1]"
+        set mirror_tag "[lindex $splitlist 2]"
 
-    set name_re {\$(?:name\y|\{name\})}
-    # if the URL has $name embedded, kill any mirror_tag that may have been added
-    # since a mirror_tag and $name are incompatible
-    if {[regexp $name_re $element]} {
-        set mirror_tag ""
-    }
+        set name_re {\$(?:name\y|\{name\})}
+        # if the URL has $name embedded, kill any mirror_tag that may have been added
+        # since a mirror_tag and $name are incompatible
+        if {[regexp $name_re $element]} {
+            set mirror_tag ""
+        }
 
-    if {$mirror_tag == "mirror"} {
-        set thesubdir ${dist_subdir}
-    } elseif {$subdir == "" && $mirror_tag != "nosubdir"} {
-        set thesubdir ${name}
-    } else {
-        set thesubdir ${subdir}
-    }
+        if {$mirror_tag == "mirror"} {
+            set thesubdir ${dist_subdir}
+        } elseif {$subdir == "" && $mirror_tag != "nosubdir"} {
+            set thesubdir ${name}
+        } else {
+            set thesubdir ${subdir}
+        }
 
-    # parse an embedded $name. if present, remove the subdir
-    if {[regsub $name_re $element $thesubdir element] > 0} {
-        set thesubdir ""
-    }
+        # parse an embedded $name. if present, remove the subdir
+        if {[regsub $name_re $element $thesubdir element] > 0} {
+            set thesubdir ""
+        }
 
-    if {"$tag" != ""} {
-        eval append element "${thesubdir}:${tag}"
-    } else {
-        eval append element "${thesubdir}"
-    }
+        if {"$tag" != ""} {
+            eval append element "${thesubdir}:${tag}"
+        } else {
+            eval append element "${thesubdir}"
+        }
+
         eval lappend ret $element
     }
 
@@ -333,9 +334,9 @@
 }
 
 # Checks patch files and their tags to assemble url lists for later fetching
-proc portfetch::checkpatchfiles {args} {
+proc portfetch::checkpatchfiles {urls} {
     global patchfiles all_dist_files patch_sites filespath
-    variable fetch_urls
+    upvar $urls fetch_urls
 
     if {[info exists patchfiles]} {
         foreach file $patchfiles {
@@ -356,9 +357,9 @@
 }
 
 # Checks dist files and their tags to assemble url lists for later fetching
-proc portfetch::checkdistfiles {args} {
+proc portfetch::checkdistfiles {urls} {
     global distfiles all_dist_files master_sites filespath
-    variable fetch_urls
+    upvar $urls fetch_urls
 
     if {[info exists distfiles]} {
         foreach file $distfiles {
@@ -377,9 +378,9 @@
 }
 
 # sorts fetch_urls in order of ping time
-proc portfetch::sortsites {args} {
+proc portfetch::sortsites {urls} {
     global fallback_mirror_site
-    variable fetch_urls
+    upvar $urls fetch_urls
 
     set fallback_mirror_list [mirror_sites $fallback_mirror_site {} {}]
 
@@ -453,12 +454,12 @@
 
 # Perform the full checksites/checkpatchfiles/checkdistfiles sequence.
 # This method is used by distcheck target.
-proc portfetch::checkfiles {args} {
-    variable fetch_urls
+proc portfetch::checkfiles {urls} {
+    upvar $urls fetch_urls
 
     checksites
-    checkpatchfiles
-    checkdistfiles
+    checkpatchfiles fetch_urls
+    checkdistfiles fetch_urls
 }
 
 
@@ -627,7 +628,7 @@
                 return -code error [format [msgcat::mc "%s must be writable"] $distpath]
             }
             if {!$sorted} {
-                sortsites
+                sortsites fetch_urls
                 set sorted yes
             }
             variable portfetch::$url_var
@@ -702,6 +703,7 @@
 proc portfetch::fetch_init {args} {
     global distfiles distname distpath all_dist_files dist_subdir fetch.type fetch_init_done
     global altprefix usealtworkpath
+    variable fetch_urls
 
     if {[info exists distpath] && [info exists dist_subdir] && ![info exists fetch_init_done]} {
 
@@ -716,7 +718,7 @@
         set distpath ${distpath}/${dist_subdir}
         set fetch_init_done yes
     }
-    portfetch::checkfiles
+    portfetch::checkfiles fetch_urls
 }
 
 proc portfetch::fetch_start {args} {

Modified: branches/images-and-archives/base/src/port1.0/portlivecheck.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portlivecheck.tcl	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/src/port1.0/portlivecheck.tcl	2009-06-18 08:14:36 UTC (rev 52528)
@@ -122,14 +122,6 @@
             set livecheck.type "fallback"
         }
     }
-    # If livecheck.name is still "default", set it to $name.
-    if {${livecheck.name} eq "default"} {
-        set livecheck.name $name
-    }
-    # If livecheck.distname is still "default", set it to $name.
-    if {${livecheck.distname} eq "default"} {
-        set livecheck.distname $name
-    }
     if {[lsearch -exact [split $available_types "|"] ${livecheck.type}] != -1} {
         # Load the defaults from _resources/port1.0/livecheck/${livecheck.type}.tcl.
         set defaults_file "$types_dir/${livecheck.type}.tcl"

Modified: branches/images-and-archives/base/src/port1.0/porttrace.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/porttrace.tcl	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/src/port1.0/porttrace.tcl	2009-06-18 08:14:36 UTC (rev 52528)
@@ -212,7 +212,7 @@
 
 # Private.
 # Slave method to read a line from the trace.
-proc porttrace::lave_read_line {chan} {
+proc porttrace::slave_read_line {chan} {
     global ports_list trace_filemap sandbox_violation_list workpath
     global env
 

Modified: branches/images-and-archives/base/src/port1.0/portutil.tcl
===================================================================
--- branches/images-and-archives/base/src/port1.0/portutil.tcl	2009-06-18 08:11:48 UTC (rev 52527)
+++ branches/images-and-archives/base/src/port1.0/portutil.tcl	2009-06-18 08:14:36 UTC (rev 52528)
@@ -1881,9 +1881,8 @@
 }
 
 proc add_default_universal_variant {args} {
-    # Declare default universal variant if universal SDK is installed
-    variant universal {
-    }
+    # Declare default universal variant (all the magic happens in portconfigure now)
+    variant universal {}
 }
 
 # Target class definition.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090618/acdb4b0e/attachment-0001.html>


More information about the macports-changes mailing list