On 31/07/15 03:17, peter green wrote:
If/when I get a sucessful build I will upload to raspbian and post a further update to this bug. No intent to NMU in Debian.

After disabling octave support I ran into another less major issue. It seems that the package fails to build if tcl/tk 8.6 is installed because it gets confused about which version of tcl/tk it should be building for and ends up not building the tcl/tk support leading to a failure at the packaging stage. So I added some build-conflicts.

A debdiff for what I have uploaded to raspbian is attached, no intent to NMU in Debian.
diff -Nru plplot-5.10.0+dfsg/debian/changelog 
plplot-5.10.0+dfsg/debian/changelog
--- plplot-5.10.0+dfsg/debian/changelog 2014-09-23 12:51:20.000000000 +0000
+++ plplot-5.10.0+dfsg/debian/changelog 2015-07-31 11:14:31.000000000 +0000
@@ -1,3 +1,17 @@
+plplot (5.10.0+dfsg-1+rpi1) stretch-staging; urgency=medium
+
+  * Apply upstream patch to fix build with cmake 3.1 (Closes: 789619)
+  * Disable octave support as it's currently broken
+    + see my post to bug 789619 for further info on the error
+    + debian/rules and debian/control changes adapted from 5.10.0-0ubuntu5 
package by Matthias Klose
+    + also moved liboctave-dev build-depends to build-conflicts as upstream
+      buildsystem was trying to build octave stuff even without
+      debian/rules telling it to.
+  * Add tcl8.6 and tk8.6 to build-conflicts, having multiple versions of tcl/tk
+    arround seems to break the build.
+
+ -- Peter Michael Green <plugw...@raspbian.org>  Thu, 30 Jul 2015 23:17:26 
+0000
+
 plplot (5.10.0+dfsg-1) unstable; urgency=low
 
   * Repackage upstream source to remove non-DFSG compliant documentation. 
diff -Nru plplot-5.10.0+dfsg/debian/control plplot-5.10.0+dfsg/debian/control
--- plplot-5.10.0+dfsg/debian/control   2014-09-23 09:24:21.000000000 +0000
+++ plplot-5.10.0+dfsg/debian/control   2015-07-31 11:14:50.000000000 +0000
@@ -5,7 +5,7 @@
 Standards-Version: 3.9.5
 Build-Depends: cmake (>= 2.6.3), debhelper (>= 9), 
  tcl8.5-dev, tk8.5-dev, itcl3-dev, libx11-dev, libxext-dev,
- libxi-dev, gfortran, itk3-dev, iwidgets4, liboctave-dev,
+ libxi-dev, gfortran, itk3-dev, iwidgets4,
  m4, libqhull-dev (>= 2003.1-8), 
  libxml-parser-perl, libxml-dom-perl, libltdl3-dev, pkg-config, 
  slice, python-gtk2-dev, libwxgtk3.0-dev, 
@@ -18,7 +18,7 @@
  xvfb, xauth
 Build-Depends-Indep: xmlto, fop, docbook-xml, docbook-xsl, docbook2x, 
  dblatex, texlive-xetex, ghostscript, lmodern, fonts-freefont-ttf
-Build-Conflicts: libplplot5
+Build-Conflicts: libplplot5, liboctave-dev, tcl8.6, tk8.6
 X-Python-Version: >=2.4
 Homepage: http://www.plplot.org
 Vcs-Svn: https://plplot.svn.sourceforge.net/svnroot/plplot/trunk/debian
@@ -331,24 +331,24 @@
  This package provides Python bindings to allow use of the PLplot API in 
  qt applications.
 
