# HG changeset patch # User Markus Mützel # Date 1668791200 -3600 # Node ID 297b371a6713aaadf594b471b67608e922203e66 # Parent 8ea9085d1f80e6b3c777a6dec650cd7eb329c7b1 of-fits: Fix compatibility with Octave 9. * src/of-fits-3-octave-9-compat.patch: Add patch that replaces functions that have been deprecated in Octave 7 and removed from Octave 9. * dist-files.mk: Add new file to list. diff -r 8ea9085d1f80 -r 297b371a6713 dist-files.mk --- a/dist-files.mk Thu Nov 17 10:40:12 2022 +0100 +++ b/dist-files.mk Fri Nov 18 18:06:40 2022 +0100 @@ -485,6 +485,7 @@ of-financial.mk \ of-fits-1-cross-fixes.patch \ of-fits-2-fixes.patch \ + of-fits-3-octave-9-compat.patch \ of-fits.mk \ of-fl-core-1-fixes.patch \ of-fl-core.mk \ diff -r 8ea9085d1f80 -r 297b371a6713 src/of-fits-3-octave-9-compat.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-fits-3-octave-9-compat.patch Fri Nov 18 18:06:40 2022 +0100 @@ -0,0 +1,27 @@ +Replace "fortran_vec" on const objects with "data". +Casting away const is ok here. The pointers are only passed to functions that +don't modify the data afaict. + +--- fits-1.0.7/src/save_fits_image.cc.orig 2022-11-17 11:09:21.875653000 +0100 ++++ fits-1.0.7/src/save_fits_image.cc 2022-11-18 17:04:28.843175674 +0100 +@@ -129,7 +129,7 @@ + return octave_value_list(); + } + +- double * datap = const_cast( image.fortran_vec() ); ++ double * datap = const_cast ( image.data () ); + if( fits_write_img( fp, TDOUBLE, fpixel, len, datap , &status ) > 0 ) + { + fprintf( stderr, "Could not write image data.\n" ); + +--- fits-1.0.7/src/save_fits_image_multi_ext.cc.orig 2022-11-17 11:09:21.875653000 +0100 ++++ fits-1.0.7/src/save_fits_image_multi_ext.cc 2022-11-18 17:21:18.905761447 +0100 +@@ -137,7 +137,7 @@ + fits_report_error( stderr, status ); + return octave_value_list(); + } +- double * datap = const_cast( image.fortran_vec() ); ++ double * datap = const_cast ( image.data () ); + if( fits_write_img( fp, TDOUBLE, fpixel, sz_axes[0]*sz_axes[1], datap + i*sz_axes[0]*sz_axes[1], &status ) > 0 ) + { + fprintf( stderr, "Could not write image data.\n" );