[plplot] 64/68: Reformat patches for gbp

Ole Streicher olebole at moszumanska.debian.org
Mon Jul 10 07:38:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch master
in repository plplot.

commit f817ab2034b657c170d99ff87729e07eec2621c5
Author: Ole Streicher <olebole at debian.org>
Date:   Wed Jul 5 22:10:06 2017 +0200

    Reformat patches for gbp
---
 debian/patches/02_unset-python-path.diff           |  22 --
 debian/patches/04_use-mkoctfile.diff               |  85 -----
 debian/patches/Add-Tcl-multiarch.patch             |  93 +++++
 ...-for-internal-CMake-3.1-pkg-config-change.patch |  62 +++
 ...ff => Build-without-non-free-lena-images.patch} |  46 ++-
 ...heck-for-hdf5_h => Dont-check-for-hdf5.h.patch} |  19 +-
 ...fix_config_h_clash => Fix-config.h-clash.patch} |  76 ++--
 debian/patches/Fix-lua-includes.patch              |  26 ++
 ...8_support.diff => Fix-octave-3.8-support.patch} | 421 +++++++++++----------
 debian/patches/Fix-wxwidgets-linkage.patch         |  21 +
 .../Proper-use-of-the-rmpath-function.patch        |  23 ++
 debian/patches/Remove-nondfsg-dirs.patch           |  20 +
 .../{set_cmake_policy => Set-cmake-policy.patch}   |  20 +-
 debian/patches/Unset-python-path.patch             |  23 ++
 debian/patches/add-tcl-multiarch.diff              |  83 ----
 debian/patches/cmake-3.1.diff                      |  57 ---
 debian/patches/fix-lua-includes.diff               |  21 -
 debian/patches/fix-wxwidgets-linkage.diff          |  15 -
 debian/patches/proper-path-handling.diff           |  19 -
 debian/patches/remove_nondfsg_dirs                 |  15 -
 debian/patches/series                              |  26 +-
 debian/patches/support-javac-options.diff          |  38 --
 22 files changed, 600 insertions(+), 631 deletions(-)

