summaryrefslogtreecommitdiff
path: root/sci-libs/netcdf
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/netcdf')
-rw-r--r--sci-libs/netcdf/Manifest5
-rw-r--r--sci-libs/netcdf/files/netcdf-4.8.1-big-endian-build.patch24
-rw-r--r--sci-libs/netcdf/netcdf-4.7.4.ebuild7
-rw-r--r--sci-libs/netcdf/netcdf-4.8.1.ebuild74
4 files changed, 108 insertions, 2 deletions
diff --git a/sci-libs/netcdf/Manifest b/sci-libs/netcdf/Manifest
index 3f2a215112a6..9b71ba57406e 100644
--- a/sci-libs/netcdf/Manifest
+++ b/sci-libs/netcdf/Manifest
@@ -1,5 +1,8 @@
AUX netcdf-4.7.4-big-endian-build.patch 1892 BLAKE2B 9209f042f86e4eb7d3c1359ff8c1c033eab2762aa6bf5b7a8f8e513ac52eddb2039c1728d77a2e038985a8612a04ba5654d27c872f92bcd54dde4237dc427288 SHA512 5d6cf04597897faed7ecdd4c8c182f3d22082569cbb726b25d8e922c853dbe4e7e8105c9470faaed50e254072f9411ebfc9aabc480858a0bd7fd8d77a9a2e87c
AUX netcdf-4.7.4-big-endian-test.patch 689 BLAKE2B ab28269ee5922816e7ef7834dddec974c98951a41c0025041f9ee67d92c7bfe57887f5ac8d8beb2426e2c095fc06cf4b29046a9b29873b125d681b169c9613b6 SHA512 72575f890615a05a6f1beeebfd3edcd367fe148be017a32847b0a7db96c594e6bb5d01acd865257b25410e0a22699b1beef2c54748ccb09ea5e41009f4e0f9ee
+AUX netcdf-4.8.1-big-endian-build.patch 690 BLAKE2B ee79d940d47b69c7628d325b8a4b002942d7198d0a98b7d64a843056f2b0ac8888c9bd6cf37f74f5788a1b075a309c60a9e80a1e072dd1ff45cf3213ad7ffe4d SHA512 e2dcf92063806e56ec02df8a3b2dea97b67ee58768703db2672188d9837188f7bab68a04da2df78b6130c6d87137f8b9974b91d09eab8cd90dba77aadac6ea5e
DIST netcdf-4.7.4.tar.gz 19711158 BLAKE2B b49532e6f87b458e7f5654f70ec932d6c8c81272c97ce44df3d27bb61b01d3e005f918b959ce12e42e26f7c12309ab72eeb57a35216d20ab5761837db65741a4 SHA512 15922818fdd71be285eb7dd2fc9be2594fe9af979de3ed316465636c7bbdaec65eb151ca57ef8b703e6a360cdba036b8f9bc193ddff01ff7ce4214c0a66efa79
-EBUILD netcdf-4.7.4.ebuild 1546 BLAKE2B 633f6501e4ad9d9cd64d573a02498e09f5b14b1a267581a8d9cefbdc66a888a4fc1df5891bfec098693fd969ae2de78fd9a5bf72c3d236a576960c9fa0688b29 SHA512 3714f027a2cc8d7e7ef542d7ad966982a300fdb41afdd8dae72650e7908abcbff9af67c316453c288063b9b1e2cbb9faf028bba2b7fc38d62db9e33e84aff065
+DIST netcdf-4.8.1.tar.gz 18957280 BLAKE2B 05fc6cd10cb5cbb11dc077b9a884fbc63c4cb840b241e782702da58ad9831fba065a6f1e97c2be092437735d39658482285850a00618d0582d6e4728d64c4402 SHA512 c97207867abf10d414abf34624268710f5b812c26c38f97e73afe00558b3f07917331fbc7fdb9e70b09813acf15a9a09bae2c432a3266ce10a791b9472f87a42
+EBUILD netcdf-4.7.4.ebuild 1703 BLAKE2B 33294c879140f07bce3943cf77ec41b36045dd9df219d0cf1f3784a683b6392a6c3adb5561c6b2f18048379580fd28c6782bea986a5b5f422c5ec103a7c64b13 SHA512 7d6ea028a446b4f0d8a5cfd8b22c15f582722ae3f6f839c28a42e3a45ed9ed7952ff8c3bd5b43471c02ba237d06707d8cba8399e489eb1cb1849a9fa7f3f39d8
+EBUILD netcdf-4.8.1.ebuild 1743 BLAKE2B 4a07739ecf990238a0061bac64d2a558bae47de233195ed60da1972dc6eaf80d6059ce907f12605b89b84515e6be1d3b766e67b4fff379878b2f378c2491229d SHA512 dc066b599f6953c0f27e90413201e00b271e7f7e211daa6a0ed91ec66c337e815858c469ac47fed77d9e80d71babd8c1f50f2beb377ea75c61f7b0b2702fb83b
MISC metadata.xml 1065 BLAKE2B 7e661019c6f97a0720a45cc93a59079834135a1994ab9abd90b769dec892c4b0ad60f09b87b6e15ceda6ee99f289a992ca8315a1d168a3eec6d50d09b6de1273 SHA512 fe82704383f8021a861936927fc9a1450257433d6589f1b4bfef3fd0527b912543813ff8d66c6fe33d98cb7a16bcbcb26149df8d809f92fa2e48c6fb83c8455b
diff --git a/sci-libs/netcdf/files/netcdf-4.8.1-big-endian-build.patch b/sci-libs/netcdf/files/netcdf-4.8.1-big-endian-build.patch
new file mode 100644
index 000000000000..afeff7e3fbd0
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.8.1-big-endian-build.patch
@@ -0,0 +1,24 @@
+Later version for 4.8.1 grabbed from Debian:
+https://sources.debian.org/patches/netcdf/1:4.8.1-1/byteswap.patch/
+
+Earlier version used:
+https://github.com/DennisHeimbigner/netcdf-c/commit/6f86660da86f279cad1f2804cf3242767de27630.patch
+https://github.com/Unidata/netcdf-c/issues/1687
+https://bugs.gentoo.org/772863
+
+Description: Add forward declarations for byteswap8 & byteswap4.
+Author: Dennis Heimbigner
+Bug: https://github.com/Unidata/netcdf-c/issues/1687
+
+--- a/libdispatch/dfilter.c
++++ b/libdispatch/dfilter.c
+@@ -20,6 +20,9 @@
+ #include "hdf5internal.h"
+ #endif
+
++static void byteswap8(unsigned char*);
++static void byteswap4(unsigned char*);
++
+ /*
+ Unified filter related code
+ */
diff --git a/sci-libs/netcdf/netcdf-4.7.4.ebuild b/sci-libs/netcdf/netcdf-4.7.4.ebuild
index a537ce445a22..793ea43ad586 100644
--- a/sci-libs/netcdf/netcdf-4.7.4.ebuild
+++ b/sci-libs/netcdf/netcdf-4.7.4.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit cmake
+inherit cmake flag-o-matic
DESCRIPTION="Scientific library and interface for array oriented data access"
HOMEPAGE="https://www.unidata.ucar.edu/software/netcdf/"
@@ -49,6 +49,11 @@ src_prepare() {
src_configure() {
use mpi && export CC=mpicc
+ # Temporary workaround for test breakage
+ # https://github.com/Unidata/netcdf-c/issues/1983
+ # bug #827042
+ append-flags -fno-strict-aliasing
+
local mycmakeargs=(
-DENABLE_DAP_REMOTE_TESTS=OFF
-DBUILD_UTILITIES=$(usex tools)
diff --git a/sci-libs/netcdf/netcdf-4.8.1.ebuild b/sci-libs/netcdf/netcdf-4.8.1.ebuild
new file mode 100644
index 000000000000..9d62cbfcef3d
--- /dev/null
+++ b/sci-libs/netcdf/netcdf-4.8.1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="Scientific library and interface for array oriented data access"
+HOMEPAGE="https://www.unidata.ucar.edu/software/netcdf/"
+SRC_URI="https://github.com/Unidata/netcdf-c/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-c-${PV}"
+
+LICENSE="UCAR-Unidata"
+SLOT="0/18"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 -riscv ~x86 ~amd64-linux ~x86-linux"
+IUSE="+dap doc examples hdf +hdf5 mpi szip test tools"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/libxml2
+ dap? ( net-misc/curl:0= )
+ hdf? (
+ sci-libs/hdf:0=
+ sci-libs/hdf5:0=
+ virtual/jpeg
+ )
+ hdf5? ( sci-libs/hdf5:0=[hl(+),mpi=,szip=,zlib] )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ doc? ( app-doc/doxygen[dot] )"
+
+REQUIRED_USE="
+ test? ( tools )
+ szip? ( hdf5 )
+ mpi? ( hdf5 )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.1-big-endian-build.patch"
+ "${FILESDIR}/${PN}-4.7.4-big-endian-test.patch"
+)
+
+src_prepare() {
+ # skip test that requires network
+ sed -i -e '/run_get_hdf4_files/d' hdf4_test/CMakeLists.txt || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ use mpi && export CC=mpicc
+
+ # Temporary workaround for test breakage
+ # https://github.com/Unidata/netcdf-c/issues/1983
+ # bug #827042
+ append-flags -fno-strict-aliasing
+
+ local mycmakeargs=(
+ -DENABLE_DAP_REMOTE_TESTS=OFF
+ -DENABLE_LIBXML2=ON
+ -DBUILD_UTILITIES=$(usex tools)
+ -DENABLE_DAP=$(usex dap)
+ -DENABLE_DOXYGEN=$(usex doc)
+ -DENABLE_EXAMPLES=$(usex examples)
+ -DENABLE_HDF4=$(usex hdf)
+ -DENABLE_NETCDF_4=$(usex hdf5)
+ -DENABLE_TESTS=$(usex test)
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ # fails parallel tests: bug #621486
+ cmake_src_test -j1
+}