[66044] branches/new-help-system/base

raimue at macports.org raimue at macports.org
Mon Apr 5 04:32:31 PDT 2010


Revision: 66044
          http://trac.macports.org/changeset/66044
Author:   raimue at macports.org
Date:     2010-04-05 04:32:28 -0700 (Mon, 05 Apr 2010)
Log Message:
-----------
Merge from trunk

Modified Paths:
--------------
    branches/new-help-system/base/aclocal.m4
    branches/new-help-system/base/configure
    branches/new-help-system/base/doc/portfile.7
    branches/new-help-system/base/src/config.h.in
    branches/new-help-system/base/src/cregistry/sqlext.c
    branches/new-help-system/base/src/pextlib1.0/realpath.c
    branches/new-help-system/base/src/port/port.tcl
    branches/new-help-system/base/src/registry2.0/graph.c
    branches/new-help-system/base/src/registry2.0/item.c
    branches/new-help-system/base/src/registry2.0/util.c

Property Changed:
----------------
    branches/new-help-system/base/
    branches/new-help-system/base/src/pextlib1.0/realpath.c
    branches/new-help-system/base/src/pextlib1.0/realpath.h


Property changes on: branches/new-help-system/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/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:49341-65895
/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/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:49341-66043
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/new-help-system/base/aclocal.m4
===================================================================
--- branches/new-help-system/base/aclocal.m4	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/aclocal.m4	2010-04-05 11:32:28 UTC (rev 66044)
@@ -805,7 +805,7 @@
             LDFLAGS_SQLITE3=$($PKG_CONFIG --libs sqlite3)
             # for tclsqlite below
             mp_sqlite3_dir=$($PKG_CONFIG --variable=prefix sqlite3)
-            if test "x$mp_sqlite3_dir" = "x"; then
+            if test "x$mp_sqlite3_dir" != "x"; then
                 mp_sqlite3_dir=${mp_sqlite3_dir}/lib/sqlite3
             fi
         fi
@@ -814,6 +814,12 @@
 		LDFLAGS_SQLITE3="-L${sqlite3prefix}/lib -lsqlite3"
 	fi
 
+    # check if we have sqlite3ext.h, using the appropriate cppflags
+    CPPFLAGS_OLD="${CPPFLAGS}"
+    CPPFLAGS="${CPPFLAGS} ${CFLAGS_SQLITE3}"
+    AC_CHECK_HEADERS(sqlite3ext.h)
+    CPPFLAGS="${CPPFLAGS_OLD}"
+
 	AC_SUBST(CFLAGS_SQLITE3)
 	AC_SUBST(LDFLAGS_SQLITE3)
 

Modified: branches/new-help-system/base/configure
===================================================================
--- branches/new-help-system/base/configure	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/configure	2010-04-05 11:32:28 UTC (rev 66044)
@@ -9152,7 +9152,7 @@
             LDFLAGS_SQLITE3=$($PKG_CONFIG --libs sqlite3)
             # for tclsqlite below
             mp_sqlite3_dir=$($PKG_CONFIG --variable=prefix sqlite3)
-            if test "x$mp_sqlite3_dir" = "x"; then
+            if test "x$mp_sqlite3_dir" != "x"; then
                 mp_sqlite3_dir=${mp_sqlite3_dir}/lib/sqlite3
             fi
         fi
@@ -9161,9 +9161,26 @@
 		LDFLAGS_SQLITE3="-L${sqlite3prefix}/lib -lsqlite3"
 	fi
 
+    # check if we have sqlite3ext.h, using the appropriate cppflags
+    CPPFLAGS_OLD="${CPPFLAGS}"
+    CPPFLAGS="${CPPFLAGS} ${CFLAGS_SQLITE3}"
+    for ac_header in sqlite3ext.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3ext.h" "ac_cv_header_sqlite3ext_h" "$ac_includes_default"
+if test "x$ac_cv_header_sqlite3ext_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SQLITE3EXT_H 1
+_ACEOF
 
+fi
 
+done
 
