Description: Build without non-free lena images
Author: Axel Beckert <abe@debian.org>
Bug-Debian: https://bugs.debian.org/794857

Index: plplot/examples/CMakeLists.txt
===================================================================
--- plplot.orig/examples/CMakeLists.txt	2015-10-06 23:59:36.990623282 +0200
+++ plplot/examples/CMakeLists.txt	2015-10-07 00:04:55.193867367 +0200
@@ -244,13 +244,6 @@
     
   endif(USE_RPATH)
 
-  # Install lena.pgm in installed examples directory so that all implementations
-  # of example 20 in the various examples subdirectories can conveniently
-  # access this file.
-  install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lena.pgm
-    DESTINATION ${DATA_DIR}/examples
-    )
-
 endif(CORE_BUILD)
 
 if(CORE_BUILD)
@@ -453,15 +446,6 @@
 endforeach(language_info ${language_info_LIST} "tk:tk:nothing")
 
 if(BUILD_TEST)
-  # lena.pgm needed in build tree for the examples that are run from there.
-  # Done at cmake time without dependencies because cannot see how this
-  # file will ever change on short time scales.
-  execute_process(
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different
-    ${CMAKE_CURRENT_SOURCE_DIR}/lena.pgm 
-    ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm
-    )
-
   find_program(VALGRIND_EXECUTABLE valgrind)
   if(VALGRIND_EXECUTABLE)
     option(VALGRIND_ALL_TESTS "Apply valgrind to all runs of plplot_test/plplot-test.sh" OFF)
Index: plplot/plplot_test/CMakeLists.txt
===================================================================
--- plplot.orig/plplot_test/CMakeLists.txt	2015-10-06 23:35:36.309076290 +0200
+++ plplot/plplot_test/CMakeLists.txt	2015-10-07 00:02:29.290222851 +0200
@@ -517,28 +517,6 @@
   endif(CMP_EXECUTABLE OR DIFF_EXECUTABLE AND TAIL_EXECUTABLE)
 
   if(BUILD_TEST)
-    # Make a copy of lena.pgm to the test subdirectory of the build
-    # tree so that example 20 will run from there.
-    add_custom_command(
-      OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different
-      ${CMAKE_SOURCE_DIR}/examples/lena.pgm
-      ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm
-      DEPENDS ${CMAKE_SOURCE_DIR}/examples/lena.pgm
-      )
-    add_custom_target(lena_file ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm)
-    if(ENABLE_octave)
-      # Also need a copy of lena.img for the octave bindings
-      add_custom_command(
-	OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lena.img
-	COMMAND ${CMAKE_COMMAND} -E copy_if_different
-	${CMAKE_SOURCE_DIR}/examples/octave/lena.img
-	${CMAKE_CURRENT_BINARY_DIR}/lena.img
-	DEPENDS ${CMAKE_SOURCE_DIR}/examples/octave/lena.img
-	)
-      add_custom_target(lena_octave_file ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lena.img)
-    endif(ENABLE_octave)
-
     # Custom target to remove everything created by ctest
     # N.B. the test_output_files_LIST is extremely long and
     # overflows the maximum line length of the shell if you
Index: plplot/scripts/htdocs-gen_plot-examples.sh
===================================================================
--- plplot.orig/scripts/htdocs-gen_plot-examples.sh	2015-10-07 00:03:30.278075950 +0200
+++ plplot/scripts/htdocs-gen_plot-examples.sh	2015-10-07 00:03:41.058049726 +0200
@@ -77,9 +77,6 @@
 make
 popd
 
-# hack, x20c needs lena in the current directory
-$CP examples/c/lena.pgm .
-
 for exe in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 \
     23 24 25 26 27 28 29 30 31 32 33; do
 
@@ -170,9 +167,6 @@
 
 done
 
-# remove hack
-rm -f lena.pgm
-
 # create the tarball
 TARBALL=htdocs-plot-demos.tgz
 find htdocs -size 0 -exec rm {} \;