diff --git a/debian/patches/02_unset-python-path.diff b/debian/patches/02_unset-python-path.diff
deleted file mode 100755
index aac9645..0000000
--- a/debian/patches/02_unset-python-path.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_unset-python-path.dpatch by  <andrewross at users.sourceforge.net>
-##
-## DP: No need to explicitly set python path with debian since the
-## DP: default path is correct. This ensure the examples work with
-## DP: multiple version of python.
-
- at DPATCH@
-
-Index: plplot-5.9.10/examples/python/CMakeLists.txt
-===================================================================
---- plplot-5.9.10.orig/examples/python/CMakeLists.txt	2013-10-01 13:10:17.191293736 +0100
-+++ plplot-5.9.10/examples/python/CMakeLists.txt	2013-10-01 13:10:17.179293736 +0100
-@@ -245,7 +245,7 @@
-     @ONLY
-     )
- 
--  set(python_location1 ${PYTHON_INSTDIR})
-+  set(python_location1)
-   set(python_location2)
-   set(python_location3)
-   set(python_location4)
diff --git a/debian/patches/04_use-mkoctfile.diff b/debian/patches/04_use-mkoctfile.diff
deleted file mode 100755
index 30c3972..0000000
--- a/debian/patches/04_use-mkoctfile.diff
+++ /dev/null
@@ -1,85 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_use-mkoctfile.dpatch by Rafael Laboissiere <rafael at debian.org>
-##
-## DP: Build plplot_octave.oct using mkoctfile and not as a shared library
-
- at DPATCH@
-
---- plplot-5.9.5.orig/bindings/octave/CMakeLists.txt
-+++ plplot-5.9.5/bindings/octave/CMakeLists.txt
-@@ -136,49 +136,6 @@
-   set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc
-     PROPERTIES GENERATED ON)
- 
--  # Build octave interface.
--  set(octave_interface_INCLUDE_PATHS
--    ${CMAKE_SOURCE_DIR}/include
--    ${CMAKE_BINARY_DIR}
--    ${CMAKE_BINARY_DIR}/include
--    ${CMAKE_CURRENT_SOURCE_DIR}
--    ${CMAKE_CURRENT_BINARY_DIR}
--    ${OCTAVE_INCLUDE_PATH}
--    )
--  include_directories(${octave_interface_INCLUDE_PATHS})
--
--  add_library(plplot_octave MODULE ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc)
--  target_link_libraries(
--    plplot_octave
--    plplot${LIB_TAG}
--    "${OCTAVE_LIBRARIES}"
--    "${OCTINTERP_LIBRARIES}"
--    )
--
--  if(USE_RPATH)
--    get_target_property(LIB_INSTALL_RPATH plplot${LIB_TAG} INSTALL_RPATH)
--    # (Reasonable) assumption here is that OCTAVE_LIBRARIES and
--    # OCTINTERP_LIBRARIES have the same path.
--    get_filename_component(OCTAVE_INSTALL_RPATH "${OCTAVE_LIBRARIES}" PATH)
--    set(LIB_INSTALL_RPATH ${LIB_INSTALL_RPATH} ${OCTAVE_INSTALL_RPATH})
--    set_target_properties(
--      plplot_octave
--      PROPERTIES
--      PREFIX "" 
--      SUFFIX ".oct"
--      INSTALL_RPATH "${LIB_INSTALL_RPATH}"
--      INSTALL_NAME_DIR "${OCTAVE_OCT_DIR}"
--      )
--  else(USE_RPATH)
--    set_target_properties(
--      plplot_octave
--      PROPERTIES
--      PREFIX "" 
--      SUFFIX ".oct"
--      INSTALL_NAME_DIR "${OCTAVE_OCT_DIR}"
--      )
--  endif(USE_RPATH)
--
-   # Have to be specific about permissions for some reason (probably oct suffix).
-   set(PERM_MODULES
-     OWNER_READ
-@@ -190,9 +147,22 @@
-     WORLD_EXECUTE
-     )
- 
-+  add_custom_command(
-+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.oct
-+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc
-+    COMMAND ${MKOCTFILE} ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc
-+    -I${CMAKE_CURRENT_BINARY_DIR} -I${CMAKE_SOURCE_DIR}/bindings/octave
-+    -I${CMAKE_SOURCE_DIR}/include --strip
-+    -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG}
-+    )
-+
-+  add_custom_target(
-+    plplot_octave_oct_file ALL
-+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.oct
-+    )
-+
-+  install( 
-+    FILES ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.oct
--  install(TARGETS plplot_octave
--    EXPORT export_plplot
--    LIBRARY
-     DESTINATION ${OCTAVE_OCT_DIR}
-     PERMISSIONS ${PERM_MODULES}
-     )
diff --git a/debian/patches/Add-Tcl-multiarch.patch b/debian/patches/Add-Tcl-multiarch.patch
new file mode 100644
index 0000000..7dd11b7
--- /dev/null
+++ b/debian/patches/Add-Tcl-multiarch.patch
@@ -0,0 +1,93 @@
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Tue, 9 Sep 2014 18:17:43 +0200
+Subject: Add Tcl multiarch
+
+Change the location of tcl binaries to make the packages multiarch compliant.
+---
+ bindings/tk/CMakeLists.txt   | 2 +-
+ cmake/modules/instdirs.cmake | 9 +++++++++
+ plplot_config.h.in           | 3 +++
+ src/plctrl.c                 | 9 +++++++++
+ 4 files changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/bindings/tk/CMakeLists.txt b/bindings/tk/CMakeLists.txt
+index 8374bf8..c0c6355 100644
+--- a/bindings/tk/CMakeLists.txt
++++ b/bindings/tk/CMakeLists.txt
+@@ -50,7 +50,7 @@ if(ENABLE_tkX)
+ 
+   install(TARGETS plserver
+     EXPORT export_plplot
+-    DESTINATION ${BIN_DIR}
++    DESTINATION ${LIBEXEC_DIR}
+     )
+ endif(ENABLE_tkX)
+ 
+diff --git a/cmake/modules/instdirs.cmake b/cmake/modules/instdirs.cmake
+index c68ea54..9f669e2 100644
+--- a/cmake/modules/instdirs.cmake
++++ b/cmake/modules/instdirs.cmake
+@@ -71,6 +71,12 @@ ${CMAKE_INSTALL_DATADIR}/man
+ CACHE PATH "install location for man documentation"
+ )
+ 
++set(
++CMAKE_INSTALL_LIBEXECDIR
++${CMAKE_INSTALL_LIBDIR}/${PACKAGE}${VERSION}/bin
++CACHE PATH "install location for executables called by other executables or libraries"
++)
++
+ # Configured PLplot install locations determined from user-updatable
+ # cached values above.
+ 
+@@ -112,6 +118,9 @@ set(INFO_DIR ${CMAKE_INSTALL_INFODIR})
+ # Man pages.
+ set(MAN_DIR ${CMAKE_INSTALL_MANDIR})
+ 
++# Libexec.
++set(LIBEXEC_DIR ${CMAKE_INSTALL_LIBEXECDIR})
++
+ # Other path-related variables.
+ 
+ # Absolute path of top-level build directory.
+diff --git a/plplot_config.h.in b/plplot_config.h.in
+index 0274dc8..d63944d 100644
+--- a/plplot_config.h.in
++++ b/plplot_config.h.in
+@@ -20,6 +20,9 @@
+ // Location of executables
+ #define BIN_DIR                  "@BIN_DIR@"
+ 
++// Location of library executables
++#define LIBEXEC_DIR              "@LIBEXEC_DIR@"
++
+ // Location of Build tree
+ #define BUILD_DIR                "@BUILD_DIR@"
+ 
+diff --git a/src/plctrl.c b/src/plctrl.c
+index 7a241df..fc62557 100644
+--- a/src/plctrl.c
++++ b/src/plctrl.c
+@@ -2124,6 +2124,7 @@ pl_cmd( PLINT op, void *ptr )
+ //!	current directory
+ //!	PLPLOT_HOME_ENV/bin = $(PLPLOT_HOME)/bin
+ //!	BIN_DIR
++//!	LIBEXEC_DIR
+ //!
+ //! The caller must free the returned pointer (points to malloc'ed memory)
+ //! when finished with it.
+@@ -2190,6 +2191,14 @@ plFindCommand( const char *fn )
+         return fs;
+ #endif
+ 
++// LIBEXEC_DIR
++
++#if defined ( LIBEXEC_DIR )
++    plGetName( LIBEXEC_DIR, "", fn, &fs );
++    if ( !plFindName( fs ) )
++        return fs;
++#endif
++
+ // Crapped out
+ 
+     free_mem( fs );
diff --git a/debian/patches/Adjust-for-internal-CMake-3.1-pkg-config-change.patch b/debian/patches/Adjust-for-internal-CMake-3.1-pkg-config-change.patch
new file mode 100644
index 0000000..f940d51
--- /dev/null
+++ b/debian/patches/Adjust-for-internal-CMake-3.1-pkg-config-change.patch
@@ -0,0 +1,62 @@
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Adjust for internal CMake-3.1 pkg-config change.
+
+commit 772223c638ecf5dc740c9f3dd7a6883c6d2c83d2
+From: Alan W. Irwin <airwin at users.sourceforge.net>
+Date:   Sun Dec 7 09:06:08 2014 -0800
+
+There is a report from Greg Jung <gvjung at gmail.com> that the internal CMake
+command
+
+_pkg_check_modules_internal(0 0 ${_prefix} "${_package}")
+
+must be changed to
+
+_pkg_check_modules_internal(0 0 0 0 ${_prefix} "${_package}")
+
+for CMake-3.1 in order to build the cairo device properly.  Accordingly, I
+have made that adjustment.
+
+Tested by Alan W. Irwin <airwin at users> on Linux using CMake-3.0.2 by building
+the cairo device.
+
+N.B. currently untested for CMake-3.1.
+
+ToDo:
+
+Extensive tests on CMake-3.1 (once that version is closer to release)
+still need to be done since the change in the pkg-config support by
+CMake may need other adjustments as well.
+---
+ cmake/modules/pkg-config.cmake | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/modules/pkg-config.cmake b/cmake/modules/pkg-config.cmake
+index a6cb929..bbdfea3 100644
+--- a/cmake/modules/pkg-config.cmake
++++ b/cmake/modules/pkg-config.cmake
+@@ -1,6 +1,6 @@
+ # cmake/modules/pkg-config.cmake
+ #
+-# Copyright (C) 2006  Alan W. Irwin
++# Copyright (C) 2006-2015 Alan W. Irwin
+ #
+ # This file is part of PLplot.
+ #
+@@ -94,7 +94,14 @@ macro(pkg_check_pkgconfig _package _include_DIR _link_DIR _link_FLAGS _cflags _v
+     set(_xprefix ${_prefix})
+   endif(FORCE_EXTERNAL_STATIC)
+   
+-  _pkg_check_modules_internal(0 0 ${_prefix} "${_package}")
++  if(CMAKE_VERSION VERSION_LESS "3.1")
++    _pkg_check_modules_internal(0 0 ${_prefix} "${_package}")
++  elseif(CMAKE_VERSION VERSION_LESS "3.6.2")
++    _pkg_check_modules_internal(0 0 0 0 ${_prefix} "${_package}")
++  else(CMAKE_VERSION VERSION_LESS "3.6.2")
++    _pkg_check_modules_internal(0 0 0 0 0 ${_prefix} "${_package}")
++  endif(CMAKE_VERSION VERSION_LESS "3.6.2")
++
+   if(${_prefix}_FOUND)
+     cmake_link_flags(${_link_FLAGS} "${${_xprefix}_LDFLAGS}")
+     # If libraries cannot be not found, then that is equivalent to whole
diff --git a/debian/patches/lena-images-removal.diff b/debian/patches/Build-without-non-free-lena-images.patch
similarity index 68%
rename from debian/patches/lena-images-removal.diff
rename to debian/patches/Build-without-non-free-lena-images.patch
index 1cbbddc..4679fc4 100644
--- a/debian/patches/lena-images-removal.diff
+++ b/debian/patches/Build-without-non-free-lena-images.patch
@@ -1,12 +1,18 @@
-Description: Build without non-free lena images
-Author: Axel Beckert <abe at debian.org>
-Bug-Debian: https://bugs.debian.org/794857
+From: Axel Beckert <abe at debian.org>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Build without non-free lena images
 
-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 @@
+---
+ examples/CMakeLists.txt             | 16 ----------------
+ plplot_test/CMakeLists.txt          | 22 ----------------------
+ scripts/htdocs-gen_plot-examples.sh |  6 ------
+ 3 files changed, 44 deletions(-)
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index b8ff0a8..faba42b 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -244,13 +244,6 @@ if(CORE_BUILD)
      
    endif(USE_RPATH)
  
@@ -20,7 +26,7 @@ Index: plplot/examples/CMakeLists.txt
  endif(CORE_BUILD)
  
  if(CORE_BUILD)
-@@ -453,15 +446,6 @@
+@@ -453,15 +446,6 @@ foreach(language_info ${language_info_LIST} "tk:tk:nothing")
  endforeach(language_info ${language_info_LIST} "tk:tk:nothing")
  
  if(BUILD_TEST)
@@ -36,11 +42,11 @@ Index: plplot/examples/CMakeLists.txt
    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 @@
+diff --git a/plplot_test/CMakeLists.txt b/plplot_test/CMakeLists.txt
+index a54072a..940817d 100644
+--- a/plplot_test/CMakeLists.txt
++++ b/plplot_test/CMakeLists.txt
+@@ -517,28 +517,6 @@ if(SH_EXECUTABLE)
    endif(CMP_EXECUTABLE OR DIFF_EXECUTABLE AND TAIL_EXECUTABLE)
  
    if(BUILD_TEST)
@@ -69,11 +75,11 @@ Index: plplot/plplot_test/CMakeLists.txt
      # 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 @@
+diff --git a/scripts/htdocs-gen_plot-examples.sh b/scripts/htdocs-gen_plot-examples.sh
+index bf95c51..c153b2c 100755
+--- a/scripts/htdocs-gen_plot-examples.sh
++++ b/scripts/htdocs-gen_plot-examples.sh
+@@ -77,9 +77,6 @@ export cexamples_dir=`pwd`
  make
  popd
  
@@ -83,7 +89,7 @@ Index: plplot/scripts/htdocs-gen_plot-examples.sh
  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 @@
+@@ -170,9 +167,6 @@ 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
  
  done
  
diff --git a/debian/patches/dont-check-for-hdf5_h b/debian/patches/Dont-check-for-hdf5.h.patch
similarity index 80%
rename from debian/patches/dont-check-for-hdf5_h
rename to debian/patches/Dont-check-for-hdf5.h.patch
index 683c445..c8a9c72 100644
--- a/debian/patches/dont-check-for-hdf5_h
+++ b/debian/patches/Dont-check-for-hdf5.h.patch
@@ -1,15 +1,16 @@
-Description: don't check for hdf5.h
- This check fails due to the ongoing HDF5 transition.
-Author: Thibaut Paumard <thibaut at debian.org>
-Origin: vendor
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760943
-Forwarded: no
-Last-Update: 2014-09-09
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Dont check for hdf5.h
+
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+ cmake/modules/octave.cmake | 23 -----------------------
+ 1 file changed, 23 deletions(-)
+
+diff --git a/cmake/modules/octave.cmake b/cmake/modules/octave.cmake
+index 93ba9ad..7ebae09 100644
 --- a/cmake/modules/octave.cmake
 +++ b/cmake/modules/octave.cmake
-@@ -173,29 +173,6 @@
+@@ -173,29 +173,6 @@ if(ENABLE_octave)
  	CACHE INTERNAL ""
  	)
        endif(NOT OCTAVE_INCLUDE_PATH_TRIMMED STREQUAL "${OCTAVE_INCLUDE_PATH}")
diff --git a/debian/patches/fix_config_h_clash b/debian/patches/Fix-config.h-clash.patch
similarity index 77%
rename from debian/patches/fix_config_h_clash
rename to debian/patches/Fix-config.h-clash.patch
index ac8bc40..c73f7db 100644
--- a/debian/patches/fix_config_h_clash
+++ b/debian/patches/Fix-config.h-clash.patch
@@ -1,11 +1,21 @@
-Description: Rename HAVE_CONFIG_H to PLPLOT_HAVE_CONFIG_H to avoid name space clashes with other libraries
-Author: Andrew Ross <andrewross at users.sourceforge.net>
-Last-Update: 2014-09-17
-Origin: upstream
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Fix config.h clash
 
+---
+ CMakeLists.txt                        | 2 +-
+ bindings/ocaml/CMakeLists.txt         | 2 +-
+ bindings/ocaml/plcairo/CMakeLists.txt | 2 +-
+ examples/CMakeLists.txt               | 2 +-
+ include/plConfig.h.in                 | 4 ++--
+ plplot_config.h.in                    | 2 +-
+ 6 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2491faa..f8ecd81 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -125,7 +125,7 @@
+@@ -125,7 +125,7 @@ configure_file(
    ${CMAKE_CURRENT_BINARY_DIR}/plplot_config.h
    )
  # Allow access to the generated plplot_config.h for this build.
@@ -14,9 +24,11 @@ Origin: upstream
  # Install top-level files
  
  # Enable testing framework for examples
