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

Bruno Pagani archange at archlinux.org
Thu Aug 23 17:34:18 UTC 2018


    Date: Thursday, August 23, 2018 @ 17:34:17
  Author: archange
Revision: 373459

upgpkg: hdf5 1.10.3-1

Modified:
  hdf5/trunk/PKGBUILD

----------+
 PKGBUILD |   64 ++++++++++++++++++++++++-------------------------------------
 1 file changed, 26 insertions(+), 38 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-23 17:18:17 UTC (rev 373458)
+++ PKGBUILD	2018-08-23 17:34:17 UTC (rev 373459)
@@ -6,64 +6,52 @@
 # Contributor: Tom K <tomk at runbox.com>
 
 pkgname=hdf5
-pkgver=1.10.2
-pkgrel=3
+pkgver=1.10.3
+pkgrel=1
 pkgdesc="General purpose library and file format for storing scientific data"
 arch=('x86_64')
-url="https://www.hdfgroup.org/hdf5/"
+url="https://www.hdfgroup.org/hdf5"
 license=('custom')
 depends=('zlib' 'libaec' 'bash')
-makedepends=('time' 'gcc-fortran')
+makedepends=('cmake' 'time' 'gcc-fortran')
 replaces=('hdf5-cpp-fortran')
 provides=('hdf5-cpp-fortran')
+options=('staticlibs')
 source=("https://support.hdfgroup.org/ftp/HDF5/releases/${pkgname}-${pkgver:0:4}/${pkgname}-${pkgver/_/-}/src/${pkgname}-${pkgver/_/-}.tar.bz2")
 # https://support.hdfgroup.org/ftp/HDF5/releases/${pkgname}-${pkgver:0:4}/${pkgname}-${pkgver/_/-}/src/${pkgname}-${pkgver/_/-}.md5
-md5sums=('41fb9347801b546fba323523a1c1af51')
-sha256sums=('1cad5b7bfdf128dfc53cd16fba48f6e7ae4e93c75c371d9ec8dfc4df0c1fcb71')
+md5sums=('56c5039103c51a40e493b43c504ce982')
+sha256sums=('c65cdcce4724a57fd3f8da9f0d109b497be30092acb9fac634d1291190d905a9')
 
 prepare() {
-    cd ${pkgname}-${pkgver/_/-}
-    # Fix building with GCC 8.1
-    sed 's/\(.*\)(void) HDF_NO_UBSAN/HDF_NO_UBSAN \1(void)/' -i src/H5detect.c
+    mkdir -p build
 }
 
 build() {
-    cd ${pkgname}-${pkgver/_/-}
-    ./configure \
-        --prefix=/usr \
-        --docdir=/usr/share/doc/hdf5/ \
-        --disable-static \
-        --disable-sharedlib-rpath \
-        --enable-build-mode=production \
-        --enable-hl \
-        --enable-cxx \
-        --enable-fortran \
-        --with-pic \
-        --with-zlib \
-        --with-szlib
-    make
+    cd build
+    cmake ../${pkgname}-${pkgver/_/-} \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DBUILD_SHARED_LIBS=ON \
+        -DCMAKE_BUILD_TYPE=Release \
+        -DHDF5_BUILD_HL_LIB=ON \
+        -DHDF5_BUILD_CPP_LIB=ON \
+        -DHDF5_BUILD_FORTRAN=ON \
+        -DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
+        -DHDF5_ENABLE_SZIP_SUPPORT=ON \
+        -DHDF5_ENABLE_SZIP_ENCODING=ON
+    cmake --build . --config Release
 }
 
 check() {
-    cd ${pkgname}-${pkgver/_/-}
-    # Without this, checks are failing with messages like “error while loading shared libraries: libhdf5.so.101: cannot open shared object file: No such file or directory”
-    export LD_LIBRARY_PATH="${srcdir}"/${pkgname}-${pkgver/_/-}/src/.libs/
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/c++/src/.libs/
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/fortran/src/.libs/
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/hl/src/.libs/
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/hl/c++/src/.libs/
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/hl/fortran/src/.libs/
-    make check
+    cd build
+    ctest . -C Release
 }
 
 package() {
-    cd ${pkgname}-${pkgver/_/-}
+    cd build
 
     make DESTDIR="${pkgdir}" install
 
-    install -dm755 "${pkgdir}"/usr/share/doc/${pkgname}
-    mv "${pkgdir}"/usr/share/{hdf5_examples,doc/${pkgname}/examples}
-
-    install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+    install -d "${pkgdir}"/usr/share/licenses/${pkgname}
+    mv "${pkgdir}"/usr/share/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/
+    rm "${pkgdir}"/usr/share/{RELEASE,USING_HDF5_CMake}.txt
 }
-



More information about the arch-commits mailing list