uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
48
pkgs/tools/graphics/pfstools/default.nix
Normal file
48
pkgs/tools/graphics/pfstools/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, mkDerivation, fetchurl, cmake, pkg-config, darwin
|
||||
, openexr, zlib, imagemagick6, libGLU, libGL, freeglut, fftwFloat
|
||||
, fftw, gsl, libexif, perl, qtbase, netpbm
|
||||
, enableUnfree ? false, opencv2
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "pfstools";
|
||||
version = "2.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/${version}/${pname}-${version}.tgz";
|
||||
sha256 = "sha256-m/aESYVmMibCGZjutDwmGsuOSziRuakbcpVUQGKJ18o=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "man"];
|
||||
|
||||
cmakeFlags = [ "-DWITH_MATLAB=false" ];
|
||||
|
||||
preConfigure = ''
|
||||
rm cmake/FindNETPBM.cmake
|
||||
echo "SET(NETPBM_LIBRARY `find ${lib.getLib netpbm} -name "*.${stdenv.hostPlatform.extensions.sharedLibrary}*" -type f`)" >> cmake/FindNETPBM.cmake
|
||||
echo "SET(NETPBM_LIBRARIES `find ${lib.getLib netpbm} -name "*.${stdenv.hostPlatform.extensions.sharedLibrary}*" -type f`)" >> cmake/FindNETPBM.cmake
|
||||
echo "SET(NETPBM_INCLUDE_DIR ${lib.getDev netpbm}/include/netpbm)" >> cmake/FindNETPBM.cmake
|
||||
echo "INCLUDE(FindPackageHandleStandardArgs)" >> cmake/FindNETPBM.cmake
|
||||
echo "FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETPBM DEFAULT_MSG NETPBM_LIBRARY NETPBM_INCLUDE_DIR)" >> cmake/FindNETPBM.cmake
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
openexr zlib imagemagick6 fftwFloat
|
||||
fftw gsl libexif perl qtbase netpbm
|
||||
] ++ (if stdenv.isDarwin then (with darwin.apple_sdk.frameworks; [
|
||||
OpenGL GLUT
|
||||
]) else [
|
||||
libGLU libGL freeglut
|
||||
]) ++ lib.optional enableUnfree (opencv2.override { enableUnfree = true; });
|
||||
|
||||
patches = [ ./glut.patch ./threads.patch ./pfstools.patch ./pfsalign.patch ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://pfstools.sourceforge.net/";
|
||||
description = "Toolkit for manipulation of HDR images";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.lgpl2;
|
||||
maintainers = [ maintainers.juliendehos ];
|
||||
};
|
||||
}
|
||||
12
pkgs/tools/graphics/pfstools/glut.patch
Normal file
12
pkgs/tools/graphics/pfstools/glut.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
--- a/src/pfsglview/CMakeLists.txt 2022-04-04 23:21:11.164016369 +0300
|
||||
+++ b/src/pfsglview/CMakeLists.txt 2022-04-04 23:21:32.757878750 +0300
|
||||
@@ -11,8 +11,7 @@
|
||||
|
||||
add_executable(pfsglview pfsglview.cpp picture_io.cpp module.cpp m_histogram.cpp m_status.cpp m_on_screen_display.cpp)
|
||||
|
||||
-# TODO: Use ${GLUT_LIBRARY} instead.
|
||||
-target_link_libraries(pfsglview ${OPENGL_LIBRARIES} ${GLUT_glut_LIBRARY} pfs)
|
||||
+target_link_libraries(pfsglview ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} pfs)
|
||||
|
||||
install (TARGETS pfsglview DESTINATION bin)
|
||||
install (FILES pfsglview.1 DESTINATION ${MAN_DIR})
|
||||
12
pkgs/tools/graphics/pfstools/pfsalign.patch
Normal file
12
pkgs/tools/graphics/pfstools/pfsalign.patch
Normal file
|
|
@ -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}")
|
||||
|
||||
21
pkgs/tools/graphics/pfstools/pfstools.patch
Normal file
21
pkgs/tools/graphics/pfstools/pfstools.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--- a/CMakeLists.txt 2016-05-26 11:31:16.000000000 +0200
|
||||
+++ b/CMakeLists.txt 2016-07-22 19:07:22.074669909 +0200
|
||||
@@ -320,12 +320,12 @@
|
||||
|
||||
# ======== libexif ==========
|
||||
|
||||
-find_package(EXIF)
|
||||
-if( NOT EXIF_FOUND )
|
||||
- message( "EXIF library (libexif) not found. 'pfsalign' will not be compiled" )
|
||||
-else( NOT EXIF_FOUND )
|
||||
- message(STATUS "libexif library found.")
|
||||
-endif( NOT EXIF_FOUND )
|
||||
+find_package( PkgConfig REQUIRED )
|
||||
+pkg_check_modules( MYPKG REQUIRED libexif IlmBase )
|
||||
+if( MYPKG_FOUND )
|
||||
+ message( STATUS "libexif and IlmBase found." )
|
||||
+endif( MYPKG_FOUND )
|
||||
+include_directories( ${MYPKG_INCLUDE_DIRS} )
|
||||
|
||||
# ======== Config and sub dirs ===========
|
||||
|
||||
20
pkgs/tools/graphics/pfstools/threads.patch
Normal file
20
pkgs/tools/graphics/pfstools/threads.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- a/src/fileformat/CMakeLists.txt 2016-05-26 11:31:23.000000000 +0200
|
||||
+++ b/src/fileformat/CMakeLists.txt 2016-07-21 23:19:56.510958771 +0200
|
||||
@@ -53,13 +53,15 @@
|
||||
if( OPENEXR_FOUND )
|
||||
include_directories("${OPENEXR_INCLUDE_DIR}")
|
||||
|
||||
+ find_package (Threads)
|
||||
+
|
||||
add_executable(pfsinexr pfsinexr.cpp "${GETOPT_OBJECT}")
|
||||
- target_link_libraries(pfsinexr pfs ${OPENEXR_LIBRARIES})
|
||||
+ target_link_libraries(pfsinexr pfs ${OPENEXR_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
install (TARGETS pfsinexr DESTINATION bin)
|
||||
install (FILES pfsinexr.1 DESTINATION ${MAN_DIR})
|
||||
|
||||
add_executable(pfsoutexr pfsoutexr.cpp "${GETOPT_OBJECT}")
|
||||
- target_link_libraries(pfsoutexr pfs ${OPENEXR_LIBRARIES})
|
||||
+ target_link_libraries(pfsoutexr pfs ${OPENEXR_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
install (TARGETS pfsoutexr DESTINATION bin)
|
||||
install (FILES pfsoutexr.1 DESTINATION ${MAN_DIR})
|
||||
endif( OPENEXR_FOUND )
|
||||
Loading…
Add table
Add a link
Reference in a new issue