[packages/loaddap] - updated to 3.7.3 - updated includes patch - removed obsolete libdap patch - added octave patch (fi
qboosh
qboosh at pld-linux.org
Thu Mar 17 21:02:17 CET 2016
commit 5973091ad5cc5aee20a13756b9a9cce7acdb3073
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Mar 17 21:06:18 2016 +0100
- updated to 3.7.3
- updated includes patch
- removed obsolete libdap patch
- added octave patch (fixes build with octave 4)
- package octave files in proper directories
loaddap-includes.patch | 2 -
loaddap-libdap.patch | 183 -------------------------------------------------
loaddap-octave.patch | 20 ++++++
loaddap.spec | 34 +++++----
4 files changed, 40 insertions(+), 199 deletions(-)
---
diff --git a/loaddap.spec b/loaddap.spec
index b20a901..749284d 100644
--- a/loaddap.spec
+++ b/loaddap.spec
@@ -1,26 +1,29 @@
-# TODO: proper paths for .oct and *.m files
Summary: The OPeNDAP Matlab Command Line Interface Client
Summary(pl.UTF-8): Klient linii poleceń Matlaba do OPeNDAP
Name: loaddap
-Version: 3.7.2
-Release: 0.1
+Version: 3.7.3
+Release: 1
License: LGPL v2.1+
Group: Libraries
Source0: http://www.opendap.org/pub/source/%{name}-%{version}.tar.gz
-# Source0-md5: 121330c1568f00e6861d82d15492d3de
-Patch0: %{name}-libdap.patch
-Patch1: %{name}-includes.patch
+# Source0-md5: 9482c748418c38c6e26a2b63dfd5643b
+#Patch0: %{name}-libdap.patch
+Patch0: %{name}-includes.patch
+Patch1: %{name}-octave.patch
URL: http://opendap.org/
BuildRequires: autoconf >= 2.68
BuildRequires: automake
-BuildRequires: libdap-devel >= 3.8.0
+BuildRequires: libdap-devel >= 3.12.0
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:2
BuildRequires: octave-devel
BuildRequires: pkgconfig
-Requires: libdap >= 3.8.0
+Requires: libdap >= 3.12.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define octave_m_dir %(octave-config --m-site-dir)
+%define octave_oct_dir %(octave-config --oct-site-dir)
+
%description
This package contains the OPeNDAP Matlab command line interface
client. This client can be used to read data from DAP2-compilant
@@ -45,13 +48,13 @@ do Matlaba/Octave.
%{__autoheader}
%{__automake}
%configure \
- MATLAB_VERSION=7.8 \
MEX=/usr/bin/mkoctfile \
MEXEXT=oct \
--with-matlab=/usr
%{__make} \
MEX="/usr/bin/mkoctfile -I. -DHAVE_CONFIG_H" \
- MEXFLAGS=
+ MEXFLAGS= \
+ MEXLDADD=
%install
rm -rf $RPM_BUILD_ROOT
@@ -59,6 +62,10 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{octave_m_dir},%{octave_oct_dir}}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/*.oct $RPM_BUILD_ROOT%{octave_oct_dir}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/*.m $RPM_BUILD_ROOT%{octave_m_dir}
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -66,7 +73,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc COPYRIGHT_URI ChangeLog NEWS README
%attr(755,root,root) %{_bindir}/writedap
-# FIXME: proper location for .oct and .m files
-%attr(755,root,root) %{_bindir}/loaddap.oct
-%{_bindir}/loaddap.m
-%{_bindir}/whodap.m
+%attr(755,root,root) %{octave_oct_dir}/loaddap.oct
+%{octave_m_dir}/loaddap.m
+%{octave_m_dir}/whodap.m
diff --git a/loaddap-includes.patch b/loaddap-includes.patch
index 5b4486b..19b57f8 100644
--- a/loaddap-includes.patch
+++ b/loaddap-includes.patch
@@ -46,5 +46,3 @@
#include <string.h>
#include <mex.h>
---- loaddap-3.7.2/extend.c.orig 2014-03-15 12:37:05.377202340 +0100
-+++ loaddap-3.7.2/extend.c 2014-03-15 12:39:53.493861951 +0100
diff --git a/loaddap-libdap.patch b/loaddap-libdap.patch
deleted file mode 100644
index 982c344..0000000
--- a/loaddap-libdap.patch
+++ /dev/null
@@ -1,183 +0,0 @@
---- loaddap-3.7.2/ClientByte.cc.orig 2012-05-31 19:22:52.000000000 +0200
-+++ loaddap-3.7.2/ClientByte.cc 2014-03-15 10:24:30.344202847 +0100
-@@ -94,7 +94,7 @@ ClientByte::print_val(FILE *os, string,
- fprintf(os, "%s\n%s\n", type_name().c_str(), get_matlab_name().c_str());
-
- if (numeric_to_float) {
-- dods_float64 df = _buf;
-+ dods_float64 df = d_buf;
- if (ascii)
- fprintf(os, "%lf ", df);
- else
-@@ -102,9 +102,9 @@ ClientByte::print_val(FILE *os, string,
- }
- else {
- if (ascii)
-- fprintf(os, "%d ", (unsigned int)_buf);
-+ fprintf(os, "%d ", (unsigned int)d_buf);
- else
-- (void)fwrite((void *)&_buf, sizeof(dods_byte), 1, os);
-+ (void)fwrite((void *)&d_buf, sizeof(dods_byte), 1, os);
- }
- }
-
---- loaddap-3.7.2/ClientFloat32.cc.orig 2012-05-31 19:22:55.000000000 +0200
-+++ loaddap-3.7.2/ClientFloat32.cc 2014-03-15 10:27:16.194195889 +0100
-@@ -83,7 +83,7 @@ ClientFloat32::print_val(FILE *os, strin
- DBG( cerr << "CF32: Translate: " << translate << ";" << endl;)
-
- if (translate) {
-- dods_float64 df = _buf;
-+ dods_float64 df = d_buf;
- if (ascii)
- fprintf(os, "%lg ", df);
- else
-@@ -91,9 +91,9 @@ ClientFloat32::print_val(FILE *os, strin
- }
- else {
- if (ascii)
-- fprintf(os, "%g ", (dods_float32)_buf);
-+ fprintf(os, "%g ", (dods_float32)d_buf);
- else
-- fwrite((void *)&_buf, sizeof(dods_float32), 1, os);
-+ fwrite((void *)&d_buf, sizeof(dods_float32), 1, os);
- }
- }
-
---- loaddap-3.7.2/ClientFloat64.cc.orig 2012-05-31 19:22:53.000000000 +0200
-+++ loaddap-3.7.2/ClientFloat64.cc 2014-03-15 10:25:06.720867988 +0100
-@@ -77,9 +77,9 @@ ClientFloat64::print_val(FILE *os, strin
- fprintf(os, "%s\n%s\n", type_name().c_str(), get_matlab_name().c_str());
-
- if (ascii)
-- fprintf(os, "%lf ", _buf);
-+ fprintf(os, "%lf ", d_buf);
- else
-- fwrite((void *)&_buf, sizeof(dods_float64), 1, os);
-+ fwrite((void *)&d_buf, sizeof(dods_float64), 1, os);
- }
-
- AttrTable &
---- loaddap-3.7.2/ClientInt16.cc.orig 2012-05-31 19:22:52.000000000 +0200
-+++ loaddap-3.7.2/ClientInt16.cc 2014-03-15 10:25:49.377532864 +0100
-@@ -77,7 +77,7 @@ ClientInt16::print_val(FILE *os, string,
- fprintf(os, "%s\n%s\n", type_name().c_str(), get_matlab_name().c_str());
-
- if (numeric_to_float) {
-- dods_float64 df = _buf;
-+ dods_float64 df = d_buf;
- if (ascii)
- fprintf(os, "%lf ", df);
- else
-@@ -85,9 +85,9 @@ ClientInt16::print_val(FILE *os, string,
- }
- else {
- if (ascii)
-- fprintf(os, "%d ", (unsigned int)_buf);
-+ fprintf(os, "%d ", (unsigned int)d_buf);
- else
-- fwrite((void *)&_buf, sizeof(dods_int16), 1, os);
-+ fwrite((void *)&d_buf, sizeof(dods_int16), 1, os);
- }
- }
-
---- loaddap-3.7.2/ClientInt32.cc.orig 2012-05-31 19:22:52.000000000 +0200
-+++ loaddap-3.7.2/ClientInt32.cc 2014-03-15 10:24:53.967535189 +0100
-@@ -77,7 +77,7 @@ ClientInt32::print_val(FILE *os, string,
- fprintf(os, "%s\n%s\n", type_name().c_str(), get_matlab_name().c_str());
-
- if (numeric_to_float) {
-- dods_float64 df = _buf;
-+ dods_float64 df = d_buf;
- if (ascii)
- fprintf(os, "%lf ", df);
- else
-@@ -85,9 +85,9 @@ ClientInt32::print_val(FILE *os, string,
- }
- else {
- if (ascii)
-- fprintf(os, "%d ", (unsigned int)_buf);
-+ fprintf(os, "%d ", (unsigned int)d_buf);
- else
-- (void)fwrite((void *)&_buf, sizeof(dods_int32), 1, os);
-+ (void)fwrite((void *)&d_buf, sizeof(dods_int32), 1, os);
- }
- }
-
---- loaddap-3.7.2/ClientStr.cc.orig 2012-05-31 19:22:50.000000000 +0200
-+++ loaddap-3.7.2/ClientStr.cc 2014-03-15 10:25:20.130867424 +0100
-@@ -105,7 +105,7 @@ ClientStr::print_val(FILE *os, string, b
- // Translate all string variables to Floats. jhrg 1/9/98.
- if (string_to_float) {
- char *ptr = NULL;
-- const char *str = _buf.c_str();
-+ const char *str = d_buf.c_str();
- val = strtod(str, &ptr);
- print_as_float = !(val == 0.0 && (ptr == str));
-
-@@ -113,7 +113,7 @@ ClientStr::print_val(FILE *os, string, b
- val = MakeNaN();
- print_as_float = true;
- if (warning) {
-- cerr << "Could not translate `" << _buf << "' to a Float64,"
-+ cerr << "Could not translate `" << d_buf << "' to a Float64,"
- << endl;
- cerr << "interning as NaN (not a number: " << val
- << ")" << endl;
-@@ -140,8 +140,8 @@ ClientStr::print_val(FILE *os, string, b
- // os << type_name() << endl << get_matlab_name() << endl;
-
- // There's no special case for ASCII since this is a String.
-- fprintf(os, "%s\n", _buf.c_str());
--// os << _buf << endl;
-+ fprintf(os, "%s\n", d_buf.c_str());
-+// os << d_buf << endl;
- }
- }
-
---- loaddap-3.7.2/ClientUInt16.cc.orig 2012-05-31 19:22:55.000000000 +0200
-+++ loaddap-3.7.2/ClientUInt16.cc 2014-03-15 10:27:02.717529786 +0100
-@@ -79,7 +79,7 @@ ClientUInt16::print_val(FILE *os, string
- fprintf(os, "%s\n%s\n", type_name().c_str(), get_matlab_name().c_str());
-
- if (numeric_to_float) {
-- dods_float64 df = _buf;
-+ dods_float64 df = d_buf;
- if (ascii)
- fprintf(os, "%lf ", df);
- else
-@@ -87,9 +87,9 @@ ClientUInt16::print_val(FILE *os, string
- }
- else {
- if (ascii)
-- fprintf(os, "%u ", (unsigned int)_buf);
-+ fprintf(os, "%u ", (unsigned int)d_buf);
- else
-- fwrite((void *)&_buf, sizeof(dods_uint16), 1, os);
-+ fwrite((void *)&d_buf, sizeof(dods_uint16), 1, os);
- }
- }
-
---- loaddap-3.7.2/ClientUInt32.cc.orig 2012-05-31 19:22:55.000000000 +0200
-+++ loaddap-3.7.2/ClientUInt32.cc 2014-03-15 10:25:36.510866740 +0100
-@@ -78,7 +78,7 @@ ClientUInt32::print_val(FILE *os, string
- fprintf(os, "%s\n%s\n", type_name().c_str(), get_matlab_name().c_str());
-
- if (numeric_to_float) {
-- dods_float64 df = _buf;
-+ dods_float64 df = d_buf;
- if (ascii)
- fprintf(os, "%lf ", df);
- else
-@@ -86,9 +86,9 @@ ClientUInt32::print_val(FILE *os, string
- }
- else {
- if (ascii)
-- fprintf(os, "%u ", _buf);
-+ fprintf(os, "%u ", d_buf);
- else
-- fwrite((void *)&_buf, sizeof(dods_uint32), 1, os);
-+ fwrite((void *)&d_buf, sizeof(dods_uint32), 1, os);
- }
- }
-
diff --git a/loaddap-octave.patch b/loaddap-octave.patch
new file mode 100644
index 0000000..4ce1f94
--- /dev/null
+++ b/loaddap-octave.patch
@@ -0,0 +1,20 @@
+--- loaddap-3.7.3/extend.c.orig 2016-03-17 20:24:25.242736286 +0100
++++ loaddap-3.7.3/extend.c 2016-03-17 20:28:53.996058341 +0100
+@@ -49,7 +49,6 @@
+ #include <string.h>
+
+ #include <mex.h>
+-#include <matrix.h>
+
+ #if DMALLOC
+ // #include "dods_memory.h"
+--- loaddap-3.7.3/loaddap.c.orig 2016-03-17 20:24:25.242736286 +0100
++++ loaddap-3.7.3/loaddap.c 2016-03-17 20:28:29.729392693 +0100
+@@ -77,7 +77,6 @@
+ #endif
+
+ #include <mex.h>
+-#include <matrix.h>
+
+ #include "error.h"
+ #include "MLVars.h"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/loaddap.git/commitdiff/5973091ad5cc5aee20a13756b9a9cce7acdb3073
More information about the pld-cvs-commit
mailing list