Adding -fPIC code for static library code in perl and vxl, for x86_64.

svn path=/nixpkgs/trunk/; revision=14526
This commit is contained in:
Lluís Batlle i Rossell 2009-03-13 16:46:10 +00:00
parent 6425d2017d
commit de8bbafb53
2 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,8 @@ stdenv.mkDerivation {
sha256 = "0bivbz15x02m02gqs6hs77cgjr2msfrhnvp5xqk359jg6w6llill"; sha256 = "0bivbz15x02m02gqs6hs77cgjr2msfrhnvp5xqk359jg6w6llill";
}; };
NIX_CFLAGS_COMPILE = if stdenv.system == "x86_64-linux" then "-fPIC" else "";
patches = [ patches = [
# This patch does the following: # This patch does the following:
# 1) Do use the PATH environment variable to find the `pwd' command. # 1) Do use the PATH environment variable to find the `pwd' command.

View File

@ -9,6 +9,12 @@ stdenv.mkDerivation {
buildInputs = [ cmake unzip libtiff expat zlib libpng libjpeg ]; buildInputs = [ cmake unzip libtiff expat zlib libpng libjpeg ];
cmakeFlags = if (stdenv.system == "x86_64-linux") then
"-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC"
else
"";
meta = { meta = {
description = "C++ Libraries for Computer Vision Research and Implementation"; description = "C++ Libraries for Computer Vision Research and Implementation";
homepage = http://vxl.sourceforge.net/; homepage = http://vxl.sourceforge.net/;