diff options
Diffstat (limited to 'x11-libs')
-rw-r--r-- | x11-libs/motif-config/ChangeLog | 10 | ||||
-rw-r--r-- | x11-libs/motif-config/Manifest | 20 | ||||
-rw-r--r-- | x11-libs/motif-config/files/digest-motif-config-0.5 | 0 | ||||
-rw-r--r-- | x11-libs/motif-config/files/digest-motif-config-0.7 (renamed from x11-libs/motif-config/files/digest-motif-config-0.4) | 0 | ||||
-rwxr-xr-x | x11-libs/motif-config/files/motif-config-0.1 | 334 | ||||
-rwxr-xr-x | x11-libs/motif-config/files/motif-config-0.2 | 331 | ||||
-rwxr-xr-x | x11-libs/motif-config/files/motif-config-0.3 | 331 | ||||
-rwxr-xr-x | x11-libs/motif-config/files/motif-config-0.4 | 347 | ||||
-rwxr-xr-x | x11-libs/motif-config/files/motif-config-0.7 (renamed from x11-libs/motif-config/files/motif-config-0.5) | 66 | ||||
-rw-r--r-- | x11-libs/motif-config/motif-config-0.5.ebuild | 52 | ||||
-rw-r--r-- | x11-libs/motif-config/motif-config-0.7.ebuild (renamed from x11-libs/motif-config/motif-config-0.4.ebuild) | 2 |
11 files changed, 46 insertions, 1447 deletions
diff --git a/x11-libs/motif-config/ChangeLog b/x11-libs/motif-config/ChangeLog index a6f5660e0577..4723ff7bf42f 100644 --- a/x11-libs/motif-config/ChangeLog +++ b/x11-libs/motif-config/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for x11-libs/motif-config # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/motif-config/ChangeLog,v 1.10 2005/03/22 16:18:25 lanius Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/motif-config/ChangeLog,v 1.11 2005/03/24 18:26:52 lanius Exp $ + +*motif-config-0.7 (24 Mar 2005) + + 24 Mar 2005; Heinrich Wendel <lanius@gentoo.org> -files/motif-config-0.1, + -files/motif-config-0.2, -files/motif-config-0.3, -files/motif-config-0.4, + -files/motif-config-0.5, +files/motif-config-0.7, -motif-config-0.4.ebuild, + -motif-config-0.5.ebuild, +motif-config-0.7.ebuild: + cleanups; some fixes *motif-config-0.6 (22 Mar 2005) diff --git a/x11-libs/motif-config/Manifest b/x11-libs/motif-config/Manifest index 6975a721307d..f7ce3cec0a26 100644 --- a/x11-libs/motif-config/Manifest +++ b/x11-libs/motif-config/Manifest @@ -1,28 +1,22 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 b75e7517ea7205944b487f54df407287 motif-config-0.4.ebuild 1239 MD5 33bcba9885d6419bbb4e22eed35676ab motif-config-0.6.ebuild 1239 -MD5 11fc204ee998ca57cc764f68274462c8 motif-config-0.5.ebuild 1239 -MD5 52102b1481601078adbafef682589ca6 ChangeLog 2082 +MD5 6a4afb867e5879f7f5e738bfdb52266c ChangeLog 2424 MD5 503ccb1138f9c49f0855884d830988a6 metadata.xml 253 +MD5 b57f5a2346d07273acd7e675d3f5d8cc motif-config-0.7.ebuild 1239 MD5 76af3b1b80127315546ef5ea7f5875e1 files/bindings.tbz2 5342 -MD5 cedbeed369bab9555dd6fda29c8bc4c3 files/motif-config-0.1 6466 -MD5 474ea3ce052f62b920a365f98586b01b files/motif-config-0.2 6298 -MD5 5779611c009207dddfb57fb178e03c46 files/motif-config-0.3 6300 -MD5 d0c6c16eecaccd8f086236778392183d files/motif-config-0.4 6594 -MD5 9a3b03c56fcfe2f39da470e9e5bdddc5 files/motif-config-0.5 7263 MD5 ea7dd0dd1e039ef38db246c23f4d9422 files/motif-config-0.6 7347 +MD5 850befc48daae3dd492f9e263c6dfd4a files/motif-config-0.7 7014 MD5 beb566e653a0a239409d76dc502c87e1 files/system.mwmrc 4358 MD5 aaf04376f7011a2f68b7961100f611fb files/Mwm.defaults 536 MD5 b4cca983e552045606f845e17a00e1d6 files/bitmaps.tbz2 3165 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.4 0 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.5 0 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.6 0 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.7 0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) -iD8DBQFCQEX7evY57Fted3ERAjFvAKDdZ95E1MFtVJX5VgV25yYtopuEiACffdpM -E/7QjPNGa/VdUD3pKlwFTMg= -=Xu40 +iD8DBQFCQwaeevY57Fted3ERAjtnAJ9CdFXcdp5tXD0TCY17yT1zvYF1wACfVnL6 +3bUzXHJS5c3Y3mgLAUhBjAg= +=LHFo -----END PGP SIGNATURE----- diff --git a/x11-libs/motif-config/files/digest-motif-config-0.5 b/x11-libs/motif-config/files/digest-motif-config-0.5 deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/x11-libs/motif-config/files/digest-motif-config-0.5 +++ /dev/null diff --git a/x11-libs/motif-config/files/digest-motif-config-0.4 b/x11-libs/motif-config/files/digest-motif-config-0.7 index e69de29bb2d1..e69de29bb2d1 100644 --- a/x11-libs/motif-config/files/digest-motif-config-0.4 +++ b/x11-libs/motif-config/files/digest-motif-config-0.7 diff --git a/x11-libs/motif-config/files/motif-config-0.1 b/x11-libs/motif-config/files/motif-config-0.1 deleted file mode 100755 index b0f46dccb217..000000000000 --- a/x11-libs/motif-config/files/motif-config-0.1 +++ /dev/null @@ -1,334 +0,0 @@ -#!/bin/bash -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# based on gcc-config by Martin Schlemmer <azarah@gentoo.org -# Author: Heinrich Wendel <lanius@gentoo.org> - -source /etc/init.d/functions.sh || { - echo "$0: Could not source /etc/init.d/functions.sh!" - exit 1 -} -umask 022 - -PROFILE_PATH=/usr/@@LIBDIR@@/motif -CONFIG_FILE=${PROFILE_PATH}/current - -usage() { -cat << "USAGE_END" -Usage: motif-config [option] [profile] -Change the current motif profile, or give info about profiles. - -Options: - - -c, --get-current-profile Print current used motif profile. - - -l, --list-profiles Print a list of available profiles. - - -s, --set-profile Set the current profile. - - -L, --get-lib-path Print path where libraries of the given/current - profile are located. - - -I, --get-inc-path Print path where includes of the given/current - profile are located. - - --libs Print link flags for the given/current - profile. - - --cflags Print compilation flags for the given/current - profile. - - --install Install the given profile. - - --uninstall Uninstall the given profile. - -USAGE_END - exit $1 -} -[[ $# -lt 1 ]] && usage 1 -[[ $# -gt 2 ]] && usage 1 - - -_activate_profile() { - if [[ "$(id -u)" -ne 0 ]] ; then - eerror "$0: Must be root." - exit 1 - fi - - new=${1} - # libs - for file in `ls /usr/@@LIBDIR@@/${new}/`; do - ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/@@LIBDIR@@/${file} - done - # includes - for file in `ls /usr/include/${new}/`; do - ln -s /usr/include/${new}/${file} /usr/include/${file} - done - # binaries - for file in `find /usr/bin/ -name "*-${new}"`; do - ln -s ${file} ${file/-${new}/} - done - # man pages - for file in `find /usr/share/man -regex ".*-${new}\..x?.gz"`; do - ln -s ${file} ${file/-${new}/} - done - - # set new profile as default - rm -f ${CONFIG_FILE} - cat ${PROFILE_PATH}/${new} > ${CONFIG_FILE} -} - -_deactivate_profile() { - if [[ "$(id -u)" -ne 0 ]] ; then - eerror "$0: Must be root." - exit 1 - fi - - current=`cat ${CONFIG_FILE} 2>/dev/null` - - if [ -z "$current" ]; then - exit 0 - fi - - # libs - for file in `ls /usr/@@LIBDIR@@/${current}/`; do - rm -f /usr/@@LIBDIR@@/${file} - done - # includes - for file in `ls /usr/include/${current}/`; do - rm -f /usr/include/${file} - done - # binaries - for file in `find /usr/bin/ -name "*-${current}"`; do - rm -f ${file/-${current}/} - done - # man pages - for file in `find /usr/share/man -regex ".*-${current}\..x?.gz"`; do - rm -f ${file/-${current}/} - done -} - -switch_profile() { - if [[ "$(id -u)" -ne 0 ]] ; then - eerror "$0: Must be root." - exit 1 - fi - - if [ -n "$1" ]; then - if [ ! -e ${PROFILE_PATH}/${1} ]; then - eerror "$0: no such profile ${1}" - else - _deactivate_profile - _activate_profile $1 - fi - else - for x in `ls ${PROFILE_PATH}`; do - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - _deactivate_profile - _activate_profile ${x} - break - fi - done - if [ -z ${x} ]; then - error "$0: no profile to activate" - fi - fi - - einfo "$0: New default Profile is: `cat ${CONFIG_FILE}`" - - exit 0 -} - -get_current_profile() { - cat ${CONFIG_FILE} 2> /dev/null -} - -list_profiles() { - i=1 - for x in `ls ${PROFILE_PATH}`; do - current=`cat ${CONFIG_FILE} 2>/dev/null` - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - output=`cat ${PROFILE_PATH}/${x}`; - output="[${i}] $output"; - if [ "${x}" = "${current}" ]; then - output="${output} *" - fi - echo "$output" - i=$((i + 1)) - fi - done - exit 0 -} - -get_lib_path() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "/usr/@@LIBDIR@@/${name}/" - exit 0 - fi -} - -get_inc_path() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "/usr/include/${name}/" - exit 0 - fi -} - -get_cflags() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "-I/usr/include/${name}/" - exit 0 - fi -} - -get_libs() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "-L/usr/@@LIBDIR@@/${name}/" - exit 0 - fi -} - -install_profile() { - if [[ "$(id -u)" -ne 0 ]] ; then - eerror "$0: Must be root." - exit 1 - fi - - # give info - einfo "$0: Installing Profile: ${1}" - - # create profile - echo ${1} > ${PROFILE_PATH}/${1} - - # make it default if no profile is activated - # or if it was just removed - if [ ! -e $CONFIG_FILE -o "${1}" == "`cat ${PROFILE_PATH}/removed 2>/dev/null`" ]; then - rm -f ${PROFILE_PATH}/removed - switch_profile ${1} - fi - - exit 0 -} - -uninstall_profile() { - if [[ "$(id -u)" -ne 0 ]] ; then - eerror "$0: Must be root." - exit 1 - fi - - # give info - einfo "$0: Uninstalling Profile: ${1}" - - # remove profile - rm -f ${PROFILE_PATH}/${1} 2> /dev/null - - # cache which profile was removed for upgrades - # little hack, because portage has no way - # to detect if a package was upgraded - - # activate next profile if non is activated - if [ "`cat $CONFIG_FILE`" == "${1}" ]; then - echo "${1}" > "${PROFILE_PATH}/removed" - switch_profile - fi - - exit 0 -} - -for x in "$@"; do - case "${x}" in - -c|--get-current-profile) - [[ $# -ne 1 ]] && usage 1 - get_current_profile - ;; - - -l|--list-profiles) - [[ $# -ne 1 ]] && usage 1 - list_profiles - ;; - - -s|--set-profile) - [[ $# -ne 2 ]] && usage 1 - switch_profile $2 - ;; - - -L|--get-lib-path) - [[ $# -gt 2 ]] && usage 1 - get_lib_path $2 - ;; - - -I|--get-inc-path) - [[ $# -gt 2 ]] && usage 1 - get_lib_path $2 - ;; - - --cflags) - [[ $# -gt 2 ]] && usage 1 - get_cflags $2 - ;; - - --libs) - [[ $# -gt 2 ]] && usage 1 - get_libs $2 - ;; - - --install) - [[ $# -ne 2 ]] && usage 1 - install_profile $2 - ;; - - --uninstall) - [[ $# -ne 2 ]] && usage 1 - uninstall_profile $2 - ;; - - -h|--help) - usage 0 - ;; - - -v|--version) - echo "motif-config-0.1" - ;; - - -*) - usage 1 - ;; - - *) - usage 1 - ;; - - esac -done diff --git a/x11-libs/motif-config/files/motif-config-0.2 b/x11-libs/motif-config/files/motif-config-0.2 deleted file mode 100755 index 3936a7bf7e35..000000000000 --- a/x11-libs/motif-config/files/motif-config-0.2 +++ /dev/null @@ -1,331 +0,0 @@ -#!/bin/bash -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# based on gcc-config by Martin Schlemmer <azarah@gentoo.org -# Author: Heinrich Wendel <lanius@gentoo.org> - -source /etc/init.d/functions.sh || { - echo "$0: Could not source /etc/init.d/functions.sh!" - exit 1 -} -umask 022 - -PROFILE_PATH=/usr/@@LIBDIR@@/motif -CONFIG_FILE=${PROFILE_PATH}/current - -usage() { -cat << "USAGE_END" -Usage: motif-config [option] [profile] -Change the current motif profile, or give info about profiles. - -Options: - - -c, --get-current-profile Print current used motif profile. - - -l, --list-profiles Print a list of available profiles. - - -s, --set-profile Set the current profile. - - -L, --get-lib-path Print path where libraries of the given/current - profile are located. - - -I, --get-inc-path Print path where includes of the given/current - profile are located. - - --libs Print link flags for the given/current - profile. - - --cflags Print compilation flags for the given/current - profile. - - --install Install the given profile. - - --uninstall Uninstall the given profile. - -USAGE_END - exit $1 -} -[[ $# -lt 1 ]] && usage 1 -[[ $# -gt 2 ]] && usage 1 - -_check_root() { - if [[ "$(id -u)" -ne 0 ]] ; then - eerror "$0: Must be root." - exit 1 - fi -} - -_activate_profile() { - _check_root - - new=${1} - # libs - for file in `ls /usr/@@LIBDIR@@/${new}/`; do - ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/@@LIBDIR@@/${file} - done - # includes - for file in `ls /usr/include/${new}/`; do - ln -s /usr/include/${new}/${file} /usr/include/${file} - done - # binaries - for file in `find /usr/bin/ -name "*-${new}"`; do - ln -s ${file} ${file/-${new}/} - done - # man pages - for file in `find /usr/share/man -regex ".*-${new}\..x?.gz"`; do - ln -s ${file} ${file/-${new}/} - done - - # set new profile as default - rm -f ${CONFIG_FILE} - cat ${PROFILE_PATH}/${new} > ${CONFIG_FILE} - - return $? -} - -_deactivate_profile() { - _check_root - - current=`cat ${CONFIG_FILE} 2>/dev/null` - - if [ -z "$current" ]; then - return 0 - fi - - # libs - for file in `ls /usr/@@LIBDIR@@/${current}/`; do - rm -f /usr/@@LIBDIR@@/${file} - done - # includes - for file in `ls /usr/include/${current}/`; do - rm -f /usr/include/${file} - done - # binaries - for file in `find /usr/bin/ -name "*-${current}"`; do - rm -f ${file/-${current}/} - done - # man pages - for file in `find /usr/share/man -regex ".*-${current}\..x?.gz"`; do - rm -f ${file/-${current}/} - done - - return $? -} - -switch_profile() { - _check_root - - if [ -n "$1" ]; then - if [ ! -e ${PROFILE_PATH}/${1} ]; then - eerror "$0: no such profile ${1}" - else - _deactivate_profile - _activate_profile $1 - fi - else - for x in `ls ${PROFILE_PATH}`; do - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - _deactivate_profile - _activate_profile ${x} - break - fi - done - if [ -z ${x} ]; then - error "$0: no profile to activate" - fi - fi - - einfo "$0: New default Profile is: `cat ${CONFIG_FILE}`" - - return $? -} - -get_current_profile() { - cat ${CONFIG_FILE} 2> /dev/null -} - -list_profiles() { - i=1 - for x in `ls ${PROFILE_PATH}`; do - current=`cat ${CONFIG_FILE} 2>/dev/null` - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - output=`cat ${PROFILE_PATH}/${x}`; - output="[${i}] $output"; - if [ "${x}" = "${current}" ]; then - output="${output} *" - fi - echo "$output" - i=$((i + 1)) - fi - done - exit $? -} - -get_lib_path() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "/usr/@@LIBDIR@@/${name}/" - exit 0 - fi -} - -get_inc_path() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "/usr/include/${name}/" - exit 0 - fi -} - -get_cflags() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "-I/usr/include/${name}/" - exit 0 - fi -} - -get_libs() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "-L/usr/@@LIBDIR@@/${name}/" - exit 0 - fi -} - -install_profile() { - _check_root - - # give info - einfo "$0: Installing Profile: ${1}" - - # create profile - echo ${1} > ${PROFILE_PATH}/${1} - - # make it default if no profile is activated - # or if it was just removed - if [ ! -e $CONFIG_FILE -o "${1}" == "`cat ${PROFILE_PATH}/removed 2>/dev/null`" ]; then - rm -f ${PROFILE_PATH}/removed - switch_profile ${1} - fi - - exit $? -} - -uninstall_profile() { - _check_root - - # give info - einfo "$0: Uninstalling Profile: ${1}" - - # remove profile - rm -f ${PROFILE_PATH}/${1} 2> /dev/null - - # cache which profile was removed for upgrades - # little hack, because portage has no way - # to detect if a package was upgraded - - # activate next profile if non is activated - if [ "`cat $CONFIG_FILE`" == "${1}" ]; then - echo "${1}" > "${PROFILE_PATH}/removed" - switch_profile - fi - - exit $? -} - -for x in "$@"; do - case "${x}" in - -c|--get-current-profile) - [[ $# -ne 1 ]] && usage 1 - get_current_profile - ;; - - -l|--list-profiles) - [[ $# -ne 1 ]] && usage 1 - list_profiles - ;; - - -s|--set-profile) - [[ $# -ne 2 ]] && usage 1 - switch_profile $2 - exit $? - ;; - - -L|--get-lib-path) - [[ $# -gt 2 ]] && usage 1 - get_lib_path $2 - ;; - - -I|--get-inc-path) - [[ $# -gt 2 ]] && usage 1 - get_lib_path $2 - ;; - - --cflags) - [[ $# -gt 2 ]] && usage 1 - get_cflags $2 - ;; - - --libs) - [[ $# -gt 2 ]] && usage 1 - get_libs $2 - ;; - - --install) - [[ $# -ne 2 ]] && usage 1 - install_profile $2 - ;; - - --uninstall) - [[ $# -ne 2 ]] && usage 1 - uninstall_profile $2 - ;; - - -h|--help) - usage 0 - ;; - - -v|--version) - echo "motif-config-0.1" - exit 0 - ;; - - -*) - usage 1 - ;; - - *) - usage 1 - ;; - - esac -done diff --git a/x11-libs/motif-config/files/motif-config-0.3 b/x11-libs/motif-config/files/motif-config-0.3 deleted file mode 100755 index 3937a5b69325..000000000000 --- a/x11-libs/motif-config/files/motif-config-0.3 +++ /dev/null @@ -1,331 +0,0 @@ -#!/bin/bash -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# based on gcc-config by Martin Schlemmer <azarah@gentoo.org -# Author: Heinrich Wendel <lanius@gentoo.org> - -source /etc/init.d/functions.sh || { - echo "$0: Could not source /etc/init.d/functions.sh!" - exit 1 -} -umask 022 - -PROFILE_PATH=/usr/@@LIBDIR@@/motif -CONFIG_FILE=${PROFILE_PATH}/current - -usage() { -cat << "USAGE_END" -Usage: motif-config [option] [profile] -Change the current motif profile, or give info about profiles. - -Options: - - -c, --get-current-profile Print current used motif profile. - - -l, --list-profiles Print a list of available profiles. - - -s, --set-profile Set the current profile. - - -L, --get-lib-path Print path where libraries of the given/current - profile are located. - - -I, --get-inc-path Print path where includes of the given/current - profile are located. - - --libs Print link flags for the given/current - profile. - - --cflags Print compilation flags for the given/current - profile. - - --install Install the given profile. - - --uninstall Uninstall the given profile. - -USAGE_END - exit $1 -} -[[ $# -lt 1 ]] && usage 1 -[[ $# -gt 2 ]] && usage 1 - -_check_root() { - if [[ "$(id -u)" -ne 0 ]] ; then - eerror "$0: Must be root." - exit 1 - fi -} - -_activate_profile() { - _check_root - - new=${1} - # libs - for file in `ls /usr/@@LIBDIR@@/${new}/`; do - ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/@@LIBDIR@@/${file} - done - # includes - for file in `ls /usr/include/${new}/`; do - ln -s /usr/include/${new}/${file} /usr/include/${file} - done - # binaries - for file in `ls /usr/share/${new}`; do - ln -s /usr/share/${new}/${file} /usr/bin/${file} - done - # man pages - for file in `find /usr/share/man -regex ".*-${new}\..x?.gz"`; do - ln -s ${file} ${file/-${new}/} - done - - # set new profile as default - rm -f ${CONFIG_FILE} - cat ${PROFILE_PATH}/${new} > ${CONFIG_FILE} - - return $? -} - -_deactivate_profile() { - _check_root - - current=`cat ${CONFIG_FILE} 2>/dev/null` - - if [ -z "$current" ]; then - return 0 - fi - - # libs - for file in `ls /usr/@@LIBDIR@@/${current}/`; do - rm -f /usr/@@LIBDIR@@/${file} - done - # includes - for file in `ls /usr/include/${current}/`; do - rm -f /usr/include/${file} - done - # binaries - for file in `ls /usr/share/${current}`; do - rm -f /usr/bin/${file} - done - # man pages - for file in `find /usr/share/man -regex ".*-${current}\..x?.gz"`; do - rm -f ${file/-${current}/} - done - - return $? -} - -switch_profile() { - _check_root - - if [ -n "$1" ]; then - if [ ! -e ${PROFILE_PATH}/${1} ]; then - eerror "$0: no such profile ${1}" - else - _deactivate_profile - _activate_profile $1 - fi - else - for x in `ls ${PROFILE_PATH} | sort -r`; do - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - _deactivate_profile - _activate_profile ${x} - break - fi - done - if [ -z ${x} ]; then - error "$0: no profile to activate" - fi - fi - - einfo "$0: New default Profile is: `cat ${CONFIG_FILE}`" - - return $? -} - -get_current_profile() { - cat ${CONFIG_FILE} 2> /dev/null -} - -list_profiles() { - i=1 - for x in `ls ${PROFILE_PATH}`; do - current=`cat ${CONFIG_FILE} 2>/dev/null` - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - output=`cat ${PROFILE_PATH}/${x}`; - output="[${i}] $output"; - if [ "${x}" = "${current}" ]; then - output="${output} *" - fi - echo "$output" - i=$((i + 1)) - fi - done - exit $? -} - -get_lib_path() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "/usr/@@LIBDIR@@/${name}/" - exit 0 - fi -} - -get_inc_path() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "/usr/include/${name}/" - exit 0 - fi -} - -get_cflags() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "-I/usr/include/${name}/" - exit 0 - fi -} - -get_libs() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - else - echo "-L/usr/@@LIBDIR@@/${name}/" - exit 0 - fi -} - -install_profile() { - _check_root - - # give info - einfo "$0: Installing Profile: ${1}" - - # create profile - echo ${1} > ${PROFILE_PATH}/${1} - - # make it default if no profile is activated - # or if it was just removed - if [ ! -e $CONFIG_FILE -o "${1}" == "`cat ${PROFILE_PATH}/removed 2>/dev/null`" ]; then - rm -f ${PROFILE_PATH}/removed - switch_profile ${1} - fi - - exit $? -} - -uninstall_profile() { - _check_root - - # give info - einfo "$0: Uninstalling Profile: ${1}" - - # remove profile - rm -f ${PROFILE_PATH}/${1} 2> /dev/null - - # cache which profile was removed for upgrades - # little hack, because portage has no way - # to detect if a package was upgraded - - # activate next profile if non is activated - if [ "`cat $CONFIG_FILE`" == "${1}" ]; then - echo "${1}" > "${PROFILE_PATH}/removed" - switch_profile - fi - - exit $? -} - -for x in "$@"; do - case "${x}" in - -c|--get-current-profile) - [[ $# -ne 1 ]] && usage 1 - get_current_profile - ;; - - -l|--list-profiles) - [[ $# -ne 1 ]] && usage 1 - list_profiles - ;; - - -s|--set-profile) - [[ $# -ne 2 ]] && usage 1 - switch_profile $2 - exit $? - ;; - - -L|--get-lib-path) - [[ $# -gt 2 ]] && usage 1 - get_lib_path $2 - ;; - - -I|--get-inc-path) - [[ $# -gt 2 ]] && usage 1 - get_inc_path $2 - ;; - - --cflags) - [[ $# -gt 2 ]] && usage 1 - get_cflags $2 - ;; - - --libs) - [[ $# -gt 2 ]] && usage 1 - get_libs $2 - ;; - - --install) - [[ $# -ne 2 ]] && usage 1 - install_profile $2 - ;; - - --uninstall) - [[ $# -ne 2 ]] && usage 1 - uninstall_profile $2 - ;; - - -h|--help) - usage 0 - ;; - - -v|--version) - echo "motif-config-0.1" - exit 0 - ;; - - -*) - usage 1 - ;; - - *) - usage 1 - ;; - - esac -done diff --git a/x11-libs/motif-config/files/motif-config-0.4 b/x11-libs/motif-config/files/motif-config-0.4 deleted file mode 100755 index 4533c678b9dc..000000000000 --- a/x11-libs/motif-config/files/motif-config-0.4 +++ /dev/null @@ -1,347 +0,0 @@ -#!/bin/bash -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# based on gcc-config by Martin Schlemmer <azarah@gentoo.org -# Author: Heinrich Wendel <lanius@gentoo.org> - -umask 022 - -PROFILE_PATH=/usr/@@LIBDIR@@/motif -CONFIG_FILE=${PROFILE_PATH}/current - -usage() { -cat << "USAGE_END" -Usage: motif-config [option] [profile] -Change the current motif profile, or give info about profiles. - -Options: - - -c, --get-current-profile Print current used motif profile. - - -l, --list-profiles Print a list of available profiles. - - -s, --set-profile Set the current profile. - - -L, --get-lib-path Print path where libraries of the given/current - profile are located. - - -I, --get-inc-path Print path where includes of the given/current - profile are located. - - --libs Print link flags for the given/current - profile. - - --cflags Print compilation flags for the given/current - profile. - - --install Install the given profile. - - --uninstall Uninstall the given profile. - -USAGE_END - exit $1 -} -[[ $# -lt 1 ]] && usage 1 -[[ $# -gt 2 ]] && usage 1 - -# redefine eerror/einfo to remove baselayout dep -# to make ppc-macos people happy -eerror() { - echo -e " \e[31;01m*\e[0m $*"; -} -einfo() { - echo -e " \e[32;01m*\e[0m $*"; -} - -_check_root() { - if [[ "$(id -u)" -ne 0 ]] ; then - eerror "$0: Must be root." - exit 1 - fi -} - -_activate_profile() { - _check_root - - new=${1} - # libs - for file in `ls /usr/@@LIBDIR@@/${new}/ | grep lib`; do - ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/@@LIBDIR@@/${file} - done - # includes - for file in `ls /usr/include/${new}/`; do - ln -s /usr/include/${new}/${file} /usr/include/${file} - done - # binaries - for file in `ls /usr/@@LIBDIR@@/${new} | grep -v lib`; do - ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/bin/${file} - done - # man pages - for file in `find /usr/share/man -regex ".*-${new}\..x?.gz"`; do - ln -s ${file} ${file/-${new}/} - done - - # set new profile as default - rm -f ${CONFIG_FILE} - cat ${PROFILE_PATH}/${new} > ${CONFIG_FILE} - - return $? -} - -_deactivate_profile() { - _check_root - - current=`cat ${CONFIG_FILE} 2>/dev/null` - - if [ -z "$current" ]; then - return 0 - fi - - # libs - for file in `ls /usr/@@LIBDIR@@/${current} | grep lib`; do - rm -f /usr/@@LIBDIR@@/${file} - done - # includes - for file in `ls /usr/include/${current}/`; do - rm -f /usr/include/${file} - done - # binaries - for file in `ls /usr/@@LIBDIR@@/${current} | grep -v lib`; do - rm -f /usr/bin/${file} - done - # man pages - for file in `find /usr/share/man -regex ".*-${current}\..x?.gz"`; do - rm -f ${file/-${current}/} - done - - return $? -} - -switch_profile() { - _check_root - - if [ -n "$1" ]; then - if [ ! -e ${PROFILE_PATH}/${1} ]; then - eerror "$0: no such profile ${1}" - exit 1 - else - _deactivate_profile - _activate_profile $1 - fi - else - for x in `ls ${PROFILE_PATH} | sort -r`; do - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - _deactivate_profile - _activate_profile ${x} - break - fi - done - if [ -z ${x} ]; then - error "$0: no profile to activate" - fi - fi - - einfo "$0: New default Profile is: `cat ${CONFIG_FILE}`" - - return $? -} - -get_current_profile() { - cat ${CONFIG_FILE} 2> /dev/null -} - -list_profiles() { - i=1 - for x in `ls ${PROFILE_PATH}`; do - current=`cat ${CONFIG_FILE} 2>/dev/null` - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - output=`cat ${PROFILE_PATH}/${x}`; - output="[${i}] $output"; - if [ "${x}" = "${current}" ]; then - output="${output} *" - fi - echo "$output" - i=$((i + 1)) - fi - done - exit $? -} - -get_lib_path() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - exit 1 - else - echo "/usr/@@LIBDIR@@/${name}/" - exit 0 - fi -} - -get_inc_path() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - exit 1 - else - echo "/usr/include/${name}/" - exit 0 - fi -} - -get_cflags() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - exit 1 - else - echo "-I/usr/include/${name}/" - exit 0 - fi -} - -get_libs() { - if [ "$1" != "" ]; then - profile=${1} - else - profile="current" - fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` - if [ $? -eq 1 ]; then - eerror "$0: No such profile: $profile" - exit 1 - else - echo "-L/usr/@@LIBDIR@@/${name}/" - exit 0 - fi -} - -install_profile() { - _check_root - - # give info - einfo "$0: Installing Profile: ${1}" - - # create profile - echo ${1} > ${PROFILE_PATH}/${1} - - # create env.d entry - echo "LDPATH=/usr/lib/${1}" > /etc/env.d/15${1} - - # make it default if no profile is activated - # or if it was just removed - if [ ! -e $CONFIG_FILE -o "${1}" == "`cat ${PROFILE_PATH}/removed 2>/dev/null`" ]; then - rm -f ${PROFILE_PATH}/removed - switch_profile ${1} - fi - - exit $? -} - -uninstall_profile() { - _check_root - - # give info - einfo "$0: Uninstalling Profile: ${1}" - - # remove profile - rm -f ${PROFILE_PATH}/${1} 2> /dev/null - - # remove env.d entry - rm -f /etc/env.d/15${1} - - # cache which profile was removed for upgrades - # little hack, because portage has no way - # to detect if a package was upgraded - - # activate next profile if non is activated - if [ "`cat $CONFIG_FILE`" == "${1}" ]; then - echo "${1}" > "${PROFILE_PATH}/removed" - switch_profile - fi - - exit $? -} - -for x in "$@"; do - case "${x}" in - -c|--get-current-profile) - [[ $# -ne 1 ]] && usage 1 - get_current_profile - ;; - - -l|--list-profiles) - [[ $# -ne 1 ]] && usage 1 - list_profiles - ;; - - -s|--set-profile) - [[ $# -ne 2 ]] && usage 1 - switch_profile $2 - exit $? - ;; - - -L|--get-lib-path) - [[ $# -gt 2 ]] && usage 1 - get_lib_path $2 - ;; - - -I|--get-inc-path) - [[ $# -gt 2 ]] && usage 1 - get_inc_path $2 - ;; - - --cflags) - [[ $# -gt 2 ]] && usage 1 - get_cflags $2 - ;; - - --libs) - [[ $# -gt 2 ]] && usage 1 - get_libs $2 - ;; - - --install) - [[ $# -ne 2 ]] && usage 1 - install_profile $2 - ;; - - --uninstall) - [[ $# -ne 2 ]] && usage 1 - uninstall_profile $2 - ;; - - -h|--help) - usage 0 - ;; - - -v|--version) - echo "motif-config-0.1" - exit 0 - ;; - - -*) - usage 1 - ;; - - *) - usage 1 - ;; - - esac -done diff --git a/x11-libs/motif-config/files/motif-config-0.5 b/x11-libs/motif-config/files/motif-config-0.7 index 0d834fc84100..0db2ad946308 100755 --- a/x11-libs/motif-config/files/motif-config-0.5 +++ b/x11-libs/motif-config/files/motif-config-0.7 @@ -40,7 +40,7 @@ Options: --start-install Start installation of new Motif version - --finish-install Finish installation of new Motif version + --finish-install Finish installation of new Motif version USAGE_END exit $1 @@ -52,6 +52,7 @@ USAGE_END # to make ppc-macos people happy eerror() { echo -e " \e[31;01m*\e[0m $*"; + exit 1 } einfo() { echo -e " \e[32;01m*\e[0m $*"; @@ -86,7 +87,6 @@ _activate_profile() { done # set new profile as default - rm -f ${CONFIG_FILE} cat ${PROFILE_PATH}/${new} > ${CONFIG_FILE} return $? @@ -118,6 +118,8 @@ _deactivate_profile() { rm -f ${file/-${current}/} done + rm -f ${CONFIG_FILE} + return $? } @@ -127,21 +129,19 @@ switch_profile() { if [ -n "$1" ]; then if [ ! -e ${PROFILE_PATH}/${1} ]; then eerror "$0: no such profile ${1}" - exit 1 else _deactivate_profile _activate_profile $1 fi else - for x in `ls ${PROFILE_PATH} | sort -r`; do - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - _deactivate_profile - _activate_profile ${x} - break - fi + for y in `ls ${PROFILE_PATH} | grep -v removed | grep -v current | sort -r`; do + _deactivate_profile + _activate_profile ${y} + break done - if [ -z ${x} ]; then - error "$0: no profile to activate" + if [ -z "${y}" ]; then + _deactivate_profile + eerror "$0: no profile to activate" fi fi @@ -156,17 +156,15 @@ get_current_profile() { list_profiles() { i=1 - for x in `ls ${PROFILE_PATH}`; do - current=`cat ${CONFIG_FILE} 2>/dev/null` - if [ "${x}" != "current" -a "${x}" != "removed" ]; then - output=`cat ${PROFILE_PATH}/${x}`; - output="[${i}] $output"; - if [ "${x}" = "${current}" ]; then - output="${output} *" - fi - echo "$output" - i=$((i + 1)) + current=`cat ${CONFIG_FILE} 2>/dev/null` + for x in `ls ${PROFILE_PATH} | grep -v current | grep -v removed`; do + output=`cat ${PROFILE_PATH}/${y}`; + output="[${i}] $output"; + if [ "${y}" = "${current}" ]; then + output="${output} *" fi + echo "$output" + i=$((i + 1)) done exit $? } @@ -180,7 +178,6 @@ get_lib_path() { name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` if [ $? -eq 1 ]; then eerror "$0: No such profile: $profile" - exit 1 else echo "/usr/@@LIBDIR@@/${name}/" exit 0 @@ -196,7 +193,6 @@ get_inc_path() { name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` if [ $? -eq 1 ]; then eerror "$0: No such profile: $profile" - exit 1 else echo "/usr/include/${name}/" exit 0 @@ -212,7 +208,6 @@ get_cflags() { name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` if [ $? -eq 1 ]; then eerror "$0: No such profile: $profile" - exit 1 else echo "-I/usr/include/${name}/" exit 0 @@ -228,7 +223,6 @@ get_libs() { name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` if [ $? -eq 1 ]; then eerror "$0: No such profile: $profile" - exit 1 else echo "-L/usr/@@LIBDIR@@/${name}/" exit 0 @@ -248,9 +242,7 @@ install_profile() { echo "LDPATH=/usr/lib/${1}" > /etc/env.d/15${1} # make it default if no profile is activated - # or if it was just removed - if [ ! -e $CONFIG_FILE -o "${1}" == "`cat ${PROFILE_PATH}/removed 2>/dev/null`" ]; then - rm -f ${PROFILE_PATH}/removed + if [ ! -e $CONFIG_FILE ]; then switch_profile ${1} fi @@ -269,13 +261,8 @@ uninstall_profile() { # remove env.d entry rm -f /etc/env.d/15${1} - # cache which profile was removed for upgrades - # little hack, because portage has no way - # to detect if a package was upgraded - # activate next profile if non is activated if [ "`cat $CONFIG_FILE`" == "${1}" ]; then - echo "${1}" > "${PROFILE_PATH}/removed" switch_profile fi @@ -286,16 +273,21 @@ start_installation() { einfo "Starting installation of a new motif version." einfo "Note: You can't use any motif app during this process." - cat ${CONFIG_FILE} > ${PROFILE_PATH}/removed + if [ -f ${CONFIG_FILE} ]; then + cat ${CONFIG_FILE} > ${PROFILE_PATH}/removed - _deactivate_profile + _deactivate_profile + fi } finish_installation() { einfo "Finishing installation." einfo "Note: You can now use your motif apps again." - _activate_profile `cat ${PROFILE_PATH}/removed` + if [ -f ${PROFILE_PATH}/removed ]; then + _activate_profile `cat ${PROFILE_PATH}/removed` + rm -f ${PROFILE_PATH}/removed + fi } for x in "$@"; do @@ -361,7 +353,7 @@ for x in "$@"; do ;; -v|--version) - echo "motif-config-0.1" + echo "motif-config-0.7" exit 0 ;; diff --git a/x11-libs/motif-config/motif-config-0.5.ebuild b/x11-libs/motif-config/motif-config-0.5.ebuild deleted file mode 100644 index 9ae7c0218f17..000000000000 --- a/x11-libs/motif-config/motif-config-0.5.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/motif-config/motif-config-0.5.ebuild,v 1.1 2005/03/14 13:57:36 lanius Exp $ - -inherit multilib - -DESCRIPTION="Utility to change the default Motif library" -HOMEPAGE="http://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~ppc-macos ~sparc ~x86" -IUSE="" - -DEPEND="" - -RDEPEND="app-shells/bash" - -src_unpack(){ - einfo "nothing to unpack" -} - -src_compile() { - einfo "nothing to compile" -} - -src_install () { - exeinto /usr/bin - newexe ${FILESDIR}/${P} motif-config - dosed "s:@@LIBDIR@@:$(get_libdir):g" /usr/bin/motif-config - - # for profile - dodir /usr/$(get_libdir)/motif - keepdir /usr/$(get_libdir)/motif - - # bitmaps - dodir /usr/include/X11/bitmaps - tar -xjf ${FILESDIR}/bitmaps.tbz2 -C ${D}/usr/include/X11/bitmaps - # bindings - dodir /usr/$(get_libdir)/X11/bindings - tar -xjf ${FILESDIR}/bindings.tbz2 -C ${D}/usr/$(get_libdir)/X11/bindings - - # mwm default config - insinto /etc/X11/app-defaults - doins ${FILESDIR}/Mwm.defaults - - insinto /etc/X11/mwm - doins ${FILESDIR}/system.mwmrc - - dosym /etc/X11/mwm /usr/$(get_libdir)/X11/mwm -} diff --git a/x11-libs/motif-config/motif-config-0.4.ebuild b/x11-libs/motif-config/motif-config-0.7.ebuild index 78e73e75c366..d4c66769f15f 100644 --- a/x11-libs/motif-config/motif-config-0.4.ebuild +++ b/x11-libs/motif-config/motif-config-0.7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/motif-config/motif-config-0.4.ebuild,v 1.2 2005/03/07 19:46:42 lanius Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/motif-config/motif-config-0.7.ebuild,v 1.1 2005/03/24 18:26:53 lanius Exp $ inherit multilib |