Making 'boost' optionally build with -fPIC (with enableStatic, will produce

static libraries linkable in a shared object)


svn path=/nixpkgs/trunk/; revision=19759
This commit is contained in:
Lluís Batlle i Rossell 2010-02-01 19:55:40 +00:00
parent 936f161c00
commit 1741bb2597

View File

@ -5,6 +5,7 @@
, enableMultiThreaded ? true , enableMultiThreaded ? true
, enableShared ? true , enableShared ? true
, enableStatic ? false , enableStatic ? false
, enablePIC ? false
}: }:
let let
@ -27,6 +28,8 @@ let
(enableShared && enableStatic)) then (enableShared && enableStatic)) then
"tagged" else "system"; "tagged" else "system";
cflags = if (enablePIC) then "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC" else "";
in in
stdenv.mkDerivation { stdenv.mkDerivation {
@ -48,7 +51,7 @@ stdenv.mkDerivation {
configureScript = "./bootstrap.sh"; configureScript = "./bootstrap.sh";
configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python"; configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python";
buildPhase = "./bjam -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant} threading=${threading} link=${link} install"; buildPhase = "./bjam -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant} threading=${threading} link=${link} ${cflags} install";
installPhase = ":"; installPhase = ":";
} }