[137286] branches/gsoc15-dependency/base

ijackson at macports.org ijackson at macports.org
Mon Jun 8 00:49:38 PDT 2015


Revision: 137286
          https://trac.macports.org/changeset/137286
Author:   ijackson at macports.org
Date:     2015-06-08 00:49:38 -0700 (Mon, 08 Jun 2015)
Log Message:
-----------
Merge macports-trunk/base with branches/gsoc15-dependency/base
Merge updated machista SWIG.

Modified Paths:
--------------
    branches/gsoc15-dependency/base/src/machista1.0/machista.i
    branches/gsoc15-dependency/base/src/machista1.0/machista_wrap.c
    branches/gsoc15-dependency/base/src/macports1.0/macports.tcl
    branches/gsoc15-dependency/base/src/port1.0/portconfigure.tcl

Property Changed:
----------------
    branches/gsoc15-dependency/base/


Property changes on: branches/gsoc15-dependency/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/gsoc14-cleanup:123738-124046
/branches/gsoc14-interactive/base:119516-124240
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/gsoc14-cleanup:123738-124046
/branches/gsoc14-interactive/base:119516-124240
/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:136782-137284
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/gsoc15-dependency/base/src/machista1.0/machista.i
===================================================================
--- branches/gsoc15-dependency/base/src/machista1.0/machista.i	2015-06-08 07:48:53 UTC (rev 137285)
+++ branches/gsoc15-dependency/base/src/machista1.0/machista.i	2015-06-08 07:49:38 UTC (rev 137286)
@@ -2,7 +2,8 @@
 %module machista
 
 %{
-    #include "libmachista.h"
+#include <tcl.h>
+#include "libmachista.h"
 %}
 
 %inline %{

Modified: branches/gsoc15-dependency/base/src/machista1.0/machista_wrap.c
===================================================================
--- branches/gsoc15-dependency/base/src/machista1.0/machista_wrap.c	2015-06-08 07:48:53 UTC (rev 137285)
+++ branches/gsoc15-dependency/base/src/machista1.0/machista_wrap.c	2015-06-08 07:49:38 UTC (rev 137286)
@@ -1,11 +1,11 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.40
- * 
- * This file is not intended to be easily readable and contains a number of 
+ * Version 3.0.5
+ *
+ * This file is not intended to be easily readable and contains a number of
  * coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG 
- * interface file instead. 
+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
  * ----------------------------------------------------------------------------- */
 
 #define SWIGTCL
@@ -41,28 +41,28 @@
 #ifndef SWIGUNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
+#     define SWIGUNUSED __attribute__ ((__unused__))
 #   else
 #     define SWIGUNUSED
 #   endif
 # elif defined(__ICC)
-#   define SWIGUNUSED __attribute__ ((__unused__)) 
+#   define SWIGUNUSED __attribute__ ((__unused__))
 # else
-#   define SWIGUNUSED 
+#   define SWIGUNUSED
 # endif
 #endif
 
 #ifndef SWIG_MSC_UNSUPPRESS_4505
 # if defined(_MSC_VER)
 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif 
+# endif
 #endif
 
 #ifndef SWIGUNUSEDPARM
 # ifdef __cplusplus
 #   define SWIGUNUSEDPARM(p)
 # else
-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
 # endif
 #endif
 
@@ -105,7 +105,7 @@
 #   define SWIGSTDCALL __stdcall
 # else
 #   define SWIGSTDCALL
-# endif 
+# endif
 #endif
 
 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
@@ -151,7 +151,7 @@
   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
   creating a static or dynamic library from the SWIG runtime code.
   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
-  
+
   But only do this if strictly necessary, ie, if you have problems
   with your compiler or suchlike.
 */
@@ -177,16 +177,16 @@
 #define SWIG_POINTER_OWN           0x1
 
 
-/* 
+/*
    Flags/methods for returning states.
-   
-   The SWIG conversion methods, as ConvertPtr, return and integer 
+
+   The SWIG conversion methods, as ConvertPtr, return an integer
    that tells if the conversion was successful or not. And if not,
    an error code can be returned (see swigerrors.swg for the codes).
-   
+
    Use the following macros/flags to set or process the returning
    states.
-   
+
    In old versions of SWIG, code such as the following was usually written:
 
      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
@@ -219,23 +219,23 @@
     } else {
       // fail code
     }
-    
+
    I.e., now SWIG_ConvertPtr can return new objects and you can
    identify the case and take care of the deallocation. Of course that
    also requires SWIG_ConvertPtr to return new result values, such as
 
-      int SWIG_ConvertPtr(obj, ptr,...) {         
-        if (<obj is ok>) {			       
-          if (<need new object>) {		       
-            *ptr = <ptr to new allocated object>; 
-            return SWIG_NEWOBJ;		       
-          } else {				       
-            *ptr = <ptr to old object>;	       
-            return SWIG_OLDOBJ;		       
-          } 				       
-        } else {				       
-          return SWIG_BADOBJ;		       
-        }					       
+      int SWIG_ConvertPtr(obj, ptr,...) {
+        if (<obj is ok>) {
+          if (<need new object>) {
+            *ptr = <ptr to new allocated object>;
+            return SWIG_NEWOBJ;
+          } else {
+            *ptr = <ptr to old object>;
+            return SWIG_OLDOBJ;
+          }
+        } else {
+          return SWIG_BADOBJ;
+        }
       }
 
    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
@@ -249,17 +249,17 @@
        int fooi(int);
 
    and you call
- 
+
       food(1)   // cast rank '1'  (1 -> 1.0)
       fooi(1)   // cast rank '0'
 
    just use the SWIG_AddCast()/SWIG_CheckState()
 */
 
-#define SWIG_OK                    (0) 
+#define SWIG_OK                    (0)
 #define SWIG_ERROR                 (-1)
 #define SWIG_IsOK(r)               (r >= 0)
-#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
 
 /* The CastRankLimit says how many bits are used for the cast rank */
 #define SWIG_CASTRANKLIMIT         (1 << 8)
@@ -290,14 +290,14 @@
 #  endif
 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
-SWIGINTERNINLINE int SWIG_AddCast(int r) { 
+SWIGINTERNINLINE int SWIG_AddCast(int r) {
   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
 }
-SWIGINTERNINLINE int SWIG_CheckState(int r) { 
-  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
+SWIGINTERNINLINE int SWIG_CheckState(int r) {
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
 }
 #else /* no cast-rank mode */
-#  define SWIG_AddCast
+#  define SWIG_AddCast(r) (r)
 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
 #endif
 
@@ -341,7 +341,7 @@
   void                    *clientdata;		/* Language specific module data */
 } swig_module_info;
 
-/* 
+/*
   Compare two type names skipping the space characters, therefore
   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
 
@@ -361,18 +361,18 @@
 
 /*
   Check type equivalence in a name list like <name1>|<name2>|...
-  Return 0 if not equal, 1 if equal
+  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
 */
 SWIGRUNTIME int
-SWIG_TypeEquiv(const char *nb, const char *tb) {
-  int equiv = 0;
+SWIG_TypeCmp(const char *nb, const char *tb) {
+  int equiv = 1;
   const char* te = tb + strlen(tb);
   const char* ne = nb;
-  while (!equiv && *ne) {
+  while (equiv != 0 && *ne) {
     for (nb = ne; *ne; ++ne) {
       if (*ne == '|') break;
     }
-    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
     if (*ne) ++ne;
   }
   return equiv;
@@ -380,24 +380,13 @@
 
 /*
   Check type equivalence in a name list like <name1>|<name2>|...
-  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+  Return 0 if not equal, 1 if equal
 */
 SWIGRUNTIME int
-SWIG_TypeCompare(const char *nb, const char *tb) {
-  int equiv = 0;
-  const char* te = tb + strlen(tb);
-  const char* ne = nb;
-  while (!equiv && *ne) {
-    for (nb = ne; *ne; ++ne) {
-      if (*ne == '|') break;
-    }
-    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
-    if (*ne) ++ne;
-  }
-  return equiv;
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
 }
 
-
 /*
   Check the typename
 */
@@ -425,7 +414,7 @@
   return 0;
 }
 
-/* 
+/*
   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
 */
 SWIGRUNTIME swig_cast_info *
@@ -460,7 +449,7 @@
   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
 }
 
-/* 
+/*
    Dynamic pointer casting. Down an inheritance hierarchy
 */
 SWIGRUNTIME swig_type_info *
@@ -504,7 +493,7 @@
     return type->name;
 }
 
-/* 
+/*
    Set the clientdata field for a type
 */
 SWIGRUNTIME void
@@ -512,14 +501,14 @@
   swig_cast_info *cast = ti->cast;
   /* if (ti->clientdata == clientdata) return; */
   ti->clientdata = clientdata;
-  
+
   while (cast) {
     if (!cast->converter) {
       swig_type_info *tc = cast->type;
       if (!tc->clientdata) {
 	SWIG_TypeClientData(tc, clientdata);
       }
-    }    
+    }
     cast = cast->next;
   }
 }
