summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Wendel <lanius@gentoo.org>2005-03-02 17:24:47 +0000
committerHeinrich Wendel <lanius@gentoo.org>2005-03-02 17:24:47 +0000
commit68da026a69f6444a7378784ec8204ab76657caa8 (patch)
tree0a5a26dab8eb28b8396ade96b2d60d137b92b9e6 /x11-libs/motif-config
parentDependency cleanup. Added patch to fix #67905. (diff)
downloadgentoo-2-68da026a69f6444a7378784ec8204ab76657caa8.tar.gz
gentoo-2-68da026a69f6444a7378784ec8204ab76657caa8.tar.bz2
gentoo-2-68da026a69f6444a7378784ec8204ab76657caa8.zip
move binaries to make revdep rebuild happy
(Portage version: 2.0.51-r15)
Diffstat (limited to 'x11-libs/motif-config')
-rw-r--r--x11-libs/motif-config/Manifest3
-rw-r--r--x11-libs/motif-config/files/digest-motif-config-0.30
-rwxr-xr-xx11-libs/motif-config/files/motif-config-0.3331
-rw-r--r--x11-libs/motif-config/motif-config-0.3.ebuild52
4 files changed, 386 insertions, 0 deletions
diff --git a/x11-libs/motif-config/Manifest b/x11-libs/motif-config/Manifest
index 355014242f2a..6128d81d318a 100644
--- a/x11-libs/motif-config/Manifest
+++ b/x11-libs/motif-config/Manifest
@@ -1,5 +1,6 @@
MD5 080e23abb80eed4a483c492dab88af4e motif-config-0.1.ebuild 1240
MD5 d8f6a41ef2f061f163885373c824232b motif-config-0.2-r1.ebuild 1242
+MD5 d8f6a41ef2f061f163885373c824232b motif-config-0.3.ebuild 1242
MD5 f2b804ac90f4e27be55a56568817af3e ChangeLog 1099
MD5 503ccb1138f9c49f0855884d830988a6 metadata.xml 253
MD5 37f43fa92dda0b0cb838ed04edd729fd motif-config-0.2.ebuild 1228
@@ -7,8 +8,10 @@ MD5 76af3b1b80127315546ef5ea7f5875e1 files/bindings.tbz2 5342
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.2-r1 0
MD5 cedbeed369bab9555dd6fda29c8bc4c3 files/motif-config-0.1 6466
MD5 474ea3ce052f62b920a365f98586b01b files/motif-config-0.2 6298
+MD5 40aeb81ec0479f508da510d2ae8a539c files/motif-config-0.3 6290
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.1 0
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.2 0
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-motif-config-0.3 0
diff --git a/x11-libs/motif-config/files/digest-motif-config-0.3 b/x11-libs/motif-config/files/digest-motif-config-0.3
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/x11-libs/motif-config/files/digest-motif-config-0.3
diff --git a/x11-libs/motif-config/files/motif-config-0.3 b/x11-libs/motif-config/files/motif-config-0.3
new file mode 100755
index 000000000000..c7a453420e7a
--- /dev/null
+++ b/x11-libs/motif-config/files/motif-config-0.3
@@ -0,0 +1,331 @@
+#!/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}`; 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/motif-config-0.3.ebuild b/x11-libs/motif-config/motif-config-0.3.ebuild
new file mode 100644
index 000000000000..f7f163985aea
--- /dev/null
+++ b/x11-libs/motif-config/motif-config-0.3.ebuild
@@ -0,0 +1,52 @@
+# 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.3.ebuild,v 1.1 2005/03/02 17:24:47 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
+}