-Package: octave-plplot
-Architecture: any
-Pre-Depends: ${misc:Pre-Depends}
-Multi-Arch: same
-Depends: libplplot12 (= ${binary:Version}), octave (>= 3.6.1), 
${shlibs:Depends},
- ${misc:Depends}
-Description: Octave support for PLplot, a plotting library
- PLplot is relatively small, portable, freely distributable, and is rich
- enough to satisfy most users.  It has a wide range of plot types including
- line (linear, log), contour, 3D, fill, and almost 1000 characters
- (including Greek and mathematical) in its extended font set.  The package
- is designed to make it easy to quickly get graphical output; only a
- handful of function calls is typically required.  For more advanced use,
- virtually all aspects of plotting are configurable.
- .
- This package contains the Octave bindings for PLplot.  It provides an
- almost drop-in replacement for the traditional Gnuplot graphical
- interface in Octave. Examples are also provided.
+#Package: octave-plplot
+#Architecture: any
+#Pre-Depends: ${misc:Pre-Depends}
+#Multi-Arch: same
+#Depends: libplplot12 (= ${binary:Version}), octave (>= 3.6.1), 
${shlibs:Depends},
+# ${misc:Depends}
+#Description: Octave support for PLplot, a plotting library
+# PLplot is relatively small, portable, freely distributable, and is rich
+# enough to satisfy most users.  It has a wide range of plot types including
+# line (linear, log), contour, 3D, fill, and almost 1000 characters
+# (including Greek and mathematical) in its extended font set.  The package
+# is designed to make it easy to quickly get graphical output; only a
+# handful of function calls is typically required.  For more advanced use,
+# virtually all aspects of plotting are configurable.
+# .
+# This package contains the Octave bindings for PLplot.  It provides an
+# almost drop-in replacement for the traditional Gnuplot graphical
+# interface in Octave. Examples are also provided.
 
 Package: libplplot-ada1
 Architecture: any
diff -Nru plplot-5.10.0+dfsg/debian/control.in 
plplot-5.10.0+dfsg/debian/control.in
--- plplot-5.10.0+dfsg/debian/control.in        2014-09-23 09:24:11.000000000 
+0000
+++ plplot-5.10.0+dfsg/debian/control.in        2015-07-31 11:15:04.000000000 
+0000
@@ -5,7 +5,7 @@
 Standards-Version: 3.9.5
 Build-Depends: cmake (>= 2.6.3), debhelper (>= 9), 
  tcl8.5-dev, tk8.5-dev, itcl3-dev, libx11-dev, libxext-dev,
- libxi-dev, gfortran, itk3-dev, iwidgets4, liboctave-dev,
+ libxi-dev, gfortran, itk3-dev, iwidgets4,
  m4, libqhull-dev (>= 2003.1-8), 
  libxml-parser-perl, libxml-dom-perl, libltdl3-dev, pkg-config, 
  slice, python-gtk2-dev, libwxgtk3.0-dev, 
@@ -18,7 +18,7 @@
  xvfb, xauth
 Build-Depends-Indep: xmlto, fop, docbook-xml, docbook-xsl, docbook2x, 
  dblatex, texlive-xetex, ghostscript, lmodern, fonts-freefont-ttf
-Build-Conflicts: libplplot5
+Build-Conflicts: libplplot5, liboctave-dev, tcl8.6, tk8.6
 X-Python-Version: >=2.4
 Homepage: http://www.plplot.org
 Vcs-Svn: https://plplot.svn.sourceforge.net/svnroot/plplot/trunk/debian
@@ -331,24 +331,24 @@
  This package provides Python bindings to allow use of the PLplot API in 
  qt applications.
 