@@ -528,31 +517,31 @@
   SWIG_TypeClientData(ti, clientdata);
   ti->owndata = 1;
 }
-  
+
 /*
   Search for a swig_type_info structure only by mangled name
   Search is a O(log #types)
-  
-  We start searching at module start, and finish searching when start == end.  
+
+  We start searching at module start, and finish searching when start == end.
   Note: if start == end at the beginning of the function, we go all the way around
   the circular list.
 */
 SWIGRUNTIME swig_type_info *
-SWIG_MangledTypeQueryModule(swig_module_info *start, 
-                            swig_module_info *end, 
+SWIG_MangledTypeQueryModule(swig_module_info *start,
+                            swig_module_info *end,
 		            const char *name) {
   swig_module_info *iter = start;
   do {
     if (iter->size) {
-      register size_t l = 0;
-      register size_t r = iter->size - 1;
+      size_t l = 0;
+      size_t r = iter->size - 1;
       do {
 	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
-	register size_t i = (l + r) >> 1; 
+	size_t i = (l + r) >> 1;
 	const char *iname = iter->types[i]->name;
 	if (iname) {
-	  register int compare = strcmp(name, iname);
-	  if (compare == 0) {	    
+	  int compare = strcmp(name, iname);
+	  if (compare == 0) {
 	    return iter->types[i];
 	  } else if (compare < 0) {
 	    if (i) {
@@ -577,14 +566,14 @@
   Search for a swig_type_info structure for either a mangled name or a human readable name.
   It first searches the mangled names of the types, which is a O(log #types)
   If a type is not found it then searches the human readable names, which is O(#types).
-  
-  We start searching at module start, and finish searching when start == end.  
+
+  We start searching at module start, and finish searching when start == end.
   Note: if start == end at the beginning of the function, we go all the way around
   the circular list.
 */
 SWIGRUNTIME swig_type_info *
-SWIG_TypeQueryModule(swig_module_info *start, 
-                     swig_module_info *end, 
+SWIG_TypeQueryModule(swig_module_info *start,
+                     swig_module_info *end,
 		     const char *name) {
   /* STEP 1: Search the name field using binary search */
   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
@@ -595,7 +584,7 @@
        of the str field (the human readable name) */
     swig_module_info *iter = start;
     do {
-      register size_t i = 0;
+      size_t i = 0;
       for (; i < iter->size; ++i) {
 	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
 	  return iter->types[i];
@@ -603,56 +592,56 @@
       iter = iter->next;
     } while (iter != end);
   }
-  
+
   /* neither found a match */
   return 0;
 }
 
-/* 
+/*
    Pack binary data into a string
 */
 SWIGRUNTIME char *
 SWIG_PackData(char *c, void *ptr, size_t sz) {
   static const char hex[17] = "0123456789abcdef";
-  register const unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu =  u + sz;
+  const unsigned char *u = (unsigned char *) ptr;
+  const unsigned char *eu =  u + sz;
   for (; u != eu; ++u) {
-    register unsigned char uu = *u;
+    unsigned char uu = *u;
     *(c++) = hex[(uu & 0xf0) >> 4];
     *(c++) = hex[uu & 0xf];
   }
   return c;
 }
 
-/* 
+/*
    Unpack binary data from a string
 */
 SWIGRUNTIME const char *
 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
-  register unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu = u + sz;
+  unsigned char *u = (unsigned char *) ptr;
+  const unsigned char *eu = u + sz;
   for (; u != eu; ++u) {
-    register char d = *(c++);
-    register unsigned char uu;
+    char d = *(c++);
+    unsigned char uu;
     if ((d >= '0') && (d <= '9'))
       uu = ((d - '0') << 4);
     else if ((d >= 'a') && (d <= 'f'))
       uu = ((d - ('a'-10)) << 4);
-    else 
+    else
       return (char *) 0;
     d = *(c++);
     if ((d >= '0') && (d <= '9'))
       uu |= (d - '0');
     else if ((d >= 'a') && (d <= 'f'))
       uu |= (d - ('a'-10));
-    else 
+    else
       return (char *) 0;
     *u = uu;
   }
   return c;
 }
 
-/* 
+/*
    Pack 'void *' into a string buffer.
 */
 SWIGRUNTIME char *
@@ -712,18 +701,18 @@
 #endif
 
 /*  Errors in SWIG */
-#define  SWIG_UnknownError    	   -1 
-#define  SWIG_IOError        	   -2 
-#define  SWIG_RuntimeError   	   -3 
-#define  SWIG_IndexError     	   -4 
-#define  SWIG_TypeError      	   -5 
-#define  SWIG_DivisionByZero 	   -6 
-#define  SWIG_OverflowError  	   -7 
-#define  SWIG_SyntaxError    	   -8 
-#define  SWIG_ValueError     	   -9 
+#define  SWIG_UnknownError    	   -1
+#define  SWIG_IOError        	   -2
+#define  SWIG_RuntimeError   	   -3
+#define  SWIG_IndexError     	   -4
+#define  SWIG_TypeError      	   -5
+#define  SWIG_DivisionByZero 	   -6
+#define  SWIG_OverflowError  	   -7
+#define  SWIG_SyntaxError    	   -8
+#define  SWIG_ValueError     	   -9
 #define  SWIG_SystemError    	   -10
 #define  SWIG_AttributeError 	   -11
-#define  SWIG_MemoryError    	   -12 
+#define  SWIG_MemoryError    	   -12
 #define  SWIG_NullReferenceError   -13
 
 
@@ -856,6 +845,7 @@
   struct swig_class **bases;
   const char              **base_names;
   swig_module_info   *module;
+  Tcl_HashTable       hashtable;
 } swig_class;
 
 typedef struct swig_instance {
@@ -914,9 +904,6 @@
 
 
 /* -----------------------------------------------------------------------------
- * See the LICENSE file for information on copyright, usage and redistribution
- * of SWIG, and the README file for authors - http://www.swig.org/release.html.
- *
  * tclrun.swg
  *
  * This file contains the runtime support for Tcl modules and includes
@@ -989,10 +976,7 @@
 
 #ifdef __cplusplus
 extern "C" {
-#if 0
-} /* cc-mode */
 #endif
-#endif
 
 /* Object support */
 
@@ -1198,7 +1182,7 @@
   /* create a new pointer */
   data = SWIG_PackData(buf, &module, sizeof(swig_type_info **));
   *data = 0;
-  Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, 0);
+  Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, TCL_GLOBAL_ONLY);
 }
 
 /* -----------------------------------------------------------------------------*
@@ -1261,6 +1245,7 @@
   cls_stack_bi[cls_stack_top] = -1;
   cls = inst->classptr;
   while (1) {
+    Tcl_HashEntry* hashentry;
     bi = cls_stack_bi[cls_stack_top];
     cls = cls_stack[cls_stack_top];
     if (bi != -1) {
@@ -1285,19 +1270,17 @@
     }
     cls_stack_bi[cls_stack_top]++;
 
-    meth = cls->methods;
-    /* Check for methods */
-    while (meth && meth->name) {
-      if (strcmp(meth->name,method) == 0) {
+    hashentry = Tcl_FindHashEntry(&(cls->hashtable), method);
+    if (hashentry) {
+        ClientData cd = Tcl_GetHashValue(hashentry);
+        swig_wrapper method_wrapper = (swig_wrapper)cd;
         oldarg = objv[1];
         objv[1] = inst->thisptr;
         Tcl_IncrRefCount(inst->thisptr);
-        rcode = (*meth->method)(clientData,interp,objc,objv);
+        rcode = (method_wrapper)(clientData,interp,objc,objv);
         objv[1] = oldarg;
         Tcl_DecrRefCount(inst->thisptr);
         return rcode;
-      }
-      meth++;
     }
     /* Check class methods for a match */
     if (strcmp(method,"cget") == 0) {
@@ -1404,7 +1387,7 @@
 SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
   Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
   /* Check to see if this pointer belongs to a class or not */
-  if ((type->clientdata) && (interp)) {
+  if (thisvalue && (type->clientdata) && (interp)) {
     Tcl_CmdInfo    ci;
     char          *name;
     name = Tcl_GetStringFromObj(robj,NULL);
@@ -1603,9 +1586,6 @@
 }
 
 #ifdef __cplusplus
-#if 0
-{ /* cc-mode */
-#endif
 }
 #endif
 
@@ -1641,7 +1621,7 @@
 
 #define SWIG_version "1.0"
 
-#define SWIGVERSION 0x010340 
+#define SWIGVERSION 0x030005 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -1671,7 +1651,8 @@
 
 
 
-    #include "libmachista.h"
+#include <tcl.h>
+#include "libmachista.h"
 
 
 #ifdef __MACH__
@@ -2401,18 +2382,18 @@
 #endif
 /* -----------------------------------------------------------------------------
  * Type initialization:
- * This problem is tough by the requirement that no dynamic 
- * memory is used. Also, since swig_type_info structures store pointers to 
+ * This problem is tough by the requirement that no dynamic
+ * memory is used. Also, since swig_type_info structures store pointers to
  * swig_cast_info structures and swig_cast_info structures store pointers back
- * to swig_type_info structures, we need some lookup code at initialization. 
- * The idea is that swig generates all the structures that are needed. 
- * The runtime then collects these partially filled structures. 
- * The SWIG_InitializeModule function takes these initial arrays out of 
+ * to swig_type_info structures, we need some lookup code at initialization.
+ * The idea is that swig generates all the structures that are needed.
+ * The runtime then collects these partially filled structures.
+ * The SWIG_InitializeModule function takes these initial arrays out of
  * swig_module, and does all the lookup, filling in the swig_module.types
  * array with the correct data and linking the correct swig_cast_info
  * structures together.
  *
- * The generated swig_type_info structures are assigned staticly to an initial 
+ * The generated swig_type_info structures are assigned statically to an initial
  * array. We just loop through that array, and handle each type individually.
  * First we lookup if this type has been already loaded, and if so, use the
  * loaded structure instead of the generated one. Then we have to fill in the
@@ -2422,17 +2403,17 @@
  * a column is one of the swig_cast_info structures for that type.
  * The cast_initial array is actually an array of arrays, because each row has
  * a variable number of columns. So to actually build the cast linked list,
- * we find the array of casts associated with the type, and loop through it 
+ * we find the array of casts associated with the type, and loop through it
  * adding the casts to the list. The one last trick we need to do is making
  * sure the type pointer in the swig_cast_info struct is correct.
  *
- * First off, we lookup the cast->type name to see if it is already loaded. 
+ * First off, we lookup the cast->type name to see if it is already loaded.
  * There are three cases to handle:
  *  1) If the cast->type has already been loaded AND the type we are adding
  *     casting info to has not been loaded (it is in this module), THEN we
  *     replace the cast->type pointer with the type pointer that has already
  *     been loaded.
- *  2) If BOTH types (the one we are adding casting info to, and the 
+ *  2) If BOTH types (the one we are adding casting info to, and the
  *     cast->type) are loaded, THEN the cast info has already been loaded by
  *     the previous module so we just ignore it.
  *  3) Finally, if cast->type has not already been loaded, then we add that
@@ -2456,7 +2437,7 @@
 SWIG_InitializeModule(void *clientdata) {
   size_t i;
   swig_module_info *module_head, *iter;
-  int found, init;
+  int init;
   
   /* check to see if the circular list has been setup, if not, set it up */
   if (swig_module.next==0) {
@@ -2475,27 +2456,23 @@
     /* This is the first module loaded for this interpreter */
     /* so set the swig module into the interpreter */
     SWIG_SetModule(clientdata, &swig_module);
-    module_head = &swig_module;
   } else {
     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
-    found=0;
     iter=module_head;
     do {
       if (iter==&swig_module) {
-        found=1;
-        break;
+        /* Our module is already in the list, so there's nothing more to do. */
+        return;
       }
       iter=iter->next;
     } while (iter!= module_head);
     
-    /* if the is found in the list, then all is done and we may leave */
-    if (found) return;
-    /* otherwise we must add out module into the list */
+    /* otherwise we must add our module into the list */
     swig_module.next = module_head->next;
     module_head->next = &swig_module;
   }
   
-  /* When multiple interpeters are used, a module could have already been initialized in
+  /* When multiple interpreters are used, a module could have already been initialized in
        a different interpreter, but not yet have a pointer in this interpreter.
        In this case, we do not want to continue adding types... everything should be
        set up already */
@@ -2647,7 +2624,7 @@
   
   SWIGINTERN void
   SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
-    int i;
+    size_t i;
     Tcl_Obj *obj;
     
     if (!swigconstTableinit) {
@@ -2672,6 +2649,27 @@
     }
   }
   
+  /* Create fast method lookup tables */
+  
+  SWIGINTERN void
+  SWIG_Tcl_InstallMethodLookupTables(void) {
+    size_t i;
+    
+    for (i = 0; i < swig_module.size; ++i) {
+      swig_type_info *type = swig_module.type_initial[i];
+      if (type->clientdata) {
+        swig_class* klass = (swig_class*) type->clientdata;
+        swig_method* meth;
+        Tcl_InitHashTable(&(klass->hashtable), TCL_STRING_KEYS);
+        for (meth = klass->methods; meth && meth->name; ++meth) {
+          int newEntry;
+          Tcl_HashEntry* hashentry = Tcl_CreateHashEntry(&(klass->hashtable), meth->name, &newEntry);
+          Tcl_SetHashValue(hashentry, (ClientData)meth->method);
+        }
+      }
+    }
+  }
+  
 #ifdef __cplusplus
 }
 #endif
@@ -2681,7 +2679,7 @@
  * -----------------------------------------------------------------------------*/
 
 SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
-  int i;
+  size_t i;
   if (interp == 0) return TCL_ERROR;
 #ifdef USE_TCL_STUBS
   /* (char*) cast is required to avoid compiler warning/error for Tcl < 8.4. */
@@ -2718,6 +2716,7 @@
   }
   
   SWIG_Tcl_InstallConstants(interp, swig_constants);
+  SWIG_Tcl_InstallMethodLookupTables();
   
   
   SWIG_Tcl_SetConstantObj(interp, "machista::SUCCESS", SWIG_From_int((int)((0x00))));

Modified: branches/gsoc15-dependency/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc15-dependency/base/src/macports1.0/macports.tcl	2015-06-08 07:48:53 UTC (rev 137285)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports.tcl	2015-06-08 07:49:38 UTC (rev 137286)
@@ -115,9 +115,7 @@
 # ui_options accessor
 proc macports::ui_isset {val} {
     if {[info exists macports::ui_options($val)]} {
-        if {$macports::ui_options($val) eq {yes}} {
-            return 1
-        }
+        return [string is true -strict $macports::ui_options($val)]
     }
     return 0
 }
@@ -126,9 +124,7 @@
 # global_options accessor
 proc macports::global_option_isset {val} {
     if {[info exists macports::global_options($val)]} {
-        if {$macports::global_options($val) eq {yes}} {
-            return 1
-        }
+        return [string is true -strict $macports::global_options($val)]
     }
     return 0
 }
@@ -212,7 +208,7 @@
 proc set_phase {phase} {
     global macports::current_phase
     set macports::current_phase $phase
-    if {$phase ne {main}} {
+    if {$phase ne "main"} {
         set cur_time [clock format [clock seconds] -format  {%+}]
         ui_debug "$phase phase started at $cur_time"
     }
@@ -227,7 +223,7 @@
     switch [llength $args] {
        0 - 1 {}
        2 {
-           if {[lindex $args 0] ne {-nonewline}} {
+           if {[lindex $args 0] ne "-nonewline"} {
                set hint "error: when 5 arguments are given, 2nd last must be \"-newnewline\""
                error "$hint\nusage: ui_message priority prefix phase ?-nonewline? string"
            }
@@ -239,20 +235,20 @@
     } 
 
     foreach chan $macports::channels($priority) {
-        if {[info exists ::debuglog] && ($chan eq {debuglog})} {
+        if {[info exists ::debuglog] && ($chan eq "debuglog")} {
             set chan $::debuglog
             if {[info exists macports::current_phase]} {
                 set phase $macports::current_phase
             }
             set strprefix ":${priority}:$phase "
-            if {[lindex $args 0] eq {-nonewline}} {
+            if {[lindex $args 0] eq "-nonewline"} {
                 puts -nonewline $chan $strprefix[lindex $args 1]
             } else {
                 puts $chan $strprefix[lindex $args 0]
             }
 
         } else {
-            if {[lindex $args 0] eq {-nonewline}} {
+            if {[lindex $args 0] eq "-nonewline"} {
                 puts -nonewline $chan $prefix[lindex $args 1]
             } else {
                 puts $chan $prefix[lindex $args 0]
@@ -366,7 +362,7 @@
 # find a binary either in a path defined at MacPorts' configuration time
 # or in the PATH environment variable through macports::binaryInPath (fallback)
 proc macports::findBinary {prog {autoconf_hint {}}} {
-    if {$autoconf_hint ne {} && [file executable $autoconf_hint]} {
+    if {$autoconf_hint ne "" && [file executable $autoconf_hint]} {
         return $autoconf_hint
     } else {
         if {[catch {set cmd_path [macports::binaryInPath $prog]} result] == 0} {
@@ -632,8 +628,8 @@
 
     # set up platform info variables
     set os_arch $tcl_platform(machine)
-    if {$os_arch eq {Power Macintosh}} {set os_arch "powerpc"}
-    if {$os_arch eq {i586} || $os_arch eq {i686} || $os_arch eq {x86_64}} {set os_arch "i386"}
+    if {$os_arch eq "Power Macintosh"} {set os_arch "powerpc"}
+    if {$os_arch eq "i586" || $os_arch eq "i686" || $os_arch eq "x86_64"} {set os_arch "i386"}
     set os_version $tcl_platform(osVersion)
     set os_major [lindex [split $os_version .] 0]
     set os_minor [lindex [split $os_version .] 1]
@@ -661,10 +657,10 @@
     if {[info exists env(HOME)]} {
         set macports::user_home $env(HOME)
         set macports::macports_user_dir [file normalize $macports::autoconf::macports_user_dir]
-    } elseif {[info exists env(SUDO_USER)] && $os_platform eq {darwin}} {
+    } elseif {[info exists env(SUDO_USER)] && $os_platform eq "darwin"} {
         set macports::user_home [exec dscl -q . -read /Users/$env(SUDO_USER) NFSHomeDirectory | cut -d ' ' -f 2]
         set macports::macports_user_dir [file join $macports::user_home [string range $macports::autoconf::macports_user_dir 2 end]]
-    } elseif {[exec id -u] != 0 && $os_platform eq {darwin}} {
+    } elseif {[exec id -u] != 0 && $os_platform eq "darwin"} {
         set macports::user_home [exec dscl -q . -read /Users/[exec id -un] NFSHomeDirectory | cut -d ' ' -f 2]
         set macports::macports_user_dir [file join $macports::user_home [string range $macports::autoconf::macports_user_dir 2 end]]
     } else {
@@ -732,7 +728,7 @@
                     if {[lsearch -exact [list nosync default] $flag] == -1} {
                         ui_warn "$sources_conf source '$line' specifies invalid flag '$flag'"
                     }
-                    if {$flag eq {default}} {
+                    if {$flag eq "default"} {
                         if {[info exists sources_default]} {
                             ui_warn "More than one default port source is defined."
                         }
@@ -820,7 +816,7 @@
 
     # Format for receipts; currently only "sqlite" is allowed
     # could previously be "flat", so we switch that to sqlite
-    if {![info exists portdbformat] || $portdbformat eq {flat} || $portdbformat eq {sqlite}} {
+    if {![info exists portdbformat] || $portdbformat eq "flat" || $portdbformat eq "sqlite"} {
         set registry.format receipt_sqlite
     } else {
         return -code error "unknown registry format '$portdbformat' set in macports.conf"
@@ -858,13 +854,13 @@
     if {![info exists macports::global_options(ports_binary_only)]
         && ![info exists macports::global_options(ports_source_only)]
         && [info exists macports::buildfromsource]} {
-        if {$macports::buildfromsource eq {never}} {
+        if {$macports::buildfromsource eq "never"} {
             set macports::global_options(ports_binary_only) yes
             set temp_options(ports_binary_only) yes
-        } elseif {$macports::buildfromsource eq {always}} {
+        } elseif {$macports::buildfromsource eq "always"} {
             set macports::global_options(ports_source_only) yes
             set temp_options(ports_source_only) yes
-        } elseif {$macports::buildfromsource ne {ifneeded}} {
+        } elseif {$macports::buildfromsource ne "ifneeded"} {
             ui_warn "'buildfromsource' set to unknown value '$macports::buildfromsource', using 'ifneeded' instead"
         }
     }
@@ -986,7 +982,7 @@
 
     # Default arch to build for
     if {![info exists macports::build_arch]} {
-        if {$os_platform eq {darwin}} {
+        if {$os_platform eq "darwin"} {
             if {$os_major >= 10} {
                 if {[sysctl hw.cpu64bit_capable] == 1} {
                     set macports::build_arch x86_64
@@ -994,7 +990,7 @@
                     set macports::build_arch i386
                 }
             } else {
-                if {$os_arch eq {powerpc}} {
+                if {$os_arch eq "powerpc"} {
                     set macports::build_arch ppc
                 } else {
                     set macports::build_arch i386
@@ -1076,7 +1072,7 @@
     # don't keep unusable TMPDIR/TMP values
     foreach var {TMP TMPDIR} {
         if {[info exists env($var)] && [file writable $env($var)] &&
-            ([getuid] != 0 || $macportsuser eq {root} ||
+            ([getuid] != 0 || $macportsuser eq "root" ||
              [file attributes $env($var) -owner] eq $macportsuser)} {
             lappend keepenvkeys $var
         }
@@ -1090,7 +1086,7 @@
     }
 
     # unset environment an extra time, to work around bugs in Leopard Tcl
-    if {$macosx_version eq {10.5}} {
+    if {$macosx_version eq "10.5"} {
         foreach envkey $env_names {
             if {[lsearch -exact $keepenvkeys $envkey] == -1} {
                 unsetenv $envkey
@@ -1105,20 +1101,20 @@
     }
 
     if {![info exists developer_dir]} {
-        if {$os_platform eq {darwin}} {
+        if {$os_platform eq "darwin"} {
             trace add variable macports::developer_dir read macports::set_developer_dir
         } else {
             set macports::developer_dir {}
         }
     } else {
-        if {$os_platform eq {darwin} && ![file isdirectory $developer_dir]} {
+        if {$os_platform eq "darwin" && ![file isdirectory $developer_dir]} {
             ui_warn "Your developer_dir setting in macports.conf points to a non-existing directory.\
                 Since this is known to cause problems, please correct the setting or comment it and let\
                 macports auto-discover the correct path."
         }
     }
 
-    if {[getuid] == 0 && $os_major >= 11 && $os_platform eq {darwin} &&
+    if {[getuid] == 0 && $os_major >= 11 && $os_platform eq "darwin" &&
             [file isfile "${macports::user_home}/Library/Preferences/com.apple.dt.Xcode.plist"]} {
         macports::copy_xcode_plist $env(HOME)
     }
@@ -1139,39 +1135,39 @@
     }
 
     # Proxy handling (done this late since Pextlib is needed)
-    if {![info exists proxy_override_env]} {
+    if {![info exists proxy_override_env] || ![string is true -strict $proxy_override_env]} {
         set proxy_override_env no
     }
     if {[catch {array set sysConfProxies [get_systemconfiguration_proxies]} result]} {
         return -code error "Unable to get proxy configuration from system: $result"
     }
-    if {![info exists env(http_proxy)] || $proxy_override_env eq {yes}} {
+    if {![info exists env(http_proxy)] || $proxy_override_env} {
         if {[info exists proxy_http]} {
             set env(http_proxy) $proxy_http
         } elseif {[info exists sysConfProxies(proxy_http)]} {
             set env(http_proxy) $sysConfProxies(proxy_http)
         }
     }
-    if {![info exists env(HTTPS_PROXY)] || $proxy_override_env eq {yes}} {
+    if {![info exists env(HTTPS_PROXY)] || $proxy_override_env} {
         if {[info exists proxy_https]} {
             set env(HTTPS_PROXY) $proxy_https
         } elseif {[info exists sysConfProxies(proxy_https)]} {
             set env(HTTPS_PROXY) $sysConfProxies(proxy_https)
         }
     }
-    if {![info exists env(FTP_PROXY)] || $proxy_override_env eq {yes}} {
+    if {![info exists env(FTP_PROXY)] || $proxy_override_env} {
         if {[info exists proxy_ftp]} {
             set env(FTP_PROXY) $proxy_ftp
         } elseif {[info exists sysConfProxies(proxy_ftp)]} {
             set env(FTP_PROXY) $sysConfProxies(proxy_ftp)
         }
     }
-    if {![info exists env(RSYNC_PROXY)] || $proxy_override_env eq {yes}} {
+    if {![info exists env(RSYNC_PROXY)] || $proxy_override_env} {
         if {[info exists proxy_rsync]} {
             set env(RSYNC_PROXY) $proxy_rsync
         }
     }
-    if {![info exists env(NO_PROXY)] || $proxy_override_env eq {yes}} {
+    if {![info exists env(NO_PROXY)] || $proxy_override_env} {
         if {[info exists proxy_skip]} {
             set env(NO_PROXY) $proxy_skip
         } elseif {[info exists sysConfProxies(proxy_skip)]} {
@@ -1205,7 +1201,7 @@
 
     if {![info exists macports::ui_options(ports_no_old_index_warning)]} {
         set default_source_url [lindex $sources_default 0]
-        if {[macports::getprotocol $default_source_url] eq {file} || [macports::getprotocol $default_source_url] eq {rsync}} {
+        if {[macports::getprotocol $default_source_url] eq "file" || [macports::getprotocol $default_source_url] eq "rsync"} {
             set default_portindex [macports::getindex $default_source_url]
             if {[file exists $default_portindex] && [clock seconds] - [file mtime $default_portindex] > 1209600} {
                 ui_warn "port definitions are more than two weeks old, consider updating them by running 'port selfupdate'."
@@ -1504,7 +1500,7 @@
         ui_msg "$macports::ui_prefix Fetching port $url"
         set fetchfile [file tail $url]
         set progressflag {}
-        if {$macports::portverbose eq {yes}} {
+        if {$macports::portverbose} {
             set progressflag "--progress builtin"
         } elseif {[info exists macports::ui_options(progress_download)]} {
             set progressflag "--progress ${macports::ui_options(progress_download)}"
@@ -1654,7 +1650,7 @@
     # append requested path
     set proposedpath [file join $proposedpath _resources $path]
 
-    if {$fallback eq {yes} && ![file exists $proposedpath]} {
+    if {$fallback && ![file exists $proposedpath]} {
         return [getdefaultportresourcepath $path]
     }
 
@@ -1670,7 +1666,7 @@
     global macports::sources_default
 
     set default_source_url [lindex $sources_default 0]
-    if {[getprotocol $default_source_url] eq {file}} {
+    if {[getprotocol $default_source_url] eq "file"} {
         set proposedpath [getportdir $default_source_url]
     } else {
         set proposedpath [getsourcepath $default_source_url]
@@ -1709,12 +1705,12 @@
 
     # Look for an already-open MPort with the same URL.
     # if found, return the existing reference and bump the refcount.
-    if {$nocache ne {}} {
-        set mport {}
+    if {$nocache ne ""} {
+        set mport ""
     } else {
         set mport [dlist_match_multi $macports::open_mports [list porturl $porturl variations $variations options $options]]
     }
-    if {$mport ne {}} {
+    if {$mport ne ""} {
         # just in case more than one somehow matches
         set mport [lindex $mport 0]
         set refcnt [ditem_key $mport refcnt]
@@ -1788,7 +1784,7 @@
     foreach pg [$regref groups_used] {
         lappend pgdirlist [file join ${registry.path} registry portgroups [$pg sha256]-[$pg size]]
     }
-    if {$pgdirlist ne {}} {
+    if {$pgdirlist ne ""} {
         set options_array(_portgroup_search_dirs) [list $pgdirlist]
     }
 
@@ -1817,7 +1813,7 @@
     foreach category [lsort -increasing -unique [readdir $root]] {
         set pathToCategory [file join $root $category]
         # process the category dirs but not _resources
-        if {[file isdirectory $pathToCategory] && [string index [file tail $pathToCategory] 0] ne {_}} {
+        if {[file isdirectory $pathToCategory] && [string index [file tail $pathToCategory] 0] ne "_"} {
             # Iterate on port directories.
             foreach port [lsort -increasing -unique [readdir $pathToCategory]] {
                 set pathToPort [file join $pathToCategory $port]
@@ -1994,7 +1990,7 @@
         ![catch {$workername eval check_supported_archs} result] && $result == 0 &&
         ![catch {$workername eval eval_targets $target} result] && $result == 0} {
         # If auto-clean mode, clean-up after dependency install
-        if {$macports::portautoclean eq {yes}} {
+        if {$macports::portautoclean} {
             # Make sure we are back in the port path before clean
             # otherwise if the current directory had been changed to
             # inside the port,  the next port may fail when trying to
@@ -2032,7 +2028,7 @@
         return 1
     }
     set portname [_mportkey $mport subport]
-    if {$target ne {clean}} {
+    if {$target ne "clean"} {
         macports::push_log $mport
     }
 
@@ -2110,7 +2106,7 @@
 
         registry::exclusive_unlock
 
-        if {$result ne {}} {
+        if {$result ne ""} {
             ##
             # When this happens, the failing port usually already printed an
             # error message. Omit this one to avoid cluttering the output and
@@ -2133,13 +2129,13 @@
         }
     } else {
         # No dependencies, but we still need to check for conflicts.
-        if {$target eq {} || $target eq {install} || $target eq {activate}} {
+        if {$target eq "" || $target eq "install" || $target eq "activate"} {
             _mporterrorifconflictsinstalled $mport
         }
     }
 
     set clean 0
-    if {$macports::portautoclean eq {yes} && ($target eq {install} || $target eq {activate})} {
+    if {$macports::portautoclean && ($target eq "install" || $target eq "activate")} {
         # If we're doing an install, check if we should clean after
         set clean 1
     }
@@ -2188,13 +2184,13 @@
         }
         foreach depspec $portinfo($deptype) {
             set dep_portname [$workername eval _get_dep_port $depspec]
-            if {$dep_portname ne {} && ![info exists depscache(port:$dep_portname)] && [$test $dep_portname]} {
+            if {$dep_portname ne "" && ![info exists depscache(port:$dep_portname)] && [$test $dep_portname]} {
                 set variants {}
 
                 # check that the dep has the required archs
                 set active_archs [_get_registry_archs $dep_portname]
                 if {$deptype ni {depends_fetch depends_extract} && $active_archs ni {{} noarch}
-                    && $required_archs ne {noarch} && $dep_portname ni $depends_skip_archcheck} {
+                    && $required_archs ne "noarch" && $dep_portname ni $depends_skip_archcheck} {
                     set missing {}
                     foreach arch $required_archs {
                         if {$arch ni $active_archs} {
@@ -2325,7 +2321,7 @@
 
 proc macports::getindex {source} {
     # Special case file:// sources
-    if {[macports::getprotocol $source] eq {file}} {
+    if {[macports::getprotocol $source] eq "file"} {
         return [file join [macports::getportdir $source] PortIndex]
     }
 
@@ -2465,7 +2461,7 @@
                     set destdir [file dirname $destdir]
                 } else {
                     # Keep rsync happy with a trailing slash
-                    if {[string index $source end] ne {/}} {
+                    if {[string index $source end] ne "/"} {
                         append source /
                     }
                     # don't sync PortIndex yet; we grab the platform specific one afterwards
@@ -2606,7 +2602,7 @@
                     }
                 }
 
-                if {(![info exists options(ports_force)] || $options(ports_force) ne {yes}) && $updated <= 0} {
+                if {(![info exists options(ports_force)] || !$options(ports_force)) && $updated <= 0} {
                     ui_info "No updates for $source"
                     continue
                 }
@@ -2614,7 +2610,7 @@
                 file mkdir $destdir
 
                 set progressflag {}
-                if {$macports::portverbose eq {yes}} {
+                if {$macports::portverbose} {
                     set progressflag "--progress builtin"
                     set verboseflag "-v"
                 } elseif {[info exists macports::ui_options(progress_download)]} {
@@ -2740,7 +2736,7 @@
 proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}} {
     global macports::sources
     set matches [list]
-    set easy [expr {$field eq {name}}]
+    set easy [expr {$field eq "name"}]
 
     set found 0
     foreach source $sources {
@@ -2769,7 +2765,7 @@
 
                     switch -- $matchstyle {
                         exact {
-                            if {$case_sensitive eq "yes"} {
+                            if {$case_sensitive} {
                                 set compres [string compare $pattern $target]
                             } else {
                                 set compres [string compare -nocase $pattern $target]
@@ -2777,14 +2773,14 @@
                             set matchres [expr {0 == $compres}]
                         }
                         glob {
-                            if {$case_sensitive eq "yes"} {
+                            if {$case_sensitive} {
                                 set matchres [string match $pattern $target]
                             } else {
                                 set matchres [string match -nocase $pattern $target]
                             }
                         }
                         regexp {
-                            if {$case_sensitive eq "yes"} {
+                            if {$case_sensitive} {
                                 set matchres [regexp -- $pattern $target]
                             } else {
                                 set matchres [regexp -nocase -- $pattern $target]
@@ -3193,7 +3189,7 @@
                 set nrequired [llength $required_archs]
                 foreach key $prev_seenkeys {
                     set key_archs [lrange [split $key ,] 1 end]
-                    if {$key_archs eq {noarch} || $required_archs eq {noarch} || [llength $key_archs] > $nrequired} {
+                    if {$key_archs eq "noarch" || $required_archs eq "noarch" || [llength $key_archs] > $nrequired} {
                         set seen 1
                         set seenkey $key
                         break
@@ -3212,12 +3208,12 @@
             # If we don't skip or if it is not, add it to the list.
             set present [_mportispresent $mport $depspec]
 
-            if {!$skipSatisfied && $dep_portname eq {}} {
+            if {!$skipSatisfied && $dep_portname eq ""} {
                 set dep_portname [lindex [split $depspec :] end]
             }
 
             set check_archs 0
-            if {$dep_portname ne {} && $deptype ni {depends_fetch depends_extract}
+            if {$dep_portname ne "" && $deptype ni {depends_fetch depends_extract}
                 && $dep_portname ni $depends_skip_archcheck} {
                 set check_archs 1
             }
@@ -3260,7 +3256,7 @@
                     # because mportexec only closes each open mport once.
                     set depport [dlist_match_multi $macports::open_mports [list porturl $dep_portinfo(porturl) options $dep_options]]
 
-                    if {$depport eq {}} {
+                    if {$depport eq ""} {
                         # We haven't opened this one yet.
                         set depport [mportopen $dep_portinfo(porturl) $dep_options $variations]
                     }
@@ -3280,7 +3276,7 @@
                 if {[info exists dep_portinfo(variants)] && {universal} in $dep_portinfo(variants)} {
                     # a universal variant is offered
                     set has_universal 1
-                    if {![info exists variation_array(universal)] || $variation_array(universal) ne {+}} {
+                    if {![info exists variation_array(universal)] || $variation_array(universal) ne "+"} {
                         set variation_array(universal) +
                         # try again with +universal
                         set depport [mportopen $dep_portinfo(porturl) $dep_options [array get variation_array]]
@@ -3306,7 +3302,7 @@
                 ditem_append_unique $mport requires $depport_provides
                 # record actual archs we ended up getting
                 set port_seen(${dep_portname},[join [macports::_mport_archs $depport] ,]) $depport_provides
-            } elseif {$present && $dep_portname ne {}} {
+            } elseif {$present && $dep_portname ne ""} {
                 # record actual installed archs
                 set port_seen(${dep_portname},[join [macports::_active_archs $dep_portname] ,]) 0
             }
@@ -3319,7 +3315,7 @@
         foreach depport $depPorts {
             # Any of these may have been closed by a previous recursive call
             # and replaced by a universal version. This is fine, just skip.
-            if {[ditem_key $depport] ne {}} {
+            if {[ditem_key $depport] ne ""} {
                 set res [mportdepends $depport {} $recurseDeps $skipSatisfied 1]
                 if {$res != 0} {
                     return $res
@@ -3333,11 +3329,11 @@
 
 # check if the given mport can support dependents with the given archs
 proc macports::_mport_supports_archs {mport required_archs} {
-    if {$required_archs eq {noarch}} {
+    if {$required_archs eq "noarch"} {
         return 1
     }
     set provided_archs [_mport_archs $mport]
-    if {$provided_archs eq {noarch}} {
+    if {$provided_archs eq "noarch"} {
         return 1
     }
     foreach arch $required_archs {
@@ -3356,14 +3352,14 @@
 
 # check if the active version of a port supports the given archs
 proc macports::_active_supports_archs {portname required_archs} {
-    if {$required_archs eq {noarch}} {
+    if {$required_archs eq "noarch"} {
         return 1
     }
     if {[catch {registry::active $portname}]} {
         return 0
     }
     set provided_archs [_active_archs $portname]
-    if {$provided_archs eq {noarch} || $provided_archs eq {} || $provided_archs == 0} {
+    if {$provided_archs eq "noarch" || $provided_archs eq "" || $provided_archs == 0} {
         return 1
     }
     foreach arch $required_archs {
@@ -3394,7 +3390,7 @@
     set s [expr {[llength $required_archs] == 1 ? "" : "s"}]
 
     ui_error "Cannot install $port for the arch${s} '$required_archs' because"
-    if {$supported_archs ne {}} {
+    if {$supported_archs ne ""} {
         set ss [expr {[llength $supported_archs] == 1 ? "" : "s"}]
         foreach arch $required_archs {
             if {[lsearch -exact $supported_archs $arch] == -1} {
@@ -3422,7 +3418,7 @@
 proc macports::_mport_has_deptypes {mport deptypes} {
     array set portinfo [mportinfo $mport]
     foreach type $deptypes {
-        if {[info exists portinfo($type)] && $portinfo($type) ne {}} {
+        if {[info exists portinfo($type)] && $portinfo($type) ne ""} {
             return 1
         }
     }
@@ -3497,18 +3493,18 @@
     array set options $optionslist
 
     # variable that indicates whether we actually updated base
-    if {$updatestatusvar ne {}} {
+    if {$updatestatusvar ne ""} {
         upvar $updatestatusvar updatestatus
         set updatestatus no
     }
 
     # are we syncing a tarball? (implies detached signature)
     set is_tarball 0
-    if {[string range $rsync_dir end-3 end] eq {.tar}} {
+    if {[string range $rsync_dir end-3 end] eq ".tar"} {
         set is_tarball 1
         set mp_source_path [file join $portdbpath sources $rsync_server [file dirname $rsync_dir]]
     } else {
-        if {[string index $rsync_dir end] ne {/}} {
+        if {[string index $rsync_dir end] ne "/"} {
             append rsync_dir /
         }
         set mp_source_path [file join $portdbpath sources $rsync_server $rsync_dir]
@@ -3567,7 +3563,7 @@
     # echo current MacPorts version
     ui_msg "MacPorts base version $macports::autoconf::macports_version installed,"
 
-    if {[info exists options(ports_force)] && $options(ports_force) eq {yes}} {
+    if {[info exists options(ports_force)] && $options(ports_force)} {
         set use_the_force_luke yes
         ui_debug "Forcing a rebuild and reinstallation of MacPorts"
     } else {
@@ -3592,7 +3588,7 @@
     set comp [vercmp $macports_version_new $macports::autoconf::macports_version]
 
     # syncing ports tree.
-    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) ne {yes}} {
+    if {![info exists options(ports_selfupdate_nosync)] || !$options(ports_selfupdate_nosync)} {
         if {$comp > 0} {
             # updated portfiles potentially need new base to parse - tell sync to try to
             # use prefabricated PortIndex files and signal if it couldn't
@@ -3603,8 +3599,8 @@
         }
     }
 
-    if {$use_the_force_luke eq {yes} || $comp > 0} {
-        if {[info exists options(ports_dryrun)] && $options(ports_dryrun) eq {yes}} {
+    if {$use_the_force_luke || $comp > 0} {
+        if {[info exists options(ports_dryrun)] && $options(ports_dryrun)} {
             ui_msg "$macports::ui_prefix MacPorts base is outdated, selfupdate would install $macports_version_new (dry run)"
         } else {
             ui_msg "$macports::ui_prefix MacPorts base is outdated, installing new version $macports_version_new"
@@ -3613,27 +3609,27 @@
             set owner [file attributes $prefix -owner]
             set group [file attributes $prefix -group]
             set perms [string range [file attributes $prefix -permissions] end-3 end]
-            if {$tcl_platform(user) ne {root} && $tcl_platform(user) ne $owner} {
+            if {$tcl_platform(user) ne "root" && $tcl_platform(user) ne $owner} {
                 return -code error "User $tcl_platform(user) does not own $prefix - try using sudo"
             }
             ui_debug "Permissions OK"
 
             set configure_args "--prefix=[macports::shellescape $prefix] --with-install-user=[macports::shellescape $owner] --with-install-group=[macports::shellescape $group] --with-directory-mode=[macports::shellescape $perms]"
             # too many users have an incompatible readline in /usr/local, see ticket #10651
-            if {$tcl_platform(os) ne {Darwin} || $prefix eq {/usr/local}
-                || ([glob -nocomplain /usr/local/lib/lib{readline,history}*] eq {} && [glob -nocomplain /usr/local/include/readline/*.h] eq {})} {
+            if {$tcl_platform(os) ne "Darwin" || $prefix eq "/usr/local"
+                || ([glob -nocomplain /usr/local/lib/lib{readline,history}*] eq "" && [glob -nocomplain /usr/local/include/readline/*.h] eq "")} {
                 append configure_args " --enable-readline"
             } else {
                 ui_warn "Disabling readline support due to readline in /usr/local"
             }
 
-            if {$prefix eq {/usr/local} || $prefix eq {/usr}} {
+            if {$prefix eq "/usr/local" || $prefix eq "/usr"} {
                 append configure_args " --with-unsupported-prefix"
             }
 
             # Choose a sane compiler
             set cc_arg {}
-            if {$::macports::os_platform eq {darwin}} {
+            if {$::macports::os_platform eq "darwin"} {
                 set cc_arg "CC=/usr/bin/cc OBJC=/usr/bin/cc "
             }
 
@@ -3659,7 +3655,7 @@
         return -code error "Couldn't change permissions of the MacPorts sources at $mp_source_path to ${sources_owner}: $result"
     }
 
-    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) ne {yes}} {
+    if {![info exists options(ports_selfupdate_nosync)] || !$options(ports_selfupdate_nosync)} {
         if {[info exists needed_portindex]} {
             ui_msg "Not all sources could be fully synced using the old version of MacPorts."
             ui_msg "Please run selfupdate again now that MacPorts base has been updated."
@@ -3684,7 +3680,7 @@
         ui_error "$portname is not installed"
         return 3
     }
-    if {$depscachename ne {}} {
+    if {$depscachename ne ""} {
         upvar $depscachename depscache
     } else {
         array set depscache {}
@@ -3711,13 +3707,13 @@
     global macports::global_variations
     array set options $optionslist
 
-    if {$depscachename ne {}} {
+    if {$depscachename ne ""} {
         upvar $depscachename depscache
     }
 
     # Is this a dry run?
     set is_dryrun no
-    if {[info exists options(ports_dryrun)] && $options(ports_dryrun) eq {yes}} {
+    if {[info exists options(ports_dryrun)] && $options(ports_dryrun)} {
         set is_dryrun yes
     }
 
@@ -3745,7 +3741,7 @@
         return 1
     }
     # argh! port doesnt exist!
-    if {$result eq {}} {
+    if {$result eq ""} {
         ui_warn "No port $portname found in the index."
         return 2
     }
@@ -3840,7 +3836,7 @@
         set version [lindex $i 1]
         set revision [lindex $i 2]
         set epoch [lindex $i 5]
-        if {$version_installed eq {} || ($epoch > $epoch_installed && $version ne $version_installed) ||
+        if {$version_installed eq "" || ($epoch > $epoch_installed && $version ne $version_installed) ||
                 ($epoch >= $epoch_installed && [vercmp $version $version_installed] > 0)
                 || ($epoch >= $epoch_installed
                     && [vercmp $version $version_installed] == 0
@@ -3937,7 +3933,7 @@
             ui_error "port lookup failed: $result"
             return 1
         }
-        if {$result eq {}} {
+        if {$result eq ""} {
             ui_error "No port $portinfo(replaced_by) found."
             return 1
         }
@@ -3989,10 +3985,10 @@
         } elseif {$epoch_installed < $epoch_in_tree && $version_installed ne $version_in_tree} {
             set build_override 1
             ui_debug "epoch override ... upgrading!"
-        } elseif {[info exists options(ports_upgrade_enforce-variants)] && $options(ports_upgrade_enforce-variants) eq {yes}
+        } elseif {[info exists options(ports_upgrade_enforce-variants)] && $options(ports_upgrade_enforce-variants)
                   && [info exists portinfo(canonical_active_variants)] && $portinfo(canonical_active_variants) ne $oldvariant} {
             ui_debug "variant override ... upgrading!"
-        } elseif {$os_platform_installed ne {} && $os_major_installed ne {} && $os_platform_installed != 0
+        } elseif {$os_platform_installed ne "" && $os_major_installed ne "" && $os_platform_installed != 0
                   && ([_mportkey $mport {{os.platform}}] ne $os_platform_installed
                   || [_mportkey $mport {{os.major}}] != $os_major_installed)} {
             ui_debug "platform mismatch ... upgrading!"
@@ -4121,7 +4117,7 @@
         set options(ports_force) yes
         set existing_epoch [lindex [registry::installed $newname ${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants)] 0 5]
         set newregref [registry::open_entry $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants) $existing_epoch]
-        if {$is_dryrun eq {yes}} {
+        if {$is_dryrun} {
             ui_msg "Skipping uninstall $newname @${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants) (dry run)"
         } elseif {![registry::run_target $newregref uninstall [array get options]]
                   && [catch {registry_uninstall::uninstall $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants) [array get options]} result]} {
@@ -4144,7 +4140,7 @@
         # we have to force the deactivate in case of dependents
         set force_cur [info exists options(ports_force)]
         set options(ports_force) yes
-        if {$is_dryrun eq {yes}} {
+        if {$is_dryrun} {
             ui_msg "Skipping deactivate $portname @${version_active}_${revision_active}$variant_active (dry run)"
         } elseif {![catch {registry::active $portname}] &&
                   ![registry::run_target $regref deactivate [array get options]]
@@ -4166,7 +4162,7 @@
         set uninstall_later yes
     }
 
-    if {$is_dryrun eq {yes}} {
+    if {$is_dryrun} {
         if {$anyactive} {
             ui_msg "Skipping deactivate $portname @${version_active}_${revision_active}$variant_active (dry run)"
         }
@@ -4210,7 +4206,7 @@
         }
     }
 
-    if {[info exists uninstall_later] && $uninstall_later eq "yes"} {
+    if {[info exists uninstall_later] && $uninstall_later} {
         foreach i $ilist {
             set version [lindex $i 1]
             set revision [lindex $i 2]
@@ -4221,7 +4217,7 @@
             set epoch [lindex $i 5]
             ui_debug "Uninstalling $portname ${version}_${revision}$variant"
             set regref [registry::open_entry $portname $version $revision $variant $epoch]
-            if {$is_dryrun eq {yes}} {
+            if {$is_dryrun} {
                 ui_msg "Skipping uninstall $portname @${version}_${revision}$variant (dry run)"
             } elseif {![registry::run_target $regref uninstall $optionslist]
                       && [catch {registry_uninstall::uninstall $portname $version $revision $variant $optionslist} result]} {
@@ -4277,7 +4273,7 @@
             foreach i $portinfo($dtype) {
                 set d [$parentworker eval _get_dep_port $i]
                 if {![llength [array get depscache port:$d]] && ![llength [array get depscache $i]]} {
-                    if {$d ne {}} {
+                    if {$d ne ""} {
                         set dspec port:$d
                     } else {
                         set dspec $i
@@ -4325,7 +4321,7 @@
             foreach v $versions {
                 # Only the file name corresponds to the version name.
                 set v [file tail $v]
-                if {$v eq {base} || $v eq {current}} {
+                if {$v eq "base" || $v eq "current"} {
                     continue
                 }
                 lappend lversions [file tail $v]
@@ -4344,7 +4340,7 @@
         }
         set {
             # Use ${conf_path}/$version to read in sources.
-            if {$version eq {} || $version eq {base} || $version eq {current}
+            if {$version eq "" || $version eq "base" || $version eq "current"
                     || [catch {set src_file [open "${conf_path}/$version"]} result]} {
                 global errorInfo
                 ui_debug "${result}: $errorInfo"
@@ -4432,12 +4428,12 @@
 # check if the system we're on can run code of the given architecture
 proc macports::arch_runnable {arch} {
     global macports::os_major macports::os_arch macports::os_platform
-    if {$macports::os_platform eq {darwin}} {
+    if {$macports::os_platform eq "darwin"} {
         if {$macports::os_major >= 11 && [string first ppc $arch] == 0} {
             return no
-        } elseif {$macports::os_arch eq {i386} && $arch eq {ppc64}} {
+        } elseif {$macports::os_arch eq "i386" && $arch eq "ppc64"} {
             return no
-        } elseif {$macports::os_major <= 8 && $arch eq {x86_64}} {
+        } elseif {$macports::os_major <= 8 && $arch eq "x86_64"} {
             return no
         }
     }
@@ -4578,7 +4574,7 @@
     if {$binary_count > 0} {
         ui_msg "$macports::ui_prefix Scanning binaries for linking errors"
         set handle [machista::create_handle]
-        if {$handle eq {NULL}} {
+        if {$handle eq "NULL"} {
             error "Error creating libmachista handle"
         }
         array unset files_warned_about
@@ -4619,15 +4615,15 @@
                 }
 
                 set architecture [$result cget -mt_archs]
-                while {$architecture ne {NULL}} {
-                    if {[info exists options(ports_rev-upgrade_id-loadcmd-check)] && $options(ports_rev-upgrade_id-loadcmd-check) eq {yes}} {
-                        if {[$architecture cget -mat_install_name] ne {NULL} && [$architecture cget -mat_install_name] ne {}} {
+                while {$architecture ne "NULL"} {
+                    if {[info exists options(ports_rev-upgrade_id-loadcmd-check)] && $options(ports_rev-upgrade_id-loadcmd-check)} {
+                        if {[$architecture cget -mat_install_name] ne "NULL" && [$architecture cget -mat_install_name] ne ""} {
                             # check if this lib's install name actually refers to this file itself
                             # if this is not the case software linking against this library might have erroneous load commands
                             if {0 == [catch {set idloadcmdpath [revupgrade_handle_special_paths $bpath [$architecture cget -mat_install_name]]}]} {
-                                if {[string index $idloadcmdpath 0] ne {/}} {
+                                if {[string index $idloadcmdpath 0] ne "/"} {
                                     set port [registry::entry owner $bpath]
-                                    if {$port ne {}} {
+                                    if {$port ne ""} {
                                         set portname [$port name]
                                     } else {
                                         set portname <unknown-port>
@@ -4638,7 +4634,7 @@
                                     ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] (belonging to port $portname) contains relative path"
                                 } elseif {![file exists $idloadcmdpath]} {
                                     set port [registry::entry owner $bpath]
-                                    if {$port ne {}} {
+                                    if {$port ne ""} {
                                         set portname [$port name]
                                     } else {
                                         set portname <unknown-port>
@@ -4646,7 +4642,7 @@
                                     if {$fancy_output} {
                                         $revupgrade_progress intermission
                                     }
-                                    ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] refers to non-existant file $idloadcmdpath"
+                                    ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] refers to non-existent file $idloadcmdpath"
                                     ui_warn "This is probably a bug in the $portname port and might cause problems in libraries linking against this file"
                                 } else {
                                     set hash_this [sha256 file $bpath]
@@ -4654,7 +4650,7 @@
 
                                     if {$hash_this ne $hash_idloadcmd} {
                                         set port [registry::entry owner $bpath]
-                                        if {$port ne {}} {
+                                        if {$port ne ""} {
                                             set portname [$port name]
                                         } else {
                                             set portname <unknown-port>
@@ -4679,7 +4675,7 @@
 
                     set loadcommand [$architecture cget -mat_loadcmds]
 
-                    while {$loadcommand ne {NULL}} {
+                    while {$loadcommand ne "NULL"} {
                         if {0 != [catch {set filepath [revupgrade_handle_special_paths $bpath [$loadcommand cget -mlt_install_name]]}]} {
                             set loadcommand [$loadcommand cget -next]
                             continue;
@@ -4710,7 +4706,7 @@
 
                         set libarchitecture [$libresult cget -mt_archs]
                         set libarch_found false;
-                        while {$libarchitecture ne {NULL}} {
+                        while {$libarchitecture ne "NULL"} {
                             if {[$architecture cget -mat_arch] ne [$libarchitecture cget -mat_arch]} {
                                 set libarchitecture [$libarchitecture cget -next]
                                 continue;
@@ -4729,7 +4725,7 @@
                             break;
                         }
 
-                        if {$libarch_found eq "false"} {
+                        if {!$libarch_found} {
                             ui_debug "Missing architecture [machista::get_arch_name [$architecture cget -mat_arch]] in file $filepath"
                             if {[path_is_in_prefix $filepath]} {
                                 ui_debug "Marking $bpath as broken"
@@ -4769,7 +4765,7 @@
         set broken_files [lsort -unique $broken_files]
         foreach file $broken_files {
             set port [registry::entry owner $file]
-            if {$port ne {}} {
+            if {$port ne ""} {
                 lappend broken_ports $port
                 lappend broken_files_by_port($port) $file
             } else {
@@ -4778,7 +4774,7 @@
         }
         set broken_ports [lsort -unique $broken_ports]
 
-        if {$macports::revupgrade_mode eq {rebuild}} {
+        if {$macports::revupgrade_mode eq "rebuild"} {
             # don't try to rebuild ports that don't exist in the tree
             set temp_broken_ports {}
             foreach port $broken_ports {
@@ -4829,7 +4825,7 @@
         set num_broken_ports [llength $broken_ports]
         set s [expr {$num_broken_ports == 1 ? "" : "s"}]
 
-        if {$macports::revupgrade_mode ne {rebuild}} {
+        if {$macports::revupgrade_mode ne "rebuild"} {
             ui_msg "$macports::ui_prefix Found $num_broken_ports broken port${s}:"
             foreach port $broken_ports {
                 ui_msg "     [$port name] @[$port version] [$port variants][$port negated_variants]"
@@ -4962,7 +4958,7 @@
             }
         }
 
-        if {[info exists options(ports_dryrun)] && $options(ports_dryrun) eq {yes}} {
+        if {[info exists options(ports_dryrun)] && $options(ports_dryrun)} {
             ui_warn "If this was no dry run, rev-upgrade would now run the checks again to find unresolved and newly created problems"
             return 0
         }
@@ -5089,12 +5085,12 @@
             while {[gets $fd line] >= 0} {
                 if {[regexp {^(\w+)([ \t]+(.*))?$} $line match option ignore val] == 1} {
                     if {[lsearch -exact $conf_options $option] >= 0} {
-                        if {$option eq {name}} {
+                        if {$option eq "name"} {
                             set cur_name $val
                             lappend all_names $val
                         } elseif {[info exists cur_name]} {
                             set trimmedval [string trim $val]
-                            if {$option eq {urls}} {
+                            if {$option eq "urls"} {
                                 set processed_urls {}
                                 foreach url $trimmedval {
                                     lappend processed_urls ${url}:nosubdir

Modified: branches/gsoc15-dependency/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/gsoc15-dependency/base/src/port1.0/portconfigure.tcl	2015-06-08 07:48:53 UTC (rev 137285)
+++ branches/gsoc15-dependency/base/src/port1.0/portconfigure.tcl	2015-06-08 07:49:38 UTC (rev 137286)
@@ -478,8 +478,6 @@
         return $default_compilers
     } elseif {$xcodeversion eq "none" || $xcodeversion eq ""} {
         return {cc}
-    } elseif {[vercmp $xcodeversion 6.0] >= 0 && [vercmp $macosx_deployment_target 10.10] >= 0} {
-        return {clang macports-clang-3.4 macports-clang-3.3}
     } elseif {[vercmp $xcodeversion 5.0] >= 0} {
         return {clang macports-clang-3.4 macports-clang-3.3 macports-llvm-gcc-4.2 apple-gcc-4.2}
     } elseif {[vercmp $xcodeversion 4.3] >= 0} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150608/651797dd/attachment-0001.html>


More information about the macports-changes mailing list