[arch-commits] Commit in libkscreen/trunk (PKGBUILD kdebug-324625.patch)

2013-09-10 Thread Andrea Scarpino
Date: Tuesday, September 10, 2013 @ 14:49:09
  Author: andrea
Revision: 194031

Fix a crash in KDE 4.11.1 (KDEBUG#324625)

Added:
  libkscreen/trunk/kdebug-324625.patch
Modified:
  libkscreen/trunk/PKGBUILD

-+
 PKGBUILD|   12 ++-
 kdebug-324625.patch |  184 ++
 2 files changed, 192 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2013-09-10 10:15:14 UTC (rev 194030)
+++ PKGBUILD2013-09-10 12:49:09 UTC (rev 194031)
@@ -4,7 +4,7 @@
 
 pkgname=libkscreen
 pkgver=1.0.1
-pkgrel=1
+pkgrel=2
 pkgdesc="KDE's screen management library"
 arch=('i686' 'x86_64')
 url='https://projects.kde.org/libkscreen'
@@ -11,12 +11,16 @@
 license=('GPL')
 depends=('kdelibs' 'qjson')
 makedepends=('cmake' 'automoc4')
-#source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2";)
-source=("http://download.kde.org/stable/${pkgname}/${pkgname}-${pkgver}.tar.bz2";)
-md5sums=('52aeaf2d987bffd05b111e89b445bd00')
+source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2";
+'kdebug-324625.patch')
+md5sums=('52aeaf2d987bffd05b111e89b445bd00'
+ '2f670035b94c6d61c4a3d1c4230db4b5')
 
 prepare() {
   mkdir build
+
+  cd ${pkgname}-${pkgver}
+  patch -p1 -i "${srcdir}"/kdebug-324625.patch
 }
 
 build() {

Added: kdebug-324625.patch
===
--- kdebug-324625.patch (rev 0)
+++ kdebug-324625.patch 2013-09-10 12:49:09 UTC (rev 194031)
@@ -0,0 +1,184 @@
+From: Dan Vrátil 
+Date: Mon, 09 Sep 2013 16:43:56 +
+Subject: Refresh modes when currentModeId points to unknown mode
+X-Git-Url: 
http://quickgit.kde.org/?p=libkscreen.git&a=commitdiff&h=1d9ac012e857036bb8814cc84c9cf10bb57ca40c
+---
+Refresh modes when currentModeId points to unknown mode
+
+Sometimes drivers insert or remove modes, so when currentModeId points to a 
mode
+that we don't have cached, we must refresh the local cache.
+
+This also fixes a crash that occured when currentModeId would be pointing to a
+mode that we don't have (even after refreshing modes)
+
+REVIEW: 112604
+BUG: 323107
+BUG: 324625
+FIXED-IN: 1.0.2
+---
+
+
+--- a/backends/xrandr/xrandrconfig.cpp
 b/backends/xrandr/xrandrconfig.cpp
+@@ -163,31 +163,54 @@
+ }
+ 
+ XRandRMode* currentMode = currentOutput->currentMode();
+-Q_ASSERT_X(currentMode, "applyKScreenConfig", "currentOutput has 
returned a null XRandRMode*");
+-
+-QSize size = currentMode->size();
+-
+-int x, y;
+-
+-//TODO: Move this code within libkscreen
+-y = currentOutput->position().y();
+-if (currentOutput->isHorizontal()) {
+-y += size.height();
++
++// Current output mode can be unlisted - when output size changes to a
++// resolution that is not listed by xrandr, in some cases the driver 
will
++// dynamically create a new mode, so we just need to update the list
++// of modes and try to get a mode matching currentModeId again.
++// In some cases however re-reading modes from xrandr won't help - in 
that
++// case we fallback to doing nothing
++if (!currentMode) {
++XRROutputInfo *outputInfo = 
XRandR::XRROutput(currentOutput->id());
++currentOutput->updateModes(outputInfo);
++XRRFreeOutputInfo(outputInfo);
++currentMode = currentOutput->currentMode();
++}
++
++if (currentMode) {
++const QSize size = currentMode->size();
++int x, y;
++
++//TODO: Move this code within libkscreen
++y = currentOutput->position().y();
++if (currentOutput->isHorizontal()) {
++y += size.height();
++} else {
++y += size.width();
++}
++
++x = currentOutput->position().x();
++if (currentOutput->isHorizontal()) {
++x += size.width();
++} else {
++x += size.height();
++}
++
++if (x > newSize.width() || y > newSize.height()) {
++if (!toDisable.contains(output->id())) {
++kDebug(dXndr()) << "Output doesn't fit: " << x << "x" << 
y << newSize;
++toDisable.insert(output->id(), output);
++}
++}
+ } else {
+-y += size.width();
+-}
+-
+-x = currentOutput->position().x();
+-if (currentOutput->isHorizontal()) {
+-x += size.width();
+-} else {
+-x += size.height();
+-}
+-
+-if (x > newSize.width() || y > newSize.height()) {
+-if (!toDisable.contains(output->id())) {
+-kDebug(dXndr()) << "Output doesn't fit: " << x << "x" << y << 
newSize;
+-

[arch-commits] Commit in libkscreen/trunk (PKGBUILD kdebug-324625.patch)

2013-09-10 Thread Andrea Scarpino
Date: Tuesday, September 10, 2013 @ 16:07:04
  Author: andrea
Revision: 194202

upgpkg: libkscreen 1.0.1-3

Patch causes more regressions

Modified:
  libkscreen/trunk/PKGBUILD
Deleted:
  libkscreen/trunk/kdebug-324625.patch

-+
 PKGBUILD|   11 --
 kdebug-324625.patch |  184 --
 2 files changed, 3 insertions(+), 192 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2013-09-10 13:44:49 UTC (rev 194201)
+++ PKGBUILD2013-09-10 14:07:04 UTC (rev 194202)
@@ -4,7 +4,7 @@
 
 pkgname=libkscreen
 pkgver=1.0.1
-pkgrel=2
+pkgrel=3
 pkgdesc="KDE's screen management library"
 arch=('i686' 'x86_64')
 url='https://projects.kde.org/libkscreen'
@@ -11,16 +11,11 @@
 license=('GPL')
 depends=('kdelibs' 'qjson')
 makedepends=('cmake' 'automoc4')
-source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2";
-'kdebug-324625.patch')
-md5sums=('52aeaf2d987bffd05b111e89b445bd00'
- '2f670035b94c6d61c4a3d1c4230db4b5')
+source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2";)
+md5sums=('52aeaf2d987bffd05b111e89b445bd00')
 
 prepare() {
   mkdir build
-
-  cd ${pkgname}-${pkgver}
-  patch -p1 -i "${srcdir}"/kdebug-324625.patch
 }
 
 build() {

Deleted: kdebug-324625.patch
===
--- kdebug-324625.patch 2013-09-10 13:44:49 UTC (rev 194201)
+++ kdebug-324625.patch 2013-09-10 14:07:04 UTC (rev 194202)
@@ -1,184 +0,0 @@
-From: Dan Vrátil 
-Date: Mon, 09 Sep 2013 16:43:56 +
-Subject: Refresh modes when currentModeId points to unknown mode
-X-Git-Url: 
http://quickgit.kde.org/?p=libkscreen.git&a=commitdiff&h=1d9ac012e857036bb8814cc84c9cf10bb57ca40c

-Refresh modes when currentModeId points to unknown mode
-
-Sometimes drivers insert or remove modes, so when currentModeId points to a 
mode
-that we don't have cached, we must refresh the local cache.
-
-This also fixes a crash that occured when currentModeId would be pointing to a
-mode that we don't have (even after refreshing modes)
-
-REVIEW: 112604
-BUG: 323107
-BUG: 324625
-FIXED-IN: 1.0.2

-
-
 a/backends/xrandr/xrandrconfig.cpp
-+++ b/backends/xrandr/xrandrconfig.cpp
-@@ -163,31 +163,54 @@
- }
- 
- XRandRMode* currentMode = currentOutput->currentMode();
--Q_ASSERT_X(currentMode, "applyKScreenConfig", "currentOutput has 
returned a null XRandRMode*");
--
--QSize size = currentMode->size();
--
--int x, y;
--
--//TODO: Move this code within libkscreen
--y = currentOutput->position().y();
--if (currentOutput->isHorizontal()) {
--y += size.height();
-+
-+// Current output mode can be unlisted - when output size changes to a
-+// resolution that is not listed by xrandr, in some cases the driver 
will
-+// dynamically create a new mode, so we just need to update the list
-+// of modes and try to get a mode matching currentModeId again.
-+// In some cases however re-reading modes from xrandr won't help - in 
that
-+// case we fallback to doing nothing
-+if (!currentMode) {
-+XRROutputInfo *outputInfo = 
XRandR::XRROutput(currentOutput->id());
-+currentOutput->updateModes(outputInfo);
-+XRRFreeOutputInfo(outputInfo);
-+currentMode = currentOutput->currentMode();
-+}
-+
-+if (currentMode) {
-+const QSize size = currentMode->size();
-+int x, y;
-+
-+//TODO: Move this code within libkscreen
-+y = currentOutput->position().y();
-+if (currentOutput->isHorizontal()) {
-+y += size.height();
-+} else {
-+y += size.width();
-+}
-+
-+x = currentOutput->position().x();
-+if (currentOutput->isHorizontal()) {
-+x += size.width();
-+} else {
-+x += size.height();
-+}
-+
-+if (x > newSize.width() || y > newSize.height()) {
-+if (!toDisable.contains(output->id())) {
-+kDebug(dXndr()) << "Output doesn't fit: " << x << "x" << 
y << newSize;
-+toDisable.insert(output->id(), output);
-+}
-+}
- } else {
--y += size.width();
--}
--
--x = currentOutput->position().x();
--if (currentOutput->isHorizontal()) {
--x += size.width();
--} else {
--x += size.height();
--}
--
--if (x > newSize.width() || y > newSize.height()) {
--if (!toDisable.contains(output->id())) {
--kDebug(dXndr()) << "Output doesn't fit: " << x << "x" << y << 
newSize;
--toDisable.insert(output->id(), output);
-+