summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Arnold <nerdboy@gentoo.org>2020-03-09 16:06:10 -0700
committerStephen Arnold <nerdboy@gentoo.org>2020-03-09 16:06:10 -0700
commitd0b0bb239cc58ab9a3d2b513f15d2d28a26d3b51 (patch)
tree78dc4283841fa2b81099118943add9f283fff97f /sci-libs
parentapp-emulation/libpod: fix network-sandbox for go-1.14 (diff)
downloadgentoo-d0b0bb239cc58ab9a3d2b513f15d2d28a26d3b51.tar.gz
gentoo-d0b0bb239cc58ab9a3d2b513f15d2d28a26d3b51.tar.bz2
gentoo-d0b0bb239cc58ab9a3d2b513f15d2d28a26d3b51.zip
sci-libs/eccodes: new ebuild/upstream replacement for libbufr
* provides multi-language bindings and GRIB/BUFR C library * obsoletes bugs #695486 and #709408 Package-Manager: Portage-2.3.67, Repoman-2.3.17 Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/eccodes/Manifest2
-rw-r--r--sci-libs/eccodes/eccodes-2.16.0.ebuild79
-rw-r--r--sci-libs/eccodes/metadata.xml24
3 files changed, 105 insertions, 0 deletions
diff --git a/sci-libs/eccodes/Manifest b/sci-libs/eccodes/Manifest
new file mode 100644
index 000000000000..d5d6bb46ae66
--- /dev/null
+++ b/sci-libs/eccodes/Manifest
@@ -0,0 +1,2 @@
+DIST eccodes-2.16.0-Source.tar.gz 11258869 BLAKE2B 4a1b3e953fc041beed47046c6ea4f74bb18230019b71c884f1dc5a102a7bae2b9083f51b74fc4078c493d188433f08db833a571e7deadd93b6c137f975f03006 SHA512 6e8768824152d8782c1457cfe79daed32114d1b4694d2843bd02a8aa63c42ccc435b53f7db6942239b3e56999fbaaba4ecef345d39fc5c5f7a5d20ceecf4422a
+DIST eccodes_test_data.tar.gz 139711871 BLAKE2B f2e89207835c78fa198f0a2fba8ac2cd4ab263c9160e02005a3ca851bc71586010e7f4742cbb9240463abb9421db83b7dadc83fe798f37321a553ca9856f68d7 SHA512 24c24ec9e01d230cf542abe5c131f05b8e627dd9d170c666628bb5fd8f7b1a6aa11a35456b8d742c59f54c6aabac78658efd68b0c50779d466aba3d35b4a0231
diff --git a/sci-libs/eccodes/eccodes-2.16.0.ebuild b/sci-libs/eccodes/eccodes-2.16.0.ebuild
new file mode 100644
index 000000000000..5f49a25c6be6
--- /dev/null
+++ b/sci-libs/eccodes/eccodes-2.16.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{3_6,3_7} )
+
+inherit cmake-utils fortran-2 python-any-r1
+
+MY_P="${P}-Source"
+
+DESCRIPTION="A set of encoding/decoding APIs and tools for WMO GRIB, BUFR, and GTS messages"
+HOMEPAGE="https://confluence.ecmwf.int/display/ECC"
+SRC_URI="https://confluence.ecmwf.int/download/attachments/45757960/${MY_P}.tar.gz
+ extra-test? ( http://download.ecmwf.org/test-data/eccodes/${PN}_test_data.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+IUSE="defs examples extra-test -fortran memfs netcdf jpeg2k png python szip test threads"
+
+REQUIRED_USE="threads? ( !fortran ) test? ( defs !memfs ) extra-test? ( test ) !test? ( memfs? ( python ) )"
+
+RDEPEND="
+ sys-libs/zlib
+ szip? ( sci-libs/szip )
+ netcdf? ( >=sci-libs/netcdf-4.2[hdf5] )
+ jpeg2k? ( >=media-libs/openjpeg-2:2 )
+ png? ( media-libs/libpng )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}"
+
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+pkg_setup() {
+ use fortran && fortran-2_pkg_setup
+ use python && python-any-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_ECCODES_THREADS=$(usex threads TRUE FALSE)
+ -DENABLE_EXAMPLES=OFF # no need to build examples
+ -DENABLE_INSTALL_ECCODES_DEFINITIONS=$(usex defs TRUE FALSE)
+ -DENABLE_FORTRAN=$(usex fortran TRUE FALSE)
+ -DENABLE_PYTHON=OFF # py2 support is deprecated
+ -DENABLE_NETCDF=$(usex netcdf TRUE FALSE)
+ -DENABLE_JPG=$(usex jpeg2k TRUE FALSE)
+ -DENABLE_PNG=$(usex png TRUE FALSE)
+ -DENABLE_MEMFS=$(usex memfs TRUE FALSE)
+ -DENABLE_EXTRA_TESTS=$(usex extra-test TRUE FALSE)
+ -DBUILD_SHARED_LIBS=ON
+ -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples; then
+ insinto "/usr/share/${PN}/examples"
+ doins -r examples/C
+ use fortran && doins -r examples/F90
+ use python && doins -r examples/python
+ fi
+}
+
+src_test() {
+ use extra-test && cp -r "${WORKDIR}"/data/* "${BUILD_DIR}"/data/
+
+ cmake-utils_src_test
+}
diff --git a/sci-libs/eccodes/metadata.xml b/sci-libs/eccodes/metadata.xml
new file mode 100644
index 000000000000..a59cfc2a5284
--- /dev/null
+++ b/sci-libs/eccodes/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>nerdboy@gentoo.org</email>
+ <name>Steve Arnold</name>
+</maintainer>
+<longdescription lang="en">
+ This is the new open source BUFR/GRIB library (from ECMWF)
+ supporting C, F90, and Python interfaces.
+</longdescription>
+<use>
+ <flag name="defs">
+ Install full set of definition files.
+ </flag>
+ <flag name="extra-test">
+ Install full set of test data (large).
+ </flag>
+ <flag name="memfs">
+ Enable memory based access to definition/sample files
+ (conflicts with tests).
+ </flag>
+</use>
+</pkgmetadata>