+diff --git a/bindings/ocaml/CMakeLists.txt b/bindings/ocaml/CMakeLists.txt
+index e45988e..9ee06b2 100644
 --- a/bindings/ocaml/CMakeLists.txt
 +++ b/bindings/ocaml/CMakeLists.txt
-@@ -99,7 +99,7 @@
+@@ -99,7 +99,7 @@ if(ENABLE_ocaml)
      ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so
      ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a
      COMMAND ${OCAMLC} -ccopt -I${CAMLIDL_LIB_DIR} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c
@@ -25,6 +37,34 @@ Origin: upstream
      COMMAND ${OCAMLMKLIB} -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o ${ocaml_STATIC_FLAGS}
      DEPENDS
      ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c
+diff --git a/bindings/ocaml/plcairo/CMakeLists.txt b/bindings/ocaml/plcairo/CMakeLists.txt
+index 423ef80..d98acf5 100644
+--- a/bindings/ocaml/plcairo/CMakeLists.txt
++++ b/bindings/ocaml/plcairo/CMakeLists.txt
+@@ -36,7 +36,7 @@ if(ENABLE_ocaml AND OCAML_HAS_CAIRO)
+     ${CMAKE_CURRENT_BINARY_DIR}/plcairo_impl.o
+     ${CMAKE_CURRENT_BINARY_DIR}/dllplcairo_stubs.so
+     ${CMAKE_CURRENT_BINARY_DIR}/libplcairo_stubs.a
+-    COMMAND ${OCAMLC} -ccopt "${CAIRO_COMPILE_FLAGS}" -cclib "${CAIRO_LINK_FLAGS}" -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime  -ccopt -I${CMAKE_BINARY_DIR} -ccopt -DHAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c
++    COMMAND ${OCAMLC} -ccopt "${CAIRO_COMPILE_FLAGS}" -cclib "${CAIRO_LINK_FLAGS}" -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime  -ccopt -I${CMAKE_BINARY_DIR} -ccopt -DPLPLOT_HAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c
+     COMMAND ${OCAMLMKLIB} -o plcairo_stubs ${CAIRO_LINK_FLAGS_LIST} -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plcairo_impl.o
+     DEPENDS
+     ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index a89553f..51ec58b 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -414,7 +414,7 @@ else(CORE_BUILD)
+ endif(CORE_BUILD)
+ 
+ if(CORE_BUILD AND BUILD_TEST)
+-  remove_definitions("-DHAVE_CONFIG_H")
++  remove_definitions("-DPLPLOT_HAVE_CONFIG_H")
+ endif(CORE_BUILD AND BUILD_TEST)
+ 
+ # Decide on device to be used for generic interactive tests.
+diff --git a/include/plConfig.h.in b/include/plConfig.h.in
+index 9fbc309..3b99d66 100644
 --- a/include/plConfig.h.in
 +++ b/include/plConfig.h.in
 @@ -30,7 +30,7 @@
@@ -45,6 +85,8 @@ Origin: upstream
  #  include <plplot_config.h>
  #endif
  
+diff --git a/plplot_config.h.in b/plplot_config.h.in
+index d63944d..4b889f1 100644
 --- a/plplot_config.h.in
 +++ b/plplot_config.h.in
 @@ -3,7 +3,7 @@
@@ -56,25 +98,3 @@ Origin: upstream
  // is #defined in that case) contains configured macros that are
  // required for the core build, installed examples build, and build of
  // user applications.  Therefore, in contrast to plplot_config.h,
