diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-08-12 17:03:43 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-08-12 17:03:43 +0000 |
commit | 622bd348ef3deb4307b00f75675260d75cb25137 (patch) | |
tree | bdd6f45a7aacd7a375d2e5b57223a9cb7f18a60c /dev-db/sqlite/files | |
parent | fixed build fail with kde 4 installed (diff) | |
download | gentoo-2-622bd348ef3deb4307b00f75675260d75cb25137.tar.gz gentoo-2-622bd348ef3deb4307b00f75675260d75cb25137.tar.bz2 gentoo-2-622bd348ef3deb4307b00f75675260d75cb25137.zip |
Don't rebuild SQLite in src_install().
(Portage version: 14014-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-db/sqlite/files')
-rw-r--r-- | dev-db/sqlite/files/sqlite-3.6.17-fix_installation.patch | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/dev-db/sqlite/files/sqlite-3.6.17-fix_installation.patch b/dev-db/sqlite/files/sqlite-3.6.17-fix_installation.patch new file mode 100644 index 000000000000..2b6c2ab405af --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.6.17-fix_installation.patch @@ -0,0 +1,116 @@ +https://www.sqlite.org/cvstrac/tktview?tn=4016 + +--- Makefile.in ++++ Makefile.in +@@ -683,8 +683,7 @@ + $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/status.c + + sqlite3.h: $(TOP)/src/sqlite.h.in +- sed -e s/--VERS--/$(RELEASE)/ $(TOP)/src/sqlite.h.in | \ +- sed -e s/--VERSION-NUMBER--/$(VERSION_NUMBER)/ >sqlite3.h ++ cat $(TOP)/src/sqlite.h.in | tclsh $(TOP)/tool/mksqlite3h.tcl `cat ${TOP}/VERSION` > sqlite3.h + + table.lo: $(TOP)/src/table.c $(HDR) + $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/table.c +--- main.mk ++++ main.mk +@@ -389,9 +389,7 @@ + awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h + + sqlite3.h: $(TOP)/src/sqlite.h.in +- sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \ +- -e s/--VERSION-NUMBER--/`cat ${TOP}/VERSION | sed 's/[^0-9]/ /g' | $(NAWK) '{printf "%d%03d%03d",$$1,$$2,$$3}'`/ \ +- $(TOP)/src/sqlite.h.in >sqlite3.h ++ cat $(TOP)/src/sqlite.h.in | tclsh $(TOP)/tool/mksqlite3h.tcl `cat ${TOP}/VERSION` > sqlite3.h + + keywordhash.h: $(TOP)/tool/mkkeywordhash.c + $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c +--- tool/mksqlite3c.tcl ++++ tool/mksqlite3c.tcl +@@ -305,36 +305,3 @@ + + close $out + +-# This block overwrites the copy of sqlite3.h in the current directory. +-# +-# It copies tsrc/sqlite3.h to ./sqlite3.h, adding SQLITE_API in front of the +-# API functions and global variables as it goes. +-# +-set fd_in [open tsrc/sqlite3.h r] +-set fd_out [open sqlite3.h w] +-while {![eof $fd_in]} { +- set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+sqlite3_[_a-zA-Z0-9]+(\[|;| =)} +- set declpattern {^ *[a-zA-Z][a-zA-Z_0-9 ]+ \**sqlite3_[_a-zA-Z0-9]+\(} +- +- set line [gets $fd_in] +- if {[regexp {define SQLITE_EXTERN extern} $line]} { +- puts $fd_out $line +- puts $fd_out [gets $fd_in] +- puts $fd_out "" +- puts $fd_out "#ifndef SQLITE_API" +- puts $fd_out "# define SQLITE_API" +- puts $fd_out "#endif" +- set line "" +- } +- +- if {([regexp $varpattern $line] && ![regexp {^ *typedef} $line]) +- || ([regexp $declpattern $line]) +- } { +- set line "SQLITE_API $line" +- } +- puts $fd_out $line +-} +-close $fd_out +-close $fd_in +- +- +--- tool/mksqlite3h.tcl ++++ tool/mksqlite3h.tcl +@@ -0,0 +1,47 @@ ++#!/usr/bin/tclsh ++# ++# This script performs processing on src/sqlite.h.in. It: ++# ++# 1) Adds SQLITE_EXTERN in front of the declaration of global variables, ++# 2) Adds SQLITE_API in front of the declaration of API functions, ++# 3) Replaces the string --VERS-- with the current library version, ++# formatted as a string (e.g. "3.6.17"), and ++# 4) Replaces the string --VERSION-NUMBER-- with current library version, ++# formatted as an integer (e.g. "3006017"). ++# ++# This script reads from stdin, and outputs to stdout. The current library ++# version number should be passed as the only argument. Example invocation: ++# ++# cat sqlite.h.in | mksqlite3h.tcl 3.6.17 > sqlite3.h ++# ++ ++set zVersion [lindex $argv 0] ++set nVersion [eval format "%d%03d%03d" [split $zVersion .]] ++ ++while {![eof stdin]} { ++ set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+sqlite3_[_a-zA-Z0-9]+(\[|;| =)} ++ set declpattern {^ *[a-zA-Z][a-zA-Z_0-9 ]+ \**sqlite3_[_a-zA-Z0-9]+\(} ++ ++ set line [gets stdin] ++ ++ regsub -- --VERS-- $line $zVersion line ++ regsub -- --VERSION-NUMBER-- $line $nVersion line ++ ++ if {[regexp {define SQLITE_EXTERN extern} $line]} { ++ puts $line ++ puts [gets stdin] ++ puts "" ++ puts "#ifndef SQLITE_API" ++ puts "# define SQLITE_API" ++ puts "#endif" ++ set line "" ++ } ++ ++ if {([regexp $varpattern $line] && ![regexp {^ *typedef} $line]) ++ || ([regexp $declpattern $line]) ++ } { ++ set line "SQLITE_API $line" ++ } ++ puts $line ++} ++ |