[packages/libnc-dap] - new

qboosh qboosh at pld-linux.org
Fri Mar 14 22:29:05 CET 2014


commit 03edbbfcf169dda6c32b7a67ccb33073e8857918
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Mar 14 22:32:02 2014 +0100

    - new

 libnc-dap-format.patch | 116 ++++++++++++++++++++++++++++++++++++++++++++
 libnc-dap-libdap.patch |  31 ++++++++++++
 libnc-dap.spec         | 127 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 274 insertions(+)
---
diff --git a/libnc-dap.spec b/libnc-dap.spec
new file mode 100644
index 0000000..c4eb9de
--- /dev/null
+++ b/libnc-dap.spec
@@ -0,0 +1,127 @@
+#
+# Conditional build:
+%bcond_without	tests		# perform tests
+#
+Summary:	The NetCDF interface to DAP-2 from OPeNDAP
+Summary(pl.UTF-8):	Interfejs NetCDF do DAP-2 z OPeNDAP
+Name:		libnc-dap
+Version:	3.7.4
+Release:	1
+License:	LGPL v2.1+
+Group:		Libraries
+Source0:	http://www.opendap.org/pub/source/%{name}-%{version}.tar.gz
+# Source0-md5:	671bf7ad07e00ed0be6518a80792c587
+Patch0:		%{name}-libdap.patch
+Patch1:		%{name}-format.patch
+URL:		http://opendap.org/
+BuildRequires:	autoconf >= 2.59
+BuildRequires:	automake
+BuildRequires:	gcc-fortran >= 5:4.0
+BuildRequires:	libdap-devel >= 3.9.2
+BuildRequires:	libstdc++-devel
+BuildRequires:	libtool >= 2:1.5
+BuildRequires:	pkgconfig
+Requires:	libdap >= 3.9.2
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The libnc-dap library is a call-for-call replacement for netcdf. It
+can read and write to and from NetCDF files on the local machine and
+it can read from DAP2 compatible data servers running on local or
+remote machines. Data served using DAP2 need not be stored in NetCDF
+files to be read using this replacement library.
+
+Also included in this package is the ncdump utility, also bundled with
+the original netcdf library, renamed dncdump, relinked with the
+library and thus able to read from DAP2 compatible servers.
+
+%description -l pl.UTF-8
+Biblioteka libnc-dap to zamiennik biblioteki netcdf o identycznych
+wywołaniach. Potrafi odczytywać i zapisywać pliki NetCDF na maszynie
+lokalnej, a także czytać z serwerów danych zgodnych z DAP2
+działających na lokalnej lub zdalnej maszynie. Dane serwowane przy
+użyciu DAP2 nie muszą być zapisane w plikach NetCDF, aby były czytane
+przez tę bibliotekę.
+
+Dołączone jest także narzędzie ncdump (dołączane do oryginalnej
+biblioteki netcdf), pod zmienioną nazwę dncdump i skonsolidowane z tą
+biblioteką, dzięki czemu potrafi czytać z serwerów zgodnych z DAP2.
+
+%package devel
+Summary:	Header files for OPeNDAP NetCDF library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki OPeNDAP NetCDF
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	libdap-devel >= 3.9.2
+
+%description devel
+Header files for OPeNDAP NetCDF library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki OPeNDAP NetCDF.
+
+%package static
+Summary:	Static OPeNDAP NetCDF library
+Summary(pl.UTF-8):	Statyczna biblioteka OPeNDAP NetCDF
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static OPeNDAP NetCDF library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka OPeNDAP NetCDF.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+%{__make}
+
+%{?with_tests:%{__make} check}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/ncdump $RPM_BUILD_ROOT%{_bindir}/dncdump
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc COPYRIGHT ChangeLog NEWS README*
+%attr(755,root,root) %{_bindir}/dncdump
+%attr(755,root,root) %{_libdir}/libnc-dap.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libnc-dap.so.3
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/ncdap-config
+%attr(755,root,root) %{_bindir}/ncdap-config-pkgconfig
+%attr(755,root,root) %{_libdir}/libnc-dap.so
+%{_includedir}/libnc-dap
+%{_pkgconfigdir}/libnc-dap.pc
+%{_aclocaldir}/libnc-dap.m4
+%{_aclocaldir}/libnc-dap_header.m4
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libnc-dap.a
diff --git a/libnc-dap-format.patch b/libnc-dap-format.patch
new file mode 100644
index 0000000..e1c3173
--- /dev/null
+++ b/libnc-dap-format.patch
@@ -0,0 +1,116 @@
+--- libnc-dap-3.7.4/ncdump/vardata.c.orig	2006-11-02 16:22:25.000000000 +0100
++++ libnc-dap-3.7.4/ncdump/vardata.c	2014-03-14 19:14:50.989826660 +0100
+@@ -488,8 +488,7 @@
+     for (iel = 0; iel < len-1; iel++) {
+ 	printbval(sout, fmt, vp, *vals++);
+ 	if (fsp->full_data_cmnts) {
+-	    Printf(sout);
+-	    Printf(",");
++	    Printf("%s,", sout);
+ 	    annotate (vp, fsp, cor, iel);
+ 	} else {
+ 	    (void) strcat(sout, ", ");
+@@ -498,7 +497,7 @@
+     }
+     printbval(sout, fmt, vp, *vals++);
+     if (fsp->full_data_cmnts) {
+-	Printf(sout);
++	Printf("%s", sout);
+ 	lastdelim (more, lastrow);
+ 	annotate (vp, fsp, cor, iel);
+     } else {
+@@ -536,8 +535,7 @@
+     for (iel = 0; iel < len-1; iel++) {
+ 	printsval(sout, fmt, vp, *vals++);
+ 	if (fsp->full_data_cmnts) {
+-	    Printf(sout);
+-	    Printf(",");
++	    Printf("%s,", sout);
+ 	    annotate (vp, fsp, cor, iel);
+ 	} else {
+ 	    (void) strcat(sout, ", ");
+@@ -546,7 +544,7 @@
+     }
+     printsval(sout, fmt, vp, *vals++);
+     if (fsp->full_data_cmnts) {
+-	Printf(sout);
++	Printf("%s", sout);
+ 	lastdelim (more, lastrow);
+ 	annotate (vp, fsp, cor, iel);
+     } else {
+@@ -586,8 +584,7 @@
+     for (iel = 0; iel < len-1; iel++) {
+ 	printival(sout, fmt, vp, *vals++);
+ 	if (fsp->full_data_cmnts) {
+-	    Printf(sout);
+-	    Printf(",");
++	    Printf("%s,", sout);
+ 	    annotate (vp, fsp, cor, iel);
+ 	} else {
+ 	    (void) strcat(sout, ", ");
+@@ -596,7 +593,7 @@
+     }
+     printival(sout, fmt, vp, *vals++);
+     if (fsp->full_data_cmnts) {
+-	Printf(sout);
++	Printf("%s", sout);
+ 	lastdelim (more, lastrow);
+ 	annotate (vp, fsp, cor, iel);
+     } else {
+@@ -634,8 +631,7 @@
+     for (iel = 0; iel < len-1; iel++) {
+ 	printfval(sout, fmt, vp, *vals++);
+ 	if (fsp->full_data_cmnts) {
+-	    Printf(sout);
+-	    Printf(",");
++	    Printf("%s,", sout);
+ 	    annotate (vp, fsp, cor, iel);
+ 	} else {
+ 	    (void) strcat(sout, ", ");
+@@ -644,7 +640,7 @@
+     }
+     printfval(sout, fmt, vp, *vals++);
+     if (fsp->full_data_cmnts) {
+-	Printf(sout);
++	Printf("%s", sout);
+ 	lastdelim (more, lastrow);
+ 	annotate (vp, fsp, cor, iel);
+     } else {
+@@ -682,8 +678,7 @@
+     for (iel = 0; iel < len-1; iel++) {
+ 	printdval(sout, fmt, vp, *vals++);
+ 	if (fsp->full_data_cmnts) {
+-	    Printf(sout);
+-	    Printf(",");
++	    Printf("%s,", sout);
+ 	    annotate (vp, fsp, cor, iel);
+ 	} else {
+ 	    (void) strcat(sout, ", ");
+@@ -692,7 +687,7 @@
+     }
+     printdval(sout, fmt, vp, *vals++);
+     if (fsp->full_data_cmnts) {
+-	Printf(sout);
++	Printf("%s", sout);
+ 	lastdelim (more, lastrow);
+ 	annotate (vp, fsp, cor, iel);
+     } else {
+@@ -719,8 +714,7 @@
+    for (iel = 0; iel < len-1; iel++) {
+       print_any_val(sout, fmt, vp, type, vals);
+       if (fsp->full_data_cmnts) {
+-	 Printf(sout);
+-	 Printf(",");
++	 Printf("%s,", sout);
+ 	 annotate (vp, fsp, cor, iel);
+       } else {
+ 	 (void) strcat(sout, ", ");
+@@ -730,7 +724,7 @@
+    print_any_val(sout, fmt, vp, type, vals);
+ 
+    if (fsp->full_data_cmnts) {
+-      Printf(sout);
++      Printf("%s", sout);
+       lastdelim (more, lastrow);
+       annotate (vp, fsp, cor, iel);
+    } else {
diff --git a/libnc-dap-libdap.patch b/libnc-dap-libdap.patch
new file mode 100644
index 0000000..a7ec665
--- /dev/null
+++ b/libnc-dap-libdap.patch
@@ -0,0 +1,31 @@
+--- libnc-dap-3.7.4/NCConnect.cc.orig	2008-09-18 01:00:57.000000000 +0200
++++ libnc-dap-3.7.4/NCConnect.cc	2014-03-14 17:03:17.820157904 +0100
+@@ -109,7 +109,7 @@ static nc_type get_attr_nc_type(AttrType
+     
+     @param name A filename or URL. */
+ NCConnect::NCConnect(const string & name, ClientParams * cp)
+-    :AISConnect(name), d_client_params(cp), d_global_attributes(0),
++    :Connect(name), d_client_params(cp), d_global_attributes(0),
+     d_constrained_dds(0), d_translated_dds(0), d_factory(0),
+     d_ncid(-1), d_nvars(-1), d_recdim(-1), d_ndims(0)
+       // Note the trick above where d_factory is initialized to null and null
+--- libnc-dap-3.7.4/NCConnect.h.orig	2008-02-02 22:31:13.000000000 +0100
++++ libnc-dap-3.7.4/NCConnect.h	2014-03-14 16:55:57.696843041 +0100
+@@ -37,7 +37,7 @@
+ #ifndef _ncconnect_h
+ #define _ncconnect_h 1
+ 
+-#include "AISConnect.h"		// Changed to AISConnect. 03/11/03 jhrg
++#include "Connect.h"
+ #include "NCTypeFactory.h"
+ #include "ClientParams.h"
+ #include "nc_util.h"
+@@ -58,7 +58,7 @@ using namespace libdap ;
+     @todo Update; remove deprecated Connect methods.
+ 
+     @author Reza Nekovei, James Gallagher */
+-class NCConnect: public AISConnect {
++class NCConnect: public Connect {
+ private:
+     ClientParams *d_client_params;
+     AttrTable *d_global_attributes;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libnc-dap.git/commitdiff/03edbbfcf169dda6c32b7a67ccb33073e8857918



More information about the pld-cvs-commit mailing list