This commit is contained in:
Paul Nasrat 2007-06-01 12:27:46 +00:00
parent d02c06c572
commit d8692403c8
2 changed files with 94 additions and 1 deletions

87
sqlite-3.3.17-fts.patch Normal file
View File

@ -0,0 +1,87 @@
Build FTS based on http://marc.info/?l=sqlite-users&m=118004021520533&q=raw
--- sqlite-3.3.17/Makefile.in.fts 2007-06-01 12:52:44.000000000 +0100
+++ sqlite-3.3.17/Makefile.in 2007-06-01 12:54:19.000000000 +0100
@@ -116,7 +116,9 @@
# You should not have to change anything below this line
###############################################################################
-TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
+#TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
+TCC += -DSQLITE_ENABLE_FTS1=1
+TCC += -DSQLITE_ENABLE_FTS2=1
# Object files for the SQLite library.
#
@@ -130,6 +132,12 @@
vdbe.lo vdbeapi.lo vdbeaux.lo vdbefifo.lo vdbemem.lo \
where.lo utf.lo legacy.lo vtab.lo
+# FTS1 (optional)
+LIBOBJ += fts1.lo fts1_hash.lo fts1_porter.lo fts1_tokenizer1.lo
+
+# FTS2 (optional)
+LIBOBJ += fts2.lo fts2_hash.lo fts2_porter.lo fts2_tokenizer1.lo
+
# All of the source code files.
#
SRC = \
@@ -194,7 +202,14 @@
$(TOP)/ext/fts1/fts1_hash.h \
$(TOP)/ext/fts1/fts1_porter.c \
$(TOP)/ext/fts1/fts1_tokenizer.h \
- $(TOP)/ext/fts1/fts1_tokenizer1.c
+ $(TOP)/ext/fts1/fts1_tokenizer1.c \
+ $(TOP)/ext/fts2/fts2.c \
+ $(TOP)/ext/fts2/fts2.h \
+ $(TOP)/ext/fts2/fts2_hash.c \
+ $(TOP)/ext/fts2/fts2_hash.h \
+ $(TOP)/ext/fts2/fts2_porter.c \
+ $(TOP)/ext/fts2/fts2_tokenizer.h \
+ $(TOP)/ext/fts2/fts2_tokenizer1.c
# Source code to the test files.
@@ -252,7 +267,10 @@
HDR += \
$(TOP)/ext/fts1/fts1.h \
$(TOP)/ext/fts1/fts1_hash.h \
- $(TOP)/ext/fts1/fts1_tokenizer.h
+ $(TOP)/ext/fts1/fts1_tokenizer.h \
+ $(TOP)/ext/fts2/fts2.h \
+ $(TOP)/ext/fts2/fts2_hash.h \
+ $(TOP)/ext/fts2/fts2_tokenizer.h
# Header files used by the VDBE submodule
#
@@ -469,6 +487,30 @@
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
+
+fts2.lo: $(TOP)/ext/fts2/fts2.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts2/fts2.c
+
+fts2_hash.lo: $(TOP)/ext/fts2/fts2_hash.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_hash.c
+
+fts2_porter.lo: $(TOP)/ext/fts2/fts2_porter.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_porter.c
+
+fts2_tokenizer1.lo: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_tokenizer1.c
+
tclsqlite-shell.lo: $(TOP)/src/tclsqlite.c $(HDR)
$(LTCOMPILE) -DTCLSH=1 -o $@ -c $(TOP)/src/tclsqlite.c

View File

@ -6,11 +6,12 @@
Summary: Library that implements an embeddable SQL database engine
Name: sqlite
Version: 3.3.17
Release: 1%{?dist}
Release: 2%{?dist}
License: Public Domain
Group: Applications/Databases
URL: http://www.sqlite.org/
Source: http://www.sqlite.org/sqlite-%{version}.tar.gz
Patch0: sqlite-3.3.17-fts.patch
Obsoletes: sqlite3 sqlite3-devel
BuildRequires: ncurses-devel readline-devel
BuildRequires: /usr/bin/tclsh
@ -50,6 +51,7 @@ This package contains the tcl modules for %{name}.
%prep
%setup -q
%patch0 -p1 -b .fts
%build
%configure %{!?_with_tcl:--disable-tcl} \
@ -105,6 +107,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Fri Jun 01 2007 Paul Nasrat <pnasrat@redhat.com> - 3.3.17-2
- Enable load
- Build fts1 and fts2
* Tue May 29 2007 Paul Nasrat <pnasrat@redhat.com> - 3.3.17-1
- Update to 3.3.17