[89249] trunk/dports/databases/sqlite3

ryandesign at macports.org ryandesign at macports.org
Sat Jan 21 16:41:31 PST 2012


Revision: 89249
          http://trac.macports.org/changeset/89249
Author:   ryandesign at macports.org
Date:     2012-01-21 16:41:28 -0800 (Sat, 21 Jan 2012)
Log Message:
-----------
sqlite3: fix build on Tiger; see #32930

Modified Paths:
--------------
    trunk/dports/databases/sqlite3/Portfile

Added Paths:
-----------
    trunk/dports/databases/sqlite3/files/patch-sqlite3.c.diff

Modified: trunk/dports/databases/sqlite3/Portfile
===================================================================
--- trunk/dports/databases/sqlite3/Portfile	2012-01-22 00:15:17 UTC (rev 89248)
+++ trunk/dports/databases/sqlite3/Portfile	2012-01-22 00:41:28 UTC (rev 89249)
@@ -26,7 +26,7 @@
 
 depends_lib         port:libedit
 
-patchfiles          patch-configure.diff patch-shell.c.diff
+patchfiles          patch-configure.diff patch-shell.c.diff patch-sqlite3.c.diff
 
 configure.args      --enable-threadsafe \
                     --enable-dynamic-extensions \
@@ -45,5 +45,5 @@
 }
 
 platform darwin 8 {
-    configure.cppflags-append -DSQLITE_ENABLE_LOCKING_STYLE=0
+    configure.cppflags-append -DSQLITE_WITHOUT_ZONEMALLOC
 }

Added: trunk/dports/databases/sqlite3/files/patch-sqlite3.c.diff
===================================================================
--- trunk/dports/databases/sqlite3/files/patch-sqlite3.c.diff	                        (rev 0)
+++ trunk/dports/databases/sqlite3/files/patch-sqlite3.c.diff	2012-01-22 00:41:28 UTC (rev 89249)
@@ -0,0 +1,85 @@
+http://www.sqlite.org/src/info/238e35a441
+--- sqlite3.c.orig	2012-01-16 08:04:57.000000000 -0600
++++ sqlite3.c	2012-01-21 17:23:32.000000000 -0600
+@@ -15151,7 +15151,35 @@
+ ** to obtain the memory it needs.
+ **
+ ** This file contains implementations of the low-level memory allocation
+-** routines specified in the sqlite3_mem_methods object.
++** routines specified in the sqlite3_mem_methods object.  The content of
++** this file is only used if SQLITE_SYSTEM_MALLOC is defined.  The
++** SQLITE_SYSTEM_MALLOC macro is defined automatically if neither the
++** SQLITE_MEMDEBUG nor the SQLITE_WIN32_MALLOC macros are defined.  The
++** default configuration is to use memory allocation routines in this
++** file.
++**
++** C-preprocessor macro summary:
++**
++**    HAVE_MALLOC_USABLE_SIZE     The configure script sets this symbol if
++**                                the malloc_usable_size() interface exists
++**                                on the target platform.  Or, this symbol
++**                                can be set manually, if desired.
++**                                If an equivalent interface exists by
++**                                a different name, using a separate -D
++**                                option to rename it.  This symbol will
++**                                be enabled automatically on windows
++**                                systems, and malloc_usable_size() will
++**                                be redefined to _msize(), unless the
++**                                SQLITE_WITHOUT_MSIZE macro is defined.
++**    
++**    SQLITE_WITHOUT_ZONEMALLOC   Some older macs lack support for the zone
++**                                memory allocator.  Set this symbol to enable
++**                                building on older macs.
++**
++**    SQLITE_WITHOUT_MSIZE        Set this symbol to disable the use of
++**                                _msize() on windows systems.  This might
++**                                be necessary when compiling for Delphi,
++**                                for example.
+ */
+ 
+ /*
+@@ -15162,17 +15190,21 @@
+ #ifdef SQLITE_SYSTEM_MALLOC
+ 
+ /*
+-** Windows systems have malloc_usable_size() but it is called _msize()
++** Windows systems have malloc_usable_size() but it is called _msize().
++** The use of _msize() is automatic, but can be disabled by compiling
++** with -DSQLITE_WITHOUT_MSIZE
+ */
+-#if !defined(HAVE_MALLOC_USABLE_SIZE) && SQLITE_OS_WIN
++#if !defined(HAVE_MALLOC_USABLE_SIZE) && SQLITE_OS_WIN \
++      && !defined(SQLITE_WITHOUT_MSIZE)
+ # define HAVE_MALLOC_USABLE_SIZE 1
+ # define malloc_usable_size _msize
+ #endif
+ 
+-#if defined(__APPLE__)
++#if defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC)
+ 
+ /*
+-** Use the zone allocator available on apple products
++** Use the zone allocator available on apple products unless the
++** SQLITE_WITHOUT_ZONEMALLOC symbol is defined.
+ */
+ #include <sys/sysctl.h>
+ #include <malloc/malloc.h>
+@@ -15187,7 +15219,8 @@
+ #else /* if not __APPLE__ */
+ 
+ /*
+-** Use standard C library malloc and free on non-Apple systems.
++** Use standard C library malloc and free on non-Apple systems.  
++** Also used by Apple systems if SQLITE_WITHOUT_ZONEMALLOC is defined.
+ */
+ #define SQLITE_MALLOC(x)    malloc(x)
+ #define SQLITE_FREE(x)      free(x)
+@@ -15319,7 +15352,7 @@
+ ** Initialize this module.
+ */
+ static int sqlite3MemInit(void *NotUsed){
+-#if defined(__APPLE__)
++#if defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC)
+   int cpuCount;
+   size_t len;
+   if( _sqliteZone_ ){
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120121/7d537212/attachment.html>


More information about the macports-changes mailing list