On Tue, Aug 02, 2016 at 07:54:19PM +0100, Stuart Henderson wrote:
> On 2016/08/02 14:20, James Turner wrote:
> > Attached is an update for the sqlite3 port. This brings our port up to
> > the latest 3.13.0. It also brings along the arc4random changes from our
> > in tree sqlite3 and the latest pthread_stub updates.
> > 
> > This is the first part of getting sqlite3 removed from our src tree and
> > back into ports.
> > 
> > I would love as meany people as possible to take a look at this diff.
> > The next step would be to update everything in ports relying on sqlite3
> > to use the ports version.
> 
> I think we should skip removing the IGNORE until we're ready
> to remove it from base, people will get in a mess if there are two
> versions installed.
> 
> > +           -DHAVE_INT16_T=1 \
> > +                -DHAVE_UINT8_T=1 \
> 
> This line ^^ has spaces instead of tabs.
> 
> > +NOT_FOR_ARCHS-tcl = ${NO_SHARED_ARCHS}
> 
> Zap this, there are no more NO_SHARED_ARCHS.
> 
> > +.if !${PROPERTIES:Mno_shared}
> > +CONFIGURE_ARGS +=  --enable-load-extension
> > +.endif
> 
> And make this unconditional.
> 

Sounds good. Updated diff attached.

-- 
James Turner

Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/sqlite3/Makefile,v
retrieving revision 1.78
diff -u -p -u -p -r1.78 Makefile
--- Makefile    12 Mar 2016 16:45:57 -0000      1.78
+++ Makefile    2 Aug 2016 19:08:36 -0000
@@ -3,51 +3,71 @@
 COMMENT-main=  embedded SQL implementation
 COMMENT-tcl=   TCL bindings for Sqlite3
 COMMENT-lemon= LEMON LALR(1) parser generator
-V=             3.8.0.2
-DISTNAME =     sqlite-src-3080002
+V=             3.13.0
+DISTNAME =     sqlite-src-3130000
 EXTRACT_SUFX = .zip
 PKGNAME-main=  sqlite3-${V}
 PKGNAME-tcl=   sqlite3-tcl-${V}
 PKGNAME-lemon= lemon-${V}
+
+SHARED_LIBS +=  sqlite3                33.0 # 8.6
+
 CATEGORIES=    databases
 IGNORE-main = "--${FULLPKGNAME-main} comes with OpenBSD as of release 5.2"
 SUBPACKAGE ?= -lemon
-REVISION-lemon=        0
-REVISION-main= 0
-REVISION-tcl=  3
 
-MASTER_SITES = ${HOMEPAGE}2013/
+MASTER_SITES = ${HOMEPAGE}2016/
 
 HOMEPAGE=      http://www.sqlite.org/
 
 # PD
 PERMIT_PACKAGE_CDROM=  Yes
 
+MODULES+=      lang/tcl
+
 WANTLIB-main=  c ncurses pthread readline
 WANTLIB-lemon= c
 
+BUILD_DEPENDS=  ${MODTCL_BUILD_DEPENDS}
+
 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=        --enable-load-extension
+               -DSQLITE_ENABLE_FTS3 \
+               -DSQLITE_ENABLE_FTS3_PARENTHESIS \
+               -DSQLITE_ENABLE_DBSTAT_VTAB \
+               -DSQLITE_OMIT_BUILTIN_TEST \
+               -DSQLITE_THREADSAFE=1 \
+               -DHAVE_STDINT_H=1 \
+               -DHAVE_INTTYPES_H=1 \
+               -DHAVE_GMTIME_R=1 \
+               -DHAVE_LOCALTIME_R=1 \
+               -DHAVE_USLEEP=1 \
+               -DHAVE_ARC4RANDOM_BUF=1 \
+               -DHAVE_STRERROR_R=1 \
+               -DSQLITE_TEMP_STORE=1 \
+               -DSQLITE_SOUNDEX=1 \
+               -DSQLITE_HAVE_ISNAN=1 \
+               -DSQLITE_OS_UNIX=1 \
+               -DSQLITE_CORE \
+               -DHAVE_UINT32_T=1 \
+               -DHAVE_UINT16_T=1 \
+               -DHAVE_INT16_T=1 \
+               -DHAVE_UINT8_T=1 \
+               -DHAVE_INT8_T=1
+CONFIGURE_STYLE=simple
 
 PSEUDO_FLAVORS=        no_tcl
 FLAVOR ?=
 
 MULTI_PACKAGES=-main -lemon -tcl
 
