Am Samstag, den 29.12.2007, 18:58 +0100 schrieb Sebastian Harl:
> Hi,
> 
> I've received the following bug report for the pfstools Debian package. As I'm
> not into octave, it would be nice if you could have a look at it and tell me
> your plans.
> 
> (FTBFS = fails to build from source)
> 
> On Fri, Dec 28, 2007 at 10:30:27PM +0100, Thomas Weber wrote:
> > Octave 2.1 is deprecated (both by upstream and in Debian). Please switch to
> > 3.0, provided by octave3.0.
> > 
> > I'm aware that this is not easy, as pfstools FTBFS with 3.0. Upstream is
> > aware of this already from the 2.9 series[1,2], but as this was a
> > development series, they didn't deem it important. Octave 3.0 is now the new
> > stable series, so they should switch to it.
> > 
> > [1] 
> > http://sourceforge.net/tracker/index.php?func=detail&aid=1708631&group_id=129921&atid=716245
> >  
> > [2] 
> > http://sourceforge.net/tracker/index.php?func=detail&aid=1478655&group_id=129921&atid=716245
> 
> (For a full log of the bug report, please see [3].)
> 
> Thanks in advance,
> Sebastian
> 
> PS: If you reply to this message, please Cc the reply to
> [EMAIL PROTECTED] - thanks.
> 
> [3] http://bugs.debian.org/458131

Patches attached. 
pfstools_debian.diff is for Debian, pfstools_upstream should be applied
to pfstools sources directly. The relevant discussion on Octave's help
list:
 
http://www.cae.wisc.edu/pipermail/help-octave/2007-December/007346.html

I did only a cursory test (I know nothing about pfstools), so please
check.

        Thomas
diff -uprN pfstools-1.6.2.fd6ea3935efa/debian/control pfstools-1.6.2/debian/control
--- pfstools-1.6.2.fd6ea3935efa/debian/control	2008-01-02 00:41:37.000000000 +0100
+++ pfstools-1.6.2/debian/control	2008-01-02 00:41:37.000000000 +0100
@@ -2,15 +2,14 @@ Source: pfstools
 Section: graphics
 Priority: optional
 Maintainer: Sebastian Harl <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>= 5), 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), 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.2
 XS-Vcs-Git: git://git.tokkee.org/pkg-pfstools.git
 XS-Vcs-Browser: http://git.tokkee.org/?p=pkg-pfstools.git
 
 Package: pfstools
 Architecture: any
-Depends: octave, octave-pfstools, ${shlibs:Depends}
+Depends: octave3.0, octave-pfstools, ${shlibs:Depends}
 Recommends: pfstmo
 Suggests: dcraw
 Description: command line HDR manipulation programs
@@ -65,7 +64,7 @@ Description: C++ library to read and wri
 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 -uprN pfstools-1.6.2.fd6ea3935efa/debian/rules pfstools-1.6.2/debian/rules
--- pfstools-1.6.2.fd6ea3935efa/debian/rules	2008-01-02 00:41:37.000000000 +0100
+++ pfstools-1.6.2/debian/rules	2008-01-02 00:41:37.000000000 +0100
@@ -72,7 +72,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{in,out}jpeghdr.1
diff -r fd6ea3935efa src/octave/pfsopen.cpp
--- a/src/octave/pfsopen.cpp	Sun Dec 30 00:04:51 2007 +0100
+++ b/src/octave/pfsopen.cpp	Wed Jan 02 00:41:53 2008 +0100
@@ -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 ) {

Reply via email to