On Wed, Oct 12, 2011 at 08:40:36AM -0500, Amit Kulkarni wrote:
> > This diff updates sqlite to it's latest version (3.7.8).
> > The first version of this diff has been made by sthen@. You can
> > find more informations here 
> > http://marc.info/?l=openbsd-ports&m=130697136509729&w=2
> >
> > Tested on @amd64 and @i386.
> > Jasper@ ran a bulk with it without any regressions.
> >
> > Comments ?
> 
> 
> Is this diff too different compared to the diff already on
> http://www.github.com/jasperla/openbsd-wip ?
> 
> Or the same?

Almost the same (some minor differences in Makefile like the use of 
SQLITE_VER0).
But Makefile on openbsd-wip need the following corrections:

--- Makefile.orig       Thu Oct 13 10:35:50 2011
+++ Makefile    Thu Oct 13 10:35:40 2011
@@ -54,6 +54,7 @@ FLAVOR =              no_tcl
 .if !${FLAVOR:L:Mno_tcl}
 MULTI_PACKAGES +=      -tcl
 MODULES +=             lang/tcl
+BUILD_DEPENDS =        ${MODTCL_BUILD_DEPENDS}
 WANTLIB-tcl =          pthread

 post-configure:
@@ -63,11 +64,11 @@ post-configure:
            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}
+.endif



The first is needed to correctly build sqlite3 (spotted by jasper@)
The second unbreaks the no_tcl flavor (spotted by dcoppa@).

Please find an updated diff (remove some garbage and fix the no_tcl flavor).
Regards,

-- 
Pierre-Emmanuel André <pea at raveland.org>
GPG key: 0x7AE329DC
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    13 Oct 2011 08:38:14 -0000
@@ -1,70 +1,72 @@
-# $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.8.0
+DISTNAME=      sqlite-autoconf-${SQLITE_VER:S/./0/g}
+DISTFILES=     sqlite-autoconf-${SQLITE_VER:S/./0/g}.tar.gz 
 
-MULTI_PACKAGES=-main -lemon
-.if !${FLAVOR:L:Mno_tcl}
-MULTI_PACKAGES+=-tcl
-MODULES+=      lang/tcl
+PKGNAME-main=  sqlite3-${SQLITE_VER}
+PKGNAME-tcl=   sqlite3-tcl-${SQLITE_VER}
+
+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
 
-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
+MASTER_SITES =         ${HOMEPAGE}
 
-REGRESS_TARGET=        test
+CONFIGURE_STYLE =      gnu
+USE_LIBTOOL =          Yes
+PSEUDO_FLAVORS =       no_tcl
+MULTI_PACKAGES +=      -main
 
+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
+BUILD_DEPENDS =        ${MODTCL_BUILD_DEPENDS}
+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}
+
+post-build:
+       cd ${WRKBUILD}/tea && \
+       ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS}
 .endif
 
 # Don't include dependency on pthreads, weak pthread functions are
@@ -72,9 +74,10 @@ NO_REGRESS=  Yes
 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    13 Oct 2011 08:38:14 -0000
@@ -1,5 +1,10 @@
-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-3070800.tar.gz) = a/tG1zyqobu80rUhhLbFQg==
+MD5 (sqlite-src-3070800.zip) = wKXVBrASK5tyeRsPJaZYEA==
+RMD160 (sqlite-autoconf-3070800.tar.gz) = mLwKTFo0GVjCiGE0KnVoau+LTf8=
+RMD160 (sqlite-src-3070800.zip) = fOF3f7hm71ZGCjNbSMLrttEVYYg=
+SHA1 (sqlite-autoconf-3070800.tar.gz) = NIUs/Und6kQOsmo1rTLe7gF2pyQ=
+SHA1 (sqlite-src-3070800.zip) = cCAdqQoBhLWncnCVC7fAqBVcV6Y=
+SHA256 (sqlite-autoconf-3070800.tar.gz) = 
/Yx/cNt+BrURlu/MuTfyplerx7J+9h/jp/uOcqxN+jI=
+SHA256 (sqlite-src-3070800.zip) = ocRL5vTrOpA/xEnzD7D7Ck3yWaELhoUTjpcUbSQmiJk=
+SIZE (sqlite-autoconf-3070800.tar.gz) = 1776215
+SIZE (sqlite-src-3070800.zip) = 4614579
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     13 Oct 2011 08:38:14 -0000
@@ -1,7 +1,11 @@
-$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     Mon Sep 19 20:47:10 2011
++++ configure  Thu Sep 29 14:55:59 2011
+@@ -19753,8 +19753,8 @@ for ac_lib in '' pthread; do
    if test -z "$ac_lib"; then
      ac_res="none required"
    else
@@ -10,5 +14,5 @@ $OpenBSD: patch-configure,v 1.11 2011/03
 +    ac_res=-$ac_lib
 +    LIBS="-$ac_lib  $ac_func_search_save_LIBS"
    fi
-   rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
+   if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_search_pthread_create=$ac_res
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     13 Oct 2011 08:38:14 -0000
@@ -0,0 +1,95 @@
+$OpenBSD$
+--- sqlite3.c.orig     Mon Sep 19 20:47:01 2011
++++ sqlite3.c  Thu Sep 29 14:51:30 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
+ */
+@@ -7713,33 +7708,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
+@@ -131066,3 +131054,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     13 Oct 2011 08:38:14 -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 13 Oct 2011 08:38:14 -0000
@@ -0,0 +1,29 @@
+$OpenBSD$
+--- tea/configure.orig Mon Sep 19 20:47:01 2011
++++ tea/configure      Thu Sep 29 14:53:03 2011
+@@ -5122,13 +5122,13 @@ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confde
+ 
+ $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+ 
+-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 
pthread_mutex_init in -lpthread" >&5
+-$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
++          { $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -6424,7 +6424,7 @@ fi
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ 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:${as_lineno-$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        13 Oct 2011 08:38:14 -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.8/libsqlite378.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-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       13 Oct 2011 08:38:14 -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.8/
+lib/tcl/sqlite3.7.8/pkgIndex.tcl
+share/man/
+share/man/mann/
+@man share/man/mann/sqlite3.n

Reply via email to