-.include <bsd.port.arch.mk>
+CONFIGURE_ARGS += --enable-load-extension
 
 .if ${BUILD_PACKAGES:M-tcl}
-MODULES+=      lang/tcl
-
-BUILD_DEPENDS= ${MODTCL_BUILD_DEPENDS}
+LIB_DEPENDS-tcl=${BUILD_PKGPATH},-main>=${V}
 RUN_DEPENDS-tcl=${MODTCL_RUN_DEPENDS}
-WANTLIB-tcl =  pthread sqlite3
+WANTLIB-tcl =  sqlite3
 
 CONFIGURE_ARGS+=--with-tcl=${MODTCL_LIBDIR}
 CONFIGURE_ARGS+=TCLSH_CMD="${MODTCL_BIN}"
@@ -58,7 +78,7 @@ TEST_TARGET=  test
 .else
 CONFIGURE_ARGS+=--disable-tcl
 CONFIGURE_ARGS+=TCLSH_CMD=none
-CONFIGURE_ENV += CFLAGS=-I"${WRKSRC}/ext/fts3"
+CONFIGURE_ENV += CFLAGS=-I"${WRKSRC}/ext/fts3" -I"${WRKSRC}/ext/rtree"
 NO_TEST=       Yes
 .endif
 
@@ -68,5 +88,6 @@ post-install:
        ${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
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/databases/sqlite3/distinfo,v
retrieving revision 1.38
diff -u -p -u -p -r1.38 distinfo
--- distinfo    28 Nov 2013 15:25:51 -0000      1.38
+++ distinfo    2 Aug 2016 19:08:36 -0000
@@ -1,2 +1,2 @@
-SHA256 (sqlite-src-3080002.zip) = yTo4uIKED5DhWs89htS65mRiw2CQj12iiA8/u8tCwMI=
-SIZE (sqlite-src-3080002.zip) = 5363492
+SHA256 (sqlite-src-3130000.zip) = tGti3CerveUttp2OKnEEabmvYTuiUeuY5BLU84J/kVs=
+SIZE (sqlite-src-3130000.zip) = 9506412
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/databases/sqlite3/patches/patch-Makefile_in,v
retrieving revision 1.23
diff -u -p -u -p -r1.23 patch-Makefile_in
--- patches/patch-Makefile_in   28 Nov 2013 15:25:51 -0000      1.23
+++ patches/patch-Makefile_in   2 Aug 2016 19:08:36 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-Makefile_in,v 1.23 2013/11/28 15:25:51 stu Exp $
---- Makefile.in.orig   Tue Sep  3 13:26:17 2013
-+++ Makefile.in        Wed Nov 27 23:14:02 2013
-@@ -188,7 +188,7 @@ LIBOBJS1 = sqlite3.lo
+--- Makefile.in.orig   Wed May 18 07:06:59 2016
++++ Makefile.in        Tue Aug  2 14:08:37 2016
+@@ -194,7 +194,7 @@ LIBOBJS1 = sqlite3.lo
  
  # Determine the real value of LIBOBJ based on the 'configure' script
  #
@@ -10,37 +10,34 @@ $OpenBSD: patch-Makefile_in,v 1.23 2013/
  
  
  # All of the source code files.
-@@ -283,6 +283,8 @@ SRC = \
-   $(TOP)/src/walker.c \
-   $(TOP)/src/where.c
+@@ -299,6 +299,8 @@ SRC = \
+   $(TOP)/src/whereexpr.c \
+   $(TOP)/src/whereInt.h
  
 +SRC += $(TOP)/src/pthread_stub.c
 +
  # Source code for extensions
  #
  SRC += \
-@@ -491,7 +493,7 @@ EXTHDR += \
+@@ -562,7 +564,7 @@ FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_
  # This is the default Makefile target.  The objects listed here
  # are what get build when you type just "make" with no arguments.
  #
 -all:  sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
-+all:  $(HAVE_TCL:1=libtclsqlite3.la) lemon$(BEXE)
++all:  sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la) 
lemon$(BEXE)
  
  Makefile: $(TOP)/Makefile.in
        ./config.status
