[arch-commits] Commit in hdf5/repos/community-x86_64 (PKGBUILD PKGBUILD)

Bruno Pagani archange at archlinux.org
Mon Sep 24 15:52:03 UTC 2018


    Date: Monday, September 24, 2018 @ 15:52:03
  Author: archange
Revision: 384633

archrelease: copy trunk to community-x86_64

Added:
  hdf5/repos/community-x86_64/PKGBUILD
    (from rev 384632, hdf5/trunk/PKGBUILD)
Deleted:
  hdf5/repos/community-x86_64/PKGBUILD

----------+
 PKGBUILD |  140 ++++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 83 insertions(+), 57 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-24 15:51:48 UTC (rev 384632)
+++ PKGBUILD	2018-09-24 15:52:03 UTC (rev 384633)
@@ -1,57 +0,0 @@
-# $Id$
-# Maintainer: Ronald van Haren <ronald.archlinux.org>
-# Maintainer: Bruno Pagani <archange at archlinux.org>
-# Contributor: Stefan Husmann <stefan-husmann at t-online.de>
-# Contributor: damir <damir at archlinux.org>
-# Contributor: Tom K <tomk at runbox.com>
-
-pkgname=hdf5
-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"
-license=('custom')
-depends=('zlib' 'libaec' 'bash')
-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=('56c5039103c51a40e493b43c504ce982')
-sha256sums=('c65cdcce4724a57fd3f8da9f0d109b497be30092acb9fac634d1291190d905a9')
-
-prepare() {
-    mkdir -p build
-}
-
-build() {
-    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 build
-    ctest . -C Release
-}
-
-package() {
-    cd build
-
-    make DESTDIR="${pkgdir}" install
-
-    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
-}

Copied: hdf5/repos/community-x86_64/PKGBUILD (from rev 384632, hdf5/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-09-24 15:52:03 UTC (rev 384633)
@@ -0,0 +1,83 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Maintainer: Bruno Pagani <archange at archlinux.org>
+# Contributor: Stefan Husmann <stefan-husmann at t-online.de>
+# Contributor: damir <damir at archlinux.org>
+# Contributor: Tom K <tomk at runbox.com>
+
+pkgname=hdf5
+pkgver=1.10.3
+pkgrel=2
+pkgdesc="General purpose library and file format for storing scientific data"
+arch=('x86_64')
+url="https://www.hdfgroup.org/hdf5"
+license=('custom')
+depends=('zlib' 'libaec' 'bash')
+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=('56c5039103c51a40e493b43c504ce982')
+sha256sums=('c65cdcce4724a57fd3f8da9f0d109b497be30092acb9fac634d1291190d905a9')
+
+build() {
+    # Crazy workaround: run CMake to generate pkg-config file
+    mkdir -p build && 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
+    # But don’t build with it, it’s quite broken
+    cd ../${pkgname}-${pkgver/_/-}
+    ./configure \
+        --prefix=/usr \
+        --docdir=/usr/share/doc/hdf5/ \
+        --enable-static \
+        --disable-sharedlib-rpath \
+        --enable-build-mode=production \
+        --enable-hl \
+        --enable-cxx \
+        --enable-fortran \
+        --with-pic \
+        --with-zlib \
+        --with-szlib
+    make
+}
+
+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
+}
+
+package() {
+    cd ${pkgname}-${pkgver/_/-}
+
+    make DESTDIR="${pkgdir}" install
+
+    # Remove leftover test files
+    rm "${pkgdir}"/usr/include/tst{ds,image,lite,table}{,_tests}.mod
+
+    # Move examples to a proper place
+    install -dm755 "${pkgdir}"/usr/share/doc/${pkgname}
+    mv "${pkgdir}"/usr/share/{hdf5_examples,doc/${pkgname}/examples}
+
+    install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}
+
+    # Install pkg-config files from CMake tree
+    install -Dm644 ../build/CMakeFiles/hdf5{,_hl}{,_cpp}-${pkgver}.pc -t "${pkgdir}"/usr/lib/pkgconfig/
+}



More information about the arch-commits mailing list