From 1741bb2597a152821474242ad1a9b37a4d171ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 1 Feb 2010 19:55:40 +0000 Subject: [PATCH] Making 'boost' optionally build with -fPIC (with enableStatic, will produce static libraries linkable in a shared object) svn path=/nixpkgs/trunk/; revision=19759 --- pkgs/development/libraries/boost/1.41.0.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/boost/1.41.0.nix b/pkgs/development/libraries/boost/1.41.0.nix index 7b1166fb656..1bd500e270a 100644 --- a/pkgs/development/libraries/boost/1.41.0.nix +++ b/pkgs/development/libraries/boost/1.41.0.nix @@ -5,6 +5,7 @@ , enableMultiThreaded ? true , enableShared ? true , enableStatic ? false +, enablePIC ? false }: let @@ -27,6 +28,8 @@ let (enableShared && enableStatic)) then "tagged" else "system"; + cflags = if (enablePIC) then "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC" else ""; + in stdenv.mkDerivation { @@ -48,7 +51,7 @@ stdenv.mkDerivation { configureScript = "./bootstrap.sh"; 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 = ":"; }