diff options
author | 2011-02-27 18:21:04 +0000 | |
---|---|---|
committer | 2011-02-27 18:21:04 +0000 | |
commit | cbb84ed8611501794be8d06cff995b8e990241b2 (patch) | |
tree | f42800729e30500f7106bab02d6243dd50b8bdd3 /dev-db | |
parent | stable ppc, bug 355275 (diff) | |
download | gentoo-2-cbb84ed8611501794be8d06cff995b8e990241b2.tar.gz gentoo-2-cbb84ed8611501794be8d06cff995b8e990241b2.tar.bz2 gentoo-2-cbb84ed8611501794be8d06cff995b8e990241b2.zip |
Fix building with SQLITE_OMIT_WAL defined (bug #353967).
(Portage version: 2.2.0_alpha25_p9/cvs/Linux x86_64)
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/sqlite/ChangeLog | 6 | ||||
-rw-r--r-- | dev-db/sqlite/files/sqlite-3.7.5-SQLITE_OMIT_WAL.patch | 63 | ||||
-rw-r--r-- | dev-db/sqlite/sqlite-3.7.5.ebuild | 3 |
3 files changed, 70 insertions, 2 deletions
diff --git a/dev-db/sqlite/ChangeLog b/dev-db/sqlite/ChangeLog index b190620bd302..799624207e66 100644 --- a/dev-db/sqlite/ChangeLog +++ b/dev-db/sqlite/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-db/sqlite # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/ChangeLog,v 1.361 2011/02/27 12:01:59 klausman Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/ChangeLog,v 1.362 2011/02/27 18:21:04 arfrever Exp $ + + 27 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + sqlite-3.7.5.ebuild, +files/sqlite-3.7.5-SQLITE_OMIT_WAL.patch: + Fix building with SQLITE_OMIT_WAL defined (bug #353967). 27 Feb 2011; Tobias Klausmann <klausman@gentoo.org> sqlite-3.7.3.ebuild: Stable on alpha, bug #348079 diff --git a/dev-db/sqlite/files/sqlite-3.7.5-SQLITE_OMIT_WAL.patch b/dev-db/sqlite/files/sqlite-3.7.5-SQLITE_OMIT_WAL.patch new file mode 100644 index 000000000000..e49585643db8 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.7.5-SQLITE_OMIT_WAL.patch @@ -0,0 +1,63 @@ +http://www.sqlite.org/src/ci/b9b48dd8dd + +--- src/pager.c ++++ src/pager.c +@@ -2851,6 +2851,28 @@ + return rc; + } + ++/* ++** Update the value of the change-counter at offsets 24 and 92 in ++** the header and the sqlite version number at offset 96. ++** ++** This is an unconditional update. See also the pager_incr_changecounter() ++** routine which only updates the change-counter if the update is actually ++** needed, as determined by the pPager->changeCountDone state variable. ++*/ ++static void pager_write_changecounter(PgHdr *pPg){ ++ u32 change_counter; ++ ++ /* Increment the value just read and write it back to byte 24. */ ++ change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1; ++ put32bits(((char*)pPg->pData)+24, change_counter); ++ ++ /* Also store the SQLite version number in bytes 96..99 and in ++ ** bytes 92..95 store the change counter for which the version number ++ ** is valid. */ ++ put32bits(((char*)pPg->pData)+92, change_counter); ++ put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER); ++} ++ + #ifndef SQLITE_OMIT_WAL + /* + ** This function is invoked once for each page that has already been +@@ -2921,29 +2943,6 @@ + return rc; + } + +- +-/* +-** Update the value of the change-counter at offsets 24 and 92 in +-** the header and the sqlite version number at offset 96. +-** +-** This is an unconditional update. See also the pager_incr_changecounter() +-** routine which only updates the change-counter if the update is actually +-** needed, as determined by the pPager->changeCountDone state variable. +-*/ +-static void pager_write_changecounter(PgHdr *pPg){ +- u32 change_counter; +- +- /* Increment the value just read and write it back to byte 24. */ +- change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1; +- put32bits(((char*)pPg->pData)+24, change_counter); +- +- /* Also store the SQLite version number in bytes 96..99 and in +- ** bytes 92..95 store the change counter for which the version number +- ** is valid. */ +- put32bits(((char*)pPg->pData)+92, change_counter); +- put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER); +-} +- + /* + ** This function is a wrapper around sqlite3WalFrames(). As well as logging + ** the contents of the list of pages headed by pList (connected by pDirty), diff --git a/dev-db/sqlite/sqlite-3.7.5.ebuild b/dev-db/sqlite/sqlite-3.7.5.ebuild index 534d69c14165..ad525ed6a4cb 100644 --- a/dev-db/sqlite/sqlite-3.7.5.ebuild +++ b/dev-db/sqlite/sqlite-3.7.5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/sqlite-3.7.5.ebuild,v 1.1 2011/02/06 14:03:29 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/sqlite-3.7.5.ebuild,v 1.2 2011/02/27 18:21:04 arfrever Exp $ EAPI="3" @@ -51,6 +51,7 @@ src_prepare() { else epatch "${FILESDIR}/${P}-utimes.patch" epatch "${FILESDIR}/${PN}-3.6.22-dlopen.patch" + epatch "${FILESDIR}/${P}-SQLITE_OMIT_WAL.patch" fi eautoreconf |