public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: fortran-2.eclass ChangeLog
@ 2012-10-07 14:53 Justin Lecher (jlec)
  0 siblings, 0 replies; 3+ messages in thread
From: Justin Lecher (jlec) @ 2012-10-07 14:53 UTC (permalink / raw
  To: gentoo-commits

jlec        12/10/07 14:53:43

  Modified:             fortran-2.eclass ChangeLog
  Log:
  Revert virtual/fortran depends again, because not only USE=fortran controlls fortran needs

Revision  Changes    Path
1.11                 eclass/fortran-2.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?r1=1.10&r2=1.11

Index: fortran-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- fortran-2.eclass	7 Oct 2012 13:30:23 -0000	1.10
+++ fortran-2.eclass	7 Oct 2012 14:53:43 -0000	1.11
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.10 2012/10/07 13:30:23 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.11 2012/10/07 14:53:43 jlec Exp $
 
 # @ECLASS: fortran-2.eclass
 # @MAINTAINER:
@@ -156,10 +156,10 @@
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-if in_iuse fortran; then
-	DEPEND="fortran? ( virtual/fortran )"
-else
-	DEPEND="virtual/fortran"
-fi
+#if in_iuse fortran; then
+#	DEPEND="fortran? ( virtual/fortran )"
+#else
+#	DEPEND="virtual/fortran"
+#fi
 
-RDEPEND="${DEPEND}"
+#RDEPEND="${DEPEND}"



1.433                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.433&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.433&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.432&r2=1.433

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.432
retrieving revision 1.433
diff -u -r1.432 -r1.433
--- ChangeLog	7 Oct 2012 13:30:23 -0000	1.432
+++ ChangeLog	7 Oct 2012 14:53:43 -0000	1.433
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.432 2012/10/07 13:30:23 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.433 2012/10/07 14:53:43 jlec Exp $
+
+  07 Oct 2012; Justin Lecher <jlec@gentoo.org> fortran-2.eclass:
+  Revert virtual/fortran depends again, because not only USE=fortran controlls
+  fortran needs
 
   07 Oct 2012; Justin Lecher <jlec@gentoo.org> fortran-2.eclass:
   Depend on virtual/fortran eclass wise but in an USE=fortran sensitive way,





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: fortran-2.eclass ChangeLog
@ 2012-10-16 18:31 Justin Lecher (jlec)
  0 siblings, 0 replies; 3+ messages in thread
From: Justin Lecher (jlec) @ 2012-10-16 18:31 UTC (permalink / raw
  To: gentoo-commits

jlec        12/10/16 18:31:48

  Modified:             fortran-2.eclass ChangeLog
  Log:
  Add enhanced DEP support in fortran-2.eclass to easy the usage. Only inherit fortran-2 is need for general use. For a USE dependency on fortran the new FORTRAN_NEEDED=USE variable was introduced

Revision  Changes    Path
1.12                 eclass/fortran-2.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?r1=1.11&r2=1.12

Index: fortran-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- fortran-2.eclass	7 Oct 2012 14:53:43 -0000	1.11
+++ fortran-2.eclass	16 Oct 2012 18:31:48 -0000	1.12
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.11 2012/10/07 14:53:43 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.12 2012/10/16 18:31:48 jlec Exp $
 
 # @ECLASS: fortran-2.eclass
 # @MAINTAINER:
@@ -11,13 +11,23 @@
 # Test functions provided by Sebastien Fabbro and Kacper Kowalik
 # @BLURB: Simplify fortran compiler management
 # @DESCRIPTION:
-# If you need a fortran compiler, then you should be inheriting this eclass and
-# adding virtual/fortran to your dependencies.
+# If you need a fortran compiler, then you should be inheriting this eclass.
+# In case you only need optional support, please export FORTRAN_NEEDED before
+# inheriting the eclass.
+#
 # The eclass tests for working fortran compilers
 # and exports the variables FC and F77.
 # Optionally, it checks for extended capabilities based on
 # the variable options selected in the ebuild
 # The only phase function exported is fortran-2_pkg_setup.
+#
+# Example:
+#
+# FORTRAN_NEEDED="lapack fortran"
+#
+# inherit fortran-2
+#
+# FORTRAN_NEED_OPENMP=1
 
 # @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
 # @DESCRIPTION:
@@ -33,8 +43,37 @@
 # Valid settings are any combination of: 77 90 95 2003
 : ${FORTRAN_STANDARD:=77}
 
+# @ECLASS-VARIABLE: FORTRAN_NEEDED
+# @DESCRIPTION:
+# If your package has an optional fortran support, set this variable
+# to the space seperated list of USE triggering the fortran
+# dependence.
+#
+# e.g. FORTRAN_NEEDED=lapack would result in
+#
+# DEPEND="lapack? ( virtual/fortran )"
+#
+# If unset, we always depend on virtual/fortran.
+: ${FORTRAN_NEEDED:=always}
+
 inherit eutils toolchain-funcs
 
+for _f_use in ${FORTRAN_NEEDED}; do
+	case ${_f_use} in
+		always)
+			DEPEND+=" virtual/fortran"
+			break
+			;;
+		no)
+			break
+			;;
+		*)
+			DEPEND+=" ${_f_use}? ( virtual/fortran )"
+			;;
+	esac
+done
+RDEPEND="${DEPEND}"
+
 # @FUNCTION: _write_testsuite
 # @INTERNAL
 # @DESCRIPTION:
