summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-14 00:02:14 +0000
committerroot <root@rshg054.dnsready.net>2012-05-14 00:02:14 +0000
commitd3af8dc0117dc1ce4fea3d05c7a2d7786bd78986 (patch)
tree31feb3c3623dd48f13ce1cdbdf10d870ea5b5678
parente8aea505d7f36277edd02ef965bc3f8e1c81ee5d (diff)
Mon May 14 00:02:13 UTC 2012
-rw-r--r--community/awesome/01-fix_glib2_build.patch31
-rw-r--r--community/awesome/PKGBUILD64
-rw-r--r--community/awesome/awesome.desktop7
-rw-r--r--community/gtranslator/PKGBUILD7
-rw-r--r--community/gtranslator/gtranslator.changelog3
-rw-r--r--community/guichan/PKGBUILD31
-rw-r--r--community/i3lock/PKGBUILD8
-rw-r--r--community/i3status/PKGBUILD6
-rw-r--r--community/kid3/PKGBUILD14
-rw-r--r--community/kid3/kid3.changelog3
-rw-r--r--community/openbox/PKGBUILD15
-rw-r--r--community/openbox/title-matching.patch11
-rw-r--r--community/pigeonhole/PKGBUILD4
-rw-r--r--community/powertop/PKGBUILD30
-rw-r--r--community/powertop/powertop.changelog2
-rw-r--r--core/kmod/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch35
-rw-r--r--core/kmod/0002-depmod-report-failures-in-loading-symbols.patch34
-rw-r--r--core/kmod/PKGBUILD20
-rw-r--r--extra/cairo/PKGBUILD45
-rw-r--r--extra/cairo/git_fixes.patch1086
-rw-r--r--extra/dovecot/PKGBUILD8
-rw-r--r--extra/gtk3/PKGBUILD8
-rw-r--r--extra/gvfs/PKGBUILD9
-rw-r--r--extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch35
-rw-r--r--extra/libvpx/PKGBUILD10
-rw-r--r--extra/libxi/PKGBUILD6
-rw-r--r--extra/mpg123/PKGBUILD8
-rw-r--r--extra/nx/PKGBUILD8
-rw-r--r--extra/taglib/PKGBUILD11
-rw-r--r--extra/xf86-input-synaptics/PKGBUILD6
-rw-r--r--extra/xf86-input-wacom/PKGBUILD10
-rw-r--r--extra/xf86-video-apm/PKGBUILD13
-rw-r--r--extra/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch571
-rw-r--r--extra/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch290
-rw-r--r--extra/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch182
-rw-r--r--extra/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch179
-rw-r--r--extra/xf86-video-ati/PKGBUILD27
-rw-r--r--extra/xf86-video-ati/git_fixes.diff33
-rw-r--r--extra/xf86-video-i740/PKGBUILD8
-rw-r--r--extra/xf86-video-s3/PKGBUILD16
-rw-r--r--extra/xfce4-genmon-plugin/PKGBUILD39
-rw-r--r--extra/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff116
-rw-r--r--extra/xorg-server/PKGBUILD11
-rw-r--r--multilib/lib32-cairo/PKGBUILD20
-rw-r--r--multilib/lib32-cairo/git_fixes.patch1086
-rw-r--r--testing/libdrm-new/COPYING48
-rw-r--r--testing/libdrm-new/PKGBUILD53
-rw-r--r--testing/libdrm-new/no-pthread-stubs.patch70
-rw-r--r--testing/xf86-video-intel/PKGBUILD30
-rw-r--r--testing/xf86-video-nouveau/PKGBUILD41
-rw-r--r--testing/xf86-video-nouveau/xf86-video-nouveau.install16
-rw-r--r--testing/xorg-server/PKGBUILD13
-rw-r--r--testing/xorg-server/git-fixes.patch1812
53 files changed, 5948 insertions, 301 deletions
diff --git a/community/awesome/01-fix_glib2_build.patch b/community/awesome/01-fix_glib2_build.patch
new file mode 100644
index 000000000..aeab63fbb
--- /dev/null
+++ b/community/awesome/01-fix_glib2_build.patch
@@ -0,0 +1,31 @@
+From d3d8160e273b56d0262d2570cfa6bcb76b9ea771 Mon Sep 17 00:00:00 2001
+From: Thomas Moschny <thomas.moschny@gmx.de>
+Date: Wed, 14 Dec 2011 20:00:53 +0100
+Subject: [PATCH] Fix build with glib2 2.31.0
+
+Starting with glib2 2.31.0, It is no longer possible to
+include individual headers (like "ghash.h") -- you must
+#include <glib.h>.
+
+Signed-off-by: Thomas Moschny <thomas.moschny@gmx.de>
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+ spawn.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/spawn.c b/spawn.c
+index 3c8cf07..a6d6c5e 100644
+--- a/spawn.c
++++ b/spawn.c
+@@ -24,7 +24,7 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+
+-#include <glib/gspawn.h>
++#include <glib.h>
+
+ #include "spawn.h"
+ #include "screen.h"
+--
+1.7.2.5
+
diff --git a/community/awesome/PKGBUILD b/community/awesome/PKGBUILD
new file mode 100644
index 000000000..b67f9c548
--- /dev/null
+++ b/community/awesome/PKGBUILD
@@ -0,0 +1,64 @@
+# $Id: PKGBUILD 70615 2012-05-12 21:06:01Z ibiru $
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
+# Contributor: xduugu
+# Contributor: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Vesa Kaihlavirta
+
+pkgname=awesome
+pkgver=3.4.11
+pkgrel=4
+pkgdesc='Highly configurable framework window manager'
+arch=('i686' 'x86_64')
+url='http://awesome.naquadah.org/'
+license=('GPL2')
+depends=(
+ 'cairo'
+ 'dbus'
+ 'imlib2'
+ 'libev'
+ 'libxdg-basedir'
+ 'lua'
+ 'pango'
+ 'startup-notification'
+ 'xcb-util-image'
+ 'xcb-util-keysyms'
+ 'xcb-util-wm'
+ 'xorg-xmessage'
+)
+makedepends=(
+ 'asciidoc'
+ 'cmake'
+ 'docbook-xsl'
+ 'doxygen'
+ 'gperf'
+ 'imagemagick'
+ 'luadoc'
+ 'xmlto'
+)
+optdepends=(
+ 'rlwrap: readline support for awesome-client'
+ 'feh: image background setter for awsetbg'
+)
+provides=('notification-daemon')
+source=("$url/download/$pkgname-$pkgver.tar.xz"
+ "$pkgname.desktop"
+ '01-fix_glib2_build.patch')
+md5sums=('d6aa71334b5cd4ef63ce69d6c612ecf2'
+ '0fdbeec43d211c6750041d7e37611a6a'
+ 'baa179074c36e26ef156ebb2060bfd5c')
+
+build() {
+ cd $pkgname-$pkgver
+ # to remove in 3.4.12
+ patch -N -p1 -i ../01-fix_glib2_build.patch
+ make CMAKE_ARGS=' -DPREFIX=/usr -DSYSCONFDIR=/etc -DCMAKE_BUILD_TYPE=RELEASE'
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ # install desktop file so you can start awesome from your login manager
+ install -Dm644 ../awesome.desktop "$pkgdir/usr/share/xsessions/awesome.desktop"
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community/awesome/awesome.desktop b/community/awesome/awesome.desktop
new file mode 100644
index 000000000..453399c6e
--- /dev/null
+++ b/community/awesome/awesome.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Awesome
+Comment=Highly configurable framework window manager
+Type=XSession
+Exec=awesome
+TryExec=awesome
diff --git a/community/gtranslator/PKGBUILD b/community/gtranslator/PKGBUILD
index 9396b8ee2..80c0e2552 100644
--- a/community/gtranslator/PKGBUILD
+++ b/community/gtranslator/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 70021 2012-04-28 09:24:13Z allan $
+# $Id: PKGBUILD 70590 2012-05-12 10:14:49Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Christer Solskogen (solskogen@carebears.mine.nu)
pkgname=gtranslator
-pkgver=2.91.3
-pkgrel=3
+pkgver=2.91.4
+pkgrel=1
pkgdesc="An enhanced gettext po file editor for the GNOME"
arch=('i686' 'x86_64')
url="http://projects.gnome.org/gtranslator/"
@@ -32,3 +32,4 @@ package() {
make DESTDIR=${pkgdir} install
}
+sha256sums=('af4ede1495c0c52ecc1e7bd36c8ee6ce0bb35525144d687d1ce7cb4bf6630826')
diff --git a/community/gtranslator/gtranslator.changelog b/community/gtranslator/gtranslator.changelog
index c9b484e39..712c1cb22 100644
--- a/community/gtranslator/gtranslator.changelog
+++ b/community/gtranslator/gtranslator.changelog
@@ -1,3 +1,6 @@
+2011-10-28 Jaroslav Lichtblau (Dragonlord) <dragonlord@aur.archlinux.org>
+ * gtranslator 2.91.4-1
+
2012-04-23 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
* gtranslator 2.91.3-2
rebuild for gdl 3.4.2
diff --git a/community/guichan/PKGBUILD b/community/guichan/PKGBUILD
index 787656283..032274d45 100644
--- a/community/guichan/PKGBUILD
+++ b/community/guichan/PKGBUILD
@@ -1,31 +1,32 @@
-# $Id: PKGBUILD 57204 2011-10-23 23:29:35Z andrea $
-# Maintainer: Mateusz Herych <heniekk@gmail.com>
+# $Id: PKGBUILD 70598 2012-05-12 11:22:15Z jlichtblau $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: Bjørn Lindeijer <bjorn@lindeijer.nl>
pkgname=guichan
pkgver=0.8.2
-pkgrel=2
+pkgrel=3
pkgdesc="A portable C++ GUI library designed for games using Allegro, SDL and/or OpenGL."
arch=('i686' 'x86_64')
url="http://guichan.sourceforge.net/"
license=('BSD')
-makedepends=('sdl_image' 'allegro' 'libgl' 'glut')
-conflicts=('guichan-sdl' 'guichan-allegro' 'guichan-opengl' 'guichan-glut')
-provides=('guichan-sdl' 'guichan-allegro' 'guichan-opengl' 'guichan-glut')
-options=(!libtool !strip)
+makedepends=('sdl_image' 'allegro4' 'libgl' 'glut')
+options=('!libtool' '!strip')
source=(http://guichan.googlecode.com/files/$pkgname-$pkgver.tar.gz)
-md5sums=('af535d7f387e774e3197cef8023ea105')
+sha256sums=('eedf206eae5201eaae027b133226d0793ab9a287bfd74c5f82c7681e3684eeab')
build() {
- cd $srcdir/$pkgname-$pkgver
- CXXFLAGS="-g" ./configure --prefix=/usr
- make
+ cd ${srcdir}/$pkgname-$pkgver
+
+ CXXFLAGS="-g" ./configure --prefix=/usr
+ make
}
package() {
- cd $srcdir/$pkgname-$pkgver
- make prefix=$pkgdir/usr install
+ cd ${srcdir}/$pkgname-$pkgver
+
+ make prefix=${pkgdir}/usr install
- # Install the license, as required for BSD
- install -m644 -D COPYING $startdir/pkg/usr/share/licenses/$pkgname/LICENSE
+# Install the license, as required for BSD
+ install -m644 -D COPYING ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
}
diff --git a/community/i3lock/PKGBUILD b/community/i3lock/PKGBUILD
index 06090d7be..445f2ce50 100644
--- a/community/i3lock/PKGBUILD
+++ b/community/i3lock/PKGBUILD
@@ -1,22 +1,22 @@
-# $Id: PKGBUILD 68957 2012-04-06 14:24:01Z ttopper $
+# $Id: PKGBUILD 70612 2012-05-12 19:42:37Z ttopper $
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
pkgname=i3lock
pkgver=2.4
-pkgrel=1
+pkgrel=2
pkgdesc="An improved screenlocker based upon XCB and PAM"
arch=('i686' 'x86_64')
url="http://i3wm.org/i3lock/"
license=('MIT')
groups=("i3")
-depends=('xcb-util-image' 'xcb-util-keysyms' 'pam' 'libev' 'libx11')
+depends=('xcb-util-image' 'xcb-util-keysyms' 'pam' 'libev' 'libx11' 'cairo')
options=('docs')
source=("http://i3wm.org/i3lock/$pkgname-$pkgver.tar.bz2")
md5sums=('728e2654d886ef97449708f0135e9fa5')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- make NOLIBCAIRO=y
+ make
gzip i3lock.1
}
diff --git a/community/i3status/PKGBUILD b/community/i3status/PKGBUILD
index ea08b20a1..c0d05b495 100644
--- a/community/i3status/PKGBUILD
+++ b/community/i3status/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 70239 2012-05-02 17:41:16Z ttopper $
+# $Id: PKGBUILD 70601 2012-05-12 12:03:50Z ttopper $
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
pkgname=i3status
-pkgver=2.5
+pkgver=2.5.1
pkgrel=1
pkgdesc="Generates status bar to use with dzen2 or xmobar"
arch=('i686' 'x86_64')
@@ -15,7 +15,7 @@ backup=('etc/i3status.conf')
install=i3status.install
options=('docs')
source=("http://i3.zekjur.net/i3status/$pkgname-$pkgver.tar.bz2")
-md5sums=('6c3c1d91fae1dc939a517bc3b853f65f')
+md5sums=('28c27fc0c2294e12ae6ae390f3d89973')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/community/kid3/PKGBUILD b/community/kid3/PKGBUILD
index 2e267a527..5b68cc28e 100644
--- a/community/kid3/PKGBUILD
+++ b/community/kid3/PKGBUILD
@@ -1,30 +1,28 @@
-# $Id: PKGBUILD 67670 2012-03-13 17:34:12Z lcarlier $
+# $Id: PKGBUILD 70617 2012-05-12 21:33:45Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Alois Nespor <alois.nespor@gmail.com>
pkgname=kid3
-pkgver=2.0.1
-pkgrel=2
+pkgver=2.1
+pkgrel=1
pkgdesc="An MP3, Ogg/Vorbis and FLAC tag editor for KDE"
arch=('i686' 'x86_64')
url="http://kid3.sourceforge.net/"
license=('GPL')
depends=('id3lib' 'qt' 'tunepimp' 'kdelibs')
-makedepends=('automoc4' 'cmake' 'docbook-xml' 'docbook-xsl')
+makedepends=('automoc4' 'cmake' 'docbook-xml' 'docbook-xsl' 'chromaprint')
options=('!makeflags')
install=$pkgname.install
changelog=$pkgname.changelog
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
-sha256sums=('32c3bdf5a3f170076e46c5f3b9523f688e8ea6265d22d2264c1bcd318da9f32e')
+sha256sums=('8925bde1a773d767ee9695229e65dfd64dc13edf850294560478f2e02ecc6225')
build() {
cd ${srcdir}
mkdir build
cd build
- cmake ../${pkgname}-${pkgver} \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release
+ cmake ../${pkgname}-${pkgver} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
make
}
diff --git a/community/kid3/kid3.changelog b/community/kid3/kid3.changelog
index 824a2406a..8c440c611 100644
--- a/community/kid3/kid3.changelog
+++ b/community/kid3/kid3.changelog
@@ -1,3 +1,6 @@
+2012-05-12 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+ * kid3 2.1-1
+
2011-11-20 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
* kid3 2.0.1-1
diff --git a/community/openbox/PKGBUILD b/community/openbox/PKGBUILD
index 518ab71af..47e6573b4 100644
--- a/community/openbox/PKGBUILD
+++ b/community/openbox/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 70562 2012-05-11 14:02:30Z bpiotrowski $
+# $Id: PKGBUILD 70588 2012-05-12 09:12:54Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
@@ -6,7 +6,7 @@
pkgname=openbox
pkgver=3.5.0
-pkgrel=6
+pkgrel=7
pkgdesc="A highly configurable and lightweight X11 window manager"
arch=('i686' 'x86_64')
url="http://openbox.org"
@@ -20,16 +20,19 @@ options=('!libtool')
backup=('etc/xdg/openbox/menu.xml' 'etc/xdg/openbox/rc.xml')
source=(http://www.icculus.org/openbox/releases/${pkgname}-${pkgver}.tar.gz
which-2.20.patch
- movesize.patch)
+ movesize.patch
+ title-matching.patch)
md5sums=('00441b53cf14c03566c8e82643544ff9'
'7ca3b5244bb092d46f5bcf1e2bdf4a18'
- 'e09d77842aac9a0cd7eebe112df88383')
+ 'e09d77842aac9a0cd7eebe112df88383'
+ '6f99711eee0b1c413dca9fa691917b71')
build() {
cd "${srcdir}"/${pkgname}-${pkgver}
- patch -Np1 -i "${srcdir}"/which-2.20.patch # FS#11455
- patch -Np1 -i "${srcdir}"/movesize.patch # FS#29812
+ patch -Np1 -i "${srcdir}"/which-2.20.patch # FS#11455
+ patch -Np1 -i "${srcdir}"/movesize.patch # FS#29812
+ patch -Np0 -i "${srcdir}"/title-matching.patch # FS#5277 on Openbox bugtracker
sed -i 's|/usr/bin/env python|/usr/bin/env python2|' \
data/autostart/openbox-xdg-autostart
diff --git a/community/openbox/title-matching.patch b/community/openbox/title-matching.patch
new file mode 100644
index 000000000..88ed73546
--- /dev/null
+++ b/community/openbox/title-matching.patch
@@ -0,0 +1,11 @@
+--- openbox/client.c 2011-08-01 22:14:58.000000000 +0200
++++ openbox/client.c 2011-10-22 14:59:56.000000000 +0200
+@@ -883,7 +883,7 @@
+ !g_pattern_match(app->role,
+ strlen(self->role), self->role, NULL))
+ match = FALSE;
+- else if (app->title &&
++ else if (app->title && self->title &&
+ !g_pattern_match(app->title,
+ strlen(self->title), self->title, NULL))
+ match = FALSE;
diff --git a/community/pigeonhole/PKGBUILD b/community/pigeonhole/PKGBUILD
index 6856d702f..9b6c3efaf 100644
--- a/community/pigeonhole/PKGBUILD
+++ b/community/pigeonhole/PKGBUILD
@@ -4,12 +4,12 @@
# This must be built against the version of dovecot being used,
# else mail delivery will fail.
# Specify the version of dovecot to be used here:
-_dcpkgver=2.1.5
+_dcpkgver=2.1.6
# Make sure to bump pkgrel if changing this.
pkgname=pigeonhole
pkgver=0.3.0
-pkgrel=6
+pkgrel=7
pkgdesc="Fully rewritten Sieve implementation for Dovecot v2.1"
arch=('i686' 'x86_64')
url="http://pigeonhole.dovecot.org/"
diff --git a/community/powertop/PKGBUILD b/community/powertop/PKGBUILD
index 2f981488c..8b76e9d03 100644
--- a/community/powertop/PKGBUILD
+++ b/community/powertop/PKGBUILD
@@ -1,31 +1,29 @@
-# $Id: PKGBUILD 67110 2012-03-04 12:47:55Z stativ $
+# $Id: PKGBUILD 70596 2012-05-12 11:08:44Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Xilon <xilonmu@gmail.com>
pkgname=powertop
-pkgver=1.13
-pkgrel=3
-pkgdesc="Tool that finds the software that makes your laptop use more power than necessary"
+pkgver=2.0
+pkgrel=1
+pkgdesc="A tool to diagnose issues with power consumption and power management"
arch=('i686' 'x86_64')
-url="http://www.lesswatts.org/projects/powertop/"
+url="https://01.org/powertop/"
license=('GPL2')
-depends=('ncurses')
-source=(http://www.lesswatts.org/projects/powertop/download/$pkgname-$pkgver.tar.gz \
- powertop-1.13-with-3.0.6.patch)
-md5sums=('78aa17c8f55178004223bf236654298e'
- '2b4c9d75fb0f5c96bcd549bcbbeb9c9d')
+depends=('libnl' 'ncurses')
+changelog=$pkgname.changelog
+source=(https://01.org/powertop/sites/default/files/downloads/$pkgname-$pkgver.tar.bz2)
+sha256sums=('7af51d320856b3446bcc314c9414385f3b05b9360f650883b0210cd3b12c5c1c')
build() {
- cd "$srcdir/powertop-$pkgver"
-
- # fix the reported batery usage on recent kernels
- patch -Np1 < "$srcdir/powertop-1.13-with-3.0.6.patch" || true
+ cd ${srcdir}/$pkgname-$pkgver
+ ./configure --prefix=/usr
make
}
package() {
- cd "$srcdir/powertop-$pkgver"
- make DESTDIR="$pkgdir" install
+ cd ${srcdir}/$pkgname-$pkgver
+
+ make DESTDIR=${pkgdir} install
}
diff --git a/community/powertop/powertop.changelog b/community/powertop/powertop.changelog
new file mode 100644
index 000000000..7e8deb15d
--- /dev/null
+++ b/community/powertop/powertop.changelog
@@ -0,0 +1,2 @@
+2012-05-12 Jaroslav Lichtblau (Dragonlord) <dragonlord@aur.archlinux.org>
+ * powertop 2.0-1
diff --git a/core/kmod/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch b/core/kmod/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch
new file mode 100644
index 000000000..30c92b280
--- /dev/null
+++ b/core/kmod/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch
@@ -0,0 +1,35 @@
+From c7d5a60d3df735a3816bbc1ff1b416a803a4f7a6 Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@archlinux.org>
+Date: Mon, 7 May 2012 19:41:41 -0400
+Subject: [PATCH 1/2] libkmod-file: gracefully handle errors from zlib
+
+zlib won't necessarily set the system errno, and this is particularly
+evident on corrupted data (which results in a double free). Use zlib's
+gzerror to detect the failure, returning a generic EINVAL when zlib
+doesn't provide us with an errno.
+---
+ libkmod/libkmod-file.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/libkmod/libkmod-file.c b/libkmod/libkmod-file.c
+index 46ad8d9..8beb7e3 100644
+--- a/libkmod/libkmod-file.c
++++ b/libkmod/libkmod-file.c
+@@ -199,7 +199,13 @@ static int load_zlib(struct kmod_file *file)
+ if (r == 0)
+ break;
+ else if (r < 0) {
+- err = -errno;
++ int gzerr;
++ const char *gz_errmsg = gzerror(file->gzf, &gzerr);
++
++ ERR(file->ctx, "gzip: %s\n", gz_errmsg);
++
++ /* gzip might not set errno here */
++ err = gzerr == Z_ERRNO ? -errno : -EINVAL;
+ goto error;
+ }
+ did += r;
+--
+1.7.10.1
+
diff --git a/core/kmod/0002-depmod-report-failures-in-loading-symbols.patch b/core/kmod/0002-depmod-report-failures-in-loading-symbols.patch
new file mode 100644
index 000000000..90c58d5da
--- /dev/null
+++ b/core/kmod/0002-depmod-report-failures-in-loading-symbols.patch
@@ -0,0 +1,34 @@
+From 819f79a24d58e3c8429f1631df2f8f85a2f95d4a Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@archlinux.org>
+Date: Mon, 7 May 2012 19:41:42 -0400
+Subject: [PATCH 2/2] depmod: report failures in loading symbols
+
+Previously, depmod would relegate failures of kmod_module_get_symbols()
+to debug output, assuming the "error" was simply a lack of symbols.
+Leave the ENOENT return to debug output, but report anything else as a
+real error.
+---
+ tools/kmod-depmod.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c
+index e89dff6..bceb407 100644
+--- a/tools/kmod-depmod.c
++++ b/tools/kmod-depmod.c
+@@ -1542,8 +1542,11 @@ static int depmod_load_symbols(struct depmod *depmod)
+ struct kmod_list *l, *list = NULL;
+ int err = kmod_module_get_symbols(mod->kmod, &list);
+ if (err < 0) {
+- DBG("ignoring %s: no symbols: %s\n",
+- mod->path, strerror(-err));
++ if (err == -ENOENT)
++ DBG("ignoring %s: no symbols\n", mod->path);
++ else
++ ERR("failed to load symbols from %s: %s\n",
++ mod->path, strerror(-err));
+ continue;
+ }
+ kmod_list_foreach(l, list) {
+--
+1.7.10.1
+
diff --git a/core/kmod/PKGBUILD b/core/kmod/PKGBUILD
index b7b888031..65a607ea4 100644
--- a/core/kmod/PKGBUILD
+++ b/core/kmod/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 157131 2012-04-24 12:21:20Z dreisner $
+# $Id: PKGBUILD 158851 2012-05-12 13:02:54Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
pkgname=kmod
pkgver=8
-pkgrel=1
+pkgrel=2
pkgdesc="Linux kernel module handling"
arch=('i686' 'x86_64')
url='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary'
@@ -16,17 +16,25 @@ replaces=('module-init-tools')
source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz"
"depmod-search.conf"
"0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch"
- "0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch")
+ "0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch"
+ "0001-libkmod-file-gracefully-handle-errors-from-zlib.patch"
+ "0002-depmod-report-failures-in-loading-symbols.patch")
md5sums=('d4e3d038b5370b1e8ff237c55666aa64'
'dd62cbf62bd8f212f51ef8c43bec9a77'
'ba73b9e98db1abbf41274f922fcfbd55'
- 'c9af56636c5667cf4ce3a31ea56e03d9')
+ 'c9af56636c5667cf4ce3a31ea56e03d9'
+ '1a877b9863b94f91c8d3aec97c021c6b'
+ '1a9f132779f90556852e70279577ed22')
build() {
cd "$pkgname-$pkgver"
- patch -p1 -i ../0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch
- patch -p1 -i ../0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch
+ patch -Np1 <"$srcdir"/0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch
+ patch -Np1 <"$srcdir"/0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch
+
+ # fix crash on corrupted zlib compression
+ patch -Np1 <"$srcdir"/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch
+ patch -Np1 <"$srcdir"/0002-depmod-report-failures-in-loading-symbols.patch
./configure \
--sysconfdir=/etc \
diff --git a/extra/cairo/PKGBUILD b/extra/cairo/PKGBUILD
index 218ab470a..d57a5c8b6 100644
--- a/extra/cairo/PKGBUILD
+++ b/extra/cairo/PKGBUILD
@@ -1,38 +1,57 @@
-# $Id: PKGBUILD 148684 2012-02-05 11:46:48Z ibiru $
+# $Id: PKGBUILD 158854 2012-05-12 13:09:25Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Brice Carpentier <brice@daknet.org>
pkgname=cairo
-pkgver=1.10.2
-pkgrel=3
+#_gitdate=20120426
+#_gitver=957a9cc619965178a8927d114fe852034fc2385c
+pkgver=1.12.2
+pkgrel=1
pkgdesc="Cairo vector graphics library"
arch=(i686 x86_64)
license=('LGPL' 'MPL')
url="http://cairographics.org/"
depends=('libpng' 'libxrender' 'fontconfig' 'pixman' 'glib2' 'sh')
+makedepends=('librsvg' 'poppler-glib' 'libspectre' 'gtk-doc') # 'libdrm')
+optdepends=('xcb-util: for XCB backend') # really needed?
+provides=('cairo-xcb')
+replaces=('cairo-xcb')
options=('!libtool')
-source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.gz
- cairo-1.10.0-buggy_gradients.patch)
-sha1sums=('ccce5ae03f99c505db97c286a0c9a90a926d3c6e'
- '8b843a9934e5112b6188e5bcf4adfc1fdaf9fa04')
+source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.xz
+ #$pkgname-$pkgver.tar.gz::http://cgit.freedesktop.org/cairo/snapshot/cairo-${_gitver}.tar.gz
+ cairo-1.10.0-buggy_gradients.patch
+ #git_fixes.patch
+)
+md5sums=('87649eb75789739d517c743e94879e51'
+ '9b323790dab003e228c6955633cb888e')
build() {
cd "$srcdir/$pkgname-$pkgver"
- patch -Np1 -i "${srcdir}/cairo-1.10.0-buggy_gradients.patch"
+ #cd ${srcdir}/${pkgname}-${_gitver}
+ patch -Np1 -i ${srcdir}/cairo-1.10.0-buggy_gradients.patch
+ # status is 2012-04-26 last commit: image: Fix typo in _blit_spans()
+ #patch -Np1 -i ${srcdir}/git_fixes.patch
+ autoreconf -vfi
+ #./autogen.sh --prefix=/usr \
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
- --enable-tee
+ --enable-tee \
+ --disable-xlib-xcb \
+ # --enable-test-surfaces \ takes ages
+ #--enable-drm # breaks build
make
}
-check() {
- cd "$srcdir/$pkgname-$pkgver"
- make check || /bin/true # 248 Passed, 65 Failed [2 crashed, 8 expected], 28 Skipped
-}
+#check() {
+# #cd "$srcdir/$pkgname-$pkgver"
+# cd $srcdir/$pkgname-${_gitver}
+# make -k check || /bin/true # 165 Passed, 316 Failed [3 crashed, 10 expected], 23 Skipped
+#}
package() {
cd "$srcdir/$pkgname-$pkgver"
+ #cd $srcdir/$pkgname-${_gitver}
make DESTDIR="$pkgdir" install
}
diff --git a/extra/cairo/git_fixes.patch b/extra/cairo/git_fixes.patch
new file mode 100644
index 000000000..6ad8979eb
--- /dev/null
+++ b/extra/cairo/git_fixes.patch
@@ -0,0 +1,1086 @@
+From ede11b2954db19e3ca9d31cef7d04a7bf0e42ddc Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun, 25 Mar 2012 18:37:14 +0000
+Subject: Fix math in comments
+
+---
+diff --git a/src/cairo-arc.c b/src/cairo-arc.c
+index dc07fee..6977e88 100644
+--- a/src/cairo-arc.c
++++ b/src/cairo-arc.c
+@@ -139,7 +139,7 @@ _arc_segments_needed (double angle,
+
+ From that paper, a very practical value of h is:
+
+- h = 4/3 * tan(angle/4)
++ h = 4/3 * R * tan(angle/4)
+
+ This value does not give the spline with minimal error, but it does
+ provide a very good approximation, (6th-order convergence), and the
+--
+cgit v0.9.0.2-2-gbebe
+From fba21ef2a4c4eb343668267fda713aedbb6af2a4 Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Tue, 27 Mar 2012 21:25:37 +0000
+Subject: gl: use font's antialias option to check whether it needs mask
+
+There is need to loop over number of glyphs to check wether the glyph
+image is a ARGB32 as the font's antialias option can be used for checking.
+If antialias is SUBPIXEL or BEST, the glyph surface will be ARGB32,
+otherwise it will be A8 format. Therefore we will only be using
+component-alpha at SUBPIXEL (or better) font quality and only then need
+a mask for multiple pass glyph composition.
+---
+diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
+index 832956f..9756ea4 100644
+--- a/src/cairo-gl-glyphs.c
++++ b/src/cairo-gl-glyphs.c
+@@ -427,23 +427,15 @@ _cairo_gl_composite_glyphs (void *_dst,
+
+ TRACE ((stderr, "%s\n", __FUNCTION__));
+
+- /* If any of the glyphs are component alpha, we have to go through a mask,
+- * since only _cairo_gl_surface_composite() currently supports component
+- * alpha.
++ /* If any of the glyphs require component alpha, we have to go through
++ * a mask, since only _cairo_gl_surface_composite() currently supports
++ * component alpha.
+ */
+- if (!dst->base.is_clear && ! info->use_mask && op != CAIRO_OPERATOR_OVER) {
+- for (i = 0; i < info->num_glyphs; i++) {
+- cairo_scaled_glyph_t *scaled_glyph;
+-
+- if (_cairo_scaled_glyph_lookup (info->font, info->glyphs[i].index,
+- CAIRO_SCALED_GLYPH_INFO_SURFACE,
+- &scaled_glyph) == CAIRO_INT_STATUS_SUCCESS &&
+- scaled_glyph->surface->format == CAIRO_FORMAT_ARGB32)
+- {
+- info->use_mask = TRUE;
+- break;
+- }
+- }
++ if (!dst->base.is_clear && ! info->use_mask && op != CAIRO_OPERATOR_OVER &&
++ (info->font->options.antialias == CAIRO_ANTIALIAS_SUBPIXEL ||
++ info->font->options.antialias == CAIRO_ANTIALIAS_BEST))
++ {
++ info->use_mask = TRUE;
+ }
+
+ if (info->use_mask) {
+--
+cgit v0.9.0.2-2-gbebe
+From d304f0e57be8036719c3709e2419487326369105 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed, 28 Mar 2012 23:32:36 +0000
+Subject: composite-rectangles: Trim extents for SOURCE and CLEAR to the mask
+
+The SOURCE and CLEAR are the odd pair in Cairo's range of operators that
+are bound by the shape/mask, but are unbound by the source. This
+regularly leads to bugs as only track the bound/unbound rectangles and
+confuse the meaning when bound only by the mask.
+
+What is required is that the unbound extents in this case is only
+trimmed by the mask (the bounded extents are still the intersection of
+all).
+
+Fixes bug-source-cu
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c
+index 106571e..8c5cd5a 100644
+--- a/src/cairo-composite-rectangles.c
++++ b/src/cairo-composite-rectangles.c
+@@ -147,8 +147,12 @@ _cairo_composite_rectangles_intersect (cairo_composite_rectangles_t *extents,
+ if (! ret && extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK)
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+ if (_cairo_clip_is_all_clipped (extents->clip))
+@@ -199,8 +203,12 @@ _cairo_composite_rectangles_intersect_source_extents (cairo_composite_rectangles
+ rect.height == extents->bounded.height)
+ return CAIRO_INT_STATUS_SUCCESS;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ clip = extents->clip;
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+@@ -253,8 +261,12 @@ _cairo_composite_rectangles_intersect_mask_extents (cairo_composite_rectangles_t
+ mask.height == extents->bounded.height)
+ return CAIRO_INT_STATUS_SUCCESS;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ clip = extents->clip;
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+--
+cgit v0.9.0.2-2-gbebe
+From af6e084dd78fcbb8ecce46c57f655f5e24343b8c Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu, 29 Mar 2012 13:48:24 +0000
+Subject: cairoint: Mark PDF surface as requiring the deflate stream output
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairoint.h b/src/cairoint.h
+index 9a8003e..9f20d51 100644
+--- a/src/cairoint.h
++++ b/src/cairoint.h
+@@ -73,7 +73,10 @@
+ #include "cairo-compiler-private.h"
+ #include "cairo-error-private.h"
+
+-#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_SCRIPT_SURFACE || CAIRO_HAS_XML_SURFACE
++#if CAIRO_HAS_PDF_SURFACE || \
++ CAIRO_HAS_PS_SURFACE || \
++ CAIRO_HAS_SCRIPT_SURFACE || \
++ CAIRO_HAS_XML_SURFACE
+ #define CAIRO_HAS_DEFLATE_STREAM 1
+ #endif
+
+@@ -84,7 +87,9 @@
+ #define CAIRO_HAS_FONT_SUBSET 1
+ #endif
+
+-#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_PDF_SURFACE || CAIRO_HAS_FONT_SUBSET
++#if CAIRO_HAS_PS_SURFACE || \
++ CAIRO_HAS_PDF_SURFACE || \
++ CAIRO_HAS_FONT_SUBSET
+ #define CAIRO_HAS_PDF_OPERATORS 1
+ #endif
+
+--
+cgit v0.9.0.2-2-gbebe
+From a965b0f95fdeb567f7ccb51f7c8c47735a61e2d9 Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Thu, 29 Mar 2012 01:08:51 +0000
+Subject: gl: fix y-axis origin when map_to_image() for non texture GL surface
+
+We need to fix y-axis origin when map a GL surface to image surface for
+non-texture GL surface.
+
+Test cases: extended-blend-alpha-mask, extended-blend-mask.
+Although the image outputs is not right, but the image on the first grid
+(upper-left corner) is correct comparing to image output.
+---
+diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
+index 8bbf939..32ecf63 100644
+--- a/src/cairo-gl-surface.c
++++ b/src/cairo-gl-surface.c
+@@ -985,6 +985,7 @@ _cairo_gl_surface_map_to_image (void *abstract_surface,
+ unsigned int cpp;
+ cairo_bool_t invert;
+ cairo_status_t status;
++ int y;
+
+ /* Want to use a switch statement here but the compiler gets whiny. */
+ if (surface->base.content == CAIRO_CONTENT_COLOR_ALPHA) {
+@@ -1065,7 +1066,12 @@ _cairo_gl_surface_map_to_image (void *abstract_surface,
+ glPixelStorei (GL_PACK_ROW_LENGTH, image->stride / cpp);
+ if (invert)
+ glPixelStorei (GL_PACK_INVERT_MESA, 1);
+- glReadPixels (extents->x, extents->y,
++
++ y = extents->y;
++ if (! _cairo_gl_surface_is_texture (surface))
++ y = surface->height - extents->y - extents->height;
++
++ glReadPixels (extents->x, y,
+ extents->width, extents->height,
+ format, type, image->data);
+ if (invert)
+--
+cgit v0.9.0.2-2-gbebe
+From c77112c5464d7ff21052527f82f4d729cc509291 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psychon@znc.in>
+Date: Mon, 02 Apr 2012 18:43:00 +0000
+Subject: xcb: Fix SHM in _get_image()
+
+Commit 2283ab9 introduced a logic error. Instead of falling back to the non-SHM
+path when getting the image via SHM failed, we now did the fallback when getting
+the image via SHM worked (which means that the SHM operation was a waste of
+time).
+
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
+index fff4f52..6bedbda 100644
+--- a/src/cairo-xcb-surface.c
++++ b/src/cairo-xcb-surface.c
+@@ -367,7 +367,7 @@ _get_image (cairo_xcb_surface_t *surface,
+ if (use_shm) {
+ image = _get_shm_image (surface, x, y, width, height);
+ if (image) {
+- if (image->status) {
++ if (image->status == CAIRO_STATUS_SUCCESS) {
+ _cairo_xcb_connection_release (connection);
+ return image;
+ }
+--
+cgit v0.9.0.2-2-gbebe
+From cc247c346b75353f16ab40ac74c54cdd9663d16b Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Mon, 02 Apr 2012 21:29:47 +0000
+Subject: gl: Remove an unused variable
+
+---
+diff --git a/src/cairo-gl-gradient.c b/src/cairo-gl-gradient.c
+index b364b92..ce7c0dd 100644
+--- a/src/cairo-gl-gradient.c
++++ b/src/cairo-gl-gradient.c
+@@ -207,7 +207,6 @@ _cairo_gl_gradient_create (cairo_gl_context_t *ctx,
+ cairo_status_t status;
+ int tex_width;
+ void *data;
+- cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
+
+ if ((unsigned int) ctx->max_texture_size / 2 <= n_stops)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+--
+cgit v0.9.0.2-2-gbebe
+From 7a262fd398c8a1f3c9052e8d9ec459e27ff91b4d Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Wed, 04 Apr 2012 10:23:09 +0000
+Subject: fix bug in _cairo_image_analyze_color
+
+---
+diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
+index 8208a15..e860e1b 100644
+--- a/src/cairo-image-surface.c
++++ b/src/cairo-image-surface.c
+@@ -1130,9 +1130,12 @@ _cairo_image_analyze_color (cairo_image_surface_t *image)
+ if (image->color != CAIRO_IMAGE_UNKNOWN_COLOR)
+ return image->color;
+
+- if (image->format == CAIRO_FORMAT_A1 || image->format == CAIRO_FORMAT_A8)
++ if (image->format == CAIRO_FORMAT_A1)
+ return image->color = CAIRO_IMAGE_IS_MONOCHROME;
+
++ if (image->format == CAIRO_FORMAT_A8)
++ return image->color = CAIRO_IMAGE_IS_GRAYSCALE;
++
+ if (image->format == CAIRO_FORMAT_ARGB32) {
+ image->color = CAIRO_IMAGE_IS_MONOCHROME;
+ for (y = 0; y < image->height; y++) {
+--
+cgit v0.9.0.2-2-gbebe
+From 70b2856ed3d31b41e69b3d82fb9c5c11c2b3d3d4 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Thu, 05 Apr 2012 23:43:35 +0000
+Subject: type1-subset: use fallback font if glyph widths are calculated
+
+Bug 48349 has a pdf file with a Type 1 font where the glyph widths are
+of the form:
+
+34 9302 19 div hsbw
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index 607ac8e..ba1008a 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -751,6 +751,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ command = *p++;
+ switch (command) {
+ case TYPE1_CHARSTRING_COMMAND_HSBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
+ font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+@@ -797,6 +800,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ break;
+
+ case TYPE1_CHARSTRING_COMMAND_SBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
+ font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+--
+cgit v0.9.0.2-2-gbebe
+From a6d955fcc46ae2da8d6f3b2cadeae64c03066461 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Thu, 05 Apr 2012 23:53:50 +0000
+Subject: fix indentation in cairo_type1_font_subset_parse_charstring
+
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index ba1008a..ddef8ae 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -1,3 +1,4 @@
++/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
+ /* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2006 Red Hat, Inc
+@@ -750,86 +751,79 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ if (*p < 32) {
+ command = *p++;
+ switch (command) {
+- case TYPE1_CHARSTRING_COMMAND_HSBW:
+- if (! last_op_was_integer)
+- return CAIRO_INT_STATUS_UNSUPPORTED;
++ case TYPE1_CHARSTRING_COMMAND_HSBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
++ font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_CALLSUBR:
++ if (font->subset_subrs &&
++ last_op_was_integer &&
++ font->build_stack.top_value >= 0 &&
++ font->build_stack.top_value < font->num_subrs)
++ {
++ subr_num = font->build_stack.top_value;
++ font->subrs[subr_num].used = TRUE;
++ last_op_was_integer = FALSE;
++ status = cairo_type1_font_subset_parse_charstring (font,
++ glyph,
++ font->subrs[subr_num].subr_string,
++ font->subrs[subr_num].subr_length);
++ } else {
++ font->subset_subrs = FALSE;
++ }
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_ESCAPE:
++ command = command << 8 | *p++;
++ switch (command) {
++ case TYPE1_CHARSTRING_COMMAND_SEAC:
++ /* The seac command takes five integer arguments. The
++ * last two are glyph indices into the PS standard
++ * encoding give the names of the glyphs that this
++ * glyph is composed from. All we need to do is to
++ * make sure those glyphs are present in the subset
++ * under their standard names. */
++ status = use_standard_encoding_glyph (font, font->build_stack.stack[3]);
++ if (unlikely (status))
++ return status;
++
++ status = use_standard_encoding_glyph (font, font->build_stack.stack[4]);
++ if (unlikely (status))
++ return status;
+
+- font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+ break;
+
+- case TYPE1_CHARSTRING_COMMAND_CALLSUBR:
+- if (font->subset_subrs &&
+- last_op_was_integer &&
+- font->build_stack.top_value >= 0 &&
+- font->build_stack.top_value < font->num_subrs)
+- {
+- subr_num = font->build_stack.top_value;
+- font->subrs[subr_num].used = TRUE;
+- last_op_was_integer = FALSE;
+- status = cairo_type1_font_subset_parse_charstring (font,
+- glyph,
+- font->subrs[subr_num].subr_string,
+- font->subrs[subr_num].subr_length);
+- } else {
+- font->subset_subrs = FALSE;
+- }
++ case TYPE1_CHARSTRING_COMMAND_SBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
++ font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
+ break;
+
+- case TYPE1_CHARSTRING_COMMAND_ESCAPE:
+- command = command << 8 | *p++;
+- switch (command) {
+- case TYPE1_CHARSTRING_COMMAND_SEAC:
+- /* The seac command takes five integer arguments. The
+- * last two are glyph indices into the PS standard
+- * encoding give the names of the glyphs that this
+- * glyph is composed from. All we need to do is to
+- * make sure those glyphs are present in the subset
+- * under their standard names. */
+- status = use_standard_encoding_glyph (font, font->build_stack.stack[3]);
+- if (unlikely (status))
+- return status;
+-
+- status = use_standard_encoding_glyph (font, font->build_stack.stack[4]);
+- if (unlikely (status))
+- return status;
+-
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_SBW:
+- if (! last_op_was_integer)
+- return CAIRO_INT_STATUS_UNSUPPORTED;
+-
+- font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
+- for (i = 0; i < font->build_stack.sp; i++)
+- font->ps_stack.other_subr_args[i] = font->build_stack.stack[i];
+- font->ps_stack.num_other_subr_args = font->build_stack.sp;
+- font->ps_stack.cur_other_subr_arg = 0;
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_POP:
+- if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) {
+- font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++];
+- last_op_was_integer = TRUE;
+- } else {
+- font->subset_subrs = FALSE;
+- }
+- break;
+-
+- default:
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
++ case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
++ for (i = 0; i < font->build_stack.sp; i++)
++ font->ps_stack.other_subr_args[i] = font->build_stack.stack[i];
++ font->ps_stack.num_other_subr_args = font->build_stack.sp;
++ font->ps_stack.cur_other_subr_arg = 0;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_POP:
++ if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) {
++ font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++];
++ last_op_was_integer = TRUE;
++ } else {
++ font->subset_subrs = FALSE;
+ }
+ break;
+
+@@ -837,6 +831,13 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+ break;
++ }
++ break;
++
++ default:
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
+ }
+ } else {
+ /* integer argument */
+--
+cgit v0.9.0.2-2-gbebe
+From 8886220b5027296f5b3b95e9c2f93509108d3b9e Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri, 06 Apr 2012 00:13:53 +0000
+Subject: type1-subset: if font name is prefixed with a subset tag, strip it off
+
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index ddef8ae..e507abe 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -381,6 +381,7 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font)
+ {
+ const char *start, *end, *segment_end;
+ char *s;
++ int i;
+
+ segment_end = font->header_segment + font->header_segment_size;
+ start = find_token (font->header_segment, segment_end, "/FontName");
+@@ -406,6 +407,16 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+ }
+
++ /* If font name is prefixed with a subset tag, strip it off. */
++ if (strlen(start) > 7 && start[6] == '+') {
++ for (i = 0; i < 6; i++) {
++ if (start[i] < 'A' || start[i] > 'Z')
++ break;
++ }
++ if (i == 6)
++ start += 7;
++ }
++
+ font->base.base_font = strdup (start);
+ free (s);
+ if (unlikely (font->base.base_font == NULL))
+--
+cgit v0.9.0.2-2-gbebe
+From 8657ca10e34b0034602680b4304d47ecf90ccbfd Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri, 06 Apr 2012 11:50:40 +0000
+Subject: fix _cairo_pattern_get_ink_extents to work with snapshot recording surfaces
+
+It had caused pdf bbox sizes to regress to page size bboxes.
+---
+diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
+index 27ba004..5b3e177 100644
+--- a/src/cairo-pattern.c
++++ b/src/cairo-pattern.c
+@@ -37,6 +37,7 @@
+ #include "cairo-path-private.h"
+ #include "cairo-pattern-private.h"
+ #include "cairo-recording-surface-private.h"
++#include "cairo-surface-snapshot-private.h"
+
+ #include <float.h>
+
+@@ -3666,6 +3667,9 @@ _cairo_pattern_get_ink_extents (const cairo_pattern_t *pattern,
+ (const cairo_surface_pattern_t *) pattern;
+ cairo_surface_t *surface = surface_pattern->surface;
+
++ if (_cairo_surface_is_snapshot (surface))
++ surface = _cairo_surface_snapshot_get_target (surface);
++
+ if (_cairo_surface_is_recording (surface)) {
+ cairo_matrix_t imatrix;
+ cairo_box_t box;
+--
+cgit v0.9.0.2-2-gbebe
+From 6f28f0b33cb12f3b2dd48c87da0018bd00c17107 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Sun, 08 Apr 2012 10:28:59 +0000
+Subject: stroke: Fix misuse of half_line_x for vertical caps on dashes
+
+A typo using half_line_x instead of half_line_y when emitting dashed
+segments of the rectilinear stroke.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-path-stroke-boxes.c b/src/cairo-path-stroke-boxes.c
+index 3e8c5a4..cc9dd19 100644
+--- a/src/cairo-path-stroke-boxes.c
++++ b/src/cairo-path-stroke-boxes.c
+@@ -342,15 +342,15 @@ _cairo_rectilinear_stroker_emit_segments_dashed (cairo_rectilinear_stroker_t *st
+ box.p1.x = box.p2.x - half_line_x;
+ }
+ if (out_slope.dy >= 0)
+- box.p1.y -= half_line_x;
++ box.p1.y -= half_line_y;
+ if (out_slope.dy <= 0)
+- box.p2.y += half_line_x;
++ box.p2.y += half_line_y;
+ } else {
+ if (box.p1.y <= box.p2.y) {
+ box.p1.y = box.p2.y;
+- box.p2.y += half_line_x;
++ box.p2.y += half_line_y;
+ } else {
+- box.p1.y = box.p2.y - half_line_x;
++ box.p1.y = box.p2.y - half_line_y;
+ }
+ if (out_slope.dx >= 0)
+ box.p1.x -= half_line_x;
+--
+cgit v0.9.0.2-2-gbebe
+From 113ec6bf0c8ed1ff12293d1ed2a2de9bd5b9904b Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Sun, 08 Apr 2012 16:58:13 +0000
+Subject: traps: Clip the trapezoid extents against the clip extents
+
+Just in case the clip polygon turns out to be much larger than the
+operation extents (silly us for not reducing it correctly) and lead to
+catastrophe, such as:
+
+Program received signal SIGSEGV, Segmentation fault.
+pixman_fill_sse2 (bits=<optimized out>, stride=4, bpp=8, x=0, y=0,
+width=3, height=-34811, data=0) at pixman-sse2.c:3369
+3369 *(uint16_t *)d = data;
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-traps-compositor.c b/src/cairo-traps-compositor.c
+index 284a0be..c49e208 100644
+--- a/src/cairo-traps-compositor.c
++++ b/src/cairo-traps-compositor.c
+@@ -218,8 +218,13 @@ combine_clip_as_traps (const cairo_traps_compositor_t *compositor,
+ _cairo_traps_fini (&traps);
+ cairo_surface_destroy (src);
+
+- if (status == CAIRO_INT_STATUS_SUCCESS &&
+- (fixup.width < extents->width || fixup.height < extents->height)) {
++ if (unlikely (status))
++ return status;
++
++ if (! _cairo_rectangle_intersect (&fixup, extents))
++ return CAIRO_STATUS_SUCCESS;
++
++ if (fixup.width < extents->width || fixup.height < extents->height) {
+ cairo_boxes_t clear;
+
+ _cairo_boxes_init (&clear);
+--
+cgit v0.9.0.2-2-gbebe
+From de61681574eb7d6e0e497ea7f25797e3d9b20ac4 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon, 09 Apr 2012 11:47:34 +0000
+Subject: build: Disable -Wset-but-unused-variable
+
+This is too noisy in the current build, and masking more important
+warnings.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
+index 3eb0104..f1b17f4 100644
+--- a/build/configure.ac.warnings
++++ b/build/configure.ac.warnings
+@@ -21,6 +21,9 @@ MAYBE_WARN="-Wall -Wextra \
+ -Wno-missing-field-initializers -Wno-unused-parameter \
+ -Wno-attributes -Wno-long-long -Winline"
+
++# -Wunused-but-set-variable is too noisy at present
++NO_WARN="-Wno-unused-but-set-variable"
++
+ dnl Sun Studio 12 likes to rag at us for abusing enums like
+ dnl having cairo_status_t variables hold cairo_int_status_t
+ dnl values. It's bad, we know. Now please be quiet.
+@@ -34,6 +37,8 @@ MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common -flto"
+ dnl Also to turn various gcc/glibc-specific preprocessor checks
+ MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2"
+
++MAYBE_WARN="$MAYBE_WARN $NO_WARN"
++
+ # invalidate cached value if MAYBE_WARN has changed
+ if test "x$cairo_cv_warn_maybe" != "x$MAYBE_WARN"; then
+ unset cairo_cv_warn_cflags
+--
+cgit v0.9.0.2-2-gbebe
+From 7cb5053c0694992320b5f7ea3b91ea497431813b Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon, 09 Apr 2012 11:49:20 +0000
+Subject: analysis: Apply the integer translation to the bbox as well
+
+The bbox is used to compute the ink extents (and so the pattern extents
+of a recording surface) and if given an integer translation we failed to
+transform the bbox into the target space.
+
+Fixes mask (pdf).
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
+index b8abe02..8878f62 100644
+--- a/src/cairo-analysis-surface.c
++++ b/src/cairo-analysis-surface.c
+@@ -220,6 +220,14 @@ _add_operation (cairo_analysis_surface_t *surface,
+ if (_cairo_matrix_is_integer_translation (&surface->ctm, &tx, &ty)) {
+ rect->x += tx;
+ rect->y += ty;
++
++ tx = _cairo_fixed_from_int (tx);
++ bbox.p1.x += tx;
++ bbox.p2.x += tx;
++
++ ty = _cairo_fixed_from_int (ty);
++ bbox.p1.y += ty;
++ bbox.p2.y += ty;
+ } else {
+ _cairo_matrix_transform_bounding_box_fixed (&surface->ctm,
+ &bbox, NULL);
+--
+cgit v0.9.0.2-2-gbebe
+From 038e4991912656a3239ca82d60056ca129016ba6 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Mon, 09 Apr 2012 08:31:44 +0000
+Subject: pdf: avoid unnecessary use of patterns in mask groups
+
+---
+diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
+index 4930e72..78537ce 100644
+--- a/src/cairo-pdf-surface.c
++++ b/src/cairo-pdf-surface.c
+@@ -5703,56 +5703,68 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface,
+ if (unlikely (status))
+ return status;
+
+- pattern_res.id = 0;
+- gstate_res.id = 0;
+- status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, NULL,
+- &pattern_res, &gstate_res);
+- if (unlikely (status))
+- return status;
+-
+- if (gstate_res.id != 0) {
+- smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents);
+- if (unlikely (smask_group == NULL))
+- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+-
+- smask_group->width = group->width;
+- smask_group->height = group->height;
+- smask_group->operation = PDF_PAINT;
+- smask_group->source = cairo_pattern_reference (group->mask);
+- smask_group->source_res = pattern_res;
+- status = _cairo_pdf_surface_add_smask_group (surface, smask_group);
+- if (unlikely (status)) {
+- _cairo_pdf_smask_group_destroy (smask_group);
+- return status;
+- }
+-
+- status = _cairo_pdf_surface_add_smask (surface, gstate_res);
+- if (unlikely (status))
+- return status;
+-
+- status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res);
++ if (_can_paint_pattern (group->mask)) {
++ _cairo_output_stream_printf (surface->output, "q\n");
++ status = _cairo_pdf_surface_paint_pattern (surface,
++ group->mask,
++ &group->extents,
++ FALSE);
+ if (unlikely (status))
+ return status;
+
+- _cairo_output_stream_printf (surface->output,
+- "q /s%d gs /x%d Do Q\n",
+- gstate_res.id,
+- smask_group->group_res.id);
++ _cairo_output_stream_printf (surface->output, "Q\n");
+ } else {
+- status = _cairo_pdf_surface_select_pattern (surface, group->mask, pattern_res, FALSE);
++ pattern_res.id = 0;
++ gstate_res.id = 0;
++ status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, NULL,
++ &pattern_res, &gstate_res);
+ if (unlikely (status))
+ return status;
+
+- _cairo_output_stream_printf (surface->output,
+- "%f %f %f %f re f\n",
+- bbox.p1.x,
+- bbox.p1.y,
+- bbox.p2.x - bbox.p1.x,
+- bbox.p2.y - bbox.p1.y);
++ if (gstate_res.id != 0) {
++ smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents);
++ if (unlikely (smask_group == NULL))
++ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+
+- status = _cairo_pdf_surface_unselect_pattern (surface);
+- if (unlikely (status))
+- return status;
++ smask_group->width = group->width;
++ smask_group->height = group->height;
++ smask_group->operation = PDF_PAINT;
++ smask_group->source = cairo_pattern_reference (group->mask);
++ smask_group->source_res = pattern_res;
++ status = _cairo_pdf_surface_add_smask_group (surface, smask_group);
++ if (unlikely (status)) {
++ _cairo_pdf_smask_group_destroy (smask_group);
++ return status;
++ }
++
++ status = _cairo_pdf_surface_add_smask (surface, gstate_res);
++ if (unlikely (status))
++ return status;
++
++ status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res);
++ if (unlikely (status))
++ return status;
++
++ _cairo_output_stream_printf (surface->output,
++ "q /s%d gs /x%d Do Q\n",
++ gstate_res.id,
++ smask_group->group_res.id);
++ } else {
++ status = _cairo_pdf_surface_select_pattern (surface, group->mask, pattern_res, FALSE);
++ if (unlikely (status))
++ return status;
++
++ _cairo_output_stream_printf (surface->output,
++ "%f %f %f %f re f\n",
++ bbox.p1.x,
++ bbox.p1.y,
++ bbox.p2.x - bbox.p1.x,
++ bbox.p2.y - bbox.p1.y);
++
++ status = _cairo_pdf_surface_unselect_pattern (surface);
++ if (unlikely (status))
++ return status;
++ }
+ }
+
+ status = _cairo_pdf_surface_close_group (surface, &mask_group);
+@@ -5764,54 +5776,66 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface,
+ if (unlikely (status))
+ return status;
+
+- pattern_res.id = 0;
+- gstate_res.id = 0;
+- status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, NULL,
+- &pattern_res, &gstate_res);
+- if (unlikely (status))
+- return status;
+-
+- if (gstate_res.id != 0) {
+- smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents);
+- if (unlikely (smask_group == NULL))
+- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+-
+- smask_group->operation = PDF_PAINT;
+- smask_group->source = cairo_pattern_reference (group->source);
+- smask_group->source_res = pattern_res;
+- status = _cairo_pdf_surface_add_smask_group (surface, smask_group);
+- if (unlikely (status)) {
+- _cairo_pdf_smask_group_destroy (smask_group);
+- return status;
+- }
+-
+- status = _cairo_pdf_surface_add_smask (surface, gstate_res);
+- if (unlikely (status))
+- return status;
+-
+- status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res);
++ if (_can_paint_pattern (group->source)) {
++ _cairo_output_stream_printf (surface->output, "q\n");
++ status = _cairo_pdf_surface_paint_pattern (surface,
++ group->source,
++ &group->extents,
++ FALSE);
+ if (unlikely (status))
+ return status;
+
+- _cairo_output_stream_printf (surface->output,
+- "q /s%d gs /x%d Do Q\n",
+- gstate_res.id,
+- smask_group->group_res.id);
++ _cairo_output_stream_printf (surface->output, "Q\n");
+ } else {
+- status = _cairo_pdf_surface_select_pattern (surface, group->source, pattern_res, FALSE);
++ pattern_res.id = 0;
++ gstate_res.id = 0;
++ status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, NULL,
++ &pattern_res, &gstate_res);
+ if (unlikely (status))
+ return status;
+
+- _cairo_output_stream_printf (surface->output,
+- "%f %f %f %f re f\n",
+- bbox.p1.x,
+- bbox.p1.y,
+- bbox.p2.x - bbox.p1.x,
+- bbox.p2.y - bbox.p1.y);
++ if (gstate_res.id != 0) {
++ smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents);
++ if (unlikely (smask_group == NULL))
++ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+
+- status = _cairo_pdf_surface_unselect_pattern (surface);
+- if (unlikely (status))
+- return status;
++ smask_group->operation = PDF_PAINT;
++ smask_group->source = cairo_pattern_reference (group->source);
++ smask_group->source_res = pattern_res;
++ status = _cairo_pdf_surface_add_smask_group (surface, smask_group);
++ if (unlikely (status)) {
++ _cairo_pdf_smask_group_destroy (smask_group);
++ return status;
++ }
++
++ status = _cairo_pdf_surface_add_smask (surface, gstate_res);
++ if (unlikely (status))
++ return status;
++
++ status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res);
++ if (unlikely (status))
++ return status;
++
++ _cairo_output_stream_printf (surface->output,
++ "q /s%d gs /x%d Do Q\n",
++ gstate_res.id,
++ smask_group->group_res.id);
++ } else {
++ status = _cairo_pdf_surface_select_pattern (surface, group->source, pattern_res, FALSE);
++ if (unlikely (status))
++ return status;
++
++ _cairo_output_stream_printf (surface->output,
++ "%f %f %f %f re f\n",
++ bbox.p1.x,
++ bbox.p1.y,
++ bbox.p2.x - bbox.p1.x,
++ bbox.p2.y - bbox.p1.y);
++
++ status = _cairo_pdf_surface_unselect_pattern (surface);
++ if (unlikely (status))
++ return status;
++ }
+ }
+
+ status = _cairo_pdf_surface_close_group (surface, NULL);
+--
+cgit v0.9.0.2-2-gbebe
+From 9fcbe25c2dcf831783bb0fd20af9754c0b5c409b Mon Sep 17 00:00:00 2001
+From: Maarten Bosmans <mkbosmans@gmail.com>
+Date: Mon, 09 Apr 2012 19:33:50 +0000
+Subject: Protect code using dlfcn.h with CAIRO_HAS_DLSYM
+
+---
+diff --git a/configure.ac b/configure.ac
+index cedfebe..5d2e6ec 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,6 +52,7 @@ AM_CONDITIONAL(CAIRO_HAS_DL, test "x$have_dl" = "xyes")
+ if test "x$have_dlsym" = "xyes"; then
+ AC_DEFINE([CAIRO_HAS_DLSYM], 1, [Define to 1 if dlsym is available])
+ fi
++AM_CONDITIONAL(CAIRO_HAS_DLSYM, test "x$have_dlsym" = "xyes")
+
+ dnl ===========================================================================
+
+diff --git a/util/Makefile.am b/util/Makefile.am
+index f202f35..82d0a80 100644
+--- a/util/Makefile.am
++++ b/util/Makefile.am
+@@ -12,20 +12,24 @@ endif
+
+ if CAIRO_HAS_TRACE
+ SUBDIRS += cairo-trace
++if CAIRO_HAS_DLSYM
+ if CAIRO_HAS_SCRIPT_SURFACE
+ if CAIRO_HAS_TEE_SURFACE
+ SUBDIRS += cairo-fdr
+ endif
+ endif
+ endif
++endif
+
+ if BUILD_SPHINX
++if CAIRO_HAS_DLSYM
+ if CAIRO_HAS_SCRIPT_SURFACE
+ if CAIRO_HAS_TEE_SURFACE
+ SUBDIRS += cairo-sphinx
+ endif
+ endif
+ endif
++endif
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+--
+cgit v0.9.0.2-2-gbebe
+From c7b86ab97be1d3d3ccf43b652832f148a2fcf290 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Tue, 10 Apr 2012 13:04:05 +0000
+Subject: any2ppm: fix missing enumeration warning
+
+---
+diff --git a/test/any2ppm.c b/test/any2ppm.c
+index 6b61c47..2403347 100644
+--- a/test/any2ppm.c
++++ b/test/any2ppm.c
+@@ -193,6 +193,7 @@ write_ppm (cairo_surface_t *surface, int fd)
+ break;
+ case CAIRO_FORMAT_A1:
+ case CAIRO_FORMAT_RGB16_565:
++ case CAIRO_FORMAT_RGB30:
+ case CAIRO_FORMAT_INVALID:
+ default:
+ return "unhandled image format";
+--
+cgit v0.9.0.2-2-gbebe
+From 09de481ce5f6ed1c38c0d5bf3af7c60642c4c947 Mon Sep 17 00:00:00 2001
+From: Gilles Espinasse <g.esp@free.fr>
+Date: Sat, 07 Apr 2012 21:09:51 +0000
+Subject: Cosmetic configure fix
+
+'how to allow undefined symbols in shared libraries' test should use CAIRO_CC_TRY_FLAG_SILENT or configure display is a bit out of order like this
+
+checking how to allow undefined symbols in shared libraries used by test suite... checking whether gcc supports -Wl,--allow-shlib-undefined... yes
+-Wl,--allow-shlib-undefined
+
+Signed-off-by: Gilles Espinasse <g.esp@free.fr>
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
+index f1b17f4..3b2c6f3 100644
+--- a/build/configure.ac.warnings
++++ b/build/configure.ac.warnings
+@@ -89,7 +89,7 @@ AC_DEFINE_UNQUOTED([WARN_UNUSED_RESULT], [$cairo_cv_warn_unused_result],
+
+ dnl check linker flags
+ AC_CACHE_CHECK([how to allow undefined symbols in shared libraries used by test suite], cairo_cv_test_undefined_ldflags,
+- [CAIRO_CC_TRY_FLAG([-Wl,--allow-shlib-undefined], [],
++ [CAIRO_CC_TRY_FLAG_SILENT([-Wl,--allow-shlib-undefined], [],
+ [cairo_cv_test_undefined_ldflags="-Wl,--allow-shlib-undefined]")])
+ CAIRO_TEST_UNDEFINED_LDFLAGS="$cairo_cv_test_undefined_ldflags"
+ AC_SUBST(CAIRO_TEST_UNDEFINED_LDFLAGS)
+--
+cgit v0.9.0.2-2-gbebe
+From 07fc63676dfdaa57ed919ad7be8f59c97c615473 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psychon@znc.in>
+Date: Wed, 11 Apr 2012 19:37:55 +0000
+Subject: xlib: Disable fallback compositor with xlib-xcb
+
+When xlib-xcb is enabled, this is just dead code which is never used. Thus, this
+shouldn't hurt. However, this does include cairo-xlib-private.h. Shouldn't be a
+problem? Well, that header contains static inline functions which some compiler
+on Solaris will emit even when they are unused.
+
+This brings us to the real problem: That static inline function refers to a
+function which isn't compiled with xlib-xcb and thus linking fails with
+undefined symbols.
+
+This can be reproduced with GCC by adding a call to
+_cairo_xlib_screen_put_gc(NULL, NULL, 0, 0); to
+_cairo_xlib_fallback_compositor_get.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48489
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+diff --git a/src/cairo-xlib-fallback-compositor.c b/src/cairo-xlib-fallback-compositor.c
+index 5391926..7d45cd1 100644
+--- a/src/cairo-xlib-fallback-compositor.c
++++ b/src/cairo-xlib-fallback-compositor.c
+@@ -42,6 +42,8 @@
+
+ #include "cairoint.h"
+
++#if !CAIRO_HAS_XLIB_XCB_FUNCTIONS
++
+ #include "cairo-xlib-private.h"
+
+ #include "cairo-compositor-private.h"
+@@ -52,3 +54,5 @@ _cairo_xlib_fallback_compositor_get (void)
+ /* XXX Do something interesting here to mitigate fallbacks ala xcb */
+ return &_cairo_fallback_compositor;
+ }
++
++#endif /* !CAIRO_HAS_XLIB_XCB_FUNCTIONS */
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/extra/dovecot/PKGBUILD b/extra/dovecot/PKGBUILD
index 9db3fd9bc..e49fd1a34 100644
--- a/extra/dovecot/PKGBUILD
+++ b/extra/dovecot/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 157092 2012-04-23 16:33:36Z andyrtr $
+# $Id: PKGBUILD 158862 2012-05-12 13:27:15Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Paul Mattal <paul@mattal.com>
# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
# Contributor: GARETTE Emmanuel <gnunux at laposte dot net>
pkgname=dovecot
-pkgver=2.1.5
+pkgver=2.1.6
pkgrel=1
pkgdesc="An IMAP and POP3 server written with security primarily in mind"
arch=('i686' 'x86_64')
@@ -20,8 +20,8 @@ provides=('imap-server' 'pop3-server')
options=('!libtool')
install=$pkgname.install
source=(http://dovecot.org/releases/2.1/${pkgname}-${pkgver}.tar.gz{,.sig} dovecot.sh)
-md5sums=('c857e3442f2f14b3e46f1154b13b0b4b'
- '4ef0a9647b82e0a1bdc667492a151881'
+md5sums=('56d2a8d5273d39caa41d6a8dd9f4442c'
+ 'f4eed12984b9ddf6eea37fc9f1828af8'
'587159e84e2da6f83d70b3c706ba87cc')
build() {
diff --git a/extra/gtk3/PKGBUILD b/extra/gtk3/PKGBUILD
index 48779accb..36f89960c 100644
--- a/extra/gtk3/PKGBUILD
+++ b/extra/gtk3/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 158335 2012-05-03 17:45:08Z heftig $
+# $Id: PKGBUILD 158899 2012-05-12 20:17:26Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgname=gtk3
-pkgver=3.4.2
-pkgrel=2
+pkgver=3.4.3
+pkgrel=1
pkgdesc="GObject-based multi-platform GUI toolkit (v3)"
arch=('i686' 'x86_64')
url="http://www.gtk.org/"
@@ -15,7 +15,7 @@ backup=(etc/gtk-3.0/settings.ini)
license=('LGPL')
source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-$pkgver.tar.xz
settings.ini wacom.patch)
-sha256sums=('b1ab72bc61434418160ff0c7edfd93c74758ed8a35e2ed3d07e3e218c2705480'
+sha256sums=('846010442a96590469cde16ed6a1fdfe09397e435165459f04d31cfa5713799f'
'c214d3dcdcadda3d642112287524ab3e526ad592b70895c9f3e3733c23701621'
'86bda95a14a99d0f596c4ecb2ed715689f71c207c65dfc90a39d4ae7f1c0c0f5')
build() {
diff --git a/extra/gvfs/PKGBUILD b/extra/gvfs/PKGBUILD
index d4911ea95..0d8828adf 100644
--- a/extra/gvfs/PKGBUILD
+++ b/extra/gvfs/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 157347 2012-04-27 16:15:04Z ibiru $
+# $Id: PKGBUILD 158913 2012-05-13 02:45:39Z eric $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=gvfs
@@ -10,11 +10,14 @@ license=('LGPL')
makedepends=('avahi' 'bluez' 'dbus-glib' 'fuse' 'intltool' 'libarchive' 'libcdio' 'libgphoto2' 'libimobiledevice' 'libsoup-gnome' 'smbclient' 'udisks2')
url="http://www.gnome.org"
options=(!libtool)
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver%.*}/$pkgbase-$pkgver.tar.xz)
-sha256sums=('998b9d0089d21e451e455b6bc5f421eb08bcb3e5ff0aceda98e424cc42ef6616')
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver%.*}/$pkgbase-$pkgver.tar.xz
+ gvfs-1.12.2-afp-g_clear_object.patch)
+sha256sums=('998b9d0089d21e451e455b6bc5f421eb08bcb3e5ff0aceda98e424cc42ef6616'
+ '6a93963644317d9e55aebac723008bd94cf97d42349dbf48ab6996fa5d9eed89')
build() {
cd "$pkgbase-$pkgver"
+ patch -p1 -i ../gvfs-1.12.2-afp-g_clear_object.patch
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --disable-static \
--libexecdir=/usr/lib/gvfs \
diff --git a/extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch b/extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch
new file mode 100644
index 000000000..09e11d888
--- /dev/null
+++ b/extra/gvfs/gvfs-1.12.2-afp-g_clear_object.patch
@@ -0,0 +1,35 @@
+From 01161473ed33ee682f340e6f12edcba5334475e0 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 30 Apr 2012 06:09:30 -0400
+Subject: [PATCH] afp: Use g_clear_object properly
+
+g_clear_object expects the address of a pointer. A recent
+change in its definition makes gcc complain about this.
+(cherry picked from commit 7fe5deeae25f2396027f667d8960d2ec84c64716)
+---
+ daemon/gvfsafpvolume.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/daemon/gvfsafpvolume.c b/daemon/gvfsafpvolume.c
+index 3fd33f2..5207459 100644
+--- a/daemon/gvfsafpvolume.c
++++ b/daemon/gvfsafpvolume.c
+@@ -1082,7 +1082,7 @@ create_directory_get_filedir_parms_cb (GObject *source_object, GAsyncResult *res
+ return;
+
+ error:
+- g_clear_object (info);
++ g_clear_object (&info);
+ g_simple_async_result_take_error (simple, err);
+ g_simple_async_result_complete (simple);
+ g_object_unref (simple);
+@@ -3033,4 +3033,4 @@ g_vfs_afp_volume_read_from_fork_finish (GVfsAfpVolume *volume,
+ *bytes_read = g_simple_async_result_get_op_res_gssize (simple);
+
+ return TRUE;
+-}
+\ No newline at end of file
++}
+--
+1.7.8.6
+
diff --git a/extra/libvpx/PKGBUILD b/extra/libvpx/PKGBUILD
index 66834c06c..09c994f21 100644
--- a/extra/libvpx/PKGBUILD
+++ b/extra/libvpx/PKGBUILD
@@ -1,7 +1,7 @@
-# $Id: PKGBUILD 149274 2012-02-06 17:33:28Z ibiru $
+# $Id: PKGBUILD 158895 2012-05-12 18:37:10Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgname=libvpx
-pkgver=1.0.0
+pkgver=1.1.0
pkgrel=1
pkgdesc="The VP8 Codec SDK"
arch=('i686' 'x86_64')
@@ -10,10 +10,10 @@ license=('BSD')
depends=('glibc')
makedepends=('yasm')
source=(http://webm.googlecode.com/files/$pkgname-v$pkgver.tar.bz2)
-sha1sums=('2919e11074fef72fc61ef1a75160050ffaad6074')
+sha1sums=('356af5f770c50cd021c60863203d8f30164f6021')
build() {
- cd "$srcdir/$pkgname-v$pkgver"
+ cd "$pkgname-v$pkgver"
./configure --prefix=/usr --enable-vp8 \
--enable-runtime-cpu-detect \
--enable-shared \
@@ -25,7 +25,7 @@ build() {
}
package() {
- cd "$srcdir/$pkgname-v$pkgver"
+ cd "$pkgname-v$pkgver"
make DIST_DIR="$pkgdir/usr" install
install -D -m 0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/extra/libxi/PKGBUILD b/extra/libxi/PKGBUILD
index e242b28ab..045880e34 100644
--- a/extra/libxi/PKGBUILD
+++ b/extra/libxi/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 153296 2012-03-12 20:52:30Z andyrtr $
+# $Id: PKGBUILD 158868 2012-05-12 16:25:29Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=libxi
-pkgver=1.6.0
+pkgver=1.6.1
pkgrel=1
pkgdesc="X11 Input extension library"
arch=('i686' 'x86_64')
@@ -12,7 +12,7 @@ makedepends=('pkgconfig' 'xorg-util-macros')
options=(!libtool)
license=('custom')
source=(${url}/releases/individual/lib/libXi-${pkgver}.tar.bz2)
-sha1sums=('b7edf48f93e8abd13ca688fa7f597452c4b74346')
+sha1sums=('4b53b41fdaa3acc86606c696c68d5eed11454612')
build() {
cd "${srcdir}/libXi-${pkgver}"
diff --git a/extra/mpg123/PKGBUILD b/extra/mpg123/PKGBUILD
index 354982b8b..244dcb380 100644
--- a/extra/mpg123/PKGBUILD
+++ b/extra/mpg123/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 158702 2012-05-08 04:10:15Z eric $
+# $Id: PKGBUILD 158903 2012-05-12 20:49:50Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgname=mpg123
-pkgver=1.14.1
+pkgver=1.14.2
pkgrel=1
pkgdesc="A console based real time MPEG Audio Player for Layer 1, 2 and 3"
arch=('i686' 'x86_64')
@@ -17,8 +17,8 @@ conflicts=('mpg321')
provides=('mpg321')
options=('!libtool')
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.sig})
-sha1sums=('db1004f3318ce239e2972ae623563fe6e831e331'
- '9e88254e099ff08ff8eb5bb7e8697ec5b5a2b825')
+sha1sums=('887a453e49e3d49d539a712ee66a8d9da16e3325'
+ '878c6ca9e8fb9f29f34953d8fe39d01411086baf')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/nx/PKGBUILD b/extra/nx/PKGBUILD
index 664358563..5807ad4a0 100644
--- a/extra/nx/PKGBUILD
+++ b/extra/nx/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 157433 2012-04-28 09:58:35Z andyrtr $
+# $Id: PKGBUILD 158856 2012-05-12 13:09:28Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgbase=nx
pkgname=('libxcomp' 'nxproxy' 'nx-x11' 'nx-xcompext' 'nxagent' 'nx-headers')
-pkgver=3.5.0.12
-pkgrel=2
+pkgver=3.5.0.13
+pkgrel=1
arch=('i686' 'x86_64')
url="http://wiki.x2go.org/"
license=('GPL')
@@ -14,7 +14,7 @@ makedepends=('libjpeg-turbo' 'libpng' 'bash' 'perl' # runtime dependencies from
)
source=(http://code.x2go.org/releases/source/nx-libs/nx-libs_$pkgver-full.tar.gz
nx-x11.ld.so.conf.d)
-md5sums=('a2011e034a318016cf2260c30a567301'
+md5sums=('2c80e570d35a25989f8606e1f3620026'
'f2ec60c7e2d81bef2f7292d2b33681a6')
build() {
diff --git a/extra/taglib/PKGBUILD b/extra/taglib/PKGBUILD
index c83494e46..38de56173 100644
--- a/extra/taglib/PKGBUILD
+++ b/extra/taglib/PKGBUILD
@@ -1,9 +1,10 @@
-# $Id: PKGBUILD 154265 2012-03-25 08:45:02Z eric $
-# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# $Id: PKGBUILD 158844 2012-05-12 11:47:35Z tomegun $
+# Maintainer: Tom Gundersen <teg@jklm.no>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=taglib
-pkgver=1.7.1
+pkgver=1.7.2
pkgrel=1
pkgdesc="A Library for reading and editing the meta-data of several popular audio formats"
arch=('i686' 'x86_64')
@@ -14,8 +15,6 @@ makedepends=('cmake' 'pkg-config')
options=('!libtool')
source=("http://developer.kde.org/~wheeler/files/src/$pkgname-$pkgver.tar.gz"
'ape-idev2.patch')
-sha1sums=('bafe0958eb884981cade83d45c18ee34165479b8'
- '9bdae5c2da6bb4e1a2ea38a5a587773b850c3518')
build() {
cd "${srcdir}"/${pkgname}-${pkgver}
@@ -36,3 +35,5 @@ package() {
cd "${srcdir}"/build
make DESTDIR="${pkgdir}" install
}
+md5sums=('b0a9e797d3833fb933c7c3176de3d720'
+ 'c7c165d99acf01456351ba39ff7056cb')
diff --git a/extra/xf86-input-synaptics/PKGBUILD b/extra/xf86-input-synaptics/PKGBUILD
index 4c973c4a5..9900010da 100644
--- a/extra/xf86-input-synaptics/PKGBUILD
+++ b/extra/xf86-input-synaptics/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 157345 2012-04-27 12:08:41Z andyrtr $
+# $Id: PKGBUILD 158878 2012-05-12 16:51:09Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
pkgname=xf86-input-synaptics
-pkgver=1.5.99.904
+pkgver=1.6.1
pkgrel=1
pkgdesc="Synaptics driver for notebook touchpads"
arch=('i686' 'x86_64')
@@ -22,7 +22,7 @@ options=(!libtool)
backup=('etc/X11/xorg.conf.d/10-synaptics.conf')
source=(http://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
10-synaptics.conf)
-sha1sums=('4853bd933fa41b83ff513262cdf6e5b89f22d64b'
+sha1sums=('963276a5dd240e84efff28d516f8d23cfeedaa13'
'68e1f4ef5e1038231d210eb422fa4d18c5922f0f')
build() {
diff --git a/extra/xf86-input-wacom/PKGBUILD b/extra/xf86-input-wacom/PKGBUILD
index 9fb79abff..07fabd1ee 100644
--- a/extra/xf86-input-wacom/PKGBUILD
+++ b/extra/xf86-input-wacom/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 158636 2012-05-05 03:31:18Z allan $
+# $Id: PKGBUILD 158905 2012-05-12 20:58:34Z andyrtr $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: M Rawash <mrawash@gmail.com>
pkgname=xf86-input-wacom
-pkgver=0.14.0
-pkgrel=2
+pkgver=0.15.0
+pkgrel=1
pkgdesc="X.Org Wacom tablet driver"
arch=('i686' 'x86_64')
url="http://linuxwacom.sourceforge.net/"
@@ -17,8 +17,8 @@ conflicts=('xorg-server<1.12.0')
options=(!libtool)
source=(http://downloads.sourceforge.net/project/linuxwacom/${pkgname}/${pkgname}-${pkgver}.tar.bz2
70-wacom.rules)
-md5sums=('23d19a2b50a86b848df17297c745144f'
- '10db4f8272286690255c1bcc18bfdd92')
+sha1sums=('6e8e4fa2ccc2448cae97119c6f2842fe283f9b29'
+ '7cebb94459f9cf49693e65215f3af59cea5e2b73')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/xf86-video-apm/PKGBUILD b/extra/xf86-video-apm/PKGBUILD
index 3cf6acff0..2914e15fc 100644
--- a/extra/xf86-video-apm/PKGBUILD
+++ b/extra/xf86-video-apm/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 153319 2012-03-12 20:53:08Z andyrtr $
+# $Id: PKGBUILD 158880 2012-05-12 17:20:17Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-apm
-pkgver=1.2.3
-pkgrel=5
+pkgver=1.2.4
+pkgrel=1
pkgdesc="X.org Alliance ProMotion video driver"
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
@@ -13,14 +13,11 @@ makedepends=('xorg-server-devel>=1.11.99.902')
conflicts=('xorg-server<1.11.99.902')
groups=('xorg-drivers' 'xorg')
options=('!libtool')
-source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
- apm-1.2.3-git.patch)
-sha1sums=('1fa7180cf985a74132f8d5b39a0bf9df08713fac'
- 'ad9468519eb959bb879ba4e4993d6a83848d5c6f')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('d792ba6e8c39e60e00e0790b4e08f551044b2f7c')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i ${srcdir}/apm-1.2.3-git.patch
./configure --prefix=/usr
make
}
diff --git a/extra/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch b/extra/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch
new file mode 100644
index 000000000..bcfbf94db
--- /dev/null
+++ b/extra/xf86-video-ati/0000-poor-man-s-solid-picture-support-for-r300-r600.patch
@@ -0,0 +1,571 @@
+From 837149c63929d7d5a8ef6f8204d396f8e6d5acd7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel@daenzer.net>
+Date: Fri, 13 Apr 2012 11:12:51 +0200
+Subject: [PATCH 1/4] Poor man's acceleration of solid pictures for R3xx-R7xx
+
+The patch below implements basic acceleration of solid pictures via
+scratch 1x1 pixmaps. It seems to at least alleviate some of the
+corruption and performance issues exposed by Cairo 1.12, and should also
+improve performance for other toolkits/apps using solid pictures.
+
+If there are no objections to this approach, maybe someone else can beat
+me to extending this for Evergreen+ and R1/2xx.
+---
+ src/r600_exa.c | 160 ++++++++++++++++++++++++++--------------------
+ src/radeon_exa_render.c | 115 ++++++++++++++++++++--------------
+ src/radeon_exa_shared.c | 19 ++++++
+ src/radeon_exa_shared.h | 1 +
+ 4 files changed, 179 insertions(+), 116 deletions(-)
+
+diff --git a/src/r600_exa.c b/src/r600_exa.c
+index e1eb62f..c3ae553 100644
+--- a/src/r600_exa.c
++++ b/src/r600_exa.c
+@@ -901,17 +901,8 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict,
+ int op,
+ int unit)
+ {
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+ unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ unsigned int i;
+- int max_tex_w, max_tex_h;
+-
+- max_tex_w = 8192;
+- max_tex_h = 8192;
+-
+- if ((w > max_tex_w) || (h > max_tex_h))
+- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
+
+ for (i = 0; i < sizeof(R600TexFormats) / sizeof(R600TexFormats[0]); i++) {
+ if (R600TexFormats[i].fmt == pPict->format)
+@@ -951,9 +942,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
+ ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ struct radeon_accel_state *accel_state = info->accel_state;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
++ unsigned int repeatType;
+ unsigned int i;
+ tex_resource_t tex_res;
+ tex_sampler_t tex_samp;
+@@ -969,9 +958,16 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
+ }
+
+ /* Texture */
++ if (pPict->pDrawable) {
++ tex_res.w = pPict->pDrawable->width;
++ tex_res.h = pPict->pDrawable->height;
++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
++ } else {
++ tex_res.w = 1;
++ tex_res.h = 1;
++ repeatType = RepeatNormal;
++ }
+ tex_res.id = unit;
+- tex_res.w = w;
+- tex_res.h = h;
+ tex_res.pitch = accel_state->src_obj[unit].pitch;
+ tex_res.depth = 0;
+ tex_res.dim = SQ_TEX_DIM_2D;
+@@ -1170,24 +1166,24 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
+ vs_alu_consts[0] = xFixedToFloat(pPict->transform->matrix[0][0]);
+ vs_alu_consts[1] = xFixedToFloat(pPict->transform->matrix[0][1]);
+ vs_alu_consts[2] = xFixedToFloat(pPict->transform->matrix[0][2]);
+- vs_alu_consts[3] = 1.0 / w;
++ vs_alu_consts[3] = 1.0 / tex_res.w;
+
+ vs_alu_consts[4] = xFixedToFloat(pPict->transform->matrix[1][0]);
+ vs_alu_consts[5] = xFixedToFloat(pPict->transform->matrix[1][1]);
+ vs_alu_consts[6] = xFixedToFloat(pPict->transform->matrix[1][2]);
+- vs_alu_consts[7] = 1.0 / h;
++ vs_alu_consts[7] = 1.0 / tex_res.h;
+ } else {
+ accel_state->is_transform[unit] = FALSE;
+
+ vs_alu_consts[0] = 1.0;
+ vs_alu_consts[1] = 0.0;
+ vs_alu_consts[2] = 0.0;
+- vs_alu_consts[3] = 1.0 / w;
++ vs_alu_consts[3] = 1.0 / tex_res.w;
+
+ vs_alu_consts[4] = 0.0;
+ vs_alu_consts[5] = 1.0;
+ vs_alu_consts[6] = 0.0;
+- vs_alu_consts[7] = 1.0 / h;
++ vs_alu_consts[7] = 1.0 / tex_res.h;
+ }
+
+ /* VS alu constants */
+@@ -1202,33 +1198,30 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+ {
+ uint32_t tmp1;
+ PixmapPtr pSrcPixmap, pDstPixmap;
+- int max_tex_w, max_tex_h, max_dst_w, max_dst_h;
+
+ /* Check for unsupported compositing operations. */
+ if (op >= (int) (sizeof(R600BlendOp) / sizeof(R600BlendOp[0])))
+ RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+
+- if (!pSrcPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+-
+- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
++ if (pSrcPicture->pDrawable) {
++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+
+- max_tex_w = 8192;
+- max_tex_h = 8192;
+- max_dst_w = 8192;
+- max_dst_h = 8192;
++ if (pSrcPixmap->drawable.width >= 8192 ||
++ pSrcPixmap->drawable.height >= 8192) {
++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
++ pSrcPixmap->drawable.width,
++ pSrcPixmap->drawable.height));
++ }
+
+- if (pSrcPixmap->drawable.width >= max_tex_w ||
+- pSrcPixmap->drawable.height >= max_tex_h) {
+- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+- pSrcPixmap->drawable.width,
+- pSrcPixmap->drawable.height));
+- }
++ if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0))
++ return FALSE;
++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+
+ pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
+
+- if (pDstPixmap->drawable.width >= max_dst_w ||
+- pDstPixmap->drawable.height >= max_dst_h) {
++ if (pDstPixmap->drawable.width >= 8192 ||
++ pDstPixmap->drawable.height >= 8192) {
+ RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n",
+ pDstPixmap->drawable.width,
+ pDstPixmap->drawable.height));
+@@ -1237,38 +1230,35 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+ if (pMaskPicture) {
+ PixmapPtr pMaskPixmap;
+
+- if (!pMaskPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++ if (pMaskPicture->pDrawable) {
++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+
+- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+-
+- if (pMaskPixmap->drawable.width >= max_tex_w ||
+- pMaskPixmap->drawable.height >= max_tex_h) {
+- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+- pMaskPixmap->drawable.width,
+- pMaskPixmap->drawable.height));
+- }
++ if (pMaskPixmap->drawable.width >= 8192 ||
++ pMaskPixmap->drawable.height >= 8192) {
++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
++ pMaskPixmap->drawable.width,
++ pMaskPixmap->drawable.height));
++ }
+
+- if (pMaskPicture->componentAlpha) {
+- /* Check if it's component alpha that relies on a source alpha and
+- * on the source value. We can only get one of those into the
+- * single source value that we get to blend with.
+- */
+- if (R600BlendOp[op].src_alpha &&
+- (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) !=
+- (BLEND_ZERO << COLOR_SRCBLEND_shift)) {
+- RADEON_FALLBACK(("Component alpha not supported with source "
+- "alpha and source value blending.\n"));
++ if (pMaskPicture->componentAlpha) {
++ /* Check if it's component alpha that relies on a source alpha and
++ * on the source value. We can only get one of those into the
++ * single source value that we get to blend with.
++ */
++ if (R600BlendOp[op].src_alpha &&
++ (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) !=
++ (BLEND_ZERO << COLOR_SRCBLEND_shift)) {
++ RADEON_FALLBACK(("Component alpha not supported with source "
++ "alpha and source value blending.\n"));
++ }
+ }
+- }
+
+- if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1))
+- return FALSE;
++ if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1))
++ return FALSE;
++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+ }
+
+- if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0))
+- return FALSE;
+-
+ if (!R600GetDestFormat(pDstPicture, &tmp1))
+ return FALSE;
+
+@@ -1280,7 +1270,8 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
+ PicturePtr pMaskPicture, PicturePtr pDstPicture,
+ PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
++ ScreenPtr pScreen = pDst->drawable.pScreen;
++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ struct radeon_accel_state *accel_state = info->accel_state;
+ uint32_t dst_format;
+@@ -1288,15 +1279,21 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
+ shader_config_t vs_conf, ps_conf;
+ struct r600_accel_object src_obj, mask_obj, dst_obj;
+
+- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8)
++ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8))
+ return FALSE;
+
++ if (!pSrc) {
++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color);
++ if (!pSrc)
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++
+ #if defined(XF86DRM_MODE)
+ if (info->cs) {
+ src_obj.offset = 0;
+ dst_obj.offset = 0;
+- src_obj.bo = radeon_get_pixmap_bo(pSrc);
+ dst_obj.bo = radeon_get_pixmap_bo(pDst);
++ src_obj.bo = radeon_get_pixmap_bo(pSrc);
+ dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst);
+ src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc);
+ dst_obj.surface = radeon_get_pixmap_surface(pDst);
+@@ -1322,7 +1319,16 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
+ dst_obj.bpp = pDst->drawable.bitsPerPixel;
+ dst_obj.domain = RADEON_GEM_DOMAIN_VRAM;
+
+- if (pMask) {
++ if (pMaskPicture) {
++ if (!pMask) {
++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color);
++ if (!pMask) {
++ if (!pSrcPicture->pDrawable)
++ pScreen->DestroyPixmap(pSrc);
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++ }
++
+ #if defined(XF86DRM_MODE)
+ if (info->cs) {
+ mask_obj.offset = 0;
+@@ -1509,11 +1515,9 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
+ return TRUE;
+ }
+
+-static void R600DoneComposite(PixmapPtr pDst)
++static void R600FinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst,
++ struct radeon_accel_state *accel_state)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+- RADEONInfoPtr info = RADEONPTR(pScrn);
+- struct radeon_accel_state *accel_state = info->accel_state;
+ int vtx_size;
+
+ if (accel_state->vsync)
+@@ -1527,6 +1531,22 @@ static void R600DoneComposite(PixmapPtr pDst)
+ r600_finish_op(pScrn, vtx_size);
+ }
+
++static void R600DoneComposite(PixmapPtr pDst)
++{
++ ScreenPtr pScreen = pDst->drawable.pScreen;
++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ RADEONInfoPtr info = RADEONPTR(pScrn);
++ struct radeon_accel_state *accel_state = info->accel_state;
++
++ R600FinishComposite(pScrn, pDst, accel_state);
++
++ if (!accel_state->src_pic->pDrawable)
++ pScreen->DestroyPixmap(accel_state->src_pix);
++
++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable)
++ pScreen->DestroyPixmap(accel_state->msk_pix);
++}
++
+ static void R600Composite(PixmapPtr pDst,
+ int srcX, int srcY,
+ int maskX, int maskY,
+@@ -1543,7 +1563,7 @@ static void R600Composite(PixmapPtr pDst,
+
+ #ifdef XF86DRM_MODE
+ if (info->cs && CS_FULL(info->cs)) {
+- R600DoneComposite(info->accel_state->dst_pix);
++ R600FinishComposite(pScrn, pDst, info->accel_state);
+ radeon_cs_flush_indirect(pScrn);
+ R600PrepareComposite(info->accel_state->composite_op,
+ info->accel_state->src_pic,
+diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
+index e5c231f..b6cc9e4 100644
+--- a/src/radeon_exa_render.c
++++ b/src/radeon_exa_render.c
+@@ -299,8 +299,8 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict,
+ if (repeatType == RepeatNormal || repeatType == RepeatReflect) {
+ Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix);
+
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
++ int w = pPict->pDrawable ? pPict->pDrawable->width : 1;
++ int h = pPict->pDrawable ? pPict->pDrawable->height : 1;
+
+ if (pPict->transform) {
+ if (badPitch)
+@@ -1112,23 +1112,8 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict,
+ ScreenPtr pScreen = pDstPict->pDrawable->pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+-
+ unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+ int i;
+- int max_tex_w, max_tex_h;
+-
+- if (is_r500) {
+- max_tex_w = 4096;
+- max_tex_h = 4096;
+- } else {
+- max_tex_w = 2048;
+- max_tex_h = 2048;
+- }
+-
+- if ((w > max_tex_w) || (h > max_tex_h))
+- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
+
+ for (i = 0; i < sizeof(R300TexFormats) / sizeof(R300TexFormats[0]); i++)
+ {
+@@ -1139,7 +1124,7 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict,
+ RADEON_FALLBACK(("Unsupported picture format 0x%x\n",
+ (int)pPict->format));
+
+- if (!RADEONCheckTexturePOT(pPict, unit == 0)) {
++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) {
+ if (info->cs) {
+ struct radeon_exa_pixmap_priv *driver_priv;
+ PixmapPtr pPix;
+@@ -1181,15 +1166,23 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
+ {
+ RINFO_FROM_SCREEN(pPix->drawable.pScreen);
+ uint32_t txfilter, txformat0, txformat1, txoffset, txpitch, us_format = 0;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
++ int w, h;
+ int i, pixel_shift, out_size = 6;
+- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
++ unsigned int repeatType;
+ struct radeon_exa_pixmap_priv *driver_priv;
+ ACCEL_PREAMBLE();
+
+ TRACE;
+
++ if (pPict->pDrawable) {
++ w = pPict->pDrawable->width;
++ h = pPict->pDrawable->height;
++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
++ } else {
++ w = h = 1;
++ repeatType = RepeatNormal;
++ }
++
+ txpitch = exaGetPixmapPitch(pPix);
+ txoffset = 0;
+
+@@ -1394,11 +1387,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+ if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
+ RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+
+- if (!pSrcPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+-
+- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+-
+ if (IS_R500_3D) {
+ max_tex_w = 4096;
+ max_tex_h = 4096;
+@@ -1416,13 +1404,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+ }
+ }
+
+- if (pSrcPixmap->drawable.width > max_tex_w ||
+- pSrcPixmap->drawable.height > max_tex_h) {
+- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+- pSrcPixmap->drawable.width,
+- pSrcPixmap->drawable.height));
+- }
+-
+ pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
+
+ if (pDstPixmap->drawable.width > max_dst_w ||
+@@ -1432,20 +1413,32 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+ pDstPixmap->drawable.height));
+ }
+
++ if (pSrcPicture->pDrawable) {
++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
++
++ if (pSrcPixmap->drawable.width > max_tex_w ||
++ pSrcPixmap->drawable.height > max_tex_h) {
++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
++ pSrcPixmap->drawable.width,
++ pSrcPixmap->drawable.height));
++ }
++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
++
+ if (pMaskPicture) {
+ PixmapPtr pMaskPixmap;
+
+- if (!pMaskPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++ if (pMaskPicture->pDrawable) {
++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+
+- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+-
+- if (pMaskPixmap->drawable.width > max_tex_w ||
+- pMaskPixmap->drawable.height > max_tex_h) {
+- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+- pMaskPixmap->drawable.width,
+- pMaskPixmap->drawable.height));
+- }
++ if (pMaskPixmap->drawable.width > max_tex_w ||
++ pMaskPixmap->drawable.height > max_tex_h) {
++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
++ pMaskPixmap->drawable.width,
++ pMaskPixmap->drawable.height));
++ }
++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+
+ if (pMaskPicture->componentAlpha) {
+ /* Check if it's component alpha that relies on a source alpha and
+@@ -1479,7 +1472,8 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
+ PicturePtr pMaskPicture, PicturePtr pDstPicture,
+ PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
+ {
+- RINFO_FROM_SCREEN(pDst->drawable.pScreen);
++ ScreenPtr pScreen = pDst->drawable.pScreen;
++ RINFO_FROM_SCREEN(pScreen);
+ uint32_t dst_format, dst_pitch;
+ uint32_t txenable, colorpitch;
+ uint32_t blendcntl, output_fmt;
+@@ -1508,9 +1502,24 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
+ if (((dst_pitch >> pixel_shift) & 0x7) != 0)
+ RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
+
++ if (!pSrc) {
++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color));
++ if (!pSrc)
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++
+ if (!RADEONSetupSourceTile(pSrcPicture, pSrc, TRUE, FALSE))
+ return FALSE;
+
++ if (pMaskPicture && !pMask) {
++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
++ if (!pMask) {
++ if (!pSrcPicture->pDrawable)
++ pScreen->DestroyPixmap(pSrc);
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++ }
++
+ RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture,
+ pSrc, pMask, pDst);
+
+@@ -2132,7 +2141,7 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
+ return TRUE;
+ }
+
+-static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst)
++static void FUNC_NAME(RadeonFinishComposite)(PixmapPtr pDst)
+ {
+ RINFO_FROM_SCREEN(pDst->drawable.pScreen);
+ ACCEL_PREAMBLE();
+@@ -2179,6 +2188,20 @@ static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst)
+ LEAVE_DRAW(0);
+ }
+
++static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst)
++{
++ ScreenPtr pScreen = pDst->drawable.pScreen;
++ RINFO_FROM_SCREEN(pScreen);
++ struct radeon_accel_state *accel_state = info->accel_state;
++
++ FUNC_NAME(RadeonFinishComposite)(pDst);
++
++ if (!accel_state->src_pic->pDrawable)
++ pScreen->DestroyPixmap(accel_state->src_pix);
++
++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable)
++ pScreen->DestroyPixmap(accel_state->msk_pix);
++}
+
+ #ifdef ACCEL_CP
+
+@@ -2257,7 +2280,7 @@ static void FUNC_NAME(RadeonCompositeTile)(ScrnInfoPtr pScrn,
+ if ((info->cs && CS_FULL(info->cs)) ||
+ (!info->cs && (info->cp->indirectBuffer->used + 4 * 32) >
+ info->cp->indirectBuffer->total)) {
+- FUNC_NAME(RadeonDoneComposite)(info->accel_state->dst_pix);
++ FUNC_NAME(RadeonFinishComposite)(info->accel_state->dst_pix);
+ if (info->cs)
+ radeon_cs_flush_indirect(pScrn);
+ else
+diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c
+index be1d2fa..28dc335 100644
+--- a/src/radeon_exa_shared.c
++++ b/src/radeon_exa_shared.c
+@@ -126,6 +126,25 @@ Bool RADEONCheckBPP(int bpp)
+ return FALSE;
+ }
+
++PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid)
++{
++ PixmapPtr pPix = pScreen->CreatePixmap(pScreen, 1, 1, 32, 0);
++ struct radeon_bo *bo;
++
++ exaMoveInPixmap(pPix);
++ bo = radeon_get_pixmap_bo(pPix);
++
++ if (radeon_bo_map(bo, 1)) {
++ pScreen->DestroyPixmap(pPix);
++ return NULL;
++ }
++
++ memcpy(bo->ptr, &solid, 4);
++ radeon_bo_unmap(bo);
++
++ return pPix;
++}
++
+ static Bool radeon_vb_get(ScrnInfoPtr pScrn)
+ {
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+diff --git a/src/radeon_exa_shared.h b/src/radeon_exa_shared.h
+index 7b8b5ca..60a1045 100644
+--- a/src/radeon_exa_shared.h
++++ b/src/radeon_exa_shared.h
+@@ -40,6 +40,7 @@ extern void RADEONVlineHelperClear(ScrnInfoPtr pScrn);
+ extern void RADEONVlineHelperSet(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2);
+ extern Bool RADEONValidPM(uint32_t pm, int bpp);
+ extern Bool RADEONCheckBPP(int bpp);
++extern PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid);
+
+ #define RADEON_TRACE_FALL 0
+ #define RADEON_TRACE_DRAW 0
+--
+1.7.7.5
+
diff --git a/extra/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch b/extra/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch
new file mode 100644
index 000000000..e6b5433e1
--- /dev/null
+++ b/extra/xf86-video-ati/0001-poor-man-s-solid-picture-support-for-evergreen.patch
@@ -0,0 +1,290 @@
+From 761ef4b340e689490a76ec5ce520c858335e2106 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Sat, 14 Apr 2012 08:53:39 -0400
+Subject: [PATCH] poor man's solid picture support for evergreen
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ src/evergreen_exa.c | 163 ++++++++++++++++++++++++++++++---------------------
+ 1 files changed, 95 insertions(+), 68 deletions(-)
+
+diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
+index cee3ec2..61b47a4 100644
+--- a/src/evergreen_exa.c
++++ b/src/evergreen_exa.c
+@@ -748,17 +748,8 @@ static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict,
+ int op,
+ int unit)
+ {
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+ unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ unsigned int i;
+- int max_tex_w, max_tex_h;
+-
+- max_tex_w = 16384;
+- max_tex_h = 16384;
+-
+- if ((w > max_tex_w) || (h > max_tex_h))
+- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
+
+ for (i = 0; i < sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0]); i++) {
+ if (EVERGREENTexFormats[i].fmt == pPict->format)
+@@ -798,9 +789,16 @@ static void EVERGREENXFormSetup(PicturePtr pPict, PixmapPtr pPix,
+ ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ struct radeon_accel_state *accel_state = info->accel_state;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+ int const_offset = unit * 8;
++ int w, h;
++
++ if (pPict->pDrawable) {
++ w = pPict->pDrawable->width;
++ h = pPict->pDrawable->height;
++ } else {
++ w = 1;
++ h = 1;
++ }
+
+ if (pPict->transform != 0) {
+ accel_state->is_transform[unit] = TRUE;
+@@ -837,9 +835,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
+ ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ struct radeon_accel_state *accel_state = info->accel_state;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
++ unsigned int repeatType;
+ unsigned int i;
+ tex_resource_t tex_res;
+ tex_sampler_t tex_samp;
+@@ -854,9 +850,17 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
+ }
+
+ /* Texture */
++ if (pPict->pDrawable) {
++ tex_res.w = pPict->pDrawable->width;
++ tex_res.h = pPict->pDrawable->height;
++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
++ } else {
++ tex_res.w = 1;
++ tex_res.h = 1;
++ repeatType = RepeatNormal;
++ }
++
+ tex_res.id = unit;
+- tex_res.w = w;
+- tex_res.h = h;
+ tex_res.pitch = accel_state->src_obj[unit].pitch;
+ tex_res.depth = 0;
+ tex_res.dim = SQ_TEX_DIM_2D;
+@@ -1054,33 +1058,30 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture,
+ {
+ uint32_t tmp1;
+ PixmapPtr pSrcPixmap, pDstPixmap;
+- int max_tex_w, max_tex_h, max_dst_w, max_dst_h;
+
+ /* Check for unsupported compositing operations. */
+ if (op >= (int) (sizeof(EVERGREENBlendOp) / sizeof(EVERGREENBlendOp[0])))
+ RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+
+- if (!pSrcPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++ if (pSrcPicture->pDrawable) {
++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+
+- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+-
+- max_tex_w = 8192;
+- max_tex_h = 8192;
+- max_dst_w = 8192;
+- max_dst_h = 8192;
++ if (pSrcPixmap->drawable.width >= 16384 ||
++ pSrcPixmap->drawable.height >= 16384) {
++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
++ pSrcPixmap->drawable.width,
++ pSrcPixmap->drawable.height));
++ }
+
+- if (pSrcPixmap->drawable.width >= max_tex_w ||
+- pSrcPixmap->drawable.height >= max_tex_h) {
+- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+- pSrcPixmap->drawable.width,
+- pSrcPixmap->drawable.height));
+- }
++ if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0))
++ return FALSE;
++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+
+ pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
+
+- if (pDstPixmap->drawable.width >= max_dst_w ||
+- pDstPixmap->drawable.height >= max_dst_h) {
++ if (pDstPixmap->drawable.width >= 16384 ||
++ pDstPixmap->drawable.height >= 16384) {
+ RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n",
+ pDstPixmap->drawable.width,
+ pDstPixmap->drawable.height));
+@@ -1089,38 +1090,35 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture,
+ if (pMaskPicture) {
+ PixmapPtr pMaskPixmap;
+
+- if (!pMaskPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+-
+- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
++ if (pMaskPicture->pDrawable) {
++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+
+- if (pMaskPixmap->drawable.width >= max_tex_w ||
+- pMaskPixmap->drawable.height >= max_tex_h) {
+- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+- pMaskPixmap->drawable.width,
+- pMaskPixmap->drawable.height));
+- }
++ if (pMaskPixmap->drawable.width >= 16384 ||
++ pMaskPixmap->drawable.height >= 16384) {
++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
++ pMaskPixmap->drawable.width,
++ pMaskPixmap->drawable.height));
++ }
+
+- if (pMaskPicture->componentAlpha) {
+- /* Check if it's component alpha that relies on a source alpha and
+- * on the source value. We can only get one of those into the
+- * single source value that we get to blend with.
+- */
+- if (EVERGREENBlendOp[op].src_alpha &&
+- (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) !=
+- (BLEND_ZERO << COLOR_SRCBLEND_shift)) {
+- RADEON_FALLBACK(("Component alpha not supported with source "
+- "alpha and source value blending.\n"));
++ if (pMaskPicture->componentAlpha) {
++ /* Check if it's component alpha that relies on a source alpha and
++ * on the source value. We can only get one of those into the
++ * single source value that we get to blend with.
++ */
++ if (EVERGREENBlendOp[op].src_alpha &&
++ (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) !=
++ (BLEND_ZERO << COLOR_SRCBLEND_shift)) {
++ RADEON_FALLBACK(("Component alpha not supported with source "
++ "alpha and source value blending.\n"));
++ }
+ }
+- }
+
+- if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1))
+- return FALSE;
++ if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1))
++ return FALSE;
++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+ }
+
+- if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0))
+- return FALSE;
+-
+ if (!EVERGREENGetDestFormat(pDstPicture, &tmp1))
+ return FALSE;
+
+@@ -1132,7 +1130,8 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
+ PicturePtr pMaskPicture, PicturePtr pDstPicture,
+ PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
++ ScreenPtr pScreen = pDst->drawable.pScreen;
++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ struct radeon_accel_state *accel_state = info->accel_state;
+ uint32_t dst_format;
+@@ -1142,13 +1141,19 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
+ struct r600_accel_object src_obj, mask_obj, dst_obj;
+ float *cbuf;
+
+- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8)
++ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8))
+ return FALSE;
+
++ if (!pSrc) {
++ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color);
++ if (!pSrc)
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++
+ src_obj.offset = 0;
+ dst_obj.offset = 0;
+- src_obj.bo = radeon_get_pixmap_bo(pSrc);
+ dst_obj.bo = radeon_get_pixmap_bo(pDst);
++ src_obj.bo = radeon_get_pixmap_bo(pSrc);
+ dst_obj.surface = radeon_get_pixmap_surface(pDst);
+ src_obj.surface = radeon_get_pixmap_surface(pSrc);
+ dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst);
+@@ -1166,7 +1171,15 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
+ dst_obj.bpp = pDst->drawable.bitsPerPixel;
+ dst_obj.domain = RADEON_GEM_DOMAIN_VRAM;
+
+- if (pMask) {
++ if (pMaskPicture) {
++ if (!pMask) {
++ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color);
++ if (!pMask) {
++ if (!pSrcPicture->pDrawable)
++ pScreen->DestroyPixmap(pSrc);
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++ }
+ mask_obj.offset = 0;
+ mask_obj.bo = radeon_get_pixmap_bo(pMask);
+ mask_obj.tiling_flags = radeon_get_pixmap_tiling(pMask);
+@@ -1363,11 +1376,9 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
+ return TRUE;
+ }
+
+-static void EVERGREENDoneComposite(PixmapPtr pDst)
++static void EVERGREENFinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst,
++ struct radeon_accel_state *accel_state)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+- RADEONInfoPtr info = RADEONPTR(pScrn);
+- struct radeon_accel_state *accel_state = info->accel_state;
+ int vtx_size;
+
+ if (accel_state->vsync)
+@@ -1381,6 +1392,22 @@ static void EVERGREENDoneComposite(PixmapPtr pDst)
+ evergreen_finish_op(pScrn, vtx_size);
+ }
+
++static void EVERGREENDoneComposite(PixmapPtr pDst)
++{
++ ScreenPtr pScreen = pDst->drawable.pScreen;
++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ RADEONInfoPtr info = RADEONPTR(pScrn);
++ struct radeon_accel_state *accel_state = info->accel_state;
++
++ EVERGREENFinishComposite(pScrn, pDst, accel_state);
++
++ if (!accel_state->src_pic->pDrawable)
++ pScreen->DestroyPixmap(accel_state->src_pix);
++
++ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable)
++ pScreen->DestroyPixmap(accel_state->msk_pix);
++}
++
+ static void EVERGREENComposite(PixmapPtr pDst,
+ int srcX, int srcY,
+ int maskX, int maskY,
+@@ -1393,7 +1420,7 @@ static void EVERGREENComposite(PixmapPtr pDst,
+ float *vb;
+
+ if (CS_FULL(info->cs)) {
+- EVERGREENDoneComposite(info->accel_state->dst_pix);
++ EVERGREENFinishComposite(pScrn, pDst, info->accel_state);
+ radeon_cs_flush_indirect(pScrn);
+ EVERGREENPrepareComposite(info->accel_state->composite_op,
+ info->accel_state->src_pic,
+--
+1.7.7.5
+
diff --git a/extra/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch b/extra/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch
new file mode 100644
index 000000000..3a2779446
--- /dev/null
+++ b/extra/xf86-video-ati/0002-poor-man-s-solid-picture-support-for-r100.patch
@@ -0,0 +1,182 @@
+From f36b911ecc31f689ddceeeb11d10eb7cb4a3428d Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Fri, 13 Apr 2012 13:24:46 -0400
+Subject: [PATCH 2/3] poor man's solid picture support for r100
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ src/radeon_exa_render.c | 101 +++++++++++++++++++++++++++--------------------
+ 1 files changed, 58 insertions(+), 43 deletions(-)
+
+diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
+index b6cc9e4..451a625 100644
+--- a/src/radeon_exa_render.c
++++ b/src/radeon_exa_render.c
+@@ -338,17 +338,8 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict,
+ int unit)
+ {
+ unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+ int i;
+
+- /* r100 limit should be 2048, there are issues with 2048
+- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
+- */
+-
+- if ((w > 2047) || (h > 2047))
+- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
+-
+ for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) {
+ if (R100TexFormats[i].fmt == pPict->format)
+ break;
+@@ -357,7 +348,7 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict,
+ RADEON_FALLBACK(("Unsupported picture format 0x%x\n",
+ (int)pPict->format));
+
+- if (!RADEONCheckTexturePOT(pPict, unit == 0))
++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0))
+ return FALSE;
+
+ if (pPict->filter != PictFilterNearest &&
+@@ -392,15 +383,24 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
+ {
+ RINFO_FROM_SCREEN(pPix->drawable.pScreen);
+ uint32_t txfilter, txformat, txoffset, txpitch;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) &&
+- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y));
+- int i;
++ unsigned int repeatType;
++ Bool repeat;
++ int i, w, h;
+ struct radeon_exa_pixmap_priv *driver_priv;
+ ACCEL_PREAMBLE();
+
++ if (pPict->pDrawable) {
++ w = pPict->pDrawable->width;
++ h = pPict->pDrawable->height;
++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
++ } else {
++ w = h = 1;
++ repeatType = RepeatNormal;
++ }
++
++ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) &&
++ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y));
++
+ txpitch = exaGetPixmapPitch(pPix);
+ txoffset = 0;
+
+@@ -510,22 +510,6 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
+ if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
+ RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+
+- if (!pSrcPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+-
+- /* r100 limit should be 2048, there are issues with 2048
+- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
+- */
+-
+- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+-
+- if (pSrcPixmap->drawable.width > 2047 ||
+- pSrcPixmap->drawable.height > 2047) {
+- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+- pSrcPixmap->drawable.width,
+- pSrcPixmap->drawable.height));
+- }
+-
+ pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
+
+ if (pDstPixmap->drawable.width > 2047 ||
+@@ -535,20 +519,35 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
+ pDstPixmap->drawable.height));
+ }
+
++ if (pSrcPicture->pDrawable) {
++ /* r100 limit should be 2048, there are issues with 2048
++ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
++ */
++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
++
++ if (pSrcPixmap->drawable.width > 2047 ||
++ pSrcPixmap->drawable.height > 2047) {
++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
++ pSrcPixmap->drawable.width,
++ pSrcPixmap->drawable.height));
++ }
++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
++
+ if (pMaskPicture) {
+ PixmapPtr pMaskPixmap;
+
+- if (!pMaskPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+-
+- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
++ if (pMaskPicture->pDrawable) {
++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+
+- if (pMaskPixmap->drawable.width > 2047 ||
+- pMaskPixmap->drawable.height > 2047) {
+- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+- pMaskPixmap->drawable.width,
+- pMaskPixmap->drawable.height));
+- }
++ if (pMaskPixmap->drawable.width > 2047 ||
++ pMaskPixmap->drawable.height > 2047) {
++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
++ pMaskPixmap->drawable.width,
++ pMaskPixmap->drawable.height));
++ }
++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+
+ if (pMaskPicture->componentAlpha) {
+ /* Check if it's component alpha that relies on a source alpha and
+@@ -624,7 +623,8 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op,
+ PixmapPtr pMask,
+ PixmapPtr pDst)
+ {
+- RINFO_FROM_SCREEN(pDst->drawable.pScreen);
++ ScreenPtr pScreen = pDst->drawable.pScreen;
++ RINFO_FROM_SCREEN(pScreen);
+ uint32_t dst_format, dst_pitch, colorpitch;
+ uint32_t pp_cntl, blendcntl, cblend, ablend;
+ int pixel_shift;
+@@ -648,12 +648,27 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op,
+
+ CHECK_OFFSET(pDst, 0x0f, "destination");
+
++ if (!pSrc) {
++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color));
++ if (!pSrc)
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++
+ if (((dst_pitch >> pixel_shift) & 0x7) != 0)
+ RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
+
+ if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE))
+ return FALSE;
+
++ if (pMaskPicture && !pMask) {
++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
++ if (!pMask) {
++ if (!pSrcPicture->pDrawable)
++ pScreen->DestroyPixmap(pSrc);
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++ }
++
+ RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture,
+ pSrc, pMask, pDst);
+
+--
+1.7.7.5
+
diff --git a/extra/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch b/extra/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch
new file mode 100644
index 000000000..0a448fc93
--- /dev/null
+++ b/extra/xf86-video-ati/0003-poor-man-s-solid-picture-support-for-r200.patch
@@ -0,0 +1,179 @@
+From c5c8310858f8018a1754f2457d7b102dc7d62b23 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Fri, 13 Apr 2012 13:28:10 -0400
+Subject: [PATCH 3/3] poor man's solid picture support for r200
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ src/radeon_exa_render.c | 101 +++++++++++++++++++++++++++--------------------
+ 1 files changed, 58 insertions(+), 43 deletions(-)
+
+diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
+index 451a625..7f1a3ff 100644
+--- a/src/radeon_exa_render.c
++++ b/src/radeon_exa_render.c
+@@ -756,17 +756,8 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict,
+ int unit)
+ {
+ unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+ int i;
+
+- /* r200 limit should be 2048, there are issues with 2048
+- * see bug 19269
+- */
+-
+- if ((w > 2047) || (h > 2047))
+- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
+-
+ for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++)
+ {
+ if (R200TexFormats[i].fmt == pPict->format)
+@@ -776,7 +767,7 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict,
+ RADEON_FALLBACK(("Unsupported picture format 0x%x\n",
+ (int)pPict->format));
+
+- if (!RADEONCheckTexturePOT(pPict, unit == 0))
++ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0))
+ return FALSE;
+
+ if (pPict->filter != PictFilterNearest &&
+@@ -809,15 +800,24 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
+ {
+ RINFO_FROM_SCREEN(pPix->drawable.pScreen);
+ uint32_t txfilter, txformat, txoffset, txpitch;
+- int w = pPict->pDrawable->width;
+- int h = pPict->pDrawable->height;
+- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) &&
+- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y));
+- int i;
++ unsigned int repeatType;
++ Bool repeat;
++ int i, w, h;
+ struct radeon_exa_pixmap_priv *driver_priv;
+ ACCEL_PREAMBLE();
+
++ if (pPict->pDrawable) {
++ w = pPict->pDrawable->width;
++ h = pPict->pDrawable->height;
++ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
++ } else {
++ w = h = 1;
++ repeatType = RepeatNormal;
++ }
++
++ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) &&
++ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y));
++
+ txpitch = exaGetPixmapPitch(pPix);
+
+ txoffset = 0;
+@@ -926,22 +926,6 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+ if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
+ RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+
+- if (!pSrcPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+-
+- /* r200 limit should be 2048, there are issues with 2048
+- * see bug 19269
+- */
+-
+- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+-
+- if (pSrcPixmap->drawable.width > 2047 ||
+- pSrcPixmap->drawable.height > 2047) {
+- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+- pSrcPixmap->drawable.width,
+- pSrcPixmap->drawable.height));
+- }
+-
+ pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
+
+ if (pDstPixmap->drawable.width > 2047 ||
+@@ -951,20 +935,35 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+ pDstPixmap->drawable.height));
+ }
+
++ if (pSrcPicture->pDrawable) {
++ /* r200 limit should be 2048, there are issues with 2048
++ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
++ */
++ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
++
++ if (pSrcPixmap->drawable.width > 2047 ||
++ pSrcPixmap->drawable.height > 2047) {
++ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
++ pSrcPixmap->drawable.width,
++ pSrcPixmap->drawable.height));
++ }
++ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
++
+ if (pMaskPicture) {
+ PixmapPtr pMaskPixmap;
+
+- if (!pMaskPicture->pDrawable)
+- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+-
+- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
++ if (pMaskPicture->pDrawable) {
++ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+
+- if (pMaskPixmap->drawable.width > 2047 ||
+- pMaskPixmap->drawable.height > 2047) {
+- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+- pMaskPixmap->drawable.width,
+- pMaskPixmap->drawable.height));
+- }
++ if (pMaskPixmap->drawable.width > 2047 ||
++ pMaskPixmap->drawable.height > 2047) {
++ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
++ pMaskPixmap->drawable.width,
++ pMaskPixmap->drawable.height));
++ }
++ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
++ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+
+ if (pMaskPicture->componentAlpha) {
+ /* Check if it's component alpha that relies on a source alpha and
+@@ -997,7 +996,8 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture,
+ PicturePtr pMaskPicture, PicturePtr pDstPicture,
+ PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
+ {
+- RINFO_FROM_SCREEN(pDst->drawable.pScreen);
++ ScreenPtr pScreen = pDst->drawable.pScreen;
++ RINFO_FROM_SCREEN(pScreen);
+ uint32_t dst_format, dst_pitch;
+ uint32_t pp_cntl, blendcntl, cblend, ablend, colorpitch;
+ int pixel_shift;
+@@ -1024,9 +1024,24 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture,
+ if (((dst_pitch >> pixel_shift) & 0x7) != 0)
+ RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
+
++ if (!pSrc) {
++ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color));
++ if (!pSrc)
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++
+ if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE))
+ return FALSE;
+
++ if (pMaskPicture && !pMask) {
++ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
++ if (!pMask) {
++ if (!pSrcPicture->pDrawable)
++ pScreen->DestroyPixmap(pSrc);
++ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
++ }
++ }
++
+ RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture,
+ pSrc, pMask, pDst);
+
+--
+1.7.7.5
+
diff --git a/extra/xf86-video-ati/PKGBUILD b/extra/xf86-video-ati/PKGBUILD
index 09c47f815..341982471 100644
--- a/extra/xf86-video-ati/PKGBUILD
+++ b/extra/xf86-video-ati/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 154644 2012-03-30 13:39:00Z andyrtr $
+# $Id: PKGBUILD 158858 2012-05-12 13:09:32Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
pkgname=xf86-video-ati
pkgver=6.14.4
-pkgrel=2
+pkgrel=4
pkgdesc="X.org ati video driver"
arch=('i686' 'x86_64')
url="http://xorg.freedesktop.org/"
@@ -14,11 +14,30 @@ makedepends=('xorg-server-devel>=1.11.99.902' 'xf86driproto' 'mesa' 'glproto')
conflicts=('xorg-server<1.11.99.902')
groups=('xorg-drivers' 'xorg')
options=('!libtool')
-source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('75ad000bc00599e1797134f2d20d3094cba6af92')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ git_fixes.diff
+ 0000-poor-man-s-solid-picture-support-for-r300-r600.patch
+ 0001-poor-man-s-solid-picture-support-for-evergreen.patch
+ 0002-poor-man-s-solid-picture-support-for-r100.patch
+ 0003-poor-man-s-solid-picture-support-for-r200.patch)
+sha1sums=('75ad000bc00599e1797134f2d20d3094cba6af92'
+ '8b774e2f0310075cff2b7d874b0bed38d6245769'
+ '787f88c428f56ca6e96ba5eaf043a30bddfd0e23'
+ '69359a6623fe0f2214790c8ad40cac1a680a3825'
+ 'c0709ab82728e34838a8aeead7d1b79b7faf09bd'
+ '77a519e250c27a9fb94eeb52da655eed7c5f2eca')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i ${srcdir}/git_fixes.diff
+
+ # fix rendering issues with recent cairo - testing attemp taken from https://bugs.freedesktop.org/show_bug.cgi?id=47266
+ # and http://lists.x.org/archives/xorg-driver-ati/2012-April/022724.html
+ patch -Np1 -i ${srcdir}/0000-poor-man-s-solid-picture-support-for-r300-r600.patch
+ patch -Np1 -i ${srcdir}/0001-poor-man-s-solid-picture-support-for-evergreen.patch
+ patch -Np1 -i ${srcdir}/0002-poor-man-s-solid-picture-support-for-r100.patch
+ patch -Np1 -i ${srcdir}/0003-poor-man-s-solid-picture-support-for-r200.patch
+
./configure --prefix=/usr --enable-dri
make
}
diff --git a/extra/xf86-video-ati/git_fixes.diff b/extra/xf86-video-ati/git_fixes.diff
new file mode 100644
index 000000000..0c4518319
--- /dev/null
+++ b/extra/xf86-video-ati/git_fixes.diff
@@ -0,0 +1,33 @@
+From d282719a9c2fb0ee32830aa75b8dfbb9392954ed Mon Sep 17 00:00:00 2001
+From: Jerome Glisse <jglisse@redhat.com>
+Date: Wed, 04 Apr 2012 21:08:30 +0000
+Subject: r6xx-r9xx: force 1D tiling for buffer with height < 64
+
+Due to some old kernel issue, height is 8 aligned insided the ddx
+For buffer with height btw 57 & 63 this lead ddx to believe it can
+allocate a 2D tiled surface while mesa will not align height and
+will assume 1D tiled leading to disagreement and rendering issue.
+This patch force buffer with height < 64 to be 1D tiled.
+
+Signed-off-by: Jerome Glisse <jglisse@redhat.com>
+---
+diff --git a/src/radeon_exa.c b/src/radeon_exa.c
+index 99a5806..270dad4 100644
+--- a/src/radeon_exa.c
++++ b/src/radeon_exa.c
+@@ -511,6 +511,13 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height,
+ surface.last_level = 0;
+ surface.bpe = cpp;
+ surface.nsamples = 1;
++ if (height < 64) {
++ /* disable 2d tiling for small surface to work around
++ * the fact that ddx align height to 8 pixel for old
++ * obscure reason i can't remember
++ */
++ tiling &= ~RADEON_TILING_MACRO;
++ }
+ surface.flags = RADEON_SURF_SCANOUT;
+ surface.flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE);
+ surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR, MODE);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/extra/xf86-video-i740/PKGBUILD b/extra/xf86-video-i740/PKGBUILD
index 04217ad7e..6e796ce50 100644
--- a/extra/xf86-video-i740/PKGBUILD
+++ b/extra/xf86-video-i740/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 153340 2012-03-12 20:53:33Z andyrtr $
+# $Id: PKGBUILD 158884 2012-05-12 17:37:01Z andyrtr $
#Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-i740
-pkgver=1.3.2
-pkgrel=8
+pkgver=1.3.3
+pkgrel=1
pkgdesc="X.org Intel i740 video driver"
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
@@ -14,7 +14,7 @@ conflicts=('xorg-server<1.11.99.903')
groups=('xorg-drivers' 'xorg')
options=('!libtool')
source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('aadd2168153f780c487778e5fdda5473ed4b243d')
+sha1sums=('885660aad0d558ae0fb69f3b639c03f084a7a615')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/xf86-video-s3/PKGBUILD b/extra/xf86-video-s3/PKGBUILD
index 613fd4831..8c9a6b8a7 100644
--- a/extra/xf86-video-s3/PKGBUILD
+++ b/extra/xf86-video-s3/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 155417 2012-04-03 11:24:01Z jgc $
+# $Id: PKGBUILD 158890 2012-05-12 18:14:42Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-s3
-pkgver=0.6.3
-pkgrel=8
+pkgver=0.6.4
+pkgrel=1
pkgdesc="X.org S3 video driver"
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
@@ -13,15 +13,13 @@ makedepends=('xorg-server-devel>=1.12.0')
conflicts=('xorg-server<1.12.0')
options=('!libtool')
groups=('xorg-drivers' 'xorg')
-source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
- git-fixes.patch)
-md5sums=('5eb06d88533fb327d067928faeb20860'
- '8b3033b16ee826a9e0870dd80717eafd')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('9170e57f966d810fdfc2de4473a7c8e814019c31')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i "${srcdir}/git-fixes.patch"
- autoreconf -fi
+ #patch -Np1 -i "${srcdir}/git-fixes.patch"
+ #autoreconf -fi
./configure --prefix=/usr
make
}
diff --git a/extra/xfce4-genmon-plugin/PKGBUILD b/extra/xfce4-genmon-plugin/PKGBUILD
index a019adb4a..6d2391f4c 100644
--- a/extra/xfce4-genmon-plugin/PKGBUILD
+++ b/extra/xfce4-genmon-plugin/PKGBUILD
@@ -1,33 +1,38 @@
-# $Id: PKGBUILD 157859 2012-04-30 04:20:27Z foutrelis $
-# Maintainer: AndyRTR <andyrtr@archlinux.org>
+# $Id: PKGBUILD 158882 2012-05-12 17:34:09Z foutrelis $
+# Maintainer:
+# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: Tobias Kieslich <tobias (at) archlinux.org>
pkgname=xfce4-genmon-plugin
-pkgver=3.3.1
-pkgrel=2
+pkgver=3.4.0
+pkgrel=1
pkgdesc="plugin that monitors customizable programs stdout for the Xfce4 panel"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
license=('LGPL2.1')
url="http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin"
groups=('xfce4-goodies')
-depends=('xfce4-panel' 'libxfcegui4')
+depends=('xfce4-panel')
makedepends=('intltool')
options=('!libtool')
-source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/3.3/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('e0022e15d4211a87c17d9f252b68e1d3')
+source=(http://archive.xfce.org/src/panel-plugins/$pkgname/3.4/$pkgname-$pkgver.tar.bz2)
+sha256sums=('b0a5337b49c85623dc89f3c9e47c7374b1d466af2418033d2d6dfc57a9790387')
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --libexecdir=/usr/lib \
- --localstatedir=/var \
- --disable-static \
- --disable-debug
+ cd "$srcdir/$pkgname-3.4"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-debug
make
}
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
+ cd "$srcdir/$pkgname-3.4"
+ make DESTDIR="$pkgdir" install
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/extra/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff b/extra/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff
new file mode 100644
index 000000000..12c110151
--- /dev/null
+++ b/extra/xorg-server/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff
@@ -0,0 +1,116 @@
+--- xorg-server-1.12.1/exa/exa_glyphs.c 2012-03-30 04:57:25.000000000 +0200
++++ xorg-server-1.12.1/exa_glyphs.c.new 2012-04-15 11:48:51.683214230 +0200
+@@ -686,6 +686,7 @@
+ PixmapPtr pMaskPixmap = 0;
+ PicturePtr pMask = NULL;
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
++ ExaScreenPriv(pScreen);
+ int width = 0, height = 0;
+ int x, y;
+ int first_xOff = list->xOff, first_yOff = list->yOff;
+@@ -697,7 +698,6 @@
+ ExaGlyphBuffer buffer;
+
+ if (maskFormat) {
+- ExaScreenPriv(pScreen);
+ GCPtr pGC;
+ xRectangle rect;
+
+@@ -719,22 +719,20 @@
+ maskFormat->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
+ if (!pMaskPixmap)
+- return;
++ goto fallback;
+ component_alpha = NeedsComponent(maskFormat->format);
+ pMask = CreatePicture(0, &pMaskPixmap->drawable,
+ maskFormat, CPComponentAlpha, &component_alpha,
+ serverClient, &error);
+- if (!pMask ||
+- (!component_alpha && pExaScr->info->CheckComposite &&
+- !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask)))
++ (*pScreen->DestroyPixmap) (pMaskPixmap);
++ if (!pMask)
++ goto fallback;
++
++ if (!component_alpha && pExaScr->info->CheckComposite &&
++ !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask))
+ {
+ PictFormatPtr argbFormat;
+
+- (*pScreen->DestroyPixmap) (pMaskPixmap);
+-
+- if (!pMask)
+- return;
+-
+ /* The driver can't seem to composite to a8, let's try argb (but
+ * without component-alpha) */
+ FreePicture((pointer) pMask, (XID) 0);
+@@ -748,15 +746,25 @@
+ maskFormat->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
+ if (!pMaskPixmap)
+- return;
++ goto fallback;
+
+ pMask = CreatePicture(0, &pMaskPixmap->drawable, maskFormat, 0, 0,
+ serverClient, &error);
+- if (!pMask) {
+- (*pScreen->DestroyPixmap) (pMaskPixmap);
+- return;
+- }
++ (*pScreen->DestroyPixmap) (pMaskPixmap);
++ if (!pMask)
++ goto fallback;
+ }
++
++ if (pExaScr->info->CheckComposite &&
++ (!(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask) ||
++ (!(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst) &&
++ (op != PictOpOver ||
++ !(*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, pMask, pDst) ||
++ !(*pExaScr->info->CheckComposite) (PictOpOver, pSrc, pMask, pDst))))) {
++ FreePicture ((pointer) pMask, (XID) 0);
++ goto fallback;
++ }
++
+ pGC = GetScratchGC(pMaskPixmap->drawable.depth, pScreen);
+ ValidateGC(&pMaskPixmap->drawable, pGC);
+ rect.x = 0;
+@@ -769,6 +777,13 @@
+ y = -extents.y1;
+ }
+ else {
++ if (pExaScr->info->CheckComposite &&
++ !(*pExaScr->info->CheckComposite) (op, pSrc, NULL, pDst) &&
++ (op != PictOpOver ||
++ !(*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, NULL, pDst) ||
++ !(*pExaScr->info->CheckComposite) (PictOpOver, pSrc, NULL, pDst)))
++ goto fallback;
++
+ x = 0;
+ y = 0;
+ }
+@@ -834,6 +849,10 @@
+ xSrc + x - first_xOff,
+ ySrc + y - first_yOff, 0, 0, x, y, width, height);
+ FreePicture((pointer) pMask, (XID) 0);
+- (*pScreen->DestroyPixmap) (pMaskPixmap);
+ }
++
++ return;
++
++fallback:
++ ExaCheckGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
+ }
+--- xorg-server-1.12.1/exa/exa_render.c 2012-03-30 04:57:25.000000000 +0200
++++ xorg-server-1.12.1/exa_render.c.new 2012-04-15 11:50:35.272482047 +0200
+@@ -878,7 +878,7 @@
+ Bool saveMaskRepeat = pMask ? pMask->repeat : 0;
+ RegionRec region;
+
+- if (pExaScr->swappedOut)
++ if (pExaScr->fallback_counter || pExaScr->swappedOut)
+ goto fallback;
+
+ /* Remove repeat in source if useless */
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD
index dd14c2e75..0ab1942fa 100644
--- a/extra/xorg-server/PKGBUILD
+++ b/extra/xorg-server/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 156103 2012-04-14 07:35:46Z andyrtr $
+# $Id: PKGBUILD 158860 2012-05-12 13:09:37Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=xorg-server
pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel')
pkgver=1.12.1
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
license=('custom')
url="http://xorg.freedesktop.org"
@@ -16,6 +16,7 @@ options=('!libtool')
source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
autoconfig-nvidia.patch
autoconfig-sis.patch
+ EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff
#git-fixes.patch
xvfb-run
xvfb-run.1
@@ -23,6 +24,7 @@ source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
sha1sums=('922b963901f4711449b53fb32ce3e14f5b642766'
'63836e5cfb4ae7353fb2e31239a544409c7ead32'
'175de5630b43dbc97778adfba5563b7fdd77f11f'
+ '4acb39587f73bcbb9a331377d6ef99cb73eb95a8'
'c94f742d3f9cabf958ae58e4015d9dd185aabedc'
'6838fc00ef4618c924a77e0fb03c05346080908a'
'993798f3d22ad672d769dae5f48d1fa068d5578f')
@@ -36,6 +38,11 @@ build() {
# Use unofficial imedia SiS driver for supported SiS devices
patch -Np0 -i "${srcdir}/autoconfig-sis.patch"
+ # fix glitches and crashes with EXA and cairo 1.12
+ # taken from https://bugs.freedesktop.org/show_bug.cgi?id=47266
+ # and reworked for 1.12.1 changes
+ patch -Np1 -i ${srcdir}/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff
+
# Add post-release patches from 1.11 branch
# patch -Np1 -i "${srcdir}/git-fixes.patch"
diff --git a/multilib/lib32-cairo/PKGBUILD b/multilib/lib32-cairo/PKGBUILD
index 1af993d35..6eb22f943 100644
--- a/multilib/lib32-cairo/PKGBUILD
+++ b/multilib/lib32-cairo/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 63485 2012-02-05 11:45:09Z ibiru $
+# $Id: PKGBUILD 70602 2012-05-12 13:12:37Z bluewind $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
_pkgbasename=cairo
pkgname=lib32-$_pkgbasename
-pkgver=1.10.2
-pkgrel=3
+pkgver=1.12.0
+pkgrel=1
pkgdesc="Cairo vector graphics library (32-bit)"
arch=('x86_64')
url="http://cairographics.org/"
@@ -13,9 +13,11 @@ depends=('lib32-libpng' 'lib32-libxrender' 'lib32-fontconfig'
'lib32-pixman' 'lib32-glib2' ${_pkgbasename})
makedepends=('gcc-multilib')
source=(http://cairographics.org/releases/${_pkgbasename}-${pkgver}.tar.gz
- cairo-1.10.0-buggy_gradients.patch)
-sha1sums=('ccce5ae03f99c505db97c286a0c9a90a926d3c6e'
- '8b843a9934e5112b6188e5bcf4adfc1fdaf9fa04')
+ cairo-1.10.0-buggy_gradients.patch
+ git_fixes.patch)
+md5sums=('e6c85575ba7094f88b637bdfd835a751'
+ '9b323790dab003e228c6955633cb888e'
+ 'ce32ba4639d910bce7159c9a67ff2355')
build() {
export CC="gcc -m32"
@@ -23,9 +25,13 @@ build() {
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
cd "${srcdir}/${_pkgbasename}-${pkgver}"
+
+ patch -Np1 -i ${srcdir}/git_fixes.patch
+ autoreconf -vfi
+
./configure --prefix=/usr --libdir=/usr/lib32 \
--sysconfdir=/etc --localstatedir=/var \
- --disable-static --enable-tee
+ --disable-static --enable-tee --disable-xlib-xcb
make
}
diff --git a/multilib/lib32-cairo/git_fixes.patch b/multilib/lib32-cairo/git_fixes.patch
new file mode 100644
index 000000000..6ad8979eb
--- /dev/null
+++ b/multilib/lib32-cairo/git_fixes.patch
@@ -0,0 +1,1086 @@
+From ede11b2954db19e3ca9d31cef7d04a7bf0e42ddc Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun, 25 Mar 2012 18:37:14 +0000
+Subject: Fix math in comments
+
+---
+diff --git a/src/cairo-arc.c b/src/cairo-arc.c
+index dc07fee..6977e88 100644
+--- a/src/cairo-arc.c
++++ b/src/cairo-arc.c
+@@ -139,7 +139,7 @@ _arc_segments_needed (double angle,
+
+ From that paper, a very practical value of h is:
+
+- h = 4/3 * tan(angle/4)
++ h = 4/3 * R * tan(angle/4)
+
+ This value does not give the spline with minimal error, but it does
+ provide a very good approximation, (6th-order convergence), and the
+--
+cgit v0.9.0.2-2-gbebe
+From fba21ef2a4c4eb343668267fda713aedbb6af2a4 Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Tue, 27 Mar 2012 21:25:37 +0000
+Subject: gl: use font's antialias option to check whether it needs mask
+
+There is need to loop over number of glyphs to check wether the glyph
+image is a ARGB32 as the font's antialias option can be used for checking.
+If antialias is SUBPIXEL or BEST, the glyph surface will be ARGB32,
+otherwise it will be A8 format. Therefore we will only be using
+component-alpha at SUBPIXEL (or better) font quality and only then need
+a mask for multiple pass glyph composition.
+---
+diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
+index 832956f..9756ea4 100644
+--- a/src/cairo-gl-glyphs.c
++++ b/src/cairo-gl-glyphs.c
+@@ -427,23 +427,15 @@ _cairo_gl_composite_glyphs (void *_dst,
+
+ TRACE ((stderr, "%s\n", __FUNCTION__));
+
+- /* If any of the glyphs are component alpha, we have to go through a mask,
+- * since only _cairo_gl_surface_composite() currently supports component
+- * alpha.
++ /* If any of the glyphs require component alpha, we have to go through
++ * a mask, since only _cairo_gl_surface_composite() currently supports
++ * component alpha.
+ */
+- if (!dst->base.is_clear && ! info->use_mask && op != CAIRO_OPERATOR_OVER) {
+- for (i = 0; i < info->num_glyphs; i++) {
+- cairo_scaled_glyph_t *scaled_glyph;
+-
+- if (_cairo_scaled_glyph_lookup (info->font, info->glyphs[i].index,
+- CAIRO_SCALED_GLYPH_INFO_SURFACE,
+- &scaled_glyph) == CAIRO_INT_STATUS_SUCCESS &&
+- scaled_glyph->surface->format == CAIRO_FORMAT_ARGB32)
+- {
+- info->use_mask = TRUE;
+- break;
+- }
+- }
++ if (!dst->base.is_clear && ! info->use_mask && op != CAIRO_OPERATOR_OVER &&
++ (info->font->options.antialias == CAIRO_ANTIALIAS_SUBPIXEL ||
++ info->font->options.antialias == CAIRO_ANTIALIAS_BEST))
++ {
++ info->use_mask = TRUE;
+ }
+
+ if (info->use_mask) {
+--
+cgit v0.9.0.2-2-gbebe
+From d304f0e57be8036719c3709e2419487326369105 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed, 28 Mar 2012 23:32:36 +0000
+Subject: composite-rectangles: Trim extents for SOURCE and CLEAR to the mask
+
+The SOURCE and CLEAR are the odd pair in Cairo's range of operators that
+are bound by the shape/mask, but are unbound by the source. This
+regularly leads to bugs as only track the bound/unbound rectangles and
+confuse the meaning when bound only by the mask.
+
+What is required is that the unbound extents in this case is only
+trimmed by the mask (the bounded extents are still the intersection of
+all).
+
+Fixes bug-source-cu
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c
+index 106571e..8c5cd5a 100644
+--- a/src/cairo-composite-rectangles.c
++++ b/src/cairo-composite-rectangles.c
+@@ -147,8 +147,12 @@ _cairo_composite_rectangles_intersect (cairo_composite_rectangles_t *extents,
+ if (! ret && extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK)
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+ if (_cairo_clip_is_all_clipped (extents->clip))
+@@ -199,8 +203,12 @@ _cairo_composite_rectangles_intersect_source_extents (cairo_composite_rectangles
+ rect.height == extents->bounded.height)
+ return CAIRO_INT_STATUS_SUCCESS;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ clip = extents->clip;
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+@@ -253,8 +261,12 @@ _cairo_composite_rectangles_intersect_mask_extents (cairo_composite_rectangles_t
+ mask.height == extents->bounded.height)
+ return CAIRO_INT_STATUS_SUCCESS;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ clip = extents->clip;
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+--
+cgit v0.9.0.2-2-gbebe
+From af6e084dd78fcbb8ecce46c57f655f5e24343b8c Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu, 29 Mar 2012 13:48:24 +0000
+Subject: cairoint: Mark PDF surface as requiring the deflate stream output
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairoint.h b/src/cairoint.h
+index 9a8003e..9f20d51 100644
+--- a/src/cairoint.h
++++ b/src/cairoint.h
+@@ -73,7 +73,10 @@
+ #include "cairo-compiler-private.h"
+ #include "cairo-error-private.h"
+
+-#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_SCRIPT_SURFACE || CAIRO_HAS_XML_SURFACE
++#if CAIRO_HAS_PDF_SURFACE || \
++ CAIRO_HAS_PS_SURFACE || \
++ CAIRO_HAS_SCRIPT_SURFACE || \
++ CAIRO_HAS_XML_SURFACE
+ #define CAIRO_HAS_DEFLATE_STREAM 1
+ #endif
+
+@@ -84,7 +87,9 @@
+ #define CAIRO_HAS_FONT_SUBSET 1
+ #endif
+
+-#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_PDF_SURFACE || CAIRO_HAS_FONT_SUBSET
++#if CAIRO_HAS_PS_SURFACE || \
++ CAIRO_HAS_PDF_SURFACE || \
++ CAIRO_HAS_FONT_SUBSET
+ #define CAIRO_HAS_PDF_OPERATORS 1
+ #endif
+
+--
+cgit v0.9.0.2-2-gbebe
+From a965b0f95fdeb567f7ccb51f7c8c47735a61e2d9 Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Thu, 29 Mar 2012 01:08:51 +0000
+Subject: gl: fix y-axis origin when map_to_image() for non texture GL surface
+
+We need to fix y-axis origin when map a GL surface to image surface for
+non-texture GL surface.
+
+Test cases: extended-blend-alpha-mask, extended-blend-mask.
+Although the image outputs is not right, but the image on the first grid
+(upper-left corner) is correct comparing to image output.
+---
+diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
+index 8bbf939..32ecf63 100644
+--- a/src/cairo-gl-surface.c
++++ b/src/cairo-gl-surface.c
+@@ -985,6 +985,7 @@ _cairo_gl_surface_map_to_image (void *abstract_surface,
+ unsigned int cpp;
+ cairo_bool_t invert;
+ cairo_status_t status;
++ int y;
+
+ /* Want to use a switch statement here but the compiler gets whiny. */
+ if (surface->base.content == CAIRO_CONTENT_COLOR_ALPHA) {
+@@ -1065,7 +1066,12 @@ _cairo_gl_surface_map_to_image (void *abstract_surface,
+ glPixelStorei (GL_PACK_ROW_LENGTH, image->stride / cpp);
+ if (invert)
+ glPixelStorei (GL_PACK_INVERT_MESA, 1);
+- glReadPixels (extents->x, extents->y,
++
++ y = extents->y;
++ if (! _cairo_gl_surface_is_texture (surface))
++ y = surface->height - extents->y - extents->height;
++
++ glReadPixels (extents->x, y,
+ extents->width, extents->height,
+ format, type, image->data);
+ if (invert)
+--
+cgit v0.9.0.2-2-gbebe
+From c77112c5464d7ff21052527f82f4d729cc509291 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psychon@znc.in>
+Date: Mon, 02 Apr 2012 18:43:00 +0000
+Subject: xcb: Fix SHM in _get_image()
+
+Commit 2283ab9 introduced a logic error. Instead of falling back to the non-SHM
+path when getting the image via SHM failed, we now did the fallback when getting
+the image via SHM worked (which means that the SHM operation was a waste of
+time).
+
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
+index fff4f52..6bedbda 100644
+--- a/src/cairo-xcb-surface.c
++++ b/src/cairo-xcb-surface.c
+@@ -367,7 +367,7 @@ _get_image (cairo_xcb_surface_t *surface,
+ if (use_shm) {
+ image = _get_shm_image (surface, x, y, width, height);
+ if (image) {
+- if (image->status) {
++ if (image->status == CAIRO_STATUS_SUCCESS) {
+ _cairo_xcb_connection_release (connection);
+ return image;
+ }
+--
+cgit v0.9.0.2-2-gbebe
+From cc247c346b75353f16ab40ac74c54cdd9663d16b Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Mon, 02 Apr 2012 21:29:47 +0000
+Subject: gl: Remove an unused variable
+
+---
+diff --git a/src/cairo-gl-gradient.c b/src/cairo-gl-gradient.c
+index b364b92..ce7c0dd 100644
+--- a/src/cairo-gl-gradient.c
++++ b/src/cairo-gl-gradient.c
+@@ -207,7 +207,6 @@ _cairo_gl_gradient_create (cairo_gl_context_t *ctx,
+ cairo_status_t status;
+ int tex_width;
+ void *data;
+- cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
+
+ if ((unsigned int) ctx->max_texture_size / 2 <= n_stops)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+--
+cgit v0.9.0.2-2-gbebe
+From 7a262fd398c8a1f3c9052e8d9ec459e27ff91b4d Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Wed, 04 Apr 2012 10:23:09 +0000
+Subject: fix bug in _cairo_image_analyze_color
+
+---
+diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
+index 8208a15..e860e1b 100644
+--- a/src/cairo-image-surface.c
++++ b/src/cairo-image-surface.c
+@@ -1130,9 +1130,12 @@ _cairo_image_analyze_color (cairo_image_surface_t *image)
+ if (image->color != CAIRO_IMAGE_UNKNOWN_COLOR)
+ return image->color;
+
+- if (image->format == CAIRO_FORMAT_A1 || image->format == CAIRO_FORMAT_A8)
++ if (image->format == CAIRO_FORMAT_A1)
+ return image->color = CAIRO_IMAGE_IS_MONOCHROME;
+
++ if (image->format == CAIRO_FORMAT_A8)
++ return image->color = CAIRO_IMAGE_IS_GRAYSCALE;
++
+ if (image->format == CAIRO_FORMAT_ARGB32) {
+ image->color = CAIRO_IMAGE_IS_MONOCHROME;
+ for (y = 0; y < image->height; y++) {
+--
+cgit v0.9.0.2-2-gbebe
+From 70b2856ed3d31b41e69b3d82fb9c5c11c2b3d3d4 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Thu, 05 Apr 2012 23:43:35 +0000
+Subject: type1-subset: use fallback font if glyph widths are calculated
+
+Bug 48349 has a pdf file with a Type 1 font where the glyph widths are
+of the form:
+
+34 9302 19 div hsbw
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index 607ac8e..ba1008a 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -751,6 +751,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ command = *p++;
+ switch (command) {
+ case TYPE1_CHARSTRING_COMMAND_HSBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
+ font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+@@ -797,6 +800,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ break;
+
+ case TYPE1_CHARSTRING_COMMAND_SBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
+ font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+--
+cgit v0.9.0.2-2-gbebe
+From a6d955fcc46ae2da8d6f3b2cadeae64c03066461 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Thu, 05 Apr 2012 23:53:50 +0000
+Subject: fix indentation in cairo_type1_font_subset_parse_charstring
+
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index ba1008a..ddef8ae 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -1,3 +1,4 @@
++/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
+ /* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2006 Red Hat, Inc
+@@ -750,86 +751,79 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ if (*p < 32) {
+ command = *p++;
+ switch (command) {
+- case TYPE1_CHARSTRING_COMMAND_HSBW:
+- if (! last_op_was_integer)
+- return CAIRO_INT_STATUS_UNSUPPORTED;
++ case TYPE1_CHARSTRING_COMMAND_HSBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
++ font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_CALLSUBR:
++ if (font->subset_subrs &&
++ last_op_was_integer &&
++ font->build_stack.top_value >= 0 &&
++ font->build_stack.top_value < font->num_subrs)
++ {
++ subr_num = font->build_stack.top_value;
++ font->subrs[subr_num].used = TRUE;
++ last_op_was_integer = FALSE;
++ status = cairo_type1_font_subset_parse_charstring (font,
++ glyph,
++ font->subrs[subr_num].subr_string,
++ font->subrs[subr_num].subr_length);
++ } else {
++ font->subset_subrs = FALSE;
++ }
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_ESCAPE:
++ command = command << 8 | *p++;
++ switch (command) {
++ case TYPE1_CHARSTRING_COMMAND_SEAC:
++ /* The seac command takes five integer arguments. The
++ * last two are glyph indices into the PS standard
++ * encoding give the names of the glyphs that this
++ * glyph is composed from. All we need to do is to
++ * make sure those glyphs are present in the subset
++ * under their standard names. */
++ status = use_standard_encoding_glyph (font, font->build_stack.stack[3]);
++ if (unlikely (status))
++ return status;
++
++ status = use_standard_encoding_glyph (font, font->build_stack.stack[4]);
++ if (unlikely (status))
++ return status;
+
+- font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+ break;
+
+- case TYPE1_CHARSTRING_COMMAND_CALLSUBR:
+- if (font->subset_subrs &&
+- last_op_was_integer &&
+- font->build_stack.top_value >= 0 &&
+- font->build_stack.top_value < font->num_subrs)
+- {
+- subr_num = font->build_stack.top_value;
+- font->subrs[subr_num].used = TRUE;
+- last_op_was_integer = FALSE;
+- status = cairo_type1_font_subset_parse_charstring (font,
+- glyph,
+- font->subrs[subr_num].subr_string,
+- font->subrs[subr_num].subr_length);
+- } else {
+- font->subset_subrs = FALSE;
+- }
++ case TYPE1_CHARSTRING_COMMAND_SBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
++ font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
+ break;
+
+- case TYPE1_CHARSTRING_COMMAND_ESCAPE:
+- command = command << 8 | *p++;
+- switch (command) {
+- case TYPE1_CHARSTRING_COMMAND_SEAC:
+- /* The seac command takes five integer arguments. The
+- * last two are glyph indices into the PS standard
+- * encoding give the names of the glyphs that this
+- * glyph is composed from. All we need to do is to
+- * make sure those glyphs are present in the subset
+- * under their standard names. */
+- status = use_standard_encoding_glyph (font, font->build_stack.stack[3]);
+- if (unlikely (status))
+- return status;
+-
+- status = use_standard_encoding_glyph (font, font->build_stack.stack[4]);
+- if (unlikely (status))
+- return status;
+-
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_SBW:
+- if (! last_op_was_integer)
+- return CAIRO_INT_STATUS_UNSUPPORTED;
+-
+- font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
+- for (i = 0; i < font->build_stack.sp; i++)
+- font->ps_stack.other_subr_args[i] = font->build_stack.stack[i];
+- font->ps_stack.num_other_subr_args = font->build_stack.sp;
+- font->ps_stack.cur_other_subr_arg = 0;
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_POP:
+- if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) {
+- font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++];
+- last_op_was_integer = TRUE;
+- } else {
+- font->subset_subrs = FALSE;
+- }
+- break;
+-
+- default:
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
++ case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
++ for (i = 0; i < font->build_stack.sp; i++)
++ font->ps_stack.other_subr_args[i] = font->build_stack.stack[i];
++ font->ps_stack.num_other_subr_args = font->build_stack.sp;
++ font->ps_stack.cur_other_subr_arg = 0;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_POP:
++ if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) {
++ font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++];
++ last_op_was_integer = TRUE;
++ } else {
++ font->subset_subrs = FALSE;
+ }
+ break;
+
+@@ -837,6 +831,13 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+ break;
++ }
++ break;
++
++ default:
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
+ }
+ } else {
+ /* integer argument */
+--
+cgit v0.9.0.2-2-gbebe
+From 8886220b5027296f5b3b95e9c2f93509108d3b9e Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri, 06 Apr 2012 00:13:53 +0000
+Subject: type1-subset: if font name is prefixed with a subset tag, strip it off
+
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index ddef8ae..e507abe 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -381,6 +381,7 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font)
+ {
+ const char *start, *end, *segment_end;
+ char *s;
++ int i;
+
+ segment_end = font->header_segment + font->header_segment_size;
+ start = find_token (font->header_segment, segment_end, "/FontName");
+@@ -406,6 +407,16 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+ }
+
++ /* If font name is prefixed with a subset tag, strip it off. */
++ if (strlen(start) > 7 && start[6] == '+') {
++ for (i = 0; i < 6; i++) {
++ if (start[i] < 'A' || start[i] > 'Z')
++ break;
++ }
++ if (i == 6)
++ start += 7;
++ }
++
+ font->base.base_font = strdup (start);
+ free (s);
+ if (unlikely (font->base.base_font == NULL))
+--
+cgit v0.9.0.2-2-gbebe
+From 8657ca10e34b0034602680b4304d47ecf90ccbfd Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri, 06 Apr 2012 11:50:40 +0000
+Subject: fix _cairo_pattern_get_ink_extents to work with snapshot recording surfaces
+
+It had caused pdf bbox sizes to regress to page size bboxes.
+---
+diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
+index 27ba004..5b3e177 100644
+--- a/src/cairo-pattern.c
++++ b/src/cairo-pattern.c
+@@ -37,6 +37,7 @@
+ #include "cairo-path-private.h"
+ #include "cairo-pattern-private.h"
+ #include "cairo-recording-surface-private.h"
++#include "cairo-surface-snapshot-private.h"
+
+ #include <float.h>
+
+@@ -3666,6 +3667,9 @@ _cairo_pattern_get_ink_extents (const cairo_pattern_t *pattern,
+ (const cairo_surface_pattern_t *) pattern;
+ cairo_surface_t *surface = surface_pattern->surface;
+
++ if (_cairo_surface_is_snapshot (surface))
++ surface = _cairo_surface_snapshot_get_target (surface);
++
+ if (_cairo_surface_is_recording (surface)) {
+ cairo_matrix_t imatrix;
+ cairo_box_t box;
+--
+cgit v0.9.0.2-2-gbebe
+From 6f28f0b33cb12f3b2dd48c87da0018bd00c17107 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Sun, 08 Apr 2012 10:28:59 +0000
+Subject: stroke: Fix misuse of half_line_x for vertical caps on dashes
+
+A typo using half_line_x instead of half_line_y when emitting dashed
+segments of the rectilinear stroke.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-path-stroke-boxes.c b/src/cairo-path-stroke-boxes.c
+index 3e8c5a4..cc9dd19 100644
+--- a/src/cairo-path-stroke-boxes.c
++++ b/src/cairo-path-stroke-boxes.c
+@@ -342,15 +342,15 @@ _cairo_rectilinear_stroker_emit_segments_dashed (cairo_rectilinear_stroker_t *st
+ box.p1.x = box.p2.x - half_line_x;
+ }
+ if (out_slope.dy >= 0)
+- box.p1.y -= half_line_x;
++ box.p1.y -= half_line_y;
+ if (out_slope.dy <= 0)
+- box.p2.y += half_line_x;
++ box.p2.y += half_line_y;
+ } else {
+ if (box.p1.y <= box.p2.y) {
+ box.p1.y = box.p2.y;
+- box.p2.y += half_line_x;
++ box.p2.y += half_line_y;
+ } else {
+- box.p1.y = box.p2.y - half_line_x;
++ box.p1.y = box.p2.y - half_line_y;
+ }
+ if (out_slope.dx >= 0)
+ box.p1.x -= half_line_x;
+--
+cgit v0.9.0.2-2-gbebe
+From 113ec6bf0c8ed1ff12293d1ed2a2de9bd5b9904b Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Sun, 08 Apr 2012 16:58:13 +0000
+Subject: traps: Clip the trapezoid extents against the clip extents
+
+Just in case the clip polygon turns out to be much larger than the
+operation extents (silly us for not reducing it correctly) and lead to
+catastrophe, such as:
+
+Program received signal SIGSEGV, Segmentation fault.
+pixman_fill_sse2 (bits=<optimized out>, stride=4, bpp=8, x=0, y=0,
+width=3, height=-34811, data=0) at pixman-sse2.c:3369
+3369 *(uint16_t *)d = data;
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-traps-compositor.c b/src/cairo-traps-compositor.c
+index 284a0be..c49e208 100644
+--- a/src/cairo-traps-compositor.c
++++ b/src/cairo-traps-compositor.c
+@@ -218,8 +218,13 @@ combine_clip_as_traps (const cairo_traps_compositor_t *compositor,
+ _cairo_traps_fini (&traps);
+ cairo_surface_destroy (src);
+
+- if (status == CAIRO_INT_STATUS_SUCCESS &&
+- (fixup.width < extents->width || fixup.height < extents->height)) {
++ if (unlikely (status))
++ return status;
++
++ if (! _cairo_rectangle_intersect (&fixup, extents))
++ return CAIRO_STATUS_SUCCESS;
++
++ if (fixup.width < extents->width || fixup.height < extents->height) {
+ cairo_boxes_t clear;
+
+ _cairo_boxes_init (&clear);
+--
+cgit v0.9.0.2-2-gbebe
+From de61681574eb7d6e0e497ea7f25797e3d9b20ac4 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon, 09 Apr 2012 11:47:34 +0000
+Subject: build: Disable -Wset-but-unused-variable
+
+This is too noisy in the current build, and masking more important
+warnings.
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
+index 3eb0104..f1b17f4 100644
+--- a/build/configure.ac.warnings
++++ b/build/configure.ac.warnings
+@@ -21,6 +21,9 @@ MAYBE_WARN="-Wall -Wextra \
+ -Wno-missing-field-initializers -Wno-unused-parameter \
+ -Wno-attributes -Wno-long-long -Winline"
+
++# -Wunused-but-set-variable is too noisy at present
++NO_WARN="-Wno-unused-but-set-variable"
++
+ dnl Sun Studio 12 likes to rag at us for abusing enums like
+ dnl having cairo_status_t variables hold cairo_int_status_t
+ dnl values. It's bad, we know. Now please be quiet.
+@@ -34,6 +37,8 @@ MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common -flto"
+ dnl Also to turn various gcc/glibc-specific preprocessor checks
+ MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2"
+
++MAYBE_WARN="$MAYBE_WARN $NO_WARN"
++
+ # invalidate cached value if MAYBE_WARN has changed
+ if test "x$cairo_cv_warn_maybe" != "x$MAYBE_WARN"; then
+ unset cairo_cv_warn_cflags
+--
+cgit v0.9.0.2-2-gbebe
+From 7cb5053c0694992320b5f7ea3b91ea497431813b Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Mon, 09 Apr 2012 11:49:20 +0000
+Subject: analysis: Apply the integer translation to the bbox as well
+
+The bbox is used to compute the ink extents (and so the pattern extents
+of a recording surface) and if given an integer translation we failed to
+transform the bbox into the target space.
+
+Fixes mask (pdf).
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
+index b8abe02..8878f62 100644
+--- a/src/cairo-analysis-surface.c
++++ b/src/cairo-analysis-surface.c
+@@ -220,6 +220,14 @@ _add_operation (cairo_analysis_surface_t *surface,
+ if (_cairo_matrix_is_integer_translation (&surface->ctm, &tx, &ty)) {
+ rect->x += tx;
+ rect->y += ty;
++
++ tx = _cairo_fixed_from_int (tx);
++ bbox.p1.x += tx;
++ bbox.p2.x += tx;
++
++ ty = _cairo_fixed_from_int (ty);
++ bbox.p1.y += ty;
++ bbox.p2.y += ty;
+ } else {
+ _cairo_matrix_transform_bounding_box_fixed (&surface->ctm,
+ &bbox, NULL);
+--
+cgit v0.9.0.2-2-gbebe
+From 038e4991912656a3239ca82d60056ca129016ba6 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Mon, 09 Apr 2012 08:31:44 +0000
+Subject: pdf: avoid unnecessary use of patterns in mask groups
+
+---
+diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
+index 4930e72..78537ce 100644
+--- a/src/cairo-pdf-surface.c
++++ b/src/cairo-pdf-surface.c
+@@ -5703,56 +5703,68 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface,
+ if (unlikely (status))
+ return status;
+
+- pattern_res.id = 0;
+- gstate_res.id = 0;
+- status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, NULL,
+- &pattern_res, &gstate_res);
+- if (unlikely (status))
+- return status;
+-
+- if (gstate_res.id != 0) {
+- smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents);
+- if (unlikely (smask_group == NULL))
+- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+-
+- smask_group->width = group->width;
+- smask_group->height = group->height;
+- smask_group->operation = PDF_PAINT;
+- smask_group->source = cairo_pattern_reference (group->mask);
+- smask_group->source_res = pattern_res;
+- status = _cairo_pdf_surface_add_smask_group (surface, smask_group);
+- if (unlikely (status)) {
+- _cairo_pdf_smask_group_destroy (smask_group);
+- return status;
+- }
+-
+- status = _cairo_pdf_surface_add_smask (surface, gstate_res);
+- if (unlikely (status))
+- return status;
+-
+- status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res);
++ if (_can_paint_pattern (group->mask)) {
++ _cairo_output_stream_printf (surface->output, "q\n");
++ status = _cairo_pdf_surface_paint_pattern (surface,
++ group->mask,
++ &group->extents,
++ FALSE);
+ if (unlikely (status))
+ return status;
+
+- _cairo_output_stream_printf (surface->output,
+- "q /s%d gs /x%d Do Q\n",
+- gstate_res.id,
+- smask_group->group_res.id);
++ _cairo_output_stream_printf (surface->output, "Q\n");
+ } else {
+- status = _cairo_pdf_surface_select_pattern (surface, group->mask, pattern_res, FALSE);
++ pattern_res.id = 0;
++ gstate_res.id = 0;
++ status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, NULL,
++ &pattern_res, &gstate_res);
+ if (unlikely (status))
+ return status;
+
+- _cairo_output_stream_printf (surface->output,
+- "%f %f %f %f re f\n",
+- bbox.p1.x,
+- bbox.p1.y,
+- bbox.p2.x - bbox.p1.x,
+- bbox.p2.y - bbox.p1.y);
++ if (gstate_res.id != 0) {
++ smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents);
++ if (unlikely (smask_group == NULL))
++ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+
+- status = _cairo_pdf_surface_unselect_pattern (surface);
+- if (unlikely (status))
+- return status;
++ smask_group->width = group->width;
++ smask_group->height = group->height;
++ smask_group->operation = PDF_PAINT;
++ smask_group->source = cairo_pattern_reference (group->mask);
++ smask_group->source_res = pattern_res;
++ status = _cairo_pdf_surface_add_smask_group (surface, smask_group);
++ if (unlikely (status)) {
++ _cairo_pdf_smask_group_destroy (smask_group);
++ return status;
++ }
++
++ status = _cairo_pdf_surface_add_smask (surface, gstate_res);
++ if (unlikely (status))
++ return status;
++
++ status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res);
++ if (unlikely (status))
++ return status;
++
++ _cairo_output_stream_printf (surface->output,
++ "q /s%d gs /x%d Do Q\n",
++ gstate_res.id,
++ smask_group->group_res.id);
++ } else {
++ status = _cairo_pdf_surface_select_pattern (surface, group->mask, pattern_res, FALSE);
++ if (unlikely (status))
++ return status;
++
++ _cairo_output_stream_printf (surface->output,
++ "%f %f %f %f re f\n",
++ bbox.p1.x,
++ bbox.p1.y,
++ bbox.p2.x - bbox.p1.x,
++ bbox.p2.y - bbox.p1.y);
++
++ status = _cairo_pdf_surface_unselect_pattern (surface);
++ if (unlikely (status))
++ return status;
++ }
+ }
+
+ status = _cairo_pdf_surface_close_group (surface, &mask_group);
+@@ -5764,54 +5776,66 @@ _cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface,
+ if (unlikely (status))
+ return status;
+
+- pattern_res.id = 0;
+- gstate_res.id = 0;
+- status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, NULL,
+- &pattern_res, &gstate_res);
+- if (unlikely (status))
+- return status;
+-
+- if (gstate_res.id != 0) {
+- smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents);
+- if (unlikely (smask_group == NULL))
+- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+-
+- smask_group->operation = PDF_PAINT;
+- smask_group->source = cairo_pattern_reference (group->source);
+- smask_group->source_res = pattern_res;
+- status = _cairo_pdf_surface_add_smask_group (surface, smask_group);
+- if (unlikely (status)) {
+- _cairo_pdf_smask_group_destroy (smask_group);
+- return status;
+- }
+-
+- status = _cairo_pdf_surface_add_smask (surface, gstate_res);
+- if (unlikely (status))
+- return status;
+-
+- status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res);
++ if (_can_paint_pattern (group->source)) {
++ _cairo_output_stream_printf (surface->output, "q\n");
++ status = _cairo_pdf_surface_paint_pattern (surface,
++ group->source,
++ &group->extents,
++ FALSE);
+ if (unlikely (status))
+ return status;
+
+- _cairo_output_stream_printf (surface->output,
+- "q /s%d gs /x%d Do Q\n",
+- gstate_res.id,
+- smask_group->group_res.id);
++ _cairo_output_stream_printf (surface->output, "Q\n");
+ } else {
+- status = _cairo_pdf_surface_select_pattern (surface, group->source, pattern_res, FALSE);
++ pattern_res.id = 0;
++ gstate_res.id = 0;
++ status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, NULL,
++ &pattern_res, &gstate_res);
+ if (unlikely (status))
+ return status;
+
+- _cairo_output_stream_printf (surface->output,
+- "%f %f %f %f re f\n",
+- bbox.p1.x,
+- bbox.p1.y,
+- bbox.p2.x - bbox.p1.x,
+- bbox.p2.y - bbox.p1.y);
++ if (gstate_res.id != 0) {
++ smask_group = _cairo_pdf_surface_create_smask_group (surface, &group->extents);
++ if (unlikely (smask_group == NULL))
++ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+
+- status = _cairo_pdf_surface_unselect_pattern (surface);
+- if (unlikely (status))
+- return status;
++ smask_group->operation = PDF_PAINT;
++ smask_group->source = cairo_pattern_reference (group->source);
++ smask_group->source_res = pattern_res;
++ status = _cairo_pdf_surface_add_smask_group (surface, smask_group);
++ if (unlikely (status)) {
++ _cairo_pdf_smask_group_destroy (smask_group);
++ return status;
++ }
++
++ status = _cairo_pdf_surface_add_smask (surface, gstate_res);
++ if (unlikely (status))
++ return status;
++
++ status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res);
++ if (unlikely (status))
++ return status;
++
++ _cairo_output_stream_printf (surface->output,
++ "q /s%d gs /x%d Do Q\n",
++ gstate_res.id,
++ smask_group->group_res.id);
++ } else {
++ status = _cairo_pdf_surface_select_pattern (surface, group->source, pattern_res, FALSE);
++ if (unlikely (status))
++ return status;
++
++ _cairo_output_stream_printf (surface->output,
++ "%f %f %f %f re f\n",
++ bbox.p1.x,
++ bbox.p1.y,
++ bbox.p2.x - bbox.p1.x,
++ bbox.p2.y - bbox.p1.y);
++
++ status = _cairo_pdf_surface_unselect_pattern (surface);
++ if (unlikely (status))
++ return status;
++ }
+ }
+
+ status = _cairo_pdf_surface_close_group (surface, NULL);
+--
+cgit v0.9.0.2-2-gbebe
+From 9fcbe25c2dcf831783bb0fd20af9754c0b5c409b Mon Sep 17 00:00:00 2001
+From: Maarten Bosmans <mkbosmans@gmail.com>
+Date: Mon, 09 Apr 2012 19:33:50 +0000
+Subject: Protect code using dlfcn.h with CAIRO_HAS_DLSYM
+
+---
+diff --git a/configure.ac b/configure.ac
+index cedfebe..5d2e6ec 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,6 +52,7 @@ AM_CONDITIONAL(CAIRO_HAS_DL, test "x$have_dl" = "xyes")
+ if test "x$have_dlsym" = "xyes"; then
+ AC_DEFINE([CAIRO_HAS_DLSYM], 1, [Define to 1 if dlsym is available])
+ fi
++AM_CONDITIONAL(CAIRO_HAS_DLSYM, test "x$have_dlsym" = "xyes")
+
+ dnl ===========================================================================
+
+diff --git a/util/Makefile.am b/util/Makefile.am
+index f202f35..82d0a80 100644
+--- a/util/Makefile.am
++++ b/util/Makefile.am
+@@ -12,20 +12,24 @@ endif
+
+ if CAIRO_HAS_TRACE
+ SUBDIRS += cairo-trace
++if CAIRO_HAS_DLSYM
+ if CAIRO_HAS_SCRIPT_SURFACE
+ if CAIRO_HAS_TEE_SURFACE
+ SUBDIRS += cairo-fdr
+ endif
+ endif
+ endif
++endif
+
+ if BUILD_SPHINX
++if CAIRO_HAS_DLSYM
+ if CAIRO_HAS_SCRIPT_SURFACE
+ if CAIRO_HAS_TEE_SURFACE
+ SUBDIRS += cairo-sphinx
+ endif
+ endif
+ endif
++endif
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+--
+cgit v0.9.0.2-2-gbebe
+From c7b86ab97be1d3d3ccf43b652832f148a2fcf290 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Tue, 10 Apr 2012 13:04:05 +0000
+Subject: any2ppm: fix missing enumeration warning
+
+---
+diff --git a/test/any2ppm.c b/test/any2ppm.c
+index 6b61c47..2403347 100644
+--- a/test/any2ppm.c
++++ b/test/any2ppm.c
+@@ -193,6 +193,7 @@ write_ppm (cairo_surface_t *surface, int fd)
+ break;
+ case CAIRO_FORMAT_A1:
+ case CAIRO_FORMAT_RGB16_565:
++ case CAIRO_FORMAT_RGB30:
+ case CAIRO_FORMAT_INVALID:
+ default:
+ return "unhandled image format";
+--
+cgit v0.9.0.2-2-gbebe
+From 09de481ce5f6ed1c38c0d5bf3af7c60642c4c947 Mon Sep 17 00:00:00 2001
+From: Gilles Espinasse <g.esp@free.fr>
+Date: Sat, 07 Apr 2012 21:09:51 +0000
+Subject: Cosmetic configure fix
+
+'how to allow undefined symbols in shared libraries' test should use CAIRO_CC_TRY_FLAG_SILENT or configure display is a bit out of order like this
+
+checking how to allow undefined symbols in shared libraries used by test suite... checking whether gcc supports -Wl,--allow-shlib-undefined... yes
+-Wl,--allow-shlib-undefined
+
+Signed-off-by: Gilles Espinasse <g.esp@free.fr>
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
+index f1b17f4..3b2c6f3 100644
+--- a/build/configure.ac.warnings
++++ b/build/configure.ac.warnings
+@@ -89,7 +89,7 @@ AC_DEFINE_UNQUOTED([WARN_UNUSED_RESULT], [$cairo_cv_warn_unused_result],
+
+ dnl check linker flags
+ AC_CACHE_CHECK([how to allow undefined symbols in shared libraries used by test suite], cairo_cv_test_undefined_ldflags,
+- [CAIRO_CC_TRY_FLAG([-Wl,--allow-shlib-undefined], [],
++ [CAIRO_CC_TRY_FLAG_SILENT([-Wl,--allow-shlib-undefined], [],
+ [cairo_cv_test_undefined_ldflags="-Wl,--allow-shlib-undefined]")])
+ CAIRO_TEST_UNDEFINED_LDFLAGS="$cairo_cv_test_undefined_ldflags"
+ AC_SUBST(CAIRO_TEST_UNDEFINED_LDFLAGS)
+--
+cgit v0.9.0.2-2-gbebe
+From 07fc63676dfdaa57ed919ad7be8f59c97c615473 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psychon@znc.in>
+Date: Wed, 11 Apr 2012 19:37:55 +0000
+Subject: xlib: Disable fallback compositor with xlib-xcb
+
+When xlib-xcb is enabled, this is just dead code which is never used. Thus, this
+shouldn't hurt. However, this does include cairo-xlib-private.h. Shouldn't be a
+problem? Well, that header contains static inline functions which some compiler
+on Solaris will emit even when they are unused.
+
+This brings us to the real problem: That static inline function refers to a
+function which isn't compiled with xlib-xcb and thus linking fails with
+undefined symbols.
+
+This can be reproduced with GCC by adding a call to
+_cairo_xlib_screen_put_gc(NULL, NULL, 0, 0); to
+_cairo_xlib_fallback_compositor_get.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48489
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+diff --git a/src/cairo-xlib-fallback-compositor.c b/src/cairo-xlib-fallback-compositor.c
+index 5391926..7d45cd1 100644
+--- a/src/cairo-xlib-fallback-compositor.c
++++ b/src/cairo-xlib-fallback-compositor.c
+@@ -42,6 +42,8 @@
+
+ #include "cairoint.h"
+
++#if !CAIRO_HAS_XLIB_XCB_FUNCTIONS
++
+ #include "cairo-xlib-private.h"
+
+ #include "cairo-compositor-private.h"
+@@ -52,3 +54,5 @@ _cairo_xlib_fallback_compositor_get (void)
+ /* XXX Do something interesting here to mitigate fallbacks ala xcb */
+ return &_cairo_fallback_compositor;
+ }
++
++#endif /* !CAIRO_HAS_XLIB_XCB_FUNCTIONS */
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/testing/libdrm-new/COPYING b/testing/libdrm-new/COPYING
new file mode 100644
index 000000000..6e74c337c
--- /dev/null
+++ b/testing/libdrm-new/COPYING
@@ -0,0 +1,48 @@
+ Copyright 2005 Adam Jackson.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation on the rights to use, copy, modify, merge,
+ publish, distribute, sub license, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the
+ next paragraph) shall be included in all copies or substantial
+ portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NON-INFRINGEMENT. IN NO EVENT SHALL ADAM JACKSON BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+------------------------------------------------------------------------
+
+ Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice (including the
+ next paragraph) shall be included in all copies or substantial
+ portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS
+ SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
diff --git a/testing/libdrm-new/PKGBUILD b/testing/libdrm-new/PKGBUILD
new file mode 100644
index 000000000..32a85fcd1
--- /dev/null
+++ b/testing/libdrm-new/PKGBUILD
@@ -0,0 +1,53 @@
+#Id$
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgbase=libdrm-new
+pkgname=(libdrm-new libdrm-nouveau)
+pkgver=2.4.34
+pkgrel=1
+pkgdesc="Userspace interface to kernel DRM services"
+arch=(i686 x86_64)
+license=('custom')
+depends=('glibc' 'libpciaccess')
+makedepends=('cairo' 'valgrind')
+options=('!libtool' '!emptydirs')
+url="http://dri.freedesktop.org/"
+source=(http://dri.freedesktop.org/libdrm/libdrm-$pkgver.tar.bz2
+ no-pthread-stubs.patch
+ COPYING
+)
+sha1sums=('861757baff4b37e564e13f5350c1b5d01c66a181'
+ '2a5410baa3e6e078f9378ce486a88f41d22fd838'
+ 'ba3dcd636997ee0d30df14b03dae05c24ae5d094')
+
+build() {
+ cd "libdrm-$pkgver"
+ patch -Np1 -i "$srcdir/no-pthread-stubs.patch"
+
+ #libtoolize --force
+ autoreconf --force --install
+ ./configure --prefix=/usr \
+ --disable-libkms \
+ --disable-intel \
+ --disable-radeon
+ make
+}
+
+package_libdrm-new() {
+ pkgdesc="Userspace interface to kernel DRM services - used as makedepends for xf86-video-nouveau"
+ conflicts=('libdrm')
+ provides=("libdrm=$pkgver")
+ cd "libdrm-$pkgver"
+ make DESTDIR="$pkgdir" install
+ rm "$pkgdir"/usr/lib/libdrm_nouveau.so.2*
+}
+
+package_libdrm-nouveau() {
+ pkgdesc="Userspace interface to kernel DRM services for nouveau - used as depends for xf86-video-nouveau"
+ depends=(libdrm)
+ cd "libdrm-$pkgver"
+ make DESTDIR="$pkgdir" install-libdrm_laLTLIBRARIES
+ make -C nouveau DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" uninstall-libdrm_laLTLIBRARIES
+ rm "$pkgdir"/usr/include/libdrm/nouveau.h "$pkgdir"/usr/lib/pkgconfig/libdrm_nouveau.pc "$pkgdir"/usr/lib/libdrm_nouveau.so
+}
diff --git a/testing/libdrm-new/no-pthread-stubs.patch b/testing/libdrm-new/no-pthread-stubs.patch
new file mode 100644
index 000000000..6745f4bc4
--- /dev/null
+++ b/testing/libdrm-new/no-pthread-stubs.patch
@@ -0,0 +1,70 @@
+diff -Nur libdrm-2.4.34.orig/configure.ac libdrm-2.4.34/configure.ac
+--- libdrm-2.4.34.orig/configure.ac 2012-05-12 14:54:06.375335490 +0000
++++ libdrm-2.4.34/configure.ac 2012-05-12 14:54:32.075142065 +0000
+@@ -47,10 +47,6 @@
+ LT_INIT([disable-static])
+
+
+-PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)
+-AC_SUBST(PTHREADSTUBS_CFLAGS)
+-AC_SUBST(PTHREADSTUBS_LIBS)
+-
+ pkgconfigdir=${libdir}/pkgconfig
+ AC_SUBST(pkgconfigdir)
+ AC_ARG_ENABLE([udev],
+diff -Nur libdrm-2.4.34.orig/intel/Makefile.am libdrm-2.4.34/intel/Makefile.am
+--- libdrm-2.4.34.orig/intel/Makefile.am 2012-05-12 14:54:06.372001955 +0000
++++ libdrm-2.4.34/intel/Makefile.am 2012-05-12 14:55:24.164745055 +0000
+@@ -26,7 +26,6 @@
+ $(WARN_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/intel \
+- $(PTHREADSTUBS_CFLAGS) \
+ $(PCIACCESS_CFLAGS) \
+ $(VALGRIND_CFLAGS) \
+ -I$(top_srcdir)/include/drm
+@@ -35,7 +34,6 @@
+ libdrm_intel_ladir = $(libdir)
+ libdrm_intel_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+ libdrm_intel_la_LIBADD = ../libdrm.la \
+- @PTHREADSTUBS_LIBS@ \
+ @PCIACCESS_LIBS@ \
+ @CLOCK_LIB@
+
+diff -Nur libdrm-2.4.34.orig/nouveau/Makefile.am libdrm-2.4.34/nouveau/Makefile.am
+--- libdrm-2.4.34.orig/nouveau/Makefile.am 2012-05-12 14:54:06.331998148 +0000
++++ libdrm-2.4.34/nouveau/Makefile.am 2012-05-12 14:56:00.941132085 +0000
+@@ -2,14 +2,13 @@
+ $(WARN_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/nouveau \
+- $(PTHREADSTUBS_CFLAGS) \
+ -I$(top_srcdir)/include/drm \
+ -DDEBUG
+
+ libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la
+ libdrm_nouveau_ladir = $(libdir)
+ libdrm_nouveau_la_LDFLAGS = -version-number 2:0:0 -no-undefined
+-libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
++libdrm_nouveau_la_LIBADD = ../libdrm.la
+
+ libdrm_nouveau_la_SOURCES = nouveau.c \
+ pushbuf.c \
+diff -Nur libdrm-2.4.34.orig/radeon/Makefile.am libdrm-2.4.34/radeon/Makefile.am
+--- libdrm-2.4.34.orig/radeon/Makefile.am 2012-05-12 14:54:06.365334765 +0000
++++ libdrm-2.4.34/radeon/Makefile.am 2012-05-12 14:55:48.084557437 +0000
+@@ -26,13 +26,12 @@
+ $(WARN_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/radeon \
+- $(PTHREADSTUBS_CFLAGS) \
+ -I$(top_srcdir)/include/drm
+
+ libdrm_radeon_la_LTLIBRARIES = libdrm_radeon.la
+ libdrm_radeon_ladir = $(libdir)
+ libdrm_radeon_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+-libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
++libdrm_radeon_la_LIBADD = ../libdrm.la
+
+ libdrm_radeon_la_SOURCES = \
+ radeon_bo_gem.c \
diff --git a/testing/xf86-video-intel/PKGBUILD b/testing/xf86-video-intel/PKGBUILD
new file mode 100644
index 000000000..86655654d
--- /dev/null
+++ b/testing/xf86-video-intel/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 158888 2012-05-12 18:02:43Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-intel
+pkgver=2.19.0
+pkgrel=1
+pkgdesc="X.org Intel i810/i830/i915/945G/G965+ video drivers"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('intel-dri' 'libxvmc' 'libpciaccess' 'libdrm' 'xcb-util>=0.3.8' 'libxfixes' 'udev')
+makedepends=('xorg-server-devel>=1.12.0' 'libx11' 'libdrm' 'xf86driproto' 'glproto' 'mesa' 'libxvmc' 'libxrender')
+conflicts=('xorg-server<1.12.0' 'xf86-video-i810' 'xf86-video-intel-legacy')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('131934cf5e90bd48c883804cc644c4cb8b1de100')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-dri
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-nouveau/PKGBUILD b/testing/xf86-video-nouveau/PKGBUILD
new file mode 100644
index 000000000..d265a0ab3
--- /dev/null
+++ b/testing/xf86-video-nouveau/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 158876 2012-05-12 16:39:45Z ibiru $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: buddabrod <buddabrod@gmail.com>
+
+pkgname=xf86-video-nouveau
+_gitdate=20120512
+pkgver=0.0.16_git${_gitdate} # see configure.ac
+pkgrel=1
+pkgdesc="Open Source 3D acceleration driver for nVidia cards (experimental)"
+arch=('i686' 'x86_64')
+url="http://nouveau.freedesktop.org/wiki/"
+license=('GPL') #and MIT, not yet a license file, see http://nouveau.freedesktop.org/wiki/FAQ#head-09f75d03eb30011c754038a3893119a70745de4e
+depends=('libdrm-nouveau' 'udev')
+optdepends=('nouveau-dri: experimental gallium3d features')
+makedepends=('xorg-server-devel' 'libdrm-new' 'xf86driproto')
+conflicts=('xorg-server<1.11.99.902')
+options=('!libtool')
+install=$pkgname.install
+source=(ftp://ftp.archlinux.org/other/$pkgname/xf86-video-nouveau-${_gitdate}.tar.bz2)
+md5sums=('3e27e283219936d64c194eca24cd81cd')
+
+# source PKGBUILD && mksource
+mksource() {
+ mkdir /tmp/$pkgname-${_gitdate}
+ pushd /tmp/$pkgname-${_gitdate}
+ git clone -v --depth 1 git://anongit.freedesktop.org/nouveau/xf86-video-nouveau
+ cd xf86-video-nouveau
+ git archive --prefix=xf86-video-nouveau-${_gitdate}/ --format=tar HEAD | bzip2 > /tmp/$pkgname-${_gitdate}/$pkgname-${_gitdate}.tar.bz2
+ popd
+}
+
+build() {
+ cd $srcdir/xf86-video-nouveau-${_gitdate}
+ ./autogen.sh --prefix=/usr
+ make
+}
+
+package() {
+ cd $srcdir/xf86-video-nouveau-${_gitdate}
+ make DESTDIR=$pkgdir install
+}
diff --git a/testing/xf86-video-nouveau/xf86-video-nouveau.install b/testing/xf86-video-nouveau/xf86-video-nouveau.install
new file mode 100644
index 000000000..027154ff3
--- /dev/null
+++ b/testing/xf86-video-nouveau/xf86-video-nouveau.install
@@ -0,0 +1,16 @@
+post_install () {
+ cat << _EOF
+ ==> make sure you use KernelModeSetting (KMS)
+ ==> see http://wiki.archlinux.org/index.php/Nouveau#KMS for more
+_EOF
+}
+
+post_upgrade() {
+ if [ "`vercmp $2 0.0.15_git20100117-1`" -lt 0 ]; then
+ cat << _EOF
+ ==> ATTENTION: Usermode support has been dropped
+ ==> make sure you use KernelModeSetting (KMS)
+ ==> see http://wiki.archlinux.org/index.php/Nouveau#KMS for more
+_EOF
+ fi
+}
diff --git a/testing/xorg-server/PKGBUILD b/testing/xorg-server/PKGBUILD
index 557f181fe..f779f363e 100644
--- a/testing/xorg-server/PKGBUILD
+++ b/testing/xorg-server/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 156178 2012-04-15 10:04:10Z andyrtr $
+# $Id: PKGBUILD 158901 2012-05-12 20:49:16Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=xorg-server
pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel')
-pkgver=1.12.1
+pkgver=1.12.1.901
pkgrel=2
arch=('i686' 'x86_64')
license=('custom')
@@ -17,14 +17,15 @@ source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
autoconfig-nvidia.patch
autoconfig-sis.patch
EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff
- #git-fixes.patch
+ git-fixes.patch
xvfb-run
xvfb-run.1
10-quirks.conf)
-sha1sums=('922b963901f4711449b53fb32ce3e14f5b642766'
+sha1sums=('bb9985bae271aa896de7fa12e49a0dbd8e244d2c'
'63836e5cfb4ae7353fb2e31239a544409c7ead32'
'175de5630b43dbc97778adfba5563b7fdd77f11f'
'4acb39587f73bcbb9a331377d6ef99cb73eb95a8'
+ '526cbffbc742dc3449065e3501d290a607d80aa3'
'c94f742d3f9cabf958ae58e4015d9dd185aabedc'
'6838fc00ef4618c924a77e0fb03c05346080908a'
'993798f3d22ad672d769dae5f48d1fa068d5578f')
@@ -43,8 +44,8 @@ build() {
# and reworked for 1.12.1 changes
patch -Np1 -i ${srcdir}/EXA_Fall_back_earlier_and_more_thoroughly_from_exaGlyphsV2.diff
- # Add post-release patches from 1.11 branch
-# patch -Np1 -i "${srcdir}/git-fixes.patch"
+ # Add post-release patches from 1.12 branch
+ patch -Np1 -i ${srcdir}/git-fixes.patch
autoreconf -fi
./configure --prefix=/usr \
diff --git a/testing/xorg-server/git-fixes.patch b/testing/xorg-server/git-fixes.patch
index 27da61eca..f6ca2426b 100644
--- a/testing/xorg-server/git-fixes.patch
+++ b/testing/xorg-server/git-fixes.patch
@@ -1,161 +1,1717 @@
-From 89626304ea1ad316c5b7145a40f09377148cff21 Mon Sep 17 00:00:00 2001
-From: Dave Airlie <airlied@redhat.com>
-Date: Thu, 20 Oct 2011 13:43:01 +0000
-Subject: xf86Crtc: handle no outputs with no modes harder.
+From b5bf0ac5405eab77f26bb2f8726644232af17178 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Wed, 11 Apr 2012 16:28:21 +0000
+Subject: hw/xfree86: Spurious ');' in xf86vmode.c messed up indentation badly
-If you started an X server with no connected outputs, we pick a default
-1024x768 mode, however if you then ran an xvidmode using app against that
-server it would segfault the server due to not finding any valid modes.
+Inside the unfinished XF86VIDMODE_EVENTS #ifdef block the
+function definition for xf86VidModeNotifyEvent had an extra ');'
+before the prototype argument declarations. This was harmless for the
+compiler as the code never gets used, but completely messed up the
+file re-indentation. This patch removes the spurious characters in
+preparation for re-indenting the file.
-This was due to the no output mode set code, only adding the modes to the
-scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would
-get called and remove all the modes and we'd end up with 0.
-
-This change fixes xf86SetScrnInfoModes to always report a scrn mode of at
-least 1024x768, and pushes the initial configuration to just call it instead
-of setting up the mode itself.
-
-Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926
+Signed-off-by: Keith Packard <keithp@keithp.com>
+(cherry picked from commit 592bd0ae2b60cd6f6afd3efc40f5f659b12900b4)
+---
+diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
+index 6e2a8e9..9f64f8e 100644
+--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
++++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
+@@ -75,7 +75,7 @@ static unsigned char XF86VidModeReqCode = 0;
+ #ifdef XF86VIDMODE_EVENTS
+ static int XF86VidModeEventBase = 0;
+
+-static void SXF86VidModeNotifyEvent();
++static void SXF86VidModeNotifyEvent(
+ xXF86VidModeNotifyEvent * /* from */ , xXF86VidModeNotifyEvent * /* to */
+ );
+
+--
+cgit v0.9.0.2-2-gbebe
+From 3ad72a80088fe3236f38bd0696b04f399e24fe3d Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Wed, 11 Apr 2012 16:33:54 +0000
+Subject: hw/xfree86: Re-indent xf86vmode.c
-I've seen other bugs like this on other distros so it might also actually fix them.
+This is the result of re-running the 'x-indent.sh' script over
+xf86vmode.c to clean up the disaster caused by broken syntax in the
+file.
-Signed-off-by: Dave Airlie <airlied@redhat.com>
-Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
-(cherry picked from commit 17416e88dcfcc584fe5f87580d5d2b719b3521c3)
+(cherry picked from commit 9779b904c7c0b49c74054c22c420012c40595cdc)
---
-diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
-index d75cd77..8906806 100644
---- a/hw/xfree86/modes/xf86Crtc.c
-+++ b/hw/xfree86/modes/xf86Crtc.c
-@@ -1915,19 +1915,25 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
- break;
+diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
+index 9f64f8e..68c4b58 100644
+--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
++++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
+@@ -75,8 +75,7 @@ static unsigned char XF86VidModeReqCode = 0;
+ #ifdef XF86VIDMODE_EVENTS
+ static int XF86VidModeEventBase = 0;
+
+-static void SXF86VidModeNotifyEvent(
+-xXF86VidModeNotifyEvent * /* from */ , xXF86VidModeNotifyEvent * /* to */
++static void SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent * /* from */ , xXF86VidModeNotifyEvent * /* to */
+ );
+
+ static RESTYPE EventType; /* resource type for event masks */
+@@ -117,20 +116,22 @@ static DevPrivateKeyRec ScreenPrivateKeyRec;
+ #define DEBUG_P(x) /**/
+ #endif
+ static int
+- ClientMajorVersion(ClientPtr client) {
++ClientMajorVersion(ClientPtr client)
++{
+ VidModePrivPtr pPriv;
+
+- pPriv = VM_GETPRIV(client);
++ pPriv = VM_GETPRIV(client);
+ if (!pPriv)
+- return 0;
++ return 0;
+ else
+- return pPriv->major;
++ return pPriv->major;
+ }
++
+ #ifdef XF86VIDMODE_EVENTS
+ static void
+- CheckScreenPrivate(pScreen)
++CheckScreenPrivate(pScreen)
+ ScreenPtr
+- pScreen;
++ pScreen;
+ {
+ SetupScreen(pScreen);
+
+@@ -142,9 +143,10 @@ ScreenPtr
+ }
+ }
+
+-static XF86VidModeScreenPrivatePtr MakeScreenPrivate(pScreen)
++static XF86VidModeScreenPrivatePtr
++MakeScreenPrivate(pScreen)
+ ScreenPtr
+- pScreen;
++ pScreen;
+ {
+ SetupScreen(pScreen);
+
+@@ -160,18 +162,22 @@ ScreenPtr
+ }
+
+ static unsigned long
+- getEventMask(ScreenPtr pScreen, ClientPtr client) {
++getEventMask(ScreenPtr pScreen, ClientPtr client)
++{
+ SetupScreen(pScreen);
+ XF86VidModeEventPtr pEv;
+
+ if (!pPriv)
+- return 0;
++ return 0;
+ for (pEv = pPriv->events; pEv; pEv = pEv->next)
+ if (pEv->client == client)
+ return pEv->mask;
+- return 0;
+-} static Bool
+- setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask) {
++ return 0;
++}
++
++static Bool
++setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask)
++{
+ SetupScreen(pScreen);
+ XF86VidModeEventPtr pEv, *pPrev;
+
+@@ -181,7 +187,8 @@ static unsigned long
+ pPriv = MakeScreenPrivate(pScreen);
+ if (!pPriv)
+ return FALSE;
+- } for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next)
++ }
++ for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next)
+ if (pEv->client == client)
+ break;
+ if (mask == 0) {
+@@ -208,38 +215,43 @@ static unsigned long
+ }
+
+ static int
+- XF86VidModeFreeEvents(pointer value, XID id) {
++XF86VidModeFreeEvents(pointer value, XID id)
++{
+ XF86VidModeEventPtr pOld = (XF86VidModeEventPtr) value;
+ ScreenPtr pScreen = pOld->screen;
+- SetupScreen(pScreen);
++
++ SetupScreen(pScreen);
+ XF86VidModeEventPtr pEv, *pPrev;
+
+ if (!pPriv)
+- return TRUE;
++ return TRUE;
+ for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next)
+ if (pEv == pOld)
+ break;
+ if (!pEv)
+- return TRUE;
++ return TRUE;
+ *pPrev = pEv->next;
+- free(pEv);
+- CheckScreenPrivate(pScreen);
+- return TRUE;
+-} static void
+- SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced) {
++ free(pEv);
++ CheckScreenPrivate(pScreen);
++ return TRUE;
++}
++
++static void
++SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
++{
+ XF86VidModeScreenPrivatePtr pPriv;
+ XF86VidModeEventPtr pEv;
+ unsigned long mask;
+ xXF86VidModeNotifyEvent ev;
+ int kind;
+
+- UpdateCurrentTimeIf();
+- mask = XF86VidModeNotifyMask;
+- pScreen = screenInfo.screens[pScreen->myNum];
+- pPriv = GetScreenPrivate(pScreen);
++ UpdateCurrentTimeIf();
++ mask = XF86VidModeNotifyMask;
++ pScreen = screenInfo.screens[pScreen->myNum];
++ pPriv = GetScreenPrivate(pScreen);
+ if (!pPriv)
+- return;
+- kind = XF86VidModeModeChange;
++ return;
++ kind = XF86VidModeModeChange;
+ for (pEv = pPriv->events; pEv; pEv = pEv->next) {
+ if (!(pEv->mask & mask))
+ continue;
+@@ -251,8 +263,10 @@ static int
+ ev.forced = forced;
+ WriteEventsToClient(pEv->client, 1, (xEvent *) &ev);
+ }} static void
+- SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent * from,
+- xXF86VidModeNotifyEvent * to) {
++
++SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent * from,
++ xXF86VidModeNotifyEvent * to)
++{
+ to->type = from->type;
+ to->state = from->state;
+ cpswaps(from->sequenceNumber, to->sequenceNumber);
+@@ -264,29 +278,31 @@ static int
+ #endif
+
+ static int
+- ProcXF86VidModeQueryVersion(ClientPtr client) {
++ProcXF86VidModeQueryVersion(ClientPtr client)
++{
+ xXF86VidModeQueryVersionReply rep;
+
+- DEBUG_P("XF86VidModeQueryVersion");
++ DEBUG_P("XF86VidModeQueryVersion");
+
+- REQUEST_SIZE_MATCH(xXF86VidModeQueryVersionReq);
+- rep.type = X_Reply;
+- rep.length = 0;
+- rep.sequenceNumber = client->sequence;
+- rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION;
+- rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION;
++ REQUEST_SIZE_MATCH(xXF86VidModeQueryVersionReq);
++ rep.type = X_Reply;
++ rep.length = 0;
++ rep.sequenceNumber = client->sequence;
++ rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION;
++ rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION;
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swaps(&rep.majorVersion);
+ swaps(&rep.minorVersion);
+- } WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply),
+- (char *) &rep);
++ }
++ WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *) &rep);
+ return Success;
+ }
+
+ static int
+- ProcXF86VidModeGetModeLine(ClientPtr client) {
++ProcXF86VidModeGetModeLine(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetModeLineReq);
+ xXF86VidModeGetModeLineReply rep;
+ xXF86OldVidModeGetModeLineReply oldrep;
+@@ -294,11 +310,11 @@ static int
+ int dotClock;
+ int ver;
+
+- DEBUG_P("XF86VidModeGetModeline");
++ DEBUG_P("XF86VidModeGetModeline");
+
+- ver = ClientMajorVersion(client);
+- REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq);
+- rep.type = X_Reply;
++ ver = ClientMajorVersion(client);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq);
++ rep.type = X_Reply;
+ if (ver < 2) {
+ rep.length = bytes_to_int32(SIZEOF(xXF86OldVidModeGetModeLineReply) -
+ SIZEOF(xGenericReply));
+@@ -386,7 +402,8 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeGetAllModeLines(ClientPtr client) {
++ProcXF86VidModeGetAllModeLines(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetAllModeLinesReq);
+ xXF86VidModeGetAllModeLinesReply rep;
+ xXF86VidModeModeInfo mdinf;
+@@ -395,38 +412,39 @@ static int
+ int modecount, dotClock;
+ int ver;
+
+- DEBUG_P("XF86VidModeGetAllModelines");
++ DEBUG_P("XF86VidModeGetAllModelines");
+
+- REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+- ver = ClientMajorVersion(client);
++ ver = ClientMajorVersion(client);
+
+- modecount = VidModeGetNumOfModes(stuff->screen);
++ modecount = VidModeGetNumOfModes(stuff->screen);
+ if (modecount < 1)
+- return VidModeErrorBase + XF86VidModeExtensionDisabled;
++ return VidModeErrorBase + XF86VidModeExtensionDisabled;
+
+ if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock))
+- return BadValue;
++ return BadValue;
+
+- rep.type = X_Reply;
+- rep.length = SIZEOF(xXF86VidModeGetAllModeLinesReply) -
++ rep.type = X_Reply;
++ rep.length = SIZEOF(xXF86VidModeGetAllModeLinesReply) -
+ SIZEOF(xGenericReply);
+ if (ver < 2)
+- rep.length += modecount * sizeof(xXF86OldVidModeModeInfo);
++ rep.length += modecount * sizeof(xXF86OldVidModeModeInfo);
+ else
+- rep.length += modecount * sizeof(xXF86VidModeModeInfo);
+- rep.length >>= 2;
+- rep.sequenceNumber = client->sequence;
+- rep.modecount = modecount;
++ rep.length += modecount * sizeof(xXF86VidModeModeInfo);
++ rep.length >>= 2;
++ rep.sequenceNumber = client->sequence;
++ rep.modecount = modecount;
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.modecount);
+- } WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply),
+- (char *) &rep);
++ }
++ WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply),
++ (char *) &rep);
+
+ do {
+ mdinf.dotclock = dotClock;
+@@ -492,7 +510,8 @@ static int
+ && VidModeGetModeValue(mode, VIDMODE_FLAGS) == stuff->flags )
+
+ static int
+- ProcXF86VidModeAddModeLine(ClientPtr client) {
++ProcXF86VidModeAddModeLine(ClientPtr client)
++{
+ REQUEST(xXF86VidModeAddModeLineReq);
+ xXF86OldVidModeAddModeLineReq *oldstuff =
+ (xXF86OldVidModeAddModeLineReq *) client->requestBuffer;
+@@ -502,9 +521,9 @@ static int
+ int dotClock;
+ int ver;
+
+- DEBUG_P("XF86VidModeAddModeline");
++ DEBUG_P("XF86VidModeAddModeline");
+
+- ver = ClientMajorVersion(client);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -533,7 +552,8 @@ static int
+ stuff->after_vsyncend = oldstuff->after_vsyncend;
+ stuff->after_vtotal = oldstuff->after_vtotal;
+ stuff->after_flags = oldstuff->after_flags;
+- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
++ }
++ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
+ ErrorF("AddModeLine - scrn: %d clock: %ld\n",
+ (int) stuff->screen, (unsigned long) stuff->dotclock);
+ ErrorF("AddModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n",
+@@ -654,7 +674,8 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeDeleteModeLine(ClientPtr client) {
++ProcXF86VidModeDeleteModeLine(ClientPtr client)
++{
+ REQUEST(xXF86VidModeDeleteModeLineReq);
+ xXF86OldVidModeDeleteModeLineReq *oldstuff =
+ (xXF86OldVidModeDeleteModeLineReq *) client->requestBuffer;
+@@ -663,9 +684,9 @@ static int
+ int len, dotClock;
+ int ver;
+
+- DEBUG_P("XF86VidModeDeleteModeline");
++ DEBUG_P("XF86VidModeDeleteModeline");
+
+- ver = ClientMajorVersion(client);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -683,7 +704,8 @@ static int
+ stuff->vtotal = oldstuff->vtotal;
+ stuff->flags = oldstuff->flags;
+ stuff->privsize = oldstuff->privsize;
+- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
++ }
++ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
+ ErrorF("DeleteModeLine - scrn: %d clock: %ld\n",
+ (int) stuff->screen, (unsigned long) stuff->dotclock);
+ ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
+@@ -777,7 +799,8 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeModModeLine(ClientPtr client) {
++ProcXF86VidModeModModeLine(ClientPtr client)
++{
+ REQUEST(xXF86VidModeModModeLineReq);
+ xXF86OldVidModeModModeLineReq *oldstuff =
+ (xXF86OldVidModeModModeLineReq *) client->requestBuffer;
+@@ -786,9 +809,9 @@ static int
+ int len, dotClock;
+ int ver;
+
+- DEBUG_P("XF86VidModeModModeline");
++ DEBUG_P("XF86VidModeModModeline");
+
+- ver = ClientMajorVersion(client);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -805,7 +828,8 @@ static int
+ stuff->vtotal = oldstuff->vtotal;
+ stuff->flags = oldstuff->flags;
+ stuff->privsize = oldstuff->privsize;
+- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
++ }
++ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
+ ErrorF("ModModeLine - scrn: %d hdsp: %d hbeg: %d hend: %d httl: %d\n",
+ (int) stuff->screen, stuff->hdisplay, stuff->hsyncstart,
+ stuff->hsyncend, stuff->htotal);
+@@ -903,7 +927,8 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeValidateModeLine(ClientPtr client) {
++ProcXF86VidModeValidateModeLine(ClientPtr client)
++{
+ REQUEST(xXF86VidModeValidateModeLineReq);
+ xXF86OldVidModeValidateModeLineReq *oldstuff =
+ (xXF86OldVidModeValidateModeLineReq *) client->requestBuffer;
+@@ -913,9 +938,9 @@ static int
+ int len, status, dotClock;
+ int ver;
+
+- DEBUG_P("XF86VidModeValidateModeline");
++ DEBUG_P("XF86VidModeValidateModeline");
+
+- ver = ClientMajorVersion(client);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -933,7 +958,8 @@ static int
+ stuff->vtotal = oldstuff->vtotal;
+ stuff->flags = oldstuff->flags;
+ stuff->privsize = oldstuff->privsize;
+- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
++ }
++ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
+ ErrorF("ValidateModeLine - scrn: %d clock: %ld\n",
+ (int) stuff->screen, (unsigned long) stuff->dotclock);
+ ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
+@@ -1022,7 +1048,8 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeSwitchMode(ClientPtr client) {
++ProcXF86VidModeSwitchMode(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSwitchModeReq);
+
+ DEBUG_P("XF86VidModeSwitchMode");
+@@ -1035,8 +1062,11 @@ static int
+ VidModeZoomViewport(stuff->screen, (short) stuff->zoom);
+
+ return Success;
+-} static int
+- ProcXF86VidModeSwitchToMode(ClientPtr client) {
++}
++
++static int
++ProcXF86VidModeSwitchToMode(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSwitchToModeReq);
+ xXF86OldVidModeSwitchToModeReq *oldstuff =
+ (xXF86OldVidModeSwitchToModeReq *) client->requestBuffer;
+@@ -1045,9 +1075,9 @@ static int
+ int len, dotClock;
+ int ver;
+
+- DEBUG_P("XF86VidModeSwitchToMode");
++ DEBUG_P("XF86VidModeSwitchToMode");
+
+- ver = ClientMajorVersion(client);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -1065,7 +1095,8 @@ static int
+ stuff->vtotal = oldstuff->vtotal;
+ stuff->flags = oldstuff->flags;
+ stuff->privsize = oldstuff->privsize;
+- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
++ }
++ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
+ ErrorF("SwitchToMode - scrn: %d clock: %ld\n",
+ (int) stuff->screen, (unsigned long) stuff->dotclock);
+ ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
+@@ -1138,7 +1169,8 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeLockModeSwitch(ClientPtr client) {
++ProcXF86VidModeLockModeSwitch(ClientPtr client)
++{
+ REQUEST(xXF86VidModeLockModeSwitchReq);
+
+ REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq);
+@@ -1152,53 +1184,57 @@ static int
+ return VidModeErrorBase + XF86VidModeZoomLocked;
+
+ return Success;
+-} static int
+- ProcXF86VidModeGetMonitor(ClientPtr client) {
++}
++
++static int
++ProcXF86VidModeGetMonitor(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetMonitorReq);
+ xXF86VidModeGetMonitorReply rep;
+ CARD32 *hsyncdata, *vsyncdata;
+ int i, nHsync, nVrefresh;
+ pointer monitor;
+
+- DEBUG_P("XF86VidModeGetMonitor");
++ DEBUG_P("XF86VidModeGetMonitor");
+
+- REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+ if (!VidModeGetMonitor(stuff->screen, &monitor))
+- return BadValue;
++ return BadValue;
+
+- nHsync = VidModeGetMonitorValue(monitor, VIDMODE_MON_NHSYNC, 0).i;
+- nVrefresh = VidModeGetMonitorValue(monitor, VIDMODE_MON_NVREFRESH, 0).i;
++ nHsync = VidModeGetMonitorValue(monitor, VIDMODE_MON_NHSYNC, 0).i;
++ nVrefresh = VidModeGetMonitorValue(monitor, VIDMODE_MON_NVREFRESH, 0).i;
+
+- rep.type = X_Reply;
++ rep.type = X_Reply;
+ if ((char *) (VidModeGetMonitorValue(monitor, VIDMODE_MON_VENDOR, 0)).ptr)
+- rep.vendorLength = strlen((char *) (VidModeGetMonitorValue(monitor,
+- VIDMODE_MON_VENDOR,
+- 0)).ptr);
++ rep.vendorLength = strlen((char *) (VidModeGetMonitorValue(monitor,
++ VIDMODE_MON_VENDOR,
++ 0)).ptr);
+ else
+- rep.vendorLength = 0;
++ rep.vendorLength = 0;
+ if ((char *) (VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr)
+- rep.modelLength = strlen((char *) (VidModeGetMonitorValue(monitor,
+- VIDMODE_MON_MODEL,
+- 0)).ptr);
++ rep.modelLength = strlen((char *) (VidModeGetMonitorValue(monitor,
++ VIDMODE_MON_MODEL,
++ 0)).ptr);
+ else
+- rep.modelLength = 0;
+- rep.length =
++ rep.modelLength = 0;
++ rep.length =
+ bytes_to_int32(SIZEOF(xXF86VidModeGetMonitorReply) -
+ SIZEOF(xGenericReply) + (nHsync +
+ nVrefresh) * sizeof(CARD32) +
+ pad_to_int32(rep.vendorLength) +
+ pad_to_int32(rep.modelLength));
+- rep.sequenceNumber = client->sequence;
+- rep.nhsync = nHsync;
+- rep.nvsync = nVrefresh;
+- hsyncdata = malloc(nHsync * sizeof(CARD32));
++ rep.sequenceNumber = client->sequence;
++ rep.nhsync = nHsync;
++ rep.nvsync = nVrefresh;
++ hsyncdata = malloc(nHsync * sizeof(CARD32));
+ if (!hsyncdata) {
+ return BadAlloc;
+- } vsyncdata = malloc(nVrefresh * sizeof(CARD32));
++ }
++ vsyncdata = malloc(nVrefresh * sizeof(CARD32));
+
+ if (!vsyncdata) {
+ free(hsyncdata);
+@@ -1208,19 +1244,18 @@ static int
+ for (i = 0; i < nHsync; i++) {
+ hsyncdata[i] = (unsigned short) (VidModeGetMonitorValue(monitor,
+ VIDMODE_MON_HSYNC_LO,
+- i)).
+- f | (unsigned
+- short) (VidModeGetMonitorValue(monitor, VIDMODE_MON_HSYNC_HI,
+- i)).f << 16;
++ i)).f |
++ (unsigned
++ short) (VidModeGetMonitorValue(monitor, VIDMODE_MON_HSYNC_HI,
++ i)).f << 16;
+ }
+ for (i = 0; i < nVrefresh; i++) {
+ vsyncdata[i] = (unsigned short) (VidModeGetMonitorValue(monitor,
+ VIDMODE_MON_VREFRESH_LO,
+- i)).
+- f | (unsigned
+- short) (VidModeGetMonitorValue(monitor,
+- VIDMODE_MON_VREFRESH_HI,
+- i)).f << 16;
++ i)).f |
++ (unsigned
++ short) (VidModeGetMonitorValue(monitor, VIDMODE_MON_VREFRESH_HI,
++ i)).f << 16;
+ }
+
+ if (client->swapped) {
+@@ -1249,38 +1284,40 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeGetViewPort(ClientPtr client) {
++ProcXF86VidModeGetViewPort(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetViewPortReq);
+ xXF86VidModeGetViewPortReply rep;
+ int x, y;
+
+- DEBUG_P("XF86VidModeGetViewPort");
++ DEBUG_P("XF86VidModeGetViewPort");
+
+- REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+- rep.type = X_Reply;
+- rep.length = 0;
+- rep.sequenceNumber = client->sequence;
++ rep.type = X_Reply;
++ rep.length = 0;
++ rep.sequenceNumber = client->sequence;
+
+- VidModeGetViewPort(stuff->screen, &x, &y);
+- rep.x = x;
+- rep.y = y;
++ VidModeGetViewPort(stuff->screen, &x, &y);
++ rep.x = x;
++ rep.y = y;
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.x);
+ swapl(&rep.y);
+- } WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply),
+- (char *) &rep);
++ }
++ WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *) &rep);
+ return Success;
+ }
+
+ static int
+- ProcXF86VidModeSetViewPort(ClientPtr client) {
++ProcXF86VidModeSetViewPort(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSetViewPortReq);
+
+ DEBUG_P("XF86VidModeSetViewPort");
+@@ -1294,8 +1331,11 @@ static int
+ return BadValue;
+
+ return Success;
+-} static int
+- ProcXF86VidModeGetDotClocks(ClientPtr client) {
++}
++
++static int
++ProcXF86VidModeGetDotClocks(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetDotClocksReq);
+ xXF86VidModeGetDotClocksReply rep;
+ int n;
+@@ -1304,31 +1344,33 @@ static int
+ int *Clocks = NULL;
+ Bool ClockProg;
+
+- DEBUG_P("XF86VidModeGetDotClocks");
++ DEBUG_P("XF86VidModeGetDotClocks");
+
+- REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+- numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg);
++ numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg);
+
+- rep.type = X_Reply;
+- rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetDotClocksReply)
+- - SIZEOF(xGenericReply) + numClocks);
+- rep.sequenceNumber = client->sequence;
+- rep.clocks = numClocks;
+- rep.maxclocks = MAXCLOCKS;
+- rep.flags = 0;
++ rep.type = X_Reply;
++ rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetDotClocksReply)
++ - SIZEOF(xGenericReply) + numClocks);
++ rep.sequenceNumber = client->sequence;
++ rep.clocks = numClocks;
++ rep.maxclocks = MAXCLOCKS;
++ rep.flags = 0;
+
+ if (!ClockProg) {
+ Clocks = malloc(numClocks * sizeof(int));
+ if (!Clocks)
+- return BadValue;
++ return BadValue;
+ if (!VidModeGetClocks(stuff->screen, Clocks)) {
+ free(Clocks);
+ return BadValue;
+- }} if (ClockProg) {
++ }
++ }
++ if (ClockProg) {
+ rep.flags |= CLKFLAG_PROGRAMABLE;
}
+ if (client->swapped) {
+@@ -1356,7 +1398,8 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeSetGamma(ClientPtr client) {
++ProcXF86VidModeSetGamma(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSetGammaReq);
+
+ DEBUG_P("XF86VidModeSetGamma");
+@@ -1372,79 +1415,89 @@ static int
+ return BadValue;
+
+ return Success;
+-} static int
+- ProcXF86VidModeGetGamma(ClientPtr client) {
++}
++
++static int
++ProcXF86VidModeGetGamma(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetGammaReq);
+ xXF86VidModeGetGammaReply rep;
+ float red, green, blue;
+
+- DEBUG_P("XF86VidModeGetGamma");
++ DEBUG_P("XF86VidModeGetGamma");
+
+- REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+- rep.type = X_Reply;
+- rep.length = 0;
+- rep.sequenceNumber = client->sequence;
++ rep.type = X_Reply;
++ rep.length = 0;
++ rep.sequenceNumber = client->sequence;
+ if (!VidModeGetGamma(stuff->screen, &red, &green, &blue))
+- return BadValue;
+- rep.red = (CARD32) (red * 10000.);
+- rep.green = (CARD32) (green * 10000.);
+- rep.blue = (CARD32) (blue * 10000.);
++ return BadValue;
++ rep.red = (CARD32) (red * 10000.);
++ rep.green = (CARD32) (green * 10000.);
++ rep.blue = (CARD32) (blue * 10000.);
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.red);
+ swapl(&rep.green);
+ swapl(&rep.blue);
+- } WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *) &rep);
++ }
++ WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *) &rep);
+
+ return Success;
+ }
+
+ static int
+- ProcXF86VidModeSetGammaRamp(ClientPtr client) {
++ProcXF86VidModeSetGammaRamp(ClientPtr client)
++{
+ CARD16 *r, *g, *b;
+ int length;
+- REQUEST(xXF86VidModeSetGammaRampReq);
++
++ REQUEST(xXF86VidModeSetGammaRampReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+ if (stuff->size != VidModeGetGammaRampSize(stuff->screen))
+- return BadValue;
++ return BadValue;
+
+- length = (stuff->size + 1) & ~1;
++ length = (stuff->size + 1) & ~1;
+
+- REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length * 6);
++ REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length * 6);
+
+- r = (CARD16 *) &stuff[1];
+- g = r + length;
+- b = g + length;
++ r = (CARD16 *) &stuff[1];
++ g = r + length;
++ b = g + length;
+
+ if (!VidModeSetGammaRamp(stuff->screen, stuff->size, r, g, b))
+- return BadValue;
++ return BadValue;
+
+- return Success;
+-} static int
+- ProcXF86VidModeGetGammaRamp(ClientPtr client) {
++ return Success;
++}
++
++static int
++ProcXF86VidModeGetGammaRamp(ClientPtr client)
++{
+ CARD16 *ramp = NULL;
+ int length;
+ size_t ramplen = 0;
+ xXF86VidModeGetGammaRampReply rep;
+- REQUEST(xXF86VidModeGetGammaRampReq);
++
++ REQUEST(xXF86VidModeGetGammaRampReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+ if (stuff->size != VidModeGetGammaRampSize(stuff->screen))
+- return BadValue;
++ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
+
+- length = (stuff->size + 1) & ~1;
++ length = (stuff->size + 1) & ~1;
+
+ if (stuff->size) {
+ ramplen = length * 3 * sizeof(CARD16);
+@@ -1455,7 +1508,9 @@ static int
+ ramp, ramp + length, ramp + (length * 2))) {
+ free(ramp);
+ return BadValue;
+- }} rep.type = X_Reply;
++ }
++ }
++ rep.type = X_Reply;
+ rep.length = (length >> 1) * 3;
+ rep.sequenceNumber = client->sequence;
+ rep.size = stuff->size;
+@@ -1476,47 +1531,53 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeGetGammaRampSize(ClientPtr client) {
++ProcXF86VidModeGetGammaRampSize(ClientPtr client)
++{
+ xXF86VidModeGetGammaRampSizeReply rep;
+- REQUEST(xXF86VidModeGetGammaRampSizeReq);
++
++ REQUEST(xXF86VidModeGetGammaRampSizeReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
-- if (scrn->modes != NULL) {
-- /* For some reason, scrn->modes is circular, unlike the other mode
-- * lists. How great is that?
-- */
-- for (last = scrn->modes; last && last->next; last = last->next)
-- ;
-- last->next = scrn->modes;
-- scrn->modes->prev = last;
-- if (mode) {
-- while (scrn->modes != mode)
-- scrn->modes = scrn->modes->next;
-- }
-+ if (!scrn->modes) {
-+ scrn->modes = xf86ModesAdd(scrn->modes,
-+ xf86CVTMode(scrn->display->virtualX,
-+ scrn->display->virtualY,
-+ 60, 0, 0));
-+ }
-+
-+ /* For some reason, scrn->modes is circular, unlike the other mode
-+ * lists. How great is that?
-+ */
-+ for (last = scrn->modes; last && last->next; last = last->next)
-+ ;
-+ last->next = scrn->modes;
-+ scrn->modes->prev = last;
-+ if (mode) {
-+ while (scrn->modes != mode)
-+ scrn->modes = scrn->modes->next;
+- rep.type = X_Reply;
+- rep.length = 0;
+- rep.sequenceNumber = client->sequence;
+- rep.size = VidModeGetGammaRampSize(stuff->screen);
++ rep.type = X_Reply;
++ rep.length = 0;
++ rep.sequenceNumber = client->sequence;
++ rep.size = VidModeGetGammaRampSize(stuff->screen);
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swaps(&rep.size);
+- } WriteToClient(client, sizeof(xXF86VidModeGetGammaRampSizeReply),
+- (char *) &rep);
++ }
++ WriteToClient(client, sizeof(xXF86VidModeGetGammaRampSizeReply),
++ (char *) &rep);
+
+ return Success;
+ }
+
+ static int
+- ProcXF86VidModeGetPermissions(ClientPtr client) {
++ProcXF86VidModeGetPermissions(ClientPtr client)
++{
+ xXF86VidModeGetPermissionsReply rep;
+- REQUEST(xXF86VidModeGetPermissionsReq);
++
++ REQUEST(xXF86VidModeGetPermissionsReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+- return BadValue;
++ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
+
+- rep.type = X_Reply;
+- rep.length = 0;
+- rep.sequenceNumber = client->sequence;
+- rep.permissions = XF86VM_READ_PERMISSION;
++ rep.type = X_Reply;
++ rep.length = 0;
++ rep.sequenceNumber = client->sequence;
++ rep.permissions = XF86VM_READ_PERMISSION;
+ if (xf86GetVidModeEnabled() &&
+ (xf86GetVidModeAllowNonLocal() || LocalClient(client))) {
+ rep.permissions |= XF86VM_WRITE_PERMISSION;
+- } if (client->swapped) {
++ }
++ if (client->swapped) {
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.permissions);
+@@ -1528,21 +1589,23 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeSetClientVersion(ClientPtr client) {
++ProcXF86VidModeSetClientVersion(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSetClientVersionReq);
+
+ VidModePrivPtr pPriv;
+
+- DEBUG_P("XF86VidModeSetClientVersion");
++ DEBUG_P("XF86VidModeSetClientVersion");
+
+- REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
++ REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
+
+ if ((pPriv = VM_GETPRIV(client)) == NULL) {
+ pPriv = malloc(sizeof(VidModePrivRec));
+ if (!pPriv)
+ return BadAlloc;
+ VM_SETPRIV(client, pPriv);
+- } pPriv->major = stuff->major;
++ }
++ pPriv->major = stuff->major;
+
+ pPriv->minor = stuff->minor;
+
+@@ -1550,85 +1613,103 @@ static int
+ }
+
+ static int
+- ProcXF86VidModeDispatch(ClientPtr client) {
++ProcXF86VidModeDispatch(ClientPtr client)
++{
+ REQUEST(xReq);
+ switch (stuff->data) {
+ case X_XF86VidModeQueryVersion:
+ return ProcXF86VidModeQueryVersion(client);
+- case X_XF86VidModeGetModeLine:return ProcXF86VidModeGetModeLine(client);
+- case X_XF86VidModeGetMonitor:return ProcXF86VidModeGetMonitor(client);
+- case X_XF86VidModeGetAllModeLines:return
+- ProcXF86VidModeGetAllModeLines(client);
+- case X_XF86VidModeValidateModeLine:return
+- ProcXF86VidModeValidateModeLine(client);
+- case X_XF86VidModeGetViewPort:return ProcXF86VidModeGetViewPort(client);
+- case X_XF86VidModeGetDotClocks:return
+- ProcXF86VidModeGetDotClocks(client);
+- case X_XF86VidModeSetClientVersion:return
+- ProcXF86VidModeSetClientVersion(client);
+- case X_XF86VidModeGetGamma:return ProcXF86VidModeGetGamma(client);
+- case X_XF86VidModeGetGammaRamp:return
+- ProcXF86VidModeGetGammaRamp(client);
+- case X_XF86VidModeGetGammaRampSize:return
+- ProcXF86VidModeGetGammaRampSize(client);
+- case X_XF86VidModeGetPermissions:return
+- ProcXF86VidModeGetPermissions(client);
+- default:if (!xf86GetVidModeEnabled())
++ case X_XF86VidModeGetModeLine:
++ return ProcXF86VidModeGetModeLine(client);
++ case X_XF86VidModeGetMonitor:
++ return ProcXF86VidModeGetMonitor(client);
++ case X_XF86VidModeGetAllModeLines:
++ return ProcXF86VidModeGetAllModeLines(client);
++ case X_XF86VidModeValidateModeLine:
++ return ProcXF86VidModeValidateModeLine(client);
++ case X_XF86VidModeGetViewPort:
++ return ProcXF86VidModeGetViewPort(client);
++ case X_XF86VidModeGetDotClocks:
++ return ProcXF86VidModeGetDotClocks(client);
++ case X_XF86VidModeSetClientVersion:
++ return ProcXF86VidModeSetClientVersion(client);
++ case X_XF86VidModeGetGamma:
++ return ProcXF86VidModeGetGamma(client);
++ case X_XF86VidModeGetGammaRamp:
++ return ProcXF86VidModeGetGammaRamp(client);
++ case X_XF86VidModeGetGammaRampSize:
++ return ProcXF86VidModeGetGammaRampSize(client);
++ case X_XF86VidModeGetPermissions:
++ return ProcXF86VidModeGetPermissions(client);
++ default:
++ if (!xf86GetVidModeEnabled())
+ return VidModeErrorBase + XF86VidModeExtensionDisabled;
+ if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) {
+ switch (stuff->data) {
+ case X_XF86VidModeAddModeLine:
+ return ProcXF86VidModeAddModeLine(client);
+- case X_XF86VidModeDeleteModeLine:return
+- ProcXF86VidModeDeleteModeLine(client);
+- case X_XF86VidModeModModeLine:return
+- ProcXF86VidModeModModeLine(client);
+- case X_XF86VidModeSwitchMode:return
+- ProcXF86VidModeSwitchMode(client);
+- case X_XF86VidModeSwitchToMode:return
+- ProcXF86VidModeSwitchToMode(client);
+- case X_XF86VidModeLockModeSwitch:return
+- ProcXF86VidModeLockModeSwitch(client);
+- case X_XF86VidModeSetViewPort:return
+- ProcXF86VidModeSetViewPort(client);
+- case X_XF86VidModeSetGamma:return
+- ProcXF86VidModeSetGamma(client);
+- case X_XF86VidModeSetGammaRamp:return
+- ProcXF86VidModeSetGammaRamp(client);
+- default:return BadRequest;
+- }}
++ case X_XF86VidModeDeleteModeLine:
++ return ProcXF86VidModeDeleteModeLine(client);
++ case X_XF86VidModeModModeLine:
++ return ProcXF86VidModeModModeLine(client);
++ case X_XF86VidModeSwitchMode:
++ return ProcXF86VidModeSwitchMode(client);
++ case X_XF86VidModeSwitchToMode:
++ return ProcXF86VidModeSwitchToMode(client);
++ case X_XF86VidModeLockModeSwitch:
++ return ProcXF86VidModeLockModeSwitch(client);
++ case X_XF86VidModeSetViewPort:
++ return ProcXF86VidModeSetViewPort(client);
++ case X_XF86VidModeSetGamma:
++ return ProcXF86VidModeSetGamma(client);
++ case X_XF86VidModeSetGammaRamp:
++ return ProcXF86VidModeSetGammaRamp(client);
++ default:
++ return BadRequest;
++ }
++ }
+ else
+- return VidModeErrorBase + XF86VidModeClientNotLocal;
++ return VidModeErrorBase + XF86VidModeClientNotLocal;
}
+ }
+
+ static int
+- SProcXF86VidModeQueryVersion(ClientPtr client) {
++SProcXF86VidModeQueryVersion(ClientPtr client)
++{
+ REQUEST(xXF86VidModeQueryVersionReq);
+ swaps(&stuff->length);
+ return ProcXF86VidModeQueryVersion(client);
+-} static int
+- SProcXF86VidModeGetModeLine(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeGetModeLine(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetModeLineReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetModeLine(client);
+-} static int
+- SProcXF86VidModeGetAllModeLines(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeGetAllModeLines(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetAllModeLinesReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetAllModeLines(client);
+-} static int
+- SProcXF86VidModeAddModeLine(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeAddModeLine(ClientPtr client)
++{
+ xXF86OldVidModeAddModeLineReq *oldstuff =
+ (xXF86OldVidModeAddModeLineReq *) client->requestBuffer;
+ int ver;
+
+- REQUEST(xXF86VidModeAddModeLineReq);
+- ver = ClientMajorVersion(client);
++ REQUEST(xXF86VidModeAddModeLineReq);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ swaps(&oldstuff->length);
+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq);
+@@ -1666,13 +1747,14 @@ static int
+ }
+
+ static int
+- SProcXF86VidModeDeleteModeLine(ClientPtr client) {
++SProcXF86VidModeDeleteModeLine(ClientPtr client)
++{
+ xXF86OldVidModeDeleteModeLineReq *oldstuff =
+ (xXF86OldVidModeDeleteModeLineReq *) client->requestBuffer;
+ int ver;
+
+- REQUEST(xXF86VidModeDeleteModeLineReq);
+- ver = ClientMajorVersion(client);
++ REQUEST(xXF86VidModeDeleteModeLineReq);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ swaps(&oldstuff->length);
+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq);
+@@ -1710,13 +1792,14 @@ static int
+ }
+
+ static int
+- SProcXF86VidModeModModeLine(ClientPtr client) {
++SProcXF86VidModeModModeLine(ClientPtr client)
++{
+ xXF86OldVidModeModModeLineReq *oldstuff =
+ (xXF86OldVidModeModModeLineReq *) client->requestBuffer;
+ int ver;
+
+- REQUEST(xXF86VidModeModModeLineReq);
+- ver = ClientMajorVersion(client);
++ REQUEST(xXF86VidModeModModeLineReq);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ swaps(&oldstuff->length);
+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq);
+@@ -1754,13 +1837,14 @@ static int
+ }
+
+ static int
+- SProcXF86VidModeValidateModeLine(ClientPtr client) {
++SProcXF86VidModeValidateModeLine(ClientPtr client)
++{
+ xXF86OldVidModeValidateModeLineReq *oldstuff =
+ (xXF86OldVidModeValidateModeLineReq *) client->requestBuffer;
+ int ver;
+
+- REQUEST(xXF86VidModeValidateModeLineReq);
+- ver = ClientMajorVersion(client);
++ REQUEST(xXF86VidModeValidateModeLineReq);
++ ver = ClientMajorVersion(client);
+ if (ver < 2) {
+ swaps(&oldstuff->length);
+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq);
+@@ -1798,44 +1882,60 @@ static int
+ }
+
+ static int
+- SProcXF86VidModeSwitchMode(ClientPtr client) {
++SProcXF86VidModeSwitchMode(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSwitchModeReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq);
+ swaps(&stuff->screen);
+ swaps(&stuff->zoom);
+ return ProcXF86VidModeSwitchMode(client);
+-} static int
+- SProcXF86VidModeSwitchToMode(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeSwitchToMode(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSwitchToModeReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq);
+ swapl(&stuff->screen);
+ return ProcXF86VidModeSwitchToMode(client);
+-} static int
+- SProcXF86VidModeLockModeSwitch(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeLockModeSwitch(ClientPtr client)
++{
+ REQUEST(xXF86VidModeLockModeSwitchReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq);
+ swaps(&stuff->screen);
+ swaps(&stuff->lock);
+ return ProcXF86VidModeLockModeSwitch(client);
+-} static int
+- SProcXF86VidModeGetMonitor(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeGetMonitor(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetMonitorReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetMonitor(client);
+-} static int
+- SProcXF86VidModeGetViewPort(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeGetViewPort(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetViewPortReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetViewPort(client);
+-} static int
+- SProcXF86VidModeSetViewPort(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeSetViewPort(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSetViewPortReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq);
+@@ -1843,23 +1943,32 @@ static int
+ swapl(&stuff->x);
+ swapl(&stuff->y);
+ return ProcXF86VidModeSetViewPort(client);
+-} static int
+- SProcXF86VidModeGetDotClocks(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeGetDotClocks(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetDotClocksReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetDotClocks(client);
+-} static int
+- SProcXF86VidModeSetClientVersion(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeSetClientVersion(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSetClientVersionReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
+ swaps(&stuff->major);
+ swaps(&stuff->minor);
+ return ProcXF86VidModeSetClientVersion(client);
+-} static int
+- SProcXF86VidModeSetGamma(ClientPtr client) {
++}
+
- scrn->currentMode = scrn->modes;
- #ifdef XFreeXDGA
- if (scrn->pScreen)
-@@ -2529,16 +2535,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
- width, height);
++static int
++SProcXF86VidModeSetGamma(ClientPtr client)
++{
+ REQUEST(xXF86VidModeSetGammaReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq);
+@@ -1868,120 +1977,145 @@ static int
+ swapl(&stuff->green);
+ swapl(&stuff->blue);
+ return ProcXF86VidModeSetGamma(client);
+-} static int
+- SProcXF86VidModeGetGamma(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeGetGamma(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetGammaReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetGamma(client);
+-} static int
+- SProcXF86VidModeSetGammaRamp(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeSetGammaRamp(ClientPtr client)
++{
+ int length;
+- REQUEST(xXF86VidModeSetGammaRampReq);
+- swaps(&stuff->length);
+- REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq);
+- swaps(&stuff->size);
+- swaps(&stuff->screen);
+- length = ((stuff->size + 1) & ~1) * 6;
+- REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length);
+- SwapRestS(stuff);
+- return ProcXF86VidModeSetGammaRamp(client);
+-} static int
+- SProcXF86VidModeGetGammaRamp(ClientPtr client) {
++
++ REQUEST(xXF86VidModeSetGammaRampReq);
++ swaps(&stuff->length);
++ REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq);
++ swaps(&stuff->size);
++ swaps(&stuff->screen);
++ length = ((stuff->size + 1) & ~1) * 6;
++ REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length);
++ SwapRestS(stuff);
++ return ProcXF86VidModeSetGammaRamp(client);
++}
++
++static int
++SProcXF86VidModeGetGammaRamp(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetGammaRampReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
+ swaps(&stuff->size);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetGammaRamp(client);
+-} static int
+- SProcXF86VidModeGetGammaRampSize(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeGetGammaRampSize(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetGammaRampSizeReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetGammaRampSize(client);
+-} static int
+- SProcXF86VidModeGetPermissions(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeGetPermissions(ClientPtr client)
++{
+ REQUEST(xXF86VidModeGetPermissionsReq);
+ swaps(&stuff->length);
+ REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
+ swaps(&stuff->screen);
+ return ProcXF86VidModeGetPermissions(client);
+-} static int
+- SProcXF86VidModeDispatch(ClientPtr client) {
++}
++
++static int
++SProcXF86VidModeDispatch(ClientPtr client)
++{
+ REQUEST(xReq);
+ switch (stuff->data) {
+ case X_XF86VidModeQueryVersion:
+ return SProcXF86VidModeQueryVersion(client);
+- case X_XF86VidModeGetModeLine:return
+- SProcXF86VidModeGetModeLine(client);
+- case X_XF86VidModeGetMonitor:return SProcXF86VidModeGetMonitor(client);
+- case X_XF86VidModeGetAllModeLines:return
+- SProcXF86VidModeGetAllModeLines(client);
+- case X_XF86VidModeGetViewPort:return
+- SProcXF86VidModeGetViewPort(client);
+- case X_XF86VidModeValidateModeLine:return
+- SProcXF86VidModeValidateModeLine(client);
+- case X_XF86VidModeGetDotClocks:return
+- SProcXF86VidModeGetDotClocks(client);
+- case X_XF86VidModeSetClientVersion:return
+- SProcXF86VidModeSetClientVersion(client);
+- case X_XF86VidModeGetGamma:return SProcXF86VidModeGetGamma(client);
+- case X_XF86VidModeGetGammaRamp:return
+- SProcXF86VidModeGetGammaRamp(client);
+- case X_XF86VidModeGetGammaRampSize:return
+- SProcXF86VidModeGetGammaRampSize(client);
+- case X_XF86VidModeGetPermissions:return
+- SProcXF86VidModeGetPermissions(client);
+- default:if (!xf86GetVidModeEnabled())
++ case X_XF86VidModeGetModeLine:
++ return SProcXF86VidModeGetModeLine(client);
++ case X_XF86VidModeGetMonitor:
++ return SProcXF86VidModeGetMonitor(client);
++ case X_XF86VidModeGetAllModeLines:
++ return SProcXF86VidModeGetAllModeLines(client);
++ case X_XF86VidModeGetViewPort:
++ return SProcXF86VidModeGetViewPort(client);
++ case X_XF86VidModeValidateModeLine:
++ return SProcXF86VidModeValidateModeLine(client);
++ case X_XF86VidModeGetDotClocks:
++ return SProcXF86VidModeGetDotClocks(client);
++ case X_XF86VidModeSetClientVersion:
++ return SProcXF86VidModeSetClientVersion(client);
++ case X_XF86VidModeGetGamma:
++ return SProcXF86VidModeGetGamma(client);
++ case X_XF86VidModeGetGammaRamp:
++ return SProcXF86VidModeGetGammaRamp(client);
++ case X_XF86VidModeGetGammaRampSize:
++ return SProcXF86VidModeGetGammaRampSize(client);
++ case X_XF86VidModeGetPermissions:
++ return SProcXF86VidModeGetPermissions(client);
++ default:
++ if (!xf86GetVidModeEnabled())
+ return VidModeErrorBase + XF86VidModeExtensionDisabled;
+ if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) {
+ switch (stuff->data) {
+ case X_XF86VidModeAddModeLine:
+ return SProcXF86VidModeAddModeLine(client);
+- case X_XF86VidModeDeleteModeLine:return
+- SProcXF86VidModeDeleteModeLine(client);
+- case X_XF86VidModeModModeLine:return
+- SProcXF86VidModeModModeLine(client);
+- case X_XF86VidModeSwitchMode:return
+- SProcXF86VidModeSwitchMode(client);
+- case X_XF86VidModeSwitchToMode:return
+- SProcXF86VidModeSwitchToMode(client);
+- case X_XF86VidModeLockModeSwitch:return
+- SProcXF86VidModeLockModeSwitch(client);
+- case X_XF86VidModeSetViewPort:return
+- SProcXF86VidModeSetViewPort(client);
+- case X_XF86VidModeSetGamma:return
+- SProcXF86VidModeSetGamma(client);
+- case X_XF86VidModeSetGammaRamp:return
+- SProcXF86VidModeSetGammaRamp(client);
+- default:return BadRequest;
+- }}
++ case X_XF86VidModeDeleteModeLine:
++ return SProcXF86VidModeDeleteModeLine(client);
++ case X_XF86VidModeModModeLine:
++ return SProcXF86VidModeModModeLine(client);
++ case X_XF86VidModeSwitchMode:
++ return SProcXF86VidModeSwitchMode(client);
++ case X_XF86VidModeSwitchToMode:
++ return SProcXF86VidModeSwitchToMode(client);
++ case X_XF86VidModeLockModeSwitch:
++ return SProcXF86VidModeLockModeSwitch(client);
++ case X_XF86VidModeSetViewPort:
++ return SProcXF86VidModeSetViewPort(client);
++ case X_XF86VidModeSetGamma:
++ return SProcXF86VidModeSetGamma(client);
++ case X_XF86VidModeSetGammaRamp:
++ return SProcXF86VidModeSetGammaRamp(client);
++ default:
++ return BadRequest;
++ }
++ }
+ else
+- return VidModeErrorBase + XF86VidModeClientNotLocal;
++ return VidModeErrorBase + XF86VidModeClientNotLocal;
+ }
+ }
+
+ void
+- XFree86VidModeExtensionInit(void) {
++XFree86VidModeExtensionInit(void)
++{
+ ExtensionEntry *extEntry;
+ ScreenPtr pScreen;
+ int i;
+ Bool enabled = FALSE;
+
+- DEBUG_P("XFree86VidModeExtensionInit");
++ DEBUG_P("XFree86VidModeExtensionInit");
+
+ if (!dixRegisterPrivateKey(&VidModeClientPrivateKeyRec, PRIVATE_CLIENT, 0))
+- return;
++ return;
+ #ifdef XF86VIDMODE_EVENTS
+ if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
+- return;
++ return;
+ #endif
+
+ #ifdef XF86VIDMODE_EVENTS
+- EventType = CreateNewResourceType(XF86VidModeFreeEvents, "VidModeEvent");
++ EventType = CreateNewResourceType(XF86VidModeFreeEvents, "VidModeEvent");
+ #endif
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+@@ -1990,8 +2124,8 @@ void
+ enabled = TRUE;
}
+ /* This means that the DDX doesn't want the vidmode extension enabled */
+- if (!enabled)
+- return;
++ if (!enabled)
++ return;
-- if (have_outputs) {
-- /* Mirror output modes to scrn mode list */
-- xf86SetScrnInfoModes (scrn);
-- } else {
-- /* Clear any existing modes from scrn->modes */
-- while (scrn->modes != NULL)
-- xf86DeleteMode(&scrn->modes, scrn->modes);
-- scrn->modes = xf86ModesAdd(scrn->modes,
-- xf86CVTMode(width, height, 60, 0, 0));
-- }
-+ xf86SetScrnInfoModes (scrn);
-
- success = TRUE;
- bailout:
+ if (
+ #ifdef XF86VIDMODE_EVENTS
--
cgit v0.9.0.2-2-gbebe
-From 97f2ae60fc0cc755abd8b88df826fcb1a20464fe Mon Sep 17 00:00:00 2001
-From: Christopher Yeleighton <giecrilj@stegny.2a.pl>
-Date: Tue, 25 Oct 2011 01:47:06 +0000
-Subject: Bug 38420: Xvfb crashes in miInitVisuals() when started with depth=2
+From 15607cf2dc87405606b20113011f1ebd97637d32 Mon Sep 17 00:00:00 2001
+From: Daniel Kurtz <djkurtz@chromium.org>
+Date: Thu, 12 Apr 2012 00:11:10 +0000
+Subject: dix: don't BUG_WARN for button events from button-only device
-https://bugs.freedesktop.org/show_bug.cgi?id=38420
+Events from button-only devices still need coordinates, and they get them
+from scale_to_desktop(). Therefore, a dev without valuators is not a bug.
+However, a dev with valuators, but less than two of them still is a bug.
-Exit with fatal error message, not segfault.
+This was noticed when unplugging a "Creative Technology SB Arena Headset",
+which has some BTNs and some KEYs, but no REL or ABS valuators.
+It emits [BTN_3] = 0 on unplug, which would trigger the BUG_WARN.
-Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-Signed-off-by: Keith Packard <keithp@keithp.com>
-(cherry picked from commit 7d50211ab57a35910d79fc3f67ae89aff91fa995)
+Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
+Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+(cherry picked from commit c5a45b0f7658c77725adce2b64a0fbd62f208328)
---
-diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
-index 31ed505..dce3f84 100644
---- a/hw/vfb/InitOutput.c
-+++ b/hw/vfb/InitOutput.c
-@@ -864,6 +864,8 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
- (1 << DirectColor)),
- 10, TrueColor, 0x3ff00000, 0x000ffc00, 0x000003ff);
- break;
-+ default:
-+ return FALSE;
- }
+diff --git a/dix/getevents.c b/dix/getevents.c
+index 4e0af45..9dc9617 100644
+--- a/dix/getevents.c
++++ b/dix/getevents.c
+@@ -842,7 +842,7 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask,
+ ScreenPtr scr = miPointerGetScreen(dev);
+ double x, y;
- miSetPixmapDepths ();
+- BUG_WARN(!dev->valuator || dev->valuator->numAxes < 2);
++ BUG_WARN(dev->valuator && dev->valuator->numAxes < 2);
+ if (!dev->valuator || dev->valuator->numAxes < 2) {
+ /* if we have no axes, last.valuators must be in screen coords
+ * anyway */
--
cgit v0.9.0.2-2-gbebe
-From 34bb83b9df20ff63dbb147ed661f39efb8bae8e4 Mon Sep 17 00:00:00 2001
+From f8d2ca759ad37d5e99d462f21a2259ce17bb1a00 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
-Date: Mon, 24 Oct 2011 02:00:32 +0000
-Subject: dix: block signals when closing all devices
+Date: Wed, 18 Apr 2012 05:56:37 +0000
+Subject: dix: indentation fix
-When closing down all devices, we manually unset master for all attached
-devices, but the device's sprite info still points to the master's sprite
-info. This leaves us a window where the master is freed already but the
-device isn't yet. A signal during that window causes dereference of the
-already freed spriteInfo in mieqEnqueue's EnqueueScreen macro.
-
-Simply block signals when removing all devices. It's not like we're really
-worrying about high-responsive input at this stage.
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+(cherry picked from commit ebf214876a4885a98ded4f5525925b69005fae05)
+---
+diff --git a/dix/dispatch.c b/dix/dispatch.c
+index 9a2e22f..d971805 100644
+--- a/dix/dispatch.c
++++ b/dix/dispatch.c
+@@ -416,8 +416,8 @@ Dispatch(void)
+ if (XSERVER_REQUEST_START_ENABLED())
+ XSERVER_REQUEST_START(LookupMajorName(client->majorOp),
+ client->majorOp,
+- ((xReq *) client->requestBuffer)->
+- length, client->index,
++ ((xReq *) client->requestBuffer)->length,
++ client->index,
+ client->requestBuffer);
+ #endif
+ if (result > (maxBigRequestSize << 2))
+--
+cgit v0.9.0.2-2-gbebe
+From f012f0c48dedba4df69cc1a1ecdf8ee5d37daca9 Mon Sep 17 00:00:00 2001
+From: Michal Suchanek <hramrach@gmail.com>
+Date: Thu, 26 Apr 2012 13:11:20 +0000
+Subject: dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN
-https://bugzilla.redhat.com/show_bug.cgi?id=737031
+and fix resulting printf warning in dmxLogVisual
+Signed-off-by: Michal Suchanek <hramrach@gmail.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-Reviewed-by: Julien Cristau <jcristau@debian.org>
-(cherry picked from commit d7c44a7c9760449bef263413ad3b20f19b1dc95a)
+(cherry picked from commit d662fa2450856777b59c4b62b912395a8bfd52fd)
+---
+diff --git a/hw/dmx/dmxlog.c b/hw/dmx/dmxlog.c
+index b56bb93..151f672 100644
+--- a/hw/dmx/dmxlog.c
++++ b/hw/dmx/dmxlog.c
+@@ -86,6 +86,8 @@ ErrorF(const char *format, ...)
+
+ /** Provide an VFatalError function when used stand-alone. */
+ static void
++VFatalError(const char *format, va_list args) _X_ATTRIBUTE_PRINTF(1, 0) _X_NORETURN;
++static void
+ VFatalError(const char *format, va_list args)
+ {
+ vfprintf(stderr, format, args); /* RATS: We assume the format string
+@@ -104,7 +106,9 @@ VErrorF(const char *format, va_list args)
+ }
+ #else
+ /** This function was removed between XFree86 4.3.0 and XFree86 4.4.0. */
+-extern void AbortServer(void);
++extern void AbortServer(void) _X_NORETURN;
++static void
++VFatalError(const char *format, va_list args) _X_ATTRIBUTE_PRINTF(1, 0) _X_NORETURN;
+ static void
+ VFatalError(const char *format, va_list args)
+ {
+@@ -166,6 +170,8 @@ dmxHeader(dmxLogLevel logLevel, DMXInputInfo * dmxInput,
+ /* Prints the error message with the appropriate low-level X output
+ * routine. */
+ static void
++dmxMessage(dmxLogLevel logLevel, const char *format, va_list args) _X_ATTRIBUTE_PRINTF(2, 0);
++static void
+ dmxMessage(dmxLogLevel logLevel, const char *format, va_list args)
+ {
+ if (logLevel == dmxFatal || logLevel >= dmxCurrentLogLevel) {
+@@ -303,10 +309,11 @@ dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, int defaultVisual)
+ class = "DirectColor";
+ break;
+ }
++#define VisualLogFormat "0x%02lx %s %2db %db/rgb %3d 0x%04lx 0x%04lx 0x%04lx%s\n"
+
+ if (dmxScreen) {
+ dmxLogOutput(dmxScreen,
+- "0x%02x %s %2db %db/rgb %3d 0x%04x 0x%04x 0x%04x%s\n",
++ VisualLogFormat,
+ vi->visualid, class, vi->depth, vi->bits_per_rgb,
+ vi->colormap_size,
+ vi->red_mask, vi->green_mask, vi->blue_mask,
+@@ -314,7 +321,7 @@ dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, int defaultVisual)
+ }
+ else {
+ dmxLog(dmxInfo,
+- " 0x%02x %s %2db %db/rgb %3d 0x%04x 0x%04x 0x%04x%s\n",
++ " " VisualLogFormat,
+ vi->visualid, class, vi->depth, vi->bits_per_rgb,
+ vi->colormap_size,
+ vi->red_mask, vi->green_mask, vi->blue_mask,
+diff --git a/hw/dmx/dmxlog.h b/hw/dmx/dmxlog.h
+index 4d4cd26..162484b 100644
+--- a/hw/dmx/dmxlog.h
++++ b/hw/dmx/dmxlog.h
+@@ -55,18 +55,23 @@ typedef enum {
+ /* Logging functions used by Xserver/hw/dmx routines. */
+ extern dmxLogLevel dmxSetLogLevel(dmxLogLevel newLevel);
+ extern dmxLogLevel dmxGetLogLevel(void);
+-extern void dmxLog(dmxLogLevel logLevel, const char *format, ...);
+-extern void dmxLogCont(dmxLogLevel logLevel, const char *format, ...);
++extern void dmxLog(dmxLogLevel logLevel, const char *format,
++ ...) _X_ATTRIBUTE_PRINTF(2, 3);
++extern void dmxLogCont(dmxLogLevel logLevel, const char *format,
++ ...) _X_ATTRIBUTE_PRINTF(2, 3);
+ extern const char *dmxEventName(int type);
+
+ #ifndef DMX_LOG_STANDALONE
+-extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format, ...);
++extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format,
++ ...) _X_ATTRIBUTE_PRINTF(2, 3);
+ extern void dmxLogOutputCont(DMXScreenInfo * dmxScreen, const char *format,
+- ...);
++ ...) _X_ATTRIBUTE_PRINTF(2, 3);
+ extern void dmxLogOutputWarning(DMXScreenInfo * dmxScreen, const char *format,
+- ...);
+-extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format, ...);
+-extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format, ...);
++ ...) _X_ATTRIBUTE_PRINTF(2, 3);
++extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format,
++ ...) _X_ATTRIBUTE_PRINTF(2, 3);
++extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format,
++ ...) _X_ATTRIBUTE_PRINTF(2, 3);
+ extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv);
+ extern void dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi,
+ int defaultVisual);
+--
+cgit v0.9.0.2-2-gbebe
+From 58dfb13953af71021317b9d85230b1163198f031 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Thu, 10 May 2012 07:53:20 +0000
+Subject: Revert "dix: when disabling a device, release all buttons and keys"
+
+This reverts commit 90299556db24543bb7365e8c2897deca3aa219e7.
+
+The commit being reverted triggered a segfault on server shutdown when a
+device posts raw events after the root windows are forced to NULL.
+
+https://lists.debian.org/debian-x/2012/05/msg00240.html
+
+Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
---
diff --git a/dix/devices.c b/dix/devices.c
-index 0ccf252..cbdd4ea 100644
+index d0e99bd..0125504 100644
--- a/dix/devices.c
+++ b/dix/devices.c
-@@ -982,6 +982,8 @@ CloseDownDevices(void)
- {
- DeviceIntPtr dev;
-
-+ OsBlockSignals();
-+
- /* Float all SDs before closing them. Note that at this point resources
- * (e.g. cursors) have been freed already, so we can't just call
- * AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master
-@@ -1004,6 +1006,8 @@ CloseDownDevices(void)
- inputInfo.keyboard = NULL;
- inputInfo.pointer = NULL;
- XkbDeleteRulesDflts();
-+
-+ OsReleaseSignals();
- }
+@@ -432,8 +432,6 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
+ if (*prev != dev)
+ return FALSE;
- /**
+- ReleaseButtonsAndKeys(dev);
+-
+ /* float attached devices */
+ if (IsMaster(dev)) {
+ for (other = inputInfo.devices; other; other = other->next) {
--
cgit v0.9.0.2-2-gbebe