+    CPPFLAGS="${CPPFLAGS_OLD}"
+
+
+
+
 	# now the sqlite Tcl bindings
 
 # Check whether --with-tcl-sqlite3 was given.

Modified: branches/new-help-system/base/doc/portfile.7
===================================================================
--- branches/new-help-system/base/doc/portfile.7	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/doc/portfile.7	2010-04-05 11:32:28 UTC (rev 66044)
@@ -1104,9 +1104,14 @@
 Selects a complete compiler suite to use. This option will override the compiler environment variable for all compilers the named suite features. Please note that this option will intentionally not set any dependencies on the selected compiler suite!
 .Em gcc-3.3
 .Em gcc-4.0
+.Em gcc-4.2
 use the standard system compiler suites,
+.Em llvm-gcc-4.2
+.Em clang
+use the newer, non-default compilers installed by Xcode,
 .Em apple-gcc-3.3
 .Em apple-gcc-4.0
+.Em apple-gcc-4.2
 use Apple's gcc suite installed via MacPorts,
 .Em macports-gcc-3.3
 .Em macports-gcc-3.4
@@ -1114,13 +1119,15 @@
 .Em macports-gcc-4.1
 .Em macports-gcc-4.2
 .Em macports-gcc-4.3
+.Em macports-gcc-4.4
+.Em macports-gcc-4.5
 use the vanilla gcc installed via MacPorts.
 .br
 .Sy Type:
 .Em optional
 .br
 .Sy Values:
-.Em gcc-3.3 gcc-4.0 apple-gcc-3.3 apple-gcc-4.0 macports-gcc-3.3 macports-gcc-3.4 macports-gcc-4.0 macports-gcc-4.1 macports-gcc-4.2 macports-gcc-4.3
+.Em gcc-3.3 gcc-4.0 gcc-4.2 llvm-gcc-4.2 clang apple-gcc-3.3 apple-gcc-4.0 apple-gcc-4.2 macports-gcc-3.3 macports-gcc-3.4 macports-gcc-4.0 macports-gcc-4.1 macports-gcc-4.2 macports-gcc-4.3 macports-gcc-4.4 macports-gcc-4.5
 .br
 .Sy Example:
 .Dl configure.compiler gcc-4.0

Modified: branches/new-help-system/base/src/config.h.in
===================================================================
--- branches/new-help-system/base/src/config.h.in	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/src/config.h.in	2010-04-05 11:32:28 UTC (rev 66044)
@@ -128,6 +128,9 @@
 /* Define to 1 if you have the `setmode' function. */
 #undef HAVE_SETMODE
 
+/* Define to 1 if you have the <sqlite3ext.h> header file. */
+#undef HAVE_SQLITE3EXT_H
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 

Modified: branches/new-help-system/base/src/cregistry/sqlext.c
===================================================================
--- branches/new-help-system/base/src/cregistry/sqlext.c	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/src/cregistry/sqlext.c	2010-04-05 11:32:28 UTC (rev 66044)
@@ -5,8 +5,12 @@
 #include "vercomp.h"
 
 #include <string.h>
+#if HAVE_SQLITE3EXT_H
 #include <sqlite3ext.h>
 SQLITE_EXTENSION_INIT1
+#else
+#include <sqlite3.h>
+#endif
 
 /**
  * Extension for sqlite3 defining collates being used in our DB. This can be
@@ -19,11 +23,16 @@
 int sqlite3_extension_init(
     sqlite3 *db,          /* The database connection */
     char **pzErrMsg UNUSED,      /* Write error messages here */
+#if HAVE_SQLITE3EXT_H
     const sqlite3_api_routines *pApi  /* API methods */
+#else
+    const void *pApi
+#endif
 ) {
+#if HAVE_SQLITE3EXT_H
     SQLITE_EXTENSION_INIT2(pApi)
 
     sqlite3_create_collation(db, "VERSION", SQLITE_UTF8, NULL, sql_version);
-
+#endif
     return 0;
 }

