diff options
Diffstat (limited to 'sci-libs/lapack-config')
-rw-r--r-- | sci-libs/lapack-config/ChangeLog | 10 | ||||
-rw-r--r-- | sci-libs/lapack-config/files/lapack-config | 336 | ||||
-rw-r--r-- | sci-libs/lapack-config/files/lapack-config-1.0.1 | 343 | ||||
-rw-r--r-- | sci-libs/lapack-config/files/lapack-config-1.0.1.gz | bin | 1900 -> 0 bytes | |||
-rw-r--r-- | sci-libs/lapack-config/files/lapack-config.gz | bin | 1808 -> 0 bytes | |||
-rw-r--r-- | sci-libs/lapack-config/lapack-config-1.0.0.ebuild | 7 | ||||
-rw-r--r-- | sci-libs/lapack-config/lapack-config-1.0.1.ebuild | 7 |
7 files changed, 693 insertions, 10 deletions
diff --git a/sci-libs/lapack-config/ChangeLog b/sci-libs/lapack-config/ChangeLog index f30526b94de9..9a14e5475459 100644 --- a/sci-libs/lapack-config/ChangeLog +++ b/sci-libs/lapack-config/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/lapack-config -# Copyright 2004-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-config/ChangeLog,v 1.6 2005/09/17 21:54:29 hansmi Exp $ +# Copyright 2004-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-config/ChangeLog,v 1.7 2006/01/29 16:19:57 blubb Exp $ + + 29 Jan 2006; Simon Stelling <blubb@gentoo.org> +files/lapack-config-1.0.1, + -files/lapack-config-1.0.1.gz, +files/lapack-config, + -files/lapack-config.gz, lapack-config-1.0.0.ebuild, + lapack-config-1.0.1.ebuild: + no need to gzip smallish files 17 Sep 2005; Michael Hanselmann <hansmi@gentoo.org> lapack-config-1.0.1.ebuild: diff --git a/sci-libs/lapack-config/files/lapack-config b/sci-libs/lapack-config/files/lapack-config new file mode 100644 index 000000000000..ec6341448fc4 --- /dev/null +++ b/sci-libs/lapack-config/files/lapack-config @@ -0,0 +1,336 @@ +#!/bin/bash +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# Author: Derek Dolney <dolney@astro.physics.upenn.edu> +# Based on gcc-config by Martin Schlemmer <azarah@gentoo.org> + +source /etc/init.d/functions.sh || { + echo "$0: Could not source /etc/init.d/functions.sh!" + exit 1 +} + +# Some variables you might want to know about: +# (* = C, F77, ...) +# +# C_PROFILE and F77_PROFILE: profile requested by user on command line +# +# C_CURRENT and F77_CURRENT: full path to current profile recorded in +# CONFIG_FILE + +PROFILE_PATH=/usr/lib/lapack +CONFIG_FILE=${PROFILE_PATH}/current + +usage() { + +cat << "USAGE_END" +Usage: lapack-config [Option] [LAPACK Profile] +Change the current LAPACK profile, or give info about profiles. + +Options: + + -p, --print-current-profile + Print currently used LAPACK profiles. + + -l, --list-profiles + Print a list of available profiles. + + --f77libs Print flags to link with the LAPACK library for the + given/current LAPACK profile. + +USAGE_END + + exit 1 +} + +if [ "$#" -lt 1 ] +then + usage +fi + +check_root() { + + if [ "$(id -u)" -ne 0 ] + then + eerror "$0: Must be root." + exit 1 + fi + +} + +get_current_profile() { + + if [ -f ${CONFIG_FILE} ] + then + source ${CONFIG_FILE} + C_CURRENT="${PROFILE_PATH}/${C_CURRENT}" + F77_CURRENT="${PROFILE_PATH}/${F77_CURRENT}" + fi +} + +print_current_profile() { + + local FP="none" +# local CP="none" + + if [ -n "${F77_CURRENT}" ] + then + FP="${F77_CURRENT##*/}" + FP="${F77_CURRENT##f77-/}" + fi + +# if [ -n "${C_CURRENT}" ] +# then +# CP="${C_CURRENT##*/}" +# CP="${C_CURRENT##c-/}" +# fi + + echo + echo "Current profile:" + echo "F77 LAPACK: ${FP}" +# echo "C LAPACK: ${CP}" +} + +list_profiles() { + + local i=1 + +# echo +# echo "Available C profiles:" + +# for x in ${PROFILE_PATH}/c-* +# do +# if [ -f "${x}" ] +# then +# x=${x##*/} +# x=${x/c-/} +# echo "[${i}] ${x##*/}" +# i=$((i + 1)) +# fi +# done + + echo + + i=1 + echo "Available F77 profiles:" + for x in ${PROFILE_PATH}/f77-* + do + if [ -f "${x}" ] + then + x=${x##*/} + x=${x/f77-/} + echo "[${i}] ${x}" + i=$((i + 1)) + fi + done + +} + +set_c_profile() { + + check_root + + if [ -z "${C_PROFILE}" ] + then + usage + else + source ${PROFILE_PATH}/${C_PROFILE} + setup + C_PROFILE_CHANGED="yes" + fi + +} + +set_f77_profile() { + + check_root + + if [ -z "${F77_PROFILE}" ] + then + usage + else + source ${PROFILE_PATH}/${F77_PROFILE} + setup + F77_PROFILE_CHANGED="yes" + fi + +} + +list_cflags() { + + if [ -n "${C_PROFILE}" ] + then + source ${PROFILE_PATH}/${C_PROFILE} + echo -n "${CFLAGS} " + elif [ -n "${C_CURRENT}" ] + then + source ${C_CURRENT} + echo -n "${CFLAGS} " + else + eerror "No C LAPACK profile is active." + fi + +} + +list_clibs() { + + if [ -n "${C_PROFILE}" ] + then + source ${PROFILE_PATH}/${C_PROFILE} + echo -n "${CLIBS} " + elif [ -n "${C_CURRENT}" ] + then + source ${C_CURRENT} + echo -n "${CLIBS} " + else + eerror "No C LAPACK profile is active." + fi +} + +list_f77libs() { + + if [ -n "${F77_PROFILE}" ] + then + source ${PROFILE_PATH}/${F77_PROFILE} + echo -n "${F77LIBS} " + elif [ -n "${F77_CURRENT}" ] + then + source ${F77_CURRENT} + echo -n "${F77LIBS} " + else + eerror "No F77 LAPACK profile is active." + fi + +} + +TODO="" +C_PROFILE_CHANGED="no" +F77_PROFILE_CHANGED="no" + +for x in $* +do + case "${x}" in + -p|--print-current-profile) + TODO="${TODO}print_current_profile;" + ;; + -l|--list-profiles) + TODO="${TODO}list_profiles;" + ;; +# -c|--set-c-profile) +# if [ "${TODO}" != "${TODO#set_f77_profile}" ] +# then +# usage +# else +# TODO="${TODO}set_c_profile;" +# fi +# ;; +# -f|--set-f77-profile) +# if [ "${TODO}" != "${TODO#set_c_profile}" ] +# then +# usage +# else +# TODO="${TODO}set_f77_profile;" +# fi +# ;; +# --cflags) +# TODO="${TODO}list_cflags;" +# ;; +# --clibs) +# TODO="${TODO}list_clibs;" +# ;; + --f77libs) + TODO="${TODO}list_f77libs;" + ;; + -*) + eerror "$0: Invalid switch! Run $0 without parameters for help." + exit 1 + ;; + *) + if [ -z "${PROFILE}" ] + then + for y in ${PROFILE_PATH}/* + do + [ "${y}" == "${CONFIG_FILE}" ] && continue + if [ -f "${y}" ] + then + if [ "${x}" == "${y##*/}" ] + then + PROFILE="${x}" + if [ "${PROFILE}" != "${PROFILE#c-}" ] + then + C_PROFILE="${PROFILE}" + elif [ "${PROFILE}" != "${PROFILE#f77-}" ] + then + F77_PROFILE="${PROFILE}" + fi + else + if [ "c-${x}" == "${y##*/}" ] + then + PROFILE="${x}" + C_PROFILE="c-${x}" + fi + if [ "f77-${x}" == "${y##*/}" ] + then + PROFILE="${x}" + F77_PROFILE="f77-${x}" + fi + fi + fi + done + if [ -z "${PROFILE}" ] + then + eerror "$0: ${x} is not a valid profile!" + exit 1 + fi + else + usage + fi + ;; + esac +done + +get_current_profile + +if [ -z "${TODO}" ] +then + if [ -z "${PROFILE}" ] + then + usage + else +# if [ -n "${C_PROFILE}" ] +# then +# set_c_profile +# fi + if [ -n "${F77_PROFILE}" ] + then + set_f77_profile + fi + fi +fi + +eval ${TODO} +echo + +NEW_CONFIG_FILE="" +if [ "${C_PROFILE_CHANGED}" == "yes" -o "${F77_PROFILE_CHANGED}" == "yes" ] +then +# if [ "${C_PROFILE_CHANGED}" == "yes" ] +# then +# NEW_CONFIG_FILE="C_CURRENT=\"${C_PROFILE}\"" +# elif [ -n "${C_CURRENT}" ] +# then +# NEW_CONFIG_FILE="C_CURRENT=\"${C_CURRENT##*/}\"" +# fi + + if [ "${F77_PROFILE_CHANGED}" == "yes" ] + then + NEW_CONFIG_FILE="F77_CURRENT=\"${F77_PROFILE}\"" + elif [ -n "${F77_CURRENT}" ] + then + NEW_CONFIG_FILE="F77_CURRENT=\"${F77_CURRENT##*/}\"" + fi + + echo -e "${NEW_CONFIG_FILE}" > ${CONFIG_FILE} + exec /usr/sbin/env-update +fi + +# vim:ts=8 diff --git a/sci-libs/lapack-config/files/lapack-config-1.0.1 b/sci-libs/lapack-config/files/lapack-config-1.0.1 new file mode 100644 index 000000000000..2ccb09427ed9 --- /dev/null +++ b/sci-libs/lapack-config/files/lapack-config-1.0.1 @@ -0,0 +1,343 @@ +#!/bin/bash +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# Author: Derek Dolney <dolney@astro.physics.upenn.edu> +# Based on gcc-config by Martin Schlemmer <azarah@gentoo.org> + +source /etc/init.d/functions.sh || { + echo "$0: Could not source /etc/init.d/functions.sh!" + exit 1 +} + +get_libdir() { + MY_LIBDIR="$(portageq envvar CONF_LIBDIR)" + + # This is for < portage-2.0.51_pre20 support + echo ${MY_LIBDIR:=lib} +} + +# Some variables you might want to know about: +# (* = C, F77, ...) +# +# C_PROFILE and F77_PROFILE: profile requested by user on command line +# +# C_CURRENT and F77_CURRENT: full path to current profile recorded in +# CONFIG_FILE + +PROFILE_PATH=/usr/$(get_libdir)/lapack +CONFIG_FILE=${PROFILE_PATH}/current + +usage() { + +cat << "USAGE_END" +Usage: lapack-config [Option] [LAPACK Profile] +Change the current LAPACK profile, or give info about profiles. + +Options: + + -p, --print-current-profile + Print currently used LAPACK profiles. + + -l, --list-profiles + Print a list of available profiles. + + --f77libs Print flags to link with the LAPACK library for the + given/current LAPACK profile. + +USAGE_END + + exit 1 +} + +if [ "$#" -lt 1 ] +then + usage +fi + +check_root() { + + if [ "$(id -u)" -ne 0 ] + then + eerror "$0: Must be root." + exit 1 + fi + +} + +get_current_profile() { + + if [ -f ${CONFIG_FILE} ] + then + source ${CONFIG_FILE} + C_CURRENT="${PROFILE_PATH}/${C_CURRENT}" + F77_CURRENT="${PROFILE_PATH}/${F77_CURRENT}" + fi +} + +print_current_profile() { + + local FP="none" +# local CP="none" + + if [ -n "${F77_CURRENT}" ] + then + FP="${F77_CURRENT##*/}" + FP="${F77_CURRENT##f77-/}" + fi + +# if [ -n "${C_CURRENT}" ] +# then +# CP="${C_CURRENT##*/}" +# CP="${C_CURRENT##c-/}" +# fi + + echo + echo "Current profile:" + echo "F77 LAPACK: ${FP}" +# echo "C LAPACK: ${CP}" +} + +list_profiles() { + + local i=1 + +# echo +# echo "Available C profiles:" + +# for x in ${PROFILE_PATH}/c-* +# do +# if [ -f "${x}" ] +# then +# x=${x##*/} +# x=${x/c-/} +# echo "[${i}] ${x##*/}" +# i=$((i + 1)) +# fi +# done + + echo + + i=1 + echo "Available F77 profiles:" + for x in ${PROFILE_PATH}/f77-* + do + if [ -f "${x}" ] + then + x=${x##*/} + x=${x/f77-/} + echo "[${i}] ${x}" + i=$((i + 1)) + fi + done + +} + +set_c_profile() { + + check_root + + if [ -z "${C_PROFILE}" ] + then + usage + else + source ${PROFILE_PATH}/${C_PROFILE} + setup + C_PROFILE_CHANGED="yes" + fi + +} + +set_f77_profile() { + + check_root + + if [ -z "${F77_PROFILE}" ] + then + usage + else + source ${PROFILE_PATH}/${F77_PROFILE} + setup + F77_PROFILE_CHANGED="yes" + fi + +} + +list_cflags() { + + if [ -n "${C_PROFILE}" ] + then + source ${PROFILE_PATH}/${C_PROFILE} + echo -n "${CFLAGS} " + elif [ -n "${C_CURRENT}" ] + then + source ${C_CURRENT} + echo -n "${CFLAGS} " + else + eerror "No C LAPACK profile is active." + fi + +} + +list_clibs() { + + if [ -n "${C_PROFILE}" ] + then + source ${PROFILE_PATH}/${C_PROFILE} + echo -n "${CLIBS} " + elif [ -n "${C_CURRENT}" ] + then + source ${C_CURRENT} + echo -n "${CLIBS} " + else + eerror "No C LAPACK profile is active." + fi +} + +list_f77libs() { + + if [ -n "${F77_PROFILE}" ] + then + source ${PROFILE_PATH}/${F77_PROFILE} + echo -n "${F77LIBS} " + elif [ -n "${F77_CURRENT}" ] + then + source ${F77_CURRENT} + echo -n "${F77LIBS} " + else + eerror "No F77 LAPACK profile is active." + fi + +} + +TODO="" +C_PROFILE_CHANGED="no" +F77_PROFILE_CHANGED="no" + +for x in $* +do + case "${x}" in + -p|--print-current-profile) + TODO="${TODO}print_current_profile;" + ;; + -l|--list-profiles) + TODO="${TODO}list_profiles;" + ;; +# -c|--set-c-profile) +# if [ "${TODO}" != "${TODO#set_f77_profile}" ] +# then +# usage +# else +# TODO="${TODO}set_c_profile;" +# fi +# ;; +# -f|--set-f77-profile) +# if [ "${TODO}" != "${TODO#set_c_profile}" ] +# then +# usage +# else +# TODO="${TODO}set_f77_profile;" +# fi +# ;; +# --cflags) +# TODO="${TODO}list_cflags;" +# ;; +# --clibs) +# TODO="${TODO}list_clibs;" +# ;; + --f77libs) + TODO="${TODO}list_f77libs;" + ;; + -*) + eerror "$0: Invalid switch! Run $0 without parameters for help." + exit 1 + ;; + *) + if [ -z "${PROFILE}" ] + then + for y in ${PROFILE_PATH}/* + do + [ "${y}" == "${CONFIG_FILE}" ] && continue + if [ -f "${y}" ] + then + if [ "${x}" == "${y##*/}" ] + then + PROFILE="${x}" + if [ "${PROFILE}" != "${PROFILE#c-}" ] + then + C_PROFILE="${PROFILE}" + elif [ "${PROFILE}" != "${PROFILE#f77-}" ] + then + F77_PROFILE="${PROFILE}" + fi + else + if [ "c-${x}" == "${y##*/}" ] + then + PROFILE="${x}" + C_PROFILE="c-${x}" + fi + if [ "f77-${x}" == "${y##*/}" ] + then + PROFILE="${x}" + F77_PROFILE="f77-${x}" + fi + fi + fi + done + if [ -z "${PROFILE}" ] + then + eerror "$0: ${x} is not a valid profile!" + exit 1 + fi + else + usage + fi + ;; + esac +done + +get_current_profile + +if [ -z "${TODO}" ] +then + if [ -z "${PROFILE}" ] + then + usage + else +# if [ -n "${C_PROFILE}" ] +# then +# set_c_profile +# fi + if [ -n "${F77_PROFILE}" ] + then + set_f77_profile + fi + fi +fi + +eval ${TODO} +echo + +NEW_CONFIG_FILE="" +if [ "${C_PROFILE_CHANGED}" == "yes" -o "${F77_PROFILE_CHANGED}" == "yes" ] +then +# if [ "${C_PROFILE_CHANGED}" == "yes" ] +# then +# NEW_CONFIG_FILE="C_CURRENT=\"${C_PROFILE}\"" +# elif [ -n "${C_CURRENT}" ] +# then +# NEW_CONFIG_FILE="C_CURRENT=\"${C_CURRENT##*/}\"" +# fi + + if [ "${F77_PROFILE_CHANGED}" == "yes" ] + then + NEW_CONFIG_FILE="F77_CURRENT=\"${F77_PROFILE}\"" + elif [ -n "${F77_CURRENT}" ] + then + NEW_CONFIG_FILE="F77_CURRENT=\"${F77_CURRENT##*/}\"" + fi + + echo -e "${NEW_CONFIG_FILE}" > ${CONFIG_FILE} + exec /usr/sbin/env-update +fi + +# vim:ts=8 diff --git a/sci-libs/lapack-config/files/lapack-config-1.0.1.gz b/sci-libs/lapack-config/files/lapack-config-1.0.1.gz Binary files differdeleted file mode 100644 index 65f20bcc4557..000000000000 --- a/sci-libs/lapack-config/files/lapack-config-1.0.1.gz +++ /dev/null diff --git a/sci-libs/lapack-config/files/lapack-config.gz b/sci-libs/lapack-config/files/lapack-config.gz Binary files differdeleted file mode 100644 index af223b5a5a81..000000000000 --- a/sci-libs/lapack-config/files/lapack-config.gz +++ /dev/null diff --git a/sci-libs/lapack-config/lapack-config-1.0.0.ebuild b/sci-libs/lapack-config/lapack-config-1.0.0.ebuild index ce19dc7399a2..c5b19aaedb87 100644 --- a/sci-libs/lapack-config/lapack-config-1.0.0.ebuild +++ b/sci-libs/lapack-config/lapack-config-1.0.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-config/lapack-config-1.0.0.ebuild,v 1.2 2005/02/17 21:28:45 kloeri Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-config/lapack-config-1.0.0.ebuild,v 1.3 2006/01/29 16:19:57 blubb Exp $ DESCRIPTION="Utility to change the default LAPACK library" HOMEPAGE="http://www.gentoo.org/" @@ -16,8 +16,7 @@ DEPEND="" RDEPEND="app-shells/bash" src_unpack(){ - cp ${FILESDIR}/${PN}.gz ${WORKDIR} - gunzip ${WORKDIR}/${PN}.gz + cp ${FILESDIR}/${PN} ${WORKDIR} } src_install () { diff --git a/sci-libs/lapack-config/lapack-config-1.0.1.ebuild b/sci-libs/lapack-config/lapack-config-1.0.1.ebuild index c7c5f3beca08..6db508727b20 100644 --- a/sci-libs/lapack-config/lapack-config-1.0.1.ebuild +++ b/sci-libs/lapack-config/lapack-config-1.0.1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-config/lapack-config-1.0.1.ebuild,v 1.5 2005/09/17 21:54:29 hansmi Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-config/lapack-config-1.0.1.ebuild,v 1.6 2006/01/29 16:19:57 blubb Exp $ DESCRIPTION="Utility to change the default LAPACK library" HOMEPAGE="http://www.gentoo.org/" @@ -16,8 +16,7 @@ DEPEND="" RDEPEND="app-shells/bash" src_unpack(){ - cp ${FILESDIR}/${P}.gz ${WORKDIR}/${PN}.gz - gunzip ${WORKDIR}/${PN}.gz + cp ${FILESDIR}/${P} ${WORKDIR}/${PN} } src_install () { |