diff options
-rw-r--r-- | recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch | 32 | ||||
-rw-r--r-- | recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch | 20 | ||||
-rw-r--r-- | recipes-support/sqlite/sqlite-2.8.17/sqlite.pc | 12 | ||||
-rw-r--r-- | recipes-support/sqlite/sqlite_2.8.17.bb | 58 |
4 files changed, 122 insertions, 0 deletions
diff --git a/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch b/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch new file mode 100644 index 0000000000..914422f1df --- /dev/null +++ b/recipes-support/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | diff -urN sqlite-2.8.17.orig/main.mk sqlite-2.8.17/main.mk | ||
2 | --- sqlite-2.8.17.orig/main.mk 2005-04-23 22:43:23.000000000 +0000 | ||
3 | +++ sqlite-2.8.17/main.mk 2009-04-02 20:10:36.000000000 +0000 | ||
4 | @@ -139,7 +139,7 @@ | ||
5 | # This is the default Makefile target. The objects listed here | ||
6 | # are what get build when you type just "make" with no arguments. | ||
7 | # | ||
8 | -all: sqlite.h config.h libsqlite.a sqlite$(EXE) | ||
9 | +all: sqlite.h config.h libsqlite.so sqlite$(EXE) | ||
10 | |||
11 | # Generate the file "last_change" which contains the date of change | ||
12 | # of the most recently modified source code file | ||
13 | @@ -148,13 +148,12 @@ | ||
14 | cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \ | ||
15 | | awk '{print $$5,$$6}' >last_change | ||
16 | |||
17 | -libsqlite.a: $(LIBOBJ) | ||
18 | - $(AR) libsqlite.a $(LIBOBJ) | ||
19 | - $(RANLIB) libsqlite.a | ||
20 | - | ||
21 | -sqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h | ||
22 | - $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ | ||
23 | - libsqlite.a $(LIBREADLINE) $(THREADLIB) | ||
24 | +libsqlite.so: $(LIBOBJ) | ||
25 | + $(CC) $(LDFLAGS) -shared -o libsqlite.so -Wl,-soname,libsqlite.so.0 $(LIBOBJ) | ||
26 | + | ||
27 | +sqlite$(EXE): $(TOP)/src/shell.c libsqlite.so sqlite.h | ||
28 | + $(TCCX) $(LDFLAGS) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ | ||
29 | + -lsqlite $(LIBREADLINE) $(THREADLIB) | ||
30 | |||
31 | sqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \ | ||
32 | $(TOP)/tool/spaceanal.tcl | ||
diff --git a/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch b/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch new file mode 100644 index 0000000000..b84b6486ef --- /dev/null +++ b/recipes-support/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | diff -bur sqlite-2.8.17~orig/main.mk sqlite-2.8.17/main.mk | ||
2 | --- sqlite-2.8.17~orig/main.mk 2006-02-13 04:09:33.000000000 -0600 | ||
3 | +++ sqlite-2.8.17/main.mk 2006-02-13 04:15:42.000000000 -0600 | ||
4 | @@ -58,7 +58,7 @@ | ||
5 | expr.o func.o hash.o insert.o \ | ||
6 | main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o \ | ||
7 | select.o table.o tokenize.o trigger.o update.o util.o \ | ||
8 | - vacuum.o vdbe.o vdbeaux.o where.o tclsqlite.o | ||
9 | + vacuum.o vdbe.o vdbeaux.o where.o | ||
10 | |||
11 | # All of the source code files. | ||
12 | # | ||
13 | @@ -91,7 +91,6 @@ | ||
14 | $(TOP)/src/sqlite.h.in \ | ||
15 | $(TOP)/src/sqliteInt.h \ | ||
16 | $(TOP)/src/table.c \ | ||
17 | - $(TOP)/src/tclsqlite.c \ | ||
18 | $(TOP)/src/tokenize.c \ | ||
19 | $(TOP)/src/trigger.c \ | ||
20 | $(TOP)/src/update.c \ | ||
diff --git a/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc b/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc new file mode 100644 index 0000000000..6bc742eecb --- /dev/null +++ b/recipes-support/sqlite/sqlite-2.8.17/sqlite.pc | |||
@@ -0,0 +1,12 @@ | |||
1 | # Package Information for pkg-config | ||
2 | |||
3 | prefix=/usr | ||
4 | exec_prefix=${prefix} | ||
5 | libdir=${exec_prefix}/lib | ||
6 | includedir=${prefix}/include | ||
7 | |||
8 | Name: SQLite | ||
9 | Description: SQL database engine | ||
10 | Version: 2.8.17 | ||
11 | Libs: -L${libdir} -lsqlite | ||
12 | Cflags: -I${includedir} | ||
diff --git a/recipes-support/sqlite/sqlite_2.8.17.bb b/recipes-support/sqlite/sqlite_2.8.17.bb new file mode 100644 index 0000000000..537db42a29 --- /dev/null +++ b/recipes-support/sqlite/sqlite_2.8.17.bb | |||
@@ -0,0 +1,58 @@ | |||
1 | DESCRIPTION = "An Embeddable SQL Database Engine" | ||
2 | HOMEPAGE = "http://www.sqlite.org/" | ||
3 | SECTION = "libs" | ||
4 | PRIORITY = "optional" | ||
5 | DEPENDS = "readline ncurses" | ||
6 | LICENSE = "PD" | ||
7 | PR = "r7" | ||
8 | |||
9 | SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \ | ||
10 | file://mainmk_build_dynamic.patch \ | ||
11 | file://mainmk_no_tcl.patch \ | ||
12 | file://sqlite.pc" | ||
13 | |||
14 | SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \ | ||
15 | expr.o func.o hash.o insert.o main.o opcodes.o os.o pager.o \ | ||
16 | parse.o pragma.o printf.o random.o select.o table.o tokenize.o \ | ||
17 | trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o" | ||
18 | |||
19 | inherit autotools pkgconfig | ||
20 | |||
21 | do_configure() { | ||
22 | echo "main.mk is patched, no need to configure" | ||
23 | # make pkgconfig.bbclass pick this up | ||
24 | mv ${WORKDIR}/sqlite.pc ${S} | ||
25 | } | ||
26 | |||
27 | do_compile() { | ||
28 | oe_runmake -f Makefile.linux-gcc \ | ||
29 | TOP="${S}" \ | ||
30 | BCC="${BUILD_CC}" \ | ||
31 | TCC="${CC}" \ | ||
32 | OPTS="-fPIC -D'INTPTR_TYPE=int'" \ | ||
33 | TCL_FLAGS= LIBTCL= \ | ||
34 | READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \ | ||
35 | LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses" | ||
36 | } | ||
37 | |||
38 | do_install() { | ||
39 | install -d ${D}${libdir} ${D}${bindir} | ||
40 | install sqlite ${D}${bindir} | ||
41 | install -m 0755 libsqlite.so ${D}${libdir}/libsqlite.so.0.8.6 | ||
42 | ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so | ||
43 | ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0 | ||
44 | ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0.8 | ||
45 | install -d ${D}${includedir} | ||
46 | install -m 0644 sqlite.h ${D}${includedir}/sqlite.h | ||
47 | install -d ${D}${libdir}/pkgconfig | ||
48 | install -m 0644 ${S}/sqlite.pc ${D}${libdir}/pkgconfig/sqlite.pc | ||
49 | } | ||
50 | |||
51 | PACKAGES += "${PN}-bin" | ||
52 | FILES_${PN}-bin = "${bindir}/*" | ||
53 | FILES_${PN} = "${libdir}/*.so.*" | ||
54 | |||
55 | SRC_URI[md5sum] = "838dbac20b56d2c4292e98848505a05b" | ||
56 | SRC_URI[sha256sum] = "3f35ebfb67867fb5b583a03e480f900206af637efe7179b32294a6a0cf806f37" | ||
57 | |||
58 | BBCLASSEXTEND = "native" | ||