/[gentoo-x86]/sci-libs/grib_api/grib_api-1.11.0.ebuild
Gentoo

Contents of /sci-libs/grib_api/grib_api-1.11.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Apr 8 18:49:15 2015 UTC (4 years, 6 months ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +3 -3 lines
Drop old Python implementations

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/grib_api/grib_api-1.11.0.ebuild,v 1.2 2014/11/28 15:11:07 pacho Exp $
4
5 EAPI=5
6
7 AUTOTOOLS_IN_SOURCE_BUILD=1
8
9 FORTRAN_NEEDED=fortran
10 FORTRAN_STANDARD="77 90"
11 PYTHON_COMPAT=( python{2_7,3_3,3_4} )
12
13 inherit autotools-utils toolchain-funcs fortran-2 python-single-r1
14
15 PID=3473437
16
17 DESCRIPTION="Library for decoding WMO FM-92 GRIB messages"
18 HOMEPAGE="https://software.ecmwf.int/wiki/display/GRIB/Home"
19 SRC_URI="https://software.ecmwf.int/wiki/download/attachments/${PID}/${P}.tar.gz"
20
21 LICENSE="Apache-2.0"
22 SLOT="0"
23 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
24
25 IUSE="doc examples fortran jasper jpeg2k netcdf openmp png python static-libs threads perl"
26 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
27
28 RDEPEND="
29 jpeg2k? (
30 jasper? ( media-libs/jasper )
31 !jasper? ( media-libs/openjpeg:0 )
32 )
33 netcdf? ( sci-libs/netcdf )
34 png? ( media-libs/libpng )
35 python? ( dev-python/numpy[${PYTHON_USEDEP}] )"
36 DEPEND="${RDEPEND}
37 python? ( dev-lang/swig )"
38
39 pkg_setup() {
40 if use openmp; then
41 if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
42 ewarn "OpenMP is not available in your current selected gcc"
43 die "need openmp capable gcc"
44 fi
45 fi
46 fortran-2_pkg_setup
47 use python && python-single-r1_pkg_setup
48 }
49
50 src_prepare() {
51 # failing test
52 sed -i \
53 -e 's/\(${tools_dir}grib_ls -plevels tmp_rlls.grib1 | grep MISSING\)/#\1/' \
54 tests/ls.sh
55 }
56
57 src_configure() {
58 # perl module needs serious packaging work from upstream
59 local myeconfargs=(
60 --without-perl
61 $(use_enable jpeg2k jpeg)
62 $(use_enable fortran)
63 $(use_enable openmp omp-packing)
64 $(use_enable python)
65 $(use_enable python numpy)
66 $(use_enable threads pthread)
67 $(
68 use netcdf && \
69 echo --with-netcdf="${EPREFIX}"/usr || \
70 echo --with-netcdf=none
71 )
72 $(use_with png png-support)
73 )
74 autotools-utils_src_configure
75 }
76
77 src_install() {
78 autotools-utils_src_install
79 use doc && dohtml -r html/*
80 if use examples; then
81 insinto /usr/share/doc/${PF}/examples
82 emake clean
83 doins -r *
84 fi
85 use python && python_optimize
86 }

  ViewVC Help
Powered by ViewVC 1.1.20