Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions academic/ncview/ncview.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

CC=$(nc-config --cc) \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
Expand Down
4 changes: 2 additions & 2 deletions libraries/netcdf/README
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Optional HDF4 support

If you need support for reading HDF4 files, please build and install
the 'hdf' package from SlackBuilds.org, and then pass the option
'HDF4=yes' to the netcdf SlackBuild, for example
'HDF4=YES' to the netcdf SlackBuild, for example

HDF4=yes ./netcdf.SlackBuild
HDF4=YES ./netcdf.SlackBuild

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
Expand Down
62 changes: 29 additions & 33 deletions libraries/netcdf/netcdf.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# SlackBuild script for netcdf.
#
# Copyright 2022-2025 Gregory J. L. Tourte <artourter@gmail.com>
# Copyright 2022-2026 Gregory J. L. Tourte <artourter@gmail.com>
# Copyright 2009 Pierre Cazenave <pwcazenave {at} gmail [dot] com>
# All rights reserved.
#
Expand All @@ -29,7 +29,7 @@ cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=netcdf
SRCNAM=netcdf-c
VERSION=${VERSION:-4.9.3}
VERSION=${VERSION:-4.10.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
Expand Down Expand Up @@ -71,7 +71,9 @@ fi
set -e

if [[ ${TESTBUILD:='NO'} == 'NO' ]]; then
TESTBUILDFLAGS='--disable-testsets'
TESTBUILDFLAGS='-DBUILD_TESTING=OFF -DBUILD_TESTSETS=OFF'
else
TESTBUILDFLAGS='-DBUILD_TESTING=ON -DBUILD_TESTSETS=ON'
fi

rm -rf $PKG
Expand All @@ -82,40 +84,36 @@ 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 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +

if [ "${HDF4:-no}" = 'yes' ]; then
hdf4opt="--enable-hdf4"
if [[ ${HDF4:-NO} == 'YES' ]]; then
hdf4opt="-DNETCDF_ENABLE_HDF4=ON"
export LDFLAGS="-ljpeg"
else
hdf4opt=""
hdf4opt="-DNETCDF_ENABLE_HDF4=OFF"
fi

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--datarootdir=/usr \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-static=no \
--disable-examples \
--disable-plugins \
${TESTBUILDFLAGS} \
${hdf4opt} \
--build=$ARCH-slackware-linux

mkdir -p build
cd build

cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
-DCMAKE_INSTALL_MANDIR=man \
-DCMAKE_BUILD_TYPE=Release \
-DNETCDF_ENABLE_EXAMPLES=OFF \
-DNETCDF_ENABLE_PLUGINS=OFF \
${hdf4opt} \
${TESTBUILDFLAGS} \
..

[[ $TESTBUILD == "YES" ]] && make test
make
[[ $TESTBUILD == "YES" ]] && make check
make install DESTDIR=$PKG

rm -rf examples/C/.{libs,deps}/
make install/strip DESTDIR=$PKG
cd ..

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
Expand All @@ -132,8 +130,6 @@ 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

Expand Down
6 changes: 3 additions & 3 deletions libraries/netcdf/netcdf.info
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PRGNAM="netcdf"
VERSION="4.9.3"
VERSION="4.10.0"
HOMEPAGE="https://www.unidata.ucar.edu/software/netcdf/"
DOWNLOAD="https://github.com/Unidata/netcdf-c/archive/v4.9.3/netcdf-c-4.9.3.tar.gz"
MD5SUM="bc9eb96e1983bf90fb3a99cc358c5ac3"
DOWNLOAD="https://github.com/Unidata/netcdf-c/archive/v4.10.0/netcdf-c-4.10.0.tar.gz"
MD5SUM="97e6f4aebff28b51fd9beee5cd272271"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="hdf5"
Expand Down