debian/0000755000000000000000000000000012250161640007163 5ustar debian/rules0000755000000000000000000000011612250161640010241 0ustar #!/usr/bin/make -f %: dh $@ override_dh_gencontrol: dh_pdl dh_gencontrol debian/control0000644000000000000000000000163612250161640010574 0ustar Source: libpdl-io-matlab-perl Section: perl Priority: optional Maintainer: Debian Perl Group Uploaders: Dima Kogan Build-Depends: debhelper (>= 9.20120312), perl, # versioned pdl dep to get dh_pdl and PDL_Indx pdl (>= 1:2.007-2), libmatio-dev ( >= 1.5.0 ) Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libpdl-io-matlab-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libpdl-io-matlab-perl.git Homepage: https://github.com/jlapeyre/PDL-IO-Matlab/ Package: libpdl-io-matlab-perl Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${pdl:Depends} Description: PDL support to read/write Matlab format data files PDL::IO::Matlab provides routines to read and write Matlab data files in PDL (perl data language) programs. Both functional and OO interface are provided. debian/gbp.conf0000644000000000000000000000010212250161640010573 0ustar [DEFAULT] upstream-tag = release/v%(version)s pristine-tar = True debian/source/0000755000000000000000000000000012250161640010463 5ustar debian/source/lintian-overrides0000644000000000000000000000043312250161640014044 0ustar # These relate to upstream configure script for the libmatio upstream ships. I # do not use this libmatio since it's in Debian already, so this doesn't matter. # Repacking isn't worth the trouble to fix this libpdl-io-matlab-perl source: outdated-autotools-helper-file matio-1.5.0/* debian/source/format0000644000000000000000000000001412250161640011671 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000024112250161640011032 0ustar libpdl-io-matlab-perl (0.005-1) unstable; urgency=low * New release (Closes: #729772) -- Dima Kogan Sat, 16 Nov 2013 20:43:44 -0800 debian/compat0000644000000000000000000000000212250161640010361 0ustar 9 debian/patches/0000755000000000000000000000000012250161640010612 5ustar debian/patches/0004-Make-now-knows-about-a-source-dependency-and-can-reb.patch0000644000000000000000000000144012250161640024035 0ustar From: Dima Kogan Date: Sat, 16 Nov 2013 21:52:51 -0800 Subject: Make now knows about a source dependency and can rebuild intelligently Forwarded: https://github.com/jlapeyre/PDL-IO-Matlab/issues/2 --- Makefile.PL | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index b765d42..2f1c35f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -27,7 +27,14 @@ my %more_items = ( map { $hash{$_} = $more_items{$_} } keys %more_items; -sub MY::postamble { pdlpp_postamble($matlab_package)}; +sub MY::postamble { + # These are #included, so make now knows to rebuild the .o when these .c + # change + "Matlab.o: extra_matio.c convert_matvar_pdl.c\n" . + pdlpp_postamble($matlab_package) + } + + WriteMakefile( %hash ); debian/patches/0005-removed-POD-coverage-tests.-these-fail.-I-notified-u.patch0000644000000000000000000000202712250161640023632 0ustar From: Dima Kogan Date: Sat, 16 Nov 2013 22:05:42 -0800 Subject: removed POD coverage tests. these fail. I notified upstream Forwarded: https://github.com/jlapeyre/PDL-IO-Matlab/issues/2 --- t/pod-coverage.t | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 t/pod-coverage.t diff --git a/t/pod-coverage.t b/t/pod-coverage.t deleted file mode 100644 index fc40a57..0000000 --- a/t/pod-coverage.t +++ /dev/null @@ -1,18 +0,0 @@ -use strict; -use warnings; -use Test::More; - -# Ensure a recent version of Test::Pod::Coverage -my $min_tpc = 1.08; -eval "use Test::Pod::Coverage $min_tpc"; -plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage" - if $@; - -# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version, -# but older versions don't recognize some common documentation styles -my $min_pc = 0.18; -eval "use Pod::Coverage $min_pc"; -plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" - if $@; - -all_pod_coverage_ok(); debian/patches/0002-I-use-the-libmatio-in-Debian-so-I-don-t-build-the-on.patch0000644000000000000000000000503612250161640023451 0ustar From: Dima Kogan Date: Sat, 16 Nov 2013 20:30:41 -0800 Subject: I use the libmatio in Debian, so I don't build the one here Forwarded: not-needed --- Makefile.PL | 33 ++++----------------------------- matlab.pd | 2 +- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 5feb67e..b765d42 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,15 +5,7 @@ use ExtUtils::MakeMaker; use PDL::Core::Dev; # Makefile has targets 'cleanall' and 'distcleanall'. -# These do clean and distclean in both module distribution -# toplevel and in $matio_top_level. - -my $matio_top_level = './matio-1.5.0'; - -if ( not -e "$matio_top_level/src/matio_pubconf.h" ) { - print "Makefile.PL: running configure in $matio_top_level\n"; - system "cd $matio_top_level; ./configure"; -} +# These do clean and distclean in module distribution my $matlab_package = ['matlab.pd', 'Matlab', 'PDL::IO::Matlab']; my %hash = pdlpp_stdargs($matlab_package); @@ -24,35 +16,18 @@ my %more_items = ( VERSION_FROM => 'matlab.pd', ABSTRACT_FROM => 'matlab.pd', PL_FILES => {}, - OBJECT => ' Matlab.o matio_obj.o ' , - LIBS => [ ' -lz -lhdf5 ' ], + LIBS => [ '-lmatio' ], PREREQ_PM => { 'Test::More' => 0, 'PDL' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, - # note the file below that matio Makefile fails to clean. - clean => { FILES => ' PDL-IO-Matlab-* Matlab.* tst.mat testf.mat ' . - $matio_top_level . '/test/atconfig' }, + clean => { FILES => ' PDL-IO-Matlab-* Matlab.* tst.mat testf.mat ' }, ); map { $hash{$_} = $more_items{$_} } keys %more_items; -# cd $matio_top_level; ./configure - -sub MY::postamble { qq{ - -matio_obj.o: - cd $matio_top_level; cd src; \$(MAKE) - ld -r -o matio_obj.o $matio_top_level/src/.libs/*.o - -cleanall: clean - cd $matio_top_level; \$(MAKE) clean - -distcleanall: distclean - cd $matio_top_level; \$(MAKE) distclean - -} . pdlpp_postamble($matlab_package)}; +sub MY::postamble { pdlpp_postamble($matlab_package)}; WriteMakefile( %hash ); diff --git a/matlab.pd b/matlab.pd index 386774a..d816156 100644 --- a/matlab.pd +++ b/matlab.pd @@ -5,7 +5,7 @@ use warnings; our $VERSION = '0.005'; pp_setversion("'$VERSION'"); -my $Matio_src = 'matio-1.5.0/src'; +my $Matio_src = '/usr/include'; # This works nicely, but I am not using it for anything my ($MAT_FT_MAT73,$MAT_FT_MAT5,$MAT_FT_MAT4) = (0,1,2); debian/patches/series0000644000000000000000000000046212250161640012031 0ustar 0001-PDL-IO-Matlab-now-works-with-PDL-2.007.patch 0002-I-use-the-libmatio-in-Debian-so-I-don-t-build-the-on.patch 0003-printf-format-types-now-use-z-when-printing-size_t-d.patch 0004-Make-now-knows-about-a-source-dependency-and-can-reb.patch 0005-removed-POD-coverage-tests.-these-fail.-I-notified-u.patch debian/patches/0003-printf-format-types-now-use-z-when-printing-size_t-d.patch0000644000000000000000000000223312250161640024312 0ustar From: Dima Kogan Date: Sat, 16 Nov 2013 20:56:24 -0800 Subject: printf format types now use 'z' when printing size_t data Forwarded: https://github.com/jlapeyre/PDL-IO-Matlab/issues/2 --- extra_matio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra_matio.c b/extra_matio.c index bd305c4..673cb0c 100644 --- a/extra_matio.c +++ b/extra_matio.c @@ -16,17 +16,17 @@ void extra_matio_print_all_var_info_clumsy(mat_t * matfp) { printf("%-20s", matvar->name); if ( matvar->rank > 0 ) { int cnt = 0; - printf("%8d", matvar->dims[0]); + printf("%8zd", matvar->dims[0]); for ( i = 1; i < matvar->rank; i++ ) { if ( ceil(log10(matvar->dims[i]))+1 < 32 ) - cnt += sprintf(size+cnt,"x%d", matvar->dims[i]); + cnt += sprintf(size+cnt,"x%zd", matvar->dims[i]); } printf("%-10s",size); } else { printf(" "); } nbytes = Mat_VarGetSize(matvar); - printf(" %8d",nbytes); + printf(" %8zd",nbytes); printf(" %-18s\n",mxclass[matvar->class_type-1]); Mat_VarPrint(matvar,0); Mat_VarFree(matvar); debian/patches/0001-PDL-IO-Matlab-now-works-with-PDL-2.007.patch0000644000000000000000000000655112250161640020340 0ustar From: Dima Kogan Date: Sat, 16 Nov 2013 20:30:18 -0800 Subject: PDL::IO::Matlab now works with PDL >= 2.007 Forwarded: https://github.com/jlapeyre/PDL-IO-Matlab/issues/2 PDL 2.007 introduced a new type used for dimension sizes. This patch uses that new type. This is a required change to work with newer PDLs. This patch does NOT preserve backwards compatibility with older PDLs. --- convert_matvar_pdl.c | 57 ++++++++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 37 deletions(-) diff --git a/convert_matvar_pdl.c b/convert_matvar_pdl.c index 6cf968a..8f172f8 100644 --- a/convert_matvar_pdl.c +++ b/convert_matvar_pdl.c @@ -1,19 +1,4 @@ -/* - -Following taken from pdl.h. -This is platform dependent, so I need something more sophisticated. - -enum pdl_datatypes { PDL_B, PDL_S, PDL_US, PDL_L, PDL_LL, PDL_F, PDL_D }; - -typedef unsigned char PDL_Byte; -typedef short PDL_Short; -typedef unsigned short PDL_Ushort; -typedef int PDL_Long; -typedef long PDL_LongLong; -typedef float PDL_Float; -typedef double PDL_Double; - -*/ +#include static char *matvar_class_type_desc[16] = {"Undefined","Cell Array","Structure", @@ -62,28 +47,26 @@ static int matvar_class_to_pdl_type[16] = }; -/* enum pdl_datatypes { PDL_B, PDL_S, PDL_US, PDL_L, PDL_LL, PDL_F, PDL_D }; */ - -static int pdl_type_to_matvar_type[7] = +static int pdl_type_to_matvar_type[] = { - MAT_T_INT8, /* PDL_B */ - MAT_T_INT16, /* PDL_S */ - MAT_T_UINT16, /* PDL_US */ - MAT_T_INT32, /* PDL_L */ - MAT_T_INT32, /* PDL_LL */ - MAT_T_SINGLE, /* PDL_F */ - MAT_T_DOUBLE, /* PDL_D */ + [PDL_B] = MAT_T_INT8, + [PDL_S] = MAT_T_INT16, + [PDL_US] = MAT_T_UINT16, + [PDL_L] = MAT_T_INT32, + [PDL_LL] = MAT_T_INT32, + [PDL_F] = MAT_T_SINGLE, + [PDL_D] = MAT_T_DOUBLE, }; -static int pdl_type_to_matvar_class[7] = +static int pdl_type_to_matvar_class[] = { - MAT_C_INT8, /* PDL_B */ - MAT_C_INT16, /* PDL_S */ - MAT_C_UINT16, /* PDL_US */ - MAT_C_INT32, /* PDL_L */ - MAT_C_INT32, /* PDL_LL */ - MAT_C_SINGLE, /* PDL_F */ - MAT_C_DOUBLE, /* PDL_D */ + [PDL_B] = MAT_C_INT8, + [PDL_S] = MAT_C_INT16, + [PDL_US] = MAT_C_UINT16, + [PDL_L] = MAT_C_INT32, + [PDL_LL] = MAT_C_INT32, + [PDL_F] = MAT_C_SINGLE, + [PDL_D] = MAT_C_DOUBLE, }; @@ -96,7 +79,7 @@ static void delete_matvar_to_pdl_data(pdl* p, size_t param) typedef void (*DelMagic)(pdl *, size_t param); static void default_magic(pdl *p, size_t pa) { p->data = 0; } -static pdl* my_pdl_wrap(void *data, int datatype, PDL_Long dims[], +static pdl* my_pdl_wrap(void *data, int datatype, PDL_Indx dims[], int ndims, DelMagic delete_magic, int delparam) { pdl* npdl = PDL->pdlnew(); @@ -115,10 +98,10 @@ static pdl* matvar_to_pdl (matvar_t * matvar, int onedr) { int ndims = matvar->rank; pdl * piddle; int i, pdl_data_type; - PDL_Long * dims; + PDL_Indx * dims; if ( matvar->isComplex ) barf("matvar_to_pdl: Complex matlab variables not supported."); - dims = (PDL_Long *)malloc(sizeof(PDL_Long) * ndims); + dims = (PDL_Indx *)malloc(sizeof(PDL_Indx) * ndims); // fprintf(stderr, "ONEDR %d\n", onedr); if (ndims == 2 && onedr != 0 ) { if (matvar->dims[0] == 1) { debian/copyright0000644000000000000000000000475712250161640011133 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: PDL-IO-Matlab Source: https://github.com/jlapeyre/PDL-IO-Matlab/releases Upstream-Contact: John Lapeyre Files: * Copyright: 2012, John Lapeyre License: Artistic or GPL-1+ Files: matio-1.5.0/* Copyright: 2011, Christopher C. Hulbert Comment: This is in the source tree, but not used by this package as libmatio is already in Debian License: BSD-2-clause Files: debian/* Copyright: 2013, Dima Kogan License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program 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 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. License: BSD-2-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY CHRISTOPHER C. HULBERT ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CHRISTOPHER C. HULBERT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/watch0000644000000000000000000000015712250161640010217 0ustar version = 3 https://github.com/jlapeyre/PDL-IO-Matlab/tags .*/PDL-IO-Matlab/archive/release/(\d[\d\.]+).tar.gz