@@ -126,6 +165,27 @@
 # @DESCRIPTION:
 # Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
 fortran-2_pkg_setup() {
+for _f_use in ${FORTRAN_NEEDED}; do
+   case ${_f_use} in
+      always)
+			_fortran_test_function && break
+         ;;
+      no)
+			einfo "Forcing fortran support off"
+			break
+         ;;
+      *)
+			use ${_f_use} && _fortran_test_function && break
+         ;;
+   esac
+done
+}
+
+# @FUNCTION: _fortran_test_function
+# @INTERNAL
+# @DESCRIPTION:
+# Internal testfunction for working fortran compiler. It is called in fortran-2_pkg_setup
+_fortran_test_function() {
 	local dialect
 
 	: ${F77:=$(tc-getFC)}
@@ -141,25 +201,21 @@
 		esac
 	done
 
-	if [[ ${FORTRAN_NEED_OPENMP} == 1 ]]; then
-		_fortran-has-openmp || \
-			die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP"
-	fi
 	tc-export F77 FC
-	einfo "Using following Fortran compiler"
+	einfo "Using following Fortran compiler:"
 	einfo "  F77: ${F77}"
 	einfo "  FC: ${FC}"
+
+	if [[ ${FORTRAN_NEED_OPENMP} == 1 ]]; then
+		if _fortran-has-openmp; then
+			einfo "${FC} has OPENMP support"
+		else
+			die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP"
+		fi
+	fi
 }
 
 case ${EAPI:-0} in
 	0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
-
-#if in_iuse fortran; then
-#	DEPEND="fortran? ( virtual/fortran )"
-#else
-#	DEPEND="virtual/fortran"
-#fi
-
-#RDEPEND="${DEPEND}"



1.449                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.449&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.449&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.448&r2=1.449

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.448
retrieving revision 1.449
diff -u -r1.448 -r1.449
--- ChangeLog	16 Oct 2012 14:26:58 -0000	1.448
+++ ChangeLog	16 Oct 2012 18:31:48 -0000	1.449
@@ -1,6 +1,11 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.448 2012/10/16 14:26:58 yngwin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.449 2012/10/16 18:31:48 jlec Exp $
+
+  16 Oct 2012; Justin Lecher <jlec@gentoo.org> fortran-2.eclass:
+  Add enhanced DEP support in fortran-2.eclass to easy the usage. Only inherit
+  fortran-2 is need for general use. For a USE dependency on fortran the new
+  FORTRAN_NEEDED=USE variable was introduced
 
   16 Oct 2012; Ben de Groot <yngwin@gentoo.org> -qt4.eclass:
   Removing qt4.eclass as announced on Sep 13





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: fortran-2.eclass ChangeLog
@ 2013-07-18  7:03 Justin Lecher (jlec)
  0 siblings, 0 replies; 3+ messages in thread
