tweak things a bit more to use the system sqlite3 (e.g., stop fucking around
with internal functions)
This commit is contained in:
parent
5815152193
commit
d3edd1fbf8
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.6 2009/08/14 12:44:26 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.7 2009/08/28 07:57:03 espie Exp $
|
||||
|
||||
COMMENT= graphical interface to sqlite databases
|
||||
DISTNAME= sqlitebrowser-1.3
|
||||
PKGNAME= ${DISTNAME}p2
|
||||
PKGNAME= ${DISTNAME}p3
|
||||
DISTFILES= ${DISTNAME}-src.tar.gz
|
||||
WRKDIST= ${WRKDIR}/sqlitebrowser
|
||||
CATEGORIES= databases x11
|
||||
@ -13,6 +13,7 @@ MODULES= x11/qt3
|
||||
NO_REGRESS= Yes
|
||||
USE_X11= Yes
|
||||
|
||||
LIB_DEPENDS += sqlite3::databases/sqlite3
|
||||
WANTLIB= Xext m X11 c pthread pthread-stubs stdc++ xcb
|
||||
|
||||
# Special: files are macintosh encoded.
|
||||
|
@ -0,0 +1,56 @@
|
||||
$OpenBSD: patch-sqlitebrowser_sqlbrowser_util_c,v 1.1 2009/08/28 07:57:03 espie Exp $
|
||||
--- sqlitebrowser/sqlbrowser_util.c.orig Fri Aug 28 09:51:37 2009
|
||||
+++ sqlitebrowser/sqlbrowser_util.c Fri Aug 28 09:54:10 2009
|
||||
@@ -53,6 +53,34 @@ static void output_quoted_string(FILE *out, const char
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
+int myIsNumber(const char *z, int *realnum, u8 enc){
|
||||
+ int incr = (enc==SQLITE_UTF8?1:2);
|
||||
+ if( enc==SQLITE_UTF16BE ) z++;
|
||||
+ if( *z=='-' || *z=='+' ) z += incr;
|
||||
+ if( !isdigit(*(u8*)z) ){
|
||||
+ return 0;
|
||||
+ }
|
||||
+ z += incr;
|
||||
+ if( realnum ) *realnum = 0;
|
||||
+ while( isdigit(*(u8*)z) ){ z += incr; }
|
||||
+ if( *z=='.' ){
|
||||
+ z += incr;
|
||||
+ if( !isdigit(*(u8*)z) ) return 0;
|
||||
+ while( isdigit(*(u8*)z) ){ z += incr; }
|
||||
+ if( realnum ) *realnum = 1;
|
||||
+ }
|
||||
+ if( *z=='e' || *z=='E' ){
|
||||
+ z += incr;
|
||||
+ if( *z=='+' || *z=='-' ) z += incr;
|
||||
+ if( !isdigit(*(u8*)z) ) return 0;
|
||||
+ while( isdigit(*(u8*)z) ){ z += incr; }
|
||||
+ if( realnum ) *realnum = 1;
|
||||
+ }
|
||||
+ return *z==0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*
|
||||
** Output the given string with characters that are special to
|
||||
** HTML escaped.
|
||||
@@ -193,7 +221,7 @@ static int callback(void *pArg, int nArg, char **azArg
|
||||
char *zSep = i>0 ? ",": "";
|
||||
if( azArg[i]==0 ){
|
||||
fprintf(p->out,"%sNULL",zSep);
|
||||
- }else if( sqlite3IsNumber(azArg[i], NULL, SQLITE_UTF8) ){
|
||||
+ }else if( myIsNumber(azArg[i], NULL, SQLITE_UTF8) ){
|
||||
fprintf(p->out,"%s%s",zSep, azArg[i]);
|
||||
}else{
|
||||
if( zSep[0] ) fprintf(p->out,"%s",zSep);
|
||||
@@ -351,7 +379,7 @@ static int _all_whitespace(const char *z){
|
||||
static int _is_command_terminator(const char *zLine){
|
||||
while( isspace(*zLine) ){ zLine++; };
|
||||
if( zLine[0]=='/' && _all_whitespace(&zLine[1]) ) return 1; /* Oracle */
|
||||
- if( sqlite3StrNICmp(zLine,"go",2)==0 && _all_whitespace(&zLine[2]) ){
|
||||
+ if( strncasecmp(zLine,"go",2)==0 && _all_whitespace(&zLine[2]) ){
|
||||
return 1; /* SQL Server */
|
||||
}
|
||||
return 0;
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-sqlitebrowser_sqlitebrowser_pro,v 1.1 2009/08/28 07:57:03 espie Exp $
|
||||
--- sqlitebrowser/sqlitebrowser.pro.orig Fri Aug 28 09:42:02 2009
|
||||
+++ sqlitebrowser/sqlitebrowser.pro Fri Aug 28 09:44:41 2009
|
||||
@@ -47,7 +47,7 @@ unix {
|
||||
UI_DIR = .ui
|
||||
MOC_DIR = .moc
|
||||
OBJECTS_DIR = .obj
|
||||
- LIBS += ./sqlite_source/libsqlite_source.a
|
||||
+ LIBS += -lsqlite3
|
||||
}
|
||||
win32 {
|
||||
RC_FILE = winapp.rc
|
12
databases/sqlitebrowser/patches/patch-sqlitedbbrowser_pro
Normal file
12
databases/sqlitebrowser/patches/patch-sqlitedbbrowser_pro
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-sqlitedbbrowser_pro,v 1.1 2009/08/28 07:57:03 espie Exp $
|
||||
--- sqlitedbbrowser.pro.orig Fri Aug 28 09:42:53 2009
|
||||
+++ sqlitedbbrowser.pro Fri Aug 28 09:42:57 2009
|
||||
@@ -1,7 +1,6 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
-SUBDIRS = sqlitebrowser/sqlite_source \
|
||||
- sqlitebrowser
|
||||
+SUBDIRS = sqlitebrowser
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user