diff options
Diffstat (limited to 'libraries/netcdf')
-rw-r--r-- | libraries/netcdf/README | 15 | ||||
-rw-r--r-- | libraries/netcdf/netcdf.SlackBuild | 59 | ||||
-rw-r--r-- | libraries/netcdf/netcdf.info | 10 |
3 files changed, 45 insertions, 39 deletions
diff --git a/libraries/netcdf/README b/libraries/netcdf/README index 61374e1929..cfc36a7164 100644 --- a/libraries/netcdf/README +++ b/libraries/netcdf/README @@ -14,15 +14,6 @@ the 'hdf' package from SlackBuilds.org, and then pass the option HDF4=yes ./netcdf.SlackBuild -Optional CDF5 support ---------------------- - -CDF5 support is not yet enabled by default. According to the release -notes [1], reading and writing CDF5 files on 32-bit platforms may -result in unexpected behavior when using extremely large variables. If -you need CDF5 support, please pass the option 'CDF5=yes' to the netcdf -SlackBuild, for example - - CDF5=yes ./netcdf.SlackBuild - -[1] https://www.unidata.ucar.edu/software/netcdf/docs/RELEASE_NOTES.html +By default, the script does not build nor run the tests. You can use the +option TESTBUILD=YES to build and run the tests before the make install +part. diff --git a/libraries/netcdf/netcdf.SlackBuild b/libraries/netcdf/netcdf.SlackBuild index 3c1449d46d..59ab056cf2 100644 --- a/libraries/netcdf/netcdf.SlackBuild +++ b/libraries/netcdf/netcdf.SlackBuild @@ -1,7 +1,8 @@ -#!/bin/sh +#!/bin/bash # SlackBuild script for netcdf. # +# Copyright 2022 Gregory J. L. Tourte <artourter@gmail.com> # Copyright 2009 Pierre Cazenave <pwcazenave {at} gmail [dot] com> # All rights reserved. # @@ -22,29 +23,39 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# Maintained by David Spencer <baildon.research@googlemail.com> +# Maintained until 2018 by David Spencer <baildon.research@googlemail.com> + +cd $(dirname $0) ; CWD=$(pwd) PRGNAM=netcdf SRCNAM=netcdf-c -VERSION=${VERSION:-4.6.2} -BUILD=${BUILD:-2} +VERSION=${VERSION:-4.9.2} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -59,6 +70,10 @@ fi set -e +if [[ ${TESTBUILD:='NO'} == 'NO' ]]; then + TESTBUILDFLAGS='--disable-testsets' +fi + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -67,9 +82,9 @@ tar xvf $CWD/$SRCNAM-$VERSION.tar.gz cd $SRCNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; if [ "${HDF4:-no}" = 'yes' ]; then @@ -79,12 +94,6 @@ else hdf4opt="" fi -if [ "${CDF5:-no}" = 'yes' ]; then - cdf5opt="--enable-cdf5" -else - cdf5opt="" -fi - CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -96,15 +105,18 @@ CXXFLAGS="$SLKCFLAGS" \ --datarootdir=/usr \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --enable-static=no \ - --enable-netcdf-4 \ - --enable-dap-netcdf \ + --disable-examples \ + --disable-plugins \ + ${TESTBUILDFLAGS} \ ${hdf4opt} \ - ${cdf5opt} \ --build=$ARCH-slackware-linux make +[[ $TESTBUILD == "YES" ]] && make check make install DESTDIR=$PKG +rm -rf examples/C/.{libs,deps}/ + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -112,15 +124,18 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COMPILE.cmake.txt COPYRIGHT INSTALL.md README.md RELEASE_NOTES.md VERSION \ - examples/ $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYRIGHT README.md RELEASE_NOTES.md \ + examples/ $PKG/usr/doc/$PRGNAM-$VERSION + cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; +rm -f $PKG/usr/lib*/*.la + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/libraries/netcdf/netcdf.info b/libraries/netcdf/netcdf.info index edcedb5fae..a739070b06 100644 --- a/libraries/netcdf/netcdf.info +++ b/libraries/netcdf/netcdf.info @@ -1,10 +1,10 @@ PRGNAM="netcdf" -VERSION="4.6.2" +VERSION="4.9.2" HOMEPAGE="https://www.unidata.ucar.edu/software/netcdf/" -DOWNLOAD="https://github.com/Unidata/netcdf-c/archive/v4.6.2/netcdf-c-4.6.2.tar.gz" -MD5SUM="7d3a25ec23e1fd7c1c7cdca7aa4a498c" +DOWNLOAD="https://github.com/Unidata/netcdf-c/archive/v4.9.2/netcdf-c-4.9.2.tar.gz" +MD5SUM="84acd096ab4f3300c20db862eecdf7c7" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="hdf5" -MAINTAINER="David Spencer" -EMAIL="baildon.research@googlemail.com" +MAINTAINER="ArTourter" +EMAIL="artourter@gmail.com" |