-@@ -503,9 +505,9 @@ libsqlite3.la:     $(LIBOBJ)
-       $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \
-               ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
- 
--libtclsqlite3.la:     tclsqlite.lo libsqlite3.la
-+libtclsqlite3.la:     tclsqlite.lo
-       $(LTLINK) -o $@ tclsqlite.lo \
--              libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+              -lsqlite3 @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-               -rpath "$(TCLLIBDIR)" \
-               -version-info "8:6:8" \
-               -avoid-version
-@@ -793,6 +795,9 @@ tclsqlite3$(TEXE): tclsqlite-shell.lo libsqlite3.la
+@@ -584,7 +586,7 @@ libtclsqlite3.la:  tclsqlite.lo libsqlite3.la
+ sqlite3$(TEXE):       $(TOP)/src/shell.c sqlite3.c
+       $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+               $(TOP)/src/shell.c sqlite3.c \
+-              $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++              $(LIBREADLINE) -lpthread -rpath "$(libdir)"
+ 
+ sqldiff$(TEXE):       $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h
+       $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS)
+@@ -910,6 +912,9 @@ tclsqlite3$(TEXE): tclsqlite-shell.lo libsqlite3.la
        $(LTLINK) -o $@ tclsqlite-shell.lo \
                 libsqlite3.la $(LIBTCL)
  
@@ -49,59 +46,13 @@ $OpenBSD: patch-Makefile_in,v 1.23 2013/
 +
  # Rules to build opcodes.c and opcodes.h
  #
