From 8ca3cad711bf54136d6d11e2419cdf14025c3f1f Mon Sep 17 00:00:00 2001 From: Julien Dehos Date: Sat, 2 Nov 2019 19:00:39 +0100 Subject: [PATCH] pfstools: build pfsalign (fix #60843) (#61050) --- pkgs/tools/graphics/pfstools/default.nix | 12 ++++++++---- pkgs/tools/graphics/pfstools/pfsalign.patch | 12 ++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 pkgs/tools/graphics/pfstools/pfsalign.patch diff --git a/pkgs/tools/graphics/pfstools/default.nix b/pkgs/tools/graphics/pfstools/default.nix index 08c5f308f5c1..d145870fbbe2 100644 --- a/pkgs/tools/graphics/pfstools/default.nix +++ b/pkgs/tools/graphics/pfstools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, pkgconfig +{ stdenv, fetchurl, cmake, pkgconfig, darwin , openexr, zlib, imagemagick, libGLU_combined, freeglut, fftwFloat , fftw, gsl, libexif, perl, opencv, qt5 }: @@ -20,11 +20,15 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ - openexr zlib imagemagick libGLU_combined freeglut fftwFloat + openexr zlib imagemagick fftwFloat fftw gsl libexif perl opencv qt5.qtbase - ]; + ] ++ (if stdenv.isDarwin then (with darwin.apple_sdk.frameworks; [ + OpenGL GLUT + ]) else [ + libGLU_combined freeglut + ]); - patches = [ ./threads.patch ./pfstools.patch ]; + patches = [ ./threads.patch ./pfstools.patch ./pfsalign.patch ]; meta = with stdenv.lib; { homepage = http://pfstools.sourceforge.net/; diff --git a/pkgs/tools/graphics/pfstools/pfsalign.patch b/pkgs/tools/graphics/pfstools/pfsalign.patch new file mode 100644 index 000000000000..f079415ddcba --- /dev/null +++ b/pkgs/tools/graphics/pfstools/pfsalign.patch @@ -0,0 +1,12 @@ +--- a/src/camera/CMakeLists.txt 2017-11-13 18:38:27.000000000 +0100 ++++ b/src/camera/CMakeLists.txt 2018-12-30 14:55:30.235571520 +0100 +@@ -9,7 +9,7 @@ target_link_libraries(${TRG} pfs) + install (TARGETS ${TRG} DESTINATION bin) + install (FILES ${TRG}.1 DESTINATION ${MAN_DIR}) + +-if( OpenCV_FOUND AND EXIF_FOUND ) ++if( OpenCV_FOUND AND MYPKG_FOUND ) + + set(TRG pfsalign) + add_executable(${TRG} ${TRG}.cpp "${GETOPT_OBJECT}") +