pfstools: 1.8.5 -> 2.0.5

authored by Julien Dehos and committed by Rok Garbas d49902e0 a086b62a

+60 -12
+19 -12
pkgs/tools/graphics/pfstools/default.nix
··· 1 - {stdenv, fetchurl, libtiff, openexr, imagemagick, libjpeg, qt4, mesa, 2 - freeglut, bzip2, libX11, libpng, expat, pkgconfig }: 1 + { stdenv, fetchurl, cmake, pkgconfig, openexr, ilmbase, zlib, imagemagick, mesa, freeglut, fftwFloat, fftw, gsl, libexif, perl, opencv, qt4 }: 3 2 4 3 stdenv.mkDerivation rec { 5 - name = "pfstools-1.8.5"; 4 + name = "pfstools"; 5 + version = "2.0.5"; 6 6 7 7 src = fetchurl { 8 - url = "mirror://sourceforge/pfstools/${name}.tar.gz"; 9 - sha256 = "01kk2r8afrb3vrhm8abfjdhhan97lzpapc4n8w1mpdp3kv9miy9c"; 8 + url = "mirror://sourceforge/${name}/${version}/${name}-${version}.tgz"; 9 + sha256 = "1fyc2c7jzr7k797c2dqyyvapzc3szxwcp48r382yxz2yq558xgd9"; 10 10 }; 11 11 12 - configureFlags = "--with-moc=${qt4}/bin/moc"; 12 + outputs = [ "dev" "out" "doc"]; 13 + 14 + cmakeFlags = '' 15 + -DWITH_MATLAB=false 16 + ''; 17 + 18 + buildInputs = [ openexr zlib imagemagick mesa freeglut fftwFloat fftw gsl libexif perl opencv qt4 ]; 13 19 14 - buildInputs = [ libtiff openexr imagemagick libjpeg qt4 mesa freeglut 15 - bzip2 libX11 libpng expat ]; 20 + nativeBuildInputs = [ cmake pkgconfig ]; 16 21 17 - nativeBuildInputs = [ pkgconfig ]; 22 + patches = [ ./threads.patch ./pfstools.patch ]; 18 23 19 - meta = { 20 - homepage = http://pfstools.sourceforge.net/; 24 + meta = with stdenv.lib; { 25 + homepage = "http://pfstools.sourceforge.net/"; 21 26 description = "Toolkit for manipulation of HDR images"; 22 - license = "GPL"; 27 + platforms = platforms.linux; 28 + license = licenses.lgpl2; 29 + maintainers = [ maintainers.juliendehos ]; 23 30 }; 24 31 }
+21
pkgs/tools/graphics/pfstools/pfstools.patch
··· 1 + --- a/CMakeLists.txt 2016-05-26 11:31:16.000000000 +0200 2 + +++ b/CMakeLists.txt 2016-07-22 19:07:22.074669909 +0200 3 + @@ -320,12 +320,12 @@ 4 + 5 + # ======== libexif ========== 6 + 7 + -find_package(EXIF) 8 + -if( NOT EXIF_FOUND ) 9 + - message( "EXIF library (libexif) not found. 'pfsalign' will not be compiled" ) 10 + -else( NOT EXIF_FOUND ) 11 + - message(STATUS "libexif library found.") 12 + -endif( NOT EXIF_FOUND ) 13 + +find_package( PkgConfig REQUIRED ) 14 + +pkg_check_modules( MYPKG REQUIRED libexif IlmBase ) 15 + +if( MYPKG_FOUND ) 16 + + message( STATUS "libexif and IlmBase found." ) 17 + +endif( MYPKG_FOUND ) 18 + +include_directories( ${MYPKG_INCLUDE_DIRS} ) 19 + 20 + # ======== Config and sub dirs =========== 21 +
+20
pkgs/tools/graphics/pfstools/threads.patch
··· 1 + --- a/src/fileformat/CMakeLists.txt 2016-05-26 11:31:23.000000000 +0200 2 + +++ b/src/fileformat/CMakeLists.txt 2016-07-21 23:19:56.510958771 +0200 3 + @@ -53,13 +53,15 @@ 4 + if( OPENEXR_FOUND ) 5 + include_directories("${OPENEXR_INCLUDE_DIR}") 6 + 7 + + find_package (Threads) 8 + + 9 + add_executable(pfsinexr pfsinexr.cpp "${GETOPT_OBJECT}") 10 + - target_link_libraries(pfsinexr pfs ${OPENEXR_LIBRARIES}) 11 + + target_link_libraries(pfsinexr pfs ${OPENEXR_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) 12 + install (TARGETS pfsinexr DESTINATION bin) 13 + install (FILES pfsinexr.1 DESTINATION ${MAN_DIR}) 14 + 15 + add_executable(pfsoutexr pfsoutexr.cpp "${GETOPT_OBJECT}") 16 + - target_link_libraries(pfsoutexr pfs ${OPENEXR_LIBRARIES}) 17 + + target_link_libraries(pfsoutexr pfs ${OPENEXR_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) 18 + install (TARGETS pfsoutexr DESTINATION bin) 19 + install (FILES pfsoutexr.1 DESTINATION ${MAN_DIR}) 20 + endif( OPENEXR_FOUND )