This has been through a bulk and hasn't shown up any problems but I don't
have any good ideas what to do with the regression tests. Any suggestions?


On 2011-06-01, Stuart Henderson <s...@spacehopper.org> wrote:
> On 2011-06-01, David Coppa <dco...@gmail.com> wrote:
>> sqlite3 "no_tcl" PSEUDO_FLAVOR is currently broken, because CFLAGS
>> are not correctly passed.
>
> no_tcl isn't really a pseudo flavour, because it changes the
> package by building things in a different way... Pseudo flavours
> can turn on/off various subpackages but shouldn't affect how
> a given package is built.
>
> I'd rather switch to the autoconf tarball which no longer uses Tcl
> as part of the build process and is one of the recommended options
> (the 'legacy source code distribution' that the port currently uses
> is not recommended by upstream - "The Makefile and configure script
> in this tarball are not supported. Their use is not recommended.
> The SQLite developers do not use them. You should not use them
> either.").
>
> Diff attached does this (it was basically a rewrite of the port,
> so probably better to apply the diff and read the resulting
> file rather than try to read it as a diff). it works in limited
> testing - builds/packages on i386, amd64, macppc; Firefox and
> DBD::SQLite work on amd64; but has not been extensively tested
> yet.
>
> One downside of going in this direction is losing the regression
> tests. Perhaps we can pull in the legacy zipfile to run the tests
> though (though I don't understand why they're missing from the
> main recommended tarball).
>
> There's another set of different tests in a separate fossil repo,
> "sqllogictest", but it uses either a bundled copy of sqlite, or
> ODBC, so it doesn't test the actual library/binary installed by the
> package which is really what we're looking to validate.
>
> lemon is lost too, but that's easily handled, I have a simple
> standalone port for that, not sending it now as it's not all
> that important.
>
> Comments welcome (especially from anyone who knows about the
> weak-aliased pthread stubs and whether moving them to the main
> source code file is going to cause any problems).
>
>
> Index: Makefile
>===================================================================
> RCS file: /cvs/ports/databases/sqlite3/Makefile,v
> retrieving revision 1.57
> diff -u -p -r1.57 Makefile
> --- Makefile  14 Mar 2011 14:39:51 -0000      1.57
> +++ Makefile  1 Jun 2011 23:00:55 -0000
> @@ -1,80 +1,80 @@
> -# $OpenBSD: Makefile,v 1.57 2011/03/14 14:39:51 landry Exp $
> +# $OpenBSD$
>  
> -COMMENT-main=        embedded SQL implementation
> -COMMENT-tcl= TCL bindings for Sqlite3
> -COMMENT-lemon=       LEMON LALR(1) parser generator
> -V=           3.7.5
> -DISTNAME=    sqlite-src-3070500
> -EXTRACT_SUFX =       .zip
> -PKGNAME-main=        sqlite3-${V}
> -PKGNAME-tcl= sqlite3-tcl-${V}
> -PKGNAME-lemon=       lemon-${V}
> -CATEGORIES=  databases
> -SHARED_LIBS +=       sqlite3              15.1      # .8.6
> -
> -MASTER_SITES=        ${HOMEPAGE}
> -
> -HOMEPAGE=    http://www.sqlite.org/
> -
> -# PD
> -PERMIT_PACKAGE_CDROM=        Yes
> -PERMIT_PACKAGE_FTP=  Yes
> -PERMIT_DISTFILES_CDROM=      Yes
> -PERMIT_DISTFILES_FTP=        Yes
> -
> -WANTLIB-main=        c ncurses pthread readline
> -WANTLIB-lemon=       c
> -
> -USE_LIBTOOL= Yes
> -USE_GROFF =  Yes
> -
> -CFLAGS+=     -DSQLITE_ENABLE_COLUMN_METADATA \
> -             -DSQLITE_HAVE_ISNAN \
> -             -DSQLITE_SOUNDEX \
> -             -DSQLITE_ENABLE_RTREE \
> -             -DSQLITE_ENABLE_UNLOCK_NOTIFY \
> -             -DSQLITE_ENABLE_FTS3
> -CONFIGURE_STYLE=gnu
> -CONFIGURE_ARGS+=${CONFIGURE_SHARED}
> +COMMENT-main =       embedded SQL implementation
> +COMMENT-tcl =        TCL bindings to Sqlite3
>  
> -PSEUDO_FLAVORS=      no_tcl
> -.if ${MACHINE_ARCH} != "m88k" && ${MACHINE_ARCH} != "vax"
> -FLAVOR?=
> -CONFIGURE_ARGS +=    --enable-load-extension 
> -.else
> -FLAVOR=      no_tcl
> -.endif
> +SQLITE_VER = 3.7.6.3
> +DISTNAME=    sqlite-autoconf-${SQLITE_VER:S/./0/g}
> +PKGNAME-main=        sqlite3-${SQLITE_VER}
> +PKGNAME-tcl= sqlite3-tcl-${SQLITE_VER}
>  
> -MULTI_PACKAGES=-main -lemon
> -.if !${FLAVOR:L:Mno_tcl}
> -MULTI_PACKAGES+=-tcl
> -MODULES+=    lang/tcl
> +SHARED_LIBS +=  sqlite3              15.1     # 8.6
> +
> +CATEGORIES = databases
> +
> +HOMEPAGE =   http://www.sqlite.org/
> +
> +# Public Domain
> +PERMIT_PACKAGE_CDROM =        Yes
> +PERMIT_PACKAGE_FTP =  Yes
> +PERMIT_DISTFILES_CDROM = Yes
> +PERMIT_DISTFILES_FTP =        Yes
> +
> +WANTLIB += c curses pthread readline
> +
> +MASTER_SITES =               ${HOMEPAGE}
>  
> -BUILD_DEPENDS=       ${MODTCL_BUILD_DEPENDS}
> -LIB_DEPENDS-tcl = ${BUILD_PKGPATH},-main>=${V}
> -WANTLIB-tcl =        sqlite3
> -
> -CONFIGURE_ARGS+=--with-tcl=${MODTCL_LIBDIR}
> -CONFIGURE_ARGS+=TCLSH_CMD="${MODTCL_BIN}"
> -CONFIGURE_ENV += TCLLIBDIR=${MODTCL_TCLDIR}/sqlite3
> +CONFIGURE_STYLE =    gnu
> +USE_LIBTOOL =                Yes
> +PSEUDO_FLAVORS =     no_tcl
> +MULTI_PACKAGES +=    -main
>  
> -REGRESS_TARGET=      test
> +CONFIGURE_ARGS +=    ${CONFIGURE_SHARED}
>  
> +TCL_CONF_ARGS +=     ${CONFIGURE_SHARED} \
> +                     --with-tcl=${MODTCL_LIBDIR} \
> +                     --libdir=${MODTCL_TCLDIR}
> +
> +CFLAGS +=            -DSQLITE_ENABLE_COLUMN_METADATA \
> +                     -DSQLITE_ENABLE_FTS3 \
> +                     -DSQLITE_ENABLE_RTREE \
> +                     -DSQLITE_ENABLE_UNLOCK_NOTIFY \
> +                     -DSQLITE_HAVE_ISNAN
> +
> +.if ${MACHINE_ARCH} != "m88k" && ${MACHINE_ARCH} != "vax"
> +CONFIGURE_ARGS +=    --enable-dynamic-extensions
> +FLAVOR ?=
>  .else
> -CONFIGURE_ARGS+=--disable-tcl
> -CONFIGURE_ARGS+=TCLSH_CMD=none
> -CONFIGURE_ENV += CFLAGS=-I"${WRKSRC}/ext/fts3"
> -NO_REGRESS=  Yes
> +FLAVOR =             no_tcl
>  .endif
>  
> +.if !${FLAVOR:L:Mno_tcl}
> +MULTI_PACKAGES +=    -tcl
> +MODULES +=           lang/tcl
> +WANTLIB-tcl =                pthread
> +
> +post-configure:
> +     cd ${WRKCONF}/tea && \
> +     ${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" \
> +     INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \
> +     INSTALL_PROGRAM="${INSTALL_PROGRAM}" INSTALL_MAN="${INSTALL_MAN}" \
> +     INSTALL_SCRIPT="${INSTALL_SCRIPT}" INSTALL_DATA="${INSTALL_DATA}" \
> +     ${CONFIGURE_ENV} ./configure ${TCL_CONF_ARGS}
> +.endif
> +
> +post-build:
> +     cd ${WRKBUILD}/tea && \
> +     ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS}
> +
>  # Don't include dependency on pthreads, weak pthread functions are
>  # used for non-threaded applications.
>  post-install:
>       perl -pi -e s,'\-pthread','',g ${PREFIX}/lib/libsqlite3.la \
>               ${PREFIX}/lib/pkgconfig/sqlite3.pc
> -     ${INSTALL_DATA_DIR} ${PREFIX}/share/lemon
> -     ${INSTALL_DATA} ${WRKBUILD}/lempar.c ${PREFIX}/share/lemon
> -     ${INSTALL_PROGRAM} ${WRKBUILD}/lemon ${PREFIX}/bin
>       ${INSTALL_MAN} ${WRKBUILD}/sqlite3.1 ${PREFIX}/man/man1
> +.if !${FLAVOR:L:Mno_tcl}
> +     cd ${WRKBUILD}/tea && \
> +     ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${FAKE_TARGET} ${ALL_FAKE_FLAGS}
> +.endif
>  
>  .include <bsd.port.mk>
> Index: distinfo
>===================================================================
> RCS file: /cvs/ports/databases/sqlite3/distinfo,v
> retrieving revision 1.30
> diff -u -p -r1.30 distinfo
> --- distinfo  14 Mar 2011 14:39:51 -0000      1.30
> +++ distinfo  1 Jun 2011 23:00:55 -0000
> @@ -1,5 +1,5 @@
> -MD5 (sqlite-src-3070500.zip) = 1h14SZfULNDZK6x5lAlMVg==
> -RMD160 (sqlite-src-3070500.zip) = TV8gkXAOnBg+hhYTIDod22YhfA8=
> -SHA1 (sqlite-src-3070500.zip) = lwYRDWNcNH4W3bjOobSSM4X+z6w=
> -SHA256 (sqlite-src-3070500.zip) = 
> G7g4wCtJRsUU4oz80cFbAHn4Ym9fvPzytI4qB1rMXFE=
> -SIZE (sqlite-src-3070500.zip) = 3987471
> +MD5 (sqlite-autoconf-3070603.tar.gz) = frQe6l/6XL41mkhikITEJQ==
> +RMD160 (sqlite-autoconf-3070603.tar.gz) = 3t6OqV5ukiKDkXUGRa1NYoRnzpM=
> +SHA1 (sqlite-autoconf-3070603.tar.gz) = oZ5EluKFTnN9VUZbd8h+d1o2J3U=
> +SHA256 (sqlite-autoconf-3070603.tar.gz) = 
> vZbWbIoUB3ZyDAKPLrCdT/Swv5veL09Mtwfiaq2HO5o=
> +SIZE (sqlite-autoconf-3070603.tar.gz) = 1720314
> Index: patches/patch-Makefile_in
>===================================================================
> RCS file: patches/patch-Makefile_in
> diff -N patches/patch-Makefile_in
> --- patches/patch-Makefile_in 14 Mar 2011 14:39:51 -0000      1.17
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,62 +0,0 @@
> -$OpenBSD: patch-Makefile_in,v 1.17 2011/03/14 14:39:51 landry Exp $
> ---- Makefile.in.orig Thu Mar 10 17:55:45 2011
> -+++ Makefile.in      Thu Mar 10 18:01:04 2011
> -@@ -186,7 +186,7 @@ LIBOBJS1 = sqlite3.lo
> - 
> - # Determine the real value of LIBOBJ based on the 'configure' script
> - #
> --LIBOBJ = $(LIBOBJS$(USE_AMALGAMATION))
> -+LIBOBJ = $(LIBOBJS$(USE_AMALGAMATION)) pthread_stub.lo
> - 
> - 
> - # All of the source code files.
> -@@ -282,6 +282,8 @@ SRC = \
> -   $(TOP)/src/walker.c \
> -   $(TOP)/src/where.c
> - 
> -+SRC += $(TOP)/src/pthread_stub.c
> -+
> - # Source code for extensions
> - #
> - SRC += \
> -@@ -757,6 +759,9 @@ tclsqlite3$(TEXE):       tclsqlite-shell.lo libsqlite3.la
> -     $(LTLINK) -o $@ tclsqlite-shell.lo \
> -              libsqlite3.la $(LIBTCL)
> - 
> -+pthread_stub.lo:    $(TOP)/src/pthread_stub.c
> -+    $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pthread_stub.c
> -+
> - # Rules to build opcodes.c and opcodes.h
> - #
> - opcodes.c:  opcodes.h $(TOP)/mkopcodec.awk
> -@@ -777,7 +782,11 @@ parse.c:        $(TOP)/src/parse.y lemon$(BEXE) 
> $(TOP)/addopc
> -     $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
> - 
> - sqlite3.h:  $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
> --    tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
> -+    sed -e '/^#include <sqlite3\.h>$$/d' \
> -+        -e 's/--VERS--/$(RELEASE)/' \
> -+        -e 's/--VERSION-NUMBER--/$(VERSION_NUMBER)/' \
> -+        $(TOP)/src/sqlite.h.in $(TOP)/ext/rtree/sqlite3rtree.h \
> -+    > sqlite3.h
> - 
> - keywordhash.h:      $(TOP)/tool/mkkeywordhash.c
> -     $(BCC) -o mkkeywordhash$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) 
> $(TOP)/tool/mkkeywordhash.c
> -@@ -850,7 +859,7 @@ TESTFIXTURE_FLAGS  = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLIT
> - TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE 
> - 
> - TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la
> --TESTFIXTURE_SRC1 = sqlite3.c
> -+TESTFIXTURE_SRC1 = sqlite3.c $(TOP)/src/pthread_stub.c
> - TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c 
> $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
> - 
> - testfixture$(TEXE): $(TESTFIXTURE_SRC)
> -@@ -918,6 +927,8 @@ clean:   
> - 
> - distclean:  clean
> -     rm -f config.log config.status libtool Makefile sqlite3.pc
> -+
> -+.PHONY: test
> - 
> - #
> - # Windows section
> Index: patches/patch-configure
>===================================================================
> RCS file: /cvs/ports/databases/sqlite3/patches/patch-configure,v
> retrieving revision 1.11
> diff -u -p -r1.11 patch-configure
> --- patches/patch-configure   14 Mar 2011 14:39:51 -0000      1.11
> +++ patches/patch-configure   1 Jun 2011 23:00:55 -0000
> @@ -1,7 +1,13 @@
> -$OpenBSD: patch-configure,v 1.11 2011/03/14 14:39:51 landry Exp $
> ---- configure.orig   Thu Jan 27 19:40:56 2011
> -+++ configure        Thu Mar 10 17:55:23 2011
> -@@ -12494,8 +12494,8 @@ for ac_lib in '' pthread; do
> +$OpenBSD$
> +
> +Extra lines of context because it is easy for patch to apply this to the
> +wrong place if the configure script is reordered in a future version.
> +
> +--- configure.orig   Thu May 19 14:35:28 2011
> ++++ configure        Wed Jun  1 12:14:35 2011
> +@@ -21398,12 +21398,12 @@ return pthread_create ();
> + _ACEOF
> + for ac_lib in '' pthread; do
>     if test -z "$ac_lib"; then
>       ac_res="none required"
>     else
> @@ -12,3 +18,5 @@ $OpenBSD: patch-configure,v 1.11 2011/03
>     fi
>     rm -f conftest.$ac_objext conftest$ac_exeext
>   if { (ac_try="$ac_link"
> + case "(($ac_try" in
> +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
> Index: patches/patch-sqlite3_c
>===================================================================
> RCS file: patches/patch-sqlite3_c
> diff -N patches/patch-sqlite3_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-sqlite3_c   1 Jun 2011 23:00:55 -0000
> @@ -0,0 +1,95 @@
> +$OpenBSD$
> +--- sqlite3.c.orig   Thu May 19 14:35:13 2011
> ++++ sqlite3.c        Wed Jun  1 18:09:04 2011
> +@@ -301,11 +301,6 @@
> + #pragma warn -spa /* Suspicious pointer arithmetic */
> + #endif
> + 
> +-/* Needed for various definitions... */
> +-#ifndef _GNU_SOURCE
> +-# define _GNU_SOURCE
> +-#endif
> +-
> + /*
> + ** Include standard header files as necessary
> + */
> +@@ -7414,33 +7409,26 @@ typedef INT8_TYPE i8;              /* 1-byte signed 
> in
> + */
> + #define SQLITE_MAX_U32  ((((u64)1)<<32)-1)
> + 
> +-/*
> +-** Macros to determine whether the machine is big or little endian,
> +-** evaluated at runtime.
> +-*/
> +-#ifdef SQLITE_AMALGAMATION
> +-SQLITE_PRIVATE const int sqlite3one = 1;
> ++#include <sys/endian.h>
> ++#if _BYTE_ORDER == _BIG_ENDIAN
> ++#define SQLITE_BIGENDIAN    1
> ++#define SQLITE_LITTLEENDIAN 0
> ++#define SQLITE_UTF16NATIVE  SQLITE_UTF16BE
> ++#elif _BYTE_ORDER == _LITTLE_ENDIAN
> ++#define SQLITE_BIGENDIAN    0
> ++#define SQLITE_LITTLEENDIAN 1
> ++#define SQLITE_UTF16NATIVE  SQLITE_UTF16LE
> + #else
> +-SQLITE_PRIVATE const int sqlite3one;
> ++#error "Help, I'm trapped in a PDP11"
> + #endif
> +-#if defined(i386) || defined(__i386__) || defined(_M_IX86)\
> +-                             || defined(__x86_64) || defined(__x86_64__)
> +-# define SQLITE_BIGENDIAN    0
> +-# define SQLITE_LITTLEENDIAN 1
> +-# define SQLITE_UTF16NATIVE  SQLITE_UTF16LE
> +-#else
> +-# define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)
> +-# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
> +-# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
> +-#endif
> + 
> + /*
> + ** Constants for the largest and smallest possible 64-bit signed integers.
> + ** These macros are designed to work correctly on both 32-bit and 64-bit
> + ** compilers.
> + */
> +-#define LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))
> +-#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)
> ++#define LARGEST_INT64  INT64_MAX
> ++#define SMALLEST_INT64 INT64_MIN
> + 
> + /* 
> + ** Round up a number to the next larger multiple of 8.  This is used
> +@@ -125966,3 +125954,33 @@ SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(
> + #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
> + 
> + /************** End of fts3_icu.c 
> ********************************************/
> ++
> ++
> ++/* stubs for pthreads function, quick and dirty */
> ++#if SQLITE_THREADSAFE && !defined(SQLITE_TEST)
> ++
> ++#include <pthread.h>
> ++
> ++#define WEAKALIAS(f,g ) extern f __attribute__((__weak__, __alias__(#g)))
> ++
> ++static pthread_t _sqlite_self_stub()
> ++{
> ++    return 0;
> ++}
> ++
> ++static int _sqlite_zero_stub()
> ++{
> ++    return 0;
> ++}
> ++
> ++WEAKALIAS(pthread_t pthread_self(void), _sqlite_self_stub);
> ++WEAKALIAS(int pthread_mutex_init(pthread_mutex_t *a, const 
> pthread_mutexattr_t *b), _sqlite_zero_stub);
> ++WEAKALIAS(int pthread_mutex_destroy(pthread_mutex_t *a), _sqlite_zero_stub);
> ++WEAKALIAS(int pthread_mutex_lock(pthread_mutex_t *a), _sqlite_zero_stub);
> ++WEAKALIAS(int pthread_mutex_trylock(pthread_mutex_t *a), _sqlite_zero_stub);
> ++WEAKALIAS(int pthread_mutex_unlock(pthread_mutex_t *a), _sqlite_zero_stub);
> ++WEAKALIAS(int pthread_mutexattr_init(pthread_mutexattr_t *a), 
> _sqlite_zero_stub);
> ++WEAKALIAS(int pthread_mutexattr_settype(pthread_mutexattr_t *a, int b), 
> _sqlite_zero_stub);
> ++WEAKALIAS(int pthread_mutexattr_destroy(pthread_mutexattr_t *a), 
> _sqlite_zero_stub);
> ++
> ++#endif
> Index: patches/patch-sqlite3_h
>===================================================================
> RCS file: patches/patch-sqlite3_h
> diff -N patches/patch-sqlite3_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-sqlite3_h   1 Jun 2011 23:00:55 -0000
> @@ -0,0 +1,29 @@
> +$OpenBSD$
> +--- sqlite3.h.orig   Sat Oct  2 16:12:01 2010
> ++++ sqlite3.h        Sat Oct  2 16:12:01 2010
> +@@ -33,6 +33,7 @@
> + #ifndef _SQLITE3_H_
> + #define _SQLITE3_H_
> + #include <stdarg.h>     /* Needed for the definition of va_list */
> ++#include <stdint.h>
> + 
> + /*
> + ** Make sure we can call this stuff from C++.
> +@@ -242,6 +243,9 @@ typedef struct sqlite3 sqlite3;
> + ** sqlite3_uint64 and sqlite_uint64 types can store integer values 
> + ** between 0 and +18446744073709551615 inclusive.
> + */
> ++typedef int64_t sqlite_int64;
> ++typedef uint64_t sqlite_uint64;
> ++#if 0
> + #ifdef SQLITE_INT64_TYPE
> +   typedef SQLITE_INT64_TYPE sqlite_int64;
> +   typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
> +@@ -251,6 +255,7 @@ typedef struct sqlite3 sqlite3;
> + #else
> +   typedef long long int sqlite_int64;
> +   typedef unsigned long long int sqlite_uint64;
> ++#endif
> + #endif
> + typedef sqlite_int64 sqlite3_int64;
> + typedef sqlite_uint64 sqlite3_uint64;
> Index: patches/patch-src_sqliteInt_h
>===================================================================
> RCS file: patches/patch-src_sqliteInt_h
> diff -N patches/patch-src_sqliteInt_h
> --- patches/patch-src_sqliteInt_h     9 Jan 2011 19:11:34 -0000       1.8
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,61 +0,0 @@
> -$OpenBSD: patch-src_sqliteInt_h,v 1.8 2011/01/09 19:11:34 landry Exp $
> ---- src/sqliteInt.h.orig     Thu Oct  7 10:48:42 2010
> -+++ src/sqliteInt.h  Sun Nov 21 18:27:02 2010
> -@@ -61,11 +61,6 @@
> - #pragma warn -spa /* Suspicious pointer arithmetic */
> - #endif
> - 
> --/* Needed for various definitions... */
> --#ifndef _GNU_SOURCE
> --# define _GNU_SOURCE
> --#endif
> --
> - /*
> - ** Include standard header files as necessary
> - */
> -@@ -445,33 +440,26 @@ typedef INT8_TYPE i8;              /* 1-byte signed in
> - */
> - #define SQLITE_MAX_U32  ((((u64)1)<<32)-1)
> - 
> --/*
> --** Macros to determine whether the machine is big or little endian,
> --** evaluated at runtime.
> --*/
> --#ifdef SQLITE_AMALGAMATION
> --const int sqlite3one = 1;
> -+#include <sys/endian.h>
> -+#if _BYTE_ORDER == _BIG_ENDIAN
> -+#define SQLITE_BIGENDIAN    1
> -+#define SQLITE_LITTLEENDIAN 0
> -+#define SQLITE_UTF16NATIVE  SQLITE_UTF16BE
> -+#elif _BYTE_ORDER == _LITTLE_ENDIAN
> -+#define SQLITE_BIGENDIAN    0
> -+#define SQLITE_LITTLEENDIAN 1
> -+#define SQLITE_UTF16NATIVE  SQLITE_UTF16LE
> - #else
> --extern const int sqlite3one;
> -+#error "Help, I'm trapped in a PDP11"
> - #endif
> --#if defined(i386) || defined(__i386__) || defined(_M_IX86)\
> --                             || defined(__x86_64) || defined(__x86_64__)
> --# define SQLITE_BIGENDIAN    0
> --# define SQLITE_LITTLEENDIAN 1
> --# define SQLITE_UTF16NATIVE  SQLITE_UTF16LE
> --#else
> --# define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)
> --# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
> --# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
> --#endif
> - 
> - /*
> - ** Constants for the largest and smallest possible 64-bit signed integers.
> - ** These macros are designed to work correctly on both 32-bit and 64-bit
> - ** compilers.
> - */
> --#define LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))
> --#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)
> -+#define LARGEST_INT64       INT64_MAX
> -+#define SMALLEST_INT64      INT64_MIN
> - 
> - /* 
> - ** Round up a number to the next larger multiple of 8.  This is used
> Index: patches/patch-src_sqlite_h_in
>===================================================================
> RCS file: patches/patch-src_sqlite_h_in
> diff -N patches/patch-src_sqlite_h_in
> --- patches/patch-src_sqlite_h_in     2 Apr 2010 20:07:11 -0000       1.4
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,29 +0,0 @@
> -$OpenBSD: patch-src_sqlite_h_in,v 1.4 2010/04/02 20:07:11 sthen Exp $
> ---- src/sqlite.h.in.orig     Mon Mar  8 15:08:55 2010
> -+++ src/sqlite.h.in  Fri Mar 26 19:44:15 2010
> -@@ -33,6 +33,7 @@
> - #ifndef _SQLITE3_H_
> - #define _SQLITE3_H_
> - #include <stdarg.h>     /* Needed for the definition of va_list */
> -+#include <stdint.h>
> - 
> - /*
> - ** Make sure we can call this stuff from C++.
> -@@ -237,6 +238,9 @@ typedef struct sqlite3 sqlite3;
> - ** sqlite3_uint64 and sqlite_uint64 types can store integer values 
> - ** between 0 and +18446744073709551615 inclusive.
> - */
> -+typedef int64_t sqlite_int64;
> -+typedef uint64_t sqlite_uint64;
> -+#if 0
> - #ifdef SQLITE_INT64_TYPE
> -   typedef SQLITE_INT64_TYPE sqlite_int64;
> -   typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
> -@@ -246,6 +250,7 @@ typedef struct sqlite3 sqlite3;
> - #else
> -   typedef long long int sqlite_int64;
> -   typedef unsigned long long int sqlite_uint64;
> -+#endif
> - #endif
> - typedef sqlite_int64 sqlite3_int64;
> - typedef sqlite_uint64 sqlite3_uint64;
> Index: patches/patch-src_utf_c
>===================================================================
> RCS file: patches/patch-src_utf_c
> diff -N patches/patch-src_utf_c
> --- patches/patch-src_utf_c   2 Apr 2010 20:07:11 -0000       1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,18 +0,0 @@
> -$OpenBSD: patch-src_utf_c,v 1.3 2010/04/02 20:07:11 sthen Exp $
> ---- src/utf.c.orig   Tue Dec 29 21:59:49 2009
> -+++ src/utf.c        Wed Jan 20 11:15:09 2010
> -@@ -37,14 +37,6 @@
> - #include <assert.h>
> - #include "vdbeInt.h"
> - 
> --#ifndef SQLITE_AMALGAMATION
> --/*
> --** The following constant value is used by the SQLITE_BIGENDIAN and
> --** SQLITE_LITTLEENDIAN macros.
> --*/
> --const int sqlite3one = 1;
> --#endif /* SQLITE_AMALGAMATION */
> --
> - /*
> - ** This lookup table is used to help decode the first byte of
> - ** a multi-byte UTF8 character.
> Index: patches/patch-tea_configure
>===================================================================
> RCS file: patches/patch-tea_configure
> diff -N patches/patch-tea_configure
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-tea_configure       1 Jun 2011 23:00:55 -0000
> @@ -0,0 +1,29 @@
> +$OpenBSD$
> +--- tea/configure.orig       Thu May 19 14:35:13 2011
> ++++ tea/configure    Wed Jun  1 14:05:53 2011
> +@@ -7394,13 +7394,13 @@ cat >>confdefs.h <<\_ACEOF
> + #define _THREAD_SAFE 1
> + _ACEOF
> + 
> +-        { $as_echo "$as_me:$LINENO: checking for pthread_mutex_init in 
> -lpthread" >&5
> +-$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
> ++        { $as_echo "$as_me:$LINENO: checking for pthread_mutex_init in 
> -pthread" >&5
> ++$as_echo_n "checking for pthread_mutex_init in -pthread... " >&6; }
> + if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
> +   $as_echo_n "(cached) " >&6
> + else
> +   ac_check_lib_save_LIBS=$LIBS
> +-LIBS="-lpthread  $LIBS"
> ++LIBS="-pthread  $LIBS"
> + cat >conftest.$ac_ext <<_ACEOF
> + /* confdefs.h.  */
> + _ACEOF
> +@@ -9038,7 +9038,7 @@ fi
> + fi
> + 
> +         LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
> +-        SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
> ++        SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
> +         { $as_echo "$as_me:$LINENO: checking for ELF" >&5
> + $as_echo_n "checking for ELF... " >&6; }
> + if test "${tcl_cv_ld_elf+set}" = set; then
> Index: pkg/DESCR-lemon
>===================================================================
> RCS file: pkg/DESCR-lemon
> diff -N pkg/DESCR-lemon
> --- pkg/DESCR-lemon   26 Jan 2009 14:44:37 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1 +0,0 @@
> -The LEMON LALR(1) parser generator.
> Index: pkg/PFRAG.shared-tcl
>===================================================================
> RCS file: /cvs/ports/databases/sqlite3/pkg/PFRAG.shared-tcl,v
> retrieving revision 1.3
> diff -u -p -r1.3 PFRAG.shared-tcl
> --- pkg/PFRAG.shared-tcl      5 Jan 2011 16:39:44 -0000       1.3
> +++ pkg/PFRAG.shared-tcl      1 Jun 2011 23:00:55 -0000
> @@ -1,2 +1,2 @@
>  @comment $OpenBSD: PFRAG.shared-tcl,v 1.3 2011/01/05 16:39:44 stu Exp $
> -lib/tcl/sqlite3/libtclsqlite3.so
> +lib/tcl/sqlite3.7.6.3/libsqlite3763.so
> Index: pkg/PLIST-lemon
>===================================================================
> RCS file: pkg/PLIST-lemon
> diff -N pkg/PLIST-lemon
> --- pkg/PLIST-lemon   26 Jan 2009 14:44:37 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,4 +0,0 @@
> -@comment $OpenBSD: PLIST-lemon,v 1.1 2009/01/26 14:44:37 bernd Exp $
> -@bin bin/lemon
> -share/lemon/
> -share/lemon/lempar.c
> Index: pkg/PLIST-main
>===================================================================
> RCS file: /cvs/ports/databases/sqlite3/pkg/PLIST-main,v
> retrieving revision 1.4
> diff -u -p -r1.4 PLIST-main
> --- pkg/PLIST-main    20 Apr 2010 10:00:17 -0000      1.4
> +++ pkg/PLIST-main    1 Jun 2011 23:00:55 -0000
> @@ -1,6 +1,4 @@
>  @comment $OpenBSD: PLIST-main,v 1.4 2010/04/20 10:00:17 sthen Exp $
> -@pkgpath databases/sqlite3
> -@pkgpath databases/sqlite3,no_tcl
>  %%SHARED%%
>  @bin bin/sqlite3
>  include/sqlite3.h
> Index: pkg/PLIST-tcl
>===================================================================
> RCS file: /cvs/ports/databases/sqlite3/pkg/PLIST-tcl,v
> retrieving revision 1.3
> diff -u -p -r1.3 PLIST-tcl
> --- pkg/PLIST-tcl     5 Jan 2011 16:39:44 -0000       1.3
> +++ pkg/PLIST-tcl     1 Jun 2011 23:00:55 -0000
> @@ -1,5 +1,8 @@
>  @comment $OpenBSD: PLIST-tcl,v 1.3 2011/01/05 16:39:44 stu Exp $
>  %%SHARED%%
>  lib/tcl/
> -lib/tcl/sqlite3/
> -lib/tcl/sqlite3/pkgIndex.tcl
> +lib/tcl/sqlite3.7.6.3/
> +lib/tcl/sqlite3.7.6.3/pkgIndex.tcl
> +share/man/
> +share/man/mann/
> +@man share/man/mann/sqlite3.n
>
>

Reply via email to