sqlite: split dev and bin outputs
This commit is contained in:
parent
e25da7e5c8
commit
90d5e87862
@ -22,12 +22,12 @@ stdenv.mkDerivation rec {
|
|||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
export PGHEADER="${postgresql}/include/libpq-fe.h";
|
export PGHEADER="${postgresql}/include/libpq-fe.h";
|
||||||
export MSHEADER="${mysql.lib}/include/mysql/mysql.h";
|
export MSHEADER="${mysql.lib}/include/mysql/mysql.h";
|
||||||
export SQHEADER="${sqlite}/include/sqlite3.h";
|
export SQHEADER="${sqlite.dev}/include/sqlite3.h";
|
||||||
|
|
||||||
export CCARGS="-I$out/include \
|
export CCARGS="-I$out/include \
|
||||||
-L${mysql.lib}/lib/mysql \
|
-L${mysql.lib}/lib/mysql \
|
||||||
-L${postgresql}/lib \
|
-L${postgresql}/lib \
|
||||||
-L${sqlite}/lib";
|
-L${sqlite.out}/lib";
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Be sure to keep the statically linked libraries
|
# Be sure to keep the statically linked libraries
|
||||||
|
@ -54,7 +54,7 @@ let
|
|||||||
--replace "linklibs = ['tcl' + _ver, 'tk' + _ver]" "linklibs=['${tcl.libPrefix}', '${tk.libPrefix}']" \
|
--replace "linklibs = ['tcl' + _ver, 'tk' + _ver]" "linklibs=['${tcl.libPrefix}', '${tk.libPrefix}']" \
|
||||||
--replace "libdirs = []" "libdirs = ['${tk}/lib', '${tcl}/lib']"
|
--replace "libdirs = []" "libdirs = ['${tk}/lib', '${tcl}/lib']"
|
||||||
|
|
||||||
sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite}/include'], library_dirs=['${sqlite}/lib']@" lib_pypy/_sqlite3_build.py
|
sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite.dev}/include'], library_dirs=['${sqlite.out}/lib']@" lib_pypy/_sqlite3_build.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
@ -89,8 +89,8 @@ in
|
|||||||
|
|
||||||
sqlite3 = attrs: {
|
sqlite3 = attrs: {
|
||||||
buildFlags = [
|
buildFlags = [
|
||||||
"--with-sqlite3-include=${sqlite}/include"
|
"--with-sqlite3-include=${sqlite.dev}/include"
|
||||||
"--with-sqlite3-lib=${sqlite}/lib"
|
"--with-sqlite3-lib=${sqlite.out}/lib"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-pgsql_libdir=${postgresql}/lib"
|
"--with-pgsql_libdir=${postgresql}/lib"
|
||||||
] ++ optionals (sqlite != null) [
|
] ++ optionals (sqlite != null) [
|
||||||
"--with-sqlite3"
|
"--with-sqlite3"
|
||||||
"--with-sqlite3-incdir=${sqlite}/include/sqlite"
|
"--with-sqlite3-incdir=${sqlite.dev}/include/sqlite"
|
||||||
"--with-sqlite3-libdir=${sqlite}/lib/sqlite"
|
"--with-sqlite3-libdir=${sqlite.out}/lib/sqlite"
|
||||||
];
|
];
|
||||||
|
|
||||||
installFlags = [ "DESTDIR=\${out}" ];
|
installFlags = [ "DESTDIR=\${out}" ];
|
||||||
|
@ -10,6 +10,8 @@ stdenv.mkDerivation {
|
|||||||
sha1 = "d0e22d7e361b6f50830a3cdeafe35311443f8f9a";
|
sha1 = "d0e22d7e361b6f50830a3cdeafe35311443f8f9a";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "dev" "out" "bin" ];
|
||||||
|
|
||||||
buildInputs = lib.optionals interactive [ readline ncurses ];
|
buildInputs = lib.optionals interactive [ readline ncurses ];
|
||||||
|
|
||||||
configureFlags = [ "--enable-threadsafe" ];
|
configureFlags = [ "--enable-threadsafe" ];
|
||||||
|
@ -17,6 +17,10 @@ buildPerlPackage rec {
|
|||||||
./external-sqlite.patch
|
./external-sqlite.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sqlite_dev = sqlite.dev;
|
||||||
|
sqlite_out = sqlite.out;
|
||||||
|
postPatch = "substituteAllInPlace Makefile.PL; cat Makefile.PL";
|
||||||
|
|
||||||
preBuild =
|
preBuild =
|
||||||
''
|
''
|
||||||
substituteInPlace Makefile --replace -L/usr/lib ""
|
substituteInPlace Makefile --replace -L/usr/lib ""
|
||||||
|
@ -1,39 +1,33 @@
|
|||||||
diff -rc DBD-SQLite-1.29/Makefile.PL DBD-SQLite-1.29-new/Makefile.PL
|
diff --git a/Makefile.PL b/Makefile.PL
|
||||||
*** DBD-SQLite-1.29/Makefile.PL 2010-01-08 10:08:29.000000000 +0100
|
index 606b28d..0cea060 100644
|
||||||
--- DBD-SQLite-1.29-new/Makefile.PL 2010-08-05 11:42:53.000000000 +0200
|
--- a/Makefile.PL
|
||||||
***************
|
+++ b/Makefile.PL
|
||||||
*** 123,129 ****
|
@@ -128,24 +128,10 @@ SCOPE: {
|
||||||
|
# the system SQLite. We expect that anyone sophisticated enough to use
|
||||||
# a system sqlite is also sophisticated enough to have a patching system
|
# a system sqlite is also sophisticated enough to have a patching system
|
||||||
# that can change the if ( 0 ) to if ( 1 )
|
# that can change the if ( 0 ) to if ( 1 )
|
||||||
my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
|
-my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
|
||||||
! if ( 0 ) {
|
-if ( 0 ) {
|
||||||
require File::Spec;
|
- require File::Spec;
|
||||||
if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
|
- if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
|
||||||
$sqlite_base =~ /=(.*)/;
|
- $sqlite_base =~ /=(.*)/;
|
||||||
--- 123,129 ----
|
- $sqlite_base = $1;
|
||||||
# a system sqlite is also sophisticated enough to have a patching system
|
- $sqlite_lib = File::Spec->catdir( $sqlite_base, 'lib' );
|
||||||
# that can change the if ( 0 ) to if ( 1 )
|
- $sqlite_inc = File::Spec->catdir( $sqlite_base, 'include' );
|
||||||
my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
|
- }
|
||||||
! if ( 1 ) {
|
- if ( $sqlite_local = (grep(/USE_LOCAL_SQLITE=.*/, @ARGV))[0] ) {
|
||||||
require File::Spec;
|
- $sqlite_local =~ /=(.*)/;
|
||||||
if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
|
- $sqlite_local = "$1" ? 1 : 0;
|
||||||
$sqlite_base =~ /=(.*)/;
|
- if ( $sqlite_local ) {
|
||||||
***************
|
- # Keep these from making into CFLAGS/LDFLAGS
|
||||||
*** 184,191 ****
|
- undef $sqlite_lib;
|
||||||
} else {
|
- undef $sqlite_inc;
|
||||||
# Always the bundled one.
|
- }
|
||||||
# XXX: ... and this message should be more informative.
|
- }
|
||||||
! $sqlite_local = 1;
|
+my ($sqlite_local, $sqlite_lib, $sqlite_inc);
|
||||||
! print "We're using the bundled sqlite library.\n" if $ENV{AUTOMATED_TESTING};
|
+if ( 1 ) {
|
||||||
}
|
+ $sqlite_lib = '@sqlite_out@/lib';
|
||||||
|
+ $sqlite_inc = '@sqlite_dev@/include';
|
||||||
|
|
||||||
@ARGV = grep( ! /SQLITE_LOCATION|USE_LOCAL_SQLITE/, @ARGV );
|
# Now check for a compatible sqlite3
|
||||||
--- 184,191 ----
|
unless ( $sqlite_local ) {
|
||||||
} else {
|
|
||||||
# Always the bundled one.
|
|
||||||
# XXX: ... and this message should be more informative.
|
|
||||||
! # $sqlite_local = 1;
|
|
||||||
! # print "We're using the bundled sqlite library.\n" if $ENV{AUTOMATED_TESTING};
|
|
||||||
}
|
|
||||||
|
|
||||||
@ARGV = grep( ! /SQLITE_LOCATION|USE_LOCAL_SQLITE/, @ARGV );
|
|
||||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
PREFIX=\"\" DESTDIR=$out make install
|
PREFIX=\"\" DESTDIR=$out make install
|
||||||
wrapProgram $out/bin/profile-cleaner \
|
wrapProgram $out/bin/profile-cleaner \
|
||||||
--prefix PATH : "${parallel}/bin:${sqlite}/bin"
|
--prefix PATH : "${parallel}/bin:${sqlite.bin}/bin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -28,9 +28,9 @@ stdenv.mkDerivation rec {
|
|||||||
GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite
|
GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite
|
||||||
mkdir -p $GOSQLITE
|
mkdir -p $GOSQLITE
|
||||||
cp -R $srcGoSqlite/* $GOSQLITE/
|
cp -R $srcGoSqlite/* $GOSQLITE/
|
||||||
export CGO_CFLAGS=-I${sqlite}/include
|
export CGO_CFLAGS=-I${sqlite.dev}/include
|
||||||
export CGO_LDFLAGS=-L${sqlite}/lib
|
export CGO_LDFLAGS=-L${sqlite.out}/lib
|
||||||
go build -ldflags "-r ${sqlite}/lib" -o storebrowse
|
go build -ldflags "-r ${sqlite.out}/lib" -o storebrowse
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -8208,7 +8208,7 @@ let
|
|||||||
|
|
||||||
sqlite-amalgamation = callPackage ../development/libraries/sqlite-amalgamation { };
|
sqlite-amalgamation = callPackage ../development/libraries/sqlite-amalgamation { };
|
||||||
|
|
||||||
sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; });
|
sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; }).bin;
|
||||||
|
|
||||||
sqlcipher = lowPrio (callPackage ../development/libraries/sqlcipher {
|
sqlcipher = lowPrio (callPackage ../development/libraries/sqlcipher {
|
||||||
readline = null;
|
readline = null;
|
||||||
|
@ -12294,8 +12294,8 @@ let
|
|||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace "setup.cfg" \
|
substituteInPlace "setup.cfg" \
|
||||||
--replace "/usr/local/include" "${pkgs.sqlite}/include" \
|
--replace "/usr/local/include" "${pkgs.sqlite.dev}/include" \
|
||||||
--replace "/usr/local/lib" "${pkgs.sqlite}/lib"
|
--replace "/usr/local/lib" "${pkgs.sqlite.out}/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# error: invalid command 'test'
|
# error: invalid command 'test'
|
||||||
|
Loading…
Reference in New Issue
Block a user