[arch-commits] Commit in netcdf-fortran/trunk (PKGBUILD)

Bruno Pagani archange at archlinux.org
Mon Jul 27 21:33:14 UTC 2020


    Date: Monday, July 27, 2020 @ 21:33:14
  Author: archange
Revision: 665538

upgpkg: netcdf-fortran 4.5.3-1

+ switch to CMake

Modified:
  netcdf-fortran/trunk/PKGBUILD

----------+
 PKGBUILD |   35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-27 20:29:51 UTC (rev 665537)
+++ PKGBUILD	2020-07-27 21:33:14 UTC (rev 665538)
@@ -3,37 +3,38 @@
 # Contributor: damir <damir at archlinux.org>
 
 pkgname=netcdf-fortran
-pkgver=4.5.2
-pkgrel=2
+pkgver=4.5.3
+pkgrel=1
 pkgdesc="NetCDF fortran bindings"
 arch=(x86_64)
 url="https://github.com/Unidata/netcdf-fortran"
 license=(custom)
 depends=(gcc-libs netcdf curl)
-makedepends=(gcc-fortran doxygen)
+makedepends=(cmake gcc-fortran doxygen)
 checkdepends=(valgrind)
 options=(!makeflags staticlibs)
 source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
-sha256sums=('0b05c629c70d6d224a3be28699c066bfdfeae477aea211fbf034d973a8309b49')
+sha256sums=('c6da30c2fe7e4e614c1dff4124e857afbd45355c6798353eccfa60c0702b495a')
 
 build() {
-    cd ${pkgname}-${pkgver}
-    ./configure \
-        --prefix=/usr \
-        --enable-extra-tests \
-        --enable-extra-example-tests \
-        --enable-large-file-tests \
-        --enable-valgrind-tests
-    make
+    # Failure with GCC 10+
+    export FCFLAGS="-fallow-argument-mismatch"
+    export FFLAGS="-fallow-argument-mismatch"
+    cmake -B build -S ${pkgname}-${pkgver} \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DCMAKE_BUILD_TYPE=Release \
+        -DENABLE_FILTER_TEST=ON \
+        -DLARGE_FILE_TESTS=ON \
+        -DTEST_WITH_VALGRIND=ON
+    make -C build
 }
 
 check() {
-    cd ${pkgname}-${pkgver}
-    make check
+    make -C build test
 }
 
 package() {
-    cd ${pkgname}-${pkgver}
-    make DESTDIR="${pkgdir}" install
-    install -Dm644 COPYRIGHT -t "${pkgdir}"/usr/share/licenses/${pkgname}/
+    make -C build DESTDIR="${pkgdir}" install
+    install -Dm644 ${pkgname}-${pkgver}/COPYRIGHT -t "${pkgdir}"/usr/share/licenses/${pkgname}/
+    rmdir "${pkgdir}"/usr/include/CMakeFiles/{netcdff.dir,}
 }


More information about the arch-commits mailing list