diff options
author | Simon Stelling <blubb@gentoo.org> | 2006-01-29 16:25:33 +0000 |
---|---|---|
committer | Simon Stelling <blubb@gentoo.org> | 2006-01-29 16:25:33 +0000 |
commit | 96bdfa38c0be272e1bc18d6e578cba8770aaf870 (patch) | |
tree | a23346d3c9102cb44797dc345aae1e1465235744 /sci-libs | |
parent | sonypid url fix and modular x deps (diff) | |
download | gentoo-2-96bdfa38c0be272e1bc18d6e578cba8770aaf870.tar.gz gentoo-2-96bdfa38c0be272e1bc18d6e578cba8770aaf870.tar.bz2 gentoo-2-96bdfa38c0be272e1bc18d6e578cba8770aaf870.zip |
no need to bzip smallish files
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/blas-config/ChangeLog | 9 | ||||
-rw-r--r-- | sci-libs/blas-config/blas-config-1.0.0.ebuild | 7 | ||||
-rw-r--r-- | sci-libs/blas-config/blas-config-1.0.1.ebuild | 8 | ||||
-rw-r--r-- | sci-libs/blas-config/files/blas-config | 350 | ||||
-rw-r--r-- | sci-libs/blas-config/files/blas-config-1.0.1 | 357 | ||||
-rw-r--r-- | sci-libs/blas-config/files/blas-config-1.0.1.bz2 | bin | 1978 -> 0 bytes | |||
-rw-r--r-- | sci-libs/blas-config/files/blas-config.bz2 | bin | 1900 -> 0 bytes |
7 files changed, 720 insertions, 11 deletions
diff --git a/sci-libs/blas-config/ChangeLog b/sci-libs/blas-config/ChangeLog index a6b3d7e08cb7..3eaf28453e43 100644 --- a/sci-libs/blas-config/ChangeLog +++ b/sci-libs/blas-config/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sci-libs/blas-config -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-config/ChangeLog,v 1.2 2004/12/29 21:53:59 swegener Exp $ +# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-config/ChangeLog,v 1.3 2006/01/29 16:25:33 blubb Exp $ + + 29 Jan 2006; Simon Stelling <blubb@gentoo.org> +files/blas-config-1.0.1, + -files/blas-config-1.0.1.bz2, +files/blas-config, -files/blas-config.bz2, + blas-config-1.0.0.ebuild, blas-config-1.0.1.ebuild: + no need to bzip smallish files *blas-config-1.0.0 (29 Dec 2004) diff --git a/sci-libs/blas-config/blas-config-1.0.0.ebuild b/sci-libs/blas-config/blas-config-1.0.0.ebuild index aaedba9f16ab..177de9dc7a31 100644 --- a/sci-libs/blas-config/blas-config-1.0.0.ebuild +++ b/sci-libs/blas-config/blas-config-1.0.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 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/blas-config/blas-config-1.0.0.ebuild,v 1.1 2004/12/29 18:17:19 ribosome Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-config/blas-config-1.0.0.ebuild,v 1.2 2006/01/29 16:25:33 blubb Exp $ DESCRIPTION="Utility to change the default BLAS library" HOMEPAGE="http://www.gentoo.org/" @@ -16,8 +16,7 @@ DEPEND="" RDEPEND="app-shells/bash" src_unpack(){ - cp ${FILESDIR}/blas-config.bz2 ${WORKDIR} - bunzip2 ${WORKDIR}/blas-config.bz2 + cp ${FILESDIR}/blas-config ${WORKDIR} } src_install () { diff --git a/sci-libs/blas-config/blas-config-1.0.1.ebuild b/sci-libs/blas-config/blas-config-1.0.1.ebuild index 2076c435fb3d..28d5acac5f6f 100644 --- a/sci-libs/blas-config/blas-config-1.0.1.ebuild +++ b/sci-libs/blas-config/blas-config-1.0.1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 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/blas-config/blas-config-1.0.1.ebuild,v 1.1 2004/12/29 18:17:19 ribosome Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-config/blas-config-1.0.1.ebuild,v 1.2 2006/01/29 16:25:33 blubb Exp $ DESCRIPTION="Utility to change the default BLAS library" HOMEPAGE="http://www.gentoo.org/" @@ -16,9 +16,7 @@ DEPEND="" RDEPEND="app-shells/bash" src_unpack(){ - cp ${FILESDIR}/${P}.bz2 ${WORKDIR} - bunzip2 ${WORKDIR}/${P}.bz2 - mv ${WORKDIR}/${P} ${WORKDIR}/${PN} + cp ${FILESDIR}/${P} ${WORKDIR}/${PN} } src_install () { diff --git a/sci-libs/blas-config/files/blas-config b/sci-libs/blas-config/files/blas-config new file mode 100644 index 000000000000..39e77815d5cd --- /dev/null +++ b/sci-libs/blas-config/files/blas-config @@ -0,0 +1,350 @@ +#!/bin/bash +# Copyright 1999-2003 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> +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-config/files/blas-config,v 1.1 2006/01/29 16:25:33 blubb Exp $ + +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/blas +CONFIG_FILE=${PROFILE_PATH}/current + +usage() { + +cat << "USAGE_END" +Usage: blas-config [Option] [BLAS Profile] +Change the current BLAS profile, or give info about profiles. + +Options: + + -p, --print-current-profile + Print currently used BLAS profiles. + + -l, --list-profiles + Print a list of available profiles. + + -c, --set-c-profile + Change/set the C BLAS profile only. + + -f, --set-f77-profile + Change/set the F77 BLAS profile only. + + --cflags + Print compilation flags for the given/current C BLAS + profile. + + --clibs Print flags to link with the BLAS library for the + given/current C BLAS profile. + + --f77libs Print flags to link with the BLAS library for the + given/current F77 BLAS 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 profiles:" + echo "F77 BLAS: ${FP}" + echo "C BLAS: ${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 BLAS 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 BLAS 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 BLAS 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="${NEW_CONFIG_FILE}\nF77_CURRENT=\"${F77_PROFILE}\"" + elif [ -n "${F77_CURRENT}" ] + then + NEW_CONFIG_FILE="${NEW_CONFIG_FILE}\nF77_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/blas-config/files/blas-config-1.0.1 b/sci-libs/blas-config/files/blas-config-1.0.1 new file mode 100644 index 000000000000..cdc613485bba --- /dev/null +++ b/sci-libs/blas-config/files/blas-config-1.0.1 @@ -0,0 +1,357 @@ +#!/bin/bash +# Copyright 1999-2003 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> +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-config/files/blas-config-1.0.1,v 1.1 2006/01/29 16:25:33 blubb Exp $ + +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)/blas +CONFIG_FILE=${PROFILE_PATH}/current + +usage() { + +cat << "USAGE_END" +Usage: blas-config [Option] [BLAS Profile] +Change the current BLAS profile, or give info about profiles. + +Options: + + -p, --print-current-profile + Print currently used BLAS profiles. + + -l, --list-profiles + Print a list of available profiles. + + -c, --set-c-profile + Change/set the C BLAS profile only. + + -f, --set-f77-profile + Change/set the F77 BLAS profile only. + + --cflags + Print compilation flags for the given/current C BLAS + profile. + + --clibs Print flags to link with the BLAS library for the + given/current C BLAS profile. + + --f77libs Print flags to link with the BLAS library for the + given/current F77 BLAS 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 profiles:" + echo "F77 BLAS: ${FP}" + echo "C BLAS: ${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 BLAS 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 BLAS 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 BLAS 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="${NEW_CONFIG_FILE}\nF77_CURRENT=\"${F77_PROFILE}\"" + elif [ -n "${F77_CURRENT}" ] + then + NEW_CONFIG_FILE="${NEW_CONFIG_FILE}\nF77_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/blas-config/files/blas-config-1.0.1.bz2 b/sci-libs/blas-config/files/blas-config-1.0.1.bz2 Binary files differdeleted file mode 100644 index 79b783641685..000000000000 --- a/sci-libs/blas-config/files/blas-config-1.0.1.bz2 +++ /dev/null diff --git a/sci-libs/blas-config/files/blas-config.bz2 b/sci-libs/blas-config/files/blas-config.bz2 Binary files differdeleted file mode 100644 index 8b96d0281ea0..000000000000 --- a/sci-libs/blas-config/files/blas-config.bz2 +++ /dev/null |