diff options
author | Timothy Redaelli <drizzt@gentoo.org> | 2009-02-03 15:11:55 +0000 |
---|---|---|
committer | Timothy Redaelli <drizzt@gentoo.org> | 2009-02-03 15:11:55 +0000 |
commit | 9049391529c0f2fde459ac4a5ddb85ffa3a07f11 (patch) | |
tree | b7c8ee8c73a2d727eb7b6ee13d8ed8865c6de345 /dev-db | |
parent | Fix init with final version. Thanks to UberLord. (diff) | |
download | gentoo-2-9049391529c0f2fde459ac4a5ddb85ffa3a07f11.tar.gz gentoo-2-9049391529c0f2fde459ac4a5ddb85ffa3a07f11.tar.bz2 gentoo-2-9049391529c0f2fde459ac4a5ddb85ffa3a07f11.zip |
Don't use sqlite internal functions wrt bug #227215
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/sqlitebrowser/ChangeLog | 9 | ||||
-rw-r--r-- | dev-db/sqlitebrowser/files/sqlitebrowser-1.3-sqlite-deprecated.patch | 76 | ||||
-rw-r--r-- | dev-db/sqlitebrowser/sqlitebrowser-1.3.ebuild | 9 |
3 files changed, 87 insertions, 7 deletions
diff --git a/dev-db/sqlitebrowser/ChangeLog b/dev-db/sqlitebrowser/ChangeLog index 94e54340b597..8c10454270fa 100644 --- a/dev-db/sqlitebrowser/ChangeLog +++ b/dev-db/sqlitebrowser/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-db/sqlitebrowser -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlitebrowser/ChangeLog,v 1.5 2008/07/27 20:16:22 carlo Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlitebrowser/ChangeLog,v 1.6 2009/02/03 15:11:55 drizzt Exp $ + + 03 Feb 2009; <drizzt@gentoo.org> + +files/sqlitebrowser-1.3-sqlite-deprecated.patch, + sqlitebrowser-1.3.ebuild: + Don't use sqlite internal functions wrt bug #227215 27 Jul 2008; Carsten Lohrke <carlo@gentoo.org> sqlitebrowser-1.3.ebuild: QA: Get rid of deprecated qt_min_version(). diff --git a/dev-db/sqlitebrowser/files/sqlitebrowser-1.3-sqlite-deprecated.patch b/dev-db/sqlitebrowser/files/sqlitebrowser-1.3-sqlite-deprecated.patch new file mode 100644 index 000000000000..567db7b77d8a --- /dev/null +++ b/dev-db/sqlitebrowser/files/sqlitebrowser-1.3-sqlite-deprecated.patch @@ -0,0 +1,76 @@ +Common subdirectories: sqlitebrowser.orig/.moc and sqlitebrowser/.moc +Common subdirectories: sqlitebrowser.orig/.obj and sqlitebrowser/.obj +Common subdirectories: sqlitebrowser.orig/.ui and sqlitebrowser/.ui +Common subdirectories: sqlitebrowser.orig/CVS and sqlitebrowser/CVS +Common subdirectories: sqlitebrowser.orig/images and sqlitebrowser/images +diff -u sqlitebrowser.orig/sqlbrowser_util.c sqlitebrowser/sqlbrowser_util.c +--- sqlitebrowser.orig/sqlbrowser_util.c 2009-02-03 11:34:57.000000000 +0100 ++++ sqlitebrowser/sqlbrowser_util.c 2009-02-03 11:46:25.000000000 +0100 +@@ -3,7 +3,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +- ++#include <stdint.h> + + /*following routines extracted from shell.c for dump support*/ + +@@ -23,6 +23,40 @@ + #define ArraySize(X) (sizeof(X)/sizeof(X[0])) + + /* ++** Return TRUE if z is a pure numeric string. Return FALSE if the ++** string contains any character which is not part of a number. If ++** the string is numeric and contains the '.' character, set *realnum ++** to TRUE (otherwise FALSE). ++** ++** An empty string is considered non-numeric. ++*/ ++static int _isNumber(const char *z, int *realnum, uint8_t enc){ ++ int incr = (enc==SQLITE_UTF8?1:2); ++ if( enc==SQLITE_UTF16BE ) z++; ++ if( *z=='-' || *z=='+' ) z += incr; ++ if( !isdigit(*(uint8_t*)z) ){ ++ return 0; ++ } ++ z += incr; ++ if( realnum ) *realnum = 0; ++ while( isdigit(*(uint8_t*)z) ){ z += incr; } ++ if( *z=='.' ){ ++ z += incr; ++ if( !isdigit(*(uint8_t*)z) ) return 0; ++ while( isdigit(*(uint8_t*)z) ){ z += incr; } ++ if( realnum ) *realnum = 1; ++ } ++ if( *z=='e' || *z=='E' ){ ++ z += incr; ++ if( *z=='+' || *z=='-' ) z += incr; ++ if( !isdigit(*(uint8_t*)z) ) return 0; ++ while( isdigit(*(uint8_t*)z) ){ z += incr; } ++ if( realnum ) *realnum = 1; ++ } ++ return *z==0; ++} ++ ++/* + ** Output the given string as a quoted string using SQL quoting conventions. + */ + static void output_quoted_string(FILE *out, const char *z){ +@@ -192,7 +226,7 @@ + char *zSep = i>0 ? ",": ""; + if( azArg[i]==0 ){ + fprintf(p->out,"%sNULL",zSep); +- }else if( sqlite3IsNumber(azArg[i], NULL, SQLITE_UTF8) ){ ++ }else if( _isNumber(azArg[i], NULL, SQLITE_UTF8) ){ + fprintf(p->out,"%s%s",zSep, azArg[i]); + }else{ + if( zSep[0] ) fprintf(p->out,"%s",zSep); +@@ -350,7 +384,7 @@ + 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; diff --git a/dev-db/sqlitebrowser/sqlitebrowser-1.3.ebuild b/dev-db/sqlitebrowser/sqlitebrowser-1.3.ebuild index ee8c89be03c9..891a8b027b66 100644 --- a/dev-db/sqlitebrowser/sqlitebrowser-1.3.ebuild +++ b/dev-db/sqlitebrowser/sqlitebrowser-1.3.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlitebrowser/sqlitebrowser-1.3.ebuild,v 1.5 2008/07/27 20:16:22 carlo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlitebrowser/sqlitebrowser-1.3.ebuild,v 1.6 2009/02/03 15:11:55 drizzt Exp $ EAPI=1 @@ -27,10 +27,9 @@ src_unpack() { sed -i 's/\r/\n/g' *.{cpp,h} - # I hate qt designer! - has_version "=x11-libs/qt-3.3*" && sed -i '1s/UI version="3.2"/UI version="3.3"/' - epatch "${FILESDIR}"/${P}-externalsqlite.patch + # Don't use internal sqlite3 function wrt #227215 + epatch "${FILESDIR}"/${P}-sqlite-deprecated.patch } src_compile() { |