mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
opencv 2.1: fixing the build
Related to libpng versions, and the gcc change (ptrdiff_t vs std::ptrdiff_t)
This commit is contained in:
parent
6389fcdbde
commit
cace272941
@ -9,11 +9,17 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "26061fd52ab0ab593c093ff94b5f5c09b956d7deda96b47019ff11932111397f";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake gtk glib libjpeg libpng libtiff jasper ffmpeg pkgconfig
|
||||
# The order is important; libpng should go before X libs, because they
|
||||
# propagate the libpng 1.5 (and opencv wants libpng 1.2)
|
||||
buildInputs = [ cmake libpng gtk glib libjpeg libtiff jasper ffmpeg pkgconfig
|
||||
xineLib gstreamer ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's/ptrdiff_t/std::ptrdiff_t/' include/opencv/*
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D__STDC_CONSTANT_MACROS "
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user