From 2e0ffbf74016d34faedb79a455cb9ad2e1f9f0f0 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 31 Mar 2008 15:12:19 +0200 Subject: [PATCH] Switched to octave3.0. * Added octave3.0.dpatch. * Added dpatch to the build-deps. Thanks to Thomas Weber for his patches! --- debian/changelog | 8 +++++ debian/control | 7 ++--- debian/patches/00list | 2 ++ debian/patches/octave3.0.dpatch | 52 +++++++++++++++++++++++++++++++++ debian/rules | 7 +++-- 5 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 debian/patches/00list create mode 100644 debian/patches/octave3.0.dpatch diff --git a/debian/changelog b/debian/changelog index 71ac7c0..9456791 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +pfstools (1.6.4-2) unstable; urgency=low + + * Switched to octave3.0, thanks to Thomas Weber for the patches + (Closes: #458131). + - Added octave3.0.dpatch including required changes for octave 3.0. + + -- Sebastian Harl Mon, 31 Mar 2008 15:08:56 +0200 + pfstools (1.6.4-1) unstable; urgency=low * New upstream release. diff --git a/debian/control b/debian/control index 6401449..65fc51f 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,7 @@ Section: graphics Priority: optional Maintainer: Debian PhotoTools Maintainers Uploaders: Sebastian Harl -Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.6), gfortran, autotools-dev, libqt3-mt-dev, libmagick++9-dev, libtiff4-dev, libopenexr-dev, libnetpbm10-dev, octave2.1-headers, tetex-bin, freeglut3-dev -Build-Conflicts: octave2.9-headers +Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.6), dpatch, gfortran, autotools-dev, libqt3-mt-dev, libmagick++9-dev, libtiff4-dev, libopenexr-dev, libnetpbm10-dev, octave3.0-headers, tetex-bin, freeglut3-dev Standards-Version: 3.7.3 Homepage: http://www.mpi-inf.mpg.de/resources/pfstools/ Vcs-Git: git://git.debian.org/git/pkg-phototools/pfstools.git @@ -13,7 +12,7 @@ Vcs-Browser: http://git.debian.org/?p=pkg-phototools/pfstools.git Package: pfstools Architecture: any Depends: ${shlibs:Depends} -Recommends: pfsglview | pfsview, pfstmo, octave, octave-pfstools +Recommends: pfsglview | pfsview, pfstmo, octave3.0, octave-pfstools Suggests: dcraw, exrtools, imagemagick Description: command line HDR manipulation programs pfstools is a set of command line (and two GUI) programs for reading, @@ -90,7 +89,7 @@ Description: C++ library to read and write pfs files Package: octave-pfstools Section: math Architecture: any -Depends: octave2.1, ${shlibs:Depends} +Depends: octave3.0, ${shlibs:Depends} Description: octave bindings for pfstools PFS is a high-dynamic range (HDR) image format. It is an attempt to integrate existing file formats by providing a simple data format that can be used to diff --git a/debian/patches/00list b/debian/patches/00list new file mode 100644 index 0000000..f68e5a0 --- /dev/null +++ b/debian/patches/00list @@ -0,0 +1,2 @@ +octave3.0.dpatch + diff --git a/debian/patches/octave3.0.dpatch b/debian/patches/octave3.0.dpatch new file mode 100644 index 0000000..3de9acd --- /dev/null +++ b/debian/patches/octave3.0.dpatch @@ -0,0 +1,52 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## octave3.0.dpatch by Thomas Weber +## +## DP: Changes required to switch to octave3.0. + +@DPATCH@ + +--- a/src/octave/pfsopen.cpp ++++ b/src/octave/pfsopen.cpp +@@ -54,8 +54,9 @@ DEFUN_DLD( pfsopen, args, , helpString) + return retval; + } + +- if( !args(0).is_string() && !args(0).is_stream() ) { ++ if( !args(0).is_string() && !args(0).is_real_scalar() ) { + error( SCRIPT_NAME ": expected file name or file descriptor as the first argument!"); ++ // file descriptors are represented as integers (stored as doubles) in Octave 3.0 + return retval; + } + +@@ -120,8 +121,7 @@ DEFUN_DLD( pfsopen, args, , helpString) + } + } else { + // File descriptor given +- octave_stream fid = args(0).stream_value(); +- int fd = dup( fid.file_number() ); ++ int fd = dup( (int) args(0).scalar_value() ); + if( writeMode ) { + fh = fdopen( fd, "wb" ); + if( fh == NULL ) { +--- a/src/octave/pfsoctavelum ++++ b/src/octave/pfsoctavelum +@@ -33,7 +33,7 @@ if( length( argv ) != 1 ) + error( "Expecting exactly one parameter with octave code to be execuded" ); + endif + +-command = argv{1}; ++command = argv(){1}; + + ## Add missing ';' + if( command(length(command)) != ";" ) +--- a/src/octave/pfsoctavergb ++++ b/src/octave/pfsoctavergb +@@ -33,7 +33,7 @@ if( length( argv ) != 1 ) + error( "Expecting exactly one parameter with octave code to be execuded" ); + endif + +-command = argv{1}; ++command = argv(){1}; + + ## Add missing ';' + if( command(length(command)) != ";" ) diff --git a/debian/rules b/debian/rules index fb8a7bf..d0d84b2 100755 --- a/debian/rules +++ b/debian/rules @@ -20,8 +20,9 @@ else endif include /usr/share/octave/debian/defs.make +include /usr/share/dpatch/dpatch.make -config.status: configure +config.status: configure $(DPATCH_STAMPFN) dh_testdir for file in config.guess config.sub; do \ @@ -47,7 +48,7 @@ build-stamp: config.status touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp @@ -72,7 +73,7 @@ install: build $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install - chmod 644 debian/tmp/usr/share/octave/site/api-v13/m/pfstools/* + chmod 644 debian/tmp/$(MDIR)/pfstools/* # these binaries are not available rm debian/tmp/usr/share/man/man1/pfs*jpeghdr.1 -- 2.30.2