r44030 - in /packages/sundials/trunk/debian: README.Debian changelog control octave-sundials.install patches/fix-format-error.patch patches/gcc4.6.patch patches/octave-sundialstb.patch patches/series rules

trophime-guest at users.alioth.debian.org trophime-guest at users.alioth.debian.org
Wed Nov 16 14:09:24 UTC 2011


Author: trophime-guest
Date: Wed Nov 16 14:09:23 2011
New Revision: 44030

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=44030
Log:
fixed Bug #646457 + add octave support

Added:
    packages/sundials/trunk/debian/README.Debian
    packages/sundials/trunk/debian/octave-sundials.install
    packages/sundials/trunk/debian/patches/fix-format-error.patch
    packages/sundials/trunk/debian/patches/octave-sundialstb.patch
Removed:
    packages/sundials/trunk/debian/patches/gcc4.6.patch
Modified:
    packages/sundials/trunk/debian/changelog
    packages/sundials/trunk/debian/control
    packages/sundials/trunk/debian/patches/series
    packages/sundials/trunk/debian/rules

Added: packages/sundials/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/README.Debian?rev=44030&op=file
==============================================================================
--- packages/sundials/trunk/debian/README.Debian (added)
+++ packages/sundials/trunk/debian/README.Debian Wed Nov 16 14:09:23 2011
@@ -1,0 +1,23 @@
+sundials for Debian
+----------------
+
+Configuring Octave's startup
+
+
+"""
+Matlab will execute a file named 'startup.m' in the directory it was called from on the command line. Octave does not. It will, however, execute a file named '.octaverc' which can be edited to execute existing files
+
+if ( exist ('startup.m', 'file') )
+  source ('startup.m')  # load startup.m like matlab
+endif
+"""
+
+According to the above doc create or add the folliwng lines to your .octaverc to activate sundials bindings for octave:
+
+     % SUNDIALS Toolbox startup M-file, if it exists.
+     if ( exist('startup_STB.m','file') )
+        source ('startup_STB.m')  # load startup.m like matlab
+     end
+
+
+ -- Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>  Mon, 24 Oct 2011 15:01:41 +0200

Modified: packages/sundials/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/changelog?rev=44030&op=diff
==============================================================================
--- packages/sundials/trunk/debian/changelog (original)
+++ packages/sundials/trunk/debian/changelog Wed Nov 16 14:09:23 2011
@@ -1,6 +1,9 @@
 sundials (2.4.0-4) unstable; urgency=low
 
