ports/106281: [patch] databases/sqlite3: add option to build with full text search
Barry Pederson
bp at barryp.org
Sun Dec 3 23:21:14 UTC 2006
>Number: 106281
>Category: ports
>Synopsis: [patch] databases/sqlite3: add option to build with full text search
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sun Dec 03 23:21:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Barry Pederson
>Release: 6.1
>Organization:
>Environment:
>Description:
Version 3.3.8 adds support for full-text search using the FTS1 module (http://www.sqlite.org/cvstrac/wiki?p=FtsOne). This patch adds an option to the port to compile that module in statically.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -urN sqlite3.original/Makefile sqlite3/Makefile
--- sqlite3.original/Makefile Tue Nov 21 06:25:46 2006
+++ sqlite3/Makefile Sun Dec 3 16:28:56 2006
@@ -8,6 +8,7 @@
PORTNAME= sqlite
PORTVERSION= 3.3.8
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://www.sqlite.org/
@@ -29,7 +30,8 @@
OPTIONS= DEBUG "Enable debugging & verbose explain" off \
DOCS "Building docs (depends on TCL)" on \
TCLWRAPPER "TCL wrapper for SQLITE" off \
- THREADS "Enable threads support" off
+ THREADS "Enable threads support" off \
+ FTS1 "Enable FTS1 (Full Text Search) module" off
# Defaults, for building the docs:
TCL_V?= 8.4
@@ -60,6 +62,11 @@
.if defined(WITH_THREADS)
CONFIGURE_ARGS+= --enable-threadsafe
+.endif
+
+.if defined(WITH_FTS1)
+CFLAGS+= -DSQLITE_ENABLE_FTS1
+EXTRA_PATCHES= ${FILESDIR}/fts1_patch-Makefile.in
.endif
post-patch:
diff -urN sqlite3.original/files/fts1_patch-Makefile.in sqlite3/files/fts1_patch-Makefile.in
--- sqlite3.original/files/fts1_patch-Makefile.in Wed Dec 31 18:00:00 1969
+++ sqlite3/files/fts1_patch-Makefile.in Sun Dec 3 16:56:59 2006
@@ -0,0 +1,31 @@
+--- Makefile.in.orig Sun Dec 3 16:16:05 2006
++++ Makefile.in Sun Dec 3 16:15:40 2006
+@@ -130,7 +130,8 @@
+ select.lo table.lo tokenize.lo trigger.lo update.lo \
+ util.lo vacuum.lo \
+ vdbe.lo vdbeapi.lo vdbeaux.lo vdbefifo.lo vdbemem.lo \
+- where.lo utf.lo legacy.lo vtab.lo
++ where.lo utf.lo legacy.lo vtab.lo \
++ fts1.lo fts1_hash.lo fts1_porter.lo fts1_tokenizer1.lo
+
+ # All of the source code files.
+ #
+@@ -464,6 +465,18 @@
+
+ where.lo: $(TOP)/src/where.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/src/where.c
++
++fts1.lo: $(TOP)/ext/fts1/fts1.c $(HDR)
++ $(LTCOMPILE) -c $(TOP)/ext/fts1/fts1.c
++
++fts1_hash.lo: $(TOP)/ext/fts1/fts1_hash.c $(HDR)
++ $(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_hash.c
++
++fts1_porter.lo: $(TOP)/ext/fts1/fts1_porter.c $(HDR)
++ $(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_porter.c
++
++fts1_tokenizer1.lo: $(TOP)/ext/fts1/fts1_tokenizer1.c $(HDR)
++ $(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_tokenizer1.c
+
+ tclsqlite-shell.lo: $(TOP)/src/tclsqlite.c $(HDR)
+ $(LTCOMPILE) -DTCLSH=1 -o $@ -c $(TOP)/src/tclsqlite.c
diff -urN sqlite3.original/files/patch-ext-fts1-fts1.c sqlite3/files/patch-ext-fts1-fts1.c
--- sqlite3.original/files/patch-ext-fts1-fts1.c Wed Dec 31 18:00:00 1969
+++ sqlite3/files/patch-ext-fts1-fts1.c Sun Dec 3 14:47:18 2006
@@ -0,0 +1,14 @@
+--- ext/fts1/fts1.c.orig Sun Oct 8 06:16:32 2006
++++ ext/fts1/fts1.c Sun Dec 3 14:44:46 2006
+@@ -19,11 +19,7 @@
+ #endif
+
+ #include <assert.h>
+-#if !defined(__APPLE__)
+-#include <malloc.h>
+-#else
+ #include <stdlib.h>
+-#endif
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
diff -urN sqlite3.original/files/patch-ext-fts1-fts1_porter.c sqlite3/files/patch-ext-fts1-fts1_porter.c
--- sqlite3.original/files/patch-ext-fts1-fts1_porter.c Wed Dec 31 18:00:00 1969
+++ sqlite3/files/patch-ext-fts1-fts1_porter.c Sun Dec 3 14:47:43 2006
@@ -0,0 +1,14 @@
+--- ext/fts1/fts1_porter.c.orig Sun Oct 1 13:01:13 2006
++++ ext/fts1/fts1_porter.c Sun Dec 3 14:45:17 2006
+@@ -26,11 +26,7 @@
+
+
+ #include <assert.h>
+-#if !defined(__APPLE__)
+-#include <malloc.h>
+-#else
+ #include <stdlib.h>
+-#endif
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
diff -urN sqlite3.original/files/patch-ext-fts1-fts1_tokenizer1.c sqlite3/files/patch-ext-fts1-fts1_tokenizer1.c
--- sqlite3.original/files/patch-ext-fts1-fts1_tokenizer1.c Wed Dec 31 18:00:00 1969
+++ sqlite3/files/patch-ext-fts1-fts1_tokenizer1.c Sun Dec 3 14:48:47 2006
@@ -0,0 +1,14 @@
+--- ext/fts1/fts1_tokenizer1.c.orig Sat Sep 30 08:57:33 2006
++++ ext/fts1/fts1_tokenizer1.c Sun Dec 3 14:45:56 2006
+@@ -18,11 +18,7 @@
+
+
+ #include <assert.h>
+-#if !defined(__APPLE__)
+-#include <malloc.h>
+-#else
+ #include <stdlib.h>
+-#endif
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list