-Package: octave-plplot
-Architecture: any
-Pre-Depends: ${misc:Pre-Depends}
-Multi-Arch: same
-Depends: libplplot12 (= ${binary:Version}), octave (>= 3.6.1), 
${shlibs:Depends},
- ${misc:Depends}
-Description: Octave support for PLplot, a plotting library
- PLplot is relatively small, portable, freely distributable, and is rich
- enough to satisfy most users.  It has a wide range of plot types including
- line (linear, log), contour, 3D, fill, and almost 1000 characters
- (including Greek and mathematical) in its extended font set.  The package
- is designed to make it easy to quickly get graphical output; only a
- handful of function calls is typically required.  For more advanced use,
- virtually all aspects of plotting are configurable.
- .
- This package contains the Octave bindings for PLplot.  It provides an
- almost drop-in replacement for the traditional Gnuplot graphical
- interface in Octave. Examples are also provided.
+#Package: octave-plplot
+#Architecture: any
+#Pre-Depends: ${misc:Pre-Depends}
+#Multi-Arch: same
+#Depends: libplplot12 (= ${binary:Version}), octave (>= 3.6.1), 
${shlibs:Depends},
+# ${misc:Depends}
+#Description: Octave support for PLplot, a plotting library
+# PLplot is relatively small, portable, freely distributable, and is rich
+# enough to satisfy most users.  It has a wide range of plot types including
+# line (linear, log), contour, 3D, fill, and almost 1000 characters
+# (including Greek and mathematical) in its extended font set.  The package
+# is designed to make it easy to quickly get graphical output; only a
+# handful of function calls is typically required.  For more advanced use,
+# virtually all aspects of plotting are configurable.
+# .
+# This package contains the Octave bindings for PLplot.  It provides an
+# almost drop-in replacement for the traditional Gnuplot graphical
+# interface in Octave. Examples are also provided.
 
 [ADA:Package: libplplot-ada1
 Architecture: any
diff -Nru plplot-5.10.0+dfsg/debian/patches/cmake-3.1.diff 
plplot-5.10.0+dfsg/debian/patches/cmake-3.1.diff
--- plplot-5.10.0+dfsg/debian/patches/cmake-3.1.diff    1970-01-01 
00:00:00.000000000 +0000
+++ plplot-5.10.0+dfsg/debian/patches/cmake-3.1.diff    2015-07-31 
00:07:59.000000000 +0000
@@ -0,0 +1,57 @@
+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 <air...@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 <gvj...@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@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.
+
+Index: plplot-5.10.0+dfsg/cmake/modules/pkg-config.cmake
+===================================================================
+--- plplot-5.10.0+dfsg.orig/cmake/modules/pkg-config.cmake
++++ plplot-5.10.0+dfsg/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,12 @@ macro(pkg_check_pkgconfig _package _incl
+     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}")
++  else(CMAKE_VERSION VERSION_LESS "3.1")
++    _pkg_check_modules_internal(0 0 0 0 ${_prefix} "${_package}")
++  endif(CMAKE_VERSION VERSION_LESS "3.1")
++    
+   if(${_prefix}_FOUND)
+     cmake_link_flags(${_link_FLAGS} "${${_xprefix}_LDFLAGS}")
+     # If libraries cannot be not found, then that is equivalent to whole
diff -Nru plplot-5.10.0+dfsg/debian/patches/series 
plplot-5.10.0+dfsg/debian/patches/series
--- plplot-5.10.0+dfsg/debian/patches/series    2014-09-17 09:03:40.000000000 
+0000
+++ plplot-5.10.0+dfsg/debian/patches/series    2015-07-31 00:03:36.000000000 
+0000
@@ -10,3 +10,4 @@
 fix_config_h_clash
 set_cmake_policy
 remove_nondfsg_dirs
+cmake-3.1.diff
diff -Nru plplot-5.10.0+dfsg/debian/rules plplot-5.10.0+dfsg/debian/rules
--- plplot-5.10.0+dfsg/debian/rules     2014-09-17 14:12:23.000000000 +0000
+++ plplot-5.10.0+dfsg/debian/rules     2015-07-31 02:08:57.000000000 +0000
@@ -11,11 +11,16 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# Paths for Octave
-MDIR = $(shell octave-config --print LOCALAPIFCNFILEDIR)
-OCTDIR = $(shell octave-config --print LOCALAPIOCTFILEDIR)
+with_oct := $(if $(filter octave-plplot, $(shell dh_listpackages)),yes)
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) 
+ifeq ($(with_oct),yes)
+  # Paths for Octave
+  MDIR = $(shell octave-config --print LOCALAPIFCNFILEDIR)
+  OCTDIR = $(shell octave-config --print LOCALAPIOCTFILEDIR)
+  octver := $(shell octave-config -v)
+endif
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 version                := $(shell perl debian/get-upstream-version.pl < 
cmake/modules/plplot_version.cmake)
 libpkg          := libplplot12
@@ -28,7 +33,6 @@
 debdoc         := $(debshr)/doc
 debinfo                := $(debshr)/info
 debex          := $(debshr)/plplot$(version)/examples
-octver         := $(shell octave-config -v)
 
 # Note cmake ignores CPPFLAGS so add them to CFLAGS and CXXFLAGS as a work 
around
 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) \
