diff options
author | Heinrich Wendel <lanius@gentoo.org> | 2006-02-20 10:24:02 +0000 |
---|---|---|
committer | Heinrich Wendel <lanius@gentoo.org> | 2006-02-20 10:24:02 +0000 |
commit | 51400605c6bb5dbf47d48e8b88f1e8399bb741e1 (patch) | |
tree | 94d9005b4cc4e16ab4ddf533a87c8d2464121049 | |
parent | Version bump. Also install documentation and hxascdmp utility. (diff) | |
download | historical-51400605c6bb5dbf47d48e8b88f1e8399bb741e1.tar.gz historical-51400605c6bb5dbf47d48e8b88f1e8399bb741e1.tar.bz2 historical-51400605c6bb5dbf47d48e8b88f1e8399bb741e1.zip |
bug #123226; add proper return codes; fix previsouly broken motif installations
Package-Manager: portage-2.1_pre4-r1
-rw-r--r-- | x11-libs/motif-config/ChangeLog | 11 | ||||
-rw-r--r-- | x11-libs/motif-config/Manifest | 36 | ||||
-rw-r--r-- | x11-libs/motif-config/files/digest-motif-config-0.10 (renamed from x11-libs/motif-config/files/digest-motif-config-0.6) | 0 | ||||
-rw-r--r-- | x11-libs/motif-config/files/digest-motif-config-0.7 | 0 | ||||
-rw-r--r-- | x11-libs/motif-config/files/digest-motif-config-0.8 | 0 | ||||
-rwxr-xr-x | x11-libs/motif-config/files/motif-config-0.10 (renamed from x11-libs/motif-config/files/motif-config-0.8) | 220 | ||||
-rwxr-xr-x | x11-libs/motif-config/files/motif-config-0.6 | 381 | ||||
-rwxr-xr-x | x11-libs/motif-config/files/motif-config-0.7 | 369 | ||||
-rw-r--r-- | x11-libs/motif-config/motif-config-0.10.ebuild | 97 | ||||
-rw-r--r-- | x11-libs/motif-config/motif-config-0.6.ebuild | 52 | ||||
-rw-r--r-- | x11-libs/motif-config/motif-config-0.7.ebuild | 52 | ||||
-rw-r--r-- | x11-libs/motif-config/motif-config-0.8.ebuild | 52 |
12 files changed, 194 insertions, 1076 deletions
diff --git a/x11-libs/motif-config/ChangeLog b/x11-libs/motif-config/ChangeLog index 020795b7d1ed..789f5d289ba0 100644 --- a/x11-libs/motif-config/ChangeLog +++ b/x11-libs/motif-config/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for x11-libs/motif-config # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/motif-config/ChangeLog,v 1.21 2006/02/16 19:43:19 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/motif-config/ChangeLog,v 1.22 2006/02/20 10:24:02 lanius Exp $ + +*motif-config-0.10 (20 Feb 2006) + + 20 Feb 2006; Heinrich Wendel <lanius@gentoo.org> -files/motif-config-0.6, + -files/motif-config-0.7, -files/motif-config-0.8, + +files/motif-config-0.10, -motif-config-0.6.ebuild, + -motif-config-0.7.ebuild, -motif-config-0.8.ebuild, + +motif-config-0.10.ebuild: + bug #123226; add proper return codes; fix previsouly broken motif installations 16 Feb 2006; Fabian Groffen <grobian@gentoo.org> motif-config-0.9.ebuild: Marked ppc-macos stable (bug #114234) diff --git a/x11-libs/motif-config/Manifest b/x11-libs/motif-config/Manifest index b25cf870cd7e..9c356b1e3b66 100644 --- a/x11-libs/motif-config/Manifest +++ b/x11-libs/motif-config/Manifest @@ -10,27 +10,15 @@ SHA256 055c08424303759c9c511558629024b5f7a971407f8d1af707e3a14c77746824 files/bi MD5 b4cca983e552045606f845e17a00e1d6 files/bitmaps.tbz2 3165 RMD160 9acb56e5ed85858f2d8aa70ee188238a8730a0a9 files/bitmaps.tbz2 3165 SHA256 987ef7c1cce28b9c034fb759e37ef4dbe9dc55415d01dc09a8c88624bd0b233f files/bitmaps.tbz2 3165 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.6 0 -RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-motif-config-0.6 0 -SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-motif-config-0.6 0 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.7 0 -RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-motif-config-0.7 0 -SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-motif-config-0.7 0 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.8 0 -RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-motif-config-0.8 0 -SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-motif-config-0.8 0 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.10 0 +RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-motif-config-0.10 0 +SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-motif-config-0.10 0 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.9 0 RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-motif-config-0.9 0 SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-motif-config-0.9 0 -MD5 ea7dd0dd1e039ef38db246c23f4d9422 files/motif-config-0.6 7347 -RMD160 eb5f5505a932bb54cacc751df1c439964db9a7fd files/motif-config-0.6 7347 -SHA256 aa3117c45d05fa21045bdeaab474e8db232f649aa0464ded24519ff0bf421bea files/motif-config-0.6 7347 -MD5 850befc48daae3dd492f9e263c6dfd4a files/motif-config-0.7 7014 -RMD160 eebbb6d5f67d8857bd4d37a42f759762cb2d2cf9 files/motif-config-0.7 7014 -SHA256 16b184d908753e342e03fc5da2a88881ae2f310bf1b8bab86805d8134425d2d7 files/motif-config-0.7 7014 -MD5 a4ba585f1a15d0800a1906e20659c1ce files/motif-config-0.8 7166 -RMD160 78c65a30caff69b4586b0e8470c592a844e4da17 files/motif-config-0.8 7166 -SHA256 7d5a169bd4237db7315b119d28d5e0eb9b89e382728b281bc03fcf1e1084c807 files/motif-config-0.8 7166 +MD5 43e7467b8a6d79105b1fd048aa9b6ff1 files/motif-config-0.10 5987 +RMD160 5cad4a4ca3aa62e9bcc1ec4452cff9d2e04513b5 files/motif-config-0.10 5987 +SHA256 eba5f648060880e601b18bd34b36910018f78a1503b3b32dc2baac413d8555cb files/motif-config-0.10 5987 MD5 3a565c0fb8345038591f50aa943aed1b files/motif-config-0.9 5403 RMD160 bde84c5a893842cfe6e583896d466221435fe63a files/motif-config-0.9 5403 SHA256 7ad2dee9997c3ca4cf15a2171b3f950718177dc401d2d1673a588e8da75d5cc0 files/motif-config-0.9 5403 @@ -40,15 +28,9 @@ SHA256 b1c16bd2cf04ecd9183309e404f723444567e6b4582ed95bd74c9cc50f3c5835 files/sy MD5 503ccb1138f9c49f0855884d830988a6 metadata.xml 253 RMD160 bfa92d311ac4e8cc9a2190f578925f333ae096a8 metadata.xml 253 SHA256 8e0389110e0cd8cc331b484cde34c22dd93f9f49df16c2263eea4d8e84093976 metadata.xml 253 -MD5 33bcba9885d6419bbb4e22eed35676ab motif-config-0.6.ebuild 1239 -RMD160 dd176eee9d228a677f65bc1a02e4b407ef03da09 motif-config-0.6.ebuild 1239 -SHA256 ac6b6bc37f39f5379253152e194b0184d0e1bd2032a14568615bfe84b50509ee motif-config-0.6.ebuild 1239 -MD5 b57f5a2346d07273acd7e675d3f5d8cc motif-config-0.7.ebuild 1239 -RMD160 7b38df6849e7bb655fff98327c4fb6d2b84feed3 motif-config-0.7.ebuild 1239 -SHA256 cac8a58e52e0de86a606bca269bd5737deb27f025754fcc7182141b16ebc7f99 motif-config-0.7.ebuild 1239 -MD5 f18c8f14b63a3439113068b5a89e193b motif-config-0.8.ebuild 1239 -RMD160 0f88531b1e5253034ce1416813a752cae86c2bb8 motif-config-0.8.ebuild 1239 -SHA256 9f477a1628815c99a6dbab3e2980f77417c7009835f86074106f4b1303efac5d motif-config-0.8.ebuild 1239 +MD5 2bccc089f437d695ae5782e232c641c8 motif-config-0.10.ebuild 2599 +RMD160 cd0c38cdde8d88fc3d319281583d8a6bdd8686d3 motif-config-0.10.ebuild 2599 +SHA256 6b6447f465ac76a56e38695f7819303f63fe32d73c642ed2581cd60d5a8499ad motif-config-0.10.ebuild 2599 MD5 a01d344ad183650d4c427260ab3e85d6 motif-config-0.9.ebuild 2589 RMD160 49f5b84726d5dba77759837f49f740a244387f6f motif-config-0.9.ebuild 2589 SHA256 6b655bef8a25793344a9b5cf2777a630ec2e40585742ed5d5c3b12a283e46756 motif-config-0.9.ebuild 2589 diff --git a/x11-libs/motif-config/files/digest-motif-config-0.6 b/x11-libs/motif-config/files/digest-motif-config-0.10 index e69de29bb2d1..e69de29bb2d1 100644 --- a/x11-libs/motif-config/files/digest-motif-config-0.6 +++ b/x11-libs/motif-config/files/digest-motif-config-0.10 diff --git a/x11-libs/motif-config/files/digest-motif-config-0.7 b/x11-libs/motif-config/files/digest-motif-config-0.7 deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/x11-libs/motif-config/files/digest-motif-config-0.7 +++ /dev/null diff --git a/x11-libs/motif-config/files/digest-motif-config-0.8 b/x11-libs/motif-config/files/digest-motif-config-0.8 deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/x11-libs/motif-config/files/digest-motif-config-0.8 +++ /dev/null diff --git a/x11-libs/motif-config/files/motif-config-0.8 b/x11-libs/motif-config/files/motif-config-0.10 index 79f46593d172..2e352b01ced6 100755 --- a/x11-libs/motif-config/files/motif-config-0.8 +++ b/x11-libs/motif-config/files/motif-config-0.10 @@ -34,14 +34,6 @@ Options: --cflags Print compilation flags for the given/current profile. - --install Install the given profile. - - --uninstall Uninstall the given profile. - - --start-install Start installation of new Motif version - - --finish-install Finish installation of new Motif version - USAGE_END exit $1 } @@ -67,107 +59,132 @@ _check_root() { _activate_profile() { _check_root + local retval=0 if [ -z "${1}" ]; then return 0 fi + # set new profile as default new=${1} + files="" # libs for file in `ls /usr/@@LIBDIR@@/${new}/ | grep lib`; do - rm -f /usr/@@LIBDIR@@/${file} + files="${files} /usr/@@LIBDIR@@/${file}" + rm -rf /usr/@@LIBDIR@@/${file} + retval=$((retval | $? )) ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/@@LIBDIR@@/${file} + retval=$((retval | $? )) done # includes for file in `ls /usr/include/${new}/`; do - rm -fR /usr/include/${file} + files="${files} /usr/include/${file}" + rm -rf /usr/include/${file} + retval=$((retval | $? )) ln -s /usr/include/${new}/${file} /usr/include/${file} + retval=$((retval | $? )) done # binaries for file in `ls /usr/@@LIBDIR@@/${new} | grep -v lib`; do - rm -f /usr/bin/${file} + files="${files} /usr/bin/${file}" + rm -rf /usr/bin/${file} + retval=$((retval | $? )) ln -s /usr/@@LIBDIR@@/${new}/${file} /usr/bin/${file} + retval=$((retval | $? )) done # man pages for file in `find /usr/share/man -regex ".*-${new}\..x?.gz"`; do - rm -f ${file/-${new}/} + files="${files} ${file/-${new}/}" + rm -rf ${file/-${new}/} + retval=$((retval | $? )) ln -s ${file} ${file/-${new}/} + retval=$((retval | $? )) done - # set new profile as default cat ${PROFILE_PATH}/${new} > ${CONFIG_FILE} + retval=$((retval | $? )) + echo "FILES='${files}'" >> ${CONFIG_FILE} + retval=$((retval | $? )) + test $retval -eq 0 return $? } _deactivate_profile() { _check_root - current=`cat ${CONFIG_FILE} 2>/dev/null` + source ${CONFIG_FILE} 2>/dev/null + current=${PROFILE} 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}/} + for file in ${FILES}; do + rm -rf ${file} + retval=$((retval | $? )) done - rm -f ${CONFIG_FILE} + rm -rf ${CONFIG_FILE} + retval=$((retval | $? )) + test $retval -eq 0 return $? } switch_profile() { _check_root + local retval=0 if [ -n "$1" ]; then if [ ! -e ${PROFILE_PATH}/${1} ]; then eerror "$0: no such profile ${1}" + retval=1 else _deactivate_profile + retval=$((retval | $? )) _activate_profile $1 + retval=$((retval | $? )) fi else - for y in `ls ${PROFILE_PATH} | grep -v removed | grep -v current | sort -r`; do - _deactivate_profile - _activate_profile ${y} - break - done - if [ -z "${y}" ]; then - _deactivate_profile - eerror "$0: no profile to activate" + source ${CONFIG_FILE} 2> /dev/null + _deactivate_profile + retval=$((retval | $? )) + if [ -z "${PROFILE}" -o ! -f ${PROFILE_PATH}/${PROFILE} ]; then + for y in `ls ${PROFILE_PATH} | grep -v removed | grep -v current | sort -r`; do + _activate_profile ${y} + retval=$((retval | $? )) + break + done + if [ -z "${y}" ]; then + eerror "$0: no profile to activate" + retval=1 + fi + else + _activate_profile ${PROFILE} + retval=$((retval | $? )) fi fi - einfo "$0: New default Profile is: `cat ${CONFIG_FILE}`" + source ${CONFIG_FILE} 2>/dev/null + einfo "$0: New default Profile is: ${PROFILE}" + test $retval -eq 0 return $? } get_current_profile() { - cat ${CONFIG_FILE} 2> /dev/null + source ${CONFIG_FILE} 2> /dev/null + echo ${PROFILE} } list_profiles() { i=1 - current=`cat ${CONFIG_FILE} 2>/dev/null` + source ${CONFIG_FILE} 2> /dev/null + current=${PROFILE} for y in `ls ${PROFILE_PATH} | grep -v current | grep -v removed`; do - output=`cat ${PROFILE_PATH}/${y}`; - output="[${i}] $output"; + source ${PROFILE_PATH}/${y} + output="[${i}] ${PROFILE}"; if [ "${y}" = "${current}" ]; then output="${output} *" fi @@ -179,125 +196,64 @@ list_profiles() { get_lib_path() { if [ "$1" != "" ]; then - profile=${1} + file=${1} else - profile="current" + file="current" fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` + source ${PROFILE_PATH}/${file} if [ $? -eq 1 ]; then eerror "$0: No such profile: $profile" else - echo "/usr/@@LIBDIR@@/${name}/" + echo "/usr/@@LIBDIR@@/${PROFILE}/" exit 0 fi } get_inc_path() { if [ "$1" != "" ]; then - profile=${1} + file=${1} else - profile="current" + file="current" fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` + source ${PROFILE_PATH}/${file} if [ $? -eq 1 ]; then eerror "$0: No such profile: $profile" else - echo "/usr/include/${name}/" + echo "/usr/include/${PROFILE}/" exit 0 fi } get_cflags() { if [ "$1" != "" ]; then - profile=${1} + file=${1} else - profile="current" + file="current" fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` + source ${PROFILE_PATH}/${file} if [ $? -eq 1 ]; then eerror "$0: No such profile: $profile" else - echo "-I/usr/include/${name}/" + echo "-I/usr/include/${PROFILE}/" exit 0 fi } get_libs() { if [ "$1" != "" ]; then - profile=${1} + file=${1} else - profile="current" + file="current" fi - name=`cat ${PROFILE_PATH}/${profile} 2> /dev/null` + source ${PROFILE_PATH}/${file} if [ $? -eq 1 ]; then eerror "$0: No such profile: $profile" else - echo "-L/usr/@@LIBDIR@@/${name}/" + echo "-L/usr/@@LIBDIR@@/${PROFILE}/" 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 - if [ ! -e $CONFIG_FILE ]; then - 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} - - # activate next profile if non is activated - if [ "`cat $CONFIG_FILE`" == "${1}" ]; then - switch_profile - fi - - exit $? -} - -start_installation() { - einfo "Starting installation of a new motif version." - einfo "Note: You can't use any motif app during this process." - - if [ -f ${CONFIG_FILE} ]; then - cat ${CONFIG_FILE} > ${PROFILE_PATH}/removed - - _deactivate_profile - fi -} - -finish_installation() { - einfo "Finishing installation." - einfo "Note: You can now use your motif apps again." - - if [ -f ${PROFILE_PATH}/removed ]; then - _activate_profile `cat ${PROFILE_PATH}/removed` - rm -f ${PROFILE_PATH}/removed - fi -} - for x in "$@"; do case "${x}" in -c|--get-current-profile) @@ -311,7 +267,7 @@ for x in "$@"; do ;; -s|--set-profile) - [[ $# -ne 2 ]] && usage 1 + [[ $# -gt 2 ]] && usage 1 switch_profile $2 exit $? ;; @@ -336,32 +292,12 @@ for x in "$@"; do get_libs $2 ;; - --install) - [[ $# -ne 2 ]] && usage 1 - install_profile $2 - ;; - - --uninstall) - [[ $# -ne 2 ]] && usage 1 - uninstall_profile $2 - ;; - - --start-install) - [[ $# -ne 1 ]] && usage 1 - start_installation - ;; - - --finish-install) - [[ $# -ne 1 ]] && usage 1 - finish_installation - ;; - -h|--help) usage 0 ;; -v|--version) - echo "motif-config-0.8" + echo "motif-config-0.9" exit 0 ;; diff --git a/x11-libs/motif-config/files/motif-config-0.6 b/x11-libs/motif-config/files/motif-config-0.6 deleted file mode 100755 index 2948d8ff6255..000000000000 --- a/x11-libs/motif-config/files/motif-config-0.6 +++ /dev/null @@ -1,381 +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. - - --start-install Start installation of new Motif version - - --finish-install Finish installation of new Motif version - -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 $? -} - -start_installation() { - einfo "Starting installation of a new motif version." - einfo "Note: You can't use any motif app during this process." - - if [ -f ${CONFIG_FILE} ]; then - cat ${CONFIG_FILE} > ${PROFILE_PATH}/removed - - _deactivate_profile - fi -} - -finish_installation() { - einfo "Finishing installation." - einfo "Note: You can now use your motif apps again." - - if [ -f ${PROFILE_PATH}/removed ]; then - _activate_profile `cat ${PROFILE_PATH}/removed` - fi -} - -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 - ;; - - --start-install) - [[ $# -ne 1 ]] && usage 1 - start_installation - ;; - - --finish-install) - [[ $# -ne 1 ]] && usage 1 - finish_installation - ;; - - -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.7 b/x11-libs/motif-config/files/motif-config-0.7 deleted file mode 100755 index 0db2ad946308..000000000000 --- a/x11-libs/motif-config/files/motif-config-0.7 +++ /dev/null @@ -1,369 +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. - - --start-install Start installation of new Motif version - - --finish-install Finish installation of new Motif version - -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 $*"; - exit 1 -} -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 - 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 - - rm -f ${CONFIG_FILE} - - 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 y in `ls ${PROFILE_PATH} | grep -v removed | grep -v current | sort -r`; do - _deactivate_profile - _activate_profile ${y} - break - done - if [ -z "${y}" ]; then - _deactivate_profile - eerror "$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 - 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 $? -} - -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} - - # create env.d entry - echo "LDPATH=/usr/lib/${1}" > /etc/env.d/15${1} - - # make it default if no profile is activated - if [ ! -e $CONFIG_FILE ]; then - 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} - - # activate next profile if non is activated - if [ "`cat $CONFIG_FILE`" == "${1}" ]; then - switch_profile - fi - - exit $? -} - -start_installation() { - einfo "Starting installation of a new motif version." - einfo "Note: You can't use any motif app during this process." - - if [ -f ${CONFIG_FILE} ]; then - cat ${CONFIG_FILE} > ${PROFILE_PATH}/removed - - _deactivate_profile - fi -} - -finish_installation() { - einfo "Finishing installation." - einfo "Note: You can now use your motif apps again." - - if [ -f ${PROFILE_PATH}/removed ]; then - _activate_profile `cat ${PROFILE_PATH}/removed` - rm -f ${PROFILE_PATH}/removed - fi -} - -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 - ;; - - --start-install) - [[ $# -ne 1 ]] && usage 1 - start_installation - ;; - - --finish-install) - [[ $# -ne 1 ]] && usage 1 - finish_installation - ;; - - -h|--help) - usage 0 - ;; - - -v|--version) - echo "motif-config-0.7" - exit 0 - ;; - - -*) - usage 1 - ;; - - *) - usage 1 - ;; - - esac -done diff --git a/x11-libs/motif-config/motif-config-0.10.ebuild b/x11-libs/motif-config/motif-config-0.10.ebuild new file mode 100644 index 000000000000..b261773caec3 --- /dev/null +++ b/x11-libs/motif-config/motif-config-0.10.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2006 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.10.ebuild,v 1.1 2006/02/20 10:24:02 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 ~ppc-macos ~ppc64 ~sh ~sparc ~x86" +IUSE="" + +DEPEND="!<x11-libs/openmotif-2.1.30-r13 +!=x11-libs/openmotif-2.2.2* +!=x11-libs/openmotif-2.2.3 +!=x11-libs/openmotif-2.2.3-r1 +!=x11-libs/openmotif-2.2.3-r2 +!=x11-libs/openmotif-2.2.3-r3 +!=x11-libs/openmotif-2.2.3-r4 +!=x11-libs/openmotif-2.2.3-r5 +!=x11-libs/openmotif-2.2.3-r6 + +!<x11-libs/lesstif-0.93.94-r4 +!=x11-libs/lesstif-0.93.97 +!=x11-libs/lesstif-0.94.0*" + +RDEPEND="${DEPEND} + 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 + + dodir /usr/$(get_libdir)/X11 + dosym /etc/X11/mwm /usr/$(get_libdir)/X11/mwm +} + +pkg_setup() { + # clean up cruft left over by old versions + removed=no + has_version =x11-libs/openmotif-2.1.30* \ + || ( rm -f /usr/$(get_libdir)/motif/openmotif-2.1; \ + rm -fR /usr/include/openmotif-2.1; \ + rm -fR /usr/$(get_libdir)/openmotif-2.1; + removed=yes ) + has_version =x11-libs/openmotif-2.2.3* \ + || ( rm -f /usr/$(get_libdir)/motif/openmotif-2.2; \ + rm -fR /usr/include/openmotif-2.2; \ + rm -fR /usr/$(get_libdir)/openmotif-2.2; + removed=yes ) + has_version =x11-libs/lesstif-0.93.94* \ + || ( rm -f /usr/$(get_libdir)/motif/lesstif-1.2; \ + rm -fR /usr/include/lesstif-1.2; \ + rm -fR /usr/$(get_libdir)/lesstif-1.2; + removed=yes ) + has_version =x11-libs/lesstif-0.94* \ + || ( rm -f /usr/$(get_libdir)/motif/lesstif-2.1; \ + rm -fR /usr/include/lesstif-2.1; \ + rm -fR /usr/$(get_libdir)/openmotif-2.1; + removed=yes ) + + if [ "$removed" = "yes" ]; then + rm -fR /usr/include/Xm; + rm -fR /usr/include/uil; + rm -fR /usr/include/Mrm; + fi +} diff --git a/x11-libs/motif-config/motif-config-0.6.ebuild b/x11-libs/motif-config/motif-config-0.6.ebuild deleted file mode 100644 index 04d1e8f87719..000000000000 --- a/x11-libs/motif-config/motif-config-0.6.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.6.ebuild,v 1.1 2005/03/22 16:18:25 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.7.ebuild b/x11-libs/motif-config/motif-config-0.7.ebuild deleted file mode 100644 index d4c66769f15f..000000000000 --- a/x11-libs/motif-config/motif-config-0.7.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.7.ebuild,v 1.1 2005/03/24 18:26:53 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.8.ebuild b/x11-libs/motif-config/motif-config-0.8.ebuild deleted file mode 100644 index c8f939e3311f..000000000000 --- a/x11-libs/motif-config/motif-config-0.8.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.8.ebuild,v 1.1 2005/03/25 07:27:38 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 -} |