- opcodes.c:    opcodes.h $(TOP)/mkopcodec.awk
-@@ -813,8 +818,12 @@ 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_CMD) $(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
-       ./mkkeywordhash$(BEXE) >keywordhash.h
-@@ -899,7 +908,7 @@ TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVAT
- TESTFIXTURE_FLAGS += -DBUILD_sqlite
+ opcodes.c:    opcodes.h $(TOP)/tool/mkopcodec.tcl
+@@ -1060,7 +1065,7 @@ TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY
+ TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024
  
  TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la
 -TESTFIXTURE_SRC1 = sqlite3.c
-+TESTFIXTURE_SRC1 = sqlite3.c $(TOP)/src/pthread_stub.c
++TESTFIXTURE_SRC1 = $(TOP)/src/pthread_stub.c sqlite3.c
  TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c
  TESTFIXTURE_SRC += $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
  
-@@ -937,18 +946,12 @@ lib_install:     libsqlite3.la
-       $(INSTALL) -d $(DESTDIR)$(libdir)
-       $(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir)
-       
--install:      sqlite3$(BEXE) lib_install sqlite3.h sqlite3.pc 
${HAVE_TCL:1=tcl_install}
--      $(INSTALL) -d $(DESTDIR)$(bindir)
--      $(LTINSTALL) sqlite3$(BEXE) $(DESTDIR)$(bindir)
--      $(INSTALL) -d $(DESTDIR)$(includedir)
--      $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir)
--      $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir)
--      $(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
--      $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
-+install:      ${HAVE_TCL:1=tcl_install}
-+      #
- 
- pkgIndex.tcl:
-       echo 'package ifneeded sqlite3 $(RELEASE) [list load 
$(TCLLIBDIR)/libtclsqlite3.so sqlite3]' > $@
--tcl_install:  lib_install libtclsqlite3.la pkgIndex.tcl
-+tcl_install:  libtclsqlite3.la pkgIndex.tcl
-       $(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
-       $(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
-       rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la 
$(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a
-@@ -975,6 +978,8 @@ clean:     
- 
- distclean:    clean
-       rm -f config.log config.status libtool Makefile sqlite3.pc
-+
-+.PHONY: test
- 
- #
- # Windows section
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure     2 Aug 2016 19:08:36 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+--- configure.orig     Wed May 18 07:06:59 2016
++++ configure  Tue Aug  2 13:30:52 2016
+@@ -10494,8 +10494,7 @@ for ac_lib in '' pthread; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++    ac_res="none required"
+   fi
+   if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_search_pthread_create=$ac_res
+@@ -10550,8 +10549,7 @@ for ac_lib in '' pthread; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++    ac_res="none required"
+   fi
+   if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_search_pthread_mutexattr_init=$ac_res
Index: patches/patch-src_os_unix_c
===================================================================
RCS file: patches/patch-src_os_unix_c
diff -N patches/patch-src_os_unix_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_os_unix_c 2 Aug 2016 19:08:36 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- src/os_unix.c.orig Tue Aug  2 12:26:27 2016
++++ src/os_unix.c      Tue Aug  2 12:27:40 2016
+@@ -6161,6 +6161,9 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB
+   memset(zBuf, 0, nBuf);
+   randomnessPid = osGetpid(0);  
+ #if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS)
++# if HAVE_ARC4RANDOM_BUF
++  arc4random_buf(zBuf, nBuf);
++# else
+   {
+     int fd, got;
+     fd = robust_open("/dev/urandom", O_RDONLY, 0);
+@@ -6176,6 +6179,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB
+       robust_close(0, fd, __LINE__);
+     }
+   }
++# endif
+ #endif
+   return nBuf;
+ }
Index: patches/patch-src_pthread_stub_c
===================================================================
RCS file: /cvs/ports/databases/sqlite3/patches/patch-src_pthread_stub_c,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-src_pthread_stub_c
--- patches/patch-src_pthread_stub_c    9 Jan 2011 19:11:34 -0000       1.2
+++ patches/patch-src_pthread_stub_c    2 Aug 2016 19:08:36 -0000
@@ -1,7 +1,7 @@
-$OpenBSD: patch-src_pthread_stub_c,v 1.2 2011/01/09 19:11:34 landry Exp $
---- src/pthread_stub.c.orig    Tue Nov 23 23:07:52 2010
-+++ src/pthread_stub.c Tue Nov 23 23:08:24 2010
-@@ -0,0 +1,28 @@
+$OpenBSD$
+--- src/pthread_stub.c.orig    Tue Aug  2 12:25:52 2016
++++ src/pthread_stub.c Tue Aug  2 12:25:47 2016
+@@ -0,0 +1,30 @@
 +/* stubs for pthreads function, quick and dirty */
 +#if SQLITE_THREADSAFE && !defined(SQLITE_TEST)
 +
@@ -20,6 +20,8 @@ $OpenBSD: patch-src_pthread_stub_c,v 1.2
 +}
 +
 +WEAKALIAS(pthread_t pthread_self(void), _sqlite_self_stub);