---- a/bindings/ocaml/plcairo/CMakeLists.txt
-+++ b/bindings/ocaml/plcairo/CMakeLists.txt
-@@ -36,7 +36,7 @@
-     ${CMAKE_CURRENT_BINARY_DIR}/plcairo_impl.o
-     ${CMAKE_CURRENT_BINARY_DIR}/dllplcairo_stubs.so
-     ${CMAKE_CURRENT_BINARY_DIR}/libplcairo_stubs.a
--    COMMAND ${OCAMLC} -ccopt "${CAIRO_COMPILE_FLAGS}" -cclib "${CAIRO_LINK_FLAGS}" -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime  -ccopt -I${CMAKE_BINARY_DIR} -ccopt -DHAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c
-+    COMMAND ${OCAMLC} -ccopt "${CAIRO_COMPILE_FLAGS}" -cclib "${CAIRO_LINK_FLAGS}" -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime  -ccopt -I${CMAKE_BINARY_DIR} -ccopt -DPLPLOT_HAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c
-     COMMAND ${OCAMLMKLIB} -o plcairo_stubs ${CAIRO_LINK_FLAGS_LIST} -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plcairo_impl.o
-     DEPENDS
-     ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c
---- a/examples/CMakeLists.txt
-+++ b/examples/CMakeLists.txt
-@@ -414,7 +414,7 @@
- endif(CORE_BUILD)
- 
- if(CORE_BUILD AND BUILD_TEST)
--  remove_definitions("-DHAVE_CONFIG_H")
-+  remove_definitions("-DPLPLOT_HAVE_CONFIG_H")
- endif(CORE_BUILD AND BUILD_TEST)
- 
- # Decide on device to be used for generic interactive tests.
diff --git a/debian/patches/Fix-lua-includes.patch b/debian/patches/Fix-lua-includes.patch
new file mode 100644
index 0000000..3f36165
--- /dev/null
+++ b/debian/patches/Fix-lua-includes.patch
@@ -0,0 +1,26 @@
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Fix lua includes
+
+Fix for cmake lua support to work around problem that lua needs multiple
+include directories on Debian
+---
+ cmake/modules/lua.cmake | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/cmake/modules/lua.cmake b/cmake/modules/lua.cmake
+index 73e0a72..034927d 100644
+--- a/cmake/modules/lua.cmake
++++ b/cmake/modules/lua.cmake
+@@ -86,3 +86,11 @@ if(ENABLE_lua)
+     set(LUA_DIR ${LIB_DIR}/lua/${LUA_VERSION}/plplot)
+   endif(LUA_VERSION MATCHES "5\\.0")
+ endif(ENABLE_lua)
++
++if(ENABLE_lua AND LUA51_FOUND)
++  pkg_check_pkgconfig(lua5.1 includedir libdir linkflags1 cflags1 version1 _LUA)
++  if(linkflags1)
++    set(LUA_INCLUDE_DIR ${includedir})
++  endif(linkflags1)
++endif(ENABLE_lua AND LUA51_FOUND)
++
diff --git a/debian/patches/octave_3.8_support.diff b/debian/patches/Fix-octave-3.8-support.patch
similarity index 87%
rename from debian/patches/octave_3.8_support.diff
rename to debian/patches/Fix-octave-3.8-support.patch
index d728c7c..fc18b27 100644
--- a/debian/patches/octave_3.8_support.diff
+++ b/debian/patches/Fix-octave-3.8-support.patch
@@ -1,6 +1,79 @@
-Description: Upstream patch to fix octave support for octave 3.8.
-Author: Andrew Ross <andrewross at users.sourceforge.net>
-Last-Update: 2014-09-23
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Fix octave 3.8 support
+
+Upstream patch to fix octave support for octave 3.8.
+---
+ examples/octave/x01c.m        |   2 +-
+ examples/octave/x04c.m        |   2 +-
+ examples/octave/x07c.m        |   2 +-
+ examples/octave/x08c.m        |   4 +-
+ examples/octave/x23c.m        | 314 +++++++++++++++++++++---------------------
+ examples/octave/x26c.m        |   2 +-
+ examples/octave/x28c.m        | 100 +++++++-------
+ examples/octave/x29c.m        |   4 +-
+ examples/octave/x33c.m        |  52 ++++---
+ plplot_test/test_octave.sh.in |  39 ++++--
+ 10 files changed, 262 insertions(+), 259 deletions(-)
+
+diff --git a/examples/octave/x01c.m b/examples/octave/x01c.m
+index 298ee21..5cd9c92 100644
+--- a/examples/octave/x01c.m
++++ b/examples/octave/x01c.m
+@@ -85,7 +85,7 @@ function ix01c(strm)
+     printf("\n\nYou are in Locate mode. Click any mouse button or press any key\n\
+ and the current cursor position will be printed.\n\
+ Please keep <NumLock> and <CapsLock> off.\n\
+-Terminate locate mode with the <Enter> key.\n\ 
++Terminate locate mode with the <Enter> key.\n\
+ Finish the plot with the <Enter> or <ESC> key or the 3d mouse button\n");
+ 
+     fflush(stdout);
+diff --git a/examples/octave/x04c.m b/examples/octave/x04c.m
+index 42c05f7..3be2255 100644
+--- a/examples/octave/x04c.m
++++ b/examples/octave/x04c.m
+@@ -155,7 +155,7 @@ function plot1(type)
+ 
+   plscol0a( 15, 32, 32, 32, 0.70 );
+ 
+-  [legend_width, legend_height] = \
++  [legend_width, legend_height] = ...
+       pllegend( bitor(PL_LEGEND_BACKGROUND, PL_LEGEND_BOUNDING_BOX), 0, 0.0, 0.0,
+                0.1, 15, 1, 1, 0, 0, opt_array, 1.0, 1.0, 2.0,
+                1., text_colors, text, 
+diff --git a/examples/octave/x07c.m b/examples/octave/x07c.m
+index 7c7e90f..697baed 100644
+--- a/examples/octave/x07c.m
++++ b/examples/octave/x07c.m
+@@ -24,7 +24,7 @@ function x07c
+   ## Initialize plplot */
+   plinit();
+ 
+-  base=[0, 100, 0, 100, 200, 500, 600, 700, 800, 900, \
++  base=[0, 100, 0, 100, 200, 500, 600, 700, 800, 900, ...
+ 	2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900];
+   
+   plfontld(0);
+diff --git a/examples/octave/x08c.m b/examples/octave/x08c.m
+index e2a544b..e098bee 100644
+--- a/examples/octave/x08c.m
++++ b/examples/octave/x08c.m
+@@ -101,10 +101,10 @@ endfunction
+ 	plmtex("t", 1.0, 0.5, 0.5, title(k,:));
+ 	plcol0(1);
+ 	if (rosen)
+-          plw3d(1.0, 1.0, 1.0, -1.5, 1.5, -0.5, 1.5, zmin, zmax, \ 
++          plw3d(1.0, 1.0, 1.0, -1.5, 1.5, -0.5, 1.5, zmin, zmax,
+                 alt(k), az(k));
+ 	else
+-	  plw3d(1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, zmin, zmax, \
++	  plw3d(1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, zmin, zmax,
+ 		alt(k), az(k));
+ 	endif
+ 
+diff --git a/examples/octave/x23c.m b/examples/octave/x23c.m
+index aa911a2..a2a9871 100644
 --- a/examples/octave/x23c.m
 +++ b/examples/octave/x23c.m
 @@ -1,5 +1,3 @@
@@ -9,7 +82,7 @@ Last-Update: 2014-09-23
  ## Displays Greek letters and mathematically interesting Unicode ranges
  ## Copyright (C) 2005 Alan Irwin 
  ## Copyright (C) 2005 Andrew Ross 
-@@ -34,186 +32,186 @@
+@@ -34,186 +32,186 @@ function ix23c(strm)
    endif
  
  
@@ -60,20 +133,6 @@ Last-Update: 2014-09-23
 -0x22a5,0x22c5,0x2320,0x2321,0x2329,\
 -0x232a,0x25ca,0x2660,0x2663,0x2665,\
 -0x2666,\
--];
--
-- title = {\
--"#<0x10>PLplot Example 23 - Greek Letters";\
--"#<0x10>PLplot Example 23 - Type 1 Symbol Font Glyphs by Unicode (a)";\
--"#<0x10>PLplot Example 23 - Type 1 Symbol Font Glyphs by Unicode (b)";\
--"#<0x10>PLplot Example 23 - Type 1 Symbol Font Glyphs by Unicode (c)";\
--"#<0x10>PLplot Example 23 - Number Forms Unicode Block";\
--"#<0x10>PLplot Example 23 - Arrows Unicode Block (a)";\
--"#<0x10>PLplot Example 23 - Arrows Unicode Block (b)";\
--"#<0x10>PLplot Example 23 - Mathematical Operators Unicode Block (a)";\
--"#<0x10>PLplot Example 23 - Mathematical Operators Unicode Block (b)";\
--"#<0x10>PLplot Example 23 - Mathematical Operators Unicode Block (c)";\
--"#<0x10>PLplot Example 23 - Mathematical Operators Unicode Block (d)"\
 +  Type1 = [...
 +0x0020,0x0021,0x0023,0x0025,0x0026,...
 +0x0028,0x0029,0x002b,0x002c,0x002e,...
@@ -109,8 +168,20 @@ Last-Update: 2014-09-23
 +0x22a5,0x22c5,0x2320,0x2321,0x2329,...
 +0x232a,0x25ca,0x2660,0x2663,0x2665,...
 +0x2666,...
-+];
-+
+ ];
+ 
+- title = {\
+-"#<0x10>PLplot Example 23 - Greek Letters";\
+-"#<0x10>PLplot Example 23 - Type 1 Symbol Font Glyphs by Unicode (a)";\
+-"#<0x10>PLplot Example 23 - Type 1 Symbol Font Glyphs by Unicode (b)";\
+-"#<0x10>PLplot Example 23 - Type 1 Symbol Font Glyphs by Unicode (c)";\
+-"#<0x10>PLplot Example 23 - Number Forms Unicode Block";\
+-"#<0x10>PLplot Example 23 - Arrows Unicode Block (a)";\
+-"#<0x10>PLplot Example 23 - Arrows Unicode Block (b)";\
+-"#<0x10>PLplot Example 23 - Mathematical Operators Unicode Block (a)";\
+-"#<0x10>PLplot Example 23 - Mathematical Operators Unicode Block (b)";\
+-"#<0x10>PLplot Example 23 - Mathematical Operators Unicode Block (c)";\
+-"#<0x10>PLplot Example 23 - Mathematical Operators Unicode Block (d)"\
 + title = {
 +"#<0x10>PLplot Example 23 - Greek Letters";
 +"#<0x10>PLplot Example 23 - Type 1 Symbol Font Glyphs by Unicode (a)";
@@ -137,48 +208,6 @@ Last-Update: 2014-09-23
 -0x2240,\
 -0x2280,\
 -0x22c0,\
--];
--
-- hi = [\
--0x30,\
--0x40,\
--0x80,\
--0xA6,\
--0x2184,\
--0x21d0,\
--0x2200,\
--0x2240,\
--0x2280,\
--0x22c0,\
--0x2300,\
--];
--
-- nxcells = [\
--12,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--];
--
--nycells = [\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
--8,\
 + lo = [
 +0x0,
 +0x0,
@@ -191,8 +220,20 @@ Last-Update: 2014-09-23
 +0x2240,
 +0x2280,
 +0x22c0,
-+];
-+
+ ];
+ 
+- hi = [\
+-0x30,\
+-0x40,\
+-0x80,\
+-0xA6,\
+-0x2184,\
+-0x21d0,\
+-0x2200,\
+-0x2240,\
+-0x2280,\
+-0x22c0,\
+-0x2300,\
 + hi = [
 +0x30,
 +0x40,
@@ -205,8 +246,20 @@ Last-Update: 2014-09-23
 +0x2280,
 +0x22c0,
 +0x2300,
-+];
-+
+ ];
+ 
+- nxcells = [\
+-12,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
 + nxcells = [
 +12,
 +8,
@@ -219,8 +272,20 @@ Last-Update: 2014-09-23
 +8,
 +8,
 +8,
-+];
-+
+ ];
+ 
+-nycells = [\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
+-8,\
 +nycells = [
 +8,
 +8,
@@ -296,23 +361,6 @@ Last-Update: 2014-09-23
 -0x80000122,\
 -0x80000123,\
 -0x80000124,\
--];
--
--family = [\
--  "sans-serif";\
--  "serif";\
--  "monospace";\
--  "script";\
--  "symbol"\
--];
--style = [\
--  "upright";\
--  "italic";\
--  "oblique"\
--];
--weight = [\
--  "medium";\
--  "bold"\
 +fci = [
 +0x80000000,
 +0x80000001,
@@ -344,26 +392,54 @@ Last-Update: 2014-09-23
 +0x80000122,
 +0x80000123,
 +0x80000124,
-+];
-+
+ ];
+ 
+-family = [\
+-  "sans-serif";\
+-  "serif";\
+-  "monospace";\
+-  "script";\
+-  "symbol"\
 +family = [
 +  "sans-serif";
 +  "serif";
 +  "monospace";
 +  "script";
 +  "symbol"
-+];
+ ];
+-style = [\
+-  "upright";\
+-  "italic";\
+-  "oblique"\
 +style = [
 +  "upright";
 +  "italic";
 +  "oblique"
-+];
+ ];
+-weight = [\
+-  "medium";\
+-  "bold"\
 +weight = [
 +  "medium";
 +  "bold"
  ];
  
  
+diff --git a/examples/octave/x26c.m b/examples/octave/x26c.m
+index 8e94f48..49252a7 100644
+--- a/examples/octave/x26c.m
++++ b/examples/octave/x26c.m
+@@ -244,7 +244,7 @@ function plot1(plottype, x_label, y_label, alty_label, title_label, line_label,
+ 
+   plscol0a( 15, 32, 32, 32, 0.70 );
+ 
+-  [legend_width, legend_height] = \
++  [legend_width, legend_height] = ...
+       pllegend( bitor(PL_LEGEND_BACKGROUND, PL_LEGEND_BOUNDING_BOX), 0, 0.0, 0.0,
+                0.1, 15, 1, 1, 0, 0, opt_array, 1.0, 1.0, 2.0,
+                1., text_colors, text, 
+diff --git a/examples/octave/x28c.m b/examples/octave/x28c.m
+index b801496..39c46a1 100644
 --- a/examples/octave/x28c.m
 +++ b/examples/octave/x28c.m
 @@ -1,5 +1,3 @@
@@ -372,7 +448,7 @@ Last-Update: 2014-09-23
  ## plmtex3, plptex3 demo
  ##
  ## Copyright (C) 2007 Alan Irwin 
-@@ -86,8 +84,8 @@
+@@ -86,8 +84,8 @@ function ix28c
    plw3d(1.0, 1.0, 1.0, xmin, xmax, ymin, ymax, zmin, zmax, 20., 45.);
     
    plcol0(2);
@@ -383,7 +459,7 @@ Last-Update: 2014-09-23
  	 "bcd", "", zrange, 0);
  
    ## z = zmin. 
-@@ -102,9 +100,9 @@
+@@ -102,9 +100,9 @@ function ix28c
      x_shear = -0.5*xrange*sin_omega;
      y_shear = 0.5*yrange*cos_omega;
      z_shear = 0.;
@@ -396,7 +472,7 @@ Last-Update: 2014-09-23
  	    0.0, "  revolution");
    endfor
    ## x = xmax.
-@@ -119,9 +117,9 @@
+@@ -119,9 +117,9 @@ function ix28c
      x_shear = 0.;
      y_shear = 0.5*yrange*sin_omega;
      z_shear = 0.5*zrange*cos_omega;
@@ -409,7 +485,7 @@ Last-Update: 2014-09-23
  	    0.0, "  revolution");
    endfor
  
-@@ -137,10 +135,10 @@
+@@ -137,10 +135,10 @@ function ix28c
      x_shear = -0.5*xrange*sin_omega;
      y_shear = 0.;
      z_shear = 0.5*zrange*cos_omega;
@@ -424,7 +500,7 @@ Last-Update: 2014-09-23
  	    0.0, "  revolution");
    endfor
    ## Draw minimal 3D grid to finish defining the 3D box.
-@@ -153,8 +151,8 @@
+@@ -153,8 +151,8 @@ function ix28c
    plw3d(1.0, 1.0, 1.0, xmin, xmax, ymin, ymax, zmin, zmax, 20., 45.);
     
    plcol0(2);
@@ -435,7 +511,7 @@ Last-Update: 2014-09-23
  	 "bcd", "", zrange, 0);
  
    ## y = ymax.
-@@ -170,10 +168,10 @@
+@@ -170,10 +168,10 @@ function ix28c
      y_shear = 0.5*yrange*sin_omega;
      z_shear = 0.5*zrange*cos_omega;
      zs = zsmax - dzsrot*i;
@@ -450,7 +526,7 @@ Last-Update: 2014-09-23
  	    0.5, "rotation for y = y#dmax#u");
    endfor
  
-@@ -190,10 +188,10 @@
+@@ -190,10 +188,10 @@ function ix28c
      x_shear = 0.5*xrange*sin_omega;
      z_shear = 0.5*zrange*cos_omega;
      zs = zsmax - dzsrot*i;
@@ -465,7 +541,7 @@ Last-Update: 2014-09-23
  	    0.5, "rotation for x = x#dmax#u");
    endfor
  
-@@ -210,10 +208,10 @@
+@@ -210,10 +208,10 @@ function ix28c
      y_shear = 0.5*yrange*cos_omega;
      z_shear = 0.5*zrange*sin_omega;
      ys = ysmax - dysrot*i;
@@ -480,7 +556,7 @@ Last-Update: 2014-09-23
  	    0.5, "rotation for z = z#dmin#u");
    endfor
    ## Draw minimal 3D grid to finish defining the 3D box.
-@@ -230,8 +228,8 @@
+@@ -230,8 +228,8 @@ function ix28c
    plw3d(1.0, 1.0, 1.0, xmin, xmax, ymin, ymax, zmin, zmax, 20., 45.);
     
    plcol0(2);
@@ -491,7 +567,7 @@ Last-Update: 2014-09-23
  	 "bcd", "", zrange, 0);
  
    ## y = ymax.