-  * debian/patches: add gcc4.6.patch (Closes: #646457)
+  * add octave support
+  
+  [Peter Green]
+  * debian/patches: add fix-format-error.patch (Closes: #646457)
 
  -- Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>  Mon, 24 Oct 2011 15:01:41 +0200
 

Modified: packages/sundials/trunk/debian/control
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/control?rev=44030&op=diff
==============================================================================
--- packages/sundials/trunk/debian/control (original)
+++ packages/sundials/trunk/debian/control Wed Nov 16 14:09:23 2011
@@ -2,9 +2,11 @@
 Priority: optional
 Section: libs
 Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.org>
-Uploaders: Christophe Trophime <christophe.trophime at grenoble.cnrs.fr>,
+Uploaders: Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>,
  Sylvestre Ledru <sylvestre at debian.org>
-Build-Depends: debhelper (>= 7), autotools-dev, cdbs, quilt, gfortran, libblas-dev | libblas-3gf.so, liblapack-dev | liblapack-3gf.so
+Build-Depends: debhelper (>= 7), autotools-dev, cdbs, quilt, gfortran, 
+ libblas-dev | libblas-3gf.so, liblapack-dev | liblapack-3gf.so,
+ octave-pkg-dev (>= 0.7.0)
 Standards-Version: 3.9.2
 Homepage: http://www.llnl.gov/CASC/sundials/
 Vcs-Svn: svn://svn.debian.org/svn/debian-science/packages/sundials/trunk/
@@ -105,3 +107,16 @@
 # .
 # This package contains SUNDIALS documentation.
 
+Package: octave-sundials
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${octave:Depends}
+Recommends: libsundials-serial-dev
+Description: SUNDIALS  for octave
+ The family of solvers referred to as SUNDIALS (SUit of Nonlinear and
+ DIfferential/ALgebraic equation Solvers) consists of solvers CVODE
+ (for ODE systems), CVODES (ODE with sensitivity analysis capabilities),
+ IDA (for differential-algebraic systems), and KINSOL (for nonlinear
+ algebraic systems).
+ .
+ This package contains SUNDIALS plugins for octave.
+

Added: packages/sundials/trunk/debian/octave-sundials.install
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/octave-sundials.install?rev=44030&op=file
==============================================================================
--- packages/sundials/trunk/debian/octave-sundials.install (added)
+++ packages/sundials/trunk/debian/octave-sundials.install Wed Nov 16 14:09:23 2011
@@ -1,0 +1,2 @@
+usr/share/octave/packages
+usr/lib/octave/packages

Added: packages/sundials/trunk/debian/patches/fix-format-error.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/patches/fix-format-error.patch?rev=44030&op=file
==============================================================================
--- packages/sundials/trunk/debian/patches/fix-format-error.patch (added)
+++ packages/sundials/trunk/debian/patches/fix-format-error.patch Wed Nov 16 14:09:23 2011
@@ -1,0 +1,65 @@
+Index: sundials-2.4.0/src/cvode/cvode.c
+===================================================================
+--- sundials-2.4.0.orig/src/cvode/cvode.c	2009-05-10 00:22:28.000000000 +0000
++++ sundials-2.4.0/src/cvode/cvode.c	2011-11-12 13:23:18.000000000 +0000
+@@ -4128,7 +4128,7 @@
+ 
+ #ifndef NO_FPRINTF_OUTPUT
+     fprintf(stderr, "\n[%s ERROR]  %s\n  ", module, fname);
+-    fprintf(stderr, msgfmt);
++    vfprintf(stderr, msgfmt, ap);
+     fprintf(stderr, "\n\n");
+ #endif
+ 
+Index: sundials-2.4.0/src/cvodes/cvodes.c
+===================================================================
+--- sundials-2.4.0.orig/src/cvodes/cvodes.c	2009-05-10 00:22:35.000000000 +0000
++++ sundials-2.4.0/src/cvodes/cvodes.c	2011-11-12 13:26:19.000000000 +0000
+@@ -8942,7 +8942,7 @@
+ 
+ #ifndef NO_FPRINTF_OUTPUT
+     fprintf(stderr, "\n[%s ERROR]  %s\n  ", module, fname);
+-    fprintf(stderr, msg);
++    fprintf(stderr, "%s",msg);
+     fprintf(stderr, "\n\n");
+ #endif
+ 
+Index: sundials-2.4.0/src/ida/ida.c
+===================================================================
+--- sundials-2.4.0.orig/src/ida/ida.c	2009-05-10 00:22:51.000000000 +0000
++++ sundials-2.4.0/src/ida/ida.c	2011-11-12 13:28:56.000000000 +0000
+@@ -3248,7 +3248,7 @@
+ 
+ #ifndef NO_FPRINTF_OUTPUT
+     fprintf(stderr, "\n[%s ERROR]  %s\n  ", module, fname);
+-    fprintf(stderr, msgfmt);
++    vfprintf(stderr, msgfmt,ap);
+     fprintf(stderr, "\n\n");
+ #endif
+ 
+Index: sundials-2.4.0/src/idas/idas.c
+===================================================================
+--- sundials-2.4.0.orig/src/idas/idas.c	2009-05-10 00:22:58.000000000 +0000
++++ sundials-2.4.0/src/idas/idas.c	2011-11-12 13:30:16.000000000 +0000
+@@ -7170,7 +7170,7 @@
+ 
+ #ifndef NO_FPRINTF_OUTPUT
+     fprintf(stderr, "\n[%s ERROR]  %s\n  ", module, fname);
+-    fprintf(stderr, msgfmt);
++    vfprintf(stderr, msgfmt,ap);
+     fprintf(stderr, "\n\n");
+ #endif
+ 
+Index: sundials-2.4.0/src/kinsol/kinsol.c
+===================================================================
+--- sundials-2.4.0.orig/src/kinsol/kinsol.c	2009-05-10 00:23:08.000000000 +0000
++++ sundials-2.4.0/src/kinsol/kinsol.c	2011-11-12 13:31:25.000000000 +0000
+@@ -1864,7 +1864,7 @@
+ 
+ #ifndef NO_FPRINTF_OUTPUT
+     fprintf(stderr, "\n[%s ERROR]  %s\n  ", module, fname);
+-    fprintf(stderr, msgfmt);
++    vfprintf(stderr, msgfmt,ap);
+     fprintf(stderr, "\n\n");
+ #endif
+ 

Added: packages/sundials/trunk/debian/patches/octave-sundialstb.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/patches/octave-sundialstb.patch?rev=44030&op=file
==============================================================================
--- packages/sundials/trunk/debian/patches/octave-sundialstb.patch (added)
+++ packages/sundials/trunk/debian/patches/octave-sundialstb.patch Wed Nov 16 14:09:23 2011
@@ -1,0 +1,185 @@
+Index: sundials-2.4.0/sundialsTB/install_STB.m
+===================================================================
+--- sundials-2.4.0.orig/sundialsTB/install_STB.m	2011-11-16 14:42:09.000000000 +0100
++++ sundials-2.4.0/sundialsTB/install_STB.m	2011-11-16 14:46:25.000000000 +0100
+@@ -9,7 +9,7 @@
+ % MEX compiler command
+ % --------------------
+ 
+-mexcompiler = 'mex -v';
++mexcompiler = 'mkoctfile --mex -v';
+ 
+ % Location of sundialsTB and top of sundials source tree
+ % ------------------------------------------------------
+@@ -46,41 +46,11 @@
+ % Figure out what modules exist and which ones will be built
+ % ----------------------------------------------------------
+ 
+-fprintf('\n\nSelect modules to be built\n');
++fprintf('\n\nBuild Modules for CVODES, IDAS, KINSOL\n');
+ 
+-q = fullfile(sun,'src','cvodes');
+-if exist(q, 'dir')
+-  answ = input('    Compile CVODES interface? (y/n) ','s');
+-  if answ == 'y'
+-    cvm_ok = true;
+-  else
+-    cvm_ok = false;
+-  end
+-end
+-
+-if exist(q, 'dir')
+-  answ = input('    Compile IDAS interface? (y/n) ','s');
+-  if answ == 'y'
+-    idm_ok = true;
+-  else
+-    idm_ok = false;
+-  end
+-end
+-
+-q = fullfile(sun,'src','kinsol');
+-if exist(q, 'dir')
+-  answ = input('    Compile KINSOL interface? (y/n) ','s');
+-  if answ == 'y'
+-    kim_ok = true;
+-  else
+-    kim_ok = false;
+-  end
+-end
+-
+-if ~cvm_ok && ~idm_ok && ~kim_ok
+-  fprintf('\nOK. All done.\n');
+-  return
+-end
++cvm_ok = true;
++idm_ok = true;
++kim_ok = true;
+ 
+ % Create sundials_config.h
+ % ------------------------
+@@ -117,17 +87,15 @@
+ % ------------------
+ 
+ fprintf('\n\nMEX files were successfully created.\n');
+-answ = input('    Install toolbox? (y/n) ','s');
+-if answ ~= 'y'
+-  fprintf('\n\nOK. All done.\n');
+-  return
+-end
++fprintf('\n\nInstall toolbox.\n');
++answ = 'y'
+ 
+ while true
+   fprintf('\n\nSpecify the location where you wish to install the toolbox.\n');
+   fprintf('The toolbox will be installed in a subdirectory "sundialsTB".\n');
+   fprintf('Enter return to cancel the installation.\n');
+-  where = input('    Installation directory: ','s');
++  %where = input('    Installation directory: ','s');
++  where = './octave';
+   if isempty(where)
+     go = 0;
+     break;
+@@ -149,7 +117,8 @@
+ go = 1;
+ if exist(stbi,'dir')
+   fprintf('\n\nDirectory %s exists!\n',stbi);
+-  answ = input('    Replace? (y/n) ','s');
++  %answ = input('    Replace? (y/n) ','s');
++  answ = 'y';
+   if answ == 'y'
+     rmdir(stbi,'s');
+     go = 1;
+@@ -210,11 +179,14 @@
+ fprintf('add a call to %s\n',fullfile(stbi,'startup_STB.m'));
+ fprintf('\nEnjoy!\n\n');
+ 
++exit
++endfunction
++
+ %---------------------------------------------------------------------------------
+ % Check if mex works and if the user accepts the current mexopts
+ %---------------------------------------------------------------------------------
+ 
+-function mex_ok = check_mex(mexcompiler)
++function mex_ok = check_mex (mexcompiler)
+ 
+ % Create a dummy file
+ fid = fopen('foo.c', 'w');
+@@ -232,7 +204,8 @@
+ delete(sprintf('foo.%s', mexext))
+ 
+ fprintf('\n\nMEX files will be compiled and built using the above options\n');
+-answ = input('    Proceed? (y/n) ','s');
++%answ = input('    Proceed? (y/n) ','s');
++answ = 'y';
+ if answ == 'y'
+   mex_ok = true;
+ else
+@@ -240,7 +213,7 @@
+   mex_ok = false;
+ end
+ 
+-return
++endfunction
+ 
+ %---------------------------------------------------------------------------------
+ % compilation of cvm MEX file
+@@ -352,6 +325,8 @@
+ 
+ cd(stb)
+ 
++endfunction
++
+ %---------------------------------------------------------------------------------
+ % compilation of idm MEX file
+ %---------------------------------------------------------------------------------
+@@ -461,6 +436,7 @@
+ 
+ cd(stb)
+ 
++endfunction
+ 
+ %---------------------------------------------------------------------------------
+ % compilation of KINSOL MEX file
+@@ -569,6 +545,8 @@
+ 
+ cd(stb)
+ 
++endfunction
++
+ %---------------------------------------------------------------------------------
+ % Installation of common sundialsTB files
+ %---------------------------------------------------------------------------------
+@@ -633,6 +611,7 @@
+     break;
+   end
+ end
++endfunction
+ 
+ %---------------------------------------------------------------------------------
+ % Installation of CVODES files
+@@ -795,6 +774,8 @@
+   disp(msg);
+ end
+ 
++endfunction
++
+ %---------------------------------------------------------------------------------
+ % Installation of IDAS files
+ %---------------------------------------------------------------------------------
+@@ -949,7 +930,7 @@
+   disp(msg);
+ end
+ 
+-
++endfunction
+ 
+ %---------------------------------------------------------------------------------
+ % Installation of KINSOL files
+@@ -1023,3 +1004,6 @@
+ end
+ 
+ 
++endfunction
++
++install_STB;

Modified: packages/sundials/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/patches/series?rev=44030&op=diff
==============================================================================
--- packages/sundials/trunk/debian/patches/series (original)
+++ packages/sundials/trunk/debian/patches/series Wed Nov 16 14:09:23 2011
@@ -1,3 +1,4 @@
 makefile.patch
 sh4.patch
-gcc4.6.patch
+fix-format-error.patch
+octave-sundialstb.patch

Modified: packages/sundials/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debian-science/packages/sundials/trunk/debian/rules?rev=44030&op=diff
==============================================================================
--- packages/sundials/trunk/debian/rules (original)
+++ packages/sundials/trunk/debian/rules Wed Nov 16 14:09:23 2011
@@ -31,6 +31,12 @@
 USCAN_DESTDIR := $(CURDIR)/../tarballs
 DEB_STRIPPED_UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -n -e 's/\.dfsg.*$$//p')
 
+# The directories below are versioned.  We only support the packages for the
+# stable version of Octave
+octver = 3.2
+mpath = /usr/share/octave/packages/$(octver)
+bpath = /usr/lib/octave/packages/$(octver)
+
 # The following hack is necessary because the upstream makefiles do
 # not install $libdir and $includedir or $mandir
 common-install-prehook-impl::
@@ -41,6 +47,23 @@
 build/libsundials-serial::
 	$(SHELL) debian/check.sh
 
+build/octave-sundials::
+	mkdir -p sundialsTB/octave
+	cd sundialsTB && octave -fV install_STB.m
+	strip sundialsTB/octave/sundialsTB/cvodes/cvm/cvm.mex
+	strip sundialsTB/octave/sundialsTB/idas/idm/idm.mex
+	strip sundialsTB/octave/sundialsTB/kinsol/kim/kim.mex
+
+install/octave-sundials::
+	mkdir -p debian/tmp/$(mpath)
+	mkdir -p debian/tmp/$(bpath)/sundialsTB/cvodes/cvm/
+	mv sundialsTB/octave/sundialsTB/cvodes/cvm/cvm.mex debian/tmp/$(bpath)/sundialsTB/cvodes/cvm
+	mkdir -p debian/tmp/$(bpath)/sundialsTB/idas/idm/
+	mv sundialsTB/octave/sundialsTB/idas/idm/idm.mex debian/tmp/$(bpath)/sundialsTB/idas/idm
+	mkdir -p debian/tmp/$(bpath)/sundialsTB/kinsol/kim
+	mv sundialsTB/octave/sundialsTB/kinsol/kim/kim.mex debian/tmp/$(bpath)/sundialsTB/kinsol/kim
+	mv sundialsTB/octave/* debian/tmp/$(mpath)
+	rm debian/tmp/$(mpath)/sundialsTB/LICENSE
 
 binary-install/libsundials-serial-dev::
 	find $(deblib) \( -name \*.la \) -exec rm -rf {} +
@@ -54,6 +77,10 @@
 	find examples \
 	        -type f -a  \( -name \*.o -o -name \*.out \)	\
 		-a -exec rm -f \{\} \;
+	find sundialsTB \
+	        -type f -a  \( -name \*.o -o -name \*.mex \)	\
+		-a -exec rm -f \{\} \;
+	rm -rf sundialsTB/octave
 
 get-orig-source:
 	mkdir -p $(USCAN_DESTDIR)




More information about the debian-science-commits mailing list