++WEAKALIAS(int pthread_join(pthread_t, void **), _sqlite_zero_stub);
++WEAKALIAS(int pthread_create(pthread_t *, const pthread_attr_t *, void *(*) 
(void *), void *), _sqlite_zero_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);
Index: patches/patch-src_random_c
===================================================================
RCS file: patches/patch-src_random_c
diff -N patches/patch-src_random_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_random_c  2 Aug 2016 19:08:36 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- src/random.c.orig  Tue Aug  2 12:26:32 2016
++++ src/random.c       Tue Aug  2 12:28:17 2016
+@@ -17,7 +17,12 @@
+ */
+ #include "sqliteInt.h"
+ 
++#if HAVE_ARC4RANDOM_BUF && defined(SQLITE_OMIT_BUILTIN_TEST)
++void sqlite3_randomness(int N, void *pBuf){
++              arc4random_buf(pBuf, N);
++}
+ 
++#else
+ /* All threads share a single random number generator.
+ ** This structure is the current state of the generator.
+ */
+@@ -132,3 +137,4 @@ void sqlite3PrngRestoreState(void){
+   );
+ }
+ #endif /* SQLITE_OMIT_BUILTIN_TEST */
++#endif
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       1 May 2015 16:51:24 -0000       1.13
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
-$OpenBSD: patch-src_sqliteInt_h,v 1.13 2015/05/01 16:51:24 ajacoutot Exp $
---- src/sqliteInt.h.orig       Wed Nov 27 23:31:08 2013
-+++ src/sqliteInt.h    Wed Nov 27 23:30:35 2013
-@@ -61,10 +61,6 @@
- #pragma warn -spa /* Suspicious pointer arithmetic */
- #endif
- 
--/* Needed for various definitions... */
--#ifndef _GNU_SOURCE
--# define _GNU_SOURCE
--#endif
- 
- #if defined(__OpenBSD__) && !defined(_BSD_SOURCE)
- # define _BSD_SOURCE
-@@ -470,33 +466,26 @@ typedef INT8_TYPE i8;              /* 1-byte signed in
-  typedef u32 tRowcnt;    /* 32-bit is the default */
- #endif
- 
--/*
--** Macros to determine whether the machine is big or little endian,
--** evaluated at runtime.
--*/
--#ifdef SQLITE_AMALGAMATION
--const int sqlite3one = 1;
-+#include <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       29 Nov 2012 05:32:04 -0000      1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-$OpenBSD: patch-src_sqlite_h_in,v 1.5 2012/11/29 05:32:04 espie Exp $
---- src/sqlite.h.in.orig       Thu Oct  4 21:49:22 2012
-+++ src/sqlite.h.in    Thu Nov 29 06:30:18 2012
-@@ -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++.
-@@ -238,6 +239,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;
-@@ -247,6 +251,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: pkg/PLIST-lemon
===================================================================
RCS file: /cvs/ports/databases/sqlite3/pkg/PLIST-lemon,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 PLIST-lemon
--- pkg/PLIST-lemon     26 Jan 2009 14:44:37 -0000      1.1
+++ pkg/PLIST-lemon     2 Aug 2016 19:08:36 -0000
@@ -1,4 +1,4 @@
-@comment $OpenBSD: PLIST-lemon,v 1.1 2009/01/26 14:44:37 bernd Exp $
+@comment $OpenBSD$
 @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.6
diff -u -p -u -p -r1.6 PLIST-main
--- pkg/PLIST-main      22 May 2015 11:31:11 -0000      1.6
+++ pkg/PLIST-main      2 Aug 2016 19:08:36 -0000
@@ -1,6 +1,4 @@
-@comment $OpenBSD: PLIST-main,v 1.6 2015/05/22 11:31:11 ajacoutot Exp $
-@pkgpath databases/sqlite3
-@pkgpath databases/sqlite3,no_tcl
+@comment $OpenBSD$
 @bin bin/sqlite3
 include/sqlite3.h
 include/sqlite3ext.h
@@ -8,4 +6,5 @@ lib/libsqlite3.a
 lib/libsqlite3.la
 @lib lib/libsqlite3.so.${LIBsqlite3_VERSION}
 lib/pkgconfig/sqlite3.pc
+lib/tcl/
 @man man/man1/sqlite3.1
Index: pkg/PLIST-tcl
===================================================================
RCS file: /cvs/ports/databases/sqlite3/pkg/PLIST-tcl,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 PLIST-tcl
--- pkg/PLIST-tcl       12 Mar 2016 16:45:57 -0000      1.4
+++ pkg/PLIST-tcl       2 Aug 2016 19:08:36 -0000
@@ -1,5 +1,4 @@
-@comment $OpenBSD: PLIST-tcl,v 1.4 2016/03/12 16:45:57 naddy Exp $
-lib/tcl/
+@comment $OpenBSD$
 lib/tcl/sqlite3/
 lib/tcl/sqlite3/libtclsqlite3.so
 lib/tcl/sqlite3/pkgIndex.tcl

Reply via email to