summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2011-09-05 22:18:32 +0000
committerAndreas K. Hüttel <dilfridge@gentoo.org>2011-09-05 22:18:32 +0000
commit5c5ecff77da499f587fb0d47a0e601012eeeb00b (patch)
treefbe279758057b2d8a1226482ea6ddbaebd90c74c
parentVersion bump. Still masked due to udev not bumped. (diff)
downloadgentoo-2-5c5ecff77da499f587fb0d47a0e601012eeeb00b.tar.gz
gentoo-2-5c5ecff77da499f587fb0d47a0e601012eeeb00b.tar.bz2
gentoo-2-5c5ecff77da499f587fb0d47a0e601012eeeb00b.zip
Backport fix for Intel DRI mis-detection, bug 380737
(Portage version: 2.1.10.13/cvs/Linux x86_64)
-rw-r--r--kde-base/kwin/ChangeLog8
-rw-r--r--kde-base/kwin/files/kwin-4.6.5-mesadri.patch41
-rw-r--r--kde-base/kwin/kwin-4.6.5-r1.ebuild76
3 files changed, 124 insertions, 1 deletions
diff --git a/kde-base/kwin/ChangeLog b/kde-base/kwin/ChangeLog
index b3d9c21fb09d..ec11c50b7769 100644
--- a/kde-base/kwin/ChangeLog
+++ b/kde-base/kwin/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for kde-base/kwin
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kwin/ChangeLog,v 1.239 2011/08/17 20:49:44 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kwin/ChangeLog,v 1.240 2011/09/05 22:18:32 dilfridge Exp $
+
+*kwin-4.6.5-r1 (05 Sep 2011)
+
+ 05 Sep 2011; Andreas K. Huettel <dilfridge@gentoo.org> +kwin-4.6.5-r1.ebuild,
+ +files/kwin-4.6.5-mesadri.patch:
+ Backport fix for Intel DRI mis-detection, bug 380737
17 Aug 2011; Andreas K. Huettel <dilfridge@gentoo.org> -kwin-4.7.0.ebuild,
kwin-4.7.0-r1.ebuild, -files/kwin-4.7.0-xcomposite_cmake_automagic.patch:
diff --git a/kde-base/kwin/files/kwin-4.6.5-mesadri.patch b/kde-base/kwin/files/kwin-4.6.5-mesadri.patch
new file mode 100644
index 000000000000..41af096feac8
--- /dev/null
+++ b/kde-base/kwin/files/kwin-4.6.5-mesadri.patch
@@ -0,0 +1,41 @@
+commit afe966579d56f85444c432a3a6adf026d2941bd5
+Author: Martin Gräßlin <mgraesslin@kde.org>
+Date: Sun May 1 11:49:26 2011 +0200
+
+ Enable direct rendering for all Mesa drivers
+
+ As KWin requires at least Mesa 7.10 for OpenGL we can be sure
+ that all Mesa drivers support DRI2 and can enable direct rendering
+ for it.
+
+ Parsing the version string to identify if it is a mesa driver.
+ This can cause breakage again in future versions of Mesa.
+ Unfortunately version, vendor and renderer are the only information
+ queryable just with OpenGL API.
+ BUG: 270942
+ FIXED-IN: 4.7.0
+
+diff --git a/kwin/opengltest/opengltest.cpp b/kwin/opengltest/opengltest.cpp
+index d2d8f70..eda7b51 100644
+--- a/kwin/opengltest/opengltest.cpp
++++ b/kwin/opengltest/opengltest.cpp
+@@ -81,16 +81,9 @@ int main(int argc, char *argv[])
+ if ((major == 1 && minor < 3) && !strstr(glxExtensions, "GLX_EXT_texture_from_pixmap"))
+ return 1;
+
+- // Assume that direct rendering works with DRI2 drivers
+- const GLubyte *renderer = glGetString(GL_RENDERER);
+- if (strstr((const char *)renderer, "DRI2"))
+- return 0;
+-
+- // The Intel driver doesn't have DRI2 in the renderer string
+- if (strstr((const char *)renderer, "GEM"))
+- return 0;
+-
+- if (strstr((const char *)renderer, "Gallium"))
++ // Assume that all Mesa drivers support direct rendering
++ const GLubyte *version = glGetString(GL_VERSION);
++ if (strstr((const char *)version, "Mesa"))
+ return 0;
+
+ // Direct contexts also work with the NVidia driver
diff --git a/kde-base/kwin/kwin-4.6.5-r1.ebuild b/kde-base/kwin/kwin-4.6.5-r1.ebuild
new file mode 100644
index 000000000000..0408b86f7d3a
--- /dev/null
+++ b/kde-base/kwin/kwin-4.6.5-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kwin/kwin-4.6.5-r1.ebuild,v 1.1 2011/09/05 22:18:32 dilfridge Exp $
+
+EAPI=4
+
+KMNAME="kdebase-workspace"
+OPENGL_REQUIRED="optional"
+inherit kde4-meta
+
+DESCRIPTION="KDE window manager"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug xcomposite xinerama"
+
+# NOTE disabled for now: captury? ( media-libs/libcaptury )
+COMMONDEPEND="
+ $(add_kdebase_dep kephal)
+ $(add_kdebase_dep libkworkspace)
+ $(add_kdebase_dep liboxygenstyle)
+ x11-libs/libXdamage
+ x11-libs/libXfixes
+ >=x11-libs/libXrandr-1.2.1
+ x11-libs/libXrender
+ opengl? (
+ virtual/opengl
+ >=media-libs/mesa-7.10
+ )
+ xcomposite? ( x11-libs/libXcomposite )
+ xinerama? ( x11-libs/libXinerama )
+"
+DEPEND="${COMMONDEPEND}
+ x11-proto/damageproto
+ x11-proto/fixesproto
+ x11-proto/randrproto
+ x11-proto/renderproto
+ xcomposite? ( x11-proto/compositeproto )
+ xinerama? ( x11-proto/xineramaproto )
+"
+RDEPEND="${COMMONDEPEND}
+ x11-apps/scripts
+"
+
+KMEXTRACTONLY="
+ ksmserver/
+ libs/kephal/
+ libs/oxygen/
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.2-xinerama_cmake_automagic.patch"
+ "${FILESDIR}/${PN}-fix-opengl.patch"
+ "${FILESDIR}/${PN}-4.6.5-mesadri.patch"
+)
+
+src_prepare() {
+# NOTE uncomment when enabled again by upstream
+# if ! use captury; then
+# sed -e 's:^PKGCONFIG..libcaptury:#DONOTFIND &:' \
+# -i kwin/effects/CMakeLists.txt || \
+# die "Making captury optional failed."
+# fi
+
+ kde4-meta_src_prepare
+}
+
+src_configure() {
+ # FIXME Remove when activity API moved away from libkworkspace
+ append-cppflags "-I${EPREFIX}/usr/include/kworkspace"
+
+ mycmakeargs=(
+ $(cmake-utils_use_with opengl OpenGL)
+ $(cmake-utils_use_with xinerama X11_Xinerama)
+ )
+
+ kde4-meta_src_configure
+}