Modified: branches/new-help-system/base/src/pextlib1.0/realpath.c
===================================================================
--- branches/new-help-system/base/src/pextlib1.0/realpath.c	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/src/pextlib1.0/realpath.c	2010-04-05 11:32:28 UTC (rev 66044)
@@ -73,8 +73,9 @@
         return TCL_ERROR;
     } else {
         tcl_result = Tcl_NewStringObj(rpath, -1);
+        free(rpath);
     }
-    
+
     Tcl_SetObjResult(interp, tcl_result);
     return TCL_OK;
 }


Property changes on: branches/new-help-system/base/src/pextlib1.0/realpath.c
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native


Property changes on: branches/new-help-system/base/src/pextlib1.0/realpath.h
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Modified: branches/new-help-system/base/src/port/port.tcl
===================================================================
--- branches/new-help-system/base/src/port/port.tcl	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/src/port/port.tcl	2010-04-05 11:32:28 UTC (rev 66044)
@@ -651,8 +651,6 @@
     set portname [url_to_portname $url]
     if {$portname == ""} {
         ui_msg "To use the current port, you must be in a port's directory."
-        ui_msg "(you might also see this message if a pseudo-port such as"
-        ui_msg "outdated or installed expands to no ports)."
         return [list]
     }
 
@@ -856,6 +854,25 @@
     return [get_ports_with_prop requested 0]
 }
 
+proc get_leaves_ports {} {
+    set ilist {}
+    if { [catch {set ilist [registry::installed]} result] } {
+        if {$result != "Registry error: No ports registered as installed."} {
+            global errorInfo
+            ui_debug "$errorInfo"
+            fatal "port installed failed: $result"
+        }
+    }
+    set results {}
+    foreach i $ilist {
+        set iname [lindex $i 0]
+        if {[registry::list_dependents $iname] == ""} {
+            add_to_portlist results [list name $iname version "[lindex $i 1]_[lindex $i 2]" variants [split_variants [lindex $i 3]]]
+        }
+    }
+    return [portlist_sort [opIntersection $results [get_unrequested_ports]]]
+}
+
 proc get_dependent_ports {portname recursive} {
     registry::open_dep_map
     set deplist [registry::list_dependents $portname]
@@ -1038,6 +1055,7 @@
         ^uninstalled(@.*)?$ -
         ^active(@.*)?$      -
         ^inactive(@.*)?$    -
+        ^leaves(@.*)?$      -
         ^outdated(@.*)?$    -
         ^obsolete(@.*)?$    -
         ^requested(@.*)?$   -

Modified: branches/new-help-system/base/src/registry2.0/graph.c
===================================================================
--- branches/new-help-system/base/src/registry2.0/graph.c	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/src/registry2.0/graph.c	2010-04-05 11:32:28 UTC (rev 66044)
@@ -49,6 +49,7 @@
         fprintf(stderr, "error: registry db not detached correctly (%s)\n",
                 sqlite3_errmsg(g->db));
     }
+    sqlite3_finalize(stmt);
     free(g);
 }
 

Modified: branches/new-help-system/base/src/registry2.0/item.c
===================================================================
--- branches/new-help-system/base/src/registry2.0/item.c	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/src/registry2.0/item.c	2010-04-05 11:32:28 UTC (rev 66044)
@@ -213,6 +213,7 @@
         Tcl_ListObjAppendElement(interp, result, procObj);
         r = sqlite3_step(stmt);
     }
+    sqlite3_finalize(stmt);
     Tcl_SetObjResult(interp, result);
     return TCL_OK;
 }

Modified: branches/new-help-system/base/src/registry2.0/util.c
===================================================================
--- branches/new-help-system/base/src/registry2.0/util.c	2010-04-05 09:55:17 UTC (rev 66043)
+++ branches/new-help-system/base/src/registry2.0/util.c	2010-04-05 11:32:28 UTC (rev 66044)
@@ -236,9 +236,10 @@
                 return TCL_ERROR;
             }
         }
+        sqlite3_finalize(stmt);
         return TCL_OK;
     } else {
-        sqlite3_free(query);
+        sqlite3_finalize(stmt);
         set_sqlite_result(interp, db, query);
         return TCL_ERROR;
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100405/68735c03/attachment.html>


More information about the macports-changes mailing list