-@@ -247,10 +245,10 @@
+@@ -247,10 +245,10 @@ function ix28c
      x_shear = 0.5*xrange*sin_omega;
      z_shear = 0.5*zrange*cos_omega;
      zs = zsmax-dzsshear*i;
@@ -506,7 +582,7 @@ Last-Update: 2014-09-23
  	    0.5, "shear for y = y#dmax#u");
    endfor
  
-@@ -267,10 +265,10 @@
+@@ -267,10 +265,10 @@ function ix28c
      y_shear = -0.5*yrange*sin_omega;
      z_shear = 0.5*zrange*cos_omega;
      zs = zsmax-dzsshear*i;
@@ -521,7 +597,7 @@ Last-Update: 2014-09-23
  	    0.5, "shear for x = x#dmax#u");
    endfor
  
-@@ -287,10 +285,10 @@
+@@ -287,10 +285,10 @@ function ix28c
      y_shear = 0.5*yrange*cos_omega;
      x_shear = 0.5*xrange*sin_omega;
      ys = ysmax-dysshear*i;
@@ -536,7 +612,7 @@ Last-Update: 2014-09-23
  	    0.5, "shear for z = z#dmin#u");
    endfor
    ## Draw minimal 3D grid to finish defining the 3D box.
-@@ -303,8 +301,8 @@
+@@ -303,8 +301,8 @@ function ix28c
    plw3d(1.0, 1.0, 1.0, xmin, xmax, ymin, ymax, zmin, zmax, 40., -30.);
    
    plcol0(2);
@@ -547,7 +623,7 @@ Last-Update: 2014-09-23
  	 "bcd", "", zrange, 0);
  
    plschr(0., 1.2);
-@@ -334,10 +332,10 @@
+@@ -334,10 +332,10 @@ function ix28c
      y_shear = 0.;
      z_shear = 1.;
      p1string = pstring(i:i);
@@ -562,7 +638,7 @@ Last-Update: 2014-09-23
  	    0.5, p1string);
      omega += domega;
    endfor
-@@ -351,8 +349,8 @@
+@@ -351,8 +349,8 @@ function ix28c
    plw3d(1.0, 1.0, 1.0, xmin, xmax, ymin, ymax, zmin, zmax, 20., 45.);
    
    plcol0(2);
@@ -573,13 +649,30 @@ Last-Update: 2014-09-23
  	 "bcd", "", zrange, 0);
  
    plschr(0., 1.0);
-@@ -377,4 +375,4 @@
+@@ -377,4 +375,4 @@ function ix28c
  
  endfunction
  
 -ix28c
 \ No newline at end of file
 +ix28c