From: Justin Lecher (jlec) @ 2013-07-18  7:03 UTC (permalink / raw
  To: gentoo-commits

jlec        13/07/18 07:03:33

  Modified:             fortran-2.eclass ChangeLog
  Log:
  Wrap lines at 80 char

Revision  Changes    Path
1.18                 eclass/fortran-2.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/fortran-2.eclass?r1=1.17&r2=1.18

Index: fortran-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- fortran-2.eclass	13 Mar 2013 11:03:12 -0000	1.17
+++ fortran-2.eclass	18 Jul 2013 07:03:33 -0000	1.18
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.17 2013/03/13 11:03:12 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v 1.18 2013/07/18 07:03:33 jlec Exp $
 
 # @ECLASS: fortran-2.eclass
 # @MAINTAINER:
@@ -109,11 +109,13 @@
 	local fcode=${filebase}.f${fdia}
 	local ret
 
-	[[ $# -lt 1 ]] && die "_fortran_compile_test() needs at least one arguments"
+	[[ $# -lt 1 ]] && \
+		die "_fortran_compile_test() needs at least one arguments"
 
 	[[ -f ${fcode} ]] || _fortran_write_testsuite
 
-	${fcomp} "${fcode}" -o "${fcode}.x" >> "${T}"/_fortran_compile_test.log 2>&1
+	${fcomp} "${fcode}" -o "${fcode}.x" \
+		>> "${T}"/_fortran_compile_test.log 2>&1
 	ret=$?
 
 	rm -f "${fcode}.x"
@@ -138,7 +140,8 @@
 	EOF
 
 	for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
-		${_fc} ${flag} "${fcode}" -o "${fcode}.x" &>> "${T}"/_fortran_compile_test.log
+		${_fc} ${flag} "${fcode}" -o "${fcode}.x" \
+			&>> "${T}"/_fortran_compile_test.log
 		ret=$?
 		(( ${ret} )) || break
 	done
@@ -164,7 +167,8 @@
 # @FUNCTION: _fortran_test_function
 # @INTERNAL
 # @DESCRIPTION:
-# Internal testfunction for working fortran compiler. It is called in fortran-2_pkg_setup
+# Internal testfunction for working fortran compiler.
+# It is called in fortran-2_pkg_setup
 _fortran_test_function() {
 	local dialect
 
@@ -173,9 +177,12 @@
 	: ${FORTRAN_STANDARD:=77}
 	for dialect in ${FORTRAN_STANDARD}; do
 		case ${dialect} in
-			77) _fortran_compile_test $(tc-getF77) || _fortran_die_msg ;;
-			90|95) _fortran_compile_test $(tc-getFC) 90 || _fortran_die_msg ;;
-			2003) _fortran_compile_test $(tc-getFC) 03 || _fortran_die_msg ;;
+			77) _fortran_compile_test $(tc-getF77) || \
+				_fortran_die_msg ;;
+			90|95) _fortran_compile_test $(tc-getFC) 90 || \
+				_fortran_die_msg ;;
+			2003) _fortran_compile_test $(tc-getFC) 03 || \
+				_fortran_die_msg ;;
 			2008) die "Future" ;;
 			*) die "${dialect} is not a Fortran dialect." ;;
 		esac
@@ -190,14 +197,16 @@
 		if _fortran-has-openmp; then
 			einfo "${FC} has OPENMP support"
 		else
-			die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP"
+			die "Please install current gcc with USE=openmp or " \
+			"set the FC variable to a compiler that supports OpenMP"
 		fi
 	fi
 }
 
 # @FUNCTION: fortran-2_pkg_setup
 # @DESCRIPTION:
-# Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
+# Setup functionallity,
+# checks for a valid fortran compiler and optionally for its openmp support.
 fortran-2_pkg_setup() {
 	for _f_use in ${FORTRAN_NEEDED}; do
    	case ${_f_use} in



1.882                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.882&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.882&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.881&r2=1.882

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.881
retrieving revision 1.882
diff -u -r1.881 -r1.882
--- ChangeLog	15 Jul 2013 23:54:03 -0000	1.881
+++ ChangeLog	18 Jul 2013 07:03:33 -0000	1.882
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.881 2013/07/15 23:54:03 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.882 2013/07/18 07:03:33 jlec Exp $
+
+  18 Jul 2013; Justin Lecher <jlec@gentoo.org> fortran-2.eclass:
+  Wrap lines at 80 char
 
   15 Jul 2013; Samuli Suominen <ssuominen@gentoo.org>
   bash-completion-r1.eclass:





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-18  7:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16 18:31 [gentoo-commits] gentoo-x86 commit in eclass: fortran-2.eclass ChangeLog Justin Lecher (jlec)
  -- strict thread matches above, loose matches on Subject: below --
2013-07-18  7:03 Justin Lecher (jlec)
2012-10-07 14:53 Justin Lecher (jlec)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox