about summary refs log tree commit diff
path: root/pkgs/tools/graphics/pfstools
diff options
context:
space:
mode:
authorAlexander Shpilkin <ashpilkin@gmail.com>2022-04-04 23:51:27 +0300
committerAlexander Shpilkin <ashpilkin@gmail.com>2022-04-04 23:51:27 +0300
commit1cd122e7b6e404dbda80704774ad1d180f02cde6 (patch)
treef2517b87344537c72bd51c6b6225ff8073280fa8 /pkgs/tools/graphics/pfstools
parent8866ccbe1fc5f7105aa7d47831c907fc93758bcb (diff)
pfstools: fix build of pfsglview with newer cmake
The CMake build configuration for pfsglview used an internal variable,
GLUT_glut_LIBRARY, to link with GLUT, which seems to have stopped
working when CMake was bumped from 3.21 in 3.22 in nixpkgs#147818. Use
the officially documented GLUT_LIBRARIES instead.
Diffstat (limited to 'pkgs/tools/graphics/pfstools')
-rw-r--r--pkgs/tools/graphics/pfstools/default.nix2
-rw-r--r--pkgs/tools/graphics/pfstools/glut.patch12
2 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/tools/graphics/pfstools/default.nix b/pkgs/tools/graphics/pfstools/default.nix
index d815b6ac83e2c..2bc40f1cc7889 100644
--- a/pkgs/tools/graphics/pfstools/default.nix
+++ b/pkgs/tools/graphics/pfstools/default.nix
@@ -36,7 +36,7 @@ mkDerivation rec {
     libGLU libGL freeglut
   ]) ++ lib.optional enableUnfree (opencv2.override { enableUnfree = true; });
 
-  patches = [ ./threads.patch ./pfstools.patch ./pfsalign.patch ];
+  patches = [ ./glut.patch ./threads.patch ./pfstools.patch ./pfsalign.patch ];
 
   meta = with lib; {
     homepage = "http://pfstools.sourceforge.net/";
diff --git a/pkgs/tools/graphics/pfstools/glut.patch b/pkgs/tools/graphics/pfstools/glut.patch
new file mode 100644
index 0000000000000..b540b5ebc6a6e
--- /dev/null
+++ b/pkgs/tools/graphics/pfstools/glut.patch
@@ -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})