1 |
commit: d0b0bb239cc58ab9a3d2b513f15d2d28a26d3b51 |
2 |
Author: Stephen Arnold <nerdboy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 9 23:06:10 2020 +0000 |
4 |
Commit: Steve Arnold <nerdboy <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 9 23:06:10 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0b0bb23 |
7 |
|
8 |
sci-libs/eccodes: new ebuild/upstream replacement for libbufr |
9 |
|
10 |
* provides multi-language bindings and GRIB/BUFR C library |
11 |
* obsoletes bugs #695486 and #709408 |
12 |
|
13 |
Package-Manager: Portage-2.3.67, Repoman-2.3.17 |
14 |
Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org> |
15 |
|
16 |
sci-libs/eccodes/Manifest | 2 + |
17 |
sci-libs/eccodes/eccodes-2.16.0.ebuild | 79 ++++++++++++++++++++++++++++++++++ |
18 |
sci-libs/eccodes/metadata.xml | 24 +++++++++++ |
19 |
3 files changed, 105 insertions(+) |
20 |
|
21 |
diff --git a/sci-libs/eccodes/Manifest b/sci-libs/eccodes/Manifest |
22 |
new file mode 100644 |
23 |
index 00000000000..d5d6bb46ae6 |
24 |
--- /dev/null |
25 |
+++ b/sci-libs/eccodes/Manifest |
26 |
@@ -0,0 +1,2 @@ |
27 |
+DIST eccodes-2.16.0-Source.tar.gz 11258869 BLAKE2B 4a1b3e953fc041beed47046c6ea4f74bb18230019b71c884f1dc5a102a7bae2b9083f51b74fc4078c493d188433f08db833a571e7deadd93b6c137f975f03006 SHA512 6e8768824152d8782c1457cfe79daed32114d1b4694d2843bd02a8aa63c42ccc435b53f7db6942239b3e56999fbaaba4ecef345d39fc5c5f7a5d20ceecf4422a |
28 |
+DIST eccodes_test_data.tar.gz 139711871 BLAKE2B f2e89207835c78fa198f0a2fba8ac2cd4ab263c9160e02005a3ca851bc71586010e7f4742cbb9240463abb9421db83b7dadc83fe798f37321a553ca9856f68d7 SHA512 24c24ec9e01d230cf542abe5c131f05b8e627dd9d170c666628bb5fd8f7b1a6aa11a35456b8d742c59f54c6aabac78658efd68b0c50779d466aba3d35b4a0231 |
29 |
|
30 |
diff --git a/sci-libs/eccodes/eccodes-2.16.0.ebuild b/sci-libs/eccodes/eccodes-2.16.0.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..5f49a25c6be |
33 |
--- /dev/null |
34 |
+++ b/sci-libs/eccodes/eccodes-2.16.0.ebuild |
35 |
@@ -0,0 +1,79 @@ |
36 |
+# Copyright 1999-2020 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=6 |
40 |
+ |
41 |
+PYTHON_COMPAT=( python{3_6,3_7} ) |
42 |
+ |
43 |
+inherit cmake-utils fortran-2 python-any-r1 |
44 |
+ |
45 |
+MY_P="${P}-Source" |
46 |
+ |
47 |
+DESCRIPTION="A set of encoding/decoding APIs and tools for WMO GRIB, BUFR, and GTS messages" |
48 |
+HOMEPAGE="https://confluence.ecmwf.int/display/ECC" |
49 |
+SRC_URI="https://confluence.ecmwf.int/download/attachments/45757960/${MY_P}.tar.gz |
50 |
+ extra-test? ( http://download.ecmwf.org/test-data/eccodes/${PN}_test_data.tar.gz )" |
51 |
+ |
52 |
+LICENSE="Apache-2.0" |
53 |
+SLOT="0" |
54 |
+KEYWORDS="~amd64 ~arm ~x86" |
55 |
+ |
56 |
+IUSE="defs examples extra-test -fortran memfs netcdf jpeg2k png python szip test threads" |
57 |
+ |
58 |
+REQUIRED_USE="threads? ( !fortran ) test? ( defs !memfs ) extra-test? ( test ) !test? ( memfs? ( python ) )" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ sys-libs/zlib |
62 |
+ szip? ( sci-libs/szip ) |
63 |
+ netcdf? ( >=sci-libs/netcdf-4.2[hdf5] ) |
64 |
+ jpeg2k? ( >=media-libs/openjpeg-2:2 ) |
65 |
+ png? ( media-libs/libpng )" |
66 |
+ |
67 |
+DEPEND="${RDEPEND} |
68 |
+ ${PYTHON_DEPS}" |
69 |
+ |
70 |
+BDEPEND="virtual/pkgconfig" |
71 |
+ |
72 |
+S="${WORKDIR}/${MY_P}" |
73 |
+ |
74 |
+CMAKE_BUILD_TYPE=RelWithDebInfo |
75 |
+ |
76 |
+pkg_setup() { |
77 |
+ use fortran && fortran-2_pkg_setup |
78 |
+ use python && python-any-r1_pkg_setup |
79 |
+} |
80 |
+ |
81 |
+src_configure() { |
82 |
+ local mycmakeargs=( |
83 |
+ -DENABLE_ECCODES_THREADS=$(usex threads TRUE FALSE) |
84 |
+ -DENABLE_EXAMPLES=OFF # no need to build examples |
85 |
+ -DENABLE_INSTALL_ECCODES_DEFINITIONS=$(usex defs TRUE FALSE) |
86 |
+ -DENABLE_FORTRAN=$(usex fortran TRUE FALSE) |
87 |
+ -DENABLE_PYTHON=OFF # py2 support is deprecated |
88 |
+ -DENABLE_NETCDF=$(usex netcdf TRUE FALSE) |
89 |
+ -DENABLE_JPG=$(usex jpeg2k TRUE FALSE) |
90 |
+ -DENABLE_PNG=$(usex png TRUE FALSE) |
91 |
+ -DENABLE_MEMFS=$(usex memfs TRUE FALSE) |
92 |
+ -DENABLE_EXTRA_TESTS=$(usex extra-test TRUE FALSE) |
93 |
+ -DBUILD_SHARED_LIBS=ON |
94 |
+ -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)" |
95 |
+ ) |
96 |
+ cmake-utils_src_configure |
97 |
+} |
98 |
+ |
99 |
+src_install() { |
100 |
+ cmake-utils_src_install |
101 |
+ |
102 |
+ if use examples; then |
103 |
+ insinto "/usr/share/${PN}/examples" |
104 |
+ doins -r examples/C |
105 |
+ use fortran && doins -r examples/F90 |
106 |
+ use python && doins -r examples/python |
107 |
+ fi |
108 |
+} |
109 |
+ |
110 |
+src_test() { |
111 |
+ use extra-test && cp -r "${WORKDIR}"/data/* "${BUILD_DIR}"/data/ |
112 |
+ |
113 |
+ cmake-utils_src_test |
114 |
+} |
115 |
|
116 |
diff --git a/sci-libs/eccodes/metadata.xml b/sci-libs/eccodes/metadata.xml |
117 |
new file mode 100644 |
118 |
index 00000000000..a59cfc2a528 |
119 |
--- /dev/null |
120 |
+++ b/sci-libs/eccodes/metadata.xml |
121 |
@@ -0,0 +1,24 @@ |
122 |
+<?xml version="1.0" encoding="UTF-8"?> |
123 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
124 |
+<pkgmetadata> |
125 |
+<maintainer type="person"> |
126 |
+ <email>nerdboy@g.o</email> |
127 |
+ <name>Steve Arnold</name> |
128 |
+</maintainer> |
129 |
+<longdescription lang="en"> |
130 |
+ This is the new open source BUFR/GRIB library (from ECMWF) |
131 |
+ supporting C, F90, and Python interfaces. |
132 |
+</longdescription> |
133 |
+<use> |
134 |
+ <flag name="defs"> |
135 |
+ Install full set of definition files. |
136 |
+ </flag> |
137 |
+ <flag name="extra-test"> |
138 |
+ Install full set of test data (large). |
139 |
+ </flag> |
140 |
+ <flag name="memfs"> |
141 |
+ Enable memory based access to definition/sample files |
142 |
+ (conflicts with tests). |
143 |
+ </flag> |
144 |
+</use> |
145 |
+</pkgmetadata> |