summaryrefslogtreecommitdiff
path: root/data/_sqlite3
diff options
context:
space:
mode:
Diffstat (limited to 'data/_sqlite3')
-rw-r--r--data/_sqlite3/_metadata/depends1
-rw-r--r--data/_sqlite3/_metadata/description1
-rw-r--r--data/_sqlite3/_metadata/license6
l---------data/_sqlite3/_metadata/maintainer1
-rw-r--r--data/_sqlite3/_metadata/name1
-rw-r--r--data/_sqlite3/_metadata/priority1
l---------data/_sqlite3/_metadata/readline.dep1
-rw-r--r--data/_sqlite3/_metadata/role1
-rw-r--r--data/_sqlite3/_metadata/section1
-rw-r--r--data/_sqlite3/_metadata/tags1
-rw-r--r--data/_sqlite3/_metadata/version1
-rw-r--r--data/_sqlite3/make.sh5
-rw-r--r--data/_sqlite3/misuse.diff53
-rw-r--r--data/_sqlite3/sqlite-3.5.9.tar.gzbin0 -> 2201083 bytes
-rw-r--r--data/_sqlite3/tempdir.diff70
15 files changed, 144 insertions, 0 deletions
diff --git a/data/_sqlite3/_metadata/depends b/data/_sqlite3/_metadata/depends
new file mode 100644
index 000000000..331ac1b2c
--- /dev/null
+++ b/data/_sqlite3/_metadata/depends
@@ -0,0 +1 @@
+firmware (<< 3.0)
diff --git a/data/_sqlite3/_metadata/description b/data/_sqlite3/_metadata/description
new file mode 100644
index 000000000..8360345f2
--- /dev/null
+++ b/data/_sqlite3/_metadata/description
@@ -0,0 +1 @@
+embeddable database used by iPhone
diff --git a/data/_sqlite3/_metadata/license b/data/_sqlite3/_metadata/license
new file mode 100644
index 000000000..cc53a32d5
--- /dev/null
+++ b/data/_sqlite3/_metadata/license
@@ -0,0 +1,6 @@
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
diff --git a/data/_sqlite3/_metadata/maintainer b/data/_sqlite3/_metadata/maintainer
new file mode 120000
index 000000000..0fa66e077
--- /dev/null
+++ b/data/_sqlite3/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/saurik \ No newline at end of file
diff --git a/data/_sqlite3/_metadata/name b/data/_sqlite3/_metadata/name
new file mode 100644
index 000000000..e4244bd29
--- /dev/null
+++ b/data/_sqlite3/_metadata/name
@@ -0,0 +1 @@
+SQLite v3
diff --git a/data/_sqlite3/_metadata/priority b/data/_sqlite3/_metadata/priority
new file mode 100644
index 000000000..1c96b78c1
--- /dev/null
+++ b/data/_sqlite3/_metadata/priority
@@ -0,0 +1 @@
++important
diff --git a/data/_sqlite3/_metadata/readline.dep b/data/_sqlite3/_metadata/readline.dep
new file mode 120000
index 000000000..f35c9185b
--- /dev/null
+++ b/data/_sqlite3/_metadata/readline.dep
@@ -0,0 +1 @@
+../../readline \ No newline at end of file
diff --git a/data/_sqlite3/_metadata/role b/data/_sqlite3/_metadata/role
new file mode 100644
index 000000000..8d0320866
--- /dev/null
+++ b/data/_sqlite3/_metadata/role
@@ -0,0 +1 @@
+developer
diff --git a/data/_sqlite3/_metadata/section b/data/_sqlite3/_metadata/section
new file mode 100644
index 000000000..49053f584
--- /dev/null
+++ b/data/_sqlite3/_metadata/section
@@ -0,0 +1 @@
+Data_Storage
diff --git a/data/_sqlite3/_metadata/tags b/data/_sqlite3/_metadata/tags
new file mode 100644
index 000000000..a8928cec8
--- /dev/null
+++ b/data/_sqlite3/_metadata/tags
@@ -0,0 +1 @@
+purpose::library
diff --git a/data/_sqlite3/_metadata/version b/data/_sqlite3/_metadata/version
new file mode 100644
index 000000000..62841113a
--- /dev/null
+++ b/data/_sqlite3/_metadata/version
@@ -0,0 +1 @@
+3.5.9
diff --git a/data/_sqlite3/make.sh b/data/_sqlite3/make.sh
new file mode 100644
index 000000000..c3179fbb1
--- /dev/null
+++ b/data/_sqlite3/make.sh
@@ -0,0 +1,5 @@
+pkg:setup
+autoconf
+pkg:configure --with-readline-inc=-I"$(PKG_DEST_ readline)"/usr/include/readline --with-readline-lib=-lreadline
+make
+pkg:install
diff --git a/data/_sqlite3/misuse.diff b/data/_sqlite3/misuse.diff
new file mode 100644
index 000000000..0e7b79255
--- /dev/null
+++ b/data/_sqlite3/misuse.diff
@@ -0,0 +1,53 @@
+diff -ru sqlite-3.5.9/src/vdbeapi.c sqlite-3.5.9+iPhone/src/vdbeapi.c
+--- sqlite-3.5.9/src/vdbeapi.c 2008-05-13 12:52:46.000000000 +0000
++++ sqlite-3.5.9+iPhone/src/vdbeapi.c 2008-08-01 03:22:00.000000000 +0000
+@@ -1072,6 +1072,9 @@
+ int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ if( rc==SQLITE_OK ){
+@@ -1086,6 +1089,9 @@
+ int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ if( rc==SQLITE_OK ){
+@@ -1097,6 +1103,9 @@
+ int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
+ int rc;
+ Vdbe *p = (Vdbe*)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ sqlite3_mutex_leave(p->db->mutex);
+@@ -1125,6 +1134,9 @@
+ int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ if( rc==SQLITE_OK ){
+@@ -1137,6 +1149,9 @@
+ int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
++ if( p==0 ){
++ return SQLITE_MISUSE;
++ }
+ sqlite3_mutex_enter(p->db->mutex);
+ rc = vdbeUnbind(p, i);
+ if( rc==SQLITE_OK ){
diff --git a/data/_sqlite3/sqlite-3.5.9.tar.gz b/data/_sqlite3/sqlite-3.5.9.tar.gz
new file mode 100644
index 000000000..92bb8af07
--- /dev/null
+++ b/data/_sqlite3/sqlite-3.5.9.tar.gz
Binary files differ
diff --git a/data/_sqlite3/tempdir.diff b/data/_sqlite3/tempdir.diff
new file mode 100644
index 000000000..fb862fb1a
--- /dev/null
+++ b/data/_sqlite3/tempdir.diff
@@ -0,0 +1,70 @@
+diff -ru sqlite-3.5.9/Makefile.in sqlite-3.5.9+iPhone/Makefile.in
+--- sqlite-3.5.9/Makefile.in 2008-05-12 17:10:26.000000000 +0000
++++ sqlite-3.5.9+iPhone/Makefile.in 2008-08-01 08:21:45.000000000 +0000
+@@ -413,10 +413,12 @@
+
+ libsqlite3.la: $(LIBOBJ)
+ $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \
++ -framework CoreFoundation -framework Foundation \
+ ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -o $@ tclsqlite.lo \
++ -framework CoreFoundation -framework Foundation \
+ $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(TLIBS) \
+ -rpath "$(libdir)/sqlite" \
+ -version-info "8:6:8"
+diff -ru sqlite-3.5.9/src/os_unix.c sqlite-3.5.9+iPhone/src/os_unix.c
+--- sqlite-3.5.9/src/os_unix.c 2008-05-13 12:51:29.000000000 +0000
++++ sqlite-3.5.9+iPhone/src/os_unix.c 2008-08-01 08:18:14.000000000 +0000
+@@ -75,6 +75,10 @@
+ */
+ #define MAX_PATHNAME 512
+
++#ifdef __APPLE__
++#import <CoreServices/CoreServices.h>
++#endif
++
+
+ /*
+ ** The unixFile structure is subclass of sqlite3_file specific for the unix
+@@ -2497,6 +2501,7 @@
+ static int unixGetTempname(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
+ static const char *azDirs[] = {
+ 0,
++ 0,
+ "/var/tmp",
+ "/usr/tmp",
+ "/tmp",
+@@ -2509,6 +2514,12 @@
+ int i, j;
+ struct stat buf;
+ const char *zDir = ".";
++#ifdef __APPLE__
++ void *pool;
++ CFStringRef cfstr;
++ CFIndex maxsize;
++ char *cstr;
++#endif
+
+ /* It's odd to simulate an io-error here, but really this is just
+ ** using the io-error infrastructure to test that SQLite handles this
+@@ -2516,6 +2526,18 @@
+ */
+ SimulateIOError( return SQLITE_ERROR );
+
++#ifdef __APPLE__
++ if (azDirs[1] == NULL) {
++ pool = NSPushAutoreleasePool(0);
++ cfstr = (CFStringRef) NSTemporaryDirectory();
++ maxsize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr), kCFStringEncodingUTF8) + 1;
++ cstr = malloc(maxsize);
++ CFStringGetCString(cfstr, cstr, maxsize, kCFStringEncodingUTF8);
++ azDirs[1] = cstr;
++ NSPopAutoreleasePool(pool);
++ }
++#endif
++
+ azDirs[0] = sqlite3_temp_directory;
+ for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); i++){
+ if( azDirs[i]==0 ) continue;