@@ -79,10 +83,13 @@
 CONFIGURE_OPTIONS = -DBUILD_TEST=ON \
        -DBUILD_DOC=OFF -DCMAKE_INSTALL_PREFIX=/usr \
         -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
-       -DOCTAVE_OCT_DIR=$(OCTDIR) \
        -DUSE_RPATH=OFF -DPLD_psttf=OFF -DENABLE_tk=ON \
         -DTCL_TCLSH=/usr/bin/tclsh8.5 \
-       $(ADA_OPTIONS) $(JAVA_OPTIONS) 
+       $(ADA_OPTIONS) $(JAVA_OPTIONS)
+
+ifeq ($(with_oct),yes)
+  CONFIGURE_OPTIONS += -DOCTAVE_OCT_DIR=$(OCTDIR)
+endif
 
 BUILD_DIR = $(debbase)/build_tmp
 SRC_DIR = $(shell pwd)
@@ -113,13 +120,13 @@
        touch build-arch-stamp
 
 build-indep: build-indep-stamp
-build-indep-stamp: 
+build-indep-stamp:
        dh_testdir
        ( cd $(BUILD_DIR) ; $(CMAKE) $(SRC_DIR) $(CONFIGURE_OPTIONS) 
-DBUILD_DOC=ON ; \
        cd doc ; $(MAKE)  )
        touch build-indep-stamp
 
-clean: 
+clean:
        dh_testdir
        dh_testroot
        rm -f build-arch-stamp build-indep-stamp install-arch-stamp 
install-indep-stamp \
@@ -142,7 +149,7 @@
        dh_movefiles --package=libplplot-d
 ifeq ($(BUILD_ADA),yes)
        dh_movefiles --package=libplplot-ada1
-       dh_movefiles --package=libplplot-ada1-dev 
+       dh_movefiles --package=libplplot-ada1-dev
 endif
        dh_movefiles --package=libplplot-dev
        dh_movefiles --package=$(libpkg)
@@ -151,9 +158,11 @@
        dh_testdir
        dh_testroot
 
-       # Strip bindings/octave/plplot_octave.oct as this is missed by 
-        # dh_strip.
+ifeq ($(with_oct),yes)
+       #Strip bindings/octave/plplot_octave.oct as this is missed by.
+       # dh_strip.
        strip --strip-unneeded --remove-section=.comment 
$(BUILD_DIR)/bindings/octave/plplot_octave.oct
+endif
 
        ( cd $(BUILD_DIR) ; \
          $(MAKE) DESTDIR=$(debtmp) install )
@@ -169,8 +178,8 @@
        mv $(debex) $(debdoc)/$(libpkg)
 
        for i in libplplot-dev plplot-tcl plplot-tcl-bin plplot-tcl-dev \
-               plplot12-driver-xwin octave-plplot                      \
-               python-plplot-qt                                        \
+               plplot12-driver-xwin octave-plplot python-plplot-qt     \
+               $(if $(filter yes,$(with_oct)),octave-plplot)           \
                python-plplot libplplot-c++11 plplot12-driver-wxwidgets \
                plplot12-driver-qt libplplot-java                       \
                plplot12-driver-cairo libplplot-fortran10               \
@@ -245,7 +254,9 @@
        dh_makeshlibs -V -a
        dh_shlibdeps -a --no-package=octave-plplot -L $(libpkg) \
           -l 
$(debbase)/$(libpkg)/usr/lib/$(DEB_HOST_MULTIARCH):$(debbase)/plplot-tcl/usr/lib/$(DEB_HOST_MULTIARCH)
+ifeq ($(with_oct),yes)
        dpkg-shlibdeps -Tdebian/octave-plplot.substvars 
-S$(debbase)/$(libpkg)/usr/lib/*.so* -S/usr/lib/$(octver)/*.so* 
$(debbase)/octave-plplot/$(OCTDIR)/plplot_octave.oct
+endif
        dh_installdeb -a
 
         # Replace tk copied files with symlinks
@@ -262,7 +273,7 @@
        uscan --force-download
 
 .PHONY: build clean binary-indep binary-arch binary config \
-        control 
+        control
 
 .NOTPARALLEL:
 

Reply via email to