/[gentoo-x86]/eclass/fortran-2.eclass
Gentoo

Diff of /eclass/fortran-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.18 Revision 1.19
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.18 2013/07/18 07:03:33 jlec Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.19 2013/07/29 09:53:36 jlec Exp $
4 4
5# @ECLASS: fortran-2.eclass 5# @ECLASS: fortran-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# jlec@gentoo.org 7# jlec@gentoo.org
8# sci@gentoo.org 8# sci@gentoo.org
166 166
167# @FUNCTION: _fortran_test_function 167# @FUNCTION: _fortran_test_function
168# @INTERNAL 168# @INTERNAL
169# @DESCRIPTION: 169# @DESCRIPTION:
170# Internal testfunction for working fortran compiler. 170# Internal testfunction for working fortran compiler.
171# It is called in fortran-2_pkg_setup 171# It is called in fortran-2_pkg_setup.
172_fortran_test_function() { 172_fortran_test_function() {
173 local dialect 173 local dialect
174 174
175 : ${F77:=$(tc-getFC)} 175 : ${F77:=$(tc-getFC)}
176 176
201 "set the FC variable to a compiler that supports OpenMP" 201 "set the FC variable to a compiler that supports OpenMP"
202 fi 202 fi
203 fi 203 fi
204} 204}
205 205
206# @FUNCTION: fortran-2_pkg_setup 206# @FUNCTION: _fortran-2_pkg_setup
207# @INTERNAL
207# @DESCRIPTION: 208# @DESCRIPTION:
208# Setup functionallity, 209# _The_ fortran-2_pkg_setup() code
209# checks for a valid fortran compiler and optionally for its openmp support.
210fortran-2_pkg_setup() { 210_fortran-2_pkg_setup() {
211 for _f_use in ${FORTRAN_NEEDED}; do 211 for _f_use in ${FORTRAN_NEEDED}; do
212 case ${_f_use} in 212 case ${_f_use} in
213 always) 213 always)
214 _fortran_test_function && break 214 _fortran_test_function && break
215 ;; 215 ;;
227 ;; 227 ;;
228 esac 228 esac
229 done 229 done
230} 230}
231 231
232
233# @FUNCTION: fortran-2_pkg_setup
234# @DESCRIPTION:
235# Setup functionallity,
236# checks for a valid fortran compiler and optionally for its openmp support.
237fortran-2_pkg_setup() {
238 case ${EAPI:-0} in
239 0|1|2|3)
240 eqawarn "Support for EAPI < 4 will be removed from the"
241 eqawarn "fortran-2.eclass in until Sep 31. 2013."
242 eqawarn "Please migrate your package to a higher EAPI"
243 eqawarn "or file a bug at https://bugs.gentoo.org"
244 _fortran-2_pkg_setup ;;
245 4|5)
246 if [[ ${MERGE_TYPE} != binary ]]; then
247 _fortran-2_pkg_setup
248 fi
249 ;;
250 esac
251}
252
232case ${EAPI:-0} in 253case ${EAPI:-0} in
233 0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;; 254 0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
234 *) die "EAPI=${EAPI} is not supported" ;; 255 *) die "EAPI=${EAPI} is not supported" ;;
235esac 256esac
257

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20