+diff --git a/examples/octave/x29c.m b/examples/octave/x29c.m
+index 8f4f857..7924e39 100644
+--- a/examples/octave/x29c.m
++++ b/examples/octave/x29c.m
+@@ -122,8 +122,8 @@ function plot2
+   i = 0:npts-1;
+   x = i*60.0*60.0*24.0;
+   p = asin(0.39795*cos(0.2163108 + 2*atan(0.9671396*tan(0.00860*(i-186)))));
+-  d = 24.0 - (24.0/pi)*acos( (sin(0.8333*pi/180.0) + \
+-			      sin(lat*pi/180.0)*sin(p)) \
++  d = 24.0 - (24.0/pi)*acos( (sin(0.8333*pi/180.0) +
++			      sin(lat*pi/180.0)*sin(p))
+ 			    ./(cos(lat*pi/180.0)*cos(p)) ); 
+   y = d;
+   
+diff --git a/examples/octave/x33c.m b/examples/octave/x33c.m
+index 0684f19..ca5a497 100644
 --- a/examples/octave/x33c.m
 +++ b/examples/octave/x33c.m
 @@ -1,6 +1,4 @@
@@ -590,7 +683,7 @@ Last-Update: 2014-09-23
  ##
  ##  Demonstrate most pllegend capability including unicode symbols.
  ##
-@@ -195,12 +193,12 @@
+@@ -195,12 +193,12 @@ function plcolorbar_example_page( kind_i, label_i, cap_i, cont_color, cont_width
          plwind( 0.0, 1.0, 0.0, 1.0 );
          # Set interesting background colour.
          plscol0a( 15, 0, 0, 0, 0.20 );
@@ -609,7 +702,7 @@ Last-Update: 2014-09-23
              n_values_array, values_array );
  
          # Reset text and tick sizes
-@@ -313,7 +311,7 @@
+@@ -313,7 +311,7 @@ function ix33c()
      line_colors(1) = 1 + mod(k, 8);
      symbol_colors(1) = 1 + mod(k, 8);
  
@@ -618,7 +711,7 @@ Last-Update: 2014-09-23
  	pllegend( opt, position, 0.05, 0.05,
  		 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, 1.0, 2.0,
  		 1., text_colors, text,
-@@ -393,7 +391,7 @@
+@@ -393,7 +391,7 @@ function ix33c()
    y = 0.1;
    nrow = 1;
    ncolumn = nlegend;
@@ -627,7 +720,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.05, 15, 1, 1, nrow, ncolumn, opt_array, 1.0, 1.0, 2.0,
  	       1., text_colors, text,
-@@ -407,7 +405,7 @@
+@@ -407,7 +405,7 @@ function ix33c()
    y = 0.1;
    nrow = 1;
    ncolumn = nlegend;
@@ -636,7 +729,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.05, 15, 1, 1, nrow, ncolumn, opt_array, 1.0, 1.0, 2.0,
  	       1., text_colors, text,
-@@ -422,7 +420,7 @@
+@@ -422,7 +420,7 @@ function ix33c()
    y = 0.;
    nrow = nlegend;
    ncolumn = 1;
@@ -645,7 +738,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.05, 15, 1, 1, nrow, ncolumn, opt_array, 1.0, 1.0, 2.0,
  	       1., text_colors, text,
-@@ -436,7 +434,7 @@
+@@ -436,7 +434,7 @@ function ix33c()
    y = 0.;
    nrow = nlegend;
    ncolumn = 1;
@@ -654,7 +747,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.05, 15, 1, 1, nrow, ncolumn, opt_array, 1.0, 1.0, 2.0,
  	       1., text_colors, text,
-@@ -450,7 +448,7 @@
+@@ -450,7 +448,7 @@ function ix33c()
    y = 0.;
    nrow = 6;
    ncolumn = 2;
@@ -663,7 +756,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.05, 15, 1, 1, nrow, ncolumn, opt_array, 1.0, 1.0, 2.0,
  	       1., text_colors, text,
-@@ -464,7 +462,7 @@
+@@ -464,7 +462,7 @@ function ix33c()
    y = 0.;
    nrow = 6;
    ncolumn = 2;
@@ -672,7 +765,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.05, 15, 1, 1, nrow, ncolumn, opt_array, 1.0, 1.0, 2.0,
  	       1., text_colors, text,
-@@ -478,7 +476,7 @@
+@@ -478,7 +476,7 @@ function ix33c()
    y = 0.;
    nrow = 3;
    ncolumn = 3;
@@ -681,7 +774,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.05, 15, 1, 1, nrow, ncolumn, opt_array, 1.0, 1.0, 2.0,
  	       1., text_colors, text,
-@@ -568,7 +566,7 @@
+@@ -568,7 +566,7 @@ function ix33c()
      nrow = min(3, nlegend);
      ncolumn = 0;
  
@@ -690,7 +783,7 @@ Last-Update: 2014-09-23
          pllegend( opt, position, x, y,
                   0.025, 15, 1, 1, nrow, ncolumn, opt_array, 1.0, 1.0, 1.5,
                   1., text_colors, text,
-@@ -685,7 +683,7 @@
+@@ -685,7 +683,7 @@ function ix33c()
  
    opt = opt_base;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -699,7 +792,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
                 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
                 0., text_colors, text,
-@@ -716,7 +714,7 @@
+@@ -716,7 +714,7 @@ function ix33c()
    opt = opt_base;
    x += legend_width;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -708,7 +801,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
  	       0., text_colors, text,
-@@ -747,7 +745,7 @@
+@@ -747,7 +745,7 @@ function ix33c()
    opt = opt_base;
    x += legend_width;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -717,7 +810,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
  	       0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
  	       0., text_colors, text,
-@@ -781,7 +779,7 @@
+@@ -781,7 +779,7 @@ function ix33c()
    y += max_height;
    max_height = 0.;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -726,7 +819,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
                 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
                 0., text_colors, text,
-@@ -812,7 +810,7 @@
+@@ -812,7 +810,7 @@ function ix33c()
    opt = opt_base;
    x += legend_width;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -735,7 +828,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
                 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
                 0., text_colors, text,
-@@ -843,7 +841,7 @@
+@@ -843,7 +841,7 @@ function ix33c()
    opt = opt_base;
    x += legend_width;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -744,7 +837,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
                 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
                 0., text_colors, text,
-@@ -878,7 +876,7 @@
+@@ -878,7 +876,7 @@ function ix33c()
    y += max_height;
    max_height = 0.;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -753,7 +846,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
                 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
                 0., text_colors, text',
-@@ -905,7 +903,7 @@
+@@ -905,7 +903,7 @@ function ix33c()
    opt = opt_base;
    x += legend_width;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -762,7 +855,7 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
                 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
                 0., text_colors, text',
-@@ -933,7 +931,7 @@
+@@ -933,7 +931,7 @@ function ix33c()
    opt = opt_base;
    x += legend_width;
    plscol0a( 15, 32, 32, 32, 0.70 );
@@ -771,9 +864,11 @@ Last-Update: 2014-09-23
        pllegend( opt, position, x, y,
                 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, text_scale, 2.0,
                 0., text_colors, text',
+diff --git a/plplot_test/test_octave.sh.in b/plplot_test/test_octave.sh.in
+index 11392c1..14ff8cb 100755
 --- a/plplot_test/test_octave.sh.in
 +++ b/plplot_test/test_octave.sh.in
-@@ -35,7 +35,12 @@
+@@ -35,7 +35,12 @@ echo "$TOPDIR"
  export LD_LIBRARY_PATH="$TOPDIR"/src:"$TOPDIR"/lib/csa:"$TOPDIR"/lib/nn
  
  # Launch an Octave script that exercises all the demos
@@ -787,7 +882,7 @@ Last-Update: 2014-09-23
  
  # Check verbose_test variable
  if (strcmp(getenv("verbose_test"),"on") == 1)
-@@ -46,13 +51,15 @@
+@@ -46,13 +51,15 @@ endif
  
  plplot_stub;
  t = char(strsplit("$options", "-")); 
@@ -810,7 +905,7 @@ Last-Update: 2014-09-23
  
  # Subset of p examples selected that seem to work ok with noninteractive
  # devices.
-@@ -80,13 +87,15 @@
+@@ -80,13 +87,15 @@ for i=[0:18 19 20:31 33] ;
  	printf("%s\n",cmd);
      endif
      t = char(strsplit("$options", "-")); 
@@ -833,75 +928,3 @@ Last-Update: 2014-09-23
      device="$device";
      plSetOpt("dev", device);
  #o trailer on filename e.g., x01o.ps) to distinguish from other
---- a/examples/octave/x01c.m
-+++ b/examples/octave/x01c.m
-@@ -85,7 +85,7 @@
-     printf("\n\nYou are in Locate mode. Click any mouse button or press any key\n\
- and the current cursor position will be printed.\n\
- Please keep <NumLock> and <CapsLock> off.\n\
--Terminate locate mode with the <Enter> key.\n\ 
-+Terminate locate mode with the <Enter> key.\n\
- Finish the plot with the <Enter> or <ESC> key or the 3d mouse button\n");
- 
-     fflush(stdout);
---- a/examples/octave/x04c.m
-+++ b/examples/octave/x04c.m
-@@ -155,7 +155,7 @@
- 
-   plscol0a( 15, 32, 32, 32, 0.70 );
- 
--  [legend_width, legend_height] = \
-+  [legend_width, legend_height] = ...
-       pllegend( bitor(PL_LEGEND_BACKGROUND, PL_LEGEND_BOUNDING_BOX), 0, 0.0, 0.0,
-                0.1, 15, 1, 1, 0, 0, opt_array, 1.0, 1.0, 2.0,
-                1., text_colors, text, 
---- a/examples/octave/x07c.m
-+++ b/examples/octave/x07c.m
-@@ -24,7 +24,7 @@
-   ## Initialize plplot */
-   plinit();
- 
--  base=[0, 100, 0, 100, 200, 500, 600, 700, 800, 900, \
-+  base=[0, 100, 0, 100, 200, 500, 600, 700, 800, 900, ...
- 	2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900];
-   
-   plfontld(0);
---- a/examples/octave/x08c.m
-+++ b/examples/octave/x08c.m
-@@ -101,10 +101,10 @@
- 	plmtex("t", 1.0, 0.5, 0.5, title(k,:));
- 	plcol0(1);
- 	if (rosen)
--          plw3d(1.0, 1.0, 1.0, -1.5, 1.5, -0.5, 1.5, zmin, zmax, \ 
-+          plw3d(1.0, 1.0, 1.0, -1.5, 1.5, -0.5, 1.5, zmin, zmax,
-                 alt(k), az(k));
- 	else
--	  plw3d(1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, zmin, zmax, \
-+	  plw3d(1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, zmin, zmax,
- 		alt(k), az(k));
- 	endif
- 
---- a/examples/octave/x26c.m
-+++ b/examples/octave/x26c.m
-@@ -244,7 +244,7 @@
- 
-   plscol0a( 15, 32, 32, 32, 0.70 );
- 
--  [legend_width, legend_height] = \
-+  [legend_width, legend_height] = ...
-       pllegend( bitor(PL_LEGEND_BACKGROUND, PL_LEGEND_BOUNDING_BOX), 0, 0.0, 0.0,
-                0.1, 15, 1, 1, 0, 0, opt_array, 1.0, 1.0, 2.0,
-                1., text_colors, text, 
---- a/examples/octave/x29c.m
-+++ b/examples/octave/x29c.m
-@@ -122,8 +122,8 @@
-   i = 0:npts-1;
-   x = i*60.0*60.0*24.0;
-   p = asin(0.39795*cos(0.2163108 + 2*atan(0.9671396*tan(0.00860*(i-186)))));
--  d = 24.0 - (24.0/pi)*acos( (sin(0.8333*pi/180.0) + \
--			      sin(lat*pi/180.0)*sin(p)) \
-+  d = 24.0 - (24.0/pi)*acos( (sin(0.8333*pi/180.0) +
-+			      sin(lat*pi/180.0)*sin(p))
- 			    ./(cos(lat*pi/180.0)*cos(p)) ); 
-   y = d;
-   
diff --git a/debian/patches/Fix-wxwidgets-linkage.patch b/debian/patches/Fix-wxwidgets-linkage.patch
new file mode 100644
index 0000000..cb11703
--- /dev/null
+++ b/debian/patches/Fix-wxwidgets-linkage.patch
@@ -0,0 +1,21 @@
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Fix wxwidgets linkage
+
+Upstream patch to fix wxwidgets linkage.
+---
+ bindings/wxwidgets/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bindings/wxwidgets/CMakeLists.txt b/bindings/wxwidgets/CMakeLists.txt
+index 601814d..86a5f05 100644
+--- a/bindings/wxwidgets/CMakeLists.txt
++++ b/bindings/wxwidgets/CMakeLists.txt
+@@ -84,6 +84,7 @@ if(ENABLE_wxwidgets AND ENABLE_cxx)
+   target_link_libraries(
+     plplotwxwidgets${LIB_TAG}
+     plplotcxx${LIB_TAG} 
++    plplot${LIB_TAG}
+     ${wxwidgets_LINK_FLAGS}
+     )
+ 
diff --git a/debian/patches/Proper-use-of-the-rmpath-function.patch b/debian/patches/Proper-use-of-the-rmpath-function.patch
new file mode 100644
index 0000000..f95ab76
--- /dev/null
+++ b/debian/patches/Proper-use-of-the-rmpath-function.patch
@@ -0,0 +1,23 @@
+From: Rafael Laboissiere <rafael at laboissiere.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Proper use of the rmpath function
+
+---
+ bindings/octave/PLplot/toggle_plplot_use.m | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/bindings/octave/PLplot/toggle_plplot_use.m b/bindings/octave/PLplot/toggle_plplot_use.m
+index f59c0d4..c4fa644 100644
+--- a/bindings/octave/PLplot/toggle_plplot_use.m
++++ b/bindings/octave/PLplot/toggle_plplot_use.m
+@@ -39,9 +39,7 @@ endif
+ use_plplot_path = plplot_octave_path;
+ plplot_path_to_remove = char(strsplit(genpath(use_plplot_path),pathsep));
+ for use_plplot_i=1:size(plplot_path_to_remove)(1)
+-  if (findstr(path,deblank(plplot_path_to_remove(use_plplot_i,:))) > 0)
+-    rmpath(deblank(plplot_path_to_remove(use_plplot_i,:)));
+-  endif
++  rmpath(plplot_path_to_remove{use_plplot_i});
+ endfor
+ 
+ if (strcmp (use_plplot_state, "on"))
diff --git a/debian/patches/Remove-nondfsg-dirs.patch b/debian/patches/Remove-nondfsg-dirs.patch
new file mode 100644
index 0000000..3bae045
--- /dev/null
+++ b/debian/patches/Remove-nondfsg-dirs.patch
@@ -0,0 +1,20 @@
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Remove nondfsg dirs
+
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d1e2478..769dd80 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -199,7 +199,6 @@ add_subdirectory(examples)
+ add_subdirectory(plplot_test)
+ add_subdirectory(scripts)
+ add_subdirectory(doc)
+-add_subdirectory(www)
+ add_subdirectory(pkgcfg)
+ summary()
+ 
diff --git a/debian/patches/set_cmake_policy b/debian/patches/Set-cmake-policy.patch
similarity index 67%
rename from debian/patches/set_cmake_policy
rename to debian/patches/Set-cmake-policy.patch
index a0ee67c..23d2ca8 100644
--- a/debian/patches/set_cmake_policy
+++ b/debian/patches/Set-cmake-policy.patch
@@ -1,11 +1,17 @@
-Description: Explicitly set old behaviour for cmake policy CMP0026. Required for cmake 3.
-Author: Andrew Ross <andrewross at users.sourceforge.net>
-Last-Update: 2014-09-17
-Origin: upstream
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 3 Jul 2017 22:39:22 +0200
+Subject: Set cmake policy
 
+---
+ CMakeLists.txt          | 4 ++++
+ examples/CMakeLists.txt | 5 +++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f8ecd81..d1e2478 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -54,6 +54,10 @@
+@@ -54,6 +54,10 @@ if(POLICY CMP0023)
    message(STATUS "Explicitly setting policy CMP0023 to OLD")
    cmake_policy(SET CMP0023 OLD)
  endif(POLICY CMP0023)
@@ -16,9 +22,11 @@ Origin: upstream
  
  # It is a fatal error if no working C compiler is available to build
  # the PLplot core C library and core C examples.  All other compilers
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index 51ec58b..b8ff0a8 100644
 --- a/examples/CMakeLists.txt
 +++ b/examples/CMakeLists.txt
-@@ -397,6 +397,11 @@
+@@ -397,6 +397,11 @@ else(CORE_BUILD)
      message(STATUS "Explicitly setting policy CMP0023 to OLD")
      cmake_policy(SET CMP0023 OLD)
    endif(POLICY CMP0023)
diff --git a/debian/patches/Unset-python-path.patch b/debian/patches/Unset-python-path.patch
new file mode 100644
index 0000000..7800548
--- /dev/null
+++ b/debian/patches/Unset-python-path.patch
@@ -0,0 +1,23 @@
+From: Andrew Ross <andrewross at users.sourceforge.net>
+Date: Mon, 2 Apr 2012 15:30:25 +0100
+Subject: Unset python path
+
+No need to explicitly set python path with debian since the default path is
+correct. This ensure the examples work with multiple version of python.
+---
+ examples/python/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt
+index 5865247..e3e96ab 100644
+--- a/examples/python/CMakeLists.txt
++++ b/examples/python/CMakeLists.txt
+@@ -245,7 +245,7 @@ if(CORE_BUILD)
+     @ONLY
+     )
+ 
+-  set(python_location1 ${PYTHON_INSTDIR})
++  set(python_location1)
+   set(python_location2)
+   set(python_location3)
+   set(python_location4)
diff --git a/debian/patches/add-tcl-multiarch.diff b/debian/patches/add-tcl-multiarch.diff
deleted file mode 100644
index e7a940b..0000000
--- a/debian/patches/add-tcl-multiarch.diff
+++ /dev/null
@@ -1,83 +0,0 @@
-Description: Change the location of tcl binaries to make the packages multiarch compliant.
-Author: Andrew Ross <andrewross at users.sourceforge.net>
-Index: plplot-5.10.0/bindings/tk/CMakeLists.txt
-===================================================================
---- plplot-5.10.0.orig/bindings/tk/CMakeLists.txt	2014-02-28 09:59:44.890958194 +0000
-+++ plplot-5.10.0/bindings/tk/CMakeLists.txt	2014-02-28 09:59:44.870958194 +0000
-@@ -50,7 +50,7 @@
- 
-   install(TARGETS plserver
-     EXPORT export_plplot
--    DESTINATION ${BIN_DIR}
-+    DESTINATION ${LIBEXEC_DIR}
-     )
- endif(ENABLE_tkX)
- 
-Index: plplot-5.10.0/cmake/modules/instdirs.cmake
-===================================================================
---- plplot-5.10.0.orig/cmake/modules/instdirs.cmake	2014-02-28 09:59:44.890958194 +0000
-+++ plplot-5.10.0/cmake/modules/instdirs.cmake	2014-02-28 09:59:44.870958194 +0000
-@@ -71,6 +71,12 @@
- CACHE PATH "install location for man documentation"
- )
- 
-+set(
-+CMAKE_INSTALL_LIBEXECDIR
-+${CMAKE_INSTALL_LIBDIR}/${PACKAGE}${VERSION}/bin
-+CACHE PATH "install location for executables called by other executables or libraries"
-+)
-+
- # Configured PLplot install locations determined from user-updatable
- # cached values above.
- 
-@@ -112,6 +118,9 @@
- # Man pages.
- set(MAN_DIR ${CMAKE_INSTALL_MANDIR})
- 
-+# Libexec.
-+set(LIBEXEC_DIR ${CMAKE_INSTALL_LIBEXECDIR})
-+
- # Other path-related variables.
- 
- # Absolute path of top-level build directory.
-Index: plplot-5.10.0/plplot_config.h.in
-===================================================================
---- plplot-5.10.0.orig/plplot_config.h.in	2014-02-28 09:59:44.890958194 +0000
-+++ plplot-5.10.0/plplot_config.h.in	2014-02-28 09:59:44.874958194 +0000
-@@ -20,6 +20,9 @@
- // Location of executables
- #define BIN_DIR                  "@BIN_DIR@"
- 
-+// Location of library executables
-+#define LIBEXEC_DIR              "@LIBEXEC_DIR@"
-+
- // Location of Build tree
- #define BUILD_DIR                "@BUILD_DIR@"
- 
-Index: plplot-5.10.0/src/plctrl.c
-===================================================================
---- plplot-5.10.0.orig/src/plctrl.c	2014-02-28 09:59:44.890958194 +0000
-+++ plplot-5.10.0/src/plctrl.c	2014-02-28 09:59:44.878958194 +0000
-@@ -2124,6 +2124,7 @@
- //!	current directory
- //!	PLPLOT_HOME_ENV/bin = $(PLPLOT_HOME)/bin
- //!	BIN_DIR
-+//!	LIBEXEC_DIR
- //!
- //! The caller must free the returned pointer (points to malloc'ed memory)
- //! when finished with it.
-@@ -2189,6 +2190,14 @@
-     if ( !plFindName( fs ) )
-         return fs;
- #endif
-+
-+// LIBEXEC_DIR
-+
-+#if defined ( LIBEXEC_DIR )
-+    plGetName( LIBEXEC_DIR, "", fn, &fs );
-+    if ( !plFindName( fs ) )
-+        return fs;
-+#endif
- 
- // Crapped out
- 
diff --git a/debian/patches/cmake-3.1.diff b/debian/patches/cmake-3.1.diff
deleted file mode 100644
index 0c32b3a..0000000
--- a/debian/patches/cmake-3.1.diff
+++ /dev/null
@@ -1,57 +0,0 @@
-Based on upstream commit 772223c638ecf5dc740c9f3dd7a6883c6d2c83d2 with a slight
-tweak to make the patch apply on our version of the source.
-
-commit 772223c638ecf5dc740c9f3dd7a6883c6d2c83d2
-Author: Alan W. Irwin <airwin at users.sourceforge.net>
-Date:   Sun Dec 7 09:06:08 2014 -0800
-
-    Adjust for internal CMake-3.1 pkg-config change.
-    
-    There is a report from Greg Jung <gvjung at gmail.com> that the
-    internal CMake command
-    
-    _pkg_check_modules_internal(0 0 ${_prefix} "${_package}")
-    
-    must be changed to
-    
-    _pkg_check_modules_internal(0 0 0 0 ${_prefix} "${_package}")
-    
-    for CMake-3.1 in order to build the cairo device properly.  Accordingly, I have made that adjustment.
-    
-    Tested by Alan W. Irwin <airwin at users> on Linux using CMake-3.0.2
-    by building the cairo device.
-    
-    N.B. currently untested for CMake-3.1.
-    
-    ToDo:
-    
-    Extensive tests on CMake-3.1 (once that version is closer to release)
-    still need to be done since the change in the pkg-config support by
-    CMake may need other adjustments as well.
-
---- a/cmake/modules/pkg-config.cmake
-+++ b/cmake/modules/pkg-config.cmake
-@@ -1,6 +1,6 @@
- # cmake/modules/pkg-config.cmake
- #
--# Copyright (C) 2006  Alan W. Irwin
-+# Copyright (C) 2006-2015 Alan W. Irwin
- #
- # This file is part of PLplot.
- #
-@@ -94,7 +94,14 @@
-     set(_xprefix ${_prefix})
-   endif(FORCE_EXTERNAL_STATIC)
-   
--  _pkg_check_modules_internal(0 0 ${_prefix} "${_package}")
-+  if(CMAKE_VERSION VERSION_LESS "3.1")
-+    _pkg_check_modules_internal(0 0 ${_prefix} "${_package}")
-+  elseif(CMAKE_VERSION VERSION_LESS "3.6.2")
-+    _pkg_check_modules_internal(0 0 0 0 ${_prefix} "${_package}")
-+  else(CMAKE_VERSION VERSION_LESS "3.6.2")
-+    _pkg_check_modules_internal(0 0 0 0 0 ${_prefix} "${_package}")
-+  endif(CMAKE_VERSION VERSION_LESS "3.6.2")
-+
-   if(${_prefix}_FOUND)
-     cmake_link_flags(${_link_FLAGS} "${${_xprefix}_LDFLAGS}")
-     # If libraries cannot be not found, then that is equivalent to whole
diff --git a/debian/patches/fix-lua-includes.diff b/debian/patches/fix-lua-includes.diff
deleted file mode 100644
index 55a1eee..0000000
--- a/debian/patches/fix-lua-includes.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: Fix for cmake lua support to work around problem that lua needs multiple include directories on Debian
-Author: Andrew Ross <andrewross at users.sourceforge.net>
-Last-Update: 2012-07-19
-
-===================================================================
-Index: plplot-5.10.0/cmake/modules/lua.cmake
-===================================================================
---- plplot-5.10.0.orig/cmake/modules/lua.cmake	2013-05-03 03:41:21.000000000 +0100
-+++ plplot-5.10.0/cmake/modules/lua.cmake	2014-02-28 09:52:40.000000000 +0000
-@@ -86,3 +86,11 @@
-     set(LUA_DIR ${LIB_DIR}/lua/${LUA_VERSION}/plplot)
-   endif(LUA_VERSION MATCHES "5\\.0")
- endif(ENABLE_lua)
-+
-+if(ENABLE_lua AND LUA51_FOUND)
-+  pkg_check_pkgconfig(lua5.1 includedir libdir linkflags1 cflags1 version1 _LUA)
-+  if(linkflags1)
-+    set(LUA_INCLUDE_DIR ${includedir})
-+  endif(linkflags1)
-+endif(ENABLE_lua AND LUA51_FOUND)
-+
diff --git a/debian/patches/fix-wxwidgets-linkage.diff b/debian/patches/fix-wxwidgets-linkage.diff
deleted file mode 100644
index e1317aa..0000000
--- a/debian/patches/fix-wxwidgets-linkage.diff
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Upstream patch to fix wxwidgets linkage.
-Author: Andrew Ross <andrewross at users.sourceforge.net>
-Last-Update: 2014-07-01
-Index: plplot-5.10.0/bindings/wxwidgets/CMakeLists.txt
-===================================================================
---- plplot-5.10.0.orig/bindings/wxwidgets/CMakeLists.txt	2013-12-19 01:35:00.000000000 +0000
-+++ plplot-5.10.0/bindings/wxwidgets/CMakeLists.txt	2014-07-01 12:25:05.556785342 +0100
-@@ -84,6 +84,7 @@
-   target_link_libraries(
-     plplotwxwidgets${LIB_TAG}
-     plplotcxx${LIB_TAG} 
-+    plplot${LIB_TAG}
-     ${wxwidgets_LINK_FLAGS}
-     )
- 
diff --git a/debian/patches/proper-path-handling.diff b/debian/patches/proper-path-handling.diff
deleted file mode 100644
index 9383bc5..0000000
--- a/debian/patches/proper-path-handling.diff
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Proper use of the rmpath function
-Author: Rafael Laboissiere <rafael at laboissiere.net>
-Last-Update: 2012-03-31
-
-Index: plplot-5.9.10/bindings/octave/PLplot/toggle_plplot_use.m
-===================================================================
---- plplot-5.9.10.orig/bindings/octave/PLplot/toggle_plplot_use.m	2013-10-01 13:05:57.927300532 +0100
-+++ plplot-5.9.10/bindings/octave/PLplot/toggle_plplot_use.m	2013-10-01 13:05:57.915300532 +0100
-@@ -39,9 +39,7 @@
- use_plplot_path = plplot_octave_path;
- plplot_path_to_remove = char(strsplit(genpath(use_plplot_path),pathsep));
- for use_plplot_i=1:size(plplot_path_to_remove)(1)
--  if (findstr(path,deblank(plplot_path_to_remove(use_plplot_i,:))) > 0)
--    rmpath(deblank(plplot_path_to_remove(use_plplot_i,:)));
--  endif
-+  rmpath(plplot_path_to_remove{use_plplot_i});
- endfor
- 
- if (strcmp (use_plplot_state, "on"))
diff --git a/debian/patches/remove_nondfsg_dirs b/debian/patches/remove_nondfsg_dirs
deleted file mode 100644
index 3ef2885..0000000
--- a/debian/patches/remove_nondfsg_dirs
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Remove the www directory from CMakeLists.txt. This directory is not used and is not shipped with the dfsg compliant version of the source in Debian.
-Author: Andrew Ross <andrewross at users.sourceforge.net>
-Last-Update: 2014-09-17
-Origin: upstream
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -199,7 +199,6 @@
- add_subdirectory(plplot_test)
- add_subdirectory(scripts)
- add_subdirectory(doc)
--add_subdirectory(www)
- add_subdirectory(pkgcfg)
- summary()
- 
diff --git a/debian/patches/series b/debian/patches/series
index b7e35cb..3576e74 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,14 +1,12 @@
-02_unset-python-path.diff
-#04_use-mkoctfile.diff
-proper-path-handling.diff
-fix-lua-includes.diff
-add-tcl-multiarch.diff
-#support-javac-options.diff
-octave_3.8_support.diff
-fix-wxwidgets-linkage.diff
-dont-check-for-hdf5_h
-fix_config_h_clash
-set_cmake_policy
-remove_nondfsg_dirs
-cmake-3.1.diff
-lena-images-removal.diff
+Unset-python-path.patch
+Proper-use-of-the-rmpath-function.patch
+Fix-lua-includes.patch
+Add-Tcl-multiarch.patch
+Fix-octave-3.8-support.patch
+Fix-wxwidgets-linkage.patch
+Dont-check-for-hdf5.h.patch
+Fix-config.h-clash.patch
+Set-cmake-policy.patch
+Remove-nondfsg-dirs.patch
+Adjust-for-internal-CMake-3.1-pkg-config-change.patch
+Build-without-non-free-lena-images.patch
diff --git a/debian/patches/support-javac-options.diff b/debian/patches/support-javac-options.diff
deleted file mode 100644
index 971b99d..0000000
--- a/debian/patches/support-javac-options.diff
+++ /dev/null
@@ -1,38 +0,0 @@
-Description: Allow the setting of javac option using CMAKE_JAVA_COMPILE_FLAGS.
-Author: Andrew Ross <andrewross at users.sourceforge.net>
-Origin: upstream
-Index: plplot-5.9.10/bindings/java/CMakeLists.txt
-===================================================================
---- plplot-5.9.10.orig/bindings/java/CMakeLists.txt	2010-05-14 22:19:09.000000000 +0100
-+++ plplot-5.9.10/bindings/java/CMakeLists.txt	2013-10-03 12:10:11.445188817 +0100
-@@ -200,7 +200,7 @@
-     add_custom_command(
-       OUTPUT ${output_file}
-       COMMAND ${CMAKE_Java_COMPILER} 
--      -classpath ${CMAKE_CURRENT_BINARY_DIR} ${srcfile} -d ${CMAKE_CURRENT_BINARY_DIR}
-+      -source 1.5 -target 1.5 -classpath ${CMAKE_CURRENT_BINARY_DIR} ${srcfile} -d ${CMAKE_CURRENT_BINARY_DIR}
-       DEPENDS ${srcfile} ${${output_file}_DEPENDS}
-       )
-   endforeach( srcfile ${JAVA_FILES_FULL} )
-Index: plplot-5.9.10/examples/java/CMakeLists.txt
-===================================================================
---- plplot-5.9.10.orig/examples/java/CMakeLists.txt	2012-10-03 22:16:31.000000000 +0100
-+++ plplot-5.9.10/examples/java/CMakeLists.txt	2013-10-03 12:11:01.541187504 +0100
-@@ -101,7 +101,7 @@
-     add_custom_command(
-       OUTPUT ${out_file}
-       COMMAND ${CMAKE_Java_COMPILER}
--      -classpath ${CMAKE_BINARY_DIR}/bindings/java -d ${CMAKE_CURRENT_BINARY_DIR} -encoding UTF-8 ${in_file}
-+      -source 1.5 -target 1.5 -classpath ${CMAKE_BINARY_DIR}/bindings/java -d ${CMAKE_CURRENT_BINARY_DIR} -encoding UTF-8 ${in_file}
-       DEPENDS ${in_file} ${files_plplot_core}
-       )
-     add_custom_target(x${STRING_INDEX}j ALL DEPENDS ${out_file})
-@@ -160,7 +160,7 @@
-     add_custom_command(
-       OUTPUT ${out_file}
-       COMMAND ${CMAKE_Java_COMPILER}
--      -classpath ${INSTALLED_JAR_FILE} -d ${CMAKE_CURRENT_BINARY_DIR} -encoding UTF-8 ${in_file}
-+      -source 1.5 -target 1.5 -classpath ${INSTALLED_JAR_FILE} -d ${CMAKE_CURRENT_BINARY_DIR} -encoding UTF-8 ${in_file}
-       DEPENDS ${in_file} ${INSTALLED_JAR_FILE}
-       )
-     add_custom_target(x${STRING_INDEX}j ALL DEPENDS ${out_file})

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/plplot.git



More information about the debian-science-commits mailing list