summaryrefslogtreecommitdiff
path: root/recipes/sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/sqlite')
-rw-r--r--recipes/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch30
-rw-r--r--recipes/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch20
-rw-r--r--recipes/sqlite/sqlite-2.8.17/sqlite.pc12
-rw-r--r--recipes/sqlite/sqlite-native_2.8.17.bb16
-rw-r--r--recipes/sqlite/sqlite3-native.inc13
-rw-r--r--recipes/sqlite/sqlite3-native_3.6.2.bb1
-rw-r--r--recipes/sqlite/sqlite3.inc44
-rw-r--r--recipes/sqlite/sqlite3/cross-compile.patch92
-rw-r--r--recipes/sqlite/sqlite3/ldflags.patch67
-rw-r--r--recipes/sqlite/sqlite3/libtool.patch25
-rw-r--r--recipes/sqlite/sqlite3_3.6.2.bb3
-rw-r--r--recipes/sqlite/sqlite_2.8.17.bb61
12 files changed, 384 insertions, 0 deletions
diff --git a/recipes/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch b/recipes/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch
new file mode 100644
index 0000000000..e936f81c72
--- /dev/null
+++ b/recipes/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch
@@ -0,0 +1,30 @@
+diff -bur sqlite-2.8.17~orig/main.mk sqlite-2.8.17/main.mk
+--- sqlite-2.8.17~orig/main.mk 2005-04-23 17:43:23.000000000 -0500
++++ sqlite-2.8.17/main.mk 2006-02-13 03:31:03.000000000 -0600
+@@ -139,7 +139,7 @@
+ # This is the default Makefile target. The objects listed here
+ # are what get build when you type just "make" with no arguments.
+ #
+-all: sqlite.h config.h libsqlite.a sqlite$(EXE)
++all: sqlite.h config.h libsqlite.so sqlite$(EXE)
+
+ # Generate the file "last_change" which contains the date of change
+ # of the most recently modified source code file
+@@ -148,13 +148,12 @@
+ cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
+ | awk '{print $$5,$$6}' >last_change
+
+-libsqlite.a: $(LIBOBJ)
+- $(AR) libsqlite.a $(LIBOBJ)
+- $(RANLIB) libsqlite.a
++libsqlite.so: $(LIBOBJ)
++ $(CC) -shared -o libsqlite.so -Wl,-soname,libsqlite.so.0 $(LIBOBJ)
+
+-sqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h
++sqlite$(EXE): $(TOP)/src/shell.c libsqlite.so sqlite.h
+ $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \
+- libsqlite.a $(LIBREADLINE) $(THREADLIB)
++ -lsqlite $(LIBREADLINE) $(THREADLIB)
+
+ sqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \
+ $(TOP)/tool/spaceanal.tcl
diff --git a/recipes/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch b/recipes/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch
new file mode 100644
index 0000000000..b84b6486ef
--- /dev/null
+++ b/recipes/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch
@@ -0,0 +1,20 @@
+diff -bur sqlite-2.8.17~orig/main.mk sqlite-2.8.17/main.mk
+--- sqlite-2.8.17~orig/main.mk 2006-02-13 04:09:33.000000000 -0600
++++ sqlite-2.8.17/main.mk 2006-02-13 04:15:42.000000000 -0600
+@@ -58,7 +58,7 @@
+ expr.o func.o hash.o insert.o \
+ main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o \
+ select.o table.o tokenize.o trigger.o update.o util.o \
+- vacuum.o vdbe.o vdbeaux.o where.o tclsqlite.o
++ vacuum.o vdbe.o vdbeaux.o where.o
+
+ # All of the source code files.
+ #
+@@ -91,7 +91,6 @@
+ $(TOP)/src/sqlite.h.in \
+ $(TOP)/src/sqliteInt.h \
+ $(TOP)/src/table.c \
+- $(TOP)/src/tclsqlite.c \
+ $(TOP)/src/tokenize.c \
+ $(TOP)/src/trigger.c \
+ $(TOP)/src/update.c \
diff --git a/recipes/sqlite/sqlite-2.8.17/sqlite.pc b/recipes/sqlite/sqlite-2.8.17/sqlite.pc
new file mode 100644
index 0000000000..6bc742eecb
--- /dev/null
+++ b/recipes/sqlite/sqlite-2.8.17/sqlite.pc
@@ -0,0 +1,12 @@
+# Package Information for pkg-config
+
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: SQLite
+Description: SQL database engine
+Version: 2.8.17
+Libs: -L${libdir} -lsqlite
+Cflags: -I${includedir}
diff --git a/recipes/sqlite/sqlite-native_2.8.17.bb b/recipes/sqlite/sqlite-native_2.8.17.bb
new file mode 100644
index 0000000000..a3100fc60c
--- /dev/null
+++ b/recipes/sqlite/sqlite-native_2.8.17.bb
@@ -0,0 +1,16 @@
+# This is put at the top to override do_stage later
+inherit native
+
+require sqlite_${PV}.bb
+
+DEPENDS = "readline-native ncurses-native"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/sqlite-${PV}"
+
+S = "${WORKDIR}/sqlite-${PV}"
+
+do_install() {
+ :
+}
+
+PACKAGES = ""
diff --git a/recipes/sqlite/sqlite3-native.inc b/recipes/sqlite/sqlite3-native.inc
new file mode 100644
index 0000000000..d61551703f
--- /dev/null
+++ b/recipes/sqlite/sqlite3-native.inc
@@ -0,0 +1,13 @@
+inherit native
+
+require sqlite3.inc
+
+DEPENDS = "readline-native ncurses-native"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/sqlite3"
+
+do_install() {
+ :
+}
+
+PACKAGES = ""
diff --git a/recipes/sqlite/sqlite3-native_3.6.2.bb b/recipes/sqlite/sqlite3-native_3.6.2.bb
new file mode 100644
index 0000000000..08208c4c74
--- /dev/null
+++ b/recipes/sqlite/sqlite3-native_3.6.2.bb
@@ -0,0 +1 @@
+require sqlite3-native.inc
diff --git a/recipes/sqlite/sqlite3.inc b/recipes/sqlite/sqlite3.inc
new file mode 100644
index 0000000000..93a536e8b6
--- /dev/null
+++ b/recipes/sqlite/sqlite3.inc
@@ -0,0 +1,44 @@
+DESCRIPTION = "An Embeddable SQL Database Engine"
+SECTION = "libs"
+PRIORITY = "optional"
+DEPENDS = "readline ncurses"
+LICENSE = "PD"
+
+SRC_URI = "http://www.sqlite.org/sqlite-${PV}.tar.gz \
+ file://libtool.patch;patch=1"
+
+S = "${WORKDIR}/sqlite-${PV}"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-tcl --enable-shared \
+ --enable-threadsafe"
+export config_BUILD_CC = "${BUILD_CC}"
+export config_BUILD_CFLAGS = "${BUILD_CFLAGS}"
+export config_BUILD_LIBS = "${BUILD_LDFLAGS}"
+export config_TARGET_CC = "${CC}"
+export config_TARGET_LINK = "${CCLD}"
+export config_TARGET_CFLAGS = "${CFLAGS}"
+export config_TARGET_LFLAGS = "${LDFLAGS}"
+
+do_compile_prepend() {
+ oe_runmake sqlite3.h
+ install -m 0644 sqlite3.h ${STAGING_INCDIR}
+}
+
+do_stage() {
+ oe_libinstall -so libsqlite3 ${STAGING_LIBDIR}
+ install -m 0644 sqlite3.h ${STAGING_INCDIR}
+}
+
+#do_install() {
+# oe_runmake install DESTDIR=${D} prefix=${prefix} exec_prefix=${exec_prefix}
+#}
+
+PACKAGES = "libsqlite libsqlite-dev libsqlite-doc sqlite3 sqlite3-dbg"
+FILES_sqlite3 = "${bindir}/*"
+FILES_libsqlite = "${libdir}/*.so.*"
+FILES_libsqlite-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so \
+ ${libdir}/pkgconfig ${includedir}"
+FILES_libsqlite-doc = "${docdir} ${mandir} ${infodir}"
+AUTO_LIBNAME_PKGS = "libsqlite"
diff --git a/recipes/sqlite/sqlite3/cross-compile.patch b/recipes/sqlite/sqlite3/cross-compile.patch
new file mode 100644
index 0000000000..31d4f0d162
--- /dev/null
+++ b/recipes/sqlite/sqlite3/cross-compile.patch
@@ -0,0 +1,92 @@
+--- sqlite-3.3.7/configure.ac.orig 2006-08-21 00:20:50.000000000 +0200
++++ sqlite-3.3.7/configure.ac 2006-08-21 00:22:35.000000000 +0200
+@@ -187,10 +187,11 @@
+ default_build_cflags="-g"
+ if test "$config_BUILD_CC" = ""; then
+ AC_PROG_CC
+- if test "$cross_compiling" = "yes"; then
+- AC_MSG_ERROR([unable to find a compiler for building build tools])
+- fi
+- BUILD_CC=$CC
++# if test "$cross_compiling" = "yes"; then
++# AC_MSG_ERROR([unable to find a compiler for building build tools])
++# fi
++# BUILD_CC=$CC
++BUILD_CC=gcc
+ default_build_cflags=$CFLAGS
+ else
+ BUILD_CC=$config_BUILD_CC
+@@ -238,6 +239,12 @@
+ TARGET_LINK=$config_TARGET_LINK
+ fi
+ AC_MSG_RESULT($TARGET_LINK)
++if test "$config_TARGET_LFLAGS" != ""; then
++ TARGET_LFLAGS=$config_TARGET_LFLAGS
++ else
++ TARGET_LFLAGS=$BUILD_LFLAGS
++ fi
++AC_MSG_RESULT($TARGET_LFLAGS)
+ AC_MSG_CHECKING([switches on the target compiler])
+ if test "$config_TARGET_TFLAGS" != ""; then
+ TARGET_TFLAGS=$config_TARGET_TFLAGS
+@@ -592,15 +599,7 @@
+ # Figure out what C libraries are required to compile programs
+ # that use "readline()" library.
+ #
+-if test "$config_TARGET_READLINE_LIBS" != ""; then
+- TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
+-else
+- CC=$TARGET_CC
+- LIBS=""
+- AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap])
+- AC_CHECK_LIB([readline], [readline])
+- TARGET_READLINE_LIBS="$LIBS"
+-fi
++TARGET_READLINE_LIBS="-lreadline"
+ AC_SUBST(TARGET_READLINE_LIBS)
+
+ ##########
+@@ -615,41 +614,8 @@
+ ##########
+ # Figure out where to get the READLINE header files.
+ #
+-AC_MSG_CHECKING([readline header files])
+-found=no
+-if test "$config_TARGET_READLINE_INC" != ""; then
+- TARGET_READLINE_INC=$config_TARGET_READLINE_INC
+- found=yes
+-fi
+-if test "$found" = "yes"; then
+- AC_MSG_RESULT($TARGET_READLINE_INC)
+-else
+- AC_MSG_RESULT(not specified: still searching...)
+- AC_CHECK_HEADER(readline.h, [found=yes])
+-fi
+-if test "$found" = "no"; then
+- for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
+- AC_CHECK_FILE($dir/include/readline.h, found=yes)
+- if test "$found" = "yes"; then
+- TARGET_READLINE_INC="-I$dir/include"
+- break
+- fi
+- AC_CHECK_FILE($dir/include/readline/readline.h, found=yes)
+- if test "$found" = "yes"; then
+- TARGET_READLINE_INC="-I$dir/include/readline"
+- break
+- fi
+- done
+-fi
+-if test "$found" = "yes"; then
+- if test "$TARGET_READLINE_LIBS" = ""; then
+- TARGET_HAVE_READLINE=0
+- else
+- TARGET_HAVE_READLINE=1
+- fi
+-else
+- TARGET_HAVE_READLINE=0
+-fi
++TARGET_READLINE_INC=""
++TARGET_HAVE_READLINE=1
+ AC_SUBST(TARGET_READLINE_INC)
+ AC_SUBST(TARGET_HAVE_READLINE)
+
diff --git a/recipes/sqlite/sqlite3/ldflags.patch b/recipes/sqlite/sqlite3/ldflags.patch
new file mode 100644
index 0000000000..ee5105ffff
--- /dev/null
+++ b/recipes/sqlite/sqlite3/ldflags.patch
@@ -0,0 +1,67 @@
+--- sqlite-3.3.7/Makefile.in.orig 2006-08-20 23:05:36.000000000 +0200
++++ sqlite-3.3.7/Makefile.in 2006-08-20 23:42:49.000000000 +0200
+@@ -31,6 +31,10 @@
+ #
+ TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src
+
++# OE overrides
++#
++TARGET_LFLAGS = @TARGET_LFLAGS@
++
+ # Define -DNDEBUG to compile without debugging (i.e., for production usage)
+ # Omitting the define will cause extra debugging code to be inserted and
+ # includes extra comments when "EXPLAIN stmt" is used.
+@@ -257,17 +261,17 @@
+ | $(NAWK) '{print $$5,$$6}' >last_change
+
+ libsqlite3.la: $(LIBOBJ)
+- $(LTLINK) -o libsqlite3.la $(LIBOBJ) $(LIBPTHREAD) \
++ $(LTLINK) -o libsqlite3.la $(LIBOBJ) $(TARGET_LFLAGS) $(LIBPTHREAD) \
+ ${ALLOWRELEASE} -rpath $(libdir) -version-info "8:6:8"
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -o libtclsqlite3.la tclsqlite.lo \
+- $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(LIBPTHREAD) \
++ $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(TARGET_LFLAGS) $(LIBPTHREAD) \
+ -rpath $(libdir)/sqlite \
+ -version-info "8:6:8"
+
+ sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h
+- $(LTLINK) $(READLINE_FLAGS) $(LIBPTHREAD) \
++ $(LTLINK) $(TARGET_LFLAGS) $(READLINE_FLAGS) $(LIBPTHREAD) \
+ -o $@ $(TOP)/src/shell.c libsqlite3.la \
+ $(LIBREADLINE) $(TLIBS)
+
+@@ -456,12 +460,12 @@
+
+ tclsqlite3: tclsqlite-shell.lo libsqlite3.la
+ $(LTLINK) -o tclsqlite3 tclsqlite-shell.lo \
+- libsqlite3.la $(LIBTCL)
++ libsqlite3.la $(TARGET_LFLAGS) $(LIBTCL)
+
+ testfixture$(TEXE): $(TOP)/src/tclsqlite.c libsqlite3.la $(TESTSRC)
+ $(LTLINK) -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 \
+ $(TEMP_STORE) -o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \
+- libsqlite3.la $(LIBTCL)
++ libsqlite3.la $(TARGET_LFLAGS) $(LIBTCL)
+
+
+ fulltest: testfixture$(TEXE) sqlite3$(TEXE)
+@@ -471,7 +475,7 @@
+ ./testfixture $(TOP)/test/quick.test
+
+ sqlite3_analyzer$(TEXE): $(TOP)/src/tclsqlite.c libtclsqlite3.la \
+- $(TESTSRC) $(TOP)/tool/spaceanal.tcl
++ $(TARGET_LFLAGS) $(TESTSRC) $(TOP)/tool/spaceanal.tcl
+ sed \
+ -e '/^#/d' \
+ -e 's,\\,\\\\,g' \
+@@ -481,7 +485,7 @@
+ $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
+ $(LTLINK) -DTCLSH=2 -DSQLITE_TEST=1 $(TEMP_STORE)\
+ -o sqlite3_analyzer$(EXE) $(TESTSRC) $(TOP)/src/tclsqlite.c \
+- libtclsqlite3.la $(LIBTCL)
++ libtclsqlite3.la $(TARGET_LFLAGS) $(LIBTCL)
+
+ # Rules used to build documentation
+ #
diff --git a/recipes/sqlite/sqlite3/libtool.patch b/recipes/sqlite/sqlite3/libtool.patch
new file mode 100644
index 0000000000..ccf9993ed2
--- /dev/null
+++ b/recipes/sqlite/sqlite3/libtool.patch
@@ -0,0 +1,25 @@
+Index: sqlite-3.2.1/Makefile.in
+===================================================================
+--- sqlite-3.2.1.orig/Makefile.in 2005-03-23 17:09:39.000000000 +0100
++++ sqlite-3.2.1/Makefile.in 2005-04-25 23:11:20.000000000 +0200
+@@ -15,7 +15,10 @@
+ # The toplevel directory of the source tree. This is the directory
+ # that contains this "Makefile.in" and the "configure.in" script.
+ #
+-TOP = @srcdir@
++TOP = $(srcdir)
++srcdir = @srcdir@
++top_srcdir = @top_srcdir@
++top_builddir = .
+
+ # C Compiler and options for use in building executables that
+ # will run on the platform that is doing the build.
+@@ -96,7 +99,7 @@
+ exec_prefix = @exec_prefix@
+ libdir = @libdir@
+ INSTALL = @INSTALL@
+-LIBTOOL = ./libtool
++LIBTOOL = @LIBTOOL@
+ ALLOWRELEASE = @ALLOWRELEASE@
+
+ # libtool compile/link/install
diff --git a/recipes/sqlite/sqlite3_3.6.2.bb b/recipes/sqlite/sqlite3_3.6.2.bb
new file mode 100644
index 0000000000..479516d261
--- /dev/null
+++ b/recipes/sqlite/sqlite3_3.6.2.bb
@@ -0,0 +1,3 @@
+require sqlite3.inc
+
+PR = "r0"
diff --git a/recipes/sqlite/sqlite_2.8.17.bb b/recipes/sqlite/sqlite_2.8.17.bb
new file mode 100644
index 0000000000..b5939d9848
--- /dev/null
+++ b/recipes/sqlite/sqlite_2.8.17.bb
@@ -0,0 +1,61 @@
+DESCRIPTION = "An Embeddable SQL Database Engine"
+HOMEPAGE = "http://www.sqlite.org/"
+SECTION = "libs"
+PRIORITY = "optional"
+DEPENDS = "readline ncurses"
+LICENSE = "PD"
+PR = "r2"
+
+SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \
+ file://mainmk_build_dynamic.patch;patch=1 \
+ file://mainmk_no_tcl.patch;patch=1 \
+ file://sqlite.pc"
+
+SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \
+ expr.o func.o hash.o insert.o main.o opcodes.o os.o pager.o \
+ parse.o pragma.o printf.o random.o select.o table.o tokenize.o \
+ trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o"
+
+inherit autotools pkgconfig
+
+do_configure() {
+ echo "main.mk is patched, no need to configure"
+}
+
+do_compile() {
+ oe_runmake -f Makefile.linux-gcc \
+ TOP="${S}" \
+ BCC="${BUILD_CC}" \
+ TCC="${CC}" \
+ OPTS="-fPIC -D'INTPTR_TYPE=int'" \
+ TCL_FLAGS= LIBTCL= \
+ READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \
+ LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses"
+}
+
+do_stage() {
+ install -m 0755 libsqlite.so ${STAGING_LIBDIR}/libsqlite.so.0.8.6
+ ln -sf libsqlite.so.0.8.6 ${STAGING_LIBDIR}/libsqlite.so
+ ln -sf libsqlite.so.0.8.6 ${STAGING_LIBDIR}/libsqlite.so.0
+ ln -sf libsqlite.so.0.8.6 ${STAGING_LIBDIR}/libsqlite.so.0.8
+ install -m 0644 sqlite.h ${STAGING_INCDIR}
+
+ # make pkgconfig.bbclass pick this up
+ mv ${WORKDIR}/sqlite.pc ${S}
+}
+
+do_install() {
+ install -d ${D}${libdir} ${D}${bindir}
+ install sqlite ${D}${bindir}
+ install -m 0755 libsqlite.so ${D}${libdir}/libsqlite.so.0.8.6
+ ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so
+ ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0
+ ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0.8
+ install -d ${D}${includedir}
+ install -m 0644 sqlite.h ${D}${includedir}/sqlite.h
+}
+
+PACKAGES += "${PN}-bin"
+FILES_${PN}-bin = "${bindir}/*"
+FILES_${PN} = "${libdir}/*.so.*"
+