[arch-commits] Commit in netcdf/trunk (PKGBUILD fix-tst_h_dimscales.patch)

Bruno Pagani archange at archlinux.org
Fri Oct 27 22:50:49 UTC 2017


    Date: Friday, October 27, 2017 @ 22:50:47
  Author: archange
Revision: 264620

upgpkg: netcdf 4.5.0-1

Also add upstream patch (merged into master) to fix the failing test.

Added:
  netcdf/trunk/fix-tst_h_dimscales.patch
Modified:
  netcdf/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   23 +++++++++++---------
 fix-tst_h_dimscales.patch |   49 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-10-27 22:08:26 UTC (rev 264619)
+++ PKGBUILD	2017-10-27 22:50:47 UTC (rev 264620)
@@ -4,7 +4,7 @@
 # Contributor: damir <damir at archlinux.org>
 
 pkgname=netcdf
-pkgver=4.4.1.1
+pkgver=4.5.0
 pkgrel=1
 pkgdesc="network Common Data Form interface for array-oriented data access and corresponding library"
 arch=('i686' 'x86_64')
@@ -13,24 +13,28 @@
 optdepends=('netcdf-fortran: fortran bindings' 'netcdf-cxx: c++ bindings')
 options=('!makeflags')
 license=('custom')
-source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/Unidata/netcdf-c/archive/v${pkgver}.tar.gz")
-sha256sums=('7f040a0542ed3f6d27f3002b074e509614e18d6c515b2005d1537fec01b24909')
+source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/Unidata/netcdf-c/archive/v${pkgver}.tar.gz"
+        'fix-tst_h_dimscales.patch')
+sha256sums=('f7d1cb2a82100b9bf9a1130a50bc5c7baf0de5b5022860ac3e09a0a32f83cf4a'
+            'b2b18ddd4dc0c0e08e59454a6e141e4ba6547ffd5df50d5fe758df45ec77aa6c')
 
+prepare() {
+    cd ${pkgname}-c-${pkgver}
+    patch -p1 -i ../fix-tst_h_dimscales.patch
+}
+
 build() {
     cd ${pkgname}-c-${pkgver}
-    #export CFLAGS="-march=x86-64 -mtune=generic -O0 -pipe -fstack-protector-strong"
     ./configure \
         --prefix=/usr \
-        --enable-shared
+        --enable-shared \
+        --disable-parallel4
     make
 }
 
 check() {
     cd ${pkgname}-c-${pkgver}
-    # As of netcdf-c-4.4.1, all the tests pass except for one; a workaround is
-    # to update CFLAGS so no optimization level is used (i.e., remove "-O2").
-    # See https://github.com/Unidata/netcdf-c/issues/244
-    make check || warning "Tests failed"
+    make check
 }
 
 package() {
@@ -39,4 +43,3 @@
 
     install -Dm644 COPYRIGHT -t "${pkgdir}"/usr/share/licenses/${pkgname}/
 }
-

Added: fix-tst_h_dimscales.patch
===================================================================
--- fix-tst_h_dimscales.patch	                        (rev 0)
+++ fix-tst_h_dimscales.patch	2017-10-27 22:50:47 UTC (rev 264620)
@@ -0,0 +1,49 @@
+From 6a71bf81b1b663387c0f0ca9e41ab24601c678c5 Mon Sep 17 00:00:00 2001
+From: Ed Hartnett <edwardjameshartnett at gmail.com>
+Date: Mon, 23 Oct 2017 09:49:38 -0600
+Subject: [PATCH] fixed memory problem in tst_h_dimscales
+
+---
+ h5_test/tst_h_dimscales.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/h5_test/tst_h_dimscales.c b/h5_test/tst_h_dimscales.c
+index 73c817d58..349b1a836 100644
+--- a/h5_test/tst_h_dimscales.c
++++ b/h5_test/tst_h_dimscales.c
+@@ -85,7 +85,7 @@ rec_scan_group(hid_t grpid)
+ 	    }
+ 	    else
+ 	    {
+-	       int visitor_data = 0;
++		hid_t visitor_data = 0;
+ 
+ 	       /* Here's how to get the number of scales attached
+ 		* to the dataset's dimension 0. */
+@@ -379,7 +379,7 @@ main()
+       if ((grpid = H5Gopen(fileid, GRP_NAME)) < 0) ERR;
+ 
+       /* Loop through datasets to find variables. */
+-      if (H5Gget_num_objs(grpid, &num_obj) < 0) ERR;
++      if (H5Gget_num_objs(grpid, (hsize_t *)&num_obj) < 0) ERR;
+       for (i=0; i<num_obj; i++)
+       {
+ 	 /* Get the type (i.e. group, dataset, etc.), and the name of
+@@ -426,7 +426,7 @@ main()
+ 	       else
+ 	       {
+ 		  char label[STR_LEN+1];
+-		  int visitor_data = 0;
++		  hid_t visitor_data = 0;
+ 
+ 		  /* Here's how to get the number of scales attached
+ 		   * to the dataset's dimension 0. */
+@@ -617,7 +617,7 @@ main()
+ 	       else
+ 	       {
+ 		  char label[STR_LEN+1];
+-		  int visitor_data = 0;
++		  hid_t visitor_data = 0;
+ 
+ 		  /* SHould have these dimensions... */
+ 		  if (dims[TIME_DIM] != 0 || dims[LAT_DIM] != LAT_LEN ||



More information about the arch-commits mailing list