Rebuild ncx.c to fix arm build

This commit is contained in:
Orion Poplawski 2016-01-22 13:27:31 -07:00
parent bafec73dd6
commit 50eaf64b4d
2 changed files with 6 additions and 61 deletions

View File

@ -1,51 +0,0 @@
diff -up netcdf-c-4.4.0/libsrc/ncx.c.char netcdf-c-4.4.0/libsrc/ncx.c
--- netcdf-c-4.4.0/libsrc/ncx.c.char 2016-01-13 14:40:17.000000000 -0700
+++ netcdf-c-4.4.0/libsrc/ncx.c 2016-01-21 12:38:44.213674715 -0700
@@ -17231,7 +17231,11 @@ ncx_putn_ulonglong_uint(void **xpp, size
/* text */
int
+#ifdef __arm__
+ncx_getn_text(const void **xpp, size_t nelems, signed char *tp)
+#else
ncx_getn_text(const void **xpp, size_t nelems, char *tp)
+#endif
{
(void) memcpy(tp, *xpp, nelems);
*xpp = (void *)((char *)(*xpp) + nelems);
@@ -17240,7 +17244,11 @@ ncx_getn_text(const void **xpp, size_t n
}
int
+#ifdef __arm__
+ncx_pad_getn_text(const void **xpp, size_t nelems, signed char *tp)
+#else
ncx_pad_getn_text(const void **xpp, size_t nelems, char *tp)
+#endif
{
size_t rndup = nelems % X_ALIGN;
@@ -17255,7 +17263,11 @@ ncx_pad_getn_text(const void **xpp, size
}
int
+#ifdef __arm__
+ncx_putn_text(void **xpp, size_t nelems, const signed char *tp)
+#else
ncx_putn_text(void **xpp, size_t nelems, const char *tp)
+#endif
{
(void) memcpy(*xpp, tp, nelems);
*xpp = (void *)((char *)(*xpp) + nelems);
@@ -17265,7 +17277,11 @@ ncx_putn_text(void **xpp, size_t nelems,
}
int
+#ifdef __arm__
+ncx_pad_putn_text(void **xpp, size_t nelems, const signed char *tp)
+#else
ncx_pad_putn_text(void **xpp, size_t nelems, const char *tp)
+#endif
{
size_t rndup = nelems % X_ALIGN;

View File

@ -1,15 +1,12 @@
Name: netcdf
Version: 4.4.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Libraries for the Unidata network Common Data Form
Group: Applications/Engineering
License: NetCDF
URL: http://www.unidata.ucar.edu/software/netcdf/
Source0: https://github.com/Unidata/netcdf-c/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
#Source0: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-%{version}.tar.gz
# Fix inconsistent char definitions
Patch0: netcdf-char.patch
BuildRequires: chrpath
BuildRequires: doxygen
@ -178,7 +175,7 @@ NetCDF parallel openmpi static libraries
%prep
%setup -q -n %{name}-c-%{version}
%patch0 -p1 -b .char
m4 libsrc/ncx.m4 > libsrc/ncx.c
# Try to handle builders that can't resolve their own name
sed -i -s 's/mpiexec/mpiexec -host localhost/' */*.sh
@ -250,12 +247,8 @@ done
%check
# char issues on arm https://github.com/Unidata/netcdf-c/issues/159
%ifarch %{arm}
fail=0
%else
# Set to 1 to fail if tests fail
fail=1
%endif
make -C build check || ( cat build/*/test-suite.log && exit $fail )
for mpi in %{mpi_list}
do
@ -339,6 +332,9 @@ done
%changelog
* Fri Jan 22 2016 Orion Poplawski <orion@cora.nwra.com> - 4.4.0-2
- Rebuild ncx.c to fix arm build
* Thu Jan 21 2016 Orion Poplawski <orion@cora.nwra.com> - 4.4.0-1
- Update to 4.4.0
- Add patch to fix incorrect char definitions