--- dynare-4.0.3.orig/debian/dynare-doc.docs +++ dynare-4.0.3/debian/dynare-doc.docs @@ -0,0 +1,7 @@ +doc/manual.pdf +doc/manual-html +doc/guide.pdf +doc/macroprocessor/macroprocessor.pdf +doc/bvar-a-la-sims.pdf +doc/preprocessor/preprocessor.pdf +doc/userguide/UserGuide.pdf --- dynare-4.0.3.orig/debian/dynare-matlab.install +++ dynare-4.0.3/debian/dynare-matlab.install @@ -0,0 +1,9 @@ +mex/sources/build_matlab.m /usr/src/dynare-matlab +mex/sources/mjdgges/*.c /usr/src/dynare-matlab/mjdgges +mex/sources/gensylv/cc/*.cpp /usr/src/dynare-matlab/gensylv/cc +mex/sources/gensylv/cc/*.h /usr/src/dynare-matlab/gensylv/cc +mex/sources/gensylv/matlab/*.cpp /usr/src/dynare-matlab/gensylv/matlab +mex/sources/kronecker/*.cc /usr/src/dynare-matlab/kronecker +mex/sources/simulate/*.cc /usr/src/dynare-matlab/simulate +mex/sources/simulate/*.hh /usr/src/dynare-matlab/simulate +preprocessor/include/CodeInterpreter.hh /usr/src/dynare-matlab/simulate --- dynare-4.0.3.orig/debian/copyright +++ dynare-4.0.3/debian/copyright @@ -0,0 +1,57 @@ +Upstream source of Dynare can be found on: + + http://www.dynare.org + +It can also be downloaded via subversion at: + + https://www.dynare.org/svn/dynare/ + +Main upstream authors, members of Dynare Team, are: + + Stéphane Adjemian + Michel Juillard + Ondra Kamenik + Ferhat Mihoubi + George Perendia + Marco Ratto + Sébastien Villemot + +Other contributors include: G. Anderson, F. Collard, L. Ingber, P. Klein, +S. Sakata, F. Schorfheide, C. Sims, P. Soederlind and R. Wouters. + +Debian packaging was done by Sébastien Villemot . + + +Copyright notice for software +----------------------------- + +Most Dynare source files are Copyright (C) 1996-2009 Dynare Team. There are +some exceptions to this, which are described in source file headers when +relevant. + +Dynare is free software: you can redistribute it and/or modify it under the +terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +On Debian systems, the complete text of the GNU General Public License can be +found in `/usr/share/common-licenses/GPL-3'. + + +Copyright notice for documentation +---------------------------------- + +Dynare manual is Copyright (C) 1996-2009 Dynare Team. +Dynare user guide is Copyright (C) 2007-2008 Tommaso Mancini Griffoli. + +Permission is granted to copy, distribute and/or modify Dynare documentation +files under the terms of the GNU Free Documentation License, Version 1.3 or any +later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. + +On Debian systems, the complete text of the GNU Free Documentation License can +be found in `/usr/share/common-licenses/GFDL-1.3'. --- dynare-4.0.3.orig/debian/dynare-matlab.postinst +++ dynare-4.0.3/debian/dynare-matlab.postinst @@ -0,0 +1,53 @@ +#!/bin/sh +set -e +. /usr/share/debconf/confmodule + +db_get dynare-matlab/matlab-path +MATLAB_PATH=$RET + +MATLAB="$MATLAB_PATH/bin/matlab" + +if [ ! -x "$MATLAB" ] +then + echo "Can't find MATLAB in $MATLAB_PATH. Please run 'dpkg-reconfigure dynare-matlab'." + exit 0 +fi + +# Rename GCC libraries shipped with MATLAB which conflicts with those of Debian + +db_get dynare-matlab/rename-libs + +if [ "$RET" = "true" ] +then + for f in $MATLAB_PATH/sys/os/glnx86/libgcc_s.so.1 $MATLAB_PATH/sys/os/glnx86/libstdc++.so.6 \ + $MATLAB_PATH/sys/os/glnxa64/libgcc_s.so.1 $MATLAB_PATH/sys/os/glnxa64/libstdc++.so.6 + do + if [ -e $f ] + then + echo "Renaming $f to $f.bak." + mv $f $f.bak + fi + done +fi + +# Build the MEX files + +mkdir /usr/lib/dynare/mex/2007a /usr/lib/dynare/mex/2007b + +db_get dynare-matlab/matlab-user +MATLAB_USER=$RET + +cd /usr/src/dynare-matlab + +if [ -z "$MATLAB_USER" ] +then + $MATLAB -nodisplay -r build_matlab +else + db_input critical dynare-matlab/license-manager || true + db_go || true + chown -R $MATLAB_USER /usr/lib/dynare/mex/2007a /usr/lib/dynare/mex/2007b + sudo -u $MATLAB_USER $MATLAB -nodisplay -r build_matlab + chown -R root:root /usr/lib/dynare/mex/2007a /usr/lib/dynare/mex/2007b +fi + +#DEBHELPER# --- dynare-4.0.3.orig/debian/dynare.install +++ dynare-4.0.3/debian/dynare.install @@ -0,0 +1,2 @@ +mex/octave/*.mex /usr/lib/dynare/mex/octave +preprocessor/dynare_m /usr/lib/dynare/matlab --- dynare-4.0.3.orig/debian/dynare-matlab.prerm +++ dynare-4.0.3/debian/dynare-matlab.prerm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +rm -rf /usr/lib/dynare/mex/2007a /usr/lib/dynare/mex/2007b + +#DEBHELPER# --- dynare-4.0.3.orig/debian/control +++ dynare-4.0.3/debian/control @@ -0,0 +1,81 @@ +Source: dynare +Maintainer: Debian Octave Group +Uploaders: Sébastien Villemot , + Rafael Laboissiere +DM-Upload-Allowed: yes +Section: math +Priority: optional +Build-Depends: debhelper (>= 7), octave3.0-headers, flex, bison, texlive, + texlive-publishers, xsltproc, dblatex, latex-beamer, docbook-xsl, quilt, + po-debconf +Standards-Version: 3.8.1 +Homepage: http://www.dynare.org/ +Vcs-Git: git://git.debian.org/git/pkg-octave/dynare.git +Vcs-Browser: http://git.debian.org/?p=pkg-octave/dynare.git + +Package: dynare +Architecture: any +Depends: octave3.0, dynare-common, ${shlibs:Depends}, ${misc:Depends} +Suggests: dynare-doc +Description: suite for non-linear models with forward looking variables + Dynare is a pre-preprocessor and a collection of GNU Octave and + MATLAB routines which can solve, simulate and estimate non-linear + models with forward looking variables. + . + In particular, in the field of computational economics, it is used + for solving and estimating dynamic stochastic general equilibrium + (DSGE) models. + . + This package provides a full installation of Dynare for GNU Octave. + . + It contains: + * the binary preprocessor + * dynamic loadable libraries for faster computation, compiled for Octave + +Package: dynare-common +Architecture: all +Depends: ${misc:Depends} +Description: platform independent files for Dynare + Dynare is a pre-preprocessor and a collection of GNU Octave and + MATLAB routines which can solve, simulate and estimate non-linear + models with forward looking variables. + . + In particular, in the field of computational economics, it is used + for solving and estimating dynamic stochastic general equilibrium + (DSGE) models. + . + This package contains the various M-files which can be run under + both GNU Octave and MATLAB. + +Package: dynare-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Description: documentation for Dynare + Dynare is a pre-preprocessor and a collection of GNU Octave and + MATLAB routines which can solve, simulate and estimate non-linear + models with forward looking variables. + . + In particular, in the field of computational economics, it is used + for solving and estimating dynamic stochastic general equilibrium + (DSGE) models. + . + This package contains full Dynare documentation, including a user + guide and the reference manual. + +Package: dynare-matlab +Architecture: all +Section: contrib/math +Depends: ${misc:Depends}, debconf | debconf-2.0, sudo +Description: MEX files for MATLAB users of Dynare + Dynare is a pre-preprocessor and a collection of GNU Octave and + MATLAB routines which can solve, simulate and estimate non-linear + models with forward looking variables. + . + In particular, in the field of computational economics, it is used + for solving and estimating dynamic stochastic general equilibrium + (DSGE) models. + . + This package is only useful to users having MATLAB installed on their + machine. It contains the source of the MEX files and will recompile + them using the existing MATLAB installation. --- dynare-4.0.3.orig/debian/dynare-matlab.templates +++ dynare-4.0.3/debian/dynare-matlab.templates @@ -0,0 +1,42 @@ +Template: dynare-matlab/matlab-path +Type: string +_Description: Absolute path to MATLAB installation: + Please enter the directory where you have installed MATLAB. + . + For example, if MATLAB executable is "/usr/local/matlab76/bin/matlab", + please enter "/usr/local/matlab76". + +Template: dynare-matlab/matlab-user +Type: string +_Description: UNIX user account able to launch MATLAB: + If your MATLAB installation is such that only one or a limited set of UNIX + user accounts can launch MATLAB, please indicate here the login of such an + account. + . + If every UNIX user account (including root) is allowed to launch MATLAB, + please leave this field empty. + +Template: dynare-matlab/license-manager +Type: note +_Description: Please make sure that MATLAB license manager is running + You have specified a UNIX user account for running MATLAB. + . + This probably means that your MATLAB installation uses a license manager. + . + If the license manager is not running, MEX files compilation will fail. + +Template: dynare-matlab/rename-libs +Type: boolean +Default: true +_Description: Rename MATLAB files conflicting with Dynare? + A MATLAB installation is shipped with copies of GCC dynamic loadable + libraries, which typically come from an old version of GCC. + . + This creates a conflict which makes Dynare fail when running the preprocessor. + . + If you accept it, the installation process will rename the conflicting + files using a ".bak" extension. These files are located in the "sys/os/glnx86" + or "sys/os/glnxa64" subdirectory of your MATLAB installation. + . + Otherwise, Dynare will probably fail to run, and you will need to manually + hack your MATLAB installation. --- dynare-4.0.3.orig/debian/watch +++ dynare-4.0.3/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://www.dynare.org/svn/dynare/tags/ dynare-([\d.]+)/ --- dynare-4.0.3.orig/debian/dynare-doc.doc-base.manual +++ dynare-4.0.3/debian/dynare-doc.doc-base.manual @@ -0,0 +1,12 @@ +Document: dynare-manual +Title: Dynare Manual +Author: Michel Juillard +Abstract: Reference manual describing Dynare usage and all the commands allowed in a MOD file +Section: Science/Mathematics + +Format: HTML +Index: /usr/share/doc/dynare-doc/manual-html/index.html +Files: /usr/share/doc/dynare-doc/manual-html/*.html + +Format: PDF +Files: /usr/share/doc/dynare-doc/manual.pdf.gz --- dynare-4.0.3.orig/debian/rules +++ dynare-4.0.3/debian/rules @@ -0,0 +1,56 @@ +#!/usr/bin/make -f + +include /usr/share/quilt/quilt.make +include /usr/share/octave/debian/defs.make + +build: patch build-stamp +build-stamp: + dh_testdir + + # Building preprocessor + make -C preprocessor + + # Building Octave MEX/OCT files + cd mex/sources && octave build_octave.m + + # Building documentation + make -C doc + + touch build-stamp + +# Call unpatch after main cleanups (since patch fixes clean rules in Makefiles!) +clean: clean1 unpatch + dh_clean + +clean1: + dh_testdir + dh_testroot + make clean -C preprocessor + make clean -C doc + find mex/sources -name *.o | xargs rm -f + rm -f mex/octave/*.mex + rm -f matlab/dynare_m +.PHONY: clean1 + +binary-arch: build + dh binary-arch + +binary-indep: build + dh binary-indep --until dh_install + dh_install --package=dynare-common mex/octave/rcond.m $(MDIR) + dh binary-indep --after dh_install --before dh_link + dh_link --package=dynare-common /usr/share/dynare/matlab/dynare.m $(MDIR)/dynare.m + dh binary-indep --after dh_link + +binary: binary-arch binary-indep + +VERSION = $(shell dpkg-parsechangelog \ + | sed -ne 's/^Version: \([0-9.]\+\).*/\1/p') + +get-orig-source: + svn checkout https://www.dynare.org/svn/dynare/tags/dynare-$(VERSION) + cd dynare-$(VERSION) && make srctarball + mv dynare-$(VERSION).tgz dynare_$(VERSION).orig.tar.gz + rm -rf dynare-$(VERSION) + +.PHONY: build clean binary-arch binary-indep binary get-orig-source --- dynare-4.0.3.orig/debian/dynare-common.install +++ dynare-4.0.3/debian/dynare-common.install @@ -0,0 +1,6 @@ +matlab/*.m /usr/share/dynare/matlab +matlab/gensylv/*.m /usr/share/dynare/matlab/gensylv +matlab/qz/*.m /usr/share/dynare/matlab/qz +matlab/kronecker/*.m /usr/share/dynare/matlab/kronecker +matlab/distributions/*.m /usr/share/dynare/matlab/distributions +matlab/AIM/*.m /usr/share/dynare/matlab/AIM --- dynare-4.0.3.orig/debian/changelog +++ dynare-4.0.3/debian/changelog @@ -0,0 +1,18 @@ +dynare (4.0.3-2) unstable; urgency=low + + [ Rafael Laboissiere ] + * debian/control: Switch the Vcs-* fields to the new Git repository + + [ Sébastien Villemot ] + * dynare-matlab: new contrib binary package aimed at MATLAB users. Contains + the MEX files source code. The postinst script builds them on the user + machine. + * manual-fix-for-debian: new patch for reference manual + + -- Rafael Laboissiere Mon, 25 May 2009 21:44:20 +0200 + +dynare (4.0.3-1) unstable; urgency=low + + * Initial release. (Closes: #518472) + + -- Sébastien Villemot Tue, 24 Mar 2009 14:15:56 +0100 --- dynare-4.0.3.orig/debian/README.source +++ dynare-4.0.3/debian/README.source @@ -0,0 +1,9 @@ +README.source for dynare +======================== + +This package uses quilt to manage all modifications to the upstream sources. +See `/usr/share/doc/quilt/README.source' to get more information on how to +use it. + + -- Rafael Laboissiere Fri, 24 Apr 2009 15:56:10 +0200 + --- dynare-4.0.3.orig/debian/README.Debian +++ dynare-4.0.3/debian/README.Debian @@ -0,0 +1,49 @@ +Dynare for Debian +================= + +This package provides a fully functional installation of Dynare for GNU Octave. + +If your model file is called 'filename.mod', just type the following at the +Octave prompt: + + dynare('filename') + +If you prefer the short syntax for the 'dynare' command, type: + + mark_as_command dynare + dynare filename + +Note that the 'mark_as_command' statement can be put in your ~/.octaverc file. + +Also note that you don't need to do any 'addpath', the Debian package does it +for you. + + +Documentation +------------- + +Please install the 'dynare-doc' package for the user guide, the reference +manual, and several other documentation files. + +You can find more information and model file examples, on Dynare homepage: + + http://www.dynare.org + +Or on Dynare Wiki: + + http://www.dynare.org/DynareWiki + +In particular, some specificities of Dynare for Octave are discussed on: + + http://www.dynare.org/DynareWiki/DynareOctave + + +Note for MATLAB users +--------------------- + +You should install the 'dynare-matlab' package, which will recompile the MEX +files on your machine, using your copy of MATLAB. + +Before using Dynare on MATLAB, you need to type the following: + + addpath /usr/share/dynare/matlab --- dynare-4.0.3.orig/debian/compat +++ dynare-4.0.3/debian/compat @@ -0,0 +1 @@ +7 --- dynare-4.0.3.orig/debian/dynare-matlab.config +++ dynare-4.0.3/debian/dynare-matlab.config @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +. /usr/share/debconf/confmodule +db_input high dynare-matlab/matlab-path || true +db_input high dynare-matlab/matlab-user || true +db_input medium dynare-matlab/rename-libs || true +db_go || true --- dynare-4.0.3.orig/debian/dynare-doc.doc-base.userguide +++ dynare-4.0.3/debian/dynare-doc.doc-base.userguide @@ -0,0 +1,8 @@ +Document: dynare-userguide +Title: Dynare User Guide +Author: Tommaso Mancini Griffoli +Abstract: Introduces the reader to Dynare features and usage +Section: Science/Mathematics + +Format: PDF +Files: /usr/share/doc/dynare-doc/UserGuide.pdf.gz --- dynare-4.0.3.orig/debian/patches/bashisms-in-makefiles +++ dynare-4.0.3/debian/patches/bashisms-in-makefiles @@ -0,0 +1,32 @@ +Fixes bashishms in Makefiles +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -19,10 +19,8 @@ + dblatex manual.xml + + clean: +- rm -f *~ +- rm -f guide.{pdf,log,aux} +- rm -f bvar-a-la-sims.{pdf,log,aux} +- rm -rf manual.pdf manual-html ++ rm -f *~ *.pdf *.log *.aux ++ rm -rf manual-html + make -C preprocessor clean + make -C macroprocessor clean + make -C userguide clean +--- a/doc/macroprocessor/Makefile ++++ b/doc/macroprocessor/Makefile +@@ -3,4 +3,4 @@ + pdflatex macroprocessor + + clean: +- rm -f macroprocessor.{pdf,toc,aux,log,nav,snm,vrb,out} *~ ++ rm -f macroprocessor.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~ +--- a/doc/preprocessor/Makefile ++++ b/doc/preprocessor/Makefile +@@ -3,4 +3,4 @@ + pdflatex preprocessor + + clean: +- rm -f preprocessor.{pdf,toc,aux,log,nav,snm,vrb,out} *~ ++ rm -f *.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~ --- dynare-4.0.3.orig/debian/patches/build-matlab +++ dynare-4.0.3/debian/patches/build-matlab @@ -0,0 +1,32 @@ +Fix paths to reflect structure of Debian packaging +--- a/mex/sources/build_matlab.m ++++ b/mex/sources/build_matlab.m +@@ -17,7 +17,7 @@ + % You should have received a copy of the GNU General Public License + % along with Dynare. If not, see . + +-addpath '../../matlab'; % For matlab_ver_less_than ++addpath '/usr/share/dynare/matlab'; % For matlab_ver_less_than + + MATLAB_PATH = matlabroot; + +@@ -66,9 +66,9 @@ + end + + if matlab_ver_less_than('7.5') +- OUTPUT_DIR = '../2007a'; ++ OUTPUT_DIR = '/usr/lib/dynare/mex/2007a'; + else +- OUTPUT_DIR = '../2007b'; ++ OUTPUT_DIR = '/usr/lib/dynare/mex/2007b'; + end + + % Comment next line to suppress compilation debugging info +@@ -104,4 +104,6 @@ + 'gensylv/cc/Vector.cpp ' ... + BLAS_PATH ' ' LAPACK_PATH ]); + disp('Compiling simulate...') +-eval([ COMPILE_COMMAND ' -Isimulate -I../../preprocessor/include simulate/simulate.cc simulate/Interpreter.cc simulate/Mem_Mngr.cc simulate/SparseMatrix.cc' ]); ++eval([ COMPILE_COMMAND ' -Isimulate simulate/simulate.cc simulate/Interpreter.cc simulate/Mem_Mngr.cc simulate/SparseMatrix.cc' ]); ++ ++exit --- dynare-4.0.3.orig/debian/patches/table-name-clash +++ dynare-4.0.3/debian/patches/table-name-clash @@ -0,0 +1,171 @@ +Fixes the name clash of Dynare table.m with Octave's by renaming it to dyntable.m +--- a/matlab/table.m ++++ /dev/null +@@ -1,42 +0,0 @@ +-function table(title,headers,labels,values,label_width,val_width, ... +- val_precis) +- +-% Copyright (C) 2002 Dynare Team +-% +-% This file is part of Dynare. +-% +-% Dynare is free software: you can redistribute it and/or modify +-% it under the terms of the GNU General Public License as published by +-% the Free Software Foundation, either version 3 of the License, or +-% (at your option) any later version. +-% +-% Dynare is distributed in the hope that it will be useful, +-% but WITHOUT ANY WARRANTY; without even the implied warranty of +-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-% GNU General Public License for more details. +-% +-% You should have received a copy of the GNU General Public License +-% along with Dynare. If not, see . +- +- label_width = max(size(deblank(strvcat(headers(1,:),labels)),2)+2, ... +- label_width); +- val_width = max(size(deblank(headers(2:end,:)),2)+2,val_width); +- label_fmt = sprintf('%%-%ds',label_width); +- header_fmt = sprintf('%%-%ds',val_width); +- val_fmt = sprintf('%%%d.%df',val_width,val_precis); +- if length(title) > 0 +- disp(sprintf('\n\n%s\n',title)); +- end +- if length(headers) > 0 +- hh = sprintf(label_fmt,headers(1,:)); +- hh = [hh char(32*ones(1,floor(val_width/4)))]; +- for i=2:size(headers,1) +- hh = [hh sprintf(header_fmt,headers(i,:))]; +- end +- disp(hh); +- end +- for i=1:size(values,1) +- disp([sprintf(label_fmt,labels(i,:)) sprintf(val_fmt,values(i,:))]); +- end +- +-% 10/30/02 MJ +\ No newline at end of file +--- /dev/null ++++ b/matlab/dyntable.m +@@ -0,0 +1,42 @@ ++function dyntable(title,headers,labels,values,label_width,val_width, ... ++ val_precis) ++ ++% Copyright (C) 2002 Dynare Team ++% ++% This file is part of Dynare. ++% ++% Dynare is free software: you can redistribute it and/or modify ++% it under the terms of the GNU General Public License as published by ++% the Free Software Foundation, either version 3 of the License, or ++% (at your option) any later version. ++% ++% Dynare is distributed in the hope that it will be useful, ++% but WITHOUT ANY WARRANTY; without even the implied warranty of ++% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++% GNU General Public License for more details. ++% ++% You should have received a copy of the GNU General Public License ++% along with Dynare. If not, see . ++ ++ label_width = max(size(deblank(strvcat(headers(1,:),labels)),2)+2, ... ++ label_width); ++ val_width = max(size(deblank(headers(2:end,:)),2)+2,val_width); ++ label_fmt = sprintf('%%-%ds',label_width); ++ header_fmt = sprintf('%%-%ds',val_width); ++ val_fmt = sprintf('%%%d.%df',val_width,val_precis); ++ if length(title) > 0 ++ disp(sprintf('\n\n%s\n',title)); ++ end ++ if length(headers) > 0 ++ hh = sprintf(label_fmt,headers(1,:)); ++ hh = [hh char(32*ones(1,floor(val_width/4)))]; ++ for i=2:size(headers,1) ++ hh = [hh sprintf(header_fmt,headers(i,:))]; ++ end ++ disp(hh); ++ end ++ for i=1:size(values,1) ++ disp([sprintf(label_fmt,labels(i,:)) sprintf(val_fmt,values(i,:))]); ++ end ++ ++% 10/30/02 MJ +\ No newline at end of file +--- a/matlab/disp_moments.m ++++ b/matlab/disp_moments.m +@@ -57,7 +57,7 @@ + end + headers=strvcat('VARIABLE','MEAN','STD. DEV.','VARIANCE','SKEWNESS', ... + 'KURTOSIS'); +- table(title,headers,labels,z,size(labels,2)+2,16,6); ++ dyntable(title,headers,labels,z,size(labels,2)+2,16,6); + end + + if options_.nocorr == 0 +@@ -68,7 +68,7 @@ + int2str(options_.hp_filter) ')']; + end + headers = strvcat('VARIABLE',M_.endo_names(ivar,:)); +- table(title,headers,labels,corr,size(labels,2)+2,8,4); ++ dyntable(title,headers,labels,corr,size(labels,2)+2,8,4); + end + + ar = options_.ar; +@@ -86,7 +86,7 @@ + int2str(options_.hp_filter) ')']; + end + headers = strvcat('VARIABLE',int2str([1:ar]')); +- table(title,headers,labels,autocorr,size(labels,2)+2,8,4); ++ dyntable(title,headers,labels,autocorr,size(labels,2)+2,8,4); + end + + warning(warning_old_state); +--- a/matlab/disp_th_moments.m ++++ b/matlab/disp_th_moments.m +@@ -57,7 +57,7 @@ + title = [title ' (HP filter, lambda = ' int2str(options_.hp_filter) ')']; + end + headers=strvcat('VARIABLE','MEAN','STD. DEV.','VARIANCE'); +- table(title,headers,deblank(M_.endo_names(ivar,:)),z,lh,11,4); ++ dyntable(title,headers,deblank(M_.endo_names(ivar,:)),z,lh,11,4); + if M_.exo_nbr > 1 + disp(' ') + title='VARIANCE DECOMPOSITION (in percent)'; +@@ -68,7 +68,7 @@ + headers = M_.exo_names; + headers(M_.exo_names_orig_ord,:) = headers; + headers = strvcat(' ',headers); +- table(title,headers,deblank(M_.endo_names(ivar(i1),:)),100*oo_.gamma_y{options_.ar+2}(i1,:), ... ++ dyntable(title,headers,deblank(M_.endo_names(ivar(i1),:)),100*oo_.gamma_y{options_.ar+2}(i1,:), ... + lh,8,2); + end + end +@@ -82,7 +82,7 @@ + labels = deblank(M_.endo_names(ivar,:)); + headers = strvcat('Variables',labels(i1,:)); + corr = oo_.gamma_y{1}(i1,i1)./(sd(i1)*sd(i1)'); +- table(title,headers,labels(i1,:),corr,lh,8,4); ++ dyntable(title,headers,labels(i1,:),corr,lh,8,4); + end + + if options_.ar > 0 +@@ -98,7 +98,7 @@ + oo_.autocorr{i} = oo_.gamma_y{i+1}; + z(:,i) = diag(oo_.gamma_y{i+1}(i1,i1)); + end +- table(title,headers,labels,z,0,8,4); ++ dyntable(title,headers,labels,z,0,8,4); + end + + % 10/09/02 MJ +--- a/matlab/stoch_simul.m ++++ b/matlab/stoch_simul.m +@@ -60,7 +60,7 @@ + labels = deblank(M_.exo_names); + headers = strvcat('Variables',labels); + lh = size(labels,2)+2; +- table(my_title,headers,labels,M_.Sigma_e,lh,10,6); ++ dyntable(my_title,headers,labels,M_.Sigma_e,lh,10,6); + disp(' ') + disp_dr(oo_.dr,options_.order,var_list); + end --- dynare-4.0.3.orig/debian/patches/manual-fix-for-debian +++ dynare-4.0.3/debian/patches/manual-fix-for-debian @@ -0,0 +1,36 @@ +Fix reference manual with respect to Debian packaging. +--- a/doc/manual.xml ++++ b/doc/manual.xml +@@ -167,9 +167,9 @@ + + + On Debian GNU/Linux and Ubuntu +-Please refer to InstallOnDebianOrUbuntu on Dynare Wiki for detailed instructions. ++Install the dynare package. Documentation is in the dynare-doc package. MATLAB users should install the dynare-matlab package. + +-Dynare will be installed under /usr/lib/dynare. Documentation will be under /usr/share/doc/dynare. ++Dynare will be installed under /usr/share/dynare and /usr/lib/dynare. Documentation will be under /usr/share/doc/dynare-doc. + + + For other systems +@@ -196,7 +196,7 @@ + + Under Debian GNU/Linux or Ubuntu, type: + +- addpath /usr/lib/dynare/matlab ++ addpath /usr/share/dynare/matlab + + + Matlab will not remember this setting next time you run it, and you will have +@@ -221,10 +221,7 @@ + addpath c:\dynare\4.x.y\matlab + + +-Under Debian GNU/Linux or Ubuntu, type: +- +- addpath /usr/lib/dynare/matlab +- ++Under Debian GNU/Linux or Ubuntu, there is no need to use addpath; the packaging does it for you. + + You will also want to tell to Octave to accept the short syntax (without parentheses and quotes) for the dynare command, by typing: + --- dynare-4.0.3.orig/debian/patches/extra-addpath +++ dynare-4.0.3/debian/patches/extra-addpath @@ -0,0 +1,12 @@ +Add an extra addpath at the top of dynare.m so that the symlink in /usr/share/octave/site/api-???/m works +--- a/matlab/dynare.m ++++ b/matlab/dynare.m +@@ -33,6 +33,8 @@ + % You should have received a copy of the GNU General Public License + % along with Dynare. If not, see . + ++addpath /usr/share/dynare/matlab ++ + warning_config + + if exist('OCTAVE_VERSION') --- dynare-4.0.3.orig/debian/patches/rows-name-clash +++ dynare-4.0.3/debian/patches/rows-name-clash @@ -0,0 +1,186 @@ +Fixes the name clash of Dynare rows.m function with Octave's by renaming it to dynrows.m +--- a/matlab/compute_moments_varendo.m ++++ b/matlab/compute_moments_varendo.m +@@ -31,7 +31,7 @@ + % + % You should have received a copy of the GNU General Public License + % along with Dynare. If not, see . +- NumberOfEndogenousVariables = rows(var_list_); ++ NumberOfEndogenousVariables = dynrows(var_list_); + NumberOfExogenousVariables = M_.exo_nbr; + list_of_exogenous_variables = M_.exo_names; + NumberOfLags = options_.ar; +--- a/matlab/correlation_posterior_analysis.m ++++ b/matlab/correlation_posterior_analysis.m +@@ -72,7 +72,7 @@ + i1 = 1; tmp = zeros(SampleSize,1); + for file = 1:NumberOfFiles + load([ dname '/metropolis/' fname '_PosteriorCorrelations' int2str(file) '.mat']); +- i2 = i1 + rows(Correlation_array) - 1; ++ i2 = i1 + dynrows(Correlation_array) - 1; + tmp(i1:i2) = Correlation_array(:,indx1,indx2,nar); + i1 = i2+1; + end +--- a/matlab/covariance_posterior_analysis.m ++++ b/matlab/covariance_posterior_analysis.m +@@ -58,7 +58,7 @@ + i1 = 1; tmp = zeros(NumberOfSimulations,1); + for file = 1:NumberOfFiles + load([ dname '/metropolis/' fname '_Posterior2ndOrderMoments' int2str(file) '.mat']); +- i2 = i1 + rows(Covariance_matrix) - 1; ++ i2 = i1 + dynrows(Covariance_matrix) - 1; + tmp(i1:i2) = Covariance_matrix(:,symmetric_matrix_index(indx1,indx2,nvar)); + i1 = i2+1; + end +--- a/matlab/dsge_posterior_theoretical_correlation.m ++++ b/matlab/dsge_posterior_theoretical_correlation.m +@@ -63,14 +63,14 @@ + NumberOfCorrFiles = ceil(SampleSize/MaXNumberOfCorrLines); + end + +-NumberOfCorrLines = rows(Correlation_array); ++NumberOfCorrLines = dynrows(Correlation_array); + CorrFileNumber = 1; + + % Compute 2nd order moments and save them in *_PosteriorCorrelations* files + linea = 0; + for file = 1:NumberOfDrawsFiles + load([M_.dname '/metropolis/' DrawsFiles(file).name ]); +- NumberOfDraws = rows(pdraws); ++ NumberOfDraws = dynrows(pdraws); + isdrsaved = cols(pdraws)-1; + for linee = 1:NumberOfDraws + linea = linea+1; +--- a/matlab/dsge_posterior_theoretical_covariance.m ++++ b/matlab/dsge_posterior_theoretical_covariance.m +@@ -62,14 +62,14 @@ + NumberOfCovarFiles = ceil(SampleSize/MaXNumberOfCovarLines); + end + +-NumberOfCovarLines = rows(Covariance_matrix); ++NumberOfCovarLines = dynrows(Covariance_matrix); + CovarFileNumber = 1; + + % Compute 2nd order moments and save them in *_Posterior2ndOrderMoments* files + linea = 0; + for file = 1:NumberOfDrawsFiles + load([M_.dname '/metropolis/' DrawsFiles(file).name ],'pdraws'); +- NumberOfDraws = rows(pdraws); ++ NumberOfDraws = dynrows(pdraws); + isdrsaved = cols(pdraws)-1; + for linee = 1:NumberOfDraws + linea = linea+1; +--- a/matlab/dsge_posterior_theoretical_variance_decomposition.m ++++ b/matlab/dsge_posterior_theoretical_variance_decomposition.m +@@ -52,7 +52,7 @@ + nexo = M_.exo_nbr; + + +-NumberOfDrawsFiles = rows(DrawsFiles); ++NumberOfDrawsFiles = dynrows(DrawsFiles); + NumberOfSavedElementsPerSimulation = nvar*(nexo+1); + MaXNumberOfDecompLines = ceil(options_.MaxNumberOfBytes/NumberOfSavedElementsPerSimulation/8); + +@@ -65,7 +65,7 @@ + NumberOfDecompFiles = ceil(SampleSize/MaXNumberOfDecompLines); + end + +-NumberOfDecompLines = rows(Decomposition_array); ++NumberOfDecompLines = dynrows(Decomposition_array); + DecompFileNumber = 1; + + +@@ -75,7 +75,7 @@ + for file = 1:NumberOfDrawsFiles + load([M_.dname '/metropolis/' DrawsFiles(file).name ]); + isdrsaved = cols(pdraws)-1; +- NumberOfDraws = rows(pdraws); ++ NumberOfDraws = dynrows(pdraws); + for linee = 1:NumberOfDraws + linea = linea+1; + if isdrsaved +--- /dev/null ++++ b/matlab/dynrows.m +@@ -0,0 +1,20 @@ ++function nr=dynrows(x) ++ ++% Copyright (C) 2005 Dynare Team ++% ++% This file is part of Dynare. ++% ++% Dynare is free software: you can redistribute it and/or modify ++% it under the terms of the GNU General Public License as published by ++% the Free Software Foundation, either version 3 of the License, or ++% (at your option) any later version. ++% ++% Dynare is distributed in the hope that it will be useful, ++% but WITHOUT ANY WARRANTY; without even the implied warranty of ++% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++% GNU General Public License for more details. ++% ++% You should have received a copy of the GNU General Public License ++% along with Dynare. If not, see . ++ ++ nr = size(x,1); +\ No newline at end of file +--- a/matlab/generalized_cholesky.m ++++ b/matlab/generalized_cholesky.m +@@ -21,7 +21,7 @@ + % You should have received a copy of the GNU General Public License + % along with Dynare. If not, see . + +-n = rows(A); ++n = dynrows(A); + R = eye(n); + E = zeros(n,n); + norm_A = max(transpose(sum(abs(A)))); +--- a/matlab/rows.m ++++ /dev/null +@@ -1,20 +0,0 @@ +-function nr=rows(x) +- +-% Copyright (C) 2005 Dynare Team +-% +-% This file is part of Dynare. +-% +-% Dynare is free software: you can redistribute it and/or modify +-% it under the terms of the GNU General Public License as published by +-% the Free Software Foundation, either version 3 of the License, or +-% (at your option) any later version. +-% +-% Dynare is distributed in the hope that it will be useful, +-% but WITHOUT ANY WARRANTY; without even the implied warranty of +-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-% GNU General Public License for more details. +-% +-% You should have received a copy of the GNU General Public License +-% along with Dynare. If not, see . +- +- nr = size(x,1); +\ No newline at end of file +--- a/matlab/set_stationary_variables_list.m ++++ b/matlab/set_stationary_variables_list.m +@@ -39,7 +39,7 @@ + varlist = options_.varobs; + options_.varlist = varlist; + end +-nvar = rows(varlist); ++nvar = dynrows(varlist); + if ~isempty(options_.unit_root_vars) + vartan = []; + for i=1:nvar +--- a/matlab/variance_decomposition_posterior_analysis.m ++++ b/matlab/variance_decomposition_posterior_analysis.m +@@ -31,10 +31,10 @@ + tmp = dir([ dname '/metropolis/' fname '_PosteriorVarianceDecomposition*.mat']); + NumberOfFiles = length(tmp); + i1 = 1; tmp = zeros(NumberOfSimulations,1); +- indice = (indx-1)*rows(exonames)+jndx; ++ indice = (indx-1)*dynrows(exonames)+jndx; + for file = 1:NumberOfFiles + load([dname '/metropolis/' fname '_PosteriorVarianceDecomposition' int2str(file) '.mat']); +- i2 = i1 + rows(Decomposition_array) - 1; ++ i2 = i1 + dynrows(Decomposition_array) - 1; + tmp(i1:i2) = Decomposition_array(:,indice); + i1 = i2+1; + end --- dynare-4.0.3.orig/debian/patches/fhs-compliance +++ dynare-4.0.3/debian/patches/fhs-compliance @@ -0,0 +1,47 @@ +Hardcode paths in dynare_config.m, reflecting the FHS compliance of the package +--- a/matlab/dynare_config.m ++++ b/matlab/dynare_config.m +@@ -35,16 +35,17 @@ + if nargin + addpath(path_to_dynare); + end +-dynareroot = strrep(which('dynare.m'),'dynare.m',''); ++dynareroot = '/usr/lib/dynare/matlab/'; ++dynareroot_mfiles = '/usr/share/dynare/matlab/'; + + % Add path to distribution-related function if under Matlab + % without the statistics toolbox + if ~exist('OCTAVE_VERSION') && isempty(ver('stats')) +- addpath([dynareroot '/distributions/']) ++ addpath([dynareroot_mfiles '/distributions/']) + end + +-if exist([dynareroot '/AIM'])==7 % Add path to G.Anderson AIM solver (added by GP July'08) +- addpath([dynareroot '/AIM/']); ++if exist([dynareroot_mfiles '/AIM'])==7 % Add path to G.Anderson AIM solver (added by GP July'08) ++ addpath([dynareroot_mfiles '/AIM/']); + end + + if exist('OCTAVE_VERSION') +@@ -77,10 +78,10 @@ + %% subfolders if valid mex files exist. + matlab_path = path; + for i=1:number_of_mex_files +- test = strfind(matlab_path,[dynareroot mex_status{i,2}]); ++ test = strfind(matlab_path,[dynareroot_mfiles mex_status{i,2}]); + action = length(test); + if action +- rmpath([dynareroot mex_status{i,2}]); ++ rmpath([dynareroot_mfiles mex_status{i,2}]); + matlab_path = path; + end + end +@@ -91,7 +92,7 @@ + for i=1:number_of_mex_files + test = (exist(mex_status{i,1}) == 3); + if ~test +- addpath([dynareroot mex_status{i,2}]); ++ addpath([dynareroot_mfiles mex_status{i,2}]); + message = '[m] '; + else + message = '[mex] '; --- dynare-4.0.3.orig/debian/patches/series +++ dynare-4.0.3/debian/patches/series @@ -0,0 +1,7 @@ +extra-addpath +fhs-compliance +bashisms-in-makefiles +table-name-clash +rows-name-clash +build-matlab +manual-fix-for-debian --- dynare-4.0.3.orig/debian/po/POTFILES.in +++ dynare-4.0.3/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] dynare-matlab.templates --- dynare-4.0.3.orig/debian/po/fr.po +++ dynare-4.0.3/debian/po/fr.po @@ -0,0 +1,125 @@ +# French translations for dynare-matlab package +# Traductions françaises du paquet dynare-matlab. +# Copyright (C) 2009 Sébastien Villemot +# This file is distributed under the same license as the dynare package. +# Sébastien Villemot , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: dynare-matlab 4.0.3-2\n" +"Report-Msgid-Bugs-To: dynare@packages.debian.org\n" +"POT-Creation-Date: 2009-06-03 12:08+0200\n" +"PO-Revision-Date: 2009-06-03 12:56+0200\n" +"Last-Translator: Sébastien Villemot \n" +"Language-Team: French\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:1001 +msgid "Absolute path to MATLAB installation:" +msgstr "Chemin complet de l'installation de MATLAB:" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:1001 +msgid "Please enter the directory where you have installed MATLAB." +msgstr "Veuillez entrer le répertoire où vous avez installé MATLAB." + +#. Type: string +#. Description +#: ../dynare-matlab.templates:1001 +msgid "" +"For example, if MATLAB executable is \"/usr/local/matlab76/bin/matlab\", " +"please enter \"/usr/local/matlab76\"." +msgstr "Par exemple, si l'exécutable MATLAB est \"/usr/local/matlab76/bin/matlab\", veuillez entrer \"/usr/local/matlab76\"." + +#. Type: string +#. Description +#: ../dynare-matlab.templates:2001 +msgid "UNIX user account able to launch MATLAB:" +msgstr "Compte utilisateur UNIX capable de lancer MATLAB:" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:2001 +msgid "" +"If your MATLAB installation is such that only one or a limited set of UNIX " +"user accounts can launch MATLAB, please indicate here the login of such an " +"account." +msgstr "Si votre installation de MATLAB est telle que seulement certains comptes utilisateurs UNIX peuvent lancer MATLAB, merci d'indiquer ici le nom d'un tel compte." + +#. Type: string +#. Description +#: ../dynare-matlab.templates:2001 +msgid "" +"If every UNIX user account (including root) is allowed to launch MATLAB, " +"please leave this field empty." +msgstr "Si tous les comptes utilisateurs UNIX (super-utilisateur inclu) sont autorisés à lancer MATLAB, veuillez laisser ce champ vide." + +#. Type: note +#. Description +#: ../dynare-matlab.templates:3001 +msgid "Please make sure that MATLAB license manager is running" +msgstr "Veuillez vous assurer que le gestionnaire de licences MATLAB est lancé" + +#. Type: note +#. Description +#: ../dynare-matlab.templates:3001 +msgid "You have specified a UNIX user account for running MATLAB." +msgstr "Vous avez spécifié un compte utilisateur UNIX pour lancer MATLAB." + +#. Type: note +#. Description +#: ../dynare-matlab.templates:3001 +msgid "" +"This probably means that your MATLAB installation uses a license manager." +msgstr "Cela signifie probablement que votre installation MATLAB utilise un gestionnaire de licences." + +#. Type: note +#. Description +#: ../dynare-matlab.templates:3001 +msgid "If the license manager is not running, MEX files compilation will fail." +msgstr "Si le gestionnaire de licences n'est pas lancé, la compilation des fichiers MEX échouera." + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "Rename MATLAB files conflicting with Dynare?" +msgstr "Renommer les fichiers MATLAB qui entrent en conflit avec Dynare ?" + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "" +"A MATLAB installation is shipped with copies of GCC dynamic loadable " +"libraries, which typically come from an old version of GCC." +msgstr "Une installation de MATLAB est livrée avec des copies de bibliothèques dynamiques de GCC, qui proviennent généralement d'une ancienne version de GCC." + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "" +"This creates a conflict which makes Dynare fail when running the " +"preprocessor." +msgstr "Cela crée un conflit quit fait échouer Dynare au moment de lancer le préprocesseur." + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "" +"If you accept it, the installation process will rename the conflicting files " +"using a \".bak\" extension. These files are located in the \"sys/os/glnx86\" " +"or \"sys/os/glnxa64\" subdirectory of your MATLAB installation." +msgstr "Si vous l'acceptez, le processus d'installation renommera les fichiers créateurs de conflits en utilisant une extension \".bak\". Ces fichiers sont situés dans le sous-répertoire \"sys/os/glnx86\" ou \"sys/os/glnxa64\" de votre installation MATLAB." + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "" +"Otherwise, Dynare will probably fail to run, and you will need to manually " +"hack your MATLAB installation." +msgstr "Sinon, Dynare échouera probablement à l'exécution, et vous devrez manuellement bidouiller votre installation MATLAB." --- dynare-4.0.3.orig/debian/po/templates.pot +++ dynare-4.0.3/debian/po/templates.pot @@ -0,0 +1,124 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: dynare@packages.debian.org\n" +"POT-Creation-Date: 2009-06-03 12:08+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:1001 +msgid "Absolute path to MATLAB installation:" +msgstr "" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:1001 +msgid "Please enter the directory where you have installed MATLAB." +msgstr "" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:1001 +msgid "" +"For example, if MATLAB executable is \"/usr/local/matlab76/bin/matlab\", " +"please enter \"/usr/local/matlab76\"." +msgstr "" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:2001 +msgid "UNIX user account able to launch MATLAB:" +msgstr "" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:2001 +msgid "" +"If your MATLAB installation is such that only one or a limited set of UNIX " +"user accounts can launch MATLAB, please indicate here the login of such an " +"account." +msgstr "" + +#. Type: string +#. Description +#: ../dynare-matlab.templates:2001 +msgid "" +"If every UNIX user account (including root) is allowed to launch MATLAB, " +"please leave this field empty." +msgstr "" + +#. Type: note +#. Description +#: ../dynare-matlab.templates:3001 +msgid "Please make sure that MATLAB license manager is running" +msgstr "" + +#. Type: note +#. Description +#: ../dynare-matlab.templates:3001 +msgid "You have specified a UNIX user account for running MATLAB." +msgstr "" + +#. Type: note +#. Description +#: ../dynare-matlab.templates:3001 +msgid "" +"This probably means that your MATLAB installation uses a license manager." +msgstr "" + +#. Type: note +#. Description +#: ../dynare-matlab.templates:3001 +msgid "If the license manager is not running, MEX files compilation will fail." +msgstr "" + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "Rename MATLAB files conflicting with Dynare?" +msgstr "" + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "" +"A MATLAB installation is shipped with copies of GCC dynamic loadable " +"libraries, which typically come from an old version of GCC." +msgstr "" + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "" +"This creates a conflict which makes Dynare fail when running the " +"preprocessor." +msgstr "" + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "" +"If you accept it, the installation process will rename the conflicting files " +"using a \".bak\" extension. These files are located in the \"sys/os/glnx86\" " +"or \"sys/os/glnxa64\" subdirectory of your MATLAB installation." +msgstr "" + +#. Type: boolean +#. Description +#: ../dynare-matlab.templates:4001 +msgid "" +"Otherwise, Dynare will probably fail to run, and you will need to manually " +"hack your MATLAB installation." +msgstr ""