rpms/sqlite2/devel sqlite-2.8.15-arch-double-differences.patch, NONE, 1.1 sqlite-2.8.15-makefile.patch, NONE, 1.1 sqlite-2.8.15.rpath.patch, NONE, 1.1 sqlite-2.8.3.test.rh9.patch, NONE, 1.1 sqlite-64bit-fixes.patch, NONE, 1.1 sqlite2.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ignacio Vazquez-Abrams (ivazquez) fedora-extras-commits at redhat.com
Fri May 20 14:57:33 UTC 2005


Author: ivazquez

Update of /cvs/extras/rpms/sqlite2/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3778/devel

Modified Files:
	.cvsignore sources 
Added Files:
	sqlite-2.8.15-arch-double-differences.patch 
	sqlite-2.8.15-makefile.patch sqlite-2.8.15.rpath.patch 
	sqlite-2.8.3.test.rh9.patch sqlite-64bit-fixes.patch 
	sqlite2.spec 
Log Message:
auto-import sqlite2-2.8.16-1 on branch devel from sqlite2-2.8.16-1.src.rpm

sqlite-2.8.15-arch-double-differences.patch:

--- NEW FILE sqlite-2.8.15-arch-double-differences.patch ---
--- sqlite/test/format3.test.bak	2003-12-23 03:17:35.000000000 +0100
+++ sqlite/test/format3.test	2005-01-28 18:06:35.066538463 +0100
@@ -686,7 +686,7 @@
   execsql {SELECT '0'==0.0}
 } {1}
 do_test format3-11.3 {
-  execsql {SELECT '123456789012345678901'=='123456789012345678900'}
+  execsql {SELECT '1234567890123456789012'=='1234567890123456789011'}
 } {1}
 do_test format3-11.4 {
   execsql {
--- sqlite/test/misc1.test.bak	2003-08-05 15:13:39.000000000 +0200
+++ sqlite/test/misc1.test	2005-01-28 18:07:26.976971054 +0100
@@ -335,7 +335,7 @@
   execsql {SELECT '0'==0.0}
 } {1}
 do_test misc1-12.3 {
-  execsql {SELECT '12345678901234567890'=='12345678901234567891'}
+  execsql {SELECT '1234567890123456789012'=='1234567890123456789011'}
 } {0}
 do_test misc1-12.4 {
   execsql {

sqlite-2.8.15-makefile.patch:

--- NEW FILE sqlite-2.8.15-makefile.patch ---
diff -Nur sqlite-2.8.15-orig/Makefile.in sqlite-2.8.15/Makefile.in
--- sqlite-2.8.15-orig/Makefile.in	2004-03-27 00:16:32.000000000 +0100
+++ sqlite-2.8.15/Makefile.in	2005-01-23 18:20:37.034194768 +0100
@@ -465,14 +465,16 @@
 	mv $(DOC) doc
 
 install:	sqlite libsqlite.la sqlite.h
-	$(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib
-	$(LTINSTALL) libsqlite.la $(DESTDIR)$(exec_prefix)/lib
+	$(INSTALL) -d $(DESTDIR)$(libdir)
+	$(LTINSTALL) libsqlite.la $(DESTDIR)$(libdir)
+	$(LTINSTALL) libtclsqlite.la $(DESTDIR)$(libdir)/sqlite-__VERSION__
 	$(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
 	$(LTINSTALL) sqlite $(DESTDIR)$(exec_prefix)/bin
+	$(LTINSTALL) tclsqlite $(DESTDIR)$(exec_prefix)/bin
 	$(INSTALL) -d $(DESTDIR)$(prefix)/include
 	$(INSTALL) -m 0644 sqlite.h $(DESTDIR)$(prefix)/include
-	$(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig; 
-	$(INSTALL) -m 0644 sqlite.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig; 
+	$(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig; 
+	$(INSTALL) -m 0644 sqlite.pc $(DESTDIR)$(libdir)/pkgconfig; 
 
 clean:	
 	rm -f *.lo *.la *.o sqlite at TARGET_EXEEXT@ libsqlite.la sqlite.h opcodes.*

sqlite-2.8.15.rpath.patch:

--- NEW FILE sqlite-2.8.15.rpath.patch ---
--- sqlite/Makefile.in.nos	2004-06-18 14:13:40.127066236 +0200
+++ sqlite/Makefile.in	2004-06-18 14:13:56.241098295 +0200
@@ -192,7 +192,7 @@
 
 libtclsqlite.la:	tclsqlite.lo libsqlite.la
 	$(LTLINK) -o libtclsqlite.la tclsqlite.lo \
-		libsqlite.la $(LIBTCL) -rpath @exec_prefix@/lib/sqlite \
+		libsqlite.la $(LIBTCL) -rpath @exec_prefix@/lib/sqlite-__VERSION__ \
 		-version-info "8:6:8"
 
 sqlite at TARGET_EXEEXT@:	$(TOP)/src/shell.c libsqlite.la sqlite.h

sqlite-2.8.3.test.rh9.patch:

--- NEW FILE sqlite-2.8.3.test.rh9.patch ---
diff -Naur sqlite-orig/test/tester.tcl sqlite/test/tester.tcl
--- sqlite-orig/test/tester.tcl	2003-03-01 20:45:35.000000000 +0100
+++ sqlite/test/tester.tcl	2003-06-28 02:14:03.000000000 +0200
@@ -43,8 +43,10 @@
 # Create a test database
 #
 catch {db close}
-file delete -force test.db
-file delete -force test.db-journal
+#file delete -force test.db
+#file delete -force test.db-journal
+exec rm -fr test.db
+exec rm -fr test.db-journal
 sqlite db ./test.db
 if {[info exists ::SETUP_SQL]} {
   db eval $::SETUP_SQL

sqlite-64bit-fixes.patch:

--- NEW FILE sqlite-64bit-fixes.patch ---
--- sqlite/src/test3.c.64bit-fixes	2004-09-29 10:09:56.249551000 -0400
+++ sqlite/src/test3.c	2004-09-29 11:34:51.314336091 -0400
@@ -19,9 +19,11 @@
 #include "pager.h"
 #include "btree.h"
 #include "tcl.h"
+#include "test-util.h"
 #include <stdlib.h>
 #include <string.h>
 
+
 /*
 ** Interpret an SQLite error number
 */
@@ -98,7 +100,7 @@ static int btree_close(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeClose(pBt);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -125,7 +127,7 @@ static int btree_begin_transaction(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeBeginTrans(pBt);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -152,7 +154,7 @@ static int btree_rollback(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeRollback(pBt);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -179,7 +181,7 @@ static int btree_commit(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeCommit(pBt);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -207,7 +209,7 @@ static int btree_create_table(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeCreateTable(pBt, &iTable);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -237,7 +239,7 @@ static int btree_drop_table(
        " ID TABLENUM\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   if( Tcl_GetInt(interp, argv[2], &iTable) ) return TCL_ERROR;
   rc = sqliteBtreeDropTable(pBt, iTable);
   if( rc!=SQLITE_OK ){
@@ -266,7 +268,7 @@ static int btree_clear_table(
        " ID TABLENUM\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   if( Tcl_GetInt(interp, argv[2], &iTable) ) return TCL_ERROR;
   rc = sqliteBtreeClearTable(pBt, iTable);
   if( rc!=SQLITE_OK ){
@@ -296,7 +298,7 @@ static int btree_get_meta(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeGetMeta(pBt, aMeta);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -333,7 +335,7 @@ static int btree_update_meta(
        " ID METADATA...\" (METADATA is ", zBuf, " integers)", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   for(i=0; i<SQLITE_N_BTREE_META; i++){
     if( Tcl_GetInt(interp, argv[i+2], &aMeta[i]) ) return TCL_ERROR;
   }
@@ -365,7 +367,7 @@ static int btree_page_dump(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   if( Tcl_GetInt(interp, argv[2], &iPage) ) return TCL_ERROR;
   rc = sqliteBtreePageDump(pBt, iPage, 0);
   if( rc!=SQLITE_OK ){
@@ -395,7 +397,7 @@ static int btree_tree_dump(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   if( Tcl_GetInt(interp, argv[2], &iPage) ) return TCL_ERROR;
   rc = sqliteBtreePageDump(pBt, iPage, 1);
   if( rc!=SQLITE_OK ){
@@ -425,7 +427,7 @@ static int btree_pager_stats(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   a = sqlitepager_stats(sqliteBtreePager(pBt));
   for(i=0; i<9; i++){
     static char *zName[] = {
@@ -458,7 +460,7 @@ static int btree_pager_ref_dump(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   sqlitepager_refdump(sqliteBtreePager(pBt));
   return TCL_OK;
 }
@@ -487,7 +489,7 @@ static int btree_integrity_check(
        " ID ROOT ...\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   nRoot = argc-2;
   aRoot = malloc( sizeof(int)*(argc-2) );
   for(i=0; i<argc-2; i++){
@@ -524,7 +526,7 @@ static int btree_cursor(
        " ID TABLENUM WRITEABLE\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
+  pBt = sqliteTextToPtr(argv[1]);
   if( Tcl_GetInt(interp, argv[2], &iTable) ) return TCL_ERROR;
   if( Tcl_GetBoolean(interp, argv[3], &wrFlag) ) return TCL_ERROR;
   rc = sqliteBtreeCursor(pBt, iTable, wrFlag, &pCur);
@@ -556,7 +558,7 @@ static int btree_close_cursor(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeCloseCursor(pCur);
   if( rc ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -586,7 +588,7 @@ static int btree_move_to(
        " ID KEY\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeMoveto(pCur, argv[2], strlen(argv[2]), &res);  
   if( rc ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -618,7 +620,7 @@ static int btree_delete(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeDelete(pCur);
   if( rc ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -647,7 +649,7 @@ static int btree_insert(
        " ID KEY DATA\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeInsert(pCur, argv[2], strlen(argv[2]),
                          argv[3], strlen(argv[3]));
   if( rc ){
@@ -680,7 +682,7 @@ static int btree_next(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeNext(pCur, &res);
   if( rc ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -714,7 +716,7 @@ static int btree_prev(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreePrevious(pCur, &res);
   if( rc ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -747,7 +749,7 @@ static int btree_first(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeFirst(pCur, &res);
   if( rc ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -780,7 +782,7 @@ static int btree_last(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeLast(pCur, &res);
   if( rc ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -812,7 +814,7 @@ static int btree_key(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   sqliteBtreeKeySize(pCur, &n);
   zBuf = malloc( n+1 );
   rc = sqliteBtreeKey(pCur, 0, n, zBuf);
@@ -850,7 +852,7 @@ static int btree_data(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   sqliteBtreeDataSize(pCur, &n);
   zBuf = malloc( n+1 );
   rc = sqliteBtreeData(pCur, 0, n, zBuf);
@@ -887,7 +889,7 @@ static int btree_payload_size(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   sqliteBtreeKeySize(pCur, &n1);
   sqliteBtreeDataSize(pCur, &n2);
   sprintf(zBuf, "%d", n1+n2);
@@ -927,7 +929,7 @@ static int btree_cursor_dump(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pCur) ) return TCL_ERROR;
+  pCur = sqliteTextToPtr(argv[1]);
   rc = sqliteBtreeCursorDump(pCur, aResult);
   if( rc ){
     Tcl_AppendResult(interp, errorName(rc), 0);
--- sqlite/src/test2.c.64bit-fixes	2004-02-09 20:54:28.000000000 -0500
+++ sqlite/src/test2.c	2004-09-29 11:35:00.840257674 -0400
@@ -19,6 +19,7 @@
 #include "sqliteInt.h"
 #include "pager.h"
 #include "tcl.h"
+#include "test-util.h"
 #include <stdlib.h>
 #include <string.h>
 
@@ -104,7 +105,7 @@ static int pager_close(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   rc = sqlitepager_close(pPager);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -131,7 +132,7 @@ static int pager_rollback(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   rc = sqlitepager_rollback(pPager);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -158,7 +159,7 @@ static int pager_commit(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   rc = sqlitepager_commit(pPager);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -185,7 +186,7 @@ static int pager_ckpt_begin(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   rc = sqlitepager_ckpt_begin(pPager);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -212,7 +213,7 @@ static int pager_ckpt_rollback(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   rc = sqlitepager_ckpt_rollback(pPager);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -239,7 +240,7 @@ static int pager_ckpt_commit(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   rc = sqlitepager_ckpt_commit(pPager);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -266,7 +267,7 @@ static int pager_stats(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   a = sqlitepager_stats(pPager);
   for(i=0; i<9; i++){
     static char *zName[] = {
@@ -299,7 +300,7 @@ static int pager_pagecount(
        " ID\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   sprintf(zBuf,"%d",sqlitepager_pagecount(pPager));
   Tcl_AppendResult(interp, zBuf, 0);
   return TCL_OK;
@@ -326,7 +327,7 @@ static int page_get(
        " ID PGNO\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   if( Tcl_GetInt(interp, argv[2], &pgno) ) return TCL_ERROR;
   rc = sqlitepager_get(pPager, pgno, &pPage);
   if( rc!=SQLITE_OK ){
@@ -359,7 +360,7 @@ static int page_lookup(
        " ID PGNO\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPager) ) return TCL_ERROR;
+  pPager = sqliteTextToPtr(argv[1]);
   if( Tcl_GetInt(interp, argv[2], &pgno) ) return TCL_ERROR;
   pPage = sqlitepager_lookup(pPager, pgno);
   if( pPage ){
@@ -387,7 +388,7 @@ static int page_unref(
        " PAGE\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPage) ) return TCL_ERROR;
+  pPage = sqliteTextToPtr(argv[1]);
   rc = sqlitepager_unref(pPage);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
@@ -414,7 +415,7 @@ static int page_read(
        " PAGE\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPage) ) return TCL_ERROR;
+  pPage = sqliteTextToPtr(argv[1]);
   memcpy(zBuf, pPage, sizeof(zBuf));
   Tcl_AppendResult(interp, zBuf, 0);
   return TCL_OK;
@@ -438,7 +439,7 @@ static int page_number(
        " PAGE\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPage) ) return TCL_ERROR;
+  pPage = sqliteTextToPtr(argv[1]);
   sprintf(zBuf, "%d", sqlitepager_pagenumber(pPage));
   Tcl_AppendResult(interp, zBuf, 0);
   return TCL_OK;
@@ -462,7 +463,7 @@ static int page_write(
        " PAGE DATA\"", 0);
     return TCL_ERROR;
   }
-  if( Tcl_GetInt(interp, argv[1], (int*)&pPage) ) return TCL_ERROR;
+  pPage = sqliteTextToPtr(argv[1]);
   rc = sqlitepager_write(pPage);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
--- sqlite/src/test-util.c.64bit-fixes	2004-09-29 11:33:18.838681763 -0400
+++ sqlite/src/test-util.c	2004-09-29 11:35:32.332610359 -0400
@@ -0,0 +1,47 @@
+#include <stdint.h>
+#include <assert.h>
+#include "test-util.h"
+
+/*
+** Translate a single byte of Hex into an integer.
+*/
+static int hexToInt(int h){
+  if( h>='0' && h<='9' ){
+    return h - '0';
+  }else if( h>='a' && h<='f' ){
+    return h - 'a' + 10;
+  }else if( h>='A' && h<='F' ){
+    return h - 'A' + 10;
+  }else{
+    return 0;
+  }
+}
+
+#if defined(SQLITE_TEST)
+/*
+** Convert text generated by the "%p" conversion format back into
+** a pointer.
+*/
+void *sqliteTextToPtr(const char *z){
+  void *p;
+  uint64_t v;
+  uint32_t v2;
+  if( z[0]=='0' && z[1]=='x' ){
+    z += 2;
+  }
+  v = 0;
+  while( *z ){
+    v = (v<<4) + hexToInt(*z);
+    z++;
+  }
+  if( sizeof(p)==sizeof(v) ){
+    p = *(void**)&v;
+  }else{
+    assert( sizeof(p)==sizeof(v2) );
+    v2 = (uint32_t)v;
+    p = *(void**)&v2;
+  }
+  return p;
+}
+#endif
+
--- sqlite/src/test-util.h.64bit-fixes	2004-09-29 11:33:23.513624799 -0400
+++ sqlite/src/test-util.h	2004-09-29 11:34:35.012047569 -0400
@@ -0,0 +1,6 @@
+#ifndef TEST_UTIL_H
+#define TEST_UTIL_H
+
+extern void *sqliteTextToPtr(const char *z);
+
+#endif /* TEST_UTIL_H */
--- sqlite/Makefile.in.64bit-fixes	2004-09-29 09:41:08.011929000 -0400
+++ sqlite/Makefile.in	2004-09-29 11:32:59.441768988 -0400
@@ -142,6 +142,7 @@ SRC = \
 # Source code to the test files.
 #
 TESTSRC = \
+  $(TOP)/src/test-util.c \
   $(TOP)/src/btree.c \
   $(TOP)/src/func.c \
   $(TOP)/src/os.c \


--- NEW FILE sqlite2.spec ---
Name:           sqlite2
Version:        2.8.16
Release:        1

Summary:        Embeddable SQL engine in a C library
Group:          System Environment/Libraries
License:        Public Domain
URL:            http://www.sqlite.org/
Source0:        http://www.sqlite.org/sqlite-%{version}.tar.gz
Patch1:         sqlite-2.8.15.rpath.patch
Patch2:         sqlite-2.8.15-makefile.patch
Patch3:         sqlite-2.8.3.test.rh9.patch
Patch4:         sqlite-64bit-fixes.patch
Patch5:         sqlite-2.8.15-arch-double-differences.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  ncurses-devel readline-devel %{_includedir}/tcl.h
Obsoletes:      sqlite < 3

%description
SQLite is a small, fast, embeddable SQL database engine that supports
most of SQL92, including transactions with atomic commit and rollback,
subqueries, compound queries, triggers, and views. A complete database
is stored in a single cross-platform disk file. The native C/C++ API
is simple and easy to use. Bindings for other languages are also
available.

%package        devel
Summary:        Development files for SQLite
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig
Obsoletes:      sqlite-devel < 3

%description    devel
SQLite is a small, fast, embeddable SQL database engine that supports
most of SQL92, including transactions with atomic commit and rollback,
subqueries, compound queries, triggers, and views.
This package contains static library and header files for developing
applications using sqlite.

%package        tcl
Summary:        Tcl bindings for sqlite
Group:          System Environment/Libraries
Requires:       tcl >= 8.3.3, %{name} = %{version}-%{release}
Obsoletes:      sqlite-tcl < 3

%description    tcl
SQLite is a small, fast, embeddable SQL database engine that supports
most of SQL92, including transactions with atomic commit and rollback,
subqueries, compound queries, triggers, and views.
This package contains tcl bindings for sqlite.

%prep
%setup -q -n sqlite-%{version}
%patch1 -p1 -b .rpath
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
sed -i.rpath 's!__VERSION__!%{version}!g' Makefile.in
# Patch additional /usr/lib locations where we don't have $(libdir)
# to substitute with.
sed -i.lib 's!@exec_prefix@/lib!%{_libdir}!g' Makefile.in

%build
CFLAGS="$RPM_OPT_FLAGS -DNDEBUG=1"
%configure --enable-utf8
make
make tclsqlite libtclsqlite.la doc
#obs. make test doesn't like root
make test

%install
rm -rf $RPM_BUILD_ROOT
DIRECTORY=$RPM_BUILD_ROOT%{_libdir}/sqlite-%version
install -d $DIRECTORY
echo 'package ifneeded sqlite 2 [list load [file join $dir libtclsqlite.so]]' > $DIRECTORY/pkgIndex.tcl

%makeinstall
install -D -m 0644 sqlite.1 $RPM_BUILD_ROOT%{_mandir}/man1/sqlite.1

find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_bindir}/sql*
%{_libdir}/libsql*.so.*
%{_mandir}/man1/*

%files devel
%defattr(-,root,root,-)
%doc README  doc/*
%{_libdir}/libsql*.a
%{_libdir}/libsql*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*

%files tcl
%defattr(-,root,root,-)
%doc doc/tclsqlite.html
%exclude %{_bindir}/tclsqlite
%exclude %{_libdir}/sqlite-%{version}/libtclsqlite.a
%{_libdir}/sqlite-%version

%changelog
* Fri May 20 2005 Ignacio Vazquez-Abrams <ivazquez at ivazquez.net> 2.8.16-1
- Name change to sqlite2
- Dropped Epoch
- Added Obsoletes to all subpackages
- Minor cosmetic changes

* Wed Feb 16 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:2.8.16-1
- Update to 2.8.16 bug-fix release + update patches.

* Tue Feb 15 2005 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 2.8.15-2
- add sqlite-64bit-fixes.patch and sqlite-2.8.15-arch-double-differences.patch
  fixes x86_64; Both were found in a mandrake srpm
- remove exclusive arch ix86; hopefully this fixes ppc also

* Sun Jan 23 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:2.8.15-1
- Add exclusive arch ix86 for now (make test segfaults on x86_64).
- Update makefile patch, $(exec_prefix)/lib -> $(libdir), and
  substitute additional /usr/lib locations in %%prep for multilib
  people to play with.

* Sun Sep 26 2004 Adrian Reber <adrian at lisas.de> - 0:2.8.15-0.fdr.1
- Update to 2.8.15
- Update patches

* Fri Jun 19 2004 Nils O. Selåsdal <NOS at Utel.no> - 0:2.8.14-0.fdr.1
- Update to 2.8.14
- Update patches
- --enable-releasemode
- small spec file tweaks

* Sat Dec 27 2003 Jean-Luc Fontaine <jfontain at free.fr> - 0:2.8.6-0.fdr.6
- in tcl rpm, removed tclsqlite, moved shared library in own sqlite
  sub-directory add added pkgIndex.tcl file to make package dynamically
  loadable in a Tcl interpreter
- in build requirements, work around tcl-devel and tk-devel packages non
  existence in RH 8.0 and 9
- in tcl rpm, added tcl package requirement
- in tcl rpm, post ldconfig is not necessary

* Wed Nov 12 2003 Nils O. Selåsdal <NOS at Utel.no> -  0:2.8.6-0.fdr.5
- BuildRequires tcl-devel
- small .spec tweaks

* Tue Oct 28 2003 Nils O. Selåsdal <NOS at Utel.no> - 0:2.8.6-0.fdr.4
- exclude libtclsqlite.a

* Mon Oct 27 2003 Nils O. Selåsdal <NOS at Utel.no> - 0:2.8.6-0.fdr.3
- Fix readme -> README

* Mon Oct 27 2003 Nils O. Selåsdal <NOS at Utel.no> - 0:2.8.6-0.fdr.2
- Better summary/description
- Add patch for not using rpath
- Add patch that builds tclsqlite (From Anvil's package)
- Add patch that fixes the tests (From Anvil's package)
- New tcl subpackage
- Also make the tests during build
- Build docs, and include them in -devel

* Fri Oct 10 2003 Nils O. Selåsdal <NOS at Utel.no> - 0:2.8.6-0.fdr.1
- Initial RPM release.


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/sqlite2/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	20 May 2005 14:56:38 -0000	1.1
+++ .cvsignore	20 May 2005 14:57:31 -0000	1.2
@@ -0,0 +1 @@
+sqlite-2.8.16.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/sqlite2/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	20 May 2005 14:56:38 -0000	1.1
+++ sources	20 May 2005 14:57:31 -0000	1.2
@@ -0,0 +1 @@
+9c79b461ff30240a6f9d70dd67f8faea  sqlite-2.8.16.tar.gz




More information about the fedora-extras-commits mailing list