View | Details | Raw Unified
Collapse All | Expand All

(-) fortran_orig.eclass (-3 / +30 lines)
 Lines 36-41    Link Here 
#   * g77 - GCC Fortran 77
#   * g77 - GCC Fortran 77
#   * f2c - Fortran 2 C Translator
#   * f2c - Fortran 2 C Translator
#   * ifc - Intel Fortran Compiler
#   * ifc - Intel Fortran Compiler
#   * pgf77 - Portland Group Fortran 77 compiler
#   * pgf90 - Portland Group Fortran 90/95 compiler
#
#
# Checks if at least one of <profiles> is installed.
# Checks if at least one of <profiles> is installed.
# Checks also if F77 (the fortran compiler to use) is available
# Checks also if F77 (the fortran compiler to use) is available
 Lines 63-68    Link Here 
					AVAILABLE="${AVAILABLE} f2c"
					AVAILABLE="${AVAILABLE} f2c"
				fi
				fi
				;;
				;;
			pgf77)
				if [ -x "$(which pgf77 2> /dev/null)" ]; then
					AVAILABLE="${AVAILABLE} pgf77"
				fi
				;;
			pgf90)
				if [ -x "$(which pgf90 2> /dev/null)" ]; then
					AVAILABLE="${AVAILABLE} pgf90"
                else
                    echo "Else..."
				fi
				;;
			ifc)
			ifc)
				case ${ARCH} in
				case ${ARCH} in
					x86|ia64|amd64)
					x86|ia64|amd64)
 Lines 95-100    Link Here 
				f2c)
				f2c)
					eerror "[${i}] emerge dev-lang/f2c"
					eerror "[${i}] emerge dev-lang/f2c"
					;;
					;;
				pgf90)
					eerror "[${i}] emerge dev-lang/pgi-workstation"
					;;
				pgf77)
					eerror "[${i}] emerge dev-lang/pgi-workstation"
					;;
				ifc)
				ifc)
					case ${ARCH} in
					case ${ARCH} in
						x86|ia64)
						x86|ia64)
 Lines 112-118    Link Here 
		einfo "Installed are: ${AVAILABLE}"
		einfo "Installed are: ${AVAILABLE}"
		if [ -n "${F77}" -o -n "${FC}" -o -n "${F2C}" ]; then
		if [ -n "${F77}" -o -n "${FC}" -o -n "${F2C}" ]; then
			if [ -n "${F77}" ]; then
			if [ -n "${F77}" ]; then
				FC="${F77}"						# F77 overwrites FC
 				if [ "${F77}" != "pgf77" ] && [ "${FC}" != "pgf90"]; then
					FC="${F77}"						# F77 overwrites FC
 				fi
			fi
			fi
			if [ -n "${FC}" -a -n "${F2C}" ]; then
			if [ -n "${FC}" -a -n "${F2C}" ]; then
				ewarn "Using ${FC} and f2c is impossible. Disabling F2C !"
				ewarn "Using ${FC} and f2c is impossible. Disabling F2C !"
 Lines 123-129    Link Here 
				if [ -n "${F2C}" ]; then
				if [ -n "${F2C}" ]; then
					MY_FORTRAN="$(basename ${F2C})"
					MY_FORTRAN="$(basename ${F2C})"
				else
				else
					MY_FORTRAN="$(basename ${F77})"
 					if [ "${FC}" == "pgf90" ]; then
						MY_FORTRAN="$(basename ${FC})"
 					else
						MY_FORTRAN="$(basename ${F77})"
 					fi
				fi
				fi
			fi
			fi
		fi
		fi
 Lines 149-159    Link Here 
		fi
		fi
		case ${MY_FORTRAN} in
		case ${MY_FORTRAN} in
			gfortran|g77|ifc|ifort|f2c|f95)
			gfortran|g77|ifc|ifort|f2c|f95|pgf90|pgf77)
				FORTRANC="${MY_FORTRAN}"
				FORTRANC="${MY_FORTRAN}"
		esac
		esac
	fi
	fi
	use debug && echo "FORTRANC: \"${FORTRANC}\""
	use debug && echo "FORTRANC: \"${FORTRANC}\""
 	einfo "Using $FORTRANC"
}
}
# patch_fortran():
# patch_fortran():