diff options
author | Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> | 2008-11-01 13:19:57 +0000 |
---|---|---|
committer | Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> | 2008-11-01 13:19:57 +0000 |
commit | 83c903095e78f8f4dc841dad3a90a057f4ddb0d6 (patch) | |
tree | 96903b922c33c813b52f3ed4b2b8794118603731 /x11-wm/compiz | |
parent | Add a magic flag GRUB_STATIC_PACKAGE_BUILDING which along with USE='static -n... (diff) | |
download | historical-83c903095e78f8f4dc841dad3a90a057f4ddb0d6.tar.gz historical-83c903095e78f8f4dc841dad3a90a057f4ddb0d6.tar.bz2 historical-83c903095e78f8f4dc841dad3a90a057f4ddb0d6.zip |
Added the missing compiz-manager file.
Package-Manager: portage-2.2_rc12/cvs/Linux 2.6.27-gentoo x86_64
Diffstat (limited to 'x11-wm/compiz')
-rw-r--r-- | x11-wm/compiz/ChangeLog | 6 | ||||
-rw-r--r-- | x11-wm/compiz/Manifest | 3 | ||||
-rw-r--r-- | x11-wm/compiz/files/compiz-manager | 384 |
3 files changed, 391 insertions, 2 deletions
diff --git a/x11-wm/compiz/ChangeLog b/x11-wm/compiz/ChangeLog index 633ae8587fec..7a9f6d0375d1 100644 --- a/x11-wm/compiz/ChangeLog +++ b/x11-wm/compiz/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for x11-wm/compiz # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/compiz/ChangeLog,v 1.29 2008/10/31 22:39:53 jmbsvicetto Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/compiz/ChangeLog,v 1.30 2008/11/01 13:19:57 jmbsvicetto Exp $ + + 01 Nov 2008; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> + +files/compiz-manager: + Added the missing compiz-manager file. 31 Oct 2008; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> +files/compiz-no-gconf.patch: diff --git a/x11-wm/compiz/Manifest b/x11-wm/compiz/Manifest index 914f37c198da..fbc170958c37 100644 --- a/x11-wm/compiz/Manifest +++ b/x11-wm/compiz/Manifest @@ -1,5 +1,6 @@ AUX 0.3.6/compiz-start 1122 RMD160 6e2e0db666a9fd7648e894d9f778dcb1c59bb6c0 SHA1 f710dcfbd6274ff7bed3f264d284a4dcecb27254 SHA256 04a944e8e39ef1a6226b350027a5865bb56b45230aa59eae9574cd6c75529fa4 AUX compiz-0.6.2-CVE-2007-3920.patch 1019 RMD160 024316c8213df5c68ceb39c404da4227cdfbf21f SHA1 adf6c10f0fa3de040704cd208d09d93b402667b8 SHA256 63b7dd520b4659f8124e3122ffeb0577c07d90539211f8383037eef744c0e5ee +AUX compiz-manager 9831 RMD160 8ef4f9c669a085c76b391c1bef5788a1c3054bcb SHA1 f57f17a574db09ed602cfd87f4f452ca9de5e86f SHA256 68cfc0039a552d1db15d257b2ba4db6cdd86984015688befdf78b15badecd0d9 AUX compiz-no-gconf.patch 630 RMD160 32b6990dff7baf7f3cb04f728ab04d1523f29c46 SHA1 ad1c0a38dcb83c4768031f0b87db4748b2c24b92 SHA256 87467fbe5d4e0d0bb8952f2d5b74d21046d92d49772543aeda137266e055aa67 DIST compiz-0.5.0.tar.bz2 926090 RMD160 c9b38ea1184e9b897d878c499c883dd388af17bd SHA1 453b4e8423b39d4ec3539817f2846d7ea485749e SHA256 4191745d86bec37de4cdc79bf0031afde1d28079eac2e3fc29aed18cd7a2a4e6 DIST compiz-0.5.2.tar.gz 1778046 RMD160 9b307090af4717796e092095e7c293350292e30b SHA1 0d0a4a39bfbe0ada770d9206b7a1b6b443c53c29 SHA256 e1cc3f3bd144d32d0ebd1e505a7ea7727fb0246f36e5fcea53b808e27adf197c @@ -10,5 +11,5 @@ EBUILD compiz-0.5.2.ebuild 1456 RMD160 01aec041dea85b7fdae0420ea322863f742941f6 EBUILD compiz-0.6.2-r1.ebuild 1719 RMD160 44f0ccbf283f44219e3d124b2a0df9d64dbba538 SHA1 61e009aef49f3121621a1f50decf3ead5b1c7657 SHA256 0e91b045deb0bb68a45be919c8f9aa366df57ead9f1e88a47c747dada39790b8 EBUILD compiz-0.6.2.ebuild 1455 RMD160 fca32d8b51037dc1aaa01b89ce4ddf9d14e56a25 SHA1 e08804835caece20bc01363c1be8e2b28a5a5d5b SHA256 eba236f002449d04ae58ef2e0103cd30c6feb3d54eb6f8fc52adefe07a0bb102 EBUILD compiz-0.7.8.ebuild 3121 RMD160 8f2ec1ea5b8766333ccac66b2d4307174b53d982 SHA1 326eef022e3f227296751c6cd559476f217fdac0 SHA256 77226f10989bdb1e2fd7bb2bd521a725a44350702aad6abb60178ace60f955cc -MISC ChangeLog 4537 RMD160 ae1dddd707fa285d639157db7610303690babebb SHA1 6d06ef7f1b7b4b864f1f8b6d6fde6a65edbf0977 SHA256 43ba99321681605c3a16ea91b11ef25aab3d1cd705cac615daf6c6c9d460a92d +MISC ChangeLog 4671 RMD160 a1084e64343f12429edbeb8f67d13ac539a00b05 SHA1 ae5e0df836ed70d4c3ed46c917c58be0dabdbbf6 SHA256 0e0b0e2a495257f356e542cbe27d47b58b9c704fb63415370ac685f9514bd096 MISC metadata.xml 595 RMD160 e354511f8cf82c440781b7d2f2f48af495ac0ae2 SHA1 82abd21f65ca6e7275bc32aee890fe124ade7092 SHA256 977b829df1bda476da07f5be78d64cf40f86c5e3232e2f72554c3112d1621acb diff --git a/x11-wm/compiz/files/compiz-manager b/x11-wm/compiz/files/compiz-manager new file mode 100644 index 000000000000..3fbae21c0080 --- /dev/null +++ b/x11-wm/compiz/files/compiz-manager @@ -0,0 +1,384 @@ +#!/bin/sh +# Compiz Manager wrapper script +# +# Copyright (c) 2007 Kristian Lyngstøl <kristian@bohemians.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# +# Contributions by: Treviño (3v1n0) <trevi55@gmail.com>, Ubuntu Packages +# +# Much of this code is based on Beryl code, also licensed under the GPL. +# This script will detect what options we need to pass to compiz to get it +# started, and start a default plugin and possibly window decorator. +# + + +COMPIZ_BIN_PATH="/usr/bin/" # For window decorators and compiz +PLUGIN_PATH="/usr/lib/compiz/" +GLXINFO="/usr/bin/glxinfo" +KWIN="/usr/bin/kwin" +METACITY="/usr/bin/metacity" +COMPIZ_NAME="compiz" # Final name for compiz (compiz.real) + +# For Xgl LD_PRELOAD +LIBGL_NVIDIA="/usr/lib/nvidia/libGL.so.1.2.xlibmesa" +LIBGL_FGLRX="/usr/lib/fglrx/libGL.so.1.2.xlibmesa" + +# Minimum amount of memory (in kilo bytes) that nVidia cards need +# to be allowed to start +# Set to 262144 to require 256MB +NVIDIA_MEMORY="65536" # 64MB +NVIDIA_SETTINGS="nvidia-settings" # Assume it's in the path by default + +# For detecting what driver is in use, the + is for one or more /'s +XORG_DRIVER_PATH="/usr/lib/xorg/modules/drivers/+" + +FALLBACKWM="${METACITY}" +FALLBACKWM_OPTIONS="--replace $@" + +# Driver whitelist +WHITELIST="nvidia intel ati radeon i810" + +# blacklist based on the pci ids +# See http://wiki.compiz-fusion.org/Hardware/Blacklist for details +T=" 1002:5954 1002:5854 1002:5955" # ati rs480 +T="$T 1002:4153" # ATI Rv350 +T="$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12" # intel 965 +BLACKLIST_PCIIDS="$T" +unset T + +COMPIZ_OPTIONS="--ignore-desktop-hints --replace" +COMPIZ_PLUGINS="" +ENV="" + +# Use emerald by default if it exist +USE_EMERALD="yes" + +# No indirect by default +INDIRECT="no" + +# Default X.org log if xset q doesn't reveal it +XORG_DEFAULT_LOG="/var/log/Xorg.0.log" + +# Set to yes to enable verbose +VERBOSE="yes" + +# Echos the arguments if verbose +verbose() +{ + if [ "x$VERBOSE" = "xyes" ]; then + printf "$*" + fi +} + +# abort script and run fallback windowmanager +abort_with_fallback_wm() +{ + if [ "x$SKIP_CHECKS" = "xyes" ]; then + verbose "SKIP_CHECKS is yes, so continuing despite problems.\n" + return 0; + fi + + verbose "aborting and using fallback: $FALLBACKWM \n" + + if [ -x $FALLBACKWM ]; then + exec $FALLBACKWM $FALLBACKWM_OPTIONS + else + printf "no $FALLBACKWM found, exiting\n" + exit 1 + fi +} + +# Check for non power of two texture support +check_npot_texture() +{ + verbose "Checking for non power of two support: " + if glxinfo 2> /dev/null | egrep -q '(GL_ARB_texture_non_power_of_two|GL_NV_texture_rectangle|GL_EXT_texture_rectangle|GL_ARB_texture_rectangle)' ; then + verbose "present. \n"; + return 0; + else + verbose "Not present. \n" + return 1; + fi + +} + +# Check for presence of FBConfig +check_fbconfig() +{ + verbose "Checking for FBConfig: " + if [ "$INDIRECT" = "yes" ]; then + $GLXINFO -i | grep -q GLX.*fbconfig + FB=$? + else + $GLXINFO | grep -q GLX.*fbconfig + FB=$? + fi + + if [ $FB = "0" ]; then + unset FB + verbose "present. \n" + return 0; + else + unset FB + verbose "not present. \n" + return 1; + fi +} + + +# Check for TFP +check_tfp() +{ + verbose "Checking for texture_from_pixmap: " + if [ $($GLXINFO 2>/dev/null | grep GLX_EXT_texture_from_pixmap -c) -gt 2 ] ; then + verbose "present. \n" + return 0; + else + verbose "not present. \n" + if [ "$INDIRECT" = "yes" ]; then + unset LIBGL_ALWAYS_INDIRECT + INDIRECT="no" + return 1; + else + verbose "Trying again with indirect rendering:\n"; + INDIRECT="yes" + export LIBGL_ALWAYS_INDIRECT=1 + check_tfp; + return $? + fi + fi +} + +# Check wether the composite extension is present +check_composite() +{ + verbose "Checking for Composite extension: " + if xdpyinfo -queryExtensions | grep -q Composite ; then + verbose "present. \n"; + return 0; + else + verbose "not present. \n"; + return 1; + fi +} + +# Detects if Xgl is running +check_xgl() +{ + verbose "Checking for Xgl: " + if xvinfo | grep -q Xgl ; then + verbose "present. \n" + return 0; + else + verbose "not present. \n" + return 1; + fi +} + +# Check if the nVidia card has enough video ram to make sense +check_nvidia_memory() +{ + MEM=$(${NVIDIA_SETTINGS} -q VideoRam | egrep Attribute\ \'VideoRam\'\ .*: | cut -d: -f3 | sed 's/[^0-9]//g') + if [ $MEM -lt $NVIDIA_MEMORY ]; then + verbose "Less than ${NVIDIA_MEMORY}kb of memory and nVidia"; + return 1; + fi + return 0; +} + +# Check for existence if NV-GLX +check_nvidia() +{ + if [ ! -z $NVIDIA_INTERNAL_TEST ]; then + return $NVIDIA_INTERNAL_TEST; + fi + verbose "Checking for nVidia: " + if xdpyinfo | grep -q NV-GLX ; then + verbose "present. \n" + NVIDIA_INTERNAL_TEST=0 + return 0; + else + verbose "not present. \n" + NVIDIA_INTERNAL_TEST=1 + return 1; + fi +} + +# Check if the max texture size is large enough compared to the resolution +check_texture_size() +{ + TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed 's/.*=[^0-9]//g') + RESOLUTION=$(xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//') + VRES=$(echo $RESOLUTION | sed 's/.*x//') + HRES=$(echo $RESOLUTION | sed 's/x.*//') + verbose "Comparing resolution ($RESOLUTION) to maximum 3D texture size ($TEXTURE_LIMIT): "; + if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then + verbose "Failed.\n" + return 1; + fi + verbose "Passed.\n" + return 0 +} + +# check driver whitelist +running_under_whitelisted_driver() +{ + LOG=$(xset q|grep "Log file"|awk '{print $3}') + if [ "$LOG" = "" ]; then + verbose "xset q doesn't reveal the location of the log file. Using fallback $XORG_DEFAULT_LOG \n" + LOG=$XORG_DEFAULT_LOG; + fi + if [ -z "$LOG" ];then + verbose "AIEEEEH, no Log file found \n" + verbose "$(xset q) \n" + return 0 + fi + for DRV in ${WHITELIST}; do + if egrep -q "Loading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG && + ! egrep -q "Unloading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG; + then + return 0 + fi + done + verbose "No whitelisted driver found\n" + return 1 +} + +# check pciid blacklist +have_blacklisted_pciid() +{ + OUTPUT=$(lspci -n) + for ID in ${BLACKLIST_PCIIDS}; do + if echo "$OUTPUT" | egrep -q "$ID"; then + verbose "Blacklisted PCIID '$ID' found \n" + return 0 + fi + done + OUTPUT=$(lspci -vn | grep -i VGA) + verbose "Detected PCI ID for VGA: $OUTPUT\n" + return 1 +} + +build_env() +{ + if check_nvidia; then + ENV="__GL_YIELD=NOTHING " + fi + if [ "$INDIRECT" = "yes" ]; then + ENV="$ENV LIBGL_ALWAYS_INDIRECT=1 " + fi + if check_xgl; then + if [ -f ${LIBGL_NVIDIA} ]; then + ENV="$ENV LD_PRELOAD=${LIBGL_NVIDIA}" + verbose "Enabling Xgl with nVidia drivers...\n" + fi + if [ -f ${LIBGL_FGLRX} ]; then + ENV="$ENV LD_PRELOAD=${LIBGL_FGLRX}" + verbose "Enabling Xgl with fglrx ATi drivers...\n" + fi + fi + + ENV="$ENV FROM_WRAPPER=yes" + + if [ -n "$ENV" ]; then + export $ENV + fi +} + +build_args() +{ + if [ $INDIRECT = "yes" ]; then + COMPIZ_OPTIONS="$COMPIZ_OPTIONS --indirect-rendering " + fi + if check_nvidia; then + COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding" + fi +} + +#################### +# Execution begins here. + +# Read configuration from XDG paths +if [ -z "$XDG_CONFIG_DIRS" ]; then + test -f /etc/xdg/compiz/compiz-manager && . /etc/xdg/compiz/compiz-manager +else + test -f $XDG_CONFIG_DIRS/compiz/compiz-manager && . $XDG_CONFIG_DIRS/compiz/compiz-manager +fi + +if [ -z "$XDG_CONFIG_HOME" ]; then + test -f $HOME/.config/compiz/compiz-manager && . $HOME/.config/compiz/compiz-manager +else + test -f $XDG_CONFIG_HOME/compiz/compiz-manager && . $XDG_CONFIG_HOME/compiz/compiz-manager +fi + +# Don't use compiz when running the failsafe session +if [ "x$GNOME_DESKTOP_SESSION_ID" = "xFailsafe" ]; then + abort_with_fallback_wm +fi + +if [ "x$LIBGL_ALWAYS_INDIRECT" = "x1" ]; then + INDIRECT="yes"; +fi + +# if we run under Xgl, we can skip some tests here +if ! check_xgl; then + # if vesa or vga are in use, do not even try glxinfo (LP#119341) + if ! running_under_whitelisted_driver || have_blacklisted_pciid; then + abort_with_fallback_wm + fi + # check if we have the required bits to run compiz and if not, + # fallback + if ! check_tfp || ! check_npot_texture || ! check_composite || ! check_texture_size; then + abort_with_fallback_wm + fi + + if check_nvidia && ! check_nvidia_memory; then + abort_with_fallback_wm + fi + + if ! check_fbconfig; then + abort_with_fallback_wm + fi +fi + +# load the ccp plugin if present and fallback to plain gconf if not +if [ -f ${PLUGIN_PATH}libccp.so ]; then + COMPIZ_PLUGINS="$COMPIZ_PLUGINS ccp" +elif [ -f ${PLUGIN_PATH}libgconf.so ]; then + COMPIZ_PLUGINS="$COMPIZ_PLUGINS glib gconf" +fi + +# get environment +build_env +build_args + +# start the gtk-window-decorator if present +if [ -x ${COMPIZ_BIN_PATH}emerald ] && [ "$USE_EMERALD" = "yes" ]; then + verbose "Starting emerald\n" + ${COMPIZ_BIN_PATH}emerald --replace & +elif [ -x ${COMPIZ_BIN_PATH}gtk-window-decorator ] && [ -n "$GNOME_DESKTOP_SESSION_ID" ]; then + verbose "Starting gtk-window-decorator\n" + ${COMPIZ_BIN_PATH}gtk-window-decorator --replace & +elif [ -x ${COMPIZ_BIN_PATH}kde-window-decorator ] && [ -n "$KDE_FULL_SESSION" ]; then + verbose "Starting kde-window-decorator\n" + ${COMPIZ_BIN_PATH}kde-window-decorator --replace & + FALLBACKWM="${KWIN}" +fi + +${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS + |