summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/archboot/PKGBUILD48
-rw-r--r--testing/archboot/archboot.install20
-rw-r--r--testing/archboot/vmware-detect.c13
-rw-r--r--testing/aufs2-util/PKGBUILD25
-rwxr-xr-xtesting/aufs2-util/create-tarball.sh11
-rw-r--r--testing/binutils/PKGBUILD83
-rw-r--r--testing/binutils/binutils.install17
-rw-r--r--testing/cloog/PKGBUILD27
-rw-r--r--testing/crda/PKGBUILD39
-rw-r--r--testing/crda/crda.install18
-rwxr-xr-xtesting/crda/crda.rc26
-rw-r--r--testing/dmraid/PKGBUILD38
-rw-r--r--testing/dmraid/dmraid.install14
-rw-r--r--testing/dmraid/dmraid_hook18
-rw-r--r--testing/dmraid/dmraid_install20
-rw-r--r--testing/gcc/PKGBUILD255
-rw-r--r--testing/gcc/gcc-ada.install20
-rw-r--r--testing/gcc/gcc-fortran.install16
-rw-r--r--testing/gcc/gcc-go.install20
-rw-r--r--testing/gcc/gcc-hash-style-both.patch122
-rw-r--r--testing/gcc/gcc-libs.install16
-rw-r--r--testing/gcc/gcc.install20
-rw-r--r--testing/gcc/gcc_pure64.patch26
-rw-r--r--testing/ghc/PKGBUILD78
-rw-r--r--testing/ghc/build.mk150
-rw-r--r--testing/ghc/ghc.install19
-rw-r--r--testing/glibc/PKGBUILD168
-rw-r--r--testing/glibc/glibc-2.10-bz4781.patch42
-rw-r--r--testing/glibc/glibc-2.10-dont-build-timezone.patch13
-rw-r--r--testing/glibc/glibc-2.12.1-static-shared-getpagesize.patch11
-rw-r--r--testing/glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch26
-rw-r--r--testing/glibc/glibc-2.13-futex.patch31
-rw-r--r--testing/glibc/glibc-2.13-prelink.patch26
-rw-r--r--testing/glibc/glibc-__i686.patch13
-rw-r--r--testing/glibc/glibc.install20
-rwxr-xr-xtesting/glibc/locale-gen42
-rw-r--r--testing/glibc/locale.gen.txt23
-rwxr-xr-xtesting/glibc/nscd40
-rw-r--r--testing/gnutls/PKGBUILD41
-rw-r--r--testing/gnutls/gnutls.install20
-rw-r--r--testing/haddock/PKGBUILD39
-rw-r--r--testing/haddock/haddock.install18
-rw-r--r--testing/haskell-cgi/PKGBUILD39
-rw-r--r--testing/haskell-cgi/haskell-cgi.install18
-rw-r--r--testing/haskell-deepseq/PKGBUILD38
-rw-r--r--testing/haskell-deepseq/haskell-deepseq.install18
-rw-r--r--testing/haskell-fgl/PKGBUILD36
-rw-r--r--testing/haskell-fgl/haskell-fgl.install18
-rw-r--r--testing/haskell-ghc-paths/PKGBUILD35
-rw-r--r--testing/haskell-ghc-paths/haskell-ghc-paths.install18
-rw-r--r--testing/haskell-glut/PKGBUILD36
-rw-r--r--testing/haskell-glut/haskell-glut.install18
-rw-r--r--testing/haskell-haskell-src/PKGBUILD39
-rw-r--r--testing/haskell-haskell-src/haskell-haskell-src.install18
-rw-r--r--testing/haskell-html/PKGBUILD39
-rw-r--r--testing/haskell-html/haskell-html.install19
-rw-r--r--testing/haskell-http/PKGBUILD40
-rw-r--r--testing/haskell-http/haskell-http.install18
-rw-r--r--testing/haskell-hunit/PKGBUILD37
-rw-r--r--testing/haskell-hunit/haskell-hunit.install19
-rw-r--r--testing/haskell-mtl/PKGBUILD38
-rw-r--r--testing/haskell-mtl/haskell-mtl.install18
-rw-r--r--testing/haskell-network/PKGBUILD39
-rw-r--r--testing/haskell-network/haskell-network.install18
-rw-r--r--testing/haskell-opengl/PKGBUILD35
-rw-r--r--testing/haskell-opengl/haskell-opengl.install18
-rw-r--r--testing/haskell-parallel/PKGBUILD38
-rw-r--r--testing/haskell-parallel/haskell-parallel.install18
-rw-r--r--testing/haskell-parsec/PKGBUILD39
-rw-r--r--testing/haskell-parsec/haskell-parsec.install18
-rw-r--r--testing/haskell-platform/PKGBUILD40
-rw-r--r--testing/haskell-quickcheck/PKGBUILD38
-rw-r--r--testing/haskell-quickcheck/haskell-quickcheck.install18
-rw-r--r--testing/haskell-regex-base/PKGBUILD37
-rw-r--r--testing/haskell-regex-base/haskell-regex-base.install18
-rw-r--r--testing/haskell-regex-compat/PKGBUILD37
-rw-r--r--testing/haskell-regex-compat/haskell-regex-compat.install18
-rw-r--r--testing/haskell-regex-posix/PKGBUILD37
-rw-r--r--testing/haskell-regex-posix/haskell-regex-posix.install18
-rw-r--r--testing/haskell-stm/PKGBUILD38
-rw-r--r--testing/haskell-stm/haskell-stm.install18
-rw-r--r--testing/haskell-syb/PKGBUILD37
-rw-r--r--testing/haskell-syb/haskell-syb.install18
-rw-r--r--testing/haskell-text/PKGBUILD38
-rw-r--r--testing/haskell-text/haskell-text.install18
-rw-r--r--testing/haskell-transformers/PKGBUILD38
-rw-r--r--testing/haskell-transformers/haskell-transformers.install18
-rw-r--r--testing/haskell-xhtml/PKGBUILD38
-rw-r--r--testing/haskell-xhtml/haskell-xhtml.install19
-rw-r--r--testing/haskell-zlib/PKGBUILD39
-rw-r--r--testing/haskell-zlib/haskell-zlib.install18
-rw-r--r--testing/isl/PKGBUILD25
-rw-r--r--testing/libdrm/COPYING48
-rw-r--r--testing/libdrm/PKGBUILD40
-rw-r--r--testing/libdrm/no-pthread-stubs.patch65
-rw-r--r--testing/libgcrypt/PKGBUILD39
-rw-r--r--testing/libgcrypt/libgcrypt.install20
-rw-r--r--testing/libgpg-error/PKGBUILD37
-rw-r--r--testing/libtool/PKGBUILD31
-rw-r--r--testing/libtool/libtool.install22
-rw-r--r--testing/libx11/PKGBUILD38
-rw-r--r--testing/libx11/add-define-XK_SINHALA.patch25
-rw-r--r--testing/libx11/xorg.sh15
-rw-r--r--testing/linux-api-headers/PKGBUILD39
-rw-r--r--testing/lirc/PKGBUILD89
-rw-r--r--testing/lirc/irexec.conf5
-rwxr-xr-xtesting/lirc/irexecd38
-rw-r--r--testing/lirc/lirc.install16
-rw-r--r--testing/lirc/lirc.logrotate5
-rwxr-xr-xtesting/lirc/lircd52
-rw-r--r--testing/lirc/lircd.conf8
-rwxr-xr-xtesting/lirc/lircmd36
-rw-r--r--testing/madwifi/PKGBUILD46
-rw-r--r--testing/madwifi/kernel-2.6.30.patch14
-rw-r--r--testing/madwifi/madwifi-ng.install14
-rw-r--r--testing/make/PKGBUILD45
-rw-r--r--testing/make/bug30612.patch66
-rw-r--r--testing/make/bug30723.patch12
-rw-r--r--testing/make/make-3.82-sort-blank.patch17
-rw-r--r--testing/make/make.install20
-rw-r--r--testing/mdadm/PKGBUILD45
-rwxr-xr-xtesting/mdadm/mdadm38
-rw-r--r--testing/mdadm/mdadm.conf67
-rw-r--r--testing/mdadm/mdadm.install10
-rwxr-xr-xtesting/mdadm/mdadm_hook44
-rw-r--r--testing/mdadm/mdadm_install46
-rw-r--r--testing/mesa/LICENSE82
-rw-r--r--testing/mesa/PKGBUILD342
-rw-r--r--testing/mesa/gnome-shell-shader-fix.patch535
-rw-r--r--testing/pciutils/PKGBUILD30
-rw-r--r--testing/syslog-ng/PKGBUILD58
-rw-r--r--testing/syslog-ng/cap_syslog.patch101
-rw-r--r--testing/syslog-ng/syslog-ng.conf92
-rw-r--r--testing/syslog-ng/syslog-ng.logrotate7
-rwxr-xr-xtesting/syslog-ng/syslog-ng.rc39
-rw-r--r--testing/tzdata/Makefile.patch140
-rw-r--r--testing/tzdata/PKGBUILD40
-rw-r--r--testing/usbutils/PKGBUILD31
-rw-r--r--testing/xf86-input-acecad/PKGBUILD47
-rw-r--r--testing/xf86-input-aiptek/PKGBUILD47
-rw-r--r--testing/xf86-input-evdev/PKGBUILD31
-rw-r--r--testing/xf86-input-joystick/50-joystick.conf6
-rw-r--r--testing/xf86-input-joystick/LICENSE22
-rw-r--r--testing/xf86-input-joystick/PKGBUILD54
-rw-r--r--testing/xf86-input-keyboard/PKGBUILD26
-rw-r--r--testing/xf86-input-mouse/PKGBUILD26
-rw-r--r--testing/xf86-input-synaptics/10-synaptics.conf9
-rw-r--r--testing/xf86-input-synaptics/PKGBUILD39
-rw-r--r--testing/xf86-input-void/PKGBUILD47
-rw-r--r--testing/xf86-input-wacom/70-wacom.rules8
-rw-r--r--testing/xf86-input-wacom/PKGBUILD30
-rw-r--r--testing/xf86-video-apm/PKGBUILD26
-rw-r--r--testing/xf86-video-ark/PKGBUILD27
-rw-r--r--testing/xf86-video-ast/PKGBUILD25
-rw-r--r--testing/xf86-video-ati/PKGBUILD31
-rw-r--r--testing/xf86-video-ati/ati-fix-build-1.10.patch38
-rw-r--r--testing/xf86-video-chips/PKGBUILD28
-rw-r--r--testing/xf86-video-cirrus/LICENSE22
-rw-r--r--testing/xf86-video-cirrus/PKGBUILD28
-rw-r--r--testing/xf86-video-dummy/PKGBUILD26
-rw-r--r--testing/xf86-video-fbdev/PKGBUILD26
-rw-r--r--testing/xf86-video-glint/PKGBUILD26
-rw-r--r--testing/xf86-video-i128/PKGBUILD26
-rw-r--r--testing/xf86-video-i740/PKGBUILD26
-rw-r--r--testing/xf86-video-intel/PKGBUILD30
-rw-r--r--testing/xf86-video-intel/git-fixes.patch1209
-rw-r--r--testing/xf86-video-mach64/PKGBUILD29
-rw-r--r--testing/xf86-video-mach64/mach64-fix-pixmap.patch47
-rw-r--r--testing/xf86-video-mga/PKGBUILD27
-rw-r--r--testing/xf86-video-neomagic/PKGBUILD26
-rw-r--r--testing/xf86-video-nouveau/PKGBUILD41
-rw-r--r--testing/xf86-video-nouveau/xf86-video-nouveau.install16
-rw-r--r--testing/xf86-video-nv/PKGBUILD27
-rw-r--r--testing/xf86-video-openchrome/LICENSE.txt26
-rw-r--r--testing/xf86-video-openchrome/PKGBUILD35
-rw-r--r--testing/xf86-video-openchrome/drm_stdint.patch10
-rw-r--r--testing/xf86-video-openchrome/svn-r839.patch1447
-rw-r--r--testing/xf86-video-r128/LICENSE219
-rw-r--r--testing/xf86-video-r128/PKGBUILD29
-rw-r--r--testing/xf86-video-rendition/PKGBUILD28
-rw-r--r--testing/xf86-video-s3/LICENSE25
-rw-r--r--testing/xf86-video-s3/PKGBUILD29
-rw-r--r--testing/xf86-video-s3virge/LICENSE25
-rw-r--r--testing/xf86-video-s3virge/PKGBUILD29
-rw-r--r--testing/xf86-video-savage/PKGBUILD27
-rw-r--r--testing/xf86-video-siliconmotion/PKGBUILD28
-rw-r--r--testing/xf86-video-sis/PKGBUILD27
-rw-r--r--testing/xf86-video-sisusb/PKGBUILD26
-rw-r--r--testing/xf86-video-tdfx/LICENSE160
-rw-r--r--testing/xf86-video-tdfx/PKGBUILD29
-rw-r--r--testing/xf86-video-trident/PKGBUILD27
-rw-r--r--testing/xf86-video-tseng/PKGBUILD26
-rw-r--r--testing/xf86-video-unichrome/LICENSE23
-rw-r--r--testing/xf86-video-unichrome/PKGBUILD31
-rw-r--r--testing/xf86-video-unichrome/drm-include.patch11
-rw-r--r--testing/xf86-video-v4l/LICENSE826
-rw-r--r--testing/xf86-video-v4l/PKGBUILD27
-rw-r--r--testing/xf86-video-vesa/PKGBUILD26
-rw-r--r--testing/xf86-video-voodoo/PKGBUILD26
-rw-r--r--testing/xf86-video-xgi/PKGBUILD25
-rw-r--r--testing/xf86-video-xgixp/PKGBUILD25
-rw-r--r--testing/xorg-server/10-quirks.conf10
-rw-r--r--testing/xorg-server/PKGBUILD175
-rw-r--r--testing/xorg-server/xorg-redhat-die-ugly-pattern-die-die-die.patch16
-rw-r--r--testing/xorg-server/xvfb-run180
-rw-r--r--testing/xorg-server/xvfb-run.1282
-rw-r--r--testing/xz/PKGBUILD43
207 files changed, 11963 insertions, 0 deletions
diff --git a/testing/archboot/PKGBUILD b/testing/archboot/PKGBUILD
new file mode 100644
index 000000000..2c8035c77
--- /dev/null
+++ b/testing/archboot/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 110605 2011-02-20 16:37:56Z tpowa $
+# Maintainer : Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=archboot
+pkgver=2011.02
+pkgrel=2
+pkgdesc="Advanced, modular arch boot/install image creation utility"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.archlinux.org/"
+depends=('mkinitcpio>=0.6.8-1' 'mksyslinux>=2010.08-1' 'mkpxelinux>=2010.08-1' 'mkisolinux>=2010.08-1' 'initscripts>=2011.02.1-1' 'subversion>=1.6.15-1' 'wget>=1.12-4' 'bash>=4.2-1' 'coreutils>=8.10-1' 'cryptsetup>=1.2.0-1' 'dialog>=1.1_20110118-1' 'e2fsprogs>=1.41.14-1' 'findutils>=4.4.2-3' 'gawk>=3.1.8-2' 'grep>=2.7-1' 'iputils>=20101006-1' 'jfsutils>=1.1.14-2' 'less>=436-2' 'lvm2>=2.02.84-1' 'mdadm>=3.1.4-1' 'module-init-tools>=3.12-2' 'nano>=2.2.6-1' 'ncurses>=5.7-4' 'net-tools>=1.60-14' 'gnu-netcat>=0.7.1-3' 'ntfsprogs>=2.0.0-4' 'pcmciautils>=017-1' 'procps>=3.2.8-3' 'psmisc>=22.13-1' 'reiserfsprogs>=3.6.21-3' 'sed>=4.2.1-3' 'snarf>=7.0-4' 'syslog-ng>=3.2.2-1' 'sysvinit>=2.88-2' 'tar>=1.25-1' 'util-linux-ng>=2.18-4' 'which>=2.20-4' 'kbd>=1.15.2-1' 'wireless_tools>=29-4' 'xfsprogs>=3.1.4-1' 'dnsutils>=9.7.2.P3-1' 'hdparm>=9.36-1' 'memtest86+>=4.20-1' 'inetutils>=1.8-2' 'openssh>=5.8p1-1' 'hwdetect>=2010.08-1' 'shadow>=4.1.4.2-4' 'bridge-utils>=1.4-3' 'ifenslave>=1.1.0-6' 'cpufrequtils>=008-1' 'links>=2.3pre1-1' 'tcp_wrappers>=7.6-12' 'dosfstools>=3.0.10-1' 'glibc>=2.13-4' 'linux-api-headers>=2.6.37-1' 'kernel26>=2.6.37.1-1' 'kernel26-lts>=2.6.32.29-2' 'xinetd>=2.3.14-6' 'kexec-tools>=2.0.2-3' 'ppp>=2.4.5-2' 'rp-pppoe>=3.10-5' 'lilo>=23.1-2' 'iptables>=1.4.10-1' 'capi4k-utils>=050718-7' 'isdn4k-utils>=3.2p1-6' 'ntfs-3g>=2011.1.15-1' 'pciutils>=3.1.7-3' 'usbutils>=001-2' 'vpnc>=0.5.3-3' 'openvpn>=2.1.4-1' 'b43-fwcutter>=013-2' 'wpa_supplicant>=0.7.3-1' 'rsync>=3.0.7-2' 'gzip>=1.4-2' 'libarchive>=2.8.4-2' 'device-mapper>=2.02.84-1' 'screen>=4.0.3-10' 'elfutils>=0.151-1' 'pam>=1.1.3-1' 'cracklib>=2.8.18-1' 'nfs-utils>=1.2.2-6' 'nfsidmap>=0.24-1' 'readline>=6.2-1' 'acl>=2.2.49-2' 'attr>=2.4.44-2' 'pcre>=8.12-1' 'cpio>=2.11-2' 'fuse>=2.8.5-1' 'libusb>=1.0.8-1' 'vim>=7.3.125-1' 'lzo2>=2.04-1' 'libsasl>=2.1.23-5' 'libldap>=2.4.24-1' 'gpm>=1.20.6-6' 'libevent>=2.0.10-1' 'gcc-libs>=4.5.2-6' 'sdparm>=1.06-1' 'licenses>=2.6-1' 'pptpclient>=1.7.2-3' 'ndiswrapper>=1.56-7' 'ndiswrapper-utils>=1.56-2' 'zd1211-firmware>=1.4-4' 'ipw2100-fw>=1.3-5' 'ipw2200-fw>=3.1-3' 'smbclient>=3.5.6-1' 'bittorrent>=5.2.2-4' 'dhcpcd>=5.2.10-1' 'openssl>=1.0.0.d-1' 'git>=1.7.4.1-1' 'dmraid>=1.0.0.rc16+CVS-2' 'linux-atm>=2.5.1-2' 'netcfg>=2.5.4-1' 'tiacx>=20080210-19' 'tiacx-firmware>=2-3' 'parted>=2.3-1' 'tzdata>=2011b-1' 'ntp>=4.2.6.p3-1' 'libgcrypt>=1.4.6-1' 'iw>=0.9.20-1' 'crda>=1.1.1-1' 'libnl>=1.1-2' 'iproute2>=2.6.37-1' 'wireless-regdb>=2010.11.24-1' 'v86d>=0.1.9-11' 'dhclient>=4.2.0.2-1' 'syslinux>=4.03-2' 'mtools>=4.0.15-1' 'fsarchiver>=0.6.12-1' 'xz>=5.0.1-1' 'libtirpc>=0.2.1-2' 'librpcsecgss>=0.19-4' 'rpcbind>=0.2.0-3' 'testdisk>=6.11.3-3' 'wipe>=2.3.1-1' 'clamav>=0.97-1' 'ddrescue>=1.14-1' 'udev>=166-2' 'ifplugd>=0.28-7' 'wpa_actiond>=1.1-1' 'nouveau-firmware>=20091212-4' 'rfkill>=0.4-2' 'libgssglue>=0.1-3' 'mkinitcpio-nfs-utils>=0.2-1' 'gdisk>=0.6.14-1' 'nilfs-utils>=2.0.21-1' 'btrfs-progs-unstable>=0.19.20101006-1' 'ndiswrapper-lts>=1.56-3' 'nouveau-drm-lts>=0.0.16_20100313-4' 'linux-firmware>=20110201-1' 'iana-etc>=2.30-1' 'libusb-compat>=0.1.3-1')
+optdepends=('grub2-bios: for grub2 support'
+ 'grub2-efi-i386:for grub2 support'
+ 'grub2-efi-x86_64: for grub2 support'
+ 'efibootmgr: for grub2 support'
+)
+source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver-$pkgrel.tar.bz2 vmware-detect.c)
+backup=('etc/archboot/allinone.conf'
+ 'etc/archboot/allinone-lts.conf'
+ 'etc/archboot/default.conf'
+ 'etc/archboot/default-ftp.conf'
+ 'etc/archboot/default-pxelinux.conf'
+ 'etc/archboot/default-ftp-pxelinux.conf'
+ 'etc/archboot/presets/allinone'
+ 'etc/archboot/presets/allinone-lts'
+ 'etc/archboot/presets/isolinux'
+ 'etc/archboot/presets/isolinux-ftp'
+ 'etc/archboot/presets/syslinux'
+ 'etc/archboot/presets/syslinux-ftp'
+ 'etc/archboot/presets/pxelinux'
+ 'etc/archboot/presets/pxelinux-ftp'
+)
+install=archboot.install
+
+### to bump the depends list use this:
+#for i in $(grep ^depends= PKGBUILD | sed -e 's/depends=(//g' -e 's/)//g'); do sed -i -e "s/$(echo $i)/$(echo $i | sed -e "s/>=.*/>=$(pacman -Qi $(echo $i | sed -e "s/'//g" -e 's/>=.*//g') | grep ^Version | sed -e 's/.*: //g')'/g")/g" PKGBUILD; done
+
+build()
+{
+ cd $srcdir/$pkgname-$pkgver-$pkgrel
+ mv * $pkgdir/
+ # vmware-detect
+ cd $startdir/src
+ gcc -o vmware-detect vmware-detect.c
+ install -D -m 755 vmware-detect $startdir/pkg/usr/bin/vmware-detect
+}
+md5sums=('608c6e8f30c159f345c08eee6842f17c'
+ '7e2b03463747cb22ab388e79a09fa0cb')
diff --git a/testing/archboot/archboot.install b/testing/archboot/archboot.install
new file mode 100644
index 000000000..315f97d7e
--- /dev/null
+++ b/testing/archboot/archboot.install
@@ -0,0 +1,20 @@
+# This is a default template for a post-install scriptlet. You can
+# remove any functions you don't need (and this header).
+
+# arg 1: the new package version
+post_install() {
+ cat << EOF
+ARCHBOOT usage:
+---------------
+--> Main config files were installed to '/etc/archboot/'.
+ Preset files were installed to '/etc/archboot/presets'.
+ Modify them to your needs.
+--> Use the preset files as config file of your build tool:
+ mkisolinux, mksyslinux or mkpxelinux
+--> For Allinone ISOs use archboot-allinone.sh
+EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
diff --git a/testing/archboot/vmware-detect.c b/testing/archboot/vmware-detect.c
new file mode 100644
index 000000000..d242a388d
--- /dev/null
+++ b/testing/archboot/vmware-detect.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+int main() {
+ unsigned char idtr[6];
+ asm("sidt %0" : "=m" (idtr));
+ if(0xff==idtr[5])
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
diff --git a/testing/aufs2-util/PKGBUILD b/testing/aufs2-util/PKGBUILD
new file mode 100644
index 000000000..3d2e23fed
--- /dev/null
+++ b/testing/aufs2-util/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 114820 2011-03-16 06:31:06Z tpowa $
+# Contributor: Paul Mattal <paul@mattal.com>
+# Maintainer: Paul Mattal <pjmattal@elys.com>
+pkgname=aufs2-util
+pkgver=20110314
+pkgrel=1
+pkgdesc="Another Unionfs Implementation that supports NFS branches"
+arch=('i686' 'x86_64')
+url="http://aufs.sourceforge.net/"
+license=('GPL2')
+depends=('glibc')
+makedepends=('aufs2>=2.6.38_20110314' 'kernel26-headers')
+replaces=('aufs-utils')
+source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.gz")
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+}
+md5sums=('bf0f9c86361e12a3181fb3891e57cd8d')
diff --git a/testing/aufs2-util/create-tarball.sh b/testing/aufs2-util/create-tarball.sh
new file mode 100755
index 000000000..361cbbc38
--- /dev/null
+++ b/testing/aufs2-util/create-tarball.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+GITSNAPSHOT=20110314
+# aufs2 (no -xx) for the latest -rc version.
+git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-util.git aufs2-util.git
+cd aufs2-util.git
+#git checkout origin/aufs2${AUFS2VERSION}
+git checkout origin/aufs2.1
+cd ..
+rm -rf aufs2-util-${GITSNAPSHOT}
+cp -a aufs2-util.git aufs2-util-${GITSNAPSHOT}
+tar -czf aufs2-util-${GITSNAPSHOT}.tar.gz --exclude=.git aufs2-util-${GITSNAPSHOT}
diff --git a/testing/binutils/PKGBUILD b/testing/binutils/PKGBUILD
new file mode 100644
index 000000000..fa5a47b64
--- /dev/null
+++ b/testing/binutils/PKGBUILD
@@ -0,0 +1,83 @@
+# $Id: PKGBUILD 116976 2011-03-27 06:07:38Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+
+pkgname=binutils
+pkgver=2.21
+pkgrel=6
+_date=20110326
+pkgdesc="A set of programs to assemble and manipulate binary and object files"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/binutils/"
+license=('GPL')
+groups=('base')
+depends=('glibc>=2.13' 'zlib')
+makedepends=('dejagnu')
+options=('!libtool' '!distcc' '!ccache')
+install=binutils.install
+source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2)
+md5sums=('884dcbc87d4722b152aea72312356da1')
+
+mksource() {
+ mkdir ${pkgname}-${_date}
+ cd ${pkgname}-${_date}
+ export _TAG=binutils-2_21-branch
+ export 'CVSROOT=:pserver:anoncvs@sourceware.org:/cvs/src'
+ cvs -z9 co -r $_TAG binutils || return 1
+ mv src binutils
+ tar -cvjf ../binutils-${pkgver}_${_date}.tar.bz2 binutils/*
+}
+
+build() {
+ cd ${srcdir}
+ mkdir binutils-build && cd binutils-build
+
+ [[ $CARCH == "x86_64" ]] && CONFIGFLAG="--enable-64-bit-bfd --disable-multilib"
+
+ ${srcdir}/binutils/configure --prefix=/usr \
+ --enable-ld=default --enable-gold \
+ --enable-plugins --enable-threads \
+ --enable-shared $CONFIGFLAG
+
+ # This checks the host environment and makes sure all the necessary tools are available to compile Binutils.
+ make configure-host
+
+ make tooldir=${pkgdir}/usr
+}
+
+check() {
+ cd ${srcdir}/binutils-build
+
+ # do not abort on errors - manually check log files
+ make -k -j1 check || true
+}
+
+package() {
+ cd ${srcdir}/binutils-build
+ make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
+
+ # Add some useful headers
+ install -m644 ${srcdir}/binutils/include/libiberty.h ${pkgdir}/usr/include
+ install -m644 ${srcdir}/binutils/include/demangle.h ${pkgdir}/usr/include
+
+ # Rebuild libiberty.a with -fPIC
+ make -C libiberty clean
+ make CFLAGS="$CFLAGS -fPIC" -C libiberty
+ install -m644 libiberty/libiberty.a ${pkgdir}/usr/lib
+
+ # Rebuild libbfd.a with -fPIC
+ make -C bfd clean
+ # hidden visability prevent 3rd party shared libraries exporting bfd non-stable API
+ make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd
+ install -m644 bfd/libbfd.a ${pkgdir}/usr/lib
+
+ # Remove Windows/Novell specific man pages
+ rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
+
+ # Remove these symlinks, they are not ABI stable.
+ # Programs should compile static to the .a file.
+ rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
+ echo "INPUT ( /usr/lib/libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so
+ echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so
+}
diff --git a/testing/binutils/binutils.install b/testing/binutils/binutils.install
new file mode 100644
index 000000000..8bf9f3a47
--- /dev/null
+++ b/testing/binutils/binutils.install
@@ -0,0 +1,17 @@
+infodir=usr/share/info
+filelist=(as.info bfd.info binutils.info configure.info gprof.info ld.info standards.info)
+
+post_upgrade() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
diff --git a/testing/cloog/PKGBUILD b/testing/cloog/PKGBUILD
new file mode 100644
index 000000000..82049f36d
--- /dev/null
+++ b/testing/cloog/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 106802 2011-01-19 09:43:37Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+pkgname=cloog
+pkgver=0.16.1
+pkgrel=1
+pkgdesc="Library that generates loops for scanning polyhedra"
+arch=('i686' 'x86_64')
+url="http://www.bastoul.net/cloog/"
+license=('GPL')
+depends=('isl' 'gmp')
+conflicts=('cloog-ppl<0.15.10-2')
+options=('!libtool')
+source=(http://www.bastoul.net/cloog/pages/download/$pkgname-$pkgver.tar.gz)
+md5sums=('947123350d1ff6dcb4b0774947ac015a')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --with-isl=system --with-gmp=system
+ make
+ make check
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install
+}
diff --git a/testing/crda/PKGBUILD b/testing/crda/PKGBUILD
new file mode 100644
index 000000000..18a85717c
--- /dev/null
+++ b/testing/crda/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 117670 2011-04-04 15:42:36Z stephane $
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+
+pkgname=crda
+pkgver=1.1.1
+pkgrel=3
+pkgdesc="Central Regulatory Domain Agent for wireless networks"
+arch=(i686 x86_64)
+url="http://wireless.kernel.org/en/developers/Regulatory/CRDA"
+license=('custom')
+depends=('wireless-regdb' 'libnl' 'libgcrypt' 'udev' 'iw')
+makedepends=('python-m2crypto')
+install=crda.install
+source=(http://wireless.kernel.org/download/crda/${pkgname}-${pkgver}.tar.bz2
+ crda.rc)
+md5sums=('5fc77af68b3e21736b8ef2f8b061c810'
+ '014eef3f8655e9a130064ec6891317fc')
+
+build() {
+ msg "Compiling crda ..."
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ sed 's|^#!/usr/bin/env python|#!/usr/bin/python2|' -i utils/key2pub.py
+ make crda regdbdump
+}
+
+package() {
+ # Install crda, regdbdump and udev rules
+ msg "Installing crda ..."
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+ # This rule automatically sets the regulatory domain when cfg80211 is loaded
+ echo 'ACTION=="add" SUBSYSTEM=="module", DEVPATH=="/module/cfg80211", RUN+="/etc/rc.d/wireless-regdom start >/dev/null"' >> "${pkgdir}"/lib/udev/rules.d/85-regulatory.rules
+
+ msg "Installing license ..."
+ install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE "${pkgdir}"/usr/share/licenses/crda/LICENSE
+
+ msg "Installing boot script ..."
+ install -D -m755 "${srcdir}"/crda.rc "${pkgdir}"/etc/rc.d/wireless-regdom
+}
diff --git a/testing/crda/crda.install b/testing/crda/crda.install
new file mode 100644
index 000000000..c18e15f71
--- /dev/null
+++ b/testing/crda/crda.install
@@ -0,0 +1,18 @@
+## arg 1: the new package version
+post_install() {
+ echo "Uncomment the right regulatory domain in /etc/conf.d/wireless-regdom."
+ echo "It will automatically be set when necessary."
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ # In an upgrade from 1.0.1-1 or older, the wireless-regdom file moves from the crda package
+ # to the new wireless-regdb package. If the user changed the file, it is save to overwrite the one
+ # from wireless-regdb by the user-defined one
+ if [ $(vercmp $2 1.0.1-2) -lt 0 ]; then
+ if [ -f /etc/conf.d/wireless-regdom.pacorig -a -n "$(grep -v ^# /etc/conf.d/wireless-regdom.pacorig 2>/dev/null | grep -v ^$)" ]; then
+ mv /etc/conf.d/wireless-regdom.pacorig /etc/conf.d/wireless-regdom
+ fi
+ fi
+}
diff --git a/testing/crda/crda.rc b/testing/crda/crda.rc
new file mode 100755
index 000000000..13dbd870e
--- /dev/null
+++ b/testing/crda/crda.rc
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/wireless-regdom
+
+case "$1" in
+ start)
+ if [ -n "${WIRELESS_REGDOM}" ]; then
+ stat_busy "Setting wireless regulatory domain: ${WIRELESS_REGDOM}"
+ if iw reg set ${WIRELESS_REGDOM}; then
+ stat_done
+ else
+ stat_fail
+ fi
+ fi
+ ;;
+ stop)
+ ;;
+ restart)
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 start"
+esac
+exit 0
diff --git a/testing/dmraid/PKGBUILD b/testing/dmraid/PKGBUILD
new file mode 100644
index 000000000..118b43474
--- /dev/null
+++ b/testing/dmraid/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 116764 2011-03-25 20:30:44Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+#Contributor: Urs Wolfer <uwolfer @ fwo.ch>
+
+pkgname=dmraid
+pkgver=1.0.0.rc16.3
+pkgrel=1
+pkgdesc="Device mapper RAID interface"
+url="http://people.redhat.com/~heinzm/sw/dmraid/"
+depends=('device-mapper>=2.0.54')
+arch=('i686' 'x86_64')
+license=('GPL')
+source=(#ftp://ftp.archlinux.org/other/dmraid/$pkgname-$pkgver.tar.bz2
+ http://people.redhat.com/~heinzm/sw/dmraid/src/$pkgname-1.0.0.rc16-3.tar.bz2
+ dmraid_install
+ dmraid_hook)
+install=dmraid.install
+md5sums=('819338fcef98e8e25819f0516722beeb'
+ 'd01908b414e1686c0f3233ff37de78a5'
+ '0a748b6e78b156f2f9dda45fc629651f')
+
+build() {
+ cd "$srcdir"/$pkgname/1.0.0.rc16-3/$pkgname
+ ./configure --enable-led --enable-intel_led
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname/1.0.0.rc16-3/$pkgname
+ make DESTDIR="$pkgdir" prefix=/ libdir=/lib mandir=/usr/share/man includedir=/usr/include install
+ mkdir -p "$pkgdir"/var/lock/dmraid
+ chmod 1777 "$pkgdir"/var/lock/
+ install -D -m644 "$srcdir"/dmraid_install "$pkgdir"/lib/initcpio/install/dmraid
+ install -D -m644 "$srcdir"/dmraid_hook "$pkgdir"/lib/initcpio/hooks/dmraid
+ # fix permissions
+ chmod 644 "$pkgdir"/lib/libdmraid.a
+ chmod 644 "$pkgdir"/usr/include/dmraid/*
+}
diff --git a/testing/dmraid/dmraid.install b/testing/dmraid/dmraid.install
new file mode 100644
index 000000000..64899e785
--- /dev/null
+++ b/testing/dmraid/dmraid.install
@@ -0,0 +1,14 @@
+post_upgrade() {
+ if [ "$(vercmp $2 1.0.0.rc15)" -lt 0 ]; then
+ # important upgrade notice
+ echo ">>>"
+ echo ">>> IMPORTANT DMRAID UPGRADE NOTICE"
+ echo ">>> -------------------------------"
+ echo ">>> Version 1.0.0.rc15 and greater introduce a new name scheme:"
+ echo ">>> You need to add an additional 'p' in front of your number."
+ echo ">>> e.g. <yourname><number> --> <yourname>p<number>"
+ echo ">>> firsthd1 --> firsthdp1"
+ echo ">>> Please change your bootloader and fstab accordingly."
+ echo ">>>"
+ fi
+}
diff --git a/testing/dmraid/dmraid_hook b/testing/dmraid/dmraid_hook
new file mode 100644
index 000000000..d4e758c34
--- /dev/null
+++ b/testing/dmraid/dmraid_hook
@@ -0,0 +1,18 @@
+# vim: set ft=sh:
+run_hook ()
+{
+ /sbin/modprobe -q dm-mod >/dev/null 2>&1
+ /sbin/modprobe -q dm-mirror >/dev/null 2>&1
+ if [ -e "/sys/class/misc/device-mapper" ]; then
+ if [ ! -e "/dev/mapper/control" ]; then
+ /bin/mknod "/dev/mapper/control" c $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |')
+ fi
+ msg ":: Activating dmraid arrays..."
+ # prevent any event monitoring calls with -I
+ if [ "${quiet}" = "y" ]; then
+ /sbin/dmraid -ay -I -Z >/dev/null
+ else
+ /sbin/dmraid -ay -I -Z
+ fi
+ fi
+}
diff --git a/testing/dmraid/dmraid_install b/testing/dmraid/dmraid_install
new file mode 100644
index 000000000..a20960aed
--- /dev/null
+++ b/testing/dmraid/dmraid_install
@@ -0,0 +1,20 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" dm-mod dm-mirror "
+ BINARIES="/sbin/dmraid /sbin/dmsetup"
+ FILES=""
+ SCRIPT="dmraid"
+ add_dir "/dev/mapper"
+ add_file "/lib/udev/rules.d/10-dm.rules"
+ add_file "/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/lib/udev/rules.d/95-dm-notify.rules"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for a dmraid root device.
+HELPEOF
+}
diff --git a/testing/gcc/PKGBUILD b/testing/gcc/PKGBUILD
new file mode 100644
index 000000000..d3a6dcdc9
--- /dev/null
+++ b/testing/gcc/PKGBUILD
@@ -0,0 +1,255 @@
+# $Id: PKGBUILD 116981 2011-03-27 06:16:42Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+# NOTE: libtool requires rebuilt with each new gcc version
+
+pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
+pkgver=4.6.0
+pkgrel=1
+#_snapshot=4.6.0-RC-20110321
+_libstdcppmanver=20110201 # Note: check source directory name when updating this
+pkgdesc="The GNU Compiler Collection"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL' 'custom')
+url="http://gcc.gnu.org"
+makedepends=('binutils>=2.21' 'libmpc' 'cloog' 'ppl' 'gcc-ada' 'dejagnu')
+options=('!libtool' '!emptydirs')
+source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc,ada,go,testsuite}-${pkgver}.tar.bz2
+ #ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-{core,g++,fortran,objc,ada,go,testsuite}-${_snapshot}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
+ gcc_pure64.patch
+ gcc-hash-style-both.patch)
+md5sums=('b1957f3209080b2f55bc3756d3a62b7c'
+ 'a30090fa655d0db4c970740d353c81f1'
+ 'a4687a9035c3e92db7e84fc01fc548ef'
+ '120d4675366ee82ea52f9ed65b57da04'
+ 'ea003fee5123f5bfbe17cc569cffe867'
+ 'c182dfcad477564af9d94e2aa1552bcd'
+ '8c76d751c5b99560e8acc3111f62263a'
+ '1e9fd2eaf0ee47ea64e82c48998f1999'
+ '4030ee1c08dd1e843c0225b772360e76'
+ '4df25b623799b148a0703eaeec8fdf3f')
+
+if [ -n "${_snapshot}" ]; then
+ _basedir="${srcdir}/gcc-${_snapshot}"
+else
+ _basedir="${srcdir}/gcc-${pkgver}"
+fi
+
+build() {
+ cd ${_basedir}
+
+ # Do not install libiberty
+ sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ if [ "${CARCH}" = "x86_64" ]; then
+ patch -Np1 -i ${srcdir}/gcc_pure64.patch
+ fi
+ patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
+
+ echo ${pkgver} > gcc/BASE-VER
+
+ cd ${srcdir}
+ mkdir gcc-build && cd gcc-build
+
+ ${_basedir}/configure --prefix=/usr \
+ --libdir=/usr/lib --libexecdir=/usr/lib \
+ --mandir=/usr/share/man --infodir=/usr/share/info \
+ --with-bugurl=https://bugs.archlinux.org/ \
+ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
+ --enable-shared --enable-threads=posix \
+ --with-system-zlib --enable-__cxa_atexit \
+ --disable-libunwind-exceptions --enable-clocale=gnu \
+ --enable-gnu-unique-object --enable-linker-build-id \
+ --with-ppl --enable-cloog-backend=isl \
+ --enable-lto --enable-gold --enable-ld=default \
+ --enable-plugin --with-plugin-ld=ld.gold \
+ --disable-multilib --disable-libstdcxx-pch \
+ --enable-checking=release
+ make
+}
+
+check() {
+ cd gcc-build
+
+ # increase stack size to prevent test failures
+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827
+ ulimit -s 32768
+
+ # do not abort on error as some are "expected"
+ make -k check || true
+ ${_basedir}/contrib/test_summary
+}
+
+package_gcc-libs()
+{
+ pkgdesc="Runtime libraries shipped by GCC"
+ groups=('base')
+ depends=('glibc>=2.11.1-2')
+ install=gcc-libs.install
+
+ cd gcc-build
+ make -j1 -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
+ for lib in libmudflap libgomp libssp libstdc++-v3/src; do
+ make -j1 -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
+ done
+ make -j1 -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
+ make -j1 -C $CHOST/libgomp DESTDIR=${pkgdir} install-info
+
+ make -j1 DESTDIR=${pkgdir} install-target-libquadmath
+ make -j1 DESTDIR=${pkgdir} install-target-libgfortran
+ make -j1 DESTDIR=${pkgdir} install-target-libobjc
+
+ # remove unnecessary files installed by install-target-{libquadmath,libgfortran,libobjc}
+ rm -rf ${pkgdir}/usr/lib/{gcc/,libgfortran.spec}
+
+ # remove static libraries
+ find ${pkgdir} -name *.a -delete
+
+ # Install Runtime Library Exception
+ install -Dm644 ${_basedir}/COPYING.RUNTIME \
+ ${pkgdir}/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION
+}
+
+package_gcc()
+{
+ pkgdesc="The GNU Compiler Collection - C and C++ frontends"
+ depends=('binutils>=2.20.1' 'libmpc>=0.8.1-2' 'cloog' 'ppl')
+ groups=('base-devel')
+ install=gcc.install
+
+ cd gcc-build
+
+ # unfortunately it is much, much easier to install the lot and clean-up the mess...
+ make -j1 DESTDIR=${pkgdir} install
+ rm $pkgdir/usr/bin/{{$CHOST-,}gfortran,{$CHOST-,}gccgo,gnat*}
+ rm $pkgdir/usr/lib/*.so*
+ rm $pkgdir/usr/lib/lib{ffi,gfortran,go{,begin},objc,quadmath}.a
+ rm $pkgdir/usr/lib/libgfortran.spec
+ rm -r $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{ada{include,lib},finclude,include/objc}
+ rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/{ffi{,target}.h,quadmath{,_weak}.h}
+ rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1,libgfortranbegin.a}
+ rm -r $pkgdir/usr/lib/go
+ rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath}.info
+ rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
+ rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1
+ rm $pkgdir/usr/share/man/man3/ffi*
+
+ # many packages require these symlinks
+ install -dm755 ${pkgdir}/lib
+ ln -sf /usr/bin/cpp ${pkgdir}/lib/cpp
+ ln -sf gcc ${pkgdir}/usr/bin/cc
+ ln -sf g++ ${pkgdir}/usr/bin/c++
+
+ # POSIX conformance launcher scripts for c89 and c99
+ cat > $pkgdir/usr/bin/c89 <<"EOF"
+#!/bin/sh
+fl="-std=c89"
+for opt; do
+ case "$opt" in
+ -ansi|-std=c89|-std=iso9899:1990) fl="";;
+ -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
+EOF
+
+ cat > $pkgdir/usr/bin/c99 <<"EOF"
+#!/bin/sh
+fl="-std=c99"
+for opt; do
+ case "$opt" in
+ -std=c99|-std=iso9899:1999) fl="";;
+ -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
+EOF
+
+ chmod 755 $pkgdir/usr/bin/c{8,9}9
+
+ # install the libstdc++ man pages
+ install -dm755 ${pkgdir}/usr/share/man/man3
+ install -m644 ${srcdir}/man/man3/* ${pkgdir}/usr/share/man/man3/
+
+ # Install Runtime Library Exception
+ install -Dm644 ${_basedir}/COPYING.RUNTIME \
+ ${pkgdir}/usr/share/licenses/gcc/RUNTIME.LIBRARY.EXCEPTION
+}
+
+package_gcc-fortran()
+{
+ pkgdesc="Fortran front-end for GCC"
+ depends=("gcc=$pkgver-$pkgrel")
+ install=gcc-fortran.install
+
+ cd gcc-build
+ make -j1 DESTDIR=${pkgdir} install-target-libquadmath
+ make -j1 DESTDIR=$pkgdir install-target-libgfortran
+ make -j1 -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
+ make -j1 -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
+ install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/f951
+
+ # remove libraries included in gcc-libs
+ rm ${pkgdir}/usr/lib/lib{gfortran,quadmath}.so*
+ rm ${pkgdir}/usr/share/info/libquadmath.info
+
+ # Install Runtime Library Exception
+ install -Dm644 ${_basedir}/COPYING.RUNTIME \
+ ${pkgdir}/usr/share/licenses/gcc-fortran/RUNTIME.LIBRARY.EXCEPTION
+}
+
+package_gcc-objc()
+{
+ pkgdesc="Objective-C front-end for GCC"
+ depends=("gcc=$pkgver-$pkgrel")
+
+ cd gcc-build
+ make -j1 DESTDIR=$pkgdir install-target-libobjc
+ install -dm755 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
+ install -m755 gcc/cc1obj{,plus} $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
+
+ # remove libraries included in gcc-libs
+ rm ${pkgdir}/usr/lib/libobjc.so*
+
+ # Install Runtime Library Exception
+ install -Dm644 ${_basedir}/COPYING.RUNTIME \
+ ${pkgdir}/usr/share/licenses/gcc-objc/RUNTIME.LIBRARY.EXCEPTION
+}
+
+package_gcc-ada()
+{
+ pkgdesc="Ada front-end for GCC (GNAT)"
+ depends=("gcc=$pkgver-$pkgrel")
+ install=gcc-ada.install
+
+ cd gcc-build/gcc
+ make -j1 DESTDIR=$pkgdir ada.install-{common,info}
+ install -m755 gnat1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver
+
+ # Install Runtime Library Exception
+ install -Dm644 ${_basedir}/COPYING.RUNTIME \
+ ${pkgdir}/usr/share/licenses/gcc-ada/RUNTIME.LIBRARY.EXCEPTION
+}
+
+package_gcc-go()
+{
+ pkgdesc="Go front-end for GCC"
+ depends=("gcc=$pkgver-$pkgrel")
+ install=gcc-go.install
+
+ cd gcc-build
+ make -j1 DESTDIR=$pkgdir install-target-libgo
+ make -j1 -C gcc DESTDIR=$pkgdir go.install-{common,man,info}
+ install -Dm755 gcc/go1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/go1
+
+ # Install Runtime Library Exception
+ install -Dm644 ${_basedir}/COPYING.RUNTIME \
+ ${pkgdir}/usr/share/licenses/gcc-go/RUNTIME.LIBRARY.EXCEPTION
+}
diff --git a/testing/gcc/gcc-ada.install b/testing/gcc/gcc-ada.install
new file mode 100644
index 000000000..df0553a4f
--- /dev/null
+++ b/testing/gcc/gcc-ada.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(gnat-style.info gnat_rm.info gnat_ugn.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/gcc/gcc-fortran.install b/testing/gcc/gcc-fortran.install
new file mode 100644
index 000000000..b15d89a97
--- /dev/null
+++ b/testing/gcc/gcc-fortran.install
@@ -0,0 +1,16 @@
+infodir=usr/share/info
+file="gfortran.info"
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+}
diff --git a/testing/gcc/gcc-go.install b/testing/gcc/gcc-go.install
new file mode 100644
index 000000000..7dc50dee5
--- /dev/null
+++ b/testing/gcc/gcc-go.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(gccgo.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/gcc/gcc-hash-style-both.patch b/testing/gcc/gcc-hash-style-both.patch
new file mode 100644
index 000000000..8b59f4535
--- /dev/null
+++ b/testing/gcc/gcc-hash-style-both.patch
@@ -0,0 +1,122 @@
+--- gcc/config/alpha/linux-elf.h.orig 2010-12-09 23:27:07.000000000 +1000
++++ gcc/config/alpha/linux-elf.h 2011-03-11 10:01:47.770000457 +1000
+@@ -41,7 +41,7 @@
+
+ #define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER
+
+-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
++#define LINK_SPEC "-m elf64alpha --hash-style=both %{G*} %{relax:-relax} \
+ %{O*:-O3} %{!O*:-O1} \
+ %{shared:-shared} \
+ %{!shared: \
+--- gcc/config/i386/linux64.h.orig 2011-03-03 08:35:36.000000000 +1000
++++ gcc/config/i386/linux64.h 2011-03-11 10:01:47.770000457 +1000
+@@ -78,7 +78,7 @@
+ %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \
++#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \
+ %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+--- gcc/config/i386/linux.h.orig 2011-01-15 04:45:06.000000000 +1000
++++ gcc/config/i386/linux.h 2011-03-11 10:01:47.770000457 +1000
+@@ -104,7 +104,7 @@
+ { "dynamic_linker", LINUX_DYNAMIC_LINKER }
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
++#define LINK_SPEC "-m %(link_emulation) --hash-style=both %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+--- gcc/config/ia64/linux.h.orig 2010-12-09 23:27:07.000000000 +1000
++++ gcc/config/ia64/linux.h 2011-03-11 10:01:47.770000457 +1000
+@@ -64,7 +64,7 @@
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "\
++#define LINK_SPEC "--hash-style=both \
+ %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+--- gcc/config/rs6000/linux64.h.orig 2011-02-11 03:30:10.000000000 +1000
++++ gcc/config/rs6000/linux64.h 2011-03-11 10:03:34.280000457 +1000
+@@ -389,11 +389,11 @@
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
+
+
+-#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
++#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}"
+
+-#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
++#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=both %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ -dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}"
+
+--- gcc/config/rs6000/sysv4.h.orig 2011-01-28 04:36:03.000000000 +1000
++++ gcc/config/rs6000/sysv4.h 2011-03-11 10:01:47.773333792 +1000
+@@ -830,7 +830,7 @@
+ #define LINUX_DYNAMIC_LINKER \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
+
+-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
++#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ -dynamic-linker " LINUX_DYNAMIC_LINKER "}}"
+
+--- gcc/config/s390/linux.h.orig 2010-12-09 23:27:07.000000000 +1000
++++ gcc/config/s390/linux.h 2011-03-11 10:01:47.770000457 +1000
+@@ -77,7 +77,7 @@
+
+ #undef LINK_SPEC
+ #define LINK_SPEC \
+- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=both \
+ %{shared:-shared} \
+ %{!shared: \
+ %{static:-static} \
+--- gcc/config/sparc/linux64.h.orig 2011-02-17 23:57:21.000000000 +1000
++++ gcc/config/sparc/linux64.h 2011-03-11 10:01:47.770000457 +1000
+@@ -113,7 +113,7 @@
+ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
+ { "link_arch", LINK_ARCH_SPEC },
+
+-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,%R/usr/lib %{shared:-shared} \
++#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=both -Y P,%R/usr/lib %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+@@ -121,7 +121,7 @@
+ %{static:-static}} \
+ "
+
+-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
++#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=both -Y P,%R/usr/lib64 %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+@@ -193,7 +193,7 @@
+ #else /* !SPARC_BI_ARCH */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc --hash-style=both -Y P,%R/usr/lib64 %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+--- gcc/config/sparc/linux.h.orig 2011-01-27 06:30:12.000000000 +1000
++++ gcc/config/sparc/linux.h 2011-03-11 10:01:47.770000457 +1000
+@@ -74,7 +74,7 @@
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_SPEC "-m elf32_sparc --hash-style=both -Y P,/usr/lib %{shared:-shared} \
+ %{!mno-relax:%{!r:-relax}} \
+ %{!shared: \
+ %{!static: \
diff --git a/testing/gcc/gcc-libs.install b/testing/gcc/gcc-libs.install
new file mode 100644
index 000000000..23553b8f0
--- /dev/null
+++ b/testing/gcc/gcc-libs.install
@@ -0,0 +1,16 @@
+infodir=usr/share/info
+filelist=(libgomp.info libquadmath.info)
+
+post_upgrade() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/gcc/gcc.install b/testing/gcc/gcc.install
new file mode 100644
index 000000000..3407a5e1f
--- /dev/null
+++ b/testing/gcc/gcc.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(cpp.info cppinternals.info gcc.info gccinstall.info gccint.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/gcc/gcc_pure64.patch b/testing/gcc/gcc_pure64.patch
new file mode 100644
index 000000000..8c0baf8e2
--- /dev/null
+++ b/testing/gcc/gcc_pure64.patch
@@ -0,0 +1,26 @@
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h
+--- gcc-4.2.0.orig/gcc/config/i386/linux64.h 2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/linux64.h 2007-05-18 17:04:05.000000000 -0400
+@@ -49,8 +49,8 @@
+ When the -shared link option is used a final link is not being
+ done. */
+
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
+diff -Naur gcc-4.2.0.orig/gcc/config/i386/t-linux64 gcc-4.2.0/gcc/config/i386/t-linux64
+--- gcc-4.2.0.orig/gcc/config/i386/t-linux64 2007-05-16 19:21:19.000000000 -0400
++++ gcc-4.2.0/gcc/config/i386/t-linux64 2007-05-18 17:04:36.000000000 -0400
+@@ -6,7 +6,7 @@
+
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
++MULTILIB_OSDIRNAMES = ../lib ../lib32
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
diff --git a/testing/ghc/PKGBUILD b/testing/ghc/PKGBUILD
new file mode 100644
index 000000000..27dda458f
--- /dev/null
+++ b/testing/ghc/PKGBUILD
@@ -0,0 +1,78 @@
+# $Id: PKGBUILD 114660 2011-03-15 09:16:12Z vesa $
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+pkgname=ghc
+pkgver=7.0.2
+pkgrel=2
+pkgdesc="The Glasgow Haskell Compiler"
+arch=(i686 x86_64)
+url="http://www.haskell.org/ghc/"
+license=("custom")
+depends=('perl' 'gmp>=5.0' gcc)
+makedepends=(ghc happy perl libxslt docbook-xsl)
+provides=("haskell-array=0.3.0.2"
+ "haskell-bytestring=0.9.1.10"
+ "haskell-cabal=1.10.1.0"
+ "haskell-containers=0.4.0.0"
+ "haskell-directory=1.1.0.0"
+ "haskell-extensible-exceptions=0.1.1.2"
+ "haskell-filepath=1.2.0.0"
+ "haskell-haskell98=1.1.0.1"
+ "haskell-hpc=0.5.0.6"
+ "haskell-old-locale=1.0.0.2"
+ "haskell-old-time=1.0.0.6"
+ "haskell-pretty=1.0.1.2"
+ "haskell-process=1.0.1.5"
+ "haskell-random=1.0.0.3"
+ "haskell-template-haskell=2.5.0.0"
+ "haskell-time=1.2.0.3"
+ "haskell-unix=2.4.2.0"
+ )
+replaces=("haskell-array<0.3.0.2"
+ "haskell-bytestring<0.9.1.10"
+ "haskell-cabal<1.10.1.0"
+ "haskell-containers<0.4.0.0"
+ "haskell-directory<1.1.0.0"
+ "haskell-extensible-exceptions<0.1.1.2"
+ "haskell-filepath<1.2.0.0"
+ "haskell-haskell98<1.1.0.1"
+ "haskell-hpc<0.5.0.6"
+ "haskell-old-locale<1.0.0.2"
+ "haskell-old-time<1.0.0.6"
+ "haskell-pretty<1.0.1.2"
+ "haskell-process<1.0.1.5"
+ "haskell-random<1.0.0.3"
+ "haskell-template-haskell<2.5.0.0"
+ "haskell-time<1.2.0.3"
+ "haskell-unix<2.4.2.0"
+ )
+
+install=ghc.install
+options=(!strip)
+source=("http://www.haskell.org/ghc/dist/$pkgver/ghc-$pkgver-src.tar.bz2"
+ build.mk)
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ cp $srcdir/build.mk mk/build.mk
+
+ # FS#17875
+ sed -i 's/INSTALL_SHELL_WRAPPER = YES/INSTALL_SHELL_WRAPPER = NO/' utils/haddock/ghc.mk
+
+ ./configure --prefix=/usr
+ make -j1 || return 1
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ make DESTDIR=$pkgdir install
+
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/ghc/license
+ install -d $pkgdir/usr/share/haskell
+
+ rm $pkgdir/usr/bin/haddock
+}
+
+md5sums=('946a18a0dc30437db72c0d3fdf26ca42'
+ '5a3e0880c80b1dcecf779ff2e63a9c0d')
diff --git a/testing/ghc/build.mk b/testing/ghc/build.mk
new file mode 100644
index 000000000..f918a0f16
--- /dev/null
+++ b/testing/ghc/build.mk
@@ -0,0 +1,150 @@
+# -----------------------------------------------------------------------------
+# A Sample build.mk
+#
+# Uncomment one of the following BuildFlavour settings to get the desired
+# overall build type, and then tweak the options in the relevant section
+# below.
+
+# Uncomment one of these to select a build profile below:
+
+# Full build with max optimisation (slow build)
+BuildFlavour = perf
+
+# Fastest build (libs unoptimised):
+#BuildFlavour = quickest
+
+# Fast build with optimised libraries:
+#BuildFlavour = quick
+
+# Profile the stage2 compiler:
+#BuildFlavour = prof
+
+# A development build, working on the stage 1 compiler:
+#BuildFlavour = devel1
+
+# A development build, working on the stage 2 compiler:
+#BuildFlavour = devel2
+
+GhcLibWays = v
+
+# -------- 1. A Performance/Distribution build--------------------------------
+
+ifeq "$(BuildFlavour)" "perf"
+
+# perf matches the default settings, repeated here for comparison:
+
+SRC_HC_OPTS = -O -H64m
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O2 -fasm
+GhcHcOpts = -Rghc-timing
+GhcLibHcOpts = -O2 -XGenerics
+GhcLibWays += p
+
+ifeq "$(PlatformSupportsSharedLibs)" "YES"
+GhcLibWays += dyn
+endif
+
+endif
+
+# -------- A Fast build ------------------------------------------------------
+
+ifeq "$(BuildFlavour)" "quickest"
+
+SRC_HC_OPTS = -H64m -O0 -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O0 -fasm
+GhcLibHcOpts = -O0 -fasm
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# -------- A Fast build with optimised libs ----------------------------------
+
+ifeq "$(BuildFlavour)" "quick"
+
+SRC_HC_OPTS = -H64m -O0 -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O0 -fasm
+GhcLibHcOpts = -O -fasm
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# -------- Profile the stage2 compiler ---------------------------------------
+
+ifeq "$(BuildFlavour)" "prof"
+
+SRC_HC_OPTS = -H64m -O0 -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O -fasm
+GhcLibHcOpts = -O -fasm
+
+GhcLibWays += p
+GhcProfiled = YES
+
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+
+# -------- A Development build (stage 1) -------------------------------------
+
+ifeq "$(BuildFlavour)" "devel1"
+
+SRC_HC_OPTS = -H64m -O -fasm
+GhcLibHcOpts = -O -dcore-lint
+GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
+GhcStage2HcOpts = -Rghc-timing -O -fasm
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# -------- A Development build (stage 2) -------------------------------------
+
+ifeq "$(BuildFlavour)" "devel2"
+
+SRC_HC_OPTS = -H64m -O -fasm
+GhcLibHcOpts = -O -dcore-lint
+GhcStage1HcOpts = -Rghc-timing -O -fasm
+GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# -----------------------------------------------------------------------------
+# Other settings that might be useful
+
+# profiled RTS
+#GhcRtsCcOpts = -pg -g
+
+# Optimised/profiled RTS
+#GhcRtsCcOpts = -O2 -pg
+
+#GhcRtsWithFrontPanel = YES
+#SRC_HC_OPTS += `gtk-config --libs`
+
+# NoFib settings
+NoFibWays =
+STRIP=:
+
+
diff --git a/testing/ghc/ghc.install b/testing/ghc/ghc.install
new file mode 100644
index 000000000..7d56083bc
--- /dev/null
+++ b/testing/ghc/ghc.install
@@ -0,0 +1,19 @@
+pkgname=ghc
+
+pre_upgrade() {
+ cat << EOF
+ ==> Unregistering cabalized packages...
+EOF
+ cd /usr/share/haskell/ && (for a in *; do ghc-pkg unregister --force $a &> /dev/null; done; cd - > /dev/null )
+ cat << EOF
+ ==> Done.
+EOF
+
+}
+
+post_upgrade() {
+ cat << EOF
+ ==> All cabalized and yaourt-installed packages need to be reinstalled now.
+ ==> See /usr/share/haskell/ and ghc-pkg list --user for a tentative list of affected packages.
+EOF
+}
diff --git a/testing/glibc/PKGBUILD b/testing/glibc/PKGBUILD
new file mode 100644
index 000000000..60aeb8ae6
--- /dev/null
+++ b/testing/glibc/PKGBUILD
@@ -0,0 +1,168 @@
+# $Id: PKGBUILD 116984 2011-03-27 06:35:25Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+# NOTE: valgrind requires rebuilt with each new glibc version
+
+pkgname=glibc
+pkgver=2.13
+pkgrel=5
+_glibcdate=20110117
+pkgdesc="GNU C Library"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/libc"
+license=('GPL' 'LGPL')
+groups=('base')
+depends=('linux-api-headers>=2.6.37' 'tzdata')
+makedepends=('gcc>=4.4')
+backup=(etc/locale.gen
+ etc/nscd.conf)
+options=('!strip')
+install=glibc.install
+source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.xz
+ glibc-2.10-dont-build-timezone.patch
+ glibc-2.10-bz4781.patch
+ glibc-__i686.patch
+ glibc-2.12.1-static-shared-getpagesize.patch
+ glibc-2.12.2-ignore-origin-of-privileged-program.patch
+ glibc-2.13-prelink.patch
+ glibc-2.13-futex.patch
+ nscd
+ locale.gen.txt
+ locale-gen)
+md5sums=('b7b17d9c6b5b71b5e5322e04ca63c190'
+ '4dadb9203b69a3210d53514bb46f41c3'
+ '0c5540efc51c0b93996c51b57a8540ae'
+ '40cd342e21f71f5e49e32622b25acc52'
+ 'a3ac6f318d680347bb6e2805d42b73b2'
+ 'b042647ea7d6f22ad319e12e796bd13e'
+ '24dfab6fd244f3773523412588ecc52c'
+ '7d0154b7e17ea218c9fa953599d24cc4'
+ 'b587ee3a70c9b3713099295609afde49'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf')
+
+mksource() {
+ git clone git://sourceware.org/git/glibc.git
+ pushd glibc
+ git checkout -b glibc-2.13-arch origin/release/2.13/master
+ popd
+ tar -cvJf glibc-${pkgver}_${_glibcdate}.tar.xz glibc/*
+}
+
+build() {
+ cd ${srcdir}/glibc
+
+ # timezone data is in separate package (tzdata)
+ patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch
+
+ # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781
+ patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch
+
+ # http://sources.redhat.com/bugzilla/show_bug.cgi?id=411
+ # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html
+ patch -Np1 -i ${srcdir}/glibc-__i686.patch
+
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=11929
+ # using Fedora "fix" as patch in that bug report causes breakages...
+ patch -Np1 -i ${srcdir}/glibc-2.12.1-static-shared-getpagesize.patch
+
+ # http://www.exploit-db.com/exploits/15274/
+ # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch
+
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=12489
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=25b3aada (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.13-prelink.patch
+
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=12403
+ patch -Np1 -i ${srcdir}/glibc-2.13-futex.patch
+
+ install -dm755 ${pkgdir}/etc
+ touch ${pkgdir}/etc/ld.so.conf
+
+ cd ${srcdir}
+ mkdir glibc-build
+ cd glibc-build
+
+ if [[ ${CARCH} = "i686" ]]; then
+ # Hack to fix NPTL issues with Xen, only required on 32bit platforms
+ export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
+ fi
+
+ echo "slibdir=/lib" >> configparms
+
+ ${srcdir}/glibc/configure --prefix=/usr \
+ --libdir=/usr/lib --libexecdir=/usr/lib \
+ --with-headers=/usr/include \
+ --enable-add-ons=nptl,libidn \
+ --enable-kernel=2.6.27 \
+ --with-tls --with-__thread \
+ --enable-bind-now --without-gd \
+ --without-cvs --disable-profile \
+ --disable-multi-arch
+
+ make
+}
+
+check() {
+ cd ${srcdir}/glibc-build
+
+ # some errors are expected - manually check log files
+ make -k check || true
+}
+
+package() {
+ cd ${srcdir}/glibc-build
+ make install_root=${pkgdir} install
+
+ rm ${pkgdir}/etc/ld.so.{cache,conf}
+
+ install -dm755 ${pkgdir}/etc/rc.d
+ install -dm755 ${pkgdir}/usr/sbin
+ install -dm755 ${pkgdir}/usr/lib/locale
+ install -m644 ${srcdir}/glibc/nscd/nscd.conf ${pkgdir}/etc/nscd.conf
+ install -m755 ${srcdir}/nscd ${pkgdir}/etc/rc.d/nscd
+ install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin
+ install -m644 ${srcdir}/glibc/posix/gai.conf ${pkgdir}/etc/gai.conf
+
+ sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf
+
+ # create /etc/locale.gen
+ install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen
+ sed -i "s|/| |g" ${srcdir}/glibc/localedata/SUPPORTED
+ sed -i 's|\\| |g' ${srcdir}/glibc/localedata/SUPPORTED
+ sed -i "s|SUPPORTED-LOCALES=||" ${srcdir}/glibc/localedata/SUPPORTED
+ cat ${srcdir}/glibc/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
+ sed -i "s|^|#|g" ${pkgdir}/etc/locale.gen
+
+ if [[ ${CARCH} = "x86_64" ]]; then
+ # fix for the linker
+ sed -i '/RTLDLIST/s%lib64%lib%' ${pkgdir}/usr/bin/ldd
+ # Comply with multilib binaries, they look for the linker in /lib64
+ mkdir ${pkgdir}/lib64
+ cd ${pkgdir}/lib64
+ ln -v -s ../lib/ld* .
+ fi
+
+ # manually strip files as stripping libpthread-*.so and libthread_db.so
+ # with the default $STRIP_SHARED breaks gdb and stripping ld-*.so breaks
+ # valgrind on x86_64
+
+ cd $pkgdir
+ strip $STRIP_BINARIES sbin/{ldconfig,sln} \
+ usr/bin/{gencat,getconf,getent,iconv,locale} \
+ usr/bin/{localedef,pcprofiledump,rpcgen,sprof} \
+ usr/lib/getconf/* \
+ usr/sbin/{iconvconfig,nscd,rpcinfo}
+ [[ $CARCH = "i686" ]] && strip $STRIP_BINARIES usr/bin/lddlibc4
+
+ strip $STRIP_STATIC usr/lib/*.a \
+ lib/{{ld,libpthread}-${pkgver},libthread_db-1.0}.so
+
+ strip $STRIP_SHARED lib/{libanl,libBrokenLocale,libc,libcidn,libcrypt}-${pkgver}.so \
+ lib/libnss_{compat,dns,files,hesiod,nis,nisplus}-${pkgver}.so \
+ lib/{libdl,libm,libnsl,libresolv,librt,libutil}-${pkgver}.so \
+ lib/{libmemusage,libpcprofile,libSegFault}.so \
+ usr/lib/{pt_chown,gconv/*.so}
+}
diff --git a/testing/glibc/glibc-2.10-bz4781.patch b/testing/glibc/glibc-2.10-bz4781.patch
new file mode 100644
index 000000000..cf1a97a18
--- /dev/null
+++ b/testing/glibc/glibc-2.10-bz4781.patch
@@ -0,0 +1,42 @@
+diff -Naur glibc-old/sysdeps/unix/sysv/linux/i386/clone.S glibc/sysdeps/unix/sysv/linux/i386/clone.S
+--- glibc-old/sysdeps/unix/sysv/linux/i386/clone.S 2009-05-09 13:35:30.000000000 +1000
++++ glibc/sysdeps/unix/sysv/linux/i386/clone.S 2009-05-23 13:27:46.000000000 +1000
+@@ -120,9 +120,6 @@
+ ret
+
+ L(thread_start):
+- cfi_startproc;
+- /* Clearing frame pointer is insufficient, use CFI. */
+- cfi_undefined (eip);
+ /* Note: %esi is zero. */
+ movl %esi,%ebp /* terminate the stack frame */
+ #ifdef RESET_PID
+@@ -155,7 +152,6 @@
+ jmp L(haspid)
+ .previous
+ #endif
+- cfi_endproc;
+
+ cfi_startproc
+ PSEUDO_END (BP_SYM (__clone))
+diff -Naur glibc-old/sysdeps/unix/sysv/linux/x86_64/clone.S glibc/sysdeps/unix/sysv/linux/x86_64/clone.S
+--- glibc-old/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-05-09 13:35:30.000000000 +1000
++++ glibc/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-05-23 13:27:46.000000000 +1000
+@@ -89,9 +89,6 @@
+ ret
+
+ L(thread_start):
+- cfi_startproc;
+- /* Clearing frame pointer is insufficient, use CFI. */
+- cfi_undefined (rip);
+ /* Clear the frame pointer. The ABI suggests this be done, to mark
+ the outermost frame obviously. */
+ xorl %ebp, %ebp
+@@ -116,7 +113,6 @@
+ /* Call exit with return value from function call. */
+ movq %rax, %rdi
+ call HIDDEN_JUMPTARGET (_exit)
+- cfi_endproc;
+
+ cfi_startproc;
+ PSEUDO_END (BP_SYM (__clone))
diff --git a/testing/glibc/glibc-2.10-dont-build-timezone.patch b/testing/glibc/glibc-2.10-dont-build-timezone.patch
new file mode 100644
index 000000000..d3abeff17
--- /dev/null
+++ b/testing/glibc/glibc-2.10-dont-build-timezone.patch
@@ -0,0 +1,13 @@
+timezone data has been split into the package sys-libs/timezone-data
+
+--- glibc-2.4/Makeconfig
++++ glibc-2.4/Makeconfig
+@@ -931,7 +931,7 @@
+ stdlib stdio-common libio malloc string wcsmbs time dirent \
+ grp pwd posix io termios resource misc socket sysvipc gmon \
+ gnulib iconv iconvdata wctype manual shadow gshadow po argp \
+- crypt nss localedata timezone rt conform debug \
++ crypt nss localedata rt conform debug \
+ $(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
+
+ ifndef avoid-generated
diff --git a/testing/glibc/glibc-2.12.1-static-shared-getpagesize.patch b/testing/glibc/glibc-2.12.1-static-shared-getpagesize.patch
new file mode 100644
index 000000000..e84754279
--- /dev/null
+++ b/testing/glibc/glibc-2.12.1-static-shared-getpagesize.patch
@@ -0,0 +1,11 @@
+--- glibc-2.12-192-g7c08a05/sysdeps/unix/sysv/linux/getpagesize.c
++++ glibc-2.12.90-17/sysdeps/unix/sysv/linux/getpagesize.c
+@@ -28,7 +28,7 @@
+ int
+ __getpagesize ()
+ {
+-#ifdef __ASSUME_AT_PAGESIZE
++#if 0 && defined __ASSUME_AT_PAGESIZE
+ assert (GLRO(dl_pagesize) != 0);
+ return GLRO(dl_pagesize);
+ #else
diff --git a/testing/glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch b/testing/glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch
new file mode 100644
index 000000000..ce089b49c
--- /dev/null
+++ b/testing/glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch
@@ -0,0 +1,26 @@
+From d14e6b09d60d52cc12f0396c3106b14e1bd0fe8f Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Thu, 9 Dec 2010 15:00:59 +0100
+Subject: [PATCH 1/1] Ignore origin of privileged program
+
+---
+ ChangeLog | 5 +++++
+ elf/dl-object.c | 3 +++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/elf/dl-object.c b/elf/dl-object.c
+index 22a1635..7674d49 100644
+--- a/elf/dl-object.c
++++ b/elf/dl-object.c
+@@ -214,6 +214,9 @@ _dl_new_object (char *realname, const char *libname, int type,
+ out:
+ new->l_origin = origin;
+ }
++ else if (INTUSE(__libc_enable_secure) && type == lt_executable)
++ /* The origin of a privileged program cannot be trusted. */
++ new->l_origin = (char *) -1;
+
+ return new;
+ }
+--
+1.7.2
diff --git a/testing/glibc/glibc-2.13-futex.patch b/testing/glibc/glibc-2.13-futex.patch
new file mode 100644
index 000000000..9b9c3ac45
--- /dev/null
+++ b/testing/glibc/glibc-2.13-futex.patch
@@ -0,0 +1,31 @@
+--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
++++ a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+@@ -210,7 +210,7 @@ pthread_rwlock_timedrdlock:
+ cfi_restore(%r12)
+ retq
+
+-#ifdef __ASSUME_PRIVATE_FUTEX
++#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
+ cfi_adjust_cfa_offset(16)
+ cfi_rel_offset(%r12, 8)
+ cfi_rel_offset(%r13, 0)
+--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
++++ a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+@@ -192,7 +192,7 @@ pthread_rwlock_timedwrlock:
+
+ 7: movq %rdx, %rax
+
+-#ifndef __ASSUME_PRIVATE_FUTEX
++#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+ addq $16, %rsp
+ cfi_adjust_cfa_offset(-16)
+ popq %r14
+@@ -207,7 +207,7 @@ pthread_rwlock_timedwrlock:
+ cfi_restore(%r12)
+ retq
+
+-#ifdef __ASSUME_PRIVATE_FUTEX
++#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
+ cfi_adjust_cfa_offset(16)
+ cfi_rel_offset(%r12, 8)
+ cfi_rel_offset(%r13, 0)
diff --git a/testing/glibc/glibc-2.13-prelink.patch b/testing/glibc/glibc-2.13-prelink.patch
new file mode 100644
index 000000000..bef7998a8
--- /dev/null
+++ b/testing/glibc/glibc-2.13-prelink.patch
@@ -0,0 +1,26 @@
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 9a560b3..201c9cf 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -2168,6 +2168,10 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+ we need it in the memory handling later. */
+ GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist;
+
++ /* Remember the last search directory added at startup, now that
++ malloc will no longer be the one from dl-minimal.c. */
++ GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
++
+ if (prelinked)
+ {
+ if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
+@@ -2288,10 +2292,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+ lossage);
+ }
+
+- /* Remember the last search directory added at startup, now that
+- malloc will no longer be the one from dl-minimal.c. */
+- GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+-
+ if (! prelinked && rtld_multiple_ref)
+ {
+ /* There was an explicit ref to the dynamic linker as a shared lib.
diff --git a/testing/glibc/glibc-__i686.patch b/testing/glibc/glibc-__i686.patch
new file mode 100644
index 000000000..28d5dd424
--- /dev/null
+++ b/testing/glibc/glibc-__i686.patch
@@ -0,0 +1,13 @@
+diff -Naur glibc-old//sysdeps/i386/Makefile glibc//sysdeps/i386/Makefile
+--- glibc-old//sysdeps/i386/Makefile 2010-03-18 11:52:30.000000000 +1000
++++ glibc//sysdeps/i386/Makefile 2010-04-16 15:05:50.000000000 +1000
+@@ -1,6 +1,7 @@
+ # The mpn functions need a #define for asm syntax flavor.
+-# Every i386 port in use uses gas syntax (I think).
+-asm-CPPFLAGS += -DGAS_SYNTAX
++# Every i386 port in use uses gas syntax (I think). Don't replace
++# __i686 in __i686.get_pc_thunk.bx.
++asm-CPPFLAGS += -DGAS_SYNTAX -U __i686
+
+ # The i386 `long double' is a distinct type we support.
+ long-double-fcts = yes
diff --git a/testing/glibc/glibc.install b/testing/glibc/glibc.install
new file mode 100644
index 000000000..7f85ade96
--- /dev/null
+++ b/testing/glibc/glibc.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(libc.info{,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11})
+
+post_upgrade() {
+ sbin/ldconfig -r .
+ [ -x sbin/init ] && sbin/init u
+ usr/sbin/locale-gen
+
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/glibc/locale-gen b/testing/glibc/locale-gen
new file mode 100755
index 000000000..5aff344c4
--- /dev/null
+++ b/testing/glibc/locale-gen
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+LOCALEGEN=/etc/locale.gen
+LOCALES=/usr/share/i18n/locales
+if [ -n "$POSIXLY_CORRECT" ]; then
+ unset POSIXLY_CORRECT
+fi
+
+
+[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
+
+# Remove all old locale dir and locale-archive before generating new
+# locale data.
+rm -rf /usr/lib/locale/* || true
+
+umask 022
+
+is_entry_ok() {
+ if [ -n "$locale" -a -n "$charset" ] ; then
+ true
+ else
+ echo "error: Bad entry '$locale $charset'"
+ false
+ fi
+}
+
+echo "Generating locales..."
+while read locale charset; do \
+ case $locale in \#*) continue;; "") continue;; esac; \
+ is_entry_ok || continue
+ echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
+ echo -n ".$charset"; \
+ echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+ echo -n '...'; \
+ if [ -f $LOCALES/$locale ]; then input=$locale; else \
+ input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
+ localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
+ echo ' done'; \
+done < $LOCALEGEN
+echo "Generation complete."
diff --git a/testing/glibc/locale.gen.txt b/testing/glibc/locale.gen.txt
new file mode 100644
index 000000000..ccdd81734
--- /dev/null
+++ b/testing/glibc/locale.gen.txt
@@ -0,0 +1,23 @@
+# Configuration file for locale-gen
+#
+# lists of locales that are to be generated by the locale-gen command.
+#
+# Each line is of the form:
+#
+# <locale> <charset>
+#
+# where <locale> is one of the locales given in /usr/share/i18n/locales
+# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
+#
+# Examples:
+# en_US ISO-8859-1
+# en_US.UTF-8 UTF-8
+# de_DE ISO-8859-1
+# de_DE@euro ISO-8859-15
+#
+# The locale-gen command will generate all the locales,
+# placing them in /usr/lib/locale.
+#
+# A list of supported locales is included in this file.
+# Uncomment the ones you need.
+#
diff --git a/testing/glibc/nscd b/testing/glibc/nscd
new file mode 100755
index 000000000..8b14f2a3f
--- /dev/null
+++ b/testing/glibc/nscd
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/nscd`
+case "$1" in
+ start)
+ stat_busy "Starting nscd"
+ # create necessary directories if they don't already exist
+ mkdir -p /var/run/nscd /var/db/nscd 2>/dev/null
+ # remove stale files
+ rm -f /var/db/nscd/* /var/run/nscd/* 2>/dev/null
+ [ -z "$PID" ] && /usr/sbin/nscd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon nscd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping nscd"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon nscd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/gnutls/PKGBUILD b/testing/gnutls/PKGBUILD
new file mode 100644
index 000000000..63f41cc62
--- /dev/null
+++ b/testing/gnutls/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 117478 2011-04-03 19:05:56Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnutls
+pkgver=2.12.1
+pkgrel=1
+pkgdesc="A library which provides a secure layer over a reliable transport layer"
+arch=('i686' 'x86_64')
+license=('GPL3' 'LGPL')
+url="http://www.gnu.org/software/gnutls/"
+install=gnutls.install
+options=('!libtool' '!zipman')
+depends=('gcc-libs>=4.4.3' 'libtasn1>=2.5' 'readline>=6.0' 'zlib' 'libgcrypt>=1.4.5')
+source=(ftp://ftp.gnu.org/gnu/gnutls/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('214296bafcdb411adf94e05162332297')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # Nettle is the default crypto back end. Use --with-libgcrypt to use the libgcrypt back end.
+ # we stay with libgcrypt for now. nettle would need to be moved from AUR to extra.
+ ./configure --prefix=/usr \
+ --with-zlib \
+ --with-libgcrypt \
+ --disable-static \
+ --disable-guile
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make check # passes all || /bin/true
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ # lots of .png files are put into infodir and are gzipped by makepkg! this may need to be fixed by using !zipman
+ # gzip -9 all files in infodir and manpages manually
+ find "$pkgdir/usr/share/info" -name '*.info*' -exec gzip -9 {} \;
+ find "$pkgdir/usr/share/man" -exec gzip -9 {} \;
+}
diff --git a/testing/gnutls/gnutls.install b/testing/gnutls/gnutls.install
new file mode 100644
index 000000000..9ce7c6edc
--- /dev/null
+++ b/testing/gnutls/gnutls.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(gnutls.info-1.gz gnutls.info-2.gz gnutls.info-3.gz gnutls.info.gz)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/haddock/PKGBUILD b/testing/haddock/PKGBUILD
new file mode 100644
index 000000000..e061249d3
--- /dev/null
+++ b/testing/haddock/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# As generated by cabal2arch 0.7.6
+pkgname=haddock
+pkgver=2.9.2
+pkgrel=1
+pkgdesc="Documentation-generation tool for Haskell libraries"
+url="http://hackage.haskell.org/package/${pkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+makedepends=(alex happy)
+depends=(ghc sh 'haskell-mtl' 'haskell-xhtml' 'haskell-ghc-paths') # cannot have more strict deps here
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${pkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+
+md5sums=('04928e132827a1da20ace52babb43e47')
diff --git a/testing/haddock/haddock.install b/testing/haddock/haddock.install
new file mode 100644
index 000000000..278da355e
--- /dev/null
+++ b/testing/haddock/haddock.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haddock
+post_install() {
+ ${HS_DIR}/register.sh &> /dev/null
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) &> /dev/null
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh &> /dev/null
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh &> /dev/null
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) &> /dev/null
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh &> /dev/null
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) &> /dev/null
+}
diff --git a/testing/haskell-cgi/PKGBUILD b/testing/haskell-cgi/PKGBUILD
new file mode 100644
index 000000000..ebee2e82e
--- /dev/null
+++ b/testing/haskell-cgi/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Rémy Oudompheng <remy@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+_hkgname=cgi
+pkgname=haskell-cgi
+pkgver=3001.1.7.4
+pkgrel=3
+pkgdesc="A library for writing CGI programs"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.0.2-2' 'haskell-mtl=2.0.1.0-2' 'haskell-network=2.3.0.2-2' 'haskell-parsec=3.1.1-2' 'haskell-xhtml=3000.2.0.1-7')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('0e551afc8d6f39aaa70520e31de26506')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-cgi/haskell-cgi.install b/testing/haskell-cgi/haskell-cgi.install
new file mode 100644
index 000000000..533fe4dc5
--- /dev/null
+++ b/testing/haskell-cgi/haskell-cgi.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-cgi
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-deepseq/PKGBUILD b/testing/haskell-deepseq/PKGBUILD
new file mode 100644
index 000000000..b89f39f8b
--- /dev/null
+++ b/testing/haskell-deepseq/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+_hkgname=deepseq
+pkgname=haskell-deepseq
+pkgver=1.1.0.2
+pkgrel=2
+pkgdesc="Fully evaluate data structures"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('90b66480f0eb659c1db209ee703e0162')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-deepseq/haskell-deepseq.install b/testing/haskell-deepseq/haskell-deepseq.install
new file mode 100644
index 000000000..8ba51eac7
--- /dev/null
+++ b/testing/haskell-deepseq/haskell-deepseq.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-deepseq
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-fgl/PKGBUILD b/testing/haskell-fgl/PKGBUILD
new file mode 100644
index 000000000..4a866601d
--- /dev/null
+++ b/testing/haskell-fgl/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=fgl
+pkgname=haskell-fgl
+pkgver=5.4.2.3
+pkgrel=4
+pkgdesc="Martin Erwig's Functional Graph Library"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+makedepends=()
+depends=('ghc=7.0.2-2' 'haskell-mtl=2.0.1.0-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('29ccab8bebed16a8d7346c3ed52c5d9c')
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+md5sums=('29ccab8bebed16a8d7346c3ed52c5d9c')
diff --git a/testing/haskell-fgl/haskell-fgl.install b/testing/haskell-fgl/haskell-fgl.install
new file mode 100644
index 000000000..0da0edb7b
--- /dev/null
+++ b/testing/haskell-fgl/haskell-fgl.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-fgl
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-ghc-paths/PKGBUILD b/testing/haskell-ghc-paths/PKGBUILD
new file mode 100644
index 000000000..5a744ac49
--- /dev/null
+++ b/testing/haskell-ghc-paths/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=ghc-paths
+pkgname=haskell-ghc-paths
+pkgver=0.1.0.8
+pkgrel=4
+pkgdesc="Knowledge of GHC's installation directories"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+makedepends=()
+depends=(ghc=7.0.2) # cannot have stricter dep here due to haddock
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('d2b23dc563888e380588501d2ce1d82b')
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-ghc-paths/haskell-ghc-paths.install b/testing/haskell-ghc-paths/haskell-ghc-paths.install
new file mode 100644
index 000000000..4fd2c6c56
--- /dev/null
+++ b/testing/haskell-ghc-paths/haskell-ghc-paths.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-ghc-paths
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-glut/PKGBUILD b/testing/haskell-glut/PKGBUILD
new file mode 100644
index 000000000..a42385959
--- /dev/null
+++ b/testing/haskell-glut/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=GLUT
+pkgname=haskell-glut
+pkgver=2.1.2.1
+pkgrel=6
+pkgdesc="A binding for the OpenGL Utility Toolkit"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+makedepends=()
+depends=('ghc=7.0.2-2' 'haskell-opengl=2.2.3.0-6' 'freeglut')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('b97f476a04098701e330e86c1f89ed52')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-glut/haskell-glut.install b/testing/haskell-glut/haskell-glut.install
new file mode 100644
index 000000000..44c7cb3c1
--- /dev/null
+++ b/testing/haskell-glut/haskell-glut.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-glut
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-haskell-src/PKGBUILD b/testing/haskell-haskell-src/PKGBUILD
new file mode 100644
index 000000000..8b9340c4f
--- /dev/null
+++ b/testing/haskell-haskell-src/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=haskell-src
+pkgname=haskell-haskell-src
+pkgver=1.0.1.4
+pkgrel=2
+pkgdesc="Facilities for manipulating Haskell source code: an abstract syntax, lexer, parser and pretty-printer."
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.0.2-2' 'haskell-syb=0.3-2' sh)
+makedepends=(happy)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('32d181c082393ab859e72610803bac6e')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+
diff --git a/testing/haskell-haskell-src/haskell-haskell-src.install b/testing/haskell-haskell-src/haskell-haskell-src.install
new file mode 100644
index 000000000..03ce601bc
--- /dev/null
+++ b/testing/haskell-haskell-src/haskell-haskell-src.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-haskell-src
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-html/PKGBUILD b/testing/haskell-html/PKGBUILD
new file mode 100644
index 000000000..10a04cbdf
--- /dev/null
+++ b/testing/haskell-html/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+_hkgname=html
+pkgname=haskell-html
+pkgver=1.0.1.2
+pkgrel=9
+pkgdesc="HTML combinator library"
+url="http://hackage.haskell.org/package/html"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('2a7de5a2af9a2f80d39825d6a95ee445')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-html/haskell-html.install b/testing/haskell-html/haskell-html.install
new file mode 100644
index 000000000..768297e0a
--- /dev/null
+++ b/testing/haskell-html/haskell-html.install
@@ -0,0 +1,19 @@
+HS_DIR=usr/share/haskell/haskell-html
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh &> /dev/null
+ exit 0
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-http/PKGBUILD b/testing/haskell-http/PKGBUILD
new file mode 100644
index 000000000..80fce6663
--- /dev/null
+++ b/testing/haskell-http/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+_hkgname=HTTP
+pkgname=haskell-http
+pkgver=4000.1.1
+pkgrel=3
+pkgdesc="A library for client-side HTTP"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.0.2-2' sh 'haskell-network=2.3.0.2-2' 'haskell-parsec=3.1.1-2' 'haskell-mtl=2.0.1.0-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('ddf23d46c4d6dc0048c454e3d01caa57')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+
diff --git a/testing/haskell-http/haskell-http.install b/testing/haskell-http/haskell-http.install
new file mode 100644
index 000000000..fdebb1cb8
--- /dev/null
+++ b/testing/haskell-http/haskell-http.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-http
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-hunit/PKGBUILD b/testing/haskell-hunit/PKGBUILD
new file mode 100644
index 000000000..634fd49f3
--- /dev/null
+++ b/testing/haskell-hunit/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=HUnit
+pkgname=haskell-hunit
+pkgver=1.2.2.3
+pkgrel=2
+pkgdesc="A unit testing framework for Haskell"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('f179add502f88153e5c9fdc69056b657')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-hunit/haskell-hunit.install b/testing/haskell-hunit/haskell-hunit.install
new file mode 100644
index 000000000..ceb108b5b
--- /dev/null
+++ b/testing/haskell-hunit/haskell-hunit.install
@@ -0,0 +1,19 @@
+HS_DIR=usr/share/haskell/haskell-hunit
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh &> /dev/null
+ exit 0
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-mtl/PKGBUILD b/testing/haskell-mtl/PKGBUILD
new file mode 100644
index 000000000..ea29d2633
--- /dev/null
+++ b/testing/haskell-mtl/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=mtl
+pkgname=haskell-mtl
+pkgver=2.0.1.0
+pkgrel=2
+pkgdesc="Monad transformer library"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh 'haskell-transformers=0.2.2.0-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('934fa813625ef7e88a6a96a09815ff95')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+md5sums=('934fa813625ef7e88a6a96a09815ff95')
diff --git a/testing/haskell-mtl/haskell-mtl.install b/testing/haskell-mtl/haskell-mtl.install
new file mode 100644
index 000000000..9325811e8
--- /dev/null
+++ b/testing/haskell-mtl/haskell-mtl.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-mtl
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-network/PKGBUILD b/testing/haskell-network/PKGBUILD
new file mode 100644
index 000000000..685e5fe2b
--- /dev/null
+++ b/testing/haskell-network/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+_hkgname=network
+pkgname=haskell-network
+pkgver=2.3.0.2
+pkgrel=2
+pkgdesc="Networking-related facilities"
+url="http://hackage.haskell.org/package/network"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh 'haskell-parsec=3.1.1-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('a739fe9b75af744cfa1c05e39d41ac1f')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-network/haskell-network.install b/testing/haskell-network/haskell-network.install
new file mode 100644
index 000000000..a56c31d0a
--- /dev/null
+++ b/testing/haskell-network/haskell-network.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-network
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-opengl/PKGBUILD b/testing/haskell-opengl/PKGBUILD
new file mode 100644
index 000000000..a45b3f303
--- /dev/null
+++ b/testing/haskell-opengl/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=OpenGL
+pkgname=haskell-opengl
+pkgver=2.2.3.0
+pkgrel=6
+pkgdesc="A binding for the OpenGL graphics system"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+makedepends=()
+depends=('ghc=7.0.2-2' 'mesa')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('f4e3ccb471034a6a74921d4dab9dd32d')
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-opengl/haskell-opengl.install b/testing/haskell-opengl/haskell-opengl.install
new file mode 100644
index 000000000..d0f3474b3
--- /dev/null
+++ b/testing/haskell-opengl/haskell-opengl.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-opengl
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-parallel/PKGBUILD b/testing/haskell-parallel/PKGBUILD
new file mode 100644
index 000000000..1191611e8
--- /dev/null
+++ b/testing/haskell-parallel/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+_hkgname=parallel
+pkgname=haskell-parallel
+pkgver=3.1.0.1
+pkgrel=3
+pkgdesc="Parallel programming library"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh 'haskell-deepseq=1.1.0.2-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('591979e7897dbc09157edf73a4614957')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-parallel/haskell-parallel.install b/testing/haskell-parallel/haskell-parallel.install
new file mode 100644
index 000000000..e6ec0c449
--- /dev/null
+++ b/testing/haskell-parallel/haskell-parallel.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-parallel
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-parsec/PKGBUILD b/testing/haskell-parsec/PKGBUILD
new file mode 100644
index 000000000..516621979
--- /dev/null
+++ b/testing/haskell-parsec/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# As generated by cabal2arch 0.7.6
+_hkgname=parsec
+pkgname=haskell-parsec
+pkgver=3.1.1
+pkgrel=2
+pkgdesc="Monadic parser combinators"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh 'haskell-mtl=2.0.1.0-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('3d5500847cac09f6f658db825b6c5df8')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+
diff --git a/testing/haskell-parsec/haskell-parsec.install b/testing/haskell-parsec/haskell-parsec.install
new file mode 100644
index 000000000..dfa0701b9
--- /dev/null
+++ b/testing/haskell-parsec/haskell-parsec.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-parsec
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-platform/PKGBUILD b/testing/haskell-platform/PKGBUILD
new file mode 100644
index 000000000..0b6c908d2
--- /dev/null
+++ b/testing/haskell-platform/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
+pkgname=haskell-platform
+pkgver=2011.2.0.0
+pkgrel=3
+pkgdesc="The Haskell Platform"
+url="http://hackage.haskell.org/platform/"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.0.2-2'
+ 'haskell-glut=2.1.2.1-6'
+ 'haskell-http=4000.1.1-3'
+ 'haskell-hunit=1.2.2.3-2'
+ 'haskell-opengl=2.2.3.0-6'
+ 'haskell-quickcheck=2.4.0.1-3'
+ 'haskell-cgi=3001.1.7.4-3'
+ 'haskell-deepseq=1.1.0.2-2'
+ 'haskell-fgl=5.4.2.3-4'
+ 'haskell-haskell-src=1.0.1.4-2'
+ 'haskell-html=1.0.1.2-9'
+ 'haskell-mtl=2.0.1.0-2'
+ 'haskell-network=2.3.0.2-2'
+ 'haskell-parallel=3.1.0.1-3'
+ 'haskell-parsec=3.1.1-2'
+ 'haskell-regex-base=0.93.2-4'
+ 'haskell-regex-compat=0.93.1-4'
+ 'haskell-regex-posix=0.94.4-2'
+ 'haskell-stm=2.2.0.1-2'
+ 'haskell-syb=0.3-2'
+ 'haskell-text=0.11.0.5-2'
+ 'haskell-transformers=0.2.2.0-2'
+ 'haskell-xhtml=3000.2.0.1-7'
+ 'haskell-zlib=0.5.3.1-2'
+ 'cabal-install=0.10.2'
+ 'alex=2.3.5'
+ 'happy=1.18.6'
+ 'haddock=2.9.2')
+
+build() {
+ return 0
+}
diff --git a/testing/haskell-quickcheck/PKGBUILD b/testing/haskell-quickcheck/PKGBUILD
new file mode 100644
index 000000000..3da28a0cb
--- /dev/null
+++ b/testing/haskell-quickcheck/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.5
+_hkgname=QuickCheck
+pkgname=haskell-quickcheck
+pkgver=2.4.0.1
+pkgrel=3
+pkgdesc="Automatic testing of Haskell programs"
+url="http://hackage.haskell.org/package/QuickCheck"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 haskell-mtl=2.0.1.0-2 sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('e8c86e95fd1fa4c58fc8e53e2853db5e')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-quickcheck/haskell-quickcheck.install b/testing/haskell-quickcheck/haskell-quickcheck.install
new file mode 100644
index 000000000..c9e12fadc
--- /dev/null
+++ b/testing/haskell-quickcheck/haskell-quickcheck.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-quickcheck
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-regex-base/PKGBUILD b/testing/haskell-regex-base/PKGBUILD
new file mode 100644
index 000000000..a28c3daa0
--- /dev/null
+++ b/testing/haskell-regex-base/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=regex-base
+pkgname=haskell-regex-base
+pkgver=0.93.2
+pkgrel=4
+pkgdesc="Interface API for regex-posix,pcre,parsec,tdfa,dfa"
+url="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/regex-base"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh 'haskell-mtl=2.0.1.0-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('e7b93b0b17eff8d3068ecb2f5d5f6ea3')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-regex-base/haskell-regex-base.install b/testing/haskell-regex-base/haskell-regex-base.install
new file mode 100644
index 000000000..3ad2fea28
--- /dev/null
+++ b/testing/haskell-regex-base/haskell-regex-base.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-regex-base
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-regex-compat/PKGBUILD b/testing/haskell-regex-compat/PKGBUILD
new file mode 100644
index 000000000..b0778ac42
--- /dev/null
+++ b/testing/haskell-regex-compat/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=regex-compat
+pkgname=haskell-regex-compat
+pkgver=0.93.1
+pkgrel=4
+pkgdesc="Replaces and enhances Text.Regex"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh 'haskell-regex-base=0.93.2-4' 'haskell-regex-posix=0.94.4-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('d6becec95ea8098cab663116fdce60a5')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-regex-compat/haskell-regex-compat.install b/testing/haskell-regex-compat/haskell-regex-compat.install
new file mode 100644
index 000000000..898c0bba1
--- /dev/null
+++ b/testing/haskell-regex-compat/haskell-regex-compat.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-regex-compat
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-regex-posix/PKGBUILD b/testing/haskell-regex-posix/PKGBUILD
new file mode 100644
index 000000000..69f3773d6
--- /dev/null
+++ b/testing/haskell-regex-posix/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=regex-posix
+pkgname=haskell-regex-posix
+pkgver=0.94.4
+pkgrel=2
+pkgdesc="The posix regex backend for regex-base"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh 'haskell-regex-base=0.93.2-4')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('c28a13e8329e93a19bbb51708bf64abb')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-regex-posix/haskell-regex-posix.install b/testing/haskell-regex-posix/haskell-regex-posix.install
new file mode 100644
index 000000000..2b89fae7b
--- /dev/null
+++ b/testing/haskell-regex-posix/haskell-regex-posix.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-regex-posix
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-stm/PKGBUILD b/testing/haskell-stm/PKGBUILD
new file mode 100644
index 000000000..5f3a97ed7
--- /dev/null
+++ b/testing/haskell-stm/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.5
+_hkgname=stm
+pkgname=haskell-stm
+pkgver=2.2.0.1
+pkgrel=2
+pkgdesc="A modular composable concurrency abstraction."
+url="http://hackage.haskell.org/package/stm"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('b1cf03ed315e00c33160746feeee8682')
+
+build() {
+ cd ${srcdir}/${_hkgname}-$pkgver
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-$pkgver
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-stm/haskell-stm.install b/testing/haskell-stm/haskell-stm.install
new file mode 100644
index 000000000..0283c2fc5
--- /dev/null
+++ b/testing/haskell-stm/haskell-stm.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-stm
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-syb/PKGBUILD b/testing/haskell-syb/PKGBUILD
new file mode 100644
index 000000000..f90006a56
--- /dev/null
+++ b/testing/haskell-syb/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Rémy Oudompheng <remy@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=syb
+pkgname=haskell-syb
+pkgver=0.3
+pkgrel=2
+pkgdesc="A library for client-side HTTP"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.0.2-2' sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('c4f6771fa32d467a029e6e813757a9fe')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr --docdir=/usr/share/doc/${pkgname}
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+
diff --git a/testing/haskell-syb/haskell-syb.install b/testing/haskell-syb/haskell-syb.install
new file mode 100644
index 000000000..080055165
--- /dev/null
+++ b/testing/haskell-syb/haskell-syb.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-syb
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-text/PKGBUILD b/testing/haskell-text/PKGBUILD
new file mode 100644
index 000000000..e60891918
--- /dev/null
+++ b/testing/haskell-text/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+_hkgname=text
+pkgname=haskell-text
+pkgver=0.11.0.5
+pkgrel=2
+pkgdesc="An efficient packed Unicode text type."
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.0.2-2' sh 'haskell-deepseq=1.1.0.2-2')
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('516a6813a6b9061fabdc9f0c3bbb1592')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+
diff --git a/testing/haskell-text/haskell-text.install b/testing/haskell-text/haskell-text.install
new file mode 100644
index 000000000..620db3921
--- /dev/null
+++ b/testing/haskell-text/haskell-text.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-text
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-transformers/PKGBUILD b/testing/haskell-transformers/PKGBUILD
new file mode 100644
index 000000000..c14b2eecc
--- /dev/null
+++ b/testing/haskell-transformers/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Rémy Oudompheng <remy@archlinux.org>
+# $Id: PKGBUILD 115140 2011-03-17 09:11:21Z vesa $
+
+_hkgname=transformers
+pkgname=haskell-transformers
+pkgver=0.2.2.0
+pkgrel=2
+pkgdesc="Concrete functor and monad transformers"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('3470ac66116900cd1ba84d3744474e49')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-transformers/haskell-transformers.install b/testing/haskell-transformers/haskell-transformers.install
new file mode 100644
index 000000000..eec2af6e1
--- /dev/null
+++ b/testing/haskell-transformers/haskell-transformers.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-transformers
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-xhtml/PKGBUILD b/testing/haskell-xhtml/PKGBUILD
new file mode 100644
index 000000000..63abbbb64
--- /dev/null
+++ b/testing/haskell-xhtml/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+_hkgname=xhtml
+pkgname=haskell-xhtml
+pkgver=3000.2.0.1
+pkgrel=7
+pkgdesc="Combinators for producing XHTML 1.0, including the Strict, Transitional and Frameset variants."
+url="http://hackage.haskell.org/package/xhtml"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('9e3e7d9c66618c5e29716f90e54363c9')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-xhtml/haskell-xhtml.install b/testing/haskell-xhtml/haskell-xhtml.install
new file mode 100644
index 000000000..d03b8a053
--- /dev/null
+++ b/testing/haskell-xhtml/haskell-xhtml.install
@@ -0,0 +1,19 @@
+HS_DIR=usr/share/haskell/haskell-xhtml
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh &> /dev/null
+ exit 0
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/haskell-zlib/PKGBUILD b/testing/haskell-zlib/PKGBUILD
new file mode 100644
index 000000000..7aca7312b
--- /dev/null
+++ b/testing/haskell-zlib/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package originally generated by cabal2arch 0.7.6
+_hkgname=zlib
+pkgname=haskell-zlib
+pkgver=0.5.3.1
+pkgrel=2
+pkgdesc="Compression and decompression in the gzip and zlib formats"
+url="http://hackage.haskell.org/package/zlib"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=(ghc=7.0.2-2 'zlib' sh)
+options=('strip')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('8fb2988b112e38d04a527b892f770507')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/testing/haskell-zlib/haskell-zlib.install b/testing/haskell-zlib/haskell-zlib.install
new file mode 100644
index 000000000..d387b7b65
--- /dev/null
+++ b/testing/haskell-zlib/haskell-zlib.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-zlib
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/testing/isl/PKGBUILD b/testing/isl/PKGBUILD
new file mode 100644
index 000000000..5cd8c8dfa
--- /dev/null
+++ b/testing/isl/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 106792 2011-01-19 09:34:43Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+pkgname=isl
+pkgver=0.05.1
+pkgrel=1
+pkgdesc="Library for manipulating sets and relations of integer points bounded by linear constraints"
+arch=('i686' 'x86_64')
+url="http://www.kotnet.org/~skimo/isl/"
+license=('LGPL2.1')
+options=('!libtool')
+source=(http://www.kotnet.org/~skimo/isl/$pkgname-$pkgver.tar.bz2)
+md5sums=('8ef8f307d3f042434e358ddf3320dcad')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
+ make check
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install
+}
diff --git a/testing/libdrm/COPYING b/testing/libdrm/COPYING
new file mode 100644
index 000000000..6e74c337c
--- /dev/null
+++ b/testing/libdrm/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/PKGBUILD b/testing/libdrm/PKGBUILD
new file mode 100644
index 000000000..0b36edde7
--- /dev/null
+++ b/testing/libdrm/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 115092 2011-03-16 19:52:27Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libdrm
+pkgver=2.4.24
+pkgrel=1
+pkgdesc="Userspace interface to kernel DRM services"
+arch=(i686 x86_64)
+license=('custom')
+depends=('glibc')
+options=('!libtool')
+url="http://dri.freedesktop.org/"
+source=(http://dri.freedesktop.org/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ no-pthread-stubs.patch
+ COPYING)
+md5sums=('8d802bf3b368f9fac0d7d17516a9436f'
+ '9b5ec3bbebe86921e2057694c42f65b8'
+ 'ba65e71c481b94ef0fb6c23c7f21ffa1')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/no-pthread-stubs.patch"
+
+# libtoolize --force
+ autoreconf --force --install
+ ./configure --prefix=/usr \
+ --enable-udev \
+ --enable-intel \
+ --enable-radeon \
+ --enable-vmwgfx-experimental-api \
+ --enable-nouveau-experimental-api
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/libdrm/no-pthread-stubs.patch b/testing/libdrm/no-pthread-stubs.patch
new file mode 100644
index 000000000..6602f8785
--- /dev/null
+++ b/testing/libdrm/no-pthread-stubs.patch
@@ -0,0 +1,65 @@
+diff -ru libdrm-2.4.0/configure.ac libdrm-2.4.0-nostubs/configure.ac
+--- libdrm-2.4.0/configure.ac 2008-10-09 21:57:09.000000000 +0200
++++ libdrm-2.4.0-nostubs/configure.ac 2008-10-21 10:48:24.000000000 +0200
+@@ -32,10 +32,6 @@
+ AC_HEADER_STDC
+ AC_SYS_LARGEFILE
+
+-PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)
+-AC_SUBST(PTHREADSTUBS_CFLAGS)
+-AC_SUBST(PTHREADSTUBS_LIBS)
+-
+ pkgconfigdir=${libdir}/pkgconfig
+ AC_SUBST(pkgconfigdir)
+ AC_ARG_ENABLE(udev, AS_HELP_STRING([--enable-udev],
+--- libdrm-2.4.16/intel/Makefile.am 2009-11-20 23:54:36.000000000 +0000
++++ libdrm-2.4.16/intel/Makefile.am.new 2009-12-07 08:11:32.235748069 +0000
+@@ -26,13 +26,12 @@
+ $(WARN_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/intel \
+- $(PTHREADSTUBS_CFLAGS) \
+ -I$(top_srcdir)/include/drm
+
+ libdrm_intel_la_LTLIBRARIES = libdrm_intel.la
+ libdrm_intel_ladir = $(libdir)
+ libdrm_intel_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+-libdrm_intel_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @CLOCK_LIB@
++libdrm_intel_la_LIBADD = ../libdrm.la @CLOCK_LIB@
+
+ libdrm_intel_la_SOURCES = \
+ intel_atomic.h \
+--- libdrm-2.4.16/radeon/Makefile.am 2009-11-20 23:54:36.000000000 +0000
++++ libdrm-2.4.16/radeon/Makefile.am.new 2009-12-07 08:12:31.889075388 +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 \
+--- libdrm-2.4.16/nouveau/Makefile.am 2009-11-20 23:54:36.000000000 +0000
++++ libdrm-2.4.16/nouveau/Makefile.am.new 2009-12-07 08:13:01.489072320 +0000
+@@ -2,13 +2,12 @@
+ $(WARN_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/nouveau \
+- $(PTHREADSTUBS_CFLAGS) \
+ -I$(top_srcdir)/include/drm
+
+ libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la
+ libdrm_nouveau_ladir = $(libdir)
+ libdrm_nouveau_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+-libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
++libdrm_nouveau_la_LIBADD = ../libdrm.la
+
+ libdrm_nouveau_la_SOURCES = \
+ nouveau_device.c \
diff --git a/testing/libgcrypt/PKGBUILD b/testing/libgcrypt/PKGBUILD
new file mode 100644
index 000000000..c55847667
--- /dev/null
+++ b/testing/libgcrypt/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 117849 2011-04-04 18:49:54Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=libgcrypt
+pkgver=1.4.6
+pkgrel=2
+pkgdesc="a general purpose crypto library based on the code used"
+arch=(i686 x86_64)
+url="http://www.gnupg.org"
+license=('LGPL')
+depends=('libgpg-error>=1.9')
+options=(!libtool)
+source=(ftp://ftp.gnupg.org/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ #ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/libgcrypt/${pkgname}-${pkgver}.tar.bz2
+)
+md5sums=('dbf99425a4fe9217c84ce3a35d938634')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --disable-static \
+ --disable-padlock-support
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ # Move dynamic libraries to /lib
+ install -d -m755 "${pkgdir}"/lib/
+ mv "${pkgdir}"/usr/lib/libgcrypt.so* "${pkgdir}"/lib/
+ ln -sf /lib/libgcrypt.so "${pkgdir}"/usr/lib/libgcrypt.so
+}
diff --git a/testing/libgcrypt/libgcrypt.install b/testing/libgcrypt/libgcrypt.install
new file mode 100644
index 000000000..83e0dcb27
--- /dev/null
+++ b/testing/libgcrypt/libgcrypt.install
@@ -0,0 +1,20 @@
+infodir=/usr/share/info
+filelist=(gcrypt.info.gz)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/libgpg-error/PKGBUILD b/testing/libgpg-error/PKGBUILD
new file mode 100644
index 000000000..cbc32f7b5
--- /dev/null
+++ b/testing/libgpg-error/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 117845 2011-04-04 18:42:53Z andyrtr $
+# Maintainer: judd <jvinet@zeroflux.org>
+
+pkgname=libgpg-error
+pkgver=1.9
+pkgrel=3
+pkgdesc="Support library for libgcrypt"
+arch=(i686 x86_64)
+url="http://www.gnupg.org"
+license=('LGPL')
+depends=('glibc' 'sh')
+options=(!libtool)
+source=(ftp://ftp.gnupg.org/gcrypt/libgpg-error/${pkgname}-${pkgver}.tar.bz2)
+ #ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/libgpg-error/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('521b98aa9395e7eaf0ef2236233a0796')
+
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}/" install
+
+ # Move dynamic libraries to /lib
+ install -d -m755 "${pkgdir}"/lib/
+ mv "${pkgdir}"/usr/lib/libgpg-error.so* "${pkgdir}"/lib/
+ ln -sf /lib/libgpg-error.so "${pkgdir}"/usr/lib/libgpg-error.so
+}
diff --git a/testing/libtool/PKGBUILD b/testing/libtool/PKGBUILD
new file mode 100644
index 000000000..44e629e1e
--- /dev/null
+++ b/testing/libtool/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 116987 2011-03-27 06:40:02Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+# NOTE: requires rebuilt with each new gcc version
+
+pkgname=libtool
+pkgver=2.4
+pkgrel=3
+pkgdesc="A generic library support script"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/libtool"
+license=('GPL')
+depends=('sh' 'tar' 'texinfo')
+groups=('base-devel')
+options=('!libtool')
+install=libtool.install
+source=(ftp://ftp.gnu.org/pub/gnu/libtool/${pkgname}-${pkgver}.tar.xz)
+md5sums=('4e6144439d95d7332dc50ace6dd24c55')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/testing/libtool/libtool.install b/testing/libtool/libtool.install
new file mode 100644
index 000000000..424c8cb88
--- /dev/null
+++ b/testing/libtool/libtool.install
@@ -0,0 +1,22 @@
+infodir=/usr/share/info
+filelist=(libtool.info libtool.info-1 libtool.info-2)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/libx11/PKGBUILD b/testing/libx11/PKGBUILD
new file mode 100644
index 000000000..dcb20d9e6
--- /dev/null
+++ b/testing/libx11/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 117498 2011-04-04 08:36:52Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libx11
+pkgver=1.4.2
+pkgrel=2
+pkgdesc="X11 client-side library"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+depends=('libxcb' 'xproto' 'kbproto')
+makedepends=('xorg-util-macros' 'xextproto' 'xtrans' 'inputproto')
+options=('!libtool')
+license=('custom')
+source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.bz2
+ add-define-XK_SINHALA.patch
+ xorg.sh)
+sha1sums=('c93fc44dcc028319bee76f3e629ec43cfce42673'
+ '4f5ccff733042a6ea0fe41082903c332336a173c'
+ '4b756387426afb2a5bb7a155631ec42348abf5c1')
+
+build() {
+ cd "${srcdir}/libX11-${pkgver}"
+ patch -Np1 -i "${srcdir}/add-define-XK_SINHALA.patch"
+ ./configure --prefix=/usr --disable-static --disable-xf86bigfont
+ make
+ make check
+}
+
+package() {
+ cd "${srcdir}/libX11-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/etc/profile.d"
+ install -m755 "${srcdir}/xorg.sh" "${pkgdir}/etc/profile.d/"
+
+ install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/libx11/add-define-XK_SINHALA.patch b/testing/libx11/add-define-XK_SINHALA.patch
new file mode 100644
index 000000000..93a9f1f44
--- /dev/null
+++ b/testing/libx11/add-define-XK_SINHALA.patch
@@ -0,0 +1,25 @@
+From 25eb76b3d2726f2f1de759901971ae53b2539dc4 Mon Sep 17 00:00:00 2001
+From: Harshula Jayasuriya <harshula@gmail.com>
+Date: Mon, 21 Mar 2011 14:49:37 +0000
+Subject: Add #define XK_SINHALA
+
+Add #define XK_SINHALA so that the Sinhala keysyms can be used by
+the lk xkb keymap.
+
+Signed-off-by: Harshula Jayasuriya <harshula@gmail.com>
+Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+---
+diff --git a/src/KeyBind.c b/src/KeyBind.c
+index ac25ce2..221cedd 100644
+--- a/src/KeyBind.c
++++ b/src/KeyBind.c
+@@ -44,6 +44,7 @@ in this Software without prior written authorization from The Open Group.
+ #define XK_CAUCASUS
+ #define XK_VIETNAMESE
+ #define XK_XKB_KEYS
++#define XK_SINHALA
+ #include <X11/keysymdef.h>
+ #include <stdio.h>
+
+--
+cgit v0.8.3-6-g21f6
diff --git a/testing/libx11/xorg.sh b/testing/libx11/xorg.sh
new file mode 100644
index 000000000..e1de6866c
--- /dev/null
+++ b/testing/libx11/xorg.sh
@@ -0,0 +1,15 @@
+export XDG_DATA_HOME=$HOME/.local/share
+export XDG_CONFIG_HOME=$HOME/.config
+export XDG_CACHE_HOME=$HOME/.cache
+
+if [ -z $XDG_DATA_DIRS ]; then
+ export XDG_DATA_DIRS=/usr/share/:/usr/local/share/
+else
+ export XDG_DATA_DIRS=/usr/share/:/usr/local/share/:$XDG_DATA_DIRS
+fi
+
+if [ -z $XDG_CONFIG_DIRS ]; then
+ export XDG_CONFIG_DIRS=/etc/xdg
+else
+ export XDG_CONFIG_DIRS=/etc/xdg:$XDG_CONFIG_DIRS
+fi
diff --git a/testing/linux-api-headers/PKGBUILD b/testing/linux-api-headers/PKGBUILD
new file mode 100644
index 000000000..9dc5fb1f7
--- /dev/null
+++ b/testing/linux-api-headers/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 116973 2011-03-27 06:05:36Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+
+pkgname=linux-api-headers
+pkgver=2.6.38.1
+_basever=2.6.38
+pkgrel=1
+pkgdesc="Kernel headers sanitized for use in userspace"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/libc"
+license=('GPL2')
+provides=("kernel-headers=${pkgver}")
+conflicts=('kernel-headers')
+replaces=('kernel-headers')
+source=(http://www.kernel.org/pub/linux/kernel/v2.6/linux-${_basever}.tar.bz2
+ http://www.kernel.org/pub/linux/kernel/v2.6/patch-${pkgver}.bz2)
+md5sums=('7d471477bfa67546f902da62227fa976'
+ 'bd2be4d0465345e4e9355d6773f5f6fe')
+
+build() {
+ cd ${srcdir}/linux-${_basever}
+ [[ $pkgver != $_basever ]] && patch -Np1 -i ${srcdir}/patch-${pkgver}
+
+ make mrproper
+ make headers_check
+}
+
+package() {
+ cd ${srcdir}/linux-${_basever}
+ make INSTALL_HDR_PATH=${pkgdir}/usr headers_install
+
+ # use headers from libdrm
+ rm -rf ${pkgdir}/usr/include/drm
+
+ # clean-up unnecessary files generated during install
+ find ${pkgdir} -name .install -or -name ..install.cmd | xargs rm -f
+}
diff --git a/testing/lirc/PKGBUILD b/testing/lirc/PKGBUILD
new file mode 100644
index 000000000..1044223f1
--- /dev/null
+++ b/testing/lirc/PKGBUILD
@@ -0,0 +1,89 @@
+# $Id: PKGBUILD 117645 2011-04-04 14:50:26Z jgc $
+# Maintainer: Paul Mattal <paul@archlinux.org>
+
+pkgbase=lirc
+pkgname=('lirc' 'lirc-utils')
+pkgver=0.9.0
+pkgrel=2
+_kernver=2.6.38-ARCH
+arch=('i686' 'x86_64')
+url="http://www.lirc.org/"
+license=('GPL')
+makedepends=('help2man' 'kernel26-headers>=2.6.38' 'kernel26-headers<2.6.39' 'alsa-lib' 'libx11' 'libftdi' 'libirman' 'python')
+options=('!makeflags' '!strip')
+source=(http://prdownloads.sourceforge.net/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2
+ lircd lircmd lirc.logrotate lircd.conf irexec.conf irexecd)
+md5sums=('b232aef26f23fe33ea8305d276637086'
+ '8d0e238dc0eda95e340fe570605da492'
+ '85f7fdac55e5256967241864049bf5e9'
+ '3deb02604b37811d41816e9b4385fcc3'
+ '5b1f8c9cd788a39a6283f93302ce5c6e'
+ 'f0c0ac930326168035f0c8e24357ae55'
+ '69d099e6deedfa3c1ee2b6e82d9b8bfb')
+
+build() {
+ cd "${srcdir}/lirc-${pkgver}"
+
+ sed -i '/AC_PATH_XTRA/d' configure.ac
+ sed -e 's/@X_CFLAGS@//g' \
+ -e 's/@X_LIBS@//g' \
+ -e 's/@X_PRE_LIBS@//g' \
+ -e 's/@X_EXTRA_LIBS@//g' -i Makefile.am tools/Makefile.am
+ libtoolize
+ autoreconf
+
+ PYTHON=python2 ./configure --enable-sandboxed --prefix=/usr \
+ --with-driver=all --with-kerneldir=/usr/src/linux-${_kernver}/ \
+ --with-moduledir=/lib/modules/${_kernver}/kernel/drivers/misc \
+ --with-transmitter
+
+ # Remove drivers already in kernel
+ sed -e "s:lirc_dev::" -e "s:lirc_bt829::" -e "s:lirc_igorplugusb::" \
+ -e "s:lirc_imon::" -e "s:lirc_parallel::" -e "s:lirc_sasem::" \
+ -e "s:lirc_serial::" -e "s:lirc_sir::" -e "s:lirc_ttusbir::" \
+ -i Makefile drivers/Makefile drivers/*/Makefile tools/Makefile
+ make
+}
+
+package_lirc() {
+ pkgdesc="Linux Infrared Remote Control kernel modules for stock arch kernel"
+ depends=('lirc-utils' 'kernel26>=2.6.38' 'kernel26<2.6.39')
+ replaces=('lirc+pctv')
+ install=lirc.install
+
+ cd "${srcdir}/lirc-${pkgver}/drivers"
+ make DESTDIR="${pkgdir}" install
+
+ # set the kernel we've built for inside the install script
+ sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" "${startdir}/lirc.install"
+ # gzip -9 modules
+ find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
+}
+
+package_lirc-utils() {
+ pkgdesc="Linux Infrared Remote Control utils"
+ depends=('alsa-lib' 'libx11' 'libftdi' 'libirman')
+ optdepends=('python2: pronto2lirc utility')
+ options=('strip' '!libtool')
+
+ cd "${srcdir}/lirc-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -d "${pkgdir}/usr/share/lirc" "${pkgdir}/etc/rc.d"
+ cp "${srcdir}"/{lircd,lircmd,irexecd} "${pkgdir}/etc/rc.d"
+ cp -rp remotes "${pkgdir}/usr/share/lirc"
+ chmod -R go-w "${pkgdir}/usr/share/lirc/"
+
+ # install the logrotate config
+ install -Dm644 "${srcdir}/lirc.logrotate" "${pkgdir}/etc/logrotate.d/lirc"
+
+ # install conf.d file
+ install -Dm644 "${srcdir}/lircd.conf" "${pkgdir}/etc/conf.d/lircd.conf"
+
+ # install conf.d file
+ install -Dm644 "${srcdir}/irexec.conf" "${pkgdir}/etc/conf.d/irexec.conf"
+
+ install -d "${pkgdir}/etc/lirc"
+
+ # remove built modules
+ rm -r "${pkgdir}/lib/"
+}
diff --git a/testing/lirc/irexec.conf b/testing/lirc/irexec.conf
new file mode 100644
index 000000000..f911c7515
--- /dev/null
+++ b/testing/lirc/irexec.conf
@@ -0,0 +1,5 @@
+#
+# Parameters for irexec daemon (path to lircrc)
+#
+
+IREXEC_OPTS="" \ No newline at end of file
diff --git a/testing/lirc/irexecd b/testing/lirc/irexecd
new file mode 100755
index 000000000..a64b033a5
--- /dev/null
+++ b/testing/lirc/irexecd
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/irexec.conf
+
+PID=`pidof -o %PPID /usr/bin/irexec`
+case "$1" in
+ start)
+ stat_busy "Starting IREXEC Daemon"
+ [ -z "$PID" ] && /usr/bin/irexec --daemon $IREXEC_OPTS
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon irexecd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping IREXEC Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon irexecd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
+
diff --git a/testing/lirc/lirc.install b/testing/lirc/lirc.install
new file mode 100644
index 000000000..61151ecf5
--- /dev/null
+++ b/testing/lirc/lirc.install
@@ -0,0 +1,16 @@
+KERNEL_VERSION=2.6.38-ARCH
+
+post_install() {
+ # updating module dependencies
+ echo ">>> Updating module dependencies. Please wait ..."
+ depmod $KERNEL_VERSION > /dev/null 2>&1
+}
+
+post_upgrade() {
+ post_install
+}
+
+# arg 1: the old package version
+post_remove() {
+ post_install
+}
diff --git a/testing/lirc/lirc.logrotate b/testing/lirc/lirc.logrotate
new file mode 100644
index 000000000..623c4f328
--- /dev/null
+++ b/testing/lirc/lirc.logrotate
@@ -0,0 +1,5 @@
+/var/log/lircd {
+ missingok
+ notifempty
+ delaycompress
+}
diff --git a/testing/lirc/lircd b/testing/lirc/lircd
new file mode 100755
index 000000000..e9739b36e
--- /dev/null
+++ b/testing/lirc/lircd
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/lircd.conf
+
+PID=$(pidof -o %PPID /usr/sbin/lircd)
+LIRCD_SYMLINKFILE=/dev/lircd
+LIRCD_SOCKET=/var/run/lirc/lircd
+case "$1" in
+ start)
+ stat_busy "Starting LIRC Daemon"
+ [ ! -d /var/run/lirc ] && install -d /var/run/lirc &>/dev/null
+ rm -f $LIRCD_SOCKET && ln -s $LIRCD_SOCKET $LIRCD_SYMLINKFILE
+ if [ $? -ne 0 ]; then
+ stat_fail
+ exit 0
+ fi
+ [ -n "$LIRC_DRIVER" ] && LIRC_EXTRAOPTS="-H $LIRC_DRIVER $LIRC_EXTRAOPTS"
+ [ -z "$PID" ] &&
+ if [ -n "$LIRC_DEVICE" ] ; then
+ eval /usr/sbin/lircd -d "$LIRC_DEVICE" $LIRC_EXTRAOPTS $LIRC_CONFIGFILE
+ else
+ /usr/sbin/lircd $LIRC_EXTRAOPTS $LIRC_CONFIGFILE
+ fi
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon lircd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping LIRC Daemon"
+ rm -f $LIRCD_SYMLINKFILE
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon lircd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 start|stop|restart"
+esac
+exit 0
diff --git a/testing/lirc/lircd.conf b/testing/lirc/lircd.conf
new file mode 100644
index 000000000..760dab065
--- /dev/null
+++ b/testing/lirc/lircd.conf
@@ -0,0 +1,8 @@
+#
+# Parameters for lirc daemon
+#
+
+LIRC_DEVICE="/dev/lirc0"
+LIRC_DRIVER=""
+LIRC_EXTRAOPTS=""
+LIRC_CONFIGFILE=""
diff --git a/testing/lirc/lircmd b/testing/lirc/lircmd
new file mode 100755
index 000000000..220c47c9c
--- /dev/null
+++ b/testing/lirc/lircmd
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/lircmd`
+case "$1" in
+ start)
+ stat_busy "Starting lircmd Daemon"
+ [ -z "$PID" ] && /usr/sbin/lircmd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon lircmd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping lircmd Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon lircmd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/madwifi/PKGBUILD b/testing/madwifi/PKGBUILD
new file mode 100644
index 000000000..1c1d9e484
--- /dev/null
+++ b/testing/madwifi/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id: PKGBUILD 115939 2011-03-22 14:09:32Z tpowa $
+# Originally by kleptophobiac <kleptophobiac@gmail.com>
+# Modified by James Rayner for the repositories <iphitus@gmail.com>
+
+_kernver=2.6.38-ARCH
+
+pkgname=madwifi
+pkgver=0.9.4.4136
+pkgrel=2
+pkgdesc="Madwifi drivers for Atheros wireless chipsets. For stock arch 2.6 kernel"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://madwifi-project.org"
+depends=('madwifi-utils' 'kernel26>=2.6.38' 'kernel26<2.6.39')
+makedepends=('kernel26-headers>=2.6.38' 'kernel26-headers<2.6.39')
+makedepends=('sharutils')
+install=madwifi-ng.install
+# subversion source: svn checkout http:/madwifi-project.org/svn/madwifi/trunk madwifi
+source=(ftp://ftp.archlinux.org/other/madwifi/madwifi-${pkgver}.tar.bz2
+ #http://downloads.sourceforge.net/madwifi/madwifi-${pkgver}.tar.gz
+ )
+options=(!strip)
+
+build() {
+ [ "${CARCH}" = "i686" ] && export ARCH=i386
+
+ #cd $startdir/src/$pkgname-$pkgver
+ cd $startdir/src/$pkgname
+ sed -i -e 's/-Werror//g' Makefile.inc
+ make KERNELPATH=/lib/modules/$_kernver/build KERNELRELEASE=$_kernver modules
+}
+
+package() {
+ cd $startdir/src/$pkgname
+ make KERNELPATH=/lib/modules/$_kernver/build KERNELRELEASE=$_kernver modules \
+ DESTDIR=$startdir/pkg KERNELRELEASE=$_kernver install-modules
+ sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
+
+ # install to wireless kernel directory
+ mkdir -p $startdir/pkg/lib/modules/$_kernver/kernel/drivers/net/wireless/madwifi
+ mv $startdir/pkg/lib/modules/$_kernver/net/* $startdir/pkg/lib/modules/$_kernver/kernel/drivers/net/wireless/madwifi
+ rm -r $startdir/pkg/lib/modules/$_kernver/net/
+ # gzip -9 modules
+ find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;
+}
+md5sums=('f705acf5597ebe070efeaeb6c330748f')
diff --git a/testing/madwifi/kernel-2.6.30.patch b/testing/madwifi/kernel-2.6.30.patch
new file mode 100644
index 000000000..f844668de
--- /dev/null
+++ b/testing/madwifi/kernel-2.6.30.patch
@@ -0,0 +1,14 @@
+--- ath/if_athvar.h~ 2009-06-13 09:38:53.000000000 +0200
++++ ath/if_athvar.h 2009-06-13 09:38:53.000000000 +0200
+@@ -103,11 +103,6 @@
+ /*
+ * Guess how the interrupt handler should work.
+ */
+-#if !defined(IRQ_NONE)
+-typedef void irqreturn_t;
+-#define IRQ_NONE
+-#define IRQ_HANDLED
+-#endif /* !defined(IRQ_NONE) */
+
+ #ifndef SET_MODULE_OWNER
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
diff --git a/testing/madwifi/madwifi-ng.install b/testing/madwifi/madwifi-ng.install
new file mode 100644
index 000000000..8681b53ed
--- /dev/null
+++ b/testing/madwifi/madwifi-ng.install
@@ -0,0 +1,14 @@
+post_install() {
+ KERNEL_VERSION='2.6.38-ARCH'
+ depmod -ae $KERNEL_VERSION > /dev/null 2>&1
+}
+
+post_upgrade() {
+ KERNEL_VERSION='2.6.38-ARCH'
+ depmod -ae $KERNEL_VERSION > /dev/null 2>&1
+}
+
+post_remove() {
+ KERNEL_VERSION='2.6.38-ARCH'
+ depmod -ae $KERNEL_VERSION > /dev/null 2>&1
+}
diff --git a/testing/make/PKGBUILD b/testing/make/PKGBUILD
new file mode 100644
index 000000000..bba3253fc
--- /dev/null
+++ b/testing/make/PKGBUILD
@@ -0,0 +1,45 @@
+# $Id: PKGBUILD 110342 2011-02-18 22:21:30Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=make
+pkgver=3.82
+pkgrel=3
+pkgdesc="GNU make utility to maintain groups of programs"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/make"
+license=('GPL3')
+groups=('base-devel')
+depends=('glibc' 'sh')
+install=$pkgname.install
+source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ bug30612.patch
+ bug30723.patch
+ make-3.82-sort-blank.patch)
+md5sums=('1a11100f3c63fcf5753818e59d63088f'
+ 'c8f496b22191f9fb9420ab14c1a19a47'
+ '662e6450e19a5acdaa5c9fcb8ad78dea'
+ '7d01a99f389d8f08dec93ed479071ee4')
+
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # http://savannah.gnu.org/bugs/?30612
+ patch -Np1 -i $srcdir/bug30612.patch
+
+ # http://savannah.gnu.org/bugs/?30723
+ patch -Np1 -i $srcdir/bug30723.patch
+
+ # https://bugs.archlinux.org/task/22733 (fix from Fedora)
+ patch -Np1 -i $srcdir/make-3.82-sort-blank.patch
+
+ ./configure --prefix=/usr
+ make
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/testing/make/bug30612.patch b/testing/make/bug30612.patch
new file mode 100644
index 000000000..fb843bcd9
--- /dev/null
+++ b/testing/make/bug30612.patch
@@ -0,0 +1,66 @@
+diff -Naur make-3.82-orig/main.c make-3.82-fix30612//main.c
+--- make-3.82-orig/main.c 2010-07-19 17:10:53.000000000 +1000
++++ make-3.82-fix30612//main.c 2010-09-23 23:33:37.908855839 +1000
+@@ -1,3 +1,4 @@
++
+ /* Argument parsing and main program of GNU Make.
+ Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+@@ -1138,7 +1139,7 @@
+ a macro and some compilers (MSVC) don't like conditionals in macros. */
+ {
+ const char *features = "target-specific order-only second-expansion"
+- " else-if shortest-stem undefine"
++ " else-if shortest-stem undefine oneshell"
+ #ifndef NO_ARCHIVES
+ " archives"
+ #endif
+diff -Naur make-3.82-orig/read.c make-3.82-fix30612//read.c
+--- make-3.82-orig/read.c 2010-07-13 11:20:42.000000000 +1000
++++ make-3.82-fix30612//read.c 2010-09-23 23:30:58.018855839 +1000
+@@ -3028,7 +3028,7 @@
+ {
+ /* This looks like the first element in an open archive group.
+ A valid group MUST have ')' as the last character. */
+- const char *e = p + nlen;
++ const char *e = p;
+ do
+ {
+ e = next_token (e);
+@@ -3084,19 +3084,19 @@
+ Go to the next item in the string. */
+ if (flags & PARSEFS_NOGLOB)
+ {
+- NEWELT (concat (2, prefix, tp));
++ NEWELT (concat (2, prefix, tmpbuf));
+ continue;
+ }
+
+ /* If we get here we know we're doing glob expansion.
+ TP is a string in tmpbuf. NLEN is no longer used.
+ We may need to do more work: after this NAME will be set. */
+- name = tp;
++ name = tmpbuf;
+
+ /* Expand tilde if applicable. */
+- if (tp[0] == '~')
++ if (tmpbuf[0] == '~')
+ {
+- tildep = tilde_expand (tp);
++ tildep = tilde_expand (tmpbuf);
+ if (tildep != 0)
+ name = tildep;
+ }
+@@ -3152,7 +3152,11 @@
+ else
+ {
+ /* We got a chain of items. Attach them. */
+- (*newp)->next = found;
++ if (*newp)
++ (*newp)->next = found;
++ else
++ *newp = found;
++
+
+ /* Find and set the new end. Massage names if necessary. */
+ while (1)
diff --git a/testing/make/bug30723.patch b/testing/make/bug30723.patch
new file mode 100644
index 000000000..84e7ebe7a
--- /dev/null
+++ b/testing/make/bug30723.patch
@@ -0,0 +1,12 @@
+diff -Naur make-3.82-orig/main.c make-3.82-fix30723//main.c
+--- make-3.82-orig/main.c 2010-07-19 17:10:53.000000000 +1000
++++ make-3.82-fix30723//main.c 2010-09-23 23:34:10.932188592 +1000
+@@ -2093,7 +2093,7 @@
+ const char *pv = define_makeflags (1, 1);
+ char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
+ sprintf (p, "MAKEFLAGS=%s", pv);
+- putenv (p);
++ putenv (allocated_variable_expand (p));
+ }
+
+ if (ISDB (DB_BASIC))
diff --git a/testing/make/make-3.82-sort-blank.patch b/testing/make/make-3.82-sort-blank.patch
new file mode 100644
index 000000000..2e73f5b7c
--- /dev/null
+++ b/testing/make/make-3.82-sort-blank.patch
@@ -0,0 +1,17 @@
+diff -urp make-3.82/function.c make-3.82-pm/function.c
+--- make-3.82/function.c 2010-07-13 03:20:39.000000000 +0200
++++ make-3.82-pm/function.c 2010-10-27 01:43:27.000000000 +0200
+@@ -1138,12 +1138,12 @@ func_sort (char *o, char **argv, const c
+ {
+ char c = *(t++);
+
+- if (! isspace ((unsigned char)c))
++ if (! isblank ((unsigned char)c))
+ continue;
+
+ ++wordi;
+
+- while (isspace ((unsigned char)*t))
++ while (isblank ((unsigned char)*t))
+ ++t;
+ }
diff --git a/testing/make/make.install b/testing/make/make.install
new file mode 100644
index 000000000..6cf8b0dc4
--- /dev/null
+++ b/testing/make/make.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(make.info make.info-1 make.info-2)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/mdadm/PKGBUILD b/testing/mdadm/PKGBUILD
new file mode 100644
index 000000000..d6c56b553
--- /dev/null
+++ b/testing/mdadm/PKGBUILD
@@ -0,0 +1,45 @@
+# $Id: PKGBUILD 117346 2011-03-31 06:36:59Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+pkgname=mdadm
+pkgver=3.2.1
+pkgrel=1
+pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.cse.unsw.edu.au/~neilb/source/mdadm/"
+groups=('base')
+conflicts=('mkinitcpio<0.5.99')
+depends=('glibc')
+backup=('etc/mdadm.conf')
+source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2
+ mdadm
+ mdadm.conf
+ mdadm_install
+ mdadm_hook)
+install=mdadm.install
+replaces=('raidtools')
+md5sums=('d1e2549202bd79d9e99f1498d1109530'
+ '7bff0e506fb6017510c8ec4a01896952'
+ '00cbed931db4f15b6ce49e3e7d433966'
+ '865c3d39e5f5dae58388160b563981f1'
+ '1a3eb63832cecd6550f5b0a21d58cfdb')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make CXFLAGS="$CFLAGS"
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make INSTALL=/bin/install DESTDIR=$pkgdir install
+ install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
+ install -D -m755 ../mdadm $pkgdir/etc/rc.d/mdadm
+ install -D -m644 ../mdadm_install $pkgdir/lib/initcpio/install/mdadm
+ install -D -m644 ../mdadm_hook $pkgdir/lib/initcpio/hooks/mdadm
+ # symlink for backward compatibility
+ ln -sf /lib/initcpio/hooks/mdadm $pkgdir/lib/initcpio/hooks/raid
+ # build static mdassemble for Arch's initramfs
+ make MDASSEMBLE_AUTO=1 mdassemble
+ install -D -m755 mdassemble $pkgdir/sbin/mdassemble
+}
diff --git a/testing/mdadm/mdadm b/testing/mdadm/mdadm
new file mode 100755
index 000000000..918a62537
--- /dev/null
+++ b/testing/mdadm/mdadm
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /sbin/mdadm`
+case "$1" in
+ start)
+ stat_busy "Starting mdadm RAID Monitor"
+ if [ -z "$PID" ]; then
+ /sbin/mdadm --monitor --scan -i /var/run/mdadm.pid -f
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ mdadm --monitor --oneshot --scan
+ add_daemon mdadm
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping mdadm RAID Monitor"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mdadm
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/testing/mdadm/mdadm.conf b/testing/mdadm/mdadm.conf
new file mode 100644
index 000000000..57bd4c683
--- /dev/null
+++ b/testing/mdadm/mdadm.conf
@@ -0,0 +1,67 @@
+# mdadm configuration file
+#
+# mdadm will function properly without the use of a configuration file,
+# but this file is useful for keeping track of arrays and member disks.
+# In general, a mdadm.conf file is created, and updated, after arrays
+# are created. This is the opposite behavior of /etc/raidtab which is
+# created prior to array construction.
+#
+#
+# the config file takes two types of lines:
+#
+# DEVICE lines specify a list of devices of where to look for
+# potential member disks
+#
+# ARRAY lines specify information about how to identify arrays so
+# so that they can be activated
+#
+
+
+# You can have more than one device line and use wild cards. The first
+# example includes SCSI the first partition of SCSI disks /dev/sdb,
+# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
+# line looks for array slices on IDE disks.
+#
+#DEVICE /dev/sd[bcdjkl]1
+#DEVICE /dev/hda1 /dev/hdb1
+#
+# The designation "partitions" will scan all partitions found in
+# /proc/partitions
+DEVICE partitions
+
+
+# ARRAY lines specify an array to assemble and a method of identification.
+# Arrays can currently be identified by using a UUID, superblock minor number,
+# or a listing of devices.
+#
+# super-minor is usually the minor number of the metadevice
+# UUID is the Universally Unique Identifier for the array
+# Each can be obtained using
+#
+# mdadm -D <md>
+#
+# To capture the UUIDs for all your RAID arrays to this file, run these:
+# to get a list of running arrays:
+# # mdadm -D --scan >>/etc/mdadm.conf
+# to get a list from superblocks:
+# # mdadm -E --scan >>/etc/mdadm.conf
+#
+#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
+#ARRAY /dev/md1 super-minor=1
+#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
+#
+# ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor
+# will then move a spare between arrays in a spare-group if one array has a
+# failed drive but no spare
+#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
+#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
+#
+
+
+# When used in --follow (aka --monitor) mode, mdadm needs a
+# mail address and/or a program. To start mdadm's monitor mode, add
+# "mdadm" to your DAEMONS array in /etc/rc.conf
+#
+# If the lines are not found, mdadm will exit quietly
+#MAILADDR root@mydomain.tld
+#PROGRAM /usr/sbin/handle-mdadm-events
diff --git a/testing/mdadm/mdadm.install b/testing/mdadm/mdadm.install
new file mode 100644
index 000000000..e8404c260
--- /dev/null
+++ b/testing/mdadm/mdadm.install
@@ -0,0 +1,10 @@
+# arg 1: the new package version
+# arg 2: the old package version
+
+post_upgrade() {
+ if [ "$(vercmp $2 2.6.8-2)" -lt 0 -a "$(grep raid_partitions /etc/mkinitcpio.conf)" ]; then
+ echo "Attention mdadm update:"
+ echo "raid_partitions hook has been replaced by the more powerfull mdadm hook."
+ echo "Please update your /etc/mkinitcpio.conf accordingly."
+ fi
+}
diff --git a/testing/mdadm/mdadm_hook b/testing/mdadm/mdadm_hook
new file mode 100755
index 000000000..57799d3b8
--- /dev/null
+++ b/testing/mdadm/mdadm_hook
@@ -0,0 +1,44 @@
+# vim: set ft=sh:
+run_hook ()
+{
+ input="$(cat /proc/cmdline)"
+ mdconfig="/etc/mdadm.conf"
+ # for partitionable raid, we need to load md_mod first!
+ modprobe md_mod 2>/dev/null
+ # If md is specified on commandline, create config file from those parameters.
+ if [ "$(echo $input | grep "md=")" ]; then
+ #Create initial mdadm.conf
+ # scan all devices in /proc/partitions
+ echo DEVICE partitions > $mdconfig
+ for i in $input; do
+ case $i in
+ # raid
+ md=[0-9]*,/*)
+ device="$(echo "$i" | sed -e 's|,/.*||g' -e 's|=||g')"
+ array="$(echo $i | cut -d, -f2-)"
+ echo "ARRAY /dev/$device devices=$array" >> $mdconfig
+ ;;
+ # partitionable raid
+ md=d[0-9]*,/*)
+ device="$(echo "$i" | sed -e 's|,/.*||g' -e 's|=|_|g')"
+ array="$(echo $i | cut -d, -f2-)"
+ echo "ARRAY /dev/$device devices=$array" >> $mdconfig
+ ;;
+ # raid UUID
+ md=[0-9]*,[0-9,a-z]*)
+ device="$(echo "$i" | sed -e 's|,.*||g' -e 's|=||g')"
+ array="$(echo $i | cut -d, -f2-)"
+ echo "ARRAY /dev/$device UUID=$array" >> $mdconfig
+ ;;
+ # partitionable raid UUID
+ md=d[0-9]*,[0-9,a-z]*)
+ device="$(echo "$i" | sed -e 's|,.*||g' -e 's|=|_|g')"
+ array="$(echo $i | cut -d, -f2-)"
+ echo "ARRAY /dev/$device UUID=$array" >> $mdconfig
+ ;;
+ esac
+ done
+ fi
+ # assemble everything
+ [ -e $mdconfig ] && /sbin/mdassemble
+} \ No newline at end of file
diff --git a/testing/mdadm/mdadm_install b/testing/mdadm/mdadm_install
new file mode 100644
index 000000000..b7a57ea4e
--- /dev/null
+++ b/testing/mdadm/mdadm_install
@@ -0,0 +1,46 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") "
+ BINARIES=""
+ FILES=""
+ SCRIPT="mdadm"
+ # check if a custom mdadm.conf exists
+ if grep -q ^ARRAY /etc/mdadm.conf; then
+ echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
+ add_file "/etc/mdadm.conf"
+ fi
+ add_binary "/sbin/mdassemble"
+ add_file "/lib/udev/rules.d/64-md-raid.rules"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for any raid root device,
+ and assembles the raid device when run.
+
+ If arrays are defined in /etc/mdadm.conf, the file will be used instead
+ of command line assembling.
+
+ Command Line Setup:
+ - for raid arrays with persistent superblocks:
+ md=<md device no.>,dev0,dev1,...,devn
+ md=<md device no.>,uuid
+ - for partitionable raid arrays with persistent superblocks:
+ md=d<md device no.>,dev0,dev1,...,devn
+ md=d<md device no.>,uuid
+
+ Parameters:
+ - <md device no.> = the number of the md device:
+ 0 means md0, 1 means md1, ...
+ - <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
+ or 0900878d:f95f6057:c39a36e9:55efa60a
+ Examples:
+ - md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
+ This will setup 2 md partitionable arrays.
+ - md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
+ This will setup 2 md arrays with persistent superblocks.
+HELPEOF
+}
diff --git a/testing/mesa/LICENSE b/testing/mesa/LICENSE
new file mode 100644
index 000000000..ae33d2709
--- /dev/null
+++ b/testing/mesa/LICENSE
@@ -0,0 +1,82 @@
+Disclaimer
+
+Mesa is a 3-D graphics library with an API which is very similar to
+that of OpenGL*
+To the extent that Mesa utilizes the OpenGL command syntax or state
+machine, it is being used with authorization from Silicon Graphics,
+Inc.(SGI). However, the author does not possess an OpenGL license
+from SGI, and makes no claim that Mesa is in any way a compatible
+replacement for OpenGL or associated with SGI. Those who want a
+licensed implementation of OpenGL should contact a licensed
+vendor.
+
+Please do not refer to the library as MesaGL (for legal
+reasons). It's just Mesa or The Mesa 3-D graphics
+library
+
+* OpenGL is a trademark of Silicon Graphics Incorporated.
+
+License / Copyright Information
+
+The Mesa distribution consists of several components. Different copyrights
+and licenses apply to different components. For example, GLUT is copyrighted
+by Mark Kilgard, some demo programs are copyrighted by SGI, some of the Mesa
+device drivers are copyrighted by their authors. See below for a list of
+Mesa's main components and the license for each.
+
+The core Mesa library is licensed according to the terms of the MIT license.
+This allows integration with the XFree86, Xorg and DRI projects.
+
+The default Mesa license is as follows:
+
+Copyright (C) 1999-2007 Brian Paul 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 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
+BRIAN PAUL 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.
+
+Attention, Contributors
+
+When contributing to the Mesa project you must agree to the licensing terms
+of the component to which you're contributing.
+The following section lists the primary components of the Mesa distribution
+and their respective licenses.
+
+
+Mesa Component Licenses
+
+Component Location Primary Author License
+----------------------------------------------------------------------------
+Main Mesa code src/mesa/ Brian Paul Mesa (MIT)
+
+Device drivers src/mesa/drivers/* See drivers See drivers
+
+Ext headers include/GL/glext.h SGI SGI Free B
+ include/GL/glxext.h
+
+GLUT src/glut/ Mark Kilgard Mark's copyright
+
+Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL
+
+SGI GLU library src/glu/sgi/ SGI SGI Free B
+
+demo programs progs/demos/ various see source files
+
+X demos progs/xdemos/ Brian Paul see source files
+
+SGI demos progs/samples/ SGI SGI copyright
+
+RedBook demos progs/redbook/ SGI SGI copyright
diff --git a/testing/mesa/PKGBUILD b/testing/mesa/PKGBUILD
new file mode 100644
index 000000000..26997608b
--- /dev/null
+++ b/testing/mesa/PKGBUILD
@@ -0,0 +1,342 @@
+# $Id: PKGBUILD 117470 2011-04-03 17:24:19Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+
+pkgbase=mesa
+pkgname=('mesa' 'libgl' 'libgles' 'libegl' 'ati-dri' 'intel-dri' 'unichrome-dri' 'mach64-dri' 'mga-dri' 'r128-dri' 'savage-dri' 'sis-dri' 'tdfx-dri' 'nouveau-dri')
+
+#_git=true
+_git=false
+
+if [ "${_git}" = "true" ]; then
+ pkgver=7.10.0.git20110215
+ else
+ pkgver=7.10.1
+fi
+pkgrel=2
+arch=('i686' 'x86_64')
+makedepends=('glproto>=1.4.12' 'pkgconfig' 'libdrm>=2.4.23' 'libxxf86vm>=1.1.0' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.3.5' 'libxt>=1.0.8'
+ 'gcc-libs>=4.5' 'dri2proto=2.3' 'python2' 'libxml2' 'imake')
+url="http://mesa3d.sourceforge.net"
+license=('custom')
+source=(LICENSE)
+if [ "${_git}" = "true" ]; then
+ # mesa git shot from 7.10 branch - see for state: http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.10&id=cc1636b6db85604510f97f8a37d7fd0ecf453866
+ source=(${source[@]} 'ftp://ftp.archlinux.org/other/mesa/mesa-cc1636b6db85604510f97f8a37d7fd0ecf453866.tar.bz2')
+ else
+ source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2"
+ gnome-shell-shader-fix.patch)
+fi
+md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
+ 'efe8da4d80c2a5d32a800770b8ce5dfa'
+ '3ec78f340f9387abd7a37b195e764cbf')
+
+build() {
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*
+ autoreconf -vfi
+ else
+ cd "${srcdir}/Mesa-${pkgver}"
+fi
+
+#backport from master to fix gnome-shell shader
+#https://bugs.freedesktop.org/show_bug.cgi?id=35714
+patch -Np1 -i "${srcdir}/gnome-shell-shader-fix.patch"
+
+if [ "${_git}" = "true" ]; then
+ ./autogen.sh --prefix=/usr \
+ --with-dri-driverdir=/usr/lib/xorg/modules/dri \
+ --enable-gallium-radeon \
+ --enable-gallium-r600 \
+ --enable-gallium-nouveau \
+ --enable-gallium-swrast \
+ --enable-glx-tls \
+ --with-driver=dri \
+ --enable-xcb \
+ --with-state-trackers=dri,glx \
+ --disable-glut \
+ --enable-gles1 \
+ --enable-gles2 \
+ --enable-egl \
+ --disable-gallium-egl
+ else
+ ./configure --prefix=/usr \
+ --with-dri-driverdir=/usr/lib/xorg/modules/dri \
+ --enable-gallium-radeon \
+ --enable-gallium-r600 \
+ --enable-gallium-nouveau \
+ --enable-gallium-swrast \
+ --enable-glx-tls \
+ --with-driver=dri \
+ --enable-xcb \
+ --with-state-trackers=dri,glx \
+ --disable-glut \
+ --enable-gles1 \
+ --enable-gles2 \
+ --enable-egl \
+ --disable-gallium-egl
+fi
+
+ make
+}
+
+package_libgl() {
+ depends=('libdrm>=2.4.22' 'libxxf86vm>=1.1.0' 'libxdamage>=1.1.3' 'expat>=2.0.1')
+ pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*
+ else
+ cd "${srcdir}/Mesa-${pkgver}"
+fi
+ install -m755 -d "${pkgdir}/usr/lib"
+ install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
+
+ bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
+
+ cd src/mesa/drivers/dri
+ #make -C swrast DESTDIR="${pkgdir}" install
+if [ "${_git}" = "true" ]; then
+ make -C ${srcdir}/mesa-*/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
+ else
+ make -C ${srcdir}/Mesa-${pkgver}/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
+fi
+ ln -s swrastg_dri.so "${pkgdir}/usr/lib/xorg/modules/dri/swrast_dri.so"
+ ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/libgl"
+ install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl/"
+}
+
+package_libgles() {
+ depends=('libgl')
+ pkgdesc="Mesa GLES libraries and headers"
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*
+ else
+ cd "${srcdir}/Mesa-${pkgver}"
+fi
+ install -m755 -d "${pkgdir}/usr/lib"
+ install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
+ install -m755 -d "${pkgdir}/usr/include"
+ install -m755 -d "${pkgdir}/usr/include/GLES"
+ install -m755 -d "${pkgdir}/usr/include/GLES2"
+ bin/minstall lib/libGLESv* "${pkgdir}/usr/lib/"
+ bin/minstall src/mapi/es1api/glesv1_cm.pc "${pkgdir}/usr/lib/pkgconfig/"
+ bin/minstall src/mapi/es2api/glesv2.pc "${pkgdir}/usr/lib/pkgconfig/"
+ bin/minstall include/GLES/* "${pkgdir}/usr/include/GLES/"
+ bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
+ bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/libgles"
+ install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgles/"
+}
+
+package_libegl() {
+ depends=('libgl')
+ pkgdesc="Mesa libEGL libraries and headers"
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*
+ else
+ cd "${srcdir}/Mesa-${pkgver}"
+fi
+ install -m755 -d "${pkgdir}/usr/lib"
+ install -m755 -d "${pkgdir}/usr/lib/egl"
+ install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
+ install -m755 -d "${pkgdir}/usr/include"
+ install -m755 -d "${pkgdir}/usr/include/"
+ install -m755 -d "${pkgdir}/usr/include/EGL"
+ install -m755 -d "${pkgdir}/usr/include/KHR"
+ install -m755 -d "${pkgdir}/usr/share"
+ install -m755 -d "${pkgdir}/usr/share/doc"
+ install -m755 -d "${pkgdir}/usr/share/doc/libegl"
+ bin/minstall lib/libEGL.so* "${pkgdir}/usr/lib/"
+ bin/minstall lib/egl/* "${pkgdir}/usr/lib/egl/"
+ bin/minstall src/egl/main/egl.pc "${pkgdir}/usr/lib/pkgconfig/"
+ bin/minstall include/EGL/* "${pkgdir}/usr/include/EGL/"
+ bin/minstall include/KHR/khrplatform.h "${pkgdir}/usr/include/KHR/"
+ bin/minstall docs/egl.html "${pkgdir}/usr/share/doc/libegl/"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/libegl"
+ install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libegl/"
+}
+package_mesa() {
+ depends=('libgl' 'libx11>=1.3.5' 'libxt>=1.0.8' 'gcc-libs>=4.5' 'dri2proto=2.3' 'libdrm>=2.4.22' 'glproto>=1.4.12')
+ optdepends=('opengl-man-pages: for the OpenGL API man pages')
+ pkgdesc="Mesa 3-D graphics libraries and include files"
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*
+ else
+ cd "${srcdir}/Mesa-${pkgver}"
+fi
+ make DESTDIR="${pkgdir}" install
+
+ rm -f "${pkgdir}/usr/lib/libGL.so"*
+ rm -f "${pkgdir}/usr/lib/libGLESv"*
+ rm -f "${pkgdir}/usr/lib/libEGL"*
+ rm -rf "${pkgdir}/usr/lib/egl"
+ rm -f ${pkgdir}/usr/lib/pkgconfig/{glesv1_cm.pc,glesv2.pc,egl.pc}
+ rm -rf "${pkgdir}/usr/lib/xorg"
+ rm -f "${pkgdir}/usr/include/GL/glew.h"
+ rm -f "${pkgdir}/usr/include/GL/glxew.h"
+ rm -f "${pkgdir}/usr/include/GL/wglew.h"
+ rm -f "${pkgdir}/usr/include/GL/glut.h"
+ rm -rf ${pkgdir}/usr/include/{GLES,GLES2,EGL,KHR}
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
+ install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
+}
+
+package_ati-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI + Gallium3D r300 drivers for AMD/ATI Radeon"
+ conflicts=('xf86-video-ati<6.9.0-6')
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C radeon DESTDIR="${pkgdir}" install
+ make -C r200 DESTDIR="${pkgdir}" install
+ # classic mesa driver for R300 r300_dri.so
+ #make -C r300 DESTDIR="${pkgdir}" install <------- deprecated
+ # gallium3D driver for R300 r300_dri.so
+if [ "${_git}" = "true" ]; then
+ make -C ${srcdir}/mesa-*/src/gallium/targets/dri-r300 DESTDIR="${pkgdir}" install
+ make -C ${srcdir}/mesa-*/src/gallium/targets/dri-r600 DESTDIR="${pkgdir}" install
+ else
+ make -C ${srcdir}/Mesa-${pkgver}/src/gallium/targets/dri-r300 DESTDIR="${pkgdir}" install
+ make -C ${srcdir}/Mesa-${pkgver}/src/gallium/targets/dri-r600 DESTDIR="${pkgdir}" install
+fi
+ #make -C r600 DESTDIR="${pkgdir}" install
+}
+
+package_intel-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI drivers for Intel"
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C i810 DESTDIR="${pkgdir}" install
+ make -C i915 DESTDIR="${pkgdir}" install
+ make -C i965 DESTDIR="${pkgdir}" install
+}
+
+package_unichrome-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI drivers for S3 Graphics/VIA Unichrome"
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C unichrome DESTDIR="${pkgdir}" install
+}
+
+package_mach64-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI drivers for ATI Mach64"
+ conflicts=('xf86-video-mach64<6.8.2')
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C mach64 DESTDIR="${pkgdir}" install
+}
+
+package_mga-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI drivers for Matrox"
+ conflicts=('xf86-video-mga<1.4.11')
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C mga DESTDIR="${pkgdir}" install
+}
+
+package_r128-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI drivers for ATI Rage128"
+ conflicts=('xf86-video-r128<6.8.1')
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C r128 DESTDIR="${pkgdir}" install
+}
+
+package_savage-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI drivers for S3 Sraphics/VIA Savage"
+ conflicts=('xf86-video-savage<2.3.1')
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C savage DESTDIR="${pkgdir}" install
+}
+
+package_sis-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI drivers for SiS"
+ conflicts=('xf86-video-sis<0.10.2')
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C sis DESTDIR="${pkgdir}" install
+}
+
+package_tdfx-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa DRI drivers for 3dfx"
+ conflicts=('xf86-video-tdfx<1.4.3')
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+ make -C tdfx DESTDIR="${pkgdir}" install
+}
+
+package_nouveau-dri() {
+ depends=("libgl=${pkgver}")
+ pkgdesc="Mesa classic DRI + Gallium3D drivers for Nouveau"
+
+if [ "${_git}" = "true" ]; then
+ cd ${srcdir}/mesa-*/src/mesa/drivers/dri
+ else
+ cd "${srcdir}/Mesa-${pkgver}/src/mesa/drivers/dri"
+fi
+
+ # classic mesa driver for nv10 , nv20 nouveau_vieux_dri.so
+ make -C nouveau DESTDIR="${pkgdir}" install
+
+ # gallium3D driver for nv30 - nv40 - nv50 nouveau_dri.so
+if [ "${_git}" = "true" ]; then
+ make -C ${srcdir}/mesa-*/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install
+ else
+ make -C ${srcdir}/Mesa-${pkgver}/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install
+fi
+}
+
diff --git a/testing/mesa/gnome-shell-shader-fix.patch b/testing/mesa/gnome-shell-shader-fix.patch
new file mode 100644
index 000000000..3b3f37591
--- /dev/null
+++ b/testing/mesa/gnome-shell-shader-fix.patch
@@ -0,0 +1,535 @@
+From 3f625689acd570e4f14cc2ebaa43a425d13954ff Mon Sep 17 00:00:00 2001
+From: Christoph Bumiller <e0425955@student.tuwien.ac.at>
+Date: Thu, 31 Mar 2011 13:49:33 +0000
+Subject: nv50: copy regalloc fixes from nvc0
+
+Should fix gnome-shell's fade shader.
+
+Unification of the shader backend which is supposed to remove the
+code duplication is still WIP.
+---
+diff --git a/src/gallium/drivers/nv50/nv50_pc.h b/src/gallium/drivers/nv50/nv50_pc.h
+index e6f3815..a9a3248 100644
+--- a/src/gallium/drivers/nv50/nv50_pc.h
++++ b/src/gallium/drivers/nv50/nv50_pc.h
+@@ -228,6 +228,8 @@ struct nv_ref {
+ ubyte flags; /* not used yet */
+ };
+
++#define NV_REF_FLAG_REGALLOC_PRIV (1 << 0)
++
+ struct nv_basic_block;
+
+ struct nv_instruction {
+@@ -263,6 +265,15 @@ struct nv_instruction {
+ ubyte quadop;
+ };
+
++static INLINE int
++nvi_vector_size(struct nv_instruction *nvi)
++{
++ int i;
++ assert(nvi);
++ for (i = 0; i < 4 && nvi->def[i]; ++i);
++ return i;
++}
++
+ #define CFG_EDGE_FORWARD 0
+ #define CFG_EDGE_BACK 1
+ #define CFG_EDGE_LOOP_ENTER 2
+diff --git a/src/gallium/drivers/nv50/nv50_pc_regalloc.c b/src/gallium/drivers/nv50/nv50_pc_regalloc.c
+index 39ae366..657df2c 100644
+--- a/src/gallium/drivers/nv50/nv50_pc_regalloc.c
++++ b/src/gallium/drivers/nv50/nv50_pc_regalloc.c
+@@ -32,14 +32,39 @@
+ #include "util/u_simple_list.h"
+
+ #define NUM_REGISTER_FILES 4
++#define MAX_REGISTER_COUNT 256
+
+ struct register_set {
+ struct nv_pc *pc;
+
+ uint32_t last[NUM_REGISTER_FILES];
+- uint32_t bits[NUM_REGISTER_FILES][8];
++ uint32_t bits[NUM_REGISTER_FILES][(MAX_REGISTER_COUNT + 31) / 32];
+ };
+
++/* using OR because a set bit means occupied/unavailable, aliasing is allowed */
++static void
++intersect_register_sets(struct register_set *dst,
++ struct register_set *src1, struct register_set *src2)
++{
++ int i, j;
++
++ for (i = 0; i < NUM_REGISTER_FILES; ++i) {
++ for (j = 0; j < (MAX_REGISTER_COUNT + 31) / 32; ++j)
++ dst->bits[i][j] = src1->bits[i][j] | src2->bits[i][j];
++ }
++}
++
++static void
++mask_register_set(struct register_set *set, uint32_t mask, uint32_t umask)
++{
++ int i, j;
++
++ for (i = 0; i < NUM_REGISTER_FILES; ++i) {
++ for (j = 0; j < (MAX_REGISTER_COUNT + 31) / 32; ++j)
++ set->bits[i][j] = (set->bits[i][j] | mask) & umask;
++ }
++}
++
+ struct nv_pc_pass {
+ struct nv_pc *pc;
+
+@@ -61,11 +86,15 @@ ranges_coalesce(struct nv_range *range)
+ }
+ }
+
++/* @return: TRUE if @new_range can be freed (i.e. was not reused) */
+ static boolean
+ add_range_ex(struct nv_value *val, int bgn, int end, struct nv_range *new_range)
+ {
+ struct nv_range *range, **nextp = &val->livei;
+
++ if (bgn == end) /* [a, a) is invalid / empty */
++ return TRUE;
++
+ for (range = val->livei; range; range = range->next) {
+ if (end < range->bgn)
+ break; /* insert before */
+@@ -251,6 +280,8 @@ reg_occupy(struct register_set *set, struct nv_value *val)
+ id <<= s;
+ m = (1 << (1 << s)) - 1;
+
++ assert(s >= 0); /* XXX: remove me */
++
+ set->bits[f][id / 32] |= m << (id % 32);
+
+ if (set->pc->max_reg[f] < id)
+@@ -286,15 +317,12 @@ join_allowed(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
+ if (a->join->reg.id == b->join->reg.id)
+ return TRUE;
+
+-#if 1
+ /* either a or b or both have been assigned */
+
+ if (a->join->reg.id >= 0 && b->join->reg.id >= 0)
+ return FALSE;
+ else
+ if (b->join->reg.id >= 0) {
+- if (a->join->reg.id >= 0)
+- return FALSE;
+ val = a;
+ a = b;
+ b = val;
+@@ -309,8 +337,6 @@ join_allowed(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
+ return FALSE;
+ }
+ return TRUE;
+-#endif
+- return FALSE;
+ }
+
+ static INLINE void
+@@ -336,14 +362,14 @@ do_join_values(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
+ assert(b->join == a->join);
+ }
+
+-static INLINE void
++static INLINE boolean
+ try_join_values(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
+ {
+ if (!join_allowed(ctx, a, b)) {
+ #ifdef NV50_RA_DEBUG_JOIN
+ debug_printf("cannot join %i to %i: not allowed\n", b->n, a->n);
+ #endif
+- return;
++ return FALSE;
+ }
+ if (livei_have_overlap(a->join, b->join)) {
+ #ifdef NV50_RA_DEBUG_JOIN
+@@ -351,10 +377,27 @@ try_join_values(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
+ livei_print(a);
+ livei_print(b);
+ #endif
+- return;
++ return FALSE;
+ }
+
+ do_join_values(ctx, a, b);
++
++ return TRUE;
++}
++
++static void
++join_values_nofail(struct nv_pc_pass *ctx,
++ struct nv_value *a, struct nv_value *b, boolean type_only)
++{
++ if (type_only) {
++ assert(join_allowed(ctx, a, b));
++ do_join_values(ctx, a, b);
++ } else {
++ boolean ok = try_join_values(ctx, a, b);
++ if (!ok) {
++ NOUVEAU_ERR("failed to coalesce values\n");
++ }
++ }
+ }
+
+ static INLINE boolean
+@@ -369,20 +412,32 @@ need_new_else_block(struct nv_basic_block *b, struct nv_basic_block *p)
+ return (b->num_in > 1) && (n == 2);
+ }
+
++/* Look for the @phi's operand whose definition reaches @b. */
+ static int
+ phi_opnd_for_bb(struct nv_instruction *phi, struct nv_basic_block *b,
+ struct nv_basic_block *tb)
+ {
++ struct nv_ref *srci, *srcj;
+ int i, j;
+
+- for (j = -1, i = 0; i < 4 && phi->src[i]; ++i) {
+- if (!nvbb_reachable_by(b, phi->src[i]->value->insn->bb, tb))
++ for (j = -1, i = 0; i < 6 && phi->src[i]; ++i) {
++ srci = phi->src[i];
++ /* if already replaced, check with original source first */
++ if (srci->flags & NV_REF_FLAG_REGALLOC_PRIV)
++ srci = srci->value->insn->src[0];
++ if (!nvbb_reachable_by(b, srci->value->insn->bb, NULL))
+ continue;
+ /* NOTE: back-edges are ignored by the reachable-by check */
+- if (j < 0 || !nvbb_reachable_by(phi->src[j]->value->insn->bb,
+- phi->src[i]->value->insn->bb, tb))
++ if (j < 0 || !nvbb_reachable_by(srcj->value->insn->bb,
++ srci->value->insn->bb, NULL)) {
+ j = i;
++ srcj = srci;
++ }
+ }
++ if (j >= 0 && nvbb_reachable_by(b, phi->def[0]->insn->bb, NULL))
++ if (!nvbb_reachable_by(srcj->value->insn->bb,
++ phi->def[0]->insn->bb, NULL))
++ j = -1;
+ return j;
+ }
+
+@@ -429,16 +484,21 @@ pass_generate_phi_movs(struct nv_pc_pass *ctx, struct nv_basic_block *b)
+ ctx->pc->current_block = pn;
+
+ for (i = b->phi; i && i->opcode == NV_OP_PHI; i = i->next) {
+- if ((j = phi_opnd_for_bb(i, p, b)) < 0)
+- continue;
+- val = i->src[j]->value;
+-
+- if (i->src[j]->flags) {
+- val = val->insn->src[0]->value;
+- while (j < 4 && i->src[j])
+- ++j;
+- assert(j < 4);
++ j = phi_opnd_for_bb(i, p, b);
++
++ if (j < 0) {
++ val = i->def[0];
++ } else {
++ val = i->src[j]->value;
++ if (i->src[j]->flags & NV_REF_FLAG_REGALLOC_PRIV) {
++ j = -1;
++ /* use original value, we already encountered & replaced it */
++ val = val->insn->src[0]->value;
++ }
+ }
++ if (j < 0) /* need an additional source ? */
++ for (j = 0; j < 5 && i->src[j] && i->src[j]->value != val; ++j);
++ assert(j < 5);
+
+ ni = new_instruction(ctx->pc, NV_OP_MOV);
+
+@@ -452,7 +512,7 @@ pass_generate_phi_movs(struct nv_pc_pass *ctx, struct nv_basic_block *b)
+
+ nv_reference(ctx->pc, &i->src[j], ni->def[0]);
+
+- i->src[j]->flags = 1;
++ i->src[j]->flags |= NV_REF_FLAG_REGALLOC_PRIV;
+ }
+
+ if (pn != p && pn->exit) {
+@@ -470,45 +530,50 @@ pass_generate_phi_movs(struct nv_pc_pass *ctx, struct nv_basic_block *b)
+ return 0;
+ }
+
++#define JOIN_MASK_PHI (1 << 0)
++#define JOIN_MASK_SELECT (1 << 1)
++#define JOIN_MASK_MOV (1 << 2)
++#define JOIN_MASK_TEX (1 << 3)
++
+ static int
+-pass_join_values(struct nv_pc_pass *ctx, int iter)
++pass_join_values(struct nv_pc_pass *ctx, unsigned mask)
+ {
+ int c, n;
+
+ for (n = 0; n < ctx->num_insns; ++n) {
+- struct nv_instruction *i = ctx->insns[n];
++ struct nv_instruction *nvi, *i = ctx->insns[n];
+
+ switch (i->opcode) {
+ case NV_OP_PHI:
+- if (iter != 2)
++ if (!(mask & JOIN_MASK_PHI))
+ break;
+- for (c = 0; c < 4 && i->src[c]; ++c)
+- try_join_values(ctx, i->def[0], i->src[c]->value);
++ for (c = 0; c < 5 && i->src[c]; ++c)
++ join_values_nofail(ctx, i->def[0], i->src[c]->value, FALSE);
+ break;
+ case NV_OP_MOV:
+- if ((iter == 2) && i->src[0]->value->insn &&
+- !nv_is_vector_op(i->src[0]->value->join->insn->opcode))
++ if (!(mask & JOIN_MASK_MOV))
++ break;
++ nvi = i->src[0]->value->join->insn;
++ if (nvi && !nv_is_vector_op(nvi->opcode))
+ try_join_values(ctx, i->def[0], i->src[0]->value);
+ break;
+ case NV_OP_SELECT:
+- if (iter != 1)
++ if (!(mask & JOIN_MASK_SELECT))
+ break;
+- for (c = 0; c < 4 && i->src[c]; ++c) {
+- assert(join_allowed(ctx, i->def[0], i->src[c]->value));
+- do_join_values(ctx, i->def[0], i->src[c]->value);
+- }
++ for (c = 0; c < 5 && i->src[c]; ++c)
++ join_values_nofail(ctx, i->def[0], i->src[c]->value, TRUE);
+ break;
+ case NV_OP_TEX:
+ case NV_OP_TXB:
+ case NV_OP_TXL:
+ case NV_OP_TXQ:
+- if (iter)
++ if (!(mask & JOIN_MASK_TEX))
+ break;
+- for (c = 0; c < 4; ++c) {
+- if (!i->src[c])
+- break;
+- do_join_values(ctx, i->def[c], i->src[c]->value);
+- }
++ /* This should work without conflicts because we always generate
++ * extra MOVs for the sources of a TEX.
++ */
++ for (c = 0; c < 4 && i->src[c]; ++c)
++ join_values_nofail(ctx, i->def[c], i->src[c]->value, TRUE);
+ break;
+ default:
+ break;
+@@ -643,15 +708,15 @@ static void collect_live_values(struct nv_basic_block *b, const int n)
+ {
+ int i;
+
+- if (b->out[0]) {
+- if (b->out[1]) { /* what to do about back-edges ? */
++ if (b->out[0] && b->out_kind[0] != CFG_EDGE_FAKE) {
++ if (b->out[1] && b->out_kind[1] != CFG_EDGE_FAKE) {
+ for (i = 0; i < n; ++i)
+ b->live_set[i] = b->out[0]->live_set[i] | b->out[1]->live_set[i];
+ } else {
+ memcpy(b->live_set, b->out[0]->live_set, n * sizeof(uint32_t));
+ }
+ } else
+- if (b->out[1]) {
++ if (b->out[1] && b->out_kind[1] != CFG_EDGE_FAKE) {
+ memcpy(b->live_set, b->out[1]->live_set, n * sizeof(uint32_t));
+ } else {
+ memset(b->live_set, 0, n * sizeof(uint32_t));
+@@ -770,8 +835,8 @@ insert_ordered_tail(struct nv_value *list, struct nv_value *nval)
+ struct nv_value *elem;
+
+ for (elem = list->prev;
+- elem != list && elem->livei->bgn > nval->livei->bgn;
+- elem = elem->prev);
++ elem != list && elem->livei->bgn > nval->livei->bgn;
++ elem = elem->prev);
+ /* now elem begins before or at the same time as val */
+
+ nval->prev = elem;
+@@ -780,44 +845,49 @@ insert_ordered_tail(struct nv_value *list, struct nv_value *nval)
+ elem->next = nval;
+ }
+
+-static int
+-pass_linear_scan(struct nv_pc_pass *ctx, int iter)
++static void
++collect_register_values(struct nv_pc_pass *ctx, struct nv_value *head,
++ boolean assigned_only)
+ {
+- struct nv_instruction *i;
+- struct register_set f, free;
++ struct nv_value *val;
+ int k, n;
+- struct nv_value *cur, *val, *tmp[2];
+- struct nv_value active, inactive, handled, unhandled;
+
+- make_empty_list(&active);
+- make_empty_list(&inactive);
+- make_empty_list(&handled);
+- make_empty_list(&unhandled);
+-
+- nv50_ctor_register_set(ctx->pc, &free);
++ make_empty_list(head);
+
+- /* joined values should have range = NULL and thus not be added;
+- * also, fixed memory values won't be added because they're not
+- * def'd, just used
+- */
+ for (n = 0; n < ctx->num_insns; ++n) {
+- i = ctx->insns[n];
++ struct nv_instruction *i = ctx->insns[n];
+
++ /* for joined values, only the representative will have livei != NULL */
+ for (k = 0; k < 4; ++k) {
+ if (i->def[k] && i->def[k]->livei)
+- insert_ordered_tail(&unhandled, i->def[k]);
+- else
+- if (0 && i->def[k])
+- debug_printf("skipping def'd value %i: no livei\n", i->def[k]->n);
++ if (!assigned_only || i->def[k]->reg.id >= 0)
++ insert_ordered_tail(head, i->def[k]);
+ }
+ if (i->flags_def && i->flags_def->livei)
+- insert_ordered_tail(&unhandled, i->flags_def);
++ if (!assigned_only || i->flags_def->reg.id >= 0)
++ insert_ordered_tail(head, i->flags_def);
+ }
+
+- for (val = unhandled.next; val != unhandled.prev; val = val->next) {
++ for (val = head->next; val != head->prev; val = val->next) {
+ assert(val->join == val);
+ assert(val->livei->bgn <= val->next->livei->bgn);
+ }
++}
++
++static int
++pass_linear_scan(struct nv_pc_pass *ctx, int iter)
++{
++ struct register_set f, free;
++ struct nv_value *cur, *val, *tmp[2];
++ struct nv_value active, inactive, handled, unhandled;
++
++ make_empty_list(&active);
++ make_empty_list(&inactive);
++ make_empty_list(&handled);
++
++ nv50_ctor_register_set(ctx->pc, &free);
++
++ collect_register_values(ctx, &unhandled, FALSE);
+
+ foreach_s(cur, tmp[0], &unhandled) {
+ remove_from_list(cur);
+@@ -854,13 +924,7 @@ pass_linear_scan(struct nv_pc_pass *ctx, int iter)
+ reg_occupy(&f, val);
+
+ if (cur->reg.id < 0) {
+- boolean mem = FALSE;
+-
+- if (nv_is_vector_op(cur->insn->opcode))
+- mem = !reg_assign(&f, &cur->insn->def[0], 4);
+- else
+- if (iter)
+- mem = !reg_assign(&f, &cur, 1);
++ boolean mem = !reg_assign(&f, &cur, 1);
+
+ if (mem) {
+ NOUVEAU_ERR("out of registers\n");
+@@ -874,6 +938,67 @@ pass_linear_scan(struct nv_pc_pass *ctx, int iter)
+ return 0;
+ }
+
++/* Allocate values defined by instructions such as TEX, which have to be
++ * assigned to consecutive registers.
++ * Linear scan doesn't really work here since the values can have different
++ * live intervals.
++ */
++static int
++pass_allocate_constrained_values(struct nv_pc_pass *ctx)
++{
++ struct nv_value regvals, *val;
++ struct nv_instruction *i;
++ struct nv_value *defs[4];
++ struct register_set regs[4];
++ int n, vsize, c;
++ uint32_t mask;
++ boolean mem;
++
++ collect_register_values(ctx, &regvals, TRUE);
++
++ for (n = 0; n < ctx->num_insns; ++n) {
++ i = ctx->insns[n];
++ vsize = nvi_vector_size(i);
++ if (!(vsize > 1))
++ continue;
++ assert(vsize <= 4);
++ for (c = 0; c < vsize; ++c)
++ defs[c] = i->def[c]->join;
++
++ if (defs[0]->reg.id >= 0) {
++ for (c = 1; c < vsize; ++c)
++ assert(defs[c]->reg.id >= 0);
++ continue;
++ }
++
++ for (c = 0; c < vsize; ++c) {
++ nv50_ctor_register_set(ctx->pc, &regs[c]);
++
++ foreach(val, &regvals) {
++ if (val->reg.id >= 0 && livei_have_overlap(val, defs[c]))
++ reg_occupy(&regs[c], val);
++ }
++ mask = 0x11111111;
++ if (vsize == 2) /* granularity is 2 and not 4 */
++ mask |= 0x11111111 << 2;
++ mask_register_set(&regs[c], 0, mask << c);
++
++ if (defs[c]->livei)
++ insert_ordered_tail(&regvals, defs[c]);
++ }
++ for (c = 1; c < vsize; ++c)
++ intersect_register_sets(&regs[0], &regs[0], &regs[c]);
++
++ mem = !reg_assign(&regs[0], &defs[0], vsize);
++
++ if (mem) {
++ NOUVEAU_ERR("out of registers\n");
++ abort();
++ }
++ }
++ return 0;
++}
++
+ static int
+ nv_pc_pass1(struct nv_pc *pc, struct nv_basic_block *root)
+ {
+@@ -923,16 +1048,16 @@ nv_pc_pass1(struct nv_pc *pc, struct nv_basic_block *root)
+ livei_print(&pc->values[i]);
+ #endif
+
+- ret = pass_join_values(ctx, 0);
++ ret = pass_join_values(ctx, JOIN_MASK_PHI);
+ if (ret)
+ goto out;
+- ret = pass_linear_scan(ctx, 0);
++ ret = pass_join_values(ctx, JOIN_MASK_SELECT | JOIN_MASK_TEX);
+ if (ret)
+ goto out;
+- ret = pass_join_values(ctx, 1);
++ ret = pass_join_values(ctx, JOIN_MASK_MOV);
+ if (ret)
+ goto out;
+- ret = pass_join_values(ctx, 2);
++ ret = pass_allocate_constrained_values(ctx);
+ if (ret)
+ goto out;
+ ret = pass_linear_scan(ctx, 1);
+--
+cgit v0.8.3-6-g21f6
diff --git a/testing/pciutils/PKGBUILD b/testing/pciutils/PKGBUILD
new file mode 100644
index 000000000..91c1216e8
--- /dev/null
+++ b/testing/pciutils/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 115045 2011-03-16 15:19:12Z jgc $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+pkgname=pciutils
+pkgver=3.1.7
+pkgrel=4
+pkgdesc="PCI bus configuration space access library and tools"
+arch=(i686 x86_64)
+license=('GPL2')
+groups=('base')
+url="http://mj.ucw.cz/pciutils.html"
+optdepends=('sh: required by update-pciids')
+makedepends=('wget')
+depends=('glibc')
+source=(ftp://ftp.kernel.org/pub/software/utils/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('35222edb86b50a6641352c66fe829b2e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./update-pciids.sh
+ make OPT="${CFLAGS} -fPIC -DPIC" ZLIB=no SHARED=no PREFIX=/usr SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man all
+ cp lib/libpci.a "${srcdir}/"
+ make clean
+ make OPT="${CFLAGS}" ZLIB=no SHARED=yes PREFIX=/usr SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man all
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make SHARED=yes PREFIX=/usr SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man DESTDIR="${pkgdir}" install install-lib
+ install -m644 "${srcdir}/libpci.a" "${pkgdir}/usr/lib/"
+}
diff --git a/testing/syslog-ng/PKGBUILD b/testing/syslog-ng/PKGBUILD
new file mode 100644
index 000000000..e9ca12719
--- /dev/null
+++ b/testing/syslog-ng/PKGBUILD
@@ -0,0 +1,58 @@
+# $Id: PKGBUILD 114715 2011-03-15 15:44:12Z tpowa $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=syslog-ng
+pkgver=3.2.2
+pkgrel=2
+pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
+arch=('i686' 'x86_64')
+license=('GPL2')
+groups=('base')
+url="http://www.balabit.com/network-security/syslog-ng/"
+depends=('glib2' 'eventlog' 'tcp_wrappers' 'openssl' 'libcap')
+makedepends=('flex' 'pkg-config')
+optdepends=('logrotate: for rotating log files')
+provides=('logger')
+options=('!libtool')
+backup=('etc/syslog-ng/modules.conf' 'etc/syslog-ng/scl.conf' 'etc/syslog-ng/syslog-ng.conf' 'etc/logrotate.d/syslog-ng')
+source=(http://www.balabit.com/downloads/files/syslog-ng/sources/${pkgver}/source/${pkgname}_${pkgver}.tar.gz
+ syslog-ng.conf
+ syslog-ng.logrotate
+ syslog-ng.rc
+ cap_syslog.patch)
+md5sums=('ed8ebe559d52a63fb61e3e2db566643f' '344dddfff946300f5576b13a7e8ea19f'\
+ '735636090be4582885974542d2a75855' 'b90f8f1ba0433e5a1518ac30f882560a')
+sha1sums=('3a340f8e72b460cc0bc1ec1d4c86b74678912dd6' 'b9eb8c61f7cccda543fc5c97fe1d40a8d15e713f'\
+ 'ac997b25d7d8e69e66782d3771a0e12aff55ae7f' '253e59f4182fba46aea56bebc4b79a199fae32bc')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ # fix #22555 for kernels >=2.6.38
+ patch -Np1 -i ../cap_syslog.patch
+ ./configure --prefix=/usr --sysconfdir=/etc/syslog-ng \
+ --libexecdir=/usr/lib --localstatedir=/var/lib/syslog-ng \
+ --enable-tcp-wrapper \
+ --with-pidfile-dir=/var/run \
+ --disable-spoof-source
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
+ install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf"
+ install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
+ install -Dm755 "$srcdir/syslog-ng.rc" "$pkgdir/etc/rc.d/syslog-ng"
+}
+md5sums=('ed8ebe559d52a63fb61e3e2db566643f'
+ '344dddfff946300f5576b13a7e8ea19f'
+ '735636090be4582885974542d2a75855'
+ 'b90f8f1ba0433e5a1518ac30f882560a'
+ '46e5dcff71f820d497898331a3f608fe')
+sha1sums=('3a340f8e72b460cc0bc1ec1d4c86b74678912dd6'
+ 'b9eb8c61f7cccda543fc5c97fe1d40a8d15e713f'
+ 'ac997b25d7d8e69e66782d3771a0e12aff55ae7f'
+ '253e59f4182fba46aea56bebc4b79a199fae32bc'
+ 'f093a09626a528d23f0f2aeece018cab15a735a9')
diff --git a/testing/syslog-ng/cap_syslog.patch b/testing/syslog-ng/cap_syslog.patch
new file mode 100644
index 000000000..b6e6db6e4
--- /dev/null
+++ b/testing/syslog-ng/cap_syslog.patch
@@ -0,0 +1,101 @@
+diff --git a/lib/gprocess.h b/lib/gprocess.h
+index cda35b0..5c449f7 100644
+--- a/lib/gprocess.h
++++ b/lib/gprocess.h
+@@ -28,9 +28,14 @@
+ #include "syslog-ng.h"
+
+ #include <sys/types.h>
++#include <sys/utsname.h>
+
+ #if ENABLE_LINUX_CAPS
+ # include <sys/capability.h>
++#
++# ifndef CAP_SYSLOG
++# define CAP_SYSLOG 34
++# endif
+ #endif
+
+ typedef enum
+@@ -78,5 +83,8 @@ void g_process_finish(void);
+
+ void g_process_add_option_group(GOptionContext *ctx);
+
++extern int kernel_version;
++extern void get_kernel_version(void);
++#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z)
+
+ #endif
+diff --git a/modules/affile/affile.c b/modules/affile/affile.c
+index e145324..886fa72 100644
+--- a/modules/affile/affile.c
++++ b/modules/affile/affile.c
+@@ -59,7 +59,12 @@ affile_open_file(gchar *name, gint flags,
+ if (privileged)
+ {
+ g_process_cap_modify(CAP_DAC_READ_SEARCH, TRUE);
+- g_process_cap_modify(CAP_SYS_ADMIN, TRUE);
++ if (!kernel_version)
++ get_kernel_version();
++ if (kernel_version < LINUX_VERSION(2, 6, 38))
++ g_process_cap_modify(CAP_SYS_ADMIN, TRUE);
++ else
++ g_process_cap_modify(CAP_SYSLOG, TRUE);
+ }
+ else
+ {
+diff --git a/syslog-ng/main.c b/syslog-ng/main.c
+index 9880c1f..ee5031b 100644
+--- a/syslog-ng/main.c
++++ b/syslog-ng/main.c
+@@ -67,6 +67,7 @@ static gboolean syntax_only = FALSE;
+ static gboolean display_version = FALSE;
+ static gchar *ctlfilename = PATH_CONTROL_SOCKET;
+ static gchar *preprocess_into = NULL;
++int kernel_version;
+
+ static volatile sig_atomic_t sig_hup_received = FALSE;
+ static volatile sig_atomic_t sig_term_received = FALSE;
+@@ -363,6 +364,20 @@ version(void)
+ ON_OFF_STR(ENABLE_PACCT_MODULE));
+ }
+
++void
++get_kernel_version(void) {
++ static struct utsname uts;
++ int x = 0, y = 0, z = 0;
++
++ if (uname(&uts) == -1) {
++ fprintf(stderr, "Unable to retrieve kernel version.\n");
++ exit(1);
++ }
++
++ sscanf(uts.release, "%d.%d.%d", &x, &y, &z);
++ kernel_version = LINUX_VERSION(x, y, z);
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+@@ -379,9 +394,20 @@ main(int argc, char *argv[])
+ * indicate readability. Enabling/disabling cap_sys_admin on every poll
+ * invocation seems to be too expensive. So I enable it for now. */
+
+- g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
++ if (!kernel_version)
++ get_kernel_version();
++ if (kernel_version < LINUX_VERSION(2, 6, 34))
++ g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
+ "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner=p "
+ "cap_sys_admin=ep");
++ else if (kernel_version < LINUX_VERSION(2, 6, 38))
++ g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
++ "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner,"
++ "cap_sys_admin=p");
++ else
++ g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
++ "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner,"
++ "cap_syslog=p");
+ ctx = g_option_context_new("syslog-ng");
+ g_process_add_option_group(ctx);
+ msg_add_option_group(ctx);
diff --git a/testing/syslog-ng/syslog-ng.conf b/testing/syslog-ng/syslog-ng.conf
new file mode 100644
index 000000000..6e3362681
--- /dev/null
+++ b/testing/syslog-ng/syslog-ng.conf
@@ -0,0 +1,92 @@
+@version: 3.2
+#
+# /etc/syslog-ng/syslog-ng.conf
+#
+
+options {
+ stats_freq (0);
+ flush_lines (0);
+ time_reopen (10);
+ log_fifo_size (1000);
+ long_hostnames(off);
+ use_dns (no);
+ use_fqdn (no);
+ create_dirs (no);
+ keep_hostname (yes);
+ perm(0640);
+ group("log");
+};
+
+source src {
+ unix-dgram("/dev/log");
+ internal();
+ file("/proc/kmsg");
+};
+
+destination d_authlog { file("/var/log/auth.log"); };
+destination d_syslog { file("/var/log/syslog.log"); };
+destination d_cron { file("/var/log/crond.log"); };
+destination d_daemon { file("/var/log/daemon.log"); };
+destination d_kernel { file("/var/log/kernel.log"); };
+destination d_lpr { file("/var/log/lpr.log"); };
+destination d_user { file("/var/log/user.log"); };
+destination d_uucp { file("/var/log/uucp.log"); };
+destination d_mail { file("/var/log/mail.log"); };
+destination d_news { file("/var/log/news.log"); };
+destination d_ppp { file("/var/log/ppp.log"); };
+destination d_debug { file("/var/log/debug.log"); };
+destination d_messages { file("/var/log/messages.log"); };
+destination d_errors { file("/var/log/errors.log"); };
+destination d_everything { file("/var/log/everything.log"); };
+destination d_iptables { file("/var/log/iptables.log"); };
+destination d_acpid { file("/var/log/acpid.log"); };
+destination d_console { usertty("root"); };
+
+# Log everything to tty12
+destination console_all { file("/dev/tty12"); };
+
+filter f_auth { facility(auth); };
+filter f_authpriv { facility(auth, authpriv); };
+filter f_syslog { program(syslog-ng); };
+filter f_cron { facility(cron); };
+filter f_daemon { facility(daemon); };
+filter f_kernel { facility(kern) and not filter(f_iptables); };
+filter f_lpr { facility(lpr); };
+filter f_mail { facility(mail); };
+filter f_news { facility(news); };
+filter f_user { facility(user); };
+filter f_uucp { facility(uucp); };
+filter f_ppp { facility(local2); };
+filter f_debug { not facility(auth, authpriv, news, mail); };
+filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news, cron) and not program(syslog-ng) and not filter(f_iptables); };
+filter f_everything { level(debug..emerg) and not facility(auth, authpriv); };
+filter f_emergency { level(emerg); };
+filter f_info { level(info); };
+filter f_notice { level(notice); };
+filter f_warn { level(warn); };
+filter f_crit { level(crit); };
+filter f_err { level(err); };
+filter f_iptables { match("IN=" value("MESSAGE")) and match("OUT=" value("MESSAGE")); };
+filter f_acpid { program("acpid"); };
+
+log { source(src); filter(f_acpid); destination(d_acpid); };
+log { source(src); filter(f_authpriv); destination(d_authlog); };
+log { source(src); filter(f_syslog); destination(d_syslog); };
+log { source(src); filter(f_cron); destination(d_cron); };
+log { source(src); filter(f_daemon); destination(d_daemon); };
+log { source(src); filter(f_kernel); destination(d_kernel); };
+log { source(src); filter(f_lpr); destination(d_lpr); };
+log { source(src); filter(f_mail); destination(d_mail); };
+log { source(src); filter(f_news); destination(d_news); };
+log { source(src); filter(f_ppp); destination(d_ppp); };
+log { source(src); filter(f_user); destination(d_user); };
+log { source(src); filter(f_uucp); destination(d_uucp); };
+#log { source(src); filter(f_debug); destination(d_debug); };
+log { source(src); filter(f_messages); destination(d_messages); };
+log { source(src); filter(f_err); destination(d_errors); };
+log { source(src); filter(f_emergency); destination(d_console); };
+log { source(src); filter(f_everything); destination(d_everything); };
+log { source(src); filter(f_iptables); destination(d_iptables); };
+
+# Log everything to tty12
+#log { source(src); destination(console_all); };
diff --git a/testing/syslog-ng/syslog-ng.logrotate b/testing/syslog-ng/syslog-ng.logrotate
new file mode 100644
index 000000000..e0e6929f2
--- /dev/null
+++ b/testing/syslog-ng/syslog-ng.logrotate
@@ -0,0 +1,7 @@
+/var/log/messages.log /var/log/auth.log /var/log/mail.log /var/log/kernel.log /var/log/errors.log /var/log/daemon.log /var/log/user.log /var/log/iptables.log /var/log/everything.log /var/log/syslog.log /var/log/acpid.log /var/log/crond.log /var/log/lpr.log /var/log/uucp.log /var/log/news.log /var/log/ppp.log /var/log/debug.log {
+ missingok
+ sharedscripts
+ postrotate
+ /bin/kill -HUP `cat /var/run/syslog-ng.pid 2>/dev/null` 2> /dev/null || true
+ endscript
+}
diff --git a/testing/syslog-ng/syslog-ng.rc b/testing/syslog-ng/syslog-ng.rc
new file mode 100755
index 000000000..fbd41fc7b
--- /dev/null
+++ b/testing/syslog-ng/syslog-ng.rc
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/syslog-ng`
+case "$1" in
+ start)
+ stat_busy "Starting Syslog-NG"
+ [ -z "$PID" ] && /usr/sbin/syslog-ng
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon syslog-ng
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Syslog-NG"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm -f /var/run/syslog-ng.pid
+# Removing stale syslog-ng.persist file. Its new location, as of 2.0.6-1, is /var/lib/syslog-ng/
+ rm -f /var/syslog-ng.persist
+ rm_daemon syslog-ng
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/tzdata/Makefile.patch b/testing/tzdata/Makefile.patch
new file mode 100644
index 000000000..e88f9d907
--- /dev/null
+++ b/testing/tzdata/Makefile.patch
@@ -0,0 +1,140 @@
+diff -Naur src/Makefile src-p/Makefile
+--- src/Makefile 2007-08-20 16:47:41.000000000 +0200
++++ src-p/Makefile 2007-10-02 04:07:44.000000000 +0200
+@@ -34,17 +34,17 @@
+
+ # Everything gets put in subdirectories of. . .
+
+-TOPDIR= /usr/local
++TOPDIR= $(DESTDIR)/usr
+
+ # "Compiled" time zone information is placed in the "TZDIR" directory
+ # (and subdirectories).
+ # Use an absolute path name for TZDIR unless you're just testing the software.
+
+-TZDIR= $(TOPDIR)/etc/zoneinfo
++TZDIR= $(TOPDIR)/share/zoneinfo
+
+ # The "tzselect", "zic", and "zdump" commands get installed in. . .
+
+-ETCDIR= $(TOPDIR)/etc
++SBINDIR= $(TOPDIR)/sbin
+
+ # If you "make INSTALL", the "date" command gets installed in. . .
+
+@@ -52,7 +52,7 @@
+
+ # Manual pages go in subdirectories of. . .
+
+-MANDIR= $(TOPDIR)/man
++MANDIR= $(TOPDIR)/share/man
+
+ # Library functions are put in an archive in LIBDIR.
+
+@@ -83,7 +83,7 @@
+
+ # Non-default libraries needed to link.
+ # Add -lintl if you want to use `gettext' on Solaris.
+-LDLIBS=
++LDLIBS=$(LDFLAGS)
+
+ # Add the following to the end of the "CFLAGS=" line as needed.
+ # -Dconst= if `const' does not work (SunOS 4.x cc, OSF1 V5.0 cc)
+@@ -211,7 +211,7 @@
+ # before the first Monday in January when a "%V" format is used and January 1
+ # falls on a Friday, Saturday, or Sunday.
+
+-CFLAGS=
++CFLAGS += -std=gnu99
+
+ # If you want zic's -s option used when installing, uncomment the next line
+ # ZFLAGS= -s
+@@ -220,7 +220,7 @@
+ ZIC= $(zic) $(ZFLAGS)
+
+ # The name of a Posix-compliant `awk' on your system.
+-AWK= nawk
++AWK= awk
+
+ # The path where SGML DTDs are kept.
+ SGML_SEARCH_PATH= $(TOPDIR)/share/doc/sgml-lib/REC-html401-19991224/
+@@ -241,8 +241,10 @@
+
+ ###############################################################################
+
+-cc= cc
+-CC= $(cc) -DTZDIR=\"$(TZDIR)\"
++CC+= -DTZDIR=\"$(TZDIR)\"
++ifeq ($(NLS),1)
++CC += -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\"
++endif
+
+ TZCSRCS= zic.c localtime.c asctime.c scheck.c ialloc.c
+ TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o
+@@ -282,14 +284,16 @@
+
+ ALL: all date
+
+-install: all $(DATA) $(REDO) $(TZLIB) $(MANS) $(TABDATA)
++install: all $(DATA) $(REDO) $(MANS) $(TABDATA)
+ $(ZIC) -y $(YEARISTYPE) \
+ -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
+ -rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab
+ cp iso3166.tab zone.tab $(TZDIR)/.
+- -mkdir $(TOPDIR) $(ETCDIR)
+- cp tzselect zic zdump $(ETCDIR)/.
+- -mkdir $(TOPDIR) $(MANDIR) \
++ -mkdir -p $(TOPDIR) $(SBINDIR)
++ cp zic zdump $(SBINDIR)/.
++ -mkdir -p $(TOPDIR) $(BINDIR)
++ cp tzselect $(BINDIR)/.
++ -mkdir -p $(TOPDIR) $(MANDIR) \
+ $(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8
+ -rm -f $(MANDIR)/man3/newctime.3 \
+ $(MANDIR)/man3/newtzset.3 \
+@@ -298,13 +302,11 @@
+ $(MANDIR)/man8/zdump.8 \
+ $(MANDIR)/man8/zic.8
+ cp newctime.3 newtzset.3 $(MANDIR)/man3/.
+- cp tzfile.5 $(MANDIR)/man5/.
+- cp tzselect.8 zdump.8 zic.8 $(MANDIR)/man8/.
+
+ INSTALL: ALL install date.1
+- -mkdir $(TOPDIR) $(BINDIR)
++ -mkdir -p $(TOPDIR) $(BINDIR)
+ cp date $(BINDIR)/.
+- -mkdir $(TOPDIR) $(MANDIR) $(MANDIR)/man1
++ -mkdir -p $(TOPDIR) $(MANDIR) $(MANDIR)/man1
+ -rm -f $(MANDIR)/man1/date.1
+ cp date.1 $(MANDIR)/man1/.
+
+@@ -334,9 +336,9 @@
+ # You must replace all of $(TZDIR) to switch from not using leap seconds
+ # to using them, or vice versa.
+ other_two: zic leapseconds $(TDATA)
+- $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA)
++ $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)/posix -L /dev/null $(TDATA)
+ $(ZIC) -y $(YEARISTYPE) \
+- -d $(TZDIR)-leaps -L leapseconds $(TDATA)
++ -d $(TZDIR)/right -L leapseconds $(TDATA)
+
+ posix_right: posix_only other_two
+
+@@ -367,7 +369,7 @@
+ <$? >$@
+ chmod +x $@
+
+-check: check_tables check_web
++check: check_tables
+
+ check_tables: checktab.awk $(PRIMARY_YDATA)
+ $(AWK) -f checktab.awk $(PRIMARY_YDATA)
+diff -Naur src/tzselect.ksh src-p/tzselect.ksh
+--- src/tzselect.ksh 2007-08-20 16:47:42.000000000 +0200
++++ src-p/tzselect.ksh 2007-10-02 04:07:44.000000000 +0200
+@@ -1,4 +1,4 @@
+-#! /bin/ksh
++#! /bin/bash
+
+ # '@(#)tzselect.ksh 8.1'
+
diff --git a/testing/tzdata/PKGBUILD b/testing/tzdata/PKGBUILD
new file mode 100644
index 000000000..631c3f3b5
--- /dev/null
+++ b/testing/tzdata/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 117841 2011-04-04 18:27:28Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=tzdata
+pkgver=2011e
+pkgrel=1
+_tzcode=2011e
+_tzdata=2011e
+pkgdesc="Sources for time zone and daylight saving time data"
+arch=('i686' 'x86_64')
+url="http://www.twinsun.com/tz/tz-link.htm"
+license=('GPL')
+depends=()
+makedepends=()
+optdepends=('sh: required by tzselect')
+options=('!emptydirs')
+source=(ftp://elsie.nci.nih.gov/pub/tzcode${_tzcode}.tar.gz \
+ ftp://elsie.nci.nih.gov/pub/${pkgname}${_tzdata}.tar.gz \
+ Makefile.patch)
+md5sums=('fbfc05dbf9ebcfe7c4bba18549870173'
+ '044a07072300a0ee72b046e5a9a4ec90'
+ 'a64ed97d1fc03c66ee8612c0d9f40507')
+
+build() {
+ cd ${srcdir}
+
+ tar -xf tzcode${_tzcode}.tar.gz
+ tar -xf ${pkgname}${_tzdata}.tar.gz
+
+ patch -Np1 -i "${srcdir}/Makefile.patch"
+
+ make
+}
+
+package() {
+ cd ${srcdir}
+ make DESTDIR="${pkgdir}" install
+
+ rm "${pkgdir}/usr/share/zoneinfo/localtime"
+}
diff --git a/testing/usbutils/PKGBUILD b/testing/usbutils/PKGBUILD
new file mode 100644
index 000000000..871bd2111
--- /dev/null
+++ b/testing/usbutils/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 116702 2011-03-25 08:26:34Z tpowa $
+# Maintainer: Judd Vinet <jvinet@zeroflux.org>
+# Contributor: Curtis Campbell <curtisjamescampbell@hotmail.com>
+pkgname=usbutils
+pkgver=002
+pkgrel=1
+pkgdesc="USB Device Utilities"
+arch=(i686 x86_64)
+license=('GPL')
+groups=('base')
+makedepends=('wget')
+depends=('glibc' 'libusb')
+url="http://linux-usb.sourceforge.net/"
+source=(http://www.kernel.org/pub/linux/utils/usb/$pkgname/$pkgname-$pkgver.tar.gz)
+md5sums=('05610d15c3c8c8ada3d691c320ca784a')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ rm usb.ids
+ wget http://www.linux-usb.org/usb.ids
+ ./configure --prefix=/usr --datadir=/usr/share/hwdata --disable-zlib
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+ # fix pkgconfig file
+ mkdir -p $pkgdir/usr/lib
+ mv $pkgdir/usr/share/pkgconfig $pkgdir/usr/lib/
+}
diff --git a/testing/xf86-input-acecad/PKGBUILD b/testing/xf86-input-acecad/PKGBUILD
new file mode 100644
index 000000000..9a9ed57a1
--- /dev/null
+++ b/testing/xf86-input-acecad/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 115526 2011-03-18 10:32:21Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-input-acecad
+_gitdate=20110318
+pkgver=1.4.99_git${_gitdate} # see configure.ac
+pkgrel=1
+pkgdesc="X.Org acecad tablet input driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('sysfsutils')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(#${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ ftp://ftp.archlinux.org/other/$pkgname/${pkgname}-${_gitdate}.tar.bz2)
+sha1sums=('f1aa0c13542242316ebd401369959f6c55ae8222')
+
+# source PKGBUILD && mksource
+mksource() {
+ mkdir /tmp/${pkgname}-${_gitdate}
+ pushd /tmp/${pkgname}-${_gitdate}
+ git clone -v --depth 1 git://anongit.freedesktop.org/xorg/driver/xf86-input-acecad
+ cd xf86-input-acecad
+ git archive --prefix=xf86-video-acecad-${_gitdate}/ --format=tar HEAD | bzip2 > /tmp/${pkgname}-${_gitdate}/${pkgname}-${_gitdate}.tar.bz2
+ popd
+}
+
+build() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# ./configure --prefix=/usr
+ cd ${srcdir}/xf86-video-acecad-${_gitdate}
+ ./autogen.sh --prefix=/usr
+ make
+}
+
+package() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${srcdir}/xf86-video-acecad-${_gitdate}
+
+ 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-input-aiptek/PKGBUILD b/testing/xf86-input-aiptek/PKGBUILD
new file mode 100644
index 000000000..11f20cb39
--- /dev/null
+++ b/testing/xf86-input-aiptek/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 115529 2011-03-18 10:37:30Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-input-aiptek
+_gitdate=20110318
+pkgver=1.3.99_git${_gitdate} # see configure.ac
+pkgrel=1
+pkgdesc="X.Org Aiptek USB Digital Tablet input driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('pkgconfig' 'xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(#${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ ftp://ftp.archlinux.org/other/$pkgname/${pkgname}-${_gitdate}.tar.bz2)
+md5sums=('0dc6fe834142ca7a4bec8fceb0885a15')
+
+# source PKGBUILD && mksource
+mksource() {
+ mkdir /tmp/${pkgname}-${_gitdate}
+ pushd /tmp/${pkgname}-${_gitdate}
+ git clone -v --depth 1 git://anongit.freedesktop.org/xorg/driver/xf86-input-aiptek
+ cd xf86-input-aiptek
+ git archive --prefix=xf86-video-aiptek-${_gitdate}/ --format=tar HEAD | bzip2 > /tmp/${pkgname}-${_gitdate}/${pkgname}-${_gitdate}.tar.bz2
+ popd
+}
+
+build() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# ./configure --prefix=/usr
+ cd ${srcdir}/xf86-video-aiptek-${_gitdate}
+ ./autogen.sh --prefix=/usr
+ make
+}
+
+package() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${srcdir}/xf86-video-aiptek-${_gitdate}
+
+ 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-input-evdev/PKGBUILD b/testing/xf86-input-evdev/PKGBUILD
new file mode 100644
index 000000000..cd181ad42
--- /dev/null
+++ b/testing/xf86-input-evdev/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 115269 2011-03-17 16:14:58Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Alexander Baldeck <Alexander@archlinux.org
+
+pkgname=xf86-input-evdev
+pkgver=2.6.0
+pkgrel=3
+pkgdesc="X.org evdev input driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool' '!makeflags')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('fb6f7a6f5168ae07efe890e4ace9fb8af1d4e1e0')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ 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-input-joystick/50-joystick.conf b/testing/xf86-input-joystick/50-joystick.conf
new file mode 100644
index 000000000..95a295ab0
--- /dev/null
+++ b/testing/xf86-input-joystick/50-joystick.conf
@@ -0,0 +1,6 @@
+Section "InputClass"
+ Identifier "joystick catchall"
+ MatchIsJoystick "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "joystick"
+EndSection
diff --git a/testing/xf86-input-joystick/LICENSE b/testing/xf86-input-joystick/LICENSE
new file mode 100644
index 000000000..434899a50
--- /dev/null
+++ b/testing/xf86-input-joystick/LICENSE
@@ -0,0 +1,22 @@
+This package was downloaded from
+http://xorg.freedesktop.org/releases/individual/driver/
+
+Copyright 1995-1999 by Frederic Lepied, France. <Lepied@XFree86.org>
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Frederic Lepied not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Frederic Lepied makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL FREDERIC LEPIED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/testing/xf86-input-joystick/PKGBUILD b/testing/xf86-input-joystick/PKGBUILD
new file mode 100644
index 000000000..441603077
--- /dev/null
+++ b/testing/xf86-input-joystick/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 115532 2011-03-18 10:42:40Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-input-joystick
+_gitdate=20110318
+pkgver=1.5.99_git${_gitdate} # see configure.ac
+pkgrel=1
+pkgdesc="X.Org Joystick input driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(#${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ ftp://ftp.archlinux.org/other/$pkgname/${pkgname}-${_gitdate}.tar.bz2
+ 50-joystick.conf
+ LICENSE)
+sha1sums=('e1eb55c0556984530ab87836b5ade78085c7201b'
+ 'e1ff3699a0470c6bb78a53f718df9d8521621e11'
+ 'ee4c79491b36a680ed9d86f5fc41ae447f26353e')
+
+# source PKGBUILD && mksource
+mksource() {
+ mkdir /tmp/${pkgname}-${_gitdate}
+ pushd /tmp/${pkgname}-${_gitdate}
+ git clone -v --depth 1 git://anongit.freedesktop.org/xorg/driver/xf86-input-joystick
+ cd xf86-input-joystick
+ git archive --prefix=xf86-video-joystick-${_gitdate}/ --format=tar HEAD | bzip2 > /tmp/${pkgname}-${_gitdate}/${pkgname}-${_gitdate}.tar.bz2
+ popd
+}
+
+build() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# ./configure --prefix=/usr
+ cd ${srcdir}/xf86-video-joystick-${_gitdate}
+ ./autogen.sh --prefix=/usr
+ make
+}
+
+package() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${srcdir}/xf86-video-joystick-${_gitdate}
+
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/etc/X11/xorg.conf.d"
+ install -m644 "${srcdir}/50-joystick.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-input-keyboard/PKGBUILD b/testing/xf86-input-keyboard/PKGBUILD
new file mode 100644
index 000000000..74318a046
--- /dev/null
+++ b/testing/xf86-input-keyboard/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115452 2011-03-18 08:08:01Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-input-keyboard
+pkgver=1.6.0
+pkgrel=2
+pkgdesc="X.Org keyboard input driver"
+arch=(i686 x86_64)
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('8e845086749f8c4b64fdfa852b4b26cf7bb62dc9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-input-mouse/PKGBUILD b/testing/xf86-input-mouse/PKGBUILD
new file mode 100644
index 000000000..23bd31f2b
--- /dev/null
+++ b/testing/xf86-input-mouse/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115449 2011-03-18 08:03:09Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-input-mouse
+pkgver=1.7.0
+pkgrel=2
+pkgdesc="X.org mouse input driver"
+arch=(i686 x86_64)
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('8b99054e5e4feafd7e08c87b936e64386b74ae8f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-input-synaptics/10-synaptics.conf b/testing/xf86-input-synaptics/10-synaptics.conf
new file mode 100644
index 000000000..81a90fb81
--- /dev/null
+++ b/testing/xf86-input-synaptics/10-synaptics.conf
@@ -0,0 +1,9 @@
+Section "InputClass"
+ Identifier "touchpad catchall"
+ Driver "synaptics"
+ MatchIsTouchpad "on"
+ MatchDevicePath "/dev/input/event*"
+ Option "TapButton1" "1"
+ Option "TapButton2" "2"
+ Option "TapButton3" "3"
+EndSection
diff --git a/testing/xf86-input-synaptics/PKGBUILD b/testing/xf86-input-synaptics/PKGBUILD
new file mode 100644
index 000000000..6e4d89f3a
--- /dev/null
+++ b/testing/xf86-input-synaptics/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 115455 2011-03-18 08:10:17Z 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.4.0
+pkgrel=2
+pkgdesc="Synaptics driver for notebook touchpads"
+arch=(i686 x86_64)
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('libxtst')
+makedepends=('xorg-server-devel' 'libxi' 'libx11')
+conflicts=('xorg-server<1.10.0')
+replaces=('synaptics')
+provides=('synaptics')
+conflicts=('synaptics')
+groups=('xorg-drivers' 'xorg')
+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=('96541b063482568e177f883a9fcfbe9a22c25569'
+ '68e1f4ef5e1038231d210eb422fa4d18c5922f0f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/etc/X11/xorg.conf.d"
+ install -m644 "${srcdir}/10-synaptics.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+
+ rm -rf "${pkgdir}/usr/share/X11"
+}
diff --git a/testing/xf86-input-void/PKGBUILD b/testing/xf86-input-void/PKGBUILD
new file mode 100644
index 000000000..6c4a38685
--- /dev/null
+++ b/testing/xf86-input-void/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 115535 2011-03-18 10:46:45Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-input-void
+_gitdate=20110318
+pkgver=1.3.1.99_git${_gitdate} # see configure.ac
+pkgrel=1
+pkgdesc="X.org void input driver"
+arch=(i686 x86_64)
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(#${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ ftp://ftp.archlinux.org/other/$pkgname/${pkgname}-${_gitdate}.tar.bz2)
+md5sums=('0ec2820fc178138d393fd248f56b8754')
+
+# source PKGBUILD && mksource
+mksource() {
+ mkdir /tmp/${pkgname}-${_gitdate}
+ pushd /tmp/${pkgname}-${_gitdate}
+ git clone -v --depth 1 git://anongit.freedesktop.org/xorg/driver/xf86-input-void
+ cd xf86-input-void
+ git archive --prefix=xf86-video-void-${_gitdate}/ --format=tar HEAD | bzip2 > /tmp/${pkgname}-${_gitdate}/${pkgname}-${_gitdate}.tar.bz2
+ popd
+}
+
+build() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# ./configure --prefix=/usr
+ cd ${srcdir}/xf86-video-void-${_gitdate}
+ ./autogen.sh --prefix=/usr
+ make
+}
+
+package() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${srcdir}/xf86-video-void-${_gitdate}
+
+ 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-input-wacom/70-wacom.rules b/testing/xf86-input-wacom/70-wacom.rules
new file mode 100644
index 000000000..67e5580cc
--- /dev/null
+++ b/testing/xf86-input-wacom/70-wacom.rules
@@ -0,0 +1,8 @@
+ACTION!="add|change", GOTO="wacom_end"
+
+# Match all wacom tablets with a serial ID starting with WACf
+ATTRS{id}=="WACf*" ENV{NAME}="Serial Wacom Tablet", ENV{SUBSYSTEM}="input", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
+ATTRS{id}=="FUJ*" ENV{NAME}="Serial Wacom Tablet", ENV{SUBSYSTEM}="input", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
+
+LABEL="wacom_end"
+
diff --git a/testing/xf86-input-wacom/PKGBUILD b/testing/xf86-input-wacom/PKGBUILD
new file mode 100644
index 000000000..2ee290485
--- /dev/null
+++ b/testing/xf86-input-wacom/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 115476 2011-03-18 08:17:07Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: M Rawash <mrawash@gmail.com>
+
+pkgname=xf86-input-wacom
+pkgver=0.10.9
+pkgrel=1
+pkgdesc="X.Org Wacom tablet driver"
+arch=('i686' 'x86_64')
+url="http://linuxwacom.sourceforge.net/"
+license=('GPL')
+backup=('etc/X11/xorg.conf.d/50-wacom.conf')
+depends=('libxi' 'libxrandr')
+makedepends=('xorg-server-devel' 'libxext' 'libxi')
+conflicts=('xorg-server<1.10.0')
+options=(!libtool)
+source=(http://downloads.sourceforge.net/project/linuxwacom/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ 70-wacom.rules)
+md5sums=('8af337d2919995f39ff19d8a890ea222'
+ '4d3665bb2ef8a8190734640dffa4c6f7')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --with-xorg-conf-dir=/etc/X11/xorg.conf.d
+ make
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/lib/udev/rules.d"
+ install -m644 "${srcdir}/70-wacom.rules" "${pkgdir}/lib/udev/rules.d/"
+}
diff --git a/testing/xf86-video-apm/PKGBUILD b/testing/xf86-video-apm/PKGBUILD
new file mode 100644
index 000000000..649a8d7ae
--- /dev/null
+++ b/testing/xf86-video-apm/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115281 2011-03-17 16:59:19Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-apm
+pkgver=1.2.3
+pkgrel=3
+pkgdesc="X.org Alliance ProMotion video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('1fa7180cf985a74132f8d5b39a0bf9df08713fac')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-ark/PKGBUILD b/testing/xf86-video-ark/PKGBUILD
new file mode 100644
index 000000000..c924c8b8d
--- /dev/null
+++ b/testing/xf86-video-ark/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 115284 2011-03-17 17:01:41Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-ark
+pkgver=0.7.3
+pkgrel=3
+pkgdesc="X.org ark video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('56901ec6097a83433689f208268281f9c98c238b')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-ast/PKGBUILD b/testing/xf86-video-ast/PKGBUILD
new file mode 100644
index 000000000..46183729c
--- /dev/null
+++ b/testing/xf86-video-ast/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 115287 2011-03-17 17:04:02Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-ast
+pkgver=0.91.10
+pkgrel=3
+pkgdesc="X.org ASPEED AST Graphics video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('a90624e63f33fdcb50ccefcdeebb34052f341ef3')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-ati/PKGBUILD b/testing/xf86-video-ati/PKGBUILD
new file mode 100644
index 000000000..bd3d1fd9e
--- /dev/null
+++ b/testing/xf86-video-ati/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 115444 2011-03-18 07:49:48Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Alexander Baldeck <alexander@archlinux.org>
+
+pkgname=xf86-video-ati
+pkgver=6.14.1
+pkgrel=1
+pkgdesc="X.org ati video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=(libpciaccess libdrm udev pixman ati-dri)
+makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'mesa')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('395e23ad026e4246dd70bbd2143688b5')
+
+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-ati/ati-fix-build-1.10.patch b/testing/xf86-video-ati/ati-fix-build-1.10.patch
new file mode 100644
index 000000000..75980cbf3
--- /dev/null
+++ b/testing/xf86-video-ati/ati-fix-build-1.10.patch
@@ -0,0 +1,38 @@
+From ecfdb209afe2aafc378baab8c511f5df7b000270 Mon Sep 17 00:00:00 2001
+From: Sedat Dilek <sedat.dilek@googlemail.com>
+Date: Fri, 25 Feb 2011 21:48:14 +0100
+Subject: [PATCH] UMS: Fix build against xserver 1.10-rc3
+
+This issue was introduced due to last minute backout of RandR-1.4
+in xserver 1.10-rc3.
+
+Switch to "#ifdef RANDR_14_INTERFACE" as suggested by Keith Packard.
+See also <http://lists.x.org/archives/xorg-devel/2011-February/019643.html>.
+
+Note:
+The ddx needs a rebuild as the X video driver ABI changed to version 10.0.
+
+Reported-by: Alex Deucher <alexdeucher@gmail.com>
+CC: Keith Packard <keithp@keithp.com>
+Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
+---
+ src/radeon_output.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/radeon_output.c b/src/radeon_output.c
+index 15cef06..ccde346 100644
+--- a/src/radeon_output.c
++++ b/src/radeon_output.c
+@@ -1622,7 +1622,7 @@ radeon_set_mode_for_property(xf86OutputPtr output)
+ xf86CrtcPtr crtc = output->crtc;
+
+ if (crtc->enabled) {
+-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0)
++#ifdef RANDR_14_INTERFACE
+ xf86CrtcSetRec crtc_set_rec;
+
+ crtc_set_rec.flags = (XF86CrtcSetMode |
+--
+1.7.1
+
+
diff --git a/testing/xf86-video-chips/PKGBUILD b/testing/xf86-video-chips/PKGBUILD
new file mode 100644
index 000000000..655847922
--- /dev/null
+++ b/testing/xf86-video-chips/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 115295 2011-03-17 17:13:45Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Alexander Baldeck <alexander@archlinux.org>
+
+pkgname=xf86-video-chips
+pkgver=1.2.4
+pkgrel=2
+pkgdesc="X.org Chips and Technologies video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=(glibc)
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('71f474335d05f93b2451a7a0750c4409669641a4')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-cirrus/LICENSE b/testing/xf86-video-cirrus/LICENSE
new file mode 100644
index 000000000..bb283cf4d
--- /dev/null
+++ b/testing/xf86-video-cirrus/LICENSE
@@ -0,0 +1,22 @@
+This package was downloaded from
+http://xorg.freedesktop.org/releases/individual/driver/
+
+Copyright 2000 by Egbert Eich
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Alan Hourihane not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Alan Hourihane makes no representations
+about the suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+EGBERT EICH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/testing/xf86-video-cirrus/PKGBUILD b/testing/xf86-video-cirrus/PKGBUILD
new file mode 100644
index 000000000..b0043635d
--- /dev/null
+++ b/testing/xf86-video-cirrus/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 115298 2011-03-17 17:18:57Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-cirrus
+pkgver=1.3.2
+pkgrel=6
+pkgdesc="X.org Cirrus Logic video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ LICENSE)
+md5sums=('8195d03ed0be0975c03441e66a9f53b3'
+ 'b9b570ac5c03f1fbe3e0cee5fe884b82')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-dummy/PKGBUILD b/testing/xf86-video-dummy/PKGBUILD
new file mode 100644
index 000000000..3b7a1e6d1
--- /dev/null
+++ b/testing/xf86-video-dummy/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115301 2011-03-17 17:21:06Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-dummy
+pkgver=0.3.4
+pkgrel=4
+pkgdesc="X.org dummy video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'xf86dgaproto')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('876ed7165ea2821bbddd73232a1ce0b79c1f14ff')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-fbdev/PKGBUILD b/testing/xf86-video-fbdev/PKGBUILD
new file mode 100644
index 000000000..12edc4e6a
--- /dev/null
+++ b/testing/xf86-video-fbdev/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115309 2011-03-17 17:26:03Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-fbdev
+pkgver=0.4.2
+pkgrel=4
+pkgdesc="X.org framebuffer video driver"
+arch=(i686 x86_64)
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('c8562f997d56c9fec50df6ca9892f39f43ff4c2c')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-glint/PKGBUILD b/testing/xf86-video-glint/PKGBUILD
new file mode 100644
index 000000000..2a0e8dbb1
--- /dev/null
+++ b/testing/xf86-video-glint/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115314 2011-03-17 17:29:52Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-glint
+pkgver=1.2.5
+pkgrel=2
+pkgdesc="X.org GLINT/Permedia video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'xf86dgaproto')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('28d54093c6485bf0055fa16be3d116f9107aaea7')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --disable-dri
+ make
+ 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-i128/PKGBUILD b/testing/xf86-video-i128/PKGBUILD
new file mode 100644
index 000000000..c8f10156e
--- /dev/null
+++ b/testing/xf86-video-i128/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115322 2011-03-17 17:39:36Z andyrtr $
+# Maintainer:Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-i128
+pkgver=1.3.4
+pkgrel=3
+pkgdesc="X.org Number 9 I128 video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('d5f755dc964eaa067b4efcafafd00814a60df775')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-i740/PKGBUILD b/testing/xf86-video-i740/PKGBUILD
new file mode 100644
index 000000000..4316de76b
--- /dev/null
+++ b/testing/xf86-video-i740/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115325 2011-03-17 17:41:18Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-i740
+pkgver=1.3.2
+pkgrel=6
+pkgdesc="X.org Intel i740 video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('aadd2168153f780c487778e5fdda5473ed4b243d')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-intel/PKGBUILD b/testing/xf86-video-intel/PKGBUILD
new file mode 100644
index 000000000..8218208b1
--- /dev/null
+++ b/testing/xf86-video-intel/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 117291 2011-03-30 17:29:24Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-intel
+pkgver=2.14.902
+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 libxfixes udev)
+makedepends=('xorg-server-devel' 'libx11' 'libdrm' 'xf86driproto' 'glproto' 'mesa' 'libxvmc' 'xcb-util')
+conflicts=('xorg-server<1.10.0' 'xf86-video-i810' 'xf86-video-intel-legacy')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('552d6d1be754c974d140763232a2c17361d9a625')
+
+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-intel/git-fixes.patch b/testing/xf86-video-intel/git-fixes.patch
new file mode 100644
index 000000000..cbdbf27b5
--- /dev/null
+++ b/testing/xf86-video-intel/git-fixes.patch
@@ -0,0 +1,1209 @@
+diff --git a/Makefile.am b/Makefile.am
+index f4239de..83948ab 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -18,6 +18,7 @@
+ # 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.
+
++ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+ SUBDIRS = uxa src man
+ MAINTAINERCLEANFILES = ChangeLog INSTALL
+diff --git a/configure.ac b/configure.ac
+index 529a294..5a1baac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,18 +21,24 @@
+ # Process this file with autoconf to produce a configure script
+
+ # Initialize Autoconf
+-AC_PREREQ([2.60])
++AC_PREREQ([2.63])
+ AC_INIT([xf86-video-intel],
+ [2.14.0],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+ [xf86-video-intel])
+ AC_CONFIG_SRCDIR([Makefile.am])
+ AC_CONFIG_HEADERS([config.h])
+-AC_CONFIG_AUX_DIR(.)
++AC_CONFIG_AUX_DIR([build-aux])
++AC_CONFIG_MACRO_DIR([m4])
+
+ # Initialize Automake
+-AM_INIT_AUTOMAKE([foreign dist-bzip2])
+-AM_MAINTAINER_MODE
++AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2])
++AM_MAINTAINER_MODE([enable])
++
++# Support silent build rules, requires at least automake-1.11. Disable
++# by either passing --disable-silent-rules to configure or passing V=1
++# to make
++m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+ # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+ m4_ifndef([XORG_MACROS_VERSION],
+@@ -50,8 +56,8 @@ m4_ifndef([XORG_DRIVER_CHECK_EXT],
+ depending on your distribution, try package 'xserver-xorg-dev' or 'xorg-x11-server-devel'])])
+
+ # Initialize libtool
+-AC_DISABLE_STATIC
+-AC_PROG_LIBTOOL
++LT_PREREQ([2.2])
++LT_INIT([disable-static])
+
+ PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.1], [gen4asm=yes], [gen4asm=no])
+ AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
+@@ -85,6 +91,12 @@ AC_ARG_ENABLE(kms-only, AS_HELP_STRING([--enable-kms-only],
+ [KMS_ONLY="$enableval"],
+ [KMS_ONLY=no])
+
++AC_ARG_ENABLE(debug,
++ AS_HELP_STRING([--enable-debug],
++ [Enables internal debugging [[default=yes]]]),
++ [DEBUG="$enableval"],
++ [DEBUG=yes])
++
+ # Store the list of server defined optional extensions in REQUIRED_MODULES
+ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+@@ -138,15 +150,19 @@ fi
+ AC_MSG_CHECKING([whether to include XvMC support])
+ AC_MSG_RESULT([$XVMC])
+ AM_CONDITIONAL(XVMC, test x$XVMC = xyes)
+-if test "$XVMC" = yes; then
++if test "x$XVMC" = xyes; then
+ AC_DEFINE(ENABLE_XVMC,1,[Enable XvMC support])
+ fi
+
+ AM_CONDITIONAL(KMS_ONLY, test x$KMS_ONLY = xyes)
+-if test "$KMS_ONLY" = yes; then
++if test "x$KMS_ONLY" = xyes; then
+ AC_DEFINE(KMS_ONLY,1,[Assume KMS support])
+ fi
+
++if test "x$DEBUG" = xno; then
++ AC_DEFINE(NDEBUG,1,[Disable internal debugging])
++fi
++
+ DRIVER_NAME=intel
+ AC_SUBST([DRIVER_NAME])
+ AC_SUBST([moduledir])
+diff --git a/src/i915_render.c b/src/i915_render.c
+index 6d844e5..d04e8e1 100644
+--- a/src/i915_render.c
++++ b/src/i915_render.c
+@@ -302,12 +302,10 @@ static Bool i915_texture_setup(PicturePtr picture, PixmapPtr pixmap, int unit)
+ ScrnInfoPtr scrn = xf86Screens[picture->pDrawable->pScreen->myNum];
+ intel_screen_private *intel = intel_get_screen_private(scrn);
+ uint32_t format, pitch, filter;
+- int w, h, i;
+ uint32_t wrap_mode, tiling_bits;
++ int i;
+
+ pitch = intel_pixmap_pitch(pixmap);
+- w = picture->pDrawable->width;
+- h = picture->pDrawable->height;
+ intel->scale_units[unit][0] = 1. / pixmap->drawable.width;
+ intel->scale_units[unit][1] = 1. / pixmap->drawable.height;
+
+@@ -546,8 +544,8 @@ i915_emit_composite_primitive(PixmapPtr dest,
+ {
+ ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum];
+ intel_screen_private *intel = intel_get_screen_private(scrn);
+- Bool is_affine_src, is_affine_mask = TRUE;
+- int per_vertex, num_floats;
++ Bool is_affine_src = TRUE, is_affine_mask = TRUE;
++ int per_vertex;
+ int tex_unit = 0;
+ int src_unit = -1, mask_unit = -1;
+ float src_x[3], src_y[3], src_w[3], mask_x[3], mask_y[3], mask_w[3];
+@@ -666,8 +664,6 @@ i915_emit_composite_primitive(PixmapPtr dest,
+ }
+ }
+
+- num_floats = 3 * per_vertex;
+-
+ OUT_VERTEX(dstX + w);
+ OUT_VERTEX(dstY + h);
+ if (! intel->render_source_is_solid) {
+diff --git a/src/i965_video.c b/src/i965_video.c
+index 235dfb9..e16a575 100644
+--- a/src/i965_video.c
++++ b/src/i965_video.c
+@@ -414,8 +414,8 @@ static void i965_create_dst_surface_state(ScrnInfoPtr scrn,
+ intel_emit_reloc(surf_bo, offset + offsetof(struct brw_surface_state, ss1),
+ pixmap_bo, 0, I915_GEM_DOMAIN_SAMPLER, 0);
+
+- dest_surf_state->ss2.height = scrn->virtualY - 1;
+- dest_surf_state->ss2.width = scrn->virtualX - 1;
++ dest_surf_state->ss2.height = pixmap->drawable.height - 1;
++ dest_surf_state->ss2.width = pixmap->drawable.width - 1;
+ dest_surf_state->ss2.mip_count = 0;
+ dest_surf_state->ss2.render_target_rotation = 0;
+ dest_surf_state->ss3.pitch = intel_pixmap_pitch(pixmap) - 1;
+@@ -770,7 +770,7 @@ static drm_intel_bo *i965_create_cc_state(ScrnInfoPtr scrn)
+ }
+
+ static void
+-i965_emit_video_setup(ScrnInfoPtr scrn, drm_intel_bo * surface_state_binding_table_bo, int n_src_surf)
++i965_emit_video_setup(ScrnInfoPtr scrn, drm_intel_bo * surface_state_binding_table_bo, int n_src_surf, PixmapPtr pixmap)
+ {
+ intel_screen_private *intel = intel_get_screen_private(scrn);
+ int urb_vs_start, urb_vs_size;
+@@ -821,20 +821,20 @@ i965_emit_video_setup(ScrnInfoPtr scrn, drm_intel_bo * surface_state_binding_tab
+ OUT_BATCH(0 | BASE_ADDRESS_MODIFY); /* media base addr, don't care */
+ OUT_BATCH(0 | BASE_ADDRESS_MODIFY); /* Instruction base address */
+ /* general state max addr, disabled */
+- OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
++ OUT_BATCH(0 | BASE_ADDRESS_MODIFY);
+ /* media object state max addr, disabled */
+- OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
++ OUT_BATCH(0 | BASE_ADDRESS_MODIFY);
+ /* Instruction max addr, disabled */
+- OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
++ OUT_BATCH(0 | BASE_ADDRESS_MODIFY);
+ } else {
+ OUT_BATCH(BRW_STATE_BASE_ADDRESS | 4);
+ OUT_BATCH(0 | BASE_ADDRESS_MODIFY); /* Generate state base address */
+ OUT_RELOC(surface_state_binding_table_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, BASE_ADDRESS_MODIFY); /* Surface state base address */
+ OUT_BATCH(0 | BASE_ADDRESS_MODIFY); /* media base addr, don't care */
+ /* general state max addr, disabled */
+- OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
++ OUT_BATCH(0 | BASE_ADDRESS_MODIFY);
+ /* media object state max addr, disabled */
+- OUT_BATCH(0x10000000 | BASE_ADDRESS_MODIFY);
++ OUT_BATCH(0 | BASE_ADDRESS_MODIFY);
+ }
+
+ /* Set system instruction pointer */
+@@ -877,7 +877,7 @@ i965_emit_video_setup(ScrnInfoPtr scrn, drm_intel_bo * surface_state_binding_tab
+ */
+ OUT_BATCH(BRW_3DSTATE_DRAWING_RECTANGLE | 2); /* XXX 3 for BLC or CTG */
+ OUT_BATCH(0x00000000); /* ymin, xmin */
+- OUT_BATCH((scrn->virtualX - 1) | (scrn->virtualY - 1) << 16); /* ymax, xmax */
++ OUT_BATCH((pixmap->drawable.width - 1) | (pixmap->drawable.height - 1) << 16); /* ymax, xmax */
+ OUT_BATCH(0x00000000); /* yorigin, xorigin */
+
+ /* skip the depth buffer */
+@@ -1212,7 +1212,7 @@ I965DisplayVideoTextured(ScrnInfoPtr scrn,
+
+ intel_batch_start_atomic(scrn, 100);
+
+- i965_emit_video_setup(scrn, surface_state_binding_table_bo, n_src_surf);
++ i965_emit_video_setup(scrn, surface_state_binding_table_bo, n_src_surf, pixmap);
+
+ /* Set up the pointer to our vertex buffer */
+ OUT_BATCH(BRW_3DSTATE_VERTEX_BUFFERS | 3);
+@@ -1517,13 +1517,13 @@ gen6_upload_depth_buffer_state(ScrnInfoPtr scrn)
+ }
+
+ static void
+-gen6_upload_drawing_rectangle(ScrnInfoPtr scrn)
++gen6_upload_drawing_rectangle(ScrnInfoPtr scrn, PixmapPtr pixmap)
+ {
+ intel_screen_private *intel = intel_get_screen_private(scrn);
+
+ OUT_BATCH(BRW_3DSTATE_DRAWING_RECTANGLE | 2);
+ OUT_BATCH(0x00000000); /* ymin, xmin */
+- OUT_BATCH((scrn->virtualX - 1) | (scrn->virtualY - 1) << 16); /* ymax, xmax */
++ OUT_BATCH((pixmap->drawable.width - 1) | (pixmap->drawable.height - 1) << 16); /* ymax, xmax */
+ OUT_BATCH(0x00000000); /* yorigin, xorigin */
+ }
+
+@@ -1673,7 +1673,7 @@ gen6_upload_vertex_element_state(ScrnInfoPtr scrn)
+ }
+
+ static void
+-gen6_emit_video_setup(ScrnInfoPtr scrn, drm_intel_bo *surface_state_binding_table_bo, int n_src_surf)
++gen6_emit_video_setup(ScrnInfoPtr scrn, drm_intel_bo *surface_state_binding_table_bo, int n_src_surf, PixmapPtr pixmap)
+ {
+ intel_screen_private *intel = intel_get_screen_private(scrn);
+
+@@ -1694,7 +1694,7 @@ gen6_emit_video_setup(ScrnInfoPtr scrn, drm_intel_bo *surface_state_binding_tabl
+ gen6_upload_wm_state(scrn, n_src_surf == 1 ? TRUE : FALSE);
+ gen6_upload_binding_table(scrn, (n_src_surf + 1) * ALIGN(sizeof(struct brw_surface_state), 32));;
+ gen6_upload_depth_buffer_state(scrn);
+- gen6_upload_drawing_rectangle(scrn);
++ gen6_upload_drawing_rectangle(scrn, pixmap);
+ gen6_upload_vertex_element_state(scrn);
+ }
+
+@@ -1853,7 +1853,7 @@ void Gen6DisplayVideoTextured(ScrnInfoPtr scrn,
+ intel_batch_submit(scrn, FALSE);
+
+ intel_batch_start_atomic(scrn, 200);
+- gen6_emit_video_setup(scrn, surface_state_binding_table_bo, n_src_surf);
++ gen6_emit_video_setup(scrn, surface_state_binding_table_bo, n_src_surf, pixmap);
+
+ /* Set up the pointer to our vertex buffer */
+ OUT_BATCH(BRW_3DSTATE_VERTEX_BUFFERS | (5 - 2));
+diff --git a/src/intel.h b/src/intel.h
+index 9063328..4c755fc 100644
+--- a/src/intel.h
++++ b/src/intel.h
+@@ -227,8 +227,6 @@ static inline Bool intel_pixmap_tiled(PixmapPtr pixmap)
+ dri_bo *intel_get_pixmap_bo(PixmapPtr pixmap);
+ void intel_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo);
+
+-typedef struct _I830OutputRec I830OutputRec, *I830OutputPtr;
+-
+ #include "common.h"
+
+ #ifdef XvMCExtension
+@@ -239,39 +237,6 @@ typedef struct _I830OutputRec I830OutputRec, *I830OutputPtr;
+
+ #define PITCH_NONE 0
+
+-/** Record of a linear allocation in the aperture. */
+-typedef struct _intel_memory intel_memory;
+-struct _intel_memory {
+- /** Description of the allocation, for logging */
+- char *name;
+-
+- /** @{
+- * Memory allocator linked list pointers
+- */
+- intel_memory *next;
+- intel_memory *prev;
+- /** @} */
+-
+- drm_intel_bo *bo;
+- uint32_t gem_name;
+-};
+-
+-typedef struct _I830CrtcPrivateRec {
+- int pipe;
+- int plane;
+-
+- Bool enabled;
+-
+- int dpms_mode;
+-
+- int x, y;
+-
+- /* Lookup table values to be set when the CRTC is enabled */
+- uint8_t lut_r[256], lut_g[256], lut_b[256];
+-} I830CrtcPrivateRec, *I830CrtcPrivatePtr;
+-
+-#define I830CrtcPrivate(c) ((I830CrtcPrivatePtr) (c)->driver_private)
+-
+ /** enumeration of 3d consumers so some can maintain invariant state. */
+ enum last_3d {
+ LAST_3D_OTHER,
+@@ -288,19 +253,12 @@ enum dri_type {
+
+ typedef struct intel_screen_private {
+ ScrnInfoPtr scrn;
+- unsigned char *MMIOBase;
+ int cpp;
+
+ #define RENDER_BATCH I915_EXEC_RENDER
+ #define BLT_BATCH I915_EXEC_BLT
+ unsigned int current_batch;
+
+- unsigned int bufferOffset; /* for I830SelectBuffer */
+-
+- /* These are set in PreInit and never changed. */
+- long FbMapSize;
+- long GTTMapSize;
+-
+ void *modes;
+ drm_intel_bo *front_buffer;
+ long front_pitch, front_tiling;
+@@ -344,7 +302,6 @@ typedef struct intel_screen_private {
+ Bool has_relaxed_fencing;
+
+ int Chipset;
+- unsigned long LinearAddr;
+ EntityInfoPtr pEnt;
+ struct pci_device *PciInfo;
+ struct intel_chipset chipset;
+@@ -535,8 +492,6 @@ extern void I830InitVideo(ScreenPtr pScreen);
+ extern xf86CrtcPtr intel_covering_crtc(ScrnInfoPtr scrn, BoxPtr box,
+ xf86CrtcPtr desired, BoxPtr crtc_box_ret);
+
+-extern xf86CrtcPtr intel_pipe_to_crtc(ScrnInfoPtr scrn, int pipe);
+-
+ Bool I830DRI2ScreenInit(ScreenPtr pScreen);
+ void I830DRI2CloseScreen(ScreenPtr pScreen);
+ void I830DRI2FrameEventHandler(unsigned int frame, unsigned int tv_sec,
+@@ -545,11 +500,7 @@ void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec,
+ unsigned int tv_usec, void *user_data);
+
+ extern Bool intel_crtc_on(xf86CrtcPtr crtc);
+-static inline int intel_crtc_to_pipe(xf86CrtcPtr crtc)
+-{
+- intel_screen_private *intel = intel_get_screen_private(crtc->scrn);
+- return intel_get_pipe_from_crtc_id(intel->bufmgr, crtc);
+-}
++int intel_crtc_to_pipe(xf86CrtcPtr crtc);
+
+ /* intel_memory.c */
+ unsigned long intel_get_fence_size(intel_screen_private *intel, unsigned long size);
+@@ -688,11 +639,6 @@ static inline drm_intel_bo *intel_bo_alloc_for_data(ScrnInfoPtr scrn,
+ return bo;
+ }
+
+-/* Flags for memory allocation function */
+-#define NEED_PHYSICAL_ADDR 0x00000001
+-#define ALLOW_SHARING 0x00000010
+-#define DISABLE_REUSE 0x00000020
+-
+ void intel_debug_flush(ScrnInfoPtr scrn);
+
+ static inline PixmapPtr get_drawable_pixmap(DrawablePtr drawable)
+@@ -715,7 +661,7 @@ static inline Bool pixmap_is_scanout(PixmapPtr pixmap)
+ const OptionInfoRec *intel_uxa_available_options(int chipid, int busid);
+
+ Bool intel_uxa_init(ScreenPtr pScreen);
+-void intel_uxa_create_screen_resources(ScreenPtr pScreen);
++Bool intel_uxa_create_screen_resources(ScreenPtr pScreen);
+ void intel_uxa_block_handler(intel_screen_private *intel);
+ Bool intel_get_aperture_space(ScrnInfoPtr scrn, drm_intel_bo ** bo_table,
+ int num_bos);
+diff --git a/src/intel_display.c b/src/intel_display.c
+index 1198013..f487a6e 100644
+--- a/src/intel_display.c
++++ b/src/intel_display.c
+@@ -70,6 +70,7 @@ struct intel_crtc {
+ struct intel_mode *mode;
+ drmModeModeInfo kmode;
+ drmModeCrtcPtr mode_crtc;
++ int pipe;
+ dri_bo *cursor;
+ dri_bo *rotate_bo;
+ uint32_t rotate_pitch;
+@@ -118,7 +119,6 @@ intel_output_dpms_backlight(xf86OutputPtr output, int oldmode, int mode);
+ * List of available kernel interfaces in priority order
+ */
+ static const char *backlight_interfaces[] = {
+- "intel", /* prefer our own native backlight driver */
+ "asus-laptop",
+ "eeepc",
+ "thinkpad_screen",
+@@ -128,6 +128,7 @@ static const char *backlight_interfaces[] = {
+ "samsung",
+ "acpi_video1", /* finally fallback to the generic acpi drivers */
+ "acpi_video0",
++ "intel_backlight",
+ NULL,
+ };
+ /*
+@@ -678,6 +679,9 @@ intel_crtc_init(ScrnInfoPtr scrn, struct intel_mode *mode, int num)
+ intel_crtc->mode = mode;
+ crtc->driver_private = intel_crtc;
+
++ intel_crtc->pipe = drm_intel_get_pipe_from_crtc_id(intel->bufmgr,
++ crtc_id(intel_crtc));
++
+ intel_crtc->cursor = drm_intel_bo_alloc(intel->bufmgr, "ARGB cursor",
+ HWCURSOR_SIZE_ARGB,
+ GTT_PAGE_SIZE);
+@@ -1671,16 +1675,15 @@ intel_mode_fini(intel_screen_private *intel)
+ intel->modes = NULL;
+ }
+
+-int
+-intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, xf86CrtcPtr crtc)
+-{
+- return drm_intel_get_pipe_from_crtc_id(bufmgr,
+- crtc_id(crtc->driver_private));
+-}
+-
+ /* for the mode overlay */
+ int
+ intel_crtc_id(xf86CrtcPtr crtc)
+ {
+ return crtc_id(crtc->driver_private);
+ }
++
++int intel_crtc_to_pipe(xf86CrtcPtr crtc)
++{
++ struct intel_crtc *intel_crtc = crtc->driver_private;
++ return intel_crtc->pipe;
++}
+diff --git a/src/intel_driver.c b/src/intel_driver.c
+index 1275e4b..ebed258 100644
+--- a/src/intel_driver.c
++++ b/src/intel_driver.c
+@@ -37,10 +37,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include "config.h"
+ #endif
+
+-#ifndef PRINT_MODE_INFO
+-#define PRINT_MODE_INFO 0
+-#endif
+-
+ #include <assert.h>
+ #include <string.h>
+ #include <stdio.h>
+@@ -80,10 +76,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include "i915_drm.h"
+ #include <xf86drmMode.h>
+
+-#define BIT(x) (1 << (x))
+-#define MAX(a,b) ((a) > (b) ? (a) : (b))
+-#define NB_OF(x) (sizeof (x) / sizeof (*x))
+-
+ /* *INDENT-OFF* */
+ /*
+ * Note: "ColorKey" is provided for compatibility with the i810 driver.
+@@ -174,14 +166,6 @@ I830LoadPalette(ScrnInfoPtr scrn, int numColors, int *indices,
+
+ for (p = 0; p < xf86_config->num_crtc; p++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[p];
+- I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
+-
+- /* Initialize to the old lookup table values. */
+- for (i = 0; i < 256; i++) {
+- lut_r[i] = intel_crtc->lut_r[i] << 8;
+- lut_g[i] = intel_crtc->lut_g[i] << 8;
+- lut_b[i] = intel_crtc->lut_b[i] << 8;
+- }
+
+ switch (scrn->depth) {
+ case 15:
+@@ -250,9 +234,7 @@ static Bool i830CreateScreenResources(ScreenPtr screen)
+ if (!(*screen->CreateScreenResources) (screen))
+ return FALSE;
+
+- intel_uxa_create_screen_resources(screen);
+-
+- return TRUE;
++ return intel_uxa_create_screen_resources(screen);
+ }
+
+ static void PreInitCleanup(ScrnInfoPtr scrn)
+@@ -607,12 +589,9 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
+ intel->tiling = TRUE;
+
+ /* Allow user override if they set a value */
+- if (!ALWAYS_TILING(intel) && xf86IsOptionSet(intel->Options, OPTION_TILING)) {
+- if (xf86ReturnOptValBool(intel->Options, OPTION_TILING, FALSE))
+- intel->tiling = TRUE;
+- else
+- intel->tiling = FALSE;
+- }
++ if (!ALWAYS_TILING(intel))
++ intel->tiling = xf86ReturnOptValBool(intel->Options,
++ OPTION_TILING, TRUE);
+
+ intel->can_blt = can_accelerate_blt(intel);
+ intel->use_shadow = !intel->can_blt;
+@@ -631,19 +610,11 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
+ }
+
+ /* SwapBuffers delays to avoid tearing */
+- intel->swapbuffers_wait = TRUE;
+-
+- /* Allow user override if they set a value */
+- if (xf86IsOptionSet(intel->Options, OPTION_SWAPBUFFERS_WAIT)) {
+- if (xf86ReturnOptValBool
+- (intel->Options, OPTION_SWAPBUFFERS_WAIT, FALSE))
+- intel->swapbuffers_wait = TRUE;
+- else
+- intel->swapbuffers_wait = FALSE;
+- }
+-
++ intel->swapbuffers_wait = xf86ReturnOptValBool(intel->Options,
++ OPTION_SWAPBUFFERS_WAIT,
++ TRUE);
+ if (IS_GEN6(intel))
+- intel->swapbuffers_wait = FALSE;
++ intel->swapbuffers_wait = FALSE;
+
+ xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Tiling %sabled\n",
+ intel->tiling ? "en" : "dis");
+@@ -679,19 +650,12 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
+ }
+
+ /* Load the dri2 module if requested. */
+- if (xf86ReturnOptValBool(intel->Options, OPTION_DRI, FALSE) &&
+- intel->directRenderingType != DRI_DISABLED) {
++ if (intel->directRenderingType != DRI_DISABLED)
+ xf86LoadSubModule(scrn, "dri2");
+- }
+
+ return TRUE;
+ }
+
+-enum pipe {
+- PIPE_A = 0,
+- PIPE_B,
+-};
+-
+ /**
+ * Intialiazes the hardware for the 3D pipeline use in the 2D driver.
+ *
+@@ -733,50 +697,6 @@ I830BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask)
+ intel_video_block_handler(intel);
+ }
+
+-static void intel_fixup_mtrrs(ScrnInfoPtr scrn)
+-{
+-#ifdef HAS_MTRR_SUPPORT
+- intel_screen_private *intel = intel_get_screen_private(scrn);
+- int fd;
+- struct mtrr_gentry gentry;
+- struct mtrr_sentry sentry;
+-
+- if ((fd = open("/proc/mtrr", O_RDONLY, 0)) != -1) {
+- for (gentry.regnum = 0;
+- ioctl(fd, MTRRIOC_GET_ENTRY, &gentry) == 0;
+- ++gentry.regnum) {
+-
+- if (gentry.size < 1) {
+- /* DISABLED */
+- continue;
+- }
+-
+- /* Check the MTRR range is one we like and if not - remove it.
+- * The Xserver common layer will then setup the right range
+- * for us.
+- */
+- if (gentry.base == intel->LinearAddr &&
+- gentry.size < intel->FbMapSize) {
+-
+- xf86DrvMsg(scrn->scrnIndex, X_INFO,
+- "Removing bad MTRR range (base 0x%lx, size 0x%x)\n",
+- gentry.base, gentry.size);
+-
+- sentry.base = gentry.base;
+- sentry.size = gentry.size;
+- sentry.type = gentry.type;
+-
+- if (ioctl(fd, MTRRIOC_DEL_ENTRY, &sentry) == -1) {
+- xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+- "Failed to remove bad MTRR range\n");
+- }
+- }
+- }
+- close(fd);
+- }
+-#endif
+-}
+-
+ static Bool
+ intel_init_initial_framebuffer(ScrnInfoPtr scrn)
+ {
+@@ -809,7 +729,7 @@ Bool intel_crtc_on(xf86CrtcPtr crtc)
+ {
+ ScrnInfoPtr scrn = crtc->scrn;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+- int i, active_outputs = 0;
++ int i;
+
+ if (!crtc->enabled)
+ return FALSE;
+@@ -819,11 +739,9 @@ Bool intel_crtc_on(xf86CrtcPtr crtc)
+ xf86OutputPtr output = xf86_config->output[i];
+ if (output->crtc == crtc &&
+ intel_output_dpms_status(output) == DPMSModeOn)
+- active_outputs++;
++ return TRUE;
+ }
+
+- if (active_outputs)
+- return TRUE;
+ return FALSE;
+ }
+
+@@ -849,103 +767,102 @@ intel_flush_callback(CallbackListPtr *list,
+ static void
+ I830HandleUEvents(int fd, void *closure)
+ {
+- ScrnInfoPtr scrn = closure;
++ ScrnInfoPtr scrn = closure;
+ intel_screen_private *intel = intel_get_screen_private(scrn);
+- struct udev_device *dev;
+- const char *hotplug;
+- struct stat s;
+- dev_t udev_devnum;
+-
+- dev = udev_monitor_receive_device(intel->uevent_monitor);
+- if (!dev)
+- return;
+-
+- udev_devnum = udev_device_get_devnum(dev);
+- fstat(intel->drmSubFD, &s);
+- /*
+- * Check to make sure this event is directed at our
+- * device (by comparing dev_t values), then make
+- * sure it's a hotplug event (HOTPLUG=1)
+- */
+-
+- hotplug = udev_device_get_property_value(dev, "HOTPLUG");
+-
+- if (memcmp(&s.st_rdev, &udev_devnum, sizeof (dev_t)) == 0 &&
+- hotplug && atoi(hotplug) == 1)
+- RRGetInfo(screenInfo.screens[scrn->scrnIndex], TRUE);
+-
+- udev_device_unref(dev);
++ struct udev_device *dev;
++ const char *hotplug;
++ struct stat s;
++ dev_t udev_devnum;
++
++ dev = udev_monitor_receive_device(intel->uevent_monitor);
++ if (!dev)
++ return;
++
++ udev_devnum = udev_device_get_devnum(dev);
++ fstat(intel->drmSubFD, &s);
++ /*
++ * Check to make sure this event is directed at our
++ * device (by comparing dev_t values), then make
++ * sure it's a hotplug event (HOTPLUG=1)
++ */
++
++ hotplug = udev_device_get_property_value(dev, "HOTPLUG");
++
++ if (memcmp(&s.st_rdev, &udev_devnum, sizeof (dev_t)) == 0 &&
++ hotplug && atoi(hotplug) == 1)
++ RRGetInfo(screenInfo.screens[scrn->scrnIndex], TRUE);
++
++ udev_device_unref(dev);
+ }
+
+ static void
+ I830UeventInit(ScrnInfoPtr scrn)
+ {
+- intel_screen_private *intel = intel_get_screen_private(scrn);
+- struct udev *u;
+- struct udev_monitor *mon;
+- Bool hotplug;
+- MessageType from = X_CONFIG;
+-
+- if (!xf86GetOptValBool(intel->Options, OPTION_HOTPLUG, &hotplug)) {
+- from = X_DEFAULT;
+- hotplug = TRUE;
+- }
+-
+- xf86DrvMsg(scrn->scrnIndex, from, "hotplug detection: \"%s\"\n",
+- hotplug ? "enabled" : "disabled");
+- if (!hotplug)
+- return;
+-
+- u = udev_new();
+- if (!u)
+- return;
+-
+- mon = udev_monitor_new_from_netlink(u, "udev");
+-
+- if (!mon) {
+- udev_unref(u);
+- return;
+- }
+-
+- if (udev_monitor_filter_add_match_subsystem_devtype(mon,
+- "drm",
+- "drm_minor") < 0 ||
+- udev_monitor_enable_receiving(mon) < 0)
+- {
+- udev_monitor_unref(mon);
+- udev_unref(u);
+- return;
+- }
+-
+- intel->uevent_handler =
+- xf86AddGeneralHandler(udev_monitor_get_fd(mon),
+- I830HandleUEvents,
+- scrn);
+- if (!intel->uevent_handler) {
+- udev_monitor_unref(mon);
+- udev_unref(u);
+- return;
+- }
+-
+- intel->uevent_monitor = mon;
++ intel_screen_private *intel = intel_get_screen_private(scrn);
++ struct udev *u;
++ struct udev_monitor *mon;
++ Bool hotplug;
++ MessageType from = X_CONFIG;
++
++ if (!xf86GetOptValBool(intel->Options, OPTION_HOTPLUG, &hotplug)) {
++ from = X_DEFAULT;
++ hotplug = TRUE;
++ }
++
++ xf86DrvMsg(scrn->scrnIndex, from, "hotplug detection: \"%s\"\n",
++ hotplug ? "enabled" : "disabled");
++ if (!hotplug)
++ return;
++
++ u = udev_new();
++ if (!u)
++ return;
++
++ mon = udev_monitor_new_from_netlink(u, "udev");
++
++ if (!mon) {
++ udev_unref(u);
++ return;
++ }
++
++ if (udev_monitor_filter_add_match_subsystem_devtype(mon,
++ "drm",
++ "drm_minor") < 0 ||
++ udev_monitor_enable_receiving(mon) < 0)
++ {
++ udev_monitor_unref(mon);
++ udev_unref(u);
++ return;
++ }
++
++ intel->uevent_handler =
++ xf86AddGeneralHandler(udev_monitor_get_fd(mon),
++ I830HandleUEvents,
++ scrn);
++ if (!intel->uevent_handler) {
++ udev_monitor_unref(mon);
++ udev_unref(u);
++ return;
++ }
++
++ intel->uevent_monitor = mon;
+ }
+
+ static void
+ I830UeventFini(ScrnInfoPtr scrn)
+ {
+- intel_screen_private *intel = intel_get_screen_private(scrn);
++ intel_screen_private *intel = intel_get_screen_private(scrn);
+
+- if (intel->uevent_handler)
+- {
+- struct udev *u = udev_monitor_get_udev(intel->uevent_monitor);
++ if (intel->uevent_handler) {
++ struct udev *u = udev_monitor_get_udev(intel->uevent_monitor);
+
+- xf86RemoveGeneralHandler(intel->uevent_handler);
++ xf86RemoveGeneralHandler(intel->uevent_handler);
+
+- udev_monitor_unref(intel->uevent_monitor);
+- udev_unref(u);
+- intel->uevent_handler = NULL;
+- intel->uevent_monitor = NULL;
+- }
++ udev_monitor_unref(intel->uevent_monitor);
++ udev_unref(u);
++ intel->uevent_handler = NULL;
++ intel->uevent_monitor = NULL;
++ }
+ }
+ #endif /* HAVE_UDEV */
+
+@@ -961,32 +878,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
+ struct pci_device *const device = intel->PciInfo;
+ int fb_bar = IS_GEN2(intel) ? 0 : 2;
+
+- /*
+- * The "VideoRam" config file parameter specifies the maximum amount of
+- * memory that will be used/allocated. When not present, we allow the
+- * driver to allocate as much memory as it wishes to satisfy its
+- * allocations, but if agpgart support isn't available, it gets limited
+- * to the amount of pre-allocated ("stolen") memory.
+- *
+- * Note that in using this value for allocator initialization, we're
+- * limiting aperture allocation to the VideoRam option, rather than limiting
+- * actual memory allocation, so alignment and things will cause less than
+- * VideoRam to be actually used.
+- */
+- scrn->videoRam = intel->FbMapSize / KB(1);
+- if (intel->pEnt->device->videoRam != 0) {
+- if (scrn->videoRam != intel->pEnt->device->videoRam) {
+- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+- "VideoRam configuration found, which is no "
+- "longer used.\n");
+- xf86DrvMsg(scrn->scrnIndex, X_INFO,
+- "Continuing with (ignored) %dkB VideoRam "
+- "instead of %d kB.\n",
+- scrn->videoRam,
+- intel->pEnt->device->videoRam);
+- }
+- }
+-
+ scrn->videoRam = device->regions[fb_bar].size / 1024;
+
+ intel->last_3d = LAST_3D_OTHER;
+@@ -998,10 +889,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
+ */
+ intel->XvEnabled = TRUE;
+
+- xf86DrvMsg(scrn->scrnIndex,
+- intel->pEnt->device->videoRam ? X_CONFIG : X_DEFAULT,
+- "VideoRam: %d KB\n", scrn->videoRam);
+-
+ #ifdef DRI2
+ if (intel->directRenderingType == DRI_NONE
+ && I830DRI2ScreenInit(screen))
+@@ -1011,8 +898,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
+ if (!intel_init_initial_framebuffer(scrn))
+ return FALSE;
+
+- intel_fixup_mtrrs(scrn);
+-
+ intel_batch_init(scrn);
+
+ if (INTEL_INFO(intel)->gen >= 40)
+@@ -1159,7 +1044,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
+ I830UeventInit(scrn);
+ #endif
+
+- return uxa_resources_init(screen);
++ return TRUE;
+ }
+
+ static void i830AdjustFrame(int scrnIndex, int x, int y, int flags)
+@@ -1382,22 +1267,6 @@ static Bool I830PMEvent(int scrnIndex, pmEvent event, Bool undo)
+ return TRUE;
+ }
+
+-xf86CrtcPtr intel_pipe_to_crtc(ScrnInfoPtr scrn, int pipe)
+-{
+- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
+- int c;
+-
+- for (c = 0; c < config->num_crtc; c++) {
+- xf86CrtcPtr crtc = config->crtc[c];
+- I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
+-
+- if (intel_crtc->pipe == pipe)
+- return crtc;
+- }
+-
+- return NULL;
+-}
+-
+ void intel_init_scrn(ScrnInfoPtr scrn)
+ {
+ scrn->PreInit = I830PreInit;
+diff --git a/src/intel_uxa.c b/src/intel_uxa.c
+index 1a591f1..9341b91 100644
+--- a/src/intel_uxa.c
++++ b/src/intel_uxa.c
+@@ -1089,12 +1089,15 @@ static Bool intel_uxa_destroy_pixmap(PixmapPtr pixmap)
+ return TRUE;
+ }
+
+-void intel_uxa_create_screen_resources(ScreenPtr screen)
++Bool intel_uxa_create_screen_resources(ScreenPtr screen)
+ {
+ ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ intel_screen_private *intel = intel_get_screen_private(scrn);
+ dri_bo *bo = intel->front_buffer;
+
++ if (!uxa_resources_init(screen))
++ return FALSE;
++
+ drm_intel_gem_bo_map_gtt(bo);
+
+ if (intel->use_shadow) {
+@@ -1111,6 +1114,8 @@ void intel_uxa_create_screen_resources(ScreenPtr screen)
+ NULL);
+ scrn->displayWidth = intel->front_pitch / intel->cpp;
+ }
++
++ return TRUE;
+ }
+
+ static void
+@@ -1185,7 +1190,6 @@ Bool intel_uxa_init(ScreenPtr screen)
+
+ memset(intel->uxa_driver, 0, sizeof(*intel->uxa_driver));
+
+- intel->bufferOffset = 0;
+ intel->uxa_driver->uxa_major = 1;
+ intel->uxa_driver->uxa_minor = 0;
+
+diff --git a/src/intel_video.c b/src/intel_video.c
+index 2786201..5294f73 100644
+--- a/src/intel_video.c
++++ b/src/intel_video.c
+@@ -996,7 +996,7 @@ I830CopyPlanarData(intel_adaptor_private *adaptor_priv,
+ /* Copy V data for YV12, or U data for I420 */
+ src2 = buf + /* start of YUV data */
+ (srcH * srcPitch) + /* move over Luma plane */
+- ((top * srcPitch) >> 2) + /* move down from by top lines */
++ ((top >> 1) * srcPitch2) + /* move down from by top lines */
+ (left >> 1); /* move left by left pixels */
+
+ #if 0
+@@ -1015,7 +1015,7 @@ I830CopyPlanarData(intel_adaptor_private *adaptor_priv,
+ src3 = buf + /* start of YUV data */
+ (srcH * srcPitch) + /* move over Luma plane */
+ ((srcH >> 1) * srcPitch2) + /* move over Chroma plane */
+- ((top * srcPitch) >> 2) + /* move down from by top lines */
++ ((top >> 1) * srcPitch2) + /* move down from by top lines */
+ (left >> 1); /* move left by left pixels */
+ #if 0
+ ErrorF("src3 is %p, offset is %ld\n", src3,
+diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c
+index 21a1149..fbd4555 100644
+--- a/src/xvmc/i915_xvmc.c
++++ b/src/xvmc/i915_xvmc.c
+@@ -391,7 +391,6 @@ static void i915_mc_static_indirect_state_set(XvMCContext * context,
+ i915XvMCContext *pI915XvMC = (i915XvMCContext *) context->privData;
+ struct intel_xvmc_surface *intel_surf = dest->privData;
+ struct i915_mc_static_indirect_state_buffer *buffer_info;
+- unsigned int w = dest->width;
+
+ drm_intel_gem_bo_map_gtt(pI915XvMC->sis_bo);
+ buffer_info = pI915XvMC->sis_bo->virtual;
+@@ -688,7 +687,7 @@ static void i915_mc_load_indirect_render_emit(XvMCContext * context)
+ {
+ i915XvMCContext *pI915XvMC = (i915XvMCContext *) context->privData;
+ int mem_select;
+- uint32_t load_indirect, buffer_address;
++ uint32_t load_indirect;
+ BATCH_LOCALS;
+
+ BEGIN_BATCH(5);
+diff --git a/src/xvmc/intel_batchbuffer.c b/src/xvmc/intel_batchbuffer.c
+index 337b2ce..2b5526c 100644
+--- a/src/xvmc/intel_batchbuffer.c
++++ b/src/xvmc/intel_batchbuffer.c
+@@ -64,8 +64,6 @@ static void i965_end_batch(void)
+
+ Bool intelInitBatchBuffer(void)
+ {
+- int i;
+-
+ if ((xvmc_driver->batch.buf =
+ drm_intel_bo_alloc(xvmc_driver->bufmgr,
+ "batch buffer", BATCH_SIZE, 0x1000)) == NULL) {
+diff --git a/src/xvmc/intel_batchbuffer.h b/src/xvmc/intel_batchbuffer.h
+index 6fa1c05..888abeb 100644
+--- a/src/xvmc/intel_batchbuffer.h
++++ b/src/xvmc/intel_batchbuffer.h
+@@ -24,7 +24,7 @@ extern int VERBOSE;
+
+ #define OUT_RELOC(bo,read_domains,write_domains,delta) \
+ do { \
+- *(unsigned int *)batch_ptr = delta + bo->offset; \
++ *(unsigned int *)batch_ptr = (delta) + bo->offset; \
+ intel_batch_emit_reloc(bo, read_domains, write_domains, delta, batch_ptr); \
+ batch_ptr += 4; \
+ } while (0)
+diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
+index 6cbec80..1b96945 100644
+--- a/src/xvmc/intel_xvmc.c
++++ b/src/xvmc/intel_xvmc.c
+@@ -105,8 +105,6 @@ unsigned int mb_bytes_420[] = {
+
+ void LOCK_HARDWARE(drm_context_t ctx)
+ {
+- char __ret = 0;
+-
+ PPTHREAD_MUTEX_LOCK();
+ assert(!xvmc_driver->locked);
+
+@@ -218,11 +216,6 @@ _X_EXPORT Status XvMCCreateContext(Display * display, XvPortID port,
+ int error_base;
+ int event_base;
+ int priv_count;
+- int isCapable;
+- int screen = DefaultScreen(display);
+- intel_xvmc_context_ptr intel_ctx;
+- int fd;
+- char *driverName = NULL, *deviceName = NULL;
+
+ /* Verify Obvious things first */
+ if (!display || !context)
+@@ -482,7 +475,6 @@ _X_EXPORT Status XvMCCreateBlocks(Display * display, XvMCContext * context,
+ unsigned int num_blocks,
+ XvMCBlockArray * block)
+ {
+- Status ret;
+ if (!display || !context || !num_blocks || !block)
+ return BadValue;
+
+@@ -505,7 +497,6 @@ _X_EXPORT Status XvMCCreateBlocks(Display * display, XvMCContext * context,
+ */
+ _X_EXPORT Status XvMCDestroyBlocks(Display * display, XvMCBlockArray * block)
+ {
+- Status ret;
+ if (!display || !block)
+ return BadValue;
+
+@@ -678,13 +669,10 @@ _X_EXPORT Status XvMCPutSurface(Display * display, XvMCSurface * surface,
+ */
+ _X_EXPORT Status XvMCSyncSurface(Display * display, XvMCSurface * surface)
+ {
+- Status ret;
+- int stat = 0;
+-
+ if (!display || !surface)
+ return XvMCBadSurface;
+
+- return ret;
++ return Success;
+ }
+
+ /*
+@@ -739,9 +727,6 @@ _X_EXPORT Status XvMCGetSurfaceStatus(Display * display, XvMCSurface * surface,
+ */
+ _X_EXPORT Status XvMCHideSurface(Display * display, XvMCSurface * surface)
+ {
+- int stat = 0;
+- Status ret;
+-
+ if (!display || !surface)
+ return XvMCBadSurface;
+
+@@ -1071,7 +1056,7 @@ _X_EXPORT Status XvMCLoadQMatrix(Display * display, XvMCContext * context,
+ _X_EXPORT Status XvMCPutSlice(Display * display, XvMCContext * context,
+ char *slice, int nbytes)
+ {
+- if (xvmc_driver->put_slice(display, context, slice, nbytes)) {
++ if (xvmc_driver->put_slice(display, context, (unsigned char *) slice, nbytes)) {
+ XVMC_ERR("PutSlice fail\n");
+ return BadValue;
+ }
+@@ -1082,7 +1067,7 @@ _X_EXPORT Status XvMCPutSlice2(Display * display, XvMCContext * context,
+ char *slice, int nbytes, int slice_code)
+ {
+ if (xvmc_driver->put_slice2
+- (display, context, slice, nbytes, slice_code)) {
++ (display, context, (unsigned char *) slice, nbytes, slice_code)) {
+ XVMC_ERR("PutSlice2 fail\n");
+ return BadValue;
+ }
+diff --git a/src/xvmc/intel_xvmc_dump.c b/src/xvmc/intel_xvmc_dump.c
+index 974bcbb..d22d311 100644
+--- a/src/xvmc/intel_xvmc_dump.c
++++ b/src/xvmc/intel_xvmc_dump.c
+@@ -38,7 +38,7 @@ void intel_xvmc_dump_open(void)
+ if (xvmc_dump)
+ return;
+
+- if (d = getenv("INTEL_XVMC_DUMP"))
++ if ((d = getenv("INTEL_XVMC_DUMP")))
+ xvmc_dump = 1;
+
+ if (xvmc_dump) {
+diff --git a/src/xvmc/xvmc_vld.c b/src/xvmc/xvmc_vld.c
+index addc7c9..d72e105 100644
+--- a/src/xvmc/xvmc_vld.c
++++ b/src/xvmc/xvmc_vld.c
+@@ -785,7 +785,6 @@ static Status begin_surface(Display * display, XvMCContext * context,
+ XvMCSurface * future,
+ const XvMCMpegControl * control)
+ {
+- struct i965_xvmc_contex *i965_ctx;
+ struct intel_xvmc_surface *priv_target, *priv_past, *priv_future;
+ intel_xvmc_context_ptr intel_ctx = context->privData;
+ Status ret;
+diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
+index a5066c8..0650ac2 100644
+--- a/uxa/uxa-accel.c
++++ b/uxa/uxa-accel.c
+@@ -120,6 +120,10 @@ uxa_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int n,
+
+ solid = uxa_acquire_solid(screen, src->pSourcePict);
+ FreePicture(src, 0);
++ if (!solid) {
++ FreePicture(dst, 0);
++ goto solid;
++ }
+
+ src = solid;
+ src_pixmap = uxa_get_offscreen_pixmap(src->pDrawable,
+@@ -1110,6 +1114,10 @@ try_solid:
+
+ solid = uxa_acquire_solid(screen, src->pSourcePict);
+ FreePicture(src, 0);
++ if (!solid) {
++ FreePicture(dst, 0);
++ goto err;
++ }
+
+ src = solid;
+ src_pixmap = uxa_get_offscreen_pixmap(src->pDrawable,
+diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
+index 420e891..0f5ddda 100644
+--- a/uxa/uxa-glyphs.c
++++ b/uxa/uxa-glyphs.c
+@@ -111,6 +111,9 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen)
+ uxa_screen_t *uxa_screen = uxa_get_screen(pScreen);
+ int i;
+
++ if (!uxa_screen->glyph_cache_initialized)
++ return;
++
+ for (i = 0; i < UXA_NUM_GLYPH_CACHE_FORMATS; i++) {
+ uxa_glyph_cache_t *cache = &uxa_screen->glyphCaches[i];
+
+@@ -120,6 +123,7 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen)
+ if (cache->glyphs)
+ free(cache->glyphs);
+ }
++ uxa_screen->glyph_cache_initialized = FALSE;
+ }
+
+ void uxa_glyphs_fini(ScreenPtr pScreen)
+@@ -145,6 +149,10 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen)
+ };
+ int i;
+
++ if (uxa_screen->glyph_cache_initialized)
++ return TRUE;
++
++ uxa_screen->glyph_cache_initialized = TRUE;
+ memset(uxa_screen->glyphCaches, 0, sizeof(uxa_screen->glyphCaches));
+
+ for (i = 0; i < sizeof(formats)/sizeof(formats[0]); i++) {
+@@ -214,17 +222,7 @@ Bool uxa_glyphs_init(ScreenPtr pScreen)
+ if (uxa_get_screen(pScreen)->force_fallback)
+ return TRUE;
+
+- /* We are trying to initialise per screen resources prior to the
+- * complete initialisation of the screen. So ensure the components
+- * that we depend upon are initialsed prior to our use.
+- */
+- if (!CreateScratchPixmapsForScreen(pScreen->myNum))
+- return FALSE;
+-
+- if (!uxa_realize_glyph_caches(pScreen))
+- return FALSE;
+-
+- return TRUE;
++ return uxa_realize_glyph_caches(pScreen);
+ }
+
+ /* The most efficient thing to way to upload the glyph to the screen
+diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
+index 92536cc..ac206af 100644
+--- a/uxa/uxa-priv.h
++++ b/uxa/uxa-priv.h
+@@ -139,6 +139,7 @@ typedef struct {
+ unsigned offScreenCounter;
+
+ uxa_glyph_cache_t glyphCaches[UXA_NUM_GLYPH_CACHE_FORMATS];
++ Bool glyph_cache_initialized;
+
+ PicturePtr solid_clear, solid_black, solid_white;
+ uxa_solid_cache_t solid_cache[UXA_NUM_SOLID_CACHE];
+diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
+index cf8b8ea..0f06e82 100644
+--- a/uxa/uxa-render.c
++++ b/uxa/uxa-render.c
+@@ -1061,6 +1061,8 @@ try_solid:
+ int src_off_x, src_off_y;
+
+ solid = uxa_acquire_solid(screen, src->pSourcePict);
++ if (!solid)
++ goto err_src;
+ FreePicture(src, 0);
+
+ src = solid;
+@@ -1090,6 +1092,7 @@ try_solid:
+ /* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must
+ * manually append the damaged regions ourselves.
+ */
++ pixman_region_translate(&region, -dst_x, -dst_y);
+ DamageRegionAppend(dst->pDrawable, &region);
+
+ pixman_region_fini(&region);
diff --git a/testing/xf86-video-mach64/PKGBUILD b/testing/xf86-video-mach64/PKGBUILD
new file mode 100644
index 000000000..0fa53fc78
--- /dev/null
+++ b/testing/xf86-video-mach64/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 115331 2011-03-17 17:51:48Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-mach64
+pkgver=6.8.2
+pkgrel=6
+pkgdesc="X.org mach64 video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc' 'mach64-dri')
+makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'mesa')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ mach64-fix-pixmap.patch)
+sha1sums=('b7303689a6a971b956061fd81399dc81adb865af'
+ '9658d16b964c1c0a3f8aa68f6706bd643cef321e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i ${srcdir}/mach64-fix-pixmap.patch
+ ./configure --prefix=/usr --enable-dri
+ make
+ 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-mach64/mach64-fix-pixmap.patch b/testing/xf86-video-mach64/mach64-fix-pixmap.patch
new file mode 100644
index 000000000..6f1a64748
--- /dev/null
+++ b/testing/xf86-video-mach64/mach64-fix-pixmap.patch
@@ -0,0 +1,47 @@
+diff --git a/src/aticonsole.c b/src/aticonsole.c
+index 1be147e..6e742d9 100644
+--- a/src/aticonsole.c
++++ b/src/aticonsole.c
+@@ -28,6 +28,7 @@
+ #include "config.h"
+ #endif
+
++#include "xorgVersion.h"
+ #include "ati.h"
+ #include "aticonsole.h"
+ #include "atii2c.h"
+@@ -689,7 +690,9 @@ ATIEnterVT
+ ScreenPtr pScreen = pScreenInfo->pScreen;
+ ATIPtr pATI = ATIPTR(pScreenInfo);
+ PixmapPtr pScreenPixmap;
++#if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 99, 1, 0))
+ DevUnion PixmapPrivate;
++#endif
+ Bool Entered;
+
+ if (!ATIEnterGraphics(NULL, pScreenInfo, pATI))
+@@ -714,19 +717,24 @@ ATIEnterVT
+ }
+
+ pScreenPixmap = (*pScreen->GetScreenPixmap)(pScreen);
++
++#if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 99, 1, 0))
+ PixmapPrivate = pScreenPixmap->devPrivate;
+ if (!PixmapPrivate.ptr)
+ pScreenPixmap->devPrivate = pScreenInfo->pixmapPrivate;
++#endif
+
+ /* Tell framebuffer about remapped aperture */
+ Entered = (*pScreen->ModifyPixmapHeader)(pScreenPixmap,
+ -1, -1, -1, -1, -1, pATI->pMemory);
+
++#if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 99, 1, 0))
+ if (!PixmapPrivate.ptr)
+ {
+ pScreenInfo->pixmapPrivate = pScreenPixmap->devPrivate;
+ pScreenPixmap->devPrivate.ptr = NULL;
+ }
++#endif
+
+ #ifdef XF86DRI_DEVEL
+
diff --git a/testing/xf86-video-mga/PKGBUILD b/testing/xf86-video-mga/PKGBUILD
new file mode 100644
index 000000000..c9793ef73
--- /dev/null
+++ b/testing/xf86-video-mga/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 115334 2011-03-17 17:57:40Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-mga
+pkgver=1.4.13
+pkgrel=3
+pkgdesc="X.org mga video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc' 'mga-dri')
+makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'mesa')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('55aa185cf381def4b5905c8b93694b8dfbd5c378')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-dri
+ make
+ 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-neomagic/PKGBUILD b/testing/xf86-video-neomagic/PKGBUILD
new file mode 100644
index 000000000..0b6469a69
--- /dev/null
+++ b/testing/xf86-video-neomagic/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115337 2011-03-17 17:59:49Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-neomagic
+pkgver=1.2.5
+pkgrel=4
+pkgdesc="X.org neomagic video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'xf86dgaproto')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('02c994e2eae191b50a8cd556e5b52d82725073b3')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -d -m755 "${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..f5cb3da4a
--- /dev/null
+++ b/testing/xf86-video-nouveau/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 115274 2011-03-17 16:40:45Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: buddabrod <buddabrod@gmail.com>
+
+pkgname=xf86-video-nouveau
+_gitdate=20110316
+pkgver=0.0.16_git${_gitdate} # see configure.ac
+pkgrel=2
+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' 'udev')
+optdepends=('nouveau-dri: experimental gallium3d features')
+makedepends=('xorg-server-devel' 'libdrm>=2.4.24' 'xf86driproto')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool') # 'force')
+install=${pkgname}.install
+source=(ftp://ftp.archlinux.org/other/$pkgname/xf86-video-nouveau-${_gitdate}.tar.bz2)
+md5sums=('0ab7a1c9d3ec5dd020c09212a58ca801')
+
+# 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/xf86-video-nv/PKGBUILD b/testing/xf86-video-nv/PKGBUILD
new file mode 100644
index 000000000..0ec636081
--- /dev/null
+++ b/testing/xf86-video-nv/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 115341 2011-03-17 18:01:19Z andyrtr $
+# Maintainer:Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-nv
+pkgver=2.1.18
+pkgrel=3
+pkgdesc="X.org nv video driver"
+arch=(i686 x86_64)
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('d35b2fa5a26a507a9cc95b69243d9fd0c0f32aa2')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-openchrome/LICENSE.txt b/testing/xf86-video-openchrome/LICENSE.txt
new file mode 100644
index 000000000..dff1dc37b
--- /dev/null
+++ b/testing/xf86-video-openchrome/LICENSE.txt
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2005-2007 The Openchrome Project [openchrome.org]
+ * Copyright 2004-2006 Luc Verhaegen.
+ * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net]
+ * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+ * Copyright 2001-2003 S3 Graphics, Inc. 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, 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
+ * THE AUTHORS OR COPYRIGHT HOLDERS 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/xf86-video-openchrome/PKGBUILD b/testing/xf86-video-openchrome/PKGBUILD
new file mode 100644
index 000000000..c49885397
--- /dev/null
+++ b/testing/xf86-video-openchrome/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 115345 2011-03-17 18:03:35Z andyrtr $
+# Contributor: Paul Mattal <paul@mattal.com>
+# Maintainer: Juergen Hoetzel <juergen@hoetzel.info>
+
+pkgname=xf86-video-openchrome
+pkgver=0.2.904
+pkgrel=5
+pkgdesc="X.Org Openchrome drivers"
+arch=(i686 x86_64)
+license=('custom')
+url="http://www.openchrome.org"
+depends=('libdrm' 'libxvmc' 'unichrome-dri')
+makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'mesa' 'libxvmc')
+replaces=('openchrome' 'xf86-video-via')
+options=('!libtool' '!makeflags')
+conflicts=('xf86-video-via' 'xf86-video-unichrome' 'openchrome' 'xorg-server<1.10.0')
+source=(http://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ drm_stdint.patch
+ svn-r839.patch
+ LICENSE.txt)
+md5sums=('f2481d98ef54febf5bffbb88a2a2426d'
+ 'bc516400ffc3df5d0dfe604f6245dd32'
+ '5aed4aa44dd5a6d3e2da9baad73ac0ab'
+ 'addb3cf2671f4cf7e91156952de1627f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/svn-r839.patch"
+ patch -Np0 -i "${srcdir}/drm_stdint.patch"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
diff --git a/testing/xf86-video-openchrome/drm_stdint.patch b/testing/xf86-video-openchrome/drm_stdint.patch
new file mode 100644
index 000000000..226a015e2
--- /dev/null
+++ b/testing/xf86-video-openchrome/drm_stdint.patch
@@ -0,0 +1,10 @@
+--- src/via_xvmc.h.orig 2010-03-07 01:46:34.000000000 +0100
++++ src/via_xvmc.h 2010-03-07 01:46:45.000000000 +0100
+@@ -26,6 +26,7 @@
+ #ifndef _VIA_XVMC_H
+ #define _VIA_XVMC_H 1
+
++#include <stdint.h>
+ #include "via_drm.h"
+
+ /*
diff --git a/testing/xf86-video-openchrome/svn-r839.patch b/testing/xf86-video-openchrome/svn-r839.patch
new file mode 100644
index 000000000..8e5f05669
--- /dev/null
+++ b/testing/xf86-video-openchrome/svn-r839.patch
@@ -0,0 +1,1447 @@
+diff -ruN xf86-video-openchrome-0.2.904/ChangeLog ../openchrome/xf86-video-openchrome-0.2.904/ChangeLog
+--- xf86-video-openchrome-0.2.904/ChangeLog 2009-10-03 22:48:55.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/ChangeLog 2010-03-07 01:09:00.000000000 +0100
+@@ -1,3 +1,52 @@
++2010-02-10 Bartosz Kosiorek <gang65@poczta.onet.pl>
++
++ Fix bug with suspend and VT switch on VX800 and 64bit systems
++
++ * src/via_driver.h:
++ * src/via_video.c: (viaResetVideo), (viaSaveVideo),
++ (viaRestoreVideo), (viaExitVideo):
++ * src/via_video.h:
++
++2010-01-24 Bartosz Kosiorek <gang65@poczta.onet.pl>
++
++ Fix starting address restore and save (initial 64-bit support)
++
++ * src/via_crtc.c: (ViaFirstCRTCSetMode),
++ (ViaFirstCRTCSetStartingAddress):
++ * src/via_dri.c: (VIADRIAgpInit):
++ * src/via_driver.c: (VIASave), (VIARestore):
++ * src/via_driver.h:
++
++2009-12-04 Bartosz Kosiorek <gang65@poczta.onet.pl>
++
++ Enable new mode switch for VM800 chipsets
++
++ * src/via_driver.c: (VIASetupDefaultOptions):
++
++2009-11-21 Bartosz Kosiorek <gang65@poczta.onet.pl>
++
++ Add option to enable unaccelerated RandR rotation ("SWRandR").
++ The accelerated option "HWRandR" is currently not implemented.
++
++ * src/openchrome.man:
++ * src/via_driver.c: (VIAPreInit):
++
++2009-11-20 Bartosz Kosiorek <gang65@poczta.onet.pl>
++
++ Enabled new mode switch for PM800 chipset,
++ to resolve many bugs with resolution detecting and changing
++ (eg. switching to console)
++
++ * src/via_driver.c: (VIASetupDefaultOptions), (VIAPreInit):
++
++2009-11-07 Bartosz Kosiorek <gang65@poczta.onet.pl>
++
++ Add more comments to ViaSetSecondaryFIFO, add panel scale support for
++ CLE266 and KM400, fix bug with malloc.
++
++ * src/via_bandwidth.c: (ViaSetSecondaryFIFO):
++ * src/via_panel.c: (ViaPanelScale), (ViaPanelGetNativeDisplayMode):
++
+ 2009-09-26 Bartosz Kosiorek <gang65@poczta.onet.pl>
+
+ Save/restore ECK Clock Synthesizer
+diff -ruN xf86-video-openchrome-0.2.904/man/openchrome.man ../openchrome/xf86-video-openchrome-0.2.904/man/openchrome.man
+--- xf86-video-openchrome-0.2.904/man/openchrome.man 2009-10-09 01:12:41.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/man/openchrome.man 2010-03-07 01:09:00.000000000 +0100
+@@ -59,7 +59,7 @@
+ .BI "Option \*qAccelMethod\*q \*q" string \*q
+ The driver supports "XAA" and "EXA" acceleration methods. The default
+ method is XAA, since EXA is still experimental. Contrary to XAA, EXA
+-implements acceleration for screen uploads and downlads (if DRI is
++implements acceleration for screen uploads and downloads (if DRI is
+ enabled) and for the Render/Composite extension.
+ .TP
+ .BI "Option \*qActiveDevice\*q \*q" string \*q
+@@ -81,7 +81,7 @@
+ no room for DRI textures, they will be allocated from the DRI part of
+ VRAM (see the option "MaxDRIMem"). The default amount of AGP is
+ 32768 kB. Note that the AGP aperture set in the BIOS must be able
+-to accomodate the amount of AGP memory specified here. Otherwise no
++to accommodate the amount of AGP memory specified here. Otherwise no
+ AGP memory will be available. It is safe to set a very large AGP
+ aperture in the BIOS.
+ .TP
+@@ -159,9 +159,16 @@
+ system. The sizes 640x480, 800x600, 1024x768, 1280x1024, and 1400x1050
+ are supported.
+ .TP
++.BI "Option \*qRotationType\*q \*q" string \*q
++Enabled rotation by using RandR. The driver only support unaccelerated
++RandR rotations "SWRandR". Hardware rotations "HWRandR" is currently
++unimplemented.
++.TP
+ .BI "Option \*qRotate\*q \*q" string \*q
+ Rotates the display either clockwise ("CW"), counterclockwise ("CCW") and
+-upside-down ("UD"). Rotation is only supported unaccelerated.
++upside-down ("UD"). Rotation is only supported unaccelerated. Adding
++option "Rotate", enables RandR rotation feature. The RandR allows
++clients to dynamically change X screens.
+ .TP
+ .BI "Option \*qShadowFB\*q \*q" boolean \*q
+ Enables the use of a shadow frame buffer. This is required when
+diff -ruN xf86-video-openchrome-0.2.904/src/svnversion.h ../openchrome/xf86-video-openchrome-0.2.904/src/svnversion.h
+--- xf86-video-openchrome-0.2.904/src/svnversion.h 2009-10-09 01:19:04.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/svnversion.h 2010-03-07 01:09:15.000000000 +0100
+@@ -1 +1 @@
+-#define BUILDCOMMENT "(openchrome 0.2.904 release)"
++#define BUILDCOMMENT "(development build, at svn revision 839)"
+diff -ruN xf86-video-openchrome-0.2.904/src/via_accel.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_accel.c
+--- xf86-video-openchrome-0.2.904/src/via_accel.c 2009-10-03 22:48:55.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_accel.c 2010-03-07 01:09:00.000000000 +0100
+@@ -1210,7 +1210,8 @@
+
+ /* General acceleration flags. */
+ xaaptr->Flags = (PIXMAP_CACHE |
+- OFFSCREEN_PIXMAPS | LINEAR_FRAMEBUFFER |
++ OFFSCREEN_PIXMAPS |
++ LINEAR_FRAMEBUFFER |
+ MICROSOFT_ZERO_LINE_BIAS | 0);
+
+ if (pScrn->bitsPerPixel == 8)
+@@ -1228,14 +1229,17 @@
+
+ xaaptr->Sync = viaAccelSync;
+
++ /* ScreenToScreen copies */
+ xaaptr->SetupForScreenToScreenCopy = viaSetupForScreenToScreenCopy;
+ xaaptr->SubsequentScreenToScreenCopy = viaSubsequentScreenToScreenCopy;
+ xaaptr->ScreenToScreenCopyFlags = NO_PLANEMASK | ROP_NEEDS_SOURCE;
+
++ /* Solid filled rectangles */
+ xaaptr->SetupForSolidFill = viaSetupForSolidFill;
+ xaaptr->SubsequentSolidFillRect = viaSubsequentSolidFillRect;
+ xaaptr->SolidFillFlags = NO_PLANEMASK | ROP_NEEDS_SOURCE;
+
++ /* Mono 8x8 pattern fills */
+ xaaptr->SetupForMono8x8PatternFill = viaSetupForMono8x8PatternFill;
+ xaaptr->SubsequentMono8x8PatternFillRect =
+ viaSubsequentMono8x8PatternFillRect;
+@@ -1244,6 +1248,7 @@
+ HARDWARE_PATTERN_PROGRAMMED_ORIGIN |
+ BIT_ORDER_IN_BYTE_MSBFIRST | 0);
+
++ /* Color 8x8 pattern fills */
+ xaaptr->SetupForColor8x8PatternFill = viaSetupForColor8x8PatternFill;
+ xaaptr->SubsequentColor8x8PatternFillRect =
+ viaSubsequentColor8x8PatternFillRect;
+@@ -1252,12 +1257,14 @@
+ HARDWARE_PATTERN_PROGRAMMED_BITS |
+ HARDWARE_PATTERN_PROGRAMMED_ORIGIN | 0);
+
++ /* Solid lines */
+ xaaptr->SetupForSolidLine = viaSetupForSolidLine;
+ xaaptr->SubsequentSolidTwoPointLine = viaSubsequentSolidTwoPointLine;
+ xaaptr->SubsequentSolidHorVertLine = viaSubsequentSolidHorVertLine;
+ xaaptr->SolidBresenhamLineErrorTermBits = 14;
+ xaaptr->SolidLineFlags = NO_PLANEMASK | ROP_NEEDS_SOURCE;
+
++ /* Dashed line */
+ xaaptr->SetupForDashedLine = viaSetupForDashedLine;
+ xaaptr->SubsequentDashedTwoPointLine = viaSubsequentDashedTwoPointLine;
+ xaaptr->DashPatternMaxLength = 8;
+@@ -1266,35 +1273,42 @@
+ LINE_PATTERN_POWER_OF_2_ONLY |
+ LINE_PATTERN_MSBFIRST_LSBJUSTIFIED | 0);
+
++ /* CPU to Screen color expansion */
+ xaaptr->ScanlineCPUToScreenColorExpandFillFlags = NO_PLANEMASK |
+- CPU_TRANSFER_PAD_DWORD |
+- SCANLINE_PAD_DWORD |
+- BIT_ORDER_IN_BYTE_MSBFIRST |
+- LEFT_EDGE_CLIPPING | ROP_NEEDS_SOURCE | 0;
++ CPU_TRANSFER_PAD_DWORD |
++ SCANLINE_PAD_DWORD |
++ BIT_ORDER_IN_BYTE_MSBFIRST |
++ LEFT_EDGE_CLIPPING |
++ ROP_NEEDS_SOURCE | 0;
+
+ xaaptr->SetupForScanlineCPUToScreenColorExpandFill =
+ viaSetupForCPUToScreenColorExpandFill;
+ xaaptr->SubsequentScanlineCPUToScreenColorExpandFill =
+ viaSubsequentScanlineCPUToScreenColorExpandFill;
+ xaaptr->ColorExpandBase = pVia->BltBase;
+- xaaptr->ColorExpandRange = VIA_MMIO_BLTSIZE;
++ if (pVia->Chipset == VIA_VX800 || pVia->Chipset == VIA_VX855)
++ xaaptr->ColorExpandRange = VIA_MMIO_BLTSIZE;
++ else
++ xaaptr->ColorExpandRange = (64 * 1024);
+
++ /* ImageWrite */
+ xaaptr->ImageWriteFlags = (NO_PLANEMASK |
+ CPU_TRANSFER_PAD_DWORD |
+ SCANLINE_PAD_DWORD |
+ BIT_ORDER_IN_BYTE_MSBFIRST |
+- LEFT_EDGE_CLIPPING | ROP_NEEDS_SOURCE | 0);
++ LEFT_EDGE_CLIPPING |
++ ROP_NEEDS_SOURCE | 0);
+ // SYNC_AFTER_IMAGE_WRITE | 0);
+
+ /*
+ * Most Unichromes are much faster using processor-to-framebuffer writes
+ * than when using the 2D engine for this.
+- * test with x11perf -shmput500!
++ * test with "x11perf -shmput500"
++ * Example: K8M890 chipset; with GPU=86.3/sec; without GPU=132.0/sec
++ * TODO Check speed for other chipsets
+ */
+
+ switch (pVia->Chipset) {
+- case VIA_K8M800:
+- case VIA_K8M890:
+ case VIA_P4M900:
+ case VIA_VX800:
+ case VIA_VX855:
+diff -ruN xf86-video-openchrome-0.2.904/src/via_bandwidth.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_bandwidth.c
+--- xf86-video-openchrome-0.2.904/src/via_bandwidth.c 2009-10-03 22:48:55.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_bandwidth.c 2010-03-07 01:09:00.000000000 +0100
+@@ -194,6 +194,7 @@
+ else
+ ViaSeqMask(hwp, 0x22, 0x00, 0x1F); /* 128/4 = overflow = 0 */
+ break;
++ /* PM800/PM880/CN400 */
+ case VIA_PM800:
+ hwp->writeSeq(hwp, 0x17, 0x5F); /* 95 */
+ ViaSeqMask(hwp, 0x16, 0x20, 0xBF); /* 32 */
+@@ -204,9 +205,10 @@
+ else
+ ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 31 */
+ break;
++ /* P4M800Pro/VN800/CN700 */
+ case VIA_VM800:
+ hwp->writeSeq(hwp, 0x17, 0x2F);
+- ViaSeqMask(hwp, 0x16, 0x14, 0xBF);
++ ViaSeqMask(hwp, 0x16, 0x14, 0xBF); /* 80/4 = 20 = 0x14 */
+ ViaSeqMask(hwp, 0x18, 0x08, 0xBF);
+
+ if ((mode->HDisplay >= 1400) && (pScrn->bitsPerPixel == 32))
+@@ -215,40 +217,51 @@
+ ViaSeqMask(hwp, 0x22, 0x00, 0x1F);
+ break;
+ case VIA_K8M890:
+- hwp->writeSeq(hwp, 0x16, 0x92);
+- hwp->writeSeq(hwp, 0x17, 0xB3);
+- hwp->writeSeq(hwp, 0x18, 0x8A);
++ /* depth location: {SR17,0,7} */
++ hwp->writeSeq(hwp, 0x17, 0xB3); /* 360/2-1 = 179 = 0xB3 */
++ /* Formula (x & 0x3F) | ((x & 0x40) << 1) */
++ /* threshold location: {SR16,0,5},{SR16,7,7} */
++ ViaSeqMask(hwp, 0x16, 0x92, 0xBF); /* 328/4 = 82 = 0x52 */
++ /* high threshold location: {SR18,0,5},{SR18,7,7} */
++ ViaSeqMask(hwp, 0x18, 0x8A, 0xBF); /* 296/4 = 74 = 0x4A */
++ /* display queue expire num location: {SR22,0,4}. */
++ ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 124/4 = 31 = 0x1F */
+ break;
+ case VIA_P4M900:
+- ViaSeqMask(hwp, 0x17, 0x2F, 0xFF);
+- ViaSeqMask(hwp, 0x16, 0x13, 0x3F);
+- ViaSeqMask(hwp, 0x16, 0x00, 0x80);
+- ViaSeqMask(hwp, 0x18, 0x13, 0x3F);
+- ViaSeqMask(hwp, 0x18, 0x00, 0x80);
++ /* location: {SR17,0,7} */
++ hwp->writeSeq(hwp, 0x17, 0x2F); /* 96/2-1 = 47 = 0x2F */
++ /* location: {SR16,0,5},{SR16,7,7} */
++ ViaSeqMask(hwp, 0x16, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */
++ /* location: {SR18,0,5},{SR18,7,7} */
++ ViaSeqMask(hwp, 0x18, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */
++ /* location: {SR22,0,4}. */
++ ViaSeqMask(hwp, 0x22, 0x08, 0x1F); /* 32/4 = 8 = 0x08 */
+ break;
+ case VIA_P4M890:
+- hwp->writeSeq(hwp, 0x16, 0x13);
+- hwp->writeSeq(hwp, 0x17, 0x2F);
+- hwp->writeSeq(hwp, 0x18, 0x53);
+- hwp->writeSeq(hwp, 0x22, 0x10);
++ hwp->writeSeq(hwp, 0x17, 0x2F); /* 96/2-1 = 47 = 0x2F */
++ ViaSeqMask(hwp, 0x16, 0x13, 0xBF); /* 76/4 = 19 = 0x13 */
++ ViaSeqMask(hwp, 0x18, 0x10, 0xBF); /* 64/4 = 16 = 0x10 */
++ ViaSeqMask(hwp, 0x22, 0x08, 0x1F); /* 32/4 = 8 = 0x08 */
+ break;
+ case VIA_CX700:
+- hwp->writeSeq(hwp, 0x16, 0x26);
+ hwp->writeSeq(hwp, 0x17, 0x5F);
+- hwp->writeSeq(hwp, 0x18, 0x66);
+- hwp->writeSeq(hwp, 0x22, 0x1F);
++ ViaSeqMask(hwp, 0x16, 0x20, 0xBF); /* 128/4 = 32 = 0x20 */
++ ViaSeqMask(hwp, 0x18, 0x20, 0xBF); /* 128/4 = 32 = 0x20 */
++ ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 124/4 = 31 = 0x1F */
+ break;
+ case VIA_VX800:
+- hwp->writeSeq(hwp, 0x16, 0x26); /* 152/4 = 38 */
+- hwp->writeSeq(hwp, 0x17, 0x5F); /* 192/2-1 = 95 */
++ hwp->writeSeq(hwp, 0x17, 0x5F); /* 192/2-1 = 95 = 0x5F */
++ hwp->writeSeq(hwp, 0x16, 0x26); /* 152/4 = 38 = 0x26 */
+ hwp->writeSeq(hwp, 0x18, 0x26); /* 152/4 = 38 */
+ hwp->writeSeq(hwp, 0x22, 0x10); /* 64/4 = 16 */
+ break;
+ case VIA_VX855:
+- hwp->writeSeq(hwp, 0x16, 0x50); /* 320/4 = 80 */
+- hwp->writeSeq(hwp, 0x17, 0xC7); /* 400/2-1 = 199 */
+- hwp->writeSeq(hwp, 0x18, 0x50); /* 320/4 = 80 */
+- hwp->writeSeq(hwp, 0x22, 0x28); /* 160/4 = 40 */
++ hwp->writeSeq(hwp, 0x17, 0xC7); /* 400/2-1 = 199 = 0xC7 */
++ /* TODO Formula for SR16 is: (0x50 & 0x3F) | ((0x50 & 0x40) << 1) = 0x90 */
++ hwp->writeSeq(hwp, 0x16, 0x50); /* 320/4 = 80 = 0x50 */
++ hwp->writeSeq(hwp, 0x18, 0x50); /* 320/4 = 80 = 0x50 */
++ hwp->writeSeq(hwp, 0x22, 0x28); /* 160/4 = 40 = 0x28 */
++ break;
+ default:
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ViaSetPrimaryFIFO: "
+ "Chipset %d not implemented\n", pVia->Chipset);
+@@ -371,7 +384,38 @@
+ ViaCrtcMask(hwp, 0x94, 0x20, 0x7F);
+ break;
+ case VIA_P4M890:
++ /* depth location: {CR68,4,7},{CR94,7,7},{CR95,7,7} */
++ ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0); /* 96/8-1 = 11 = 0x0B */
++ ViaCrtcMask(hwp, 0x94, 0x00, 0x80);
++ ViaCrtcMask(hwp, 0x95, 0x00, 0x80);
++
++ /* location: {CR68,0,3},{CR95,4,6} */
++ ViaCrtcMask(hwp, 0x68, 0x03, 0x0F); /* 76/4 = 19 = 0x13 */
++ ViaCrtcMask(hwp, 0x95, 0x10, 0x70);
++
++ /* location: {CR92,0,3},{CR95,0,2} */
++ ViaCrtcMask(hwp, 0x92, 0x00, 0x0F); /* 64/4 = 16 = 0x10 */
++ ViaCrtcMask(hwp, 0x95, 0x01, 0x07);
++
++ /* location: {CR94,0,6} */
++ ViaCrtcMask(hwp, 0x94, 0x08, 0x7F); /* 32/4 = 8 = 0x08 */
++ break;
+ case VIA_K8M890:
++ /* Display Queue Depth, location: {CR68,4,7},{CR94,7,7},{CR95,7,7} */
++ ViaCrtcMask(hwp, 0x68, 0xC0, 0xF0); /* 360/8-1 = 44 = 0x2C; 0x2C << 4 = 0xC0 */
++ ViaCrtcMask(hwp, 0x94, 0x00, 0x80); /* 0x2C << 3 = 0x00 */
++ ViaCrtcMask(hwp, 0x95, 0x80, 0x80); /* 0x2C << 2 = 0x80 */
++
++ /* Display Queue Read Threshold 1, location: {CR68,0,3},{CR95,4,6} */
++ ViaCrtcMask(hwp, 0x68, 0x02, 0x0F); /* 328/4 = 82 = 0x52 */
++ ViaCrtcMask(hwp, 0x95, 0x50, 0x70);
++
++ /* location: {CR92,0,3},{CR95,0,2} */
++ ViaCrtcMask(hwp, 0x92, 0x0A, 0x0F); /* 296/4 = 74 = 0x4A */
++ ViaCrtcMask(hwp, 0x95, 0x04, 0x07); /* 0x4A >> 4 = 0x04 */
++
++ /* Display Expire Number Bits, location: {CR94,0,6} */
++ ViaCrtcMask(hwp, 0x94, 0x1F, 0x7F); /* 124/4 = 31 = 0x1F */
+ break;
+ case VIA_P4M900:
+ ViaCrtcMask(hwp, 0x68, 0xB0, 0xF0);
+diff -ruN xf86-video-openchrome-0.2.904/src/via_crtc.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_crtc.c
+--- xf86-video-openchrome-0.2.904/src/via_crtc.c 2009-10-03 22:48:55.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_crtc.c 2010-03-07 01:09:00.000000000 +0100
+@@ -234,8 +234,8 @@
+ /* Primary starting address -> 0x00, adjustframe does the rest */
+ hwp->writeCrtc(hwp, 0x0C, 0x00);
+ hwp->writeCrtc(hwp, 0x0D, 0x00);
+- hwp->writeCrtc(hwp, 0x34, 0x00);
+ ViaCrtcMask(hwp, 0x48, 0x00, 0x03); /* is this even possible on CLE266A ? */
++ hwp->writeCrtc(hwp, 0x34, 0x00);
+
+ /* vertical sync start : 2047 */
+ temp = mode->CrtcVSyncStart;
+@@ -331,15 +331,20 @@
+ CARD32 Base;
+ CARD32 tmp;
+
++ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaFirstCRTCSetStartingAddress\n"));
++
+ Base = (y * pScrn->displayWidth + x) * (pScrn->bitsPerPixel / 8);
+ Base = Base >> 1;
+
+ hwp->writeCrtc(hwp, 0x0C, (Base & 0xFF00) >> 8);
+ hwp->writeCrtc(hwp, 0x0D, Base & 0xFF);
+- hwp->writeCrtc(hwp, 0x34, (Base & 0xFF0000) >> 16);
+-
++ /* FIXME The proper starting address for CR48 is 0x1F - Bits[28:24] */
+ if (!(pVia->Chipset == VIA_CLE266 && CLE266_REV_IS_AX(pVia->ChipRev)))
+ ViaCrtcMask(hwp, 0x48, Base >> 24, 0x0F);
++ /* CR34 are fire bits. Must be writed after CR0C CR0D CR48. */
++ hwp->writeCrtc(hwp, 0x34, (Base & 0xFF0000) >> 16);
++
++
+ }
+
+ void
+diff -ruN xf86-video-openchrome-0.2.904/src/via_cursor.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_cursor.c
+--- xf86-video-openchrome-0.2.904/src/via_cursor.c 2009-10-03 22:48:55.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_cursor.c 2010-03-07 01:09:00.000000000 +0100
+@@ -145,9 +145,12 @@
+ infoPtr->ShowCursor = viaShowCursor;
+ infoPtr->UseHWCursor = viaUseHWCursor;
+
++ /* ARGB Cursor init */
+ infoPtr->UseHWCursorARGB = viaUseHWCursorARGB;
+- if (pVia->CursorARGBSupported)
++ if (pVia->CursorARGBSupported) {
++ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HWCursor ARGB enabled\n"));
+ infoPtr->LoadCursorARGB = viaLoadCursorARGB;
++ }
+
+ /* Set cursor location in frame buffer. */
+ VIASETREG(VIA_REG_CURSOR_MODE, pVia->cursorOffset);
+@@ -284,7 +287,7 @@
+ }
+
+ /*
+- * ARGB Cursor
++ * display the current cursor
+ */
+
+ void
+@@ -319,13 +322,19 @@
+ */
+
+ /* Duoview */
+- if (pVia->CursorPipe)
++ if (pVia->CursorPipe) {
++ /* Mono Cursor Display Path [bit31]: Secondary */
++ /* FIXME For CLE266 nad KM400 try to enable 32x32 cursor size [bit1] */
+ VIASETREG(VIA_REG_ALPHA_CONTROL, 0xF6000005);
+- else
++ } else {
++ /* Mono Cursor Display Path [bit31]: Primary */
+ VIASETREG(VIA_REG_ALPHA_CONTROL, 0x76000005);
++ }
+ }
+ }
+
++
++/* hide the current cursor */
+ void
+ viaHideCursor(ScrnInfoPtr pScrn)
+ {
+@@ -350,10 +359,16 @@
+
+ default:
+ temp = VIAGETREG(VIA_REG_ALPHA_CONTROL);
++ /* Hardware cursor disable [bit0] */
+ VIASETREG(VIA_REG_ALPHA_CONTROL, temp & 0xFFFFFFFA);
+ }
+ }
+
++/*
++ Set the cursor position to (x,y). X and/or y may be negative
++ indicating that the cursor image is partially offscreen on
++ the left and/or top edges of the screen.
++*/
+ static void
+ viaSetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
+ {
+@@ -409,6 +424,15 @@
+ && pCurs->bits->height <= pVia->CursorMaxHeight);
+ }
+
++/*
++ If the driver is unable to use a hardware cursor for reasons
++ other than the cursor being larger than the maximum specified
++ in the MaxWidth or MaxHeight field below, it can supply the
++ UseHWCursor function. If UseHWCursor is provided by the driver,
++ it will be called whenever the cursor shape changes or the video
++ mode changes. This is useful for when the hardware cursor cannot
++ be used in interlaced or doublescan modes.
++*/
+ static Bool
+ viaUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs)
+ {
+@@ -423,8 +447,11 @@
+ && pCurs->bits->height <= pVia->CursorMaxHeight);
+ }
+
++/*
++ Load Mono Cursor Image
++*/
+ static void
+-viaLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *s)
++viaLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
+ {
+ VIAPtr pVia = VIAPTR(pScrn);
+ CARD32 temp;
+@@ -439,7 +466,7 @@
+ if (pVia->CursorARGBSupported) {
+ #define ARGB_PER_CHUNK (8 * sizeof (chunk) / 2)
+ for (i = 0; i < (pVia->CursorMaxWidth * pVia->CursorMaxHeight / ARGB_PER_CHUNK); i++) {
+- chunk = *s++;
++ chunk = *src++;
+ for (j = 0; j < ARGB_PER_CHUNK; j++, chunk >>= 2)
+ *dst++ = mono_cursor_color[chunk & 3];
+ }
+@@ -447,7 +474,7 @@
+ pVia->CursorFG = mono_cursor_color[3];
+ pVia->CursorBG = mono_cursor_color[2];
+ } else {
+- memcpy(dst, (CARD8*)s, pVia->CursorSize);
++ memcpy(dst, (CARD8*)src, pVia->CursorSize);
+ }
+ switch(pVia->Chipset) {
+ case VIA_CX700:
+@@ -471,11 +498,17 @@
+ }
+ }
+
++/*
++ Set the cursor foreground and background colors. In 8bpp, fg and
++ bg are indicies into the current colormap unless the
++ HARDWARE_CURSOR_TRUECOLOR_AT_8BPP flag is set. In that case
++ and in all other bpps the fg and bg are in 8-8-8 RGB format.
++*/
++
+ static void
+ viaSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
+ {
+ VIAPtr pVia = VIAPTR(pScrn);
+- CARD32 control = pVia->CursorRegControl;
+ CARD32 pixel;
+ CARD32 temp;
+ CARD32 *dst;
+@@ -487,12 +520,10 @@
+ fg |= 0xff000000;
+ bg |= 0xff000000;
+
++ /* Don't recolour the image if we don't have to. */
+ if (fg == pVia->CursorFG && bg == pVia->CursorBG)
+ return;
+
+- temp = VIAGETREG(control);
+- VIASETREG(control, temp & 0xFFFFFFFE);
+-
+ dst = (CARD32*)pVia->cursorMap;
+ for (i = 0; i < pVia->CursorMaxWidth * pVia->CursorMaxHeight; i++, dst++)
+ if ((pixel = *dst))
+@@ -517,7 +548,8 @@
+ }
+ break;
+ default:
+- VIASETREG(control, temp);
++ temp = VIAGETREG(VIA_REG_ALPHA_CONTROL);
++ VIASETREG(VIA_REG_ALPHA_CONTROL, temp & 0xFFFFFFFE);
+ }
+ }
+
+diff -ruN xf86-video-openchrome-0.2.904/src/via_dri.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_dri.c
+--- xf86-video-openchrome-0.2.904/src/via_dri.c 2009-10-03 22:48:55.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_dri.c 2010-03-07 01:09:00.000000000 +0100
+@@ -267,6 +267,11 @@
+ pVIADRI = pDRIInfo->devPrivate;
+ pVia->agpSize = 0;
+
++/* For AMD64 */
++#ifdef __x86_64__
++ return FALSE;
++#endif
++
+ if (drmAgpAcquire(pVia->drmFD) < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAgpAcquire failed %d\n",
+ errno);
+diff -ruN xf86-video-openchrome-0.2.904/src/via_driver.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_driver.c
+--- xf86-video-openchrome-0.2.904/src/via_driver.c 2009-10-09 00:46:15.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_driver.c 2010-03-07 01:09:00.000000000 +0100
+@@ -178,8 +178,8 @@
+ {VIA_P4M900, "P4M900/VN896/CN896"},
+ {VIA_CX700, "CX700/VX700"},
+ {VIA_P4M890, "P4M890"},
+- {VIA_VX800, "VX800"},
+- {VIA_VX855, "VX855"},
++ {VIA_VX800, "VX800/VX820"},
++ {VIA_VX855, "VX855/VX875"},
+ {-1, NULL }
+ };
+
+@@ -215,6 +215,7 @@
+ OPTION_EXA_SCRATCH_SIZE,
+ OPTION_SWCURSOR,
+ OPTION_SHADOW_FB,
++ OPTION_ROTATION_TYPE,
+ OPTION_ROTATE,
+ OPTION_VIDEORAM,
+ OPTION_ACTIVEDEVICE,
+@@ -253,6 +254,7 @@
+ {OPTION_EXA_SCRATCH_SIZE, "ExaScratchSize", OPTV_INTEGER, {0}, FALSE},
+ {OPTION_SWCURSOR, "SWCursor", OPTV_BOOLEAN, {0}, FALSE},
+ {OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN, {0}, FALSE},
++ {OPTION_ROTATION_TYPE, "RotationType", OPTV_ANYSTR, {0}, FALSE},
+ {OPTION_ROTATE, "Rotate", OPTV_ANYSTR, {0}, FALSE},
+ {OPTION_VIDEORAM, "VideoRAM", OPTV_INTEGER, {0}, FALSE},
+ {OPTION_ACTIVEDEVICE, "ActiveDevice", OPTV_ANYSTR, {0}, FALSE},
+@@ -307,6 +309,7 @@
+ {
+ static Bool setupDone = FALSE;
+
++ /* Only be loaded once */
+ if (!setupDone) {
+ setupDone = TRUE;
+ xf86AddDriver(&VIA, module,
+@@ -339,6 +342,7 @@
+ if (pScrn->driverPrivate)
+ return TRUE;
+
++ /* allocate VIARec */
+ pScrn->driverPrivate = xnfcalloc(sizeof(VIARec), 1);
+ VIAPtr pVia = ((VIARec *) (pScrn->driverPrivate));
+
+@@ -455,7 +459,6 @@
+ {
+ ScrnInfoPtr scrn = NULL;
+ EntityInfoPtr entity;
+- DevUnion *private;
+
+ scrn = xf86ConfigPciEntity(scrn, 0, entity_num, VIAPciChipsets,
+ NULL, NULL, NULL, NULL, NULL);
+@@ -652,6 +655,12 @@
+ vbeInfoPtr pVbe;
+
+ if (xf86LoadSubModule(pScrn, "vbe")) {
++ /* FIXME This line should be replaced to:
++
++ pVbe = VBEExtendedInit(NULL, index, 0);
++
++ for XF86 version > 4.2.99
++ */
+ pVbe = VBEInit(NULL, index);
+ ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
+ vbeFree(pVbe);
+@@ -664,7 +673,7 @@
+ VIAPtr pVia = VIAPTR(pScrn);
+ VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
+
+- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIASetupDefaultOptions\n"));
++ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIASetupDefaultOptions - Setting up default chipset options.\n"));
+
+ pVia->shadowFB = FALSE;
+ pVia->NoAccel = FALSE;
+@@ -688,6 +697,9 @@
+ #ifdef HAVE_DEBUG
+ pVia->PrintVGARegs = FALSE;
+ #endif
++
++ /* Disable vertical interpolation because the size of */
++ /* line buffer (limited to 800) is too small to do interpolation. */
+ pVia->swov.maxWInterp = 800;
+ pVia->swov.maxHInterp = 600;
+ pVia->useLegacyVBE = TRUE;
+@@ -713,11 +725,14 @@
+ pVia->UseLegacyModeSwitch = TRUE;
+ break;
+ case VIA_PM800:
++ /* Use new mode switch to resolve many resolution and display bugs (switch to console) */
++ /* FIXME The video playing (XV) is not working correctly after turn on new mode switch */
+ pVia->VideoEngine = VIDEO_ENGINE_CME;
+- pVia->UseLegacyModeSwitch = TRUE;
+ break;
+ case VIA_VM800:
+- pVia->UseLegacyModeSwitch = TRUE;
++ /* New mode switch resolve bug with gamma set #282 */
++ /* and with Xv after hibernate #240 */
++ /* FIXME Add panel support for this chipset */
+ break;
+ case VIA_K8M890:
+ pVia->VideoEngine = VIDEO_ENGINE_CME;
+@@ -1050,19 +1065,13 @@
+ xf86DrvMsg(pScrn->scrnIndex, from,
+ "Probed amount of VideoRAM = %d kB\n", pScrn->videoRam);
+
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+- "Setting up default chipset options.\n");
+ if (!VIASetupDefaultOptions(pScrn)) {
+ VIAFreeRec(pScrn);
+ return FALSE;
+ }
+
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reading config file...\n");
+ xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, VIAOptions);
+
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+- "Starting to parse config file options...\n");
+-
+ if (xf86GetOptValInteger(VIAOptions, OPTION_VIDEORAM, &pScrn->videoRam))
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+ "Setting amount of VideoRAM to %d kB\n", pScrn->videoRam);
+@@ -1100,6 +1109,31 @@
+ }
+
+ /* When rotating, switch shadow framebuffer on and acceleration off. */
++ if ((s = xf86GetOptValString(VIAOptions, OPTION_ROTATION_TYPE))) {
++ if (!xf86NameCmp(s, "SWRandR")) {
++ pVia->shadowFB = TRUE;
++ pVia->NoAccel = TRUE;
++ pVia->RandRRotation = TRUE;
++ pVia->rotate = RR_Rotate_0;
++ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Rotating screen "
++ "RandR enabled, acceleration disabled\n");
++ } else if (!xf86NameCmp(s, "HWRandR")) {
++ pVia->shadowFB = TRUE;
++ pVia->NoAccel = TRUE;
++ pVia->RandRRotation = TRUE;
++ pVia->rotate = RR_Rotate_0;
++ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Hardware accelerated "
++ "rotating screen is not implemented. Using SW RandR.\n");
++ } else {
++ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "\"%s\" is not a valid"
++ "value for Option \"RotationType\".\n", s);
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++ "Valid options are \"SWRandR\" and \"HWRandR\".\n");
++ }
++ }
++
++
++ /* When rotating, switch shadow framebuffer on and acceleration off. */
+ if ((s = xf86GetOptValString(VIAOptions, OPTION_ROTATE))) {
+ if (!xf86NameCmp(s, "CW")) {
+ pVia->shadowFB = TRUE;
+@@ -1498,6 +1532,7 @@
+ }
+ }
+
++ /* Initialize the colormap */
+ Gamma zeros = { 0.0, 0.0, 0.0 };
+ if (!xf86SetGamma(pScrn, zeros)) {
+ VIAFreeRec(pScrn);
+@@ -1561,9 +1596,8 @@
+
+ if (pBIOSInfo->Panel->IsActive &&
+ ((pVia->Chipset == VIA_K8M800) ||
+- (pVia->Chipset == VIA_PM800) ||
+ (pVia->Chipset == VIA_VM800))) {
+- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Panel on K8M800, PM800 and "
++ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Panel on K8M800 and "
+ "VM800 is currently not supported.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Using VBE to set modes to work around this.\n");
+@@ -1621,7 +1655,7 @@
+ *
+ * CLE266A: primary AdjustFrame can use only 24 bits, so we are limited
+ * to 12x11 bits; 4080x2048 (~2:1), 3344x2508 (4:3), or 2896x2896 (1:1).
+- * Test CLE266Cx, KM400, KM400A, K8M800, PM800, CN400 please.
++ * TODO Test CLE266Cx, KM400, KM400A, K8M800, CN400 please.
+ *
+ * We should be able to limit the memory available for a mode to 32 MB,
+ * but xf86ValidateModes (or miScanLineWidth) fails to catch this
+@@ -1629,13 +1663,14 @@
+ */
+
+ /* Select valid modes from those available. */
+- i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, /* availModes */
+- pScrn->display->modes, /* modeNames */
+- clockRanges, /* list of clock ranges */
++ i = xf86ValidateModes(pScrn,
++ pScrn->monitor->Modes, /* List of modes available for the monitor */
++ pScrn->display->modes, /* List of mode names that the screen is requesting */
++ clockRanges, /* list of clock ranges */
+ NULL, /* list of line pitches */
+ 256, /* minimum line pitch */
+ 3344, /* maximum line pitch */
+- 32 * 8, /* pitch inc (bits) */
++ 16 * 8, /* pitch increment (in bits), we just want 16 bytes alignment */
+ 128, /* min height */
+ 2508, /* max height */
+ pScrn->display->virtualX, /* virtual width */
+@@ -1650,6 +1685,7 @@
+ return FALSE;
+ }
+
++ /* This function deletes modes in the modes field of the ScrnInfoRec that have been marked as invalid. */
+ xf86PruneDriverModes(pScrn);
+
+ if (i == 0 || pScrn->modes == NULL) {
+@@ -1662,9 +1698,17 @@
+ /* Set up screen parameters. */
+ pVia->Bpp = pScrn->bitsPerPixel >> 3;
+ pVia->Bpl = pScrn->displayWidth * pVia->Bpp;
++
++ /* This function fills in the Crtc fields for all the modes in the modes field of the ScrnInfoRec. */
+ xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V);
++
++ /* Set the current mode to the first in the list */
+ pScrn->currentMode = pScrn->modes;
++
++ /* Print the list of modes being used */
+ xf86PrintModes(pScrn);
++
++ /* Set display resolution */
+ xf86SetDpi(pScrn, 0, 0);
+
+ #ifdef USE_FB
+@@ -1935,7 +1979,9 @@
+ Regs->SR17 = hwp->readSeq(hwp, 0x17);
+ Regs->SR18 = hwp->readSeq(hwp, 0x18);
+ Regs->SR19 = hwp->readSeq(hwp, 0x19);
++ /* PCI Bus Control */
+ Regs->SR1A = hwp->readSeq(hwp, 0x1A);
++
+ Regs->SR1B = hwp->readSeq(hwp, 0x1B);
+ Regs->SR1C = hwp->readSeq(hwp, 0x1C);
+ Regs->SR1D = hwp->readSeq(hwp, 0x1D);
+@@ -1977,40 +2023,56 @@
+ Regs->SR4C = hwp->readSeq(hwp, 0x4C);
+ break;
+ }
+- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+- "Non-Primary Adapter! saving VGA_SR_MODE only !!\n"));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Crtc...\n"));
+
+ Regs->CR13 = hwp->readCrtc(hwp, 0x13);
+
+ Regs->CR32 = hwp->readCrtc(hwp, 0x32);
+ Regs->CR33 = hwp->readCrtc(hwp, 0x33);
+- Regs->CR34 = hwp->readCrtc(hwp, 0x34);
++
+ Regs->CR35 = hwp->readCrtc(hwp, 0x35);
+ Regs->CR36 = hwp->readCrtc(hwp, 0x36);
+
++
++
++ /* Starting Address */
++ /* Start Address High */
++ Regs->CR0C = hwp->readCrtc(hwp, 0x0C);
++ /* Start Address Low */
++ Regs->CR0D = hwp->readCrtc(hwp, 0x0D);
++ /* Starting Address Overflow Bits[28:24] */
+ Regs->CR48 = hwp->readCrtc(hwp, 0x48);
++ /* CR34 are fire bits. Must be writed after CR0C CR0D CR48. */
++ /* Starting Address Overflow Bits[23:16] */
++ Regs->CR34 = hwp->readCrtc(hwp, 0x34);
++
++
+ Regs->CR49 = hwp->readCrtc(hwp, 0x49);
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "TVSave...\n"));
+ if (pBIOSInfo->TVI2CDev)
+ ViaTVSave(pScrn);
+
+- /* Save LCD control registers. */
++ /* Save LCD control registers (from CR 0x50 to 0x93). */
+ for (i = 0; i < 68; i++)
+ Regs->CRTCRegs[i] = hwp->readCrtc(hwp, i + 0x50);
+
+ if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) {
+-
+- Regs->CRA0 = hwp->readCrtc(hwp, 0xA0);
+- Regs->CRA1 = hwp->readCrtc(hwp, 0xA1);
+- Regs->CRA2 = hwp->readCrtc(hwp, 0xA2);
+-
++ /* LVDS Channel 2 Function Select 0 / DVI Function Select */
+ Regs->CR97 = hwp->readCrtc(hwp, 0x97);
++ /* LVDS Channel 1 Function Select 0 */
+ Regs->CR99 = hwp->readCrtc(hwp, 0x99);
++ /* Digital Video Port 1 Function Select 0 */
+ Regs->CR9B = hwp->readCrtc(hwp, 0x9B);
++ /* Power Now Control 4 */
+ Regs->CR9F = hwp->readCrtc(hwp, 0x9F);
+
++ /* Horizontal Scaling Initial Value */
++ Regs->CRA0 = hwp->readCrtc(hwp, 0xA0);
++ /* Vertical Scaling Initial Value */
++ Regs->CRA1 = hwp->readCrtc(hwp, 0xA1);
++ /* Scaling Enable Bit */
++ Regs->CRA2 = hwp->readCrtc(hwp, 0xA2);
+ }
+
+ /* Save TMDS status */
+@@ -2098,11 +2160,19 @@
+ hwp->writeSeq(hwp, 0x45, Regs->SR45);
+ hwp->writeSeq(hwp, 0x46, Regs->SR46);
+
++ /* Reset VCK PLL */
++ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) | 0x02); /* Set SR40[1] to 1 */
++ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) & 0xFD); /* Set SR40[1] to 0 */
++
+ /* ECK Clock Synthesizer: */
+ hwp->writeSeq(hwp, 0x47, Regs->SR47);
+ hwp->writeSeq(hwp, 0x48, Regs->SR48);
+ hwp->writeSeq(hwp, 0x49, Regs->SR49);
+
++ /* Reset ECK PLL */
++ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) | 0x01); /* Set SR40[0] to 1 */
++ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) & 0xFE); /* Set SR40[0] to 0 */
++
+ switch (pVia->Chipset) {
+ case VIA_CLE266:
+ case VIA_KM400:
+@@ -2112,6 +2182,10 @@
+ hwp->writeSeq(hwp, 0x4A, Regs->SR4A);
+ hwp->writeSeq(hwp, 0x4B, Regs->SR4B);
+ hwp->writeSeq(hwp, 0x4C, Regs->SR4C);
++
++ /* Reset LCK PLL */
++ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) | 0x04); /* Set SR40[2] to 1 */
++ hwp->writeSeq(hwp, 0x40, hwp->readSeq(hwp, 0x40) & 0xFB); /* Set SR40[2] to 0 */
+ break;
+ }
+
+@@ -2127,14 +2201,23 @@
+ hwp->writeCrtc(hwp, 0x32, Regs->CR32);
+ /* HSYNCH Adjuster */
+ hwp->writeCrtc(hwp, 0x33, Regs->CR33);
+- /* Starting Address Overflow */
+- hwp->writeCrtc(hwp, 0x34, Regs->CR34);
+ /* Extended Overflow */
+ hwp->writeCrtc(hwp, 0x35, Regs->CR35);
+ /*Power Management 3 (Monitor Control) */
+ hwp->writeCrtc(hwp, 0x36, Regs->CR36);
+
++ /* Starting Address */
++ /* Start Address High */
++ hwp->writeCrtc(hwp, 0x0C, Regs->CR0C);
++ /* Start Address Low */
++ hwp->writeCrtc(hwp, 0x0D, Regs->CR0D);
++ /* Starting Address Overflow Bits[28:24] */
+ hwp->writeCrtc(hwp, 0x48, Regs->CR48);
++ /* CR34 are fire bits. Must be writed after CR0C CR0D CR48. */
++ /* Starting Address Overflow Bits[23:16] */
++ hwp->writeCrtc(hwp, 0x34, Regs->CR34);
++
++
+ hwp->writeCrtc(hwp, 0x49, Regs->CR49);
+
+ /* Restore LCD control registers. */
+@@ -2453,7 +2536,6 @@
+ VIALoadRgbLut(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors,
+ VisualPtr pVisual)
+ {
+- VIAPtr pVia = VIAPTR(pScrn);
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+
+ int i, j, index;
+@@ -2880,7 +2962,6 @@
+ VIAWriteMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ {
+ VIAPtr pVia = VIAPTR(pScrn);
+- VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAWriteMode\n"));
+
+@@ -3033,9 +3114,7 @@
+ VIAAdjustFrame(int scrnIndex, int x, int y, int flags)
+ {
+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+- vgaHWPtr hwp = VGAHWPTR(pScrn);
+ VIAPtr pVia = VIAPTR(pScrn);
+- CARD32 Base;
+
+ DEBUG(xf86DrvMsg(scrnIndex, X_INFO, "VIAAdjustFrame %dx%d\n", x, y));
+
+@@ -3173,7 +3252,6 @@
+ static void
+ VIADPMS(ScrnInfoPtr pScrn, int mode, int flags)
+ {
+- vgaHWPtr hwp = VGAHWPTR(pScrn);
+ VIAPtr pVia = VIAPTR(pScrn);
+ VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
+
+diff -ruN xf86-video-openchrome-0.2.904/src/via_driver.h ../openchrome/xf86-video-openchrome-0.2.904/src/via_driver.h
+--- xf86-video-openchrome-0.2.904/src/via_driver.h 2009-10-09 01:09:22.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_driver.h 2010-03-07 01:09:00.000000000 +0100
+@@ -130,6 +130,7 @@
+ CARD8 SR4A, SR4B, SR4C;
+
+ /* extended CRTC registers */
++ CARD8 CR0C, CR0D;
+ CARD8 CR13, CR30, CR31, CR32, CR33, CR34, CR35, CR36;
+ CARD8 CR37, CR38, CR39, CR3A, CR40, CR41, CR42, CR43;
+ CARD8 CR44, CR45, CR46, CR47, CR48, CR49, CR4A;
+@@ -418,10 +419,10 @@
+ Bool PrintVGARegs;
+ Bool PrintTVRegs;
+ Bool I2CScan;
++#endif /* HAVE_DEBUG */
+
+ Bool UseLegacyModeSwitch ;
+ video_via_regs* VideoRegs ;
+-#endif /* HAVE_DEBUG */
+ } VIARec, *VIAPtr;
+
+ #define VIAPTR(p) ((VIAPtr)((p)->driverPrivate))
+diff -ruN xf86-video-openchrome-0.2.904/src/via_id.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_id.c
+--- xf86-video-openchrome-0.2.904/src/via_id.c 2009-10-07 23:30:39.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_id.c 2010-03-07 01:09:00.000000000 +0100
+@@ -152,6 +152,7 @@
+ {"MSI PM8PM", VIA_VM800, 0x1462, 0x7222, VIA_DEVICE_CRT},
+ {"Twinhead M6", VIA_VM800, 0x14FF, 0xA007, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"RoverBook Partner W500", VIA_VM800, 0x1509, 0x4330, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
++ {"FIC PTM800Pro LF", VIA_VM800, 0x1509, 0x601A, VIA_DEVICE_CRT},
+ {"Clevo/RoverBook Voyager V511L", VIA_VM800, 0x1558, 0x0662, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"Clevo M5xxS", VIA_VM800, 0x1558, 0x5406, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"Biostar P4M80-M4 / P4VMA-M", VIA_VM800, 0x1565, 0x1202, VIA_DEVICE_CRT},
+@@ -170,6 +171,7 @@
+ {"Asustek M2V-MX SE", VIA_K8M890, 0x1043, 0x8297, VIA_DEVICE_CRT},
+ {"Foxconn K8M890M2MA-RS2H", VIA_K8M890, 0x105B, 0x0C84, VIA_DEVICE_CRT},
+ {"Shuttle FX22V1", VIA_K8M890, 0x1297, 0x3080, VIA_DEVICE_CRT},
++ {"MSI K8M890M2-V", VIA_K8M890, 0x1462, 0x7139, VIA_DEVICE_CRT},
+ {"MSI K9VGM-V", VIA_K8M890, 0x1462, 0x7253, VIA_DEVICE_CRT},
+ {"Averatec 226x", VIA_K8M890, 0x14FF, 0xA002, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"Fujitsu/Siemens Amilo La 1703", VIA_K8M890, 0x1734, 0x10D9, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+@@ -189,6 +191,7 @@
+ {"MSI P4M900M / P4M900M2-F/L", VIA_P4M900, 0x1462, 0x7255, VIA_DEVICE_CRT},
+ {"MSI P4M900M3-L", VIA_P4M900, 0x1462, 0x7387, VIA_DEVICE_CRT},
+ {"Twinhead H12V", VIA_P4M900, 0x14FF, 0xA00F, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
++ {"Twinhead K15V", VIA_P4M900, 0x14FF, 0xA012, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"Everex NC1501/NC1503", VIA_P4M900, 0x1509, 0x1E30, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"Clevo M660SE", VIA_P4M900, 0x1558, 0x0664, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"Clevo M660SR", VIA_P4M900, 0x1558, 0x0669, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+@@ -224,6 +227,7 @@
+
+ /*** VX800 ***/
+ {"VIA Epia M700", VIA_VX800, 0x1106, 0x1122, VIA_DEVICE_CRT},
++ {"Guillemot-Hercules ECafe EC900B", VIA_VX800, 0x1106, 0x3349, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"VIA OpenBook", VIA_VX800, 0x1170, 0x0311, VIA_DEVICE_CRT | VIA_DEVICE_LCD}, /* VIA OpenBook eNote VBE8910 */
+ {"Samsung NC20", VIA_VX800, 0x144d, 0xc04e, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+ {"Quanta DreamBook Light IL1", VIA_VX800, 0x152d, 0x0771, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+@@ -231,6 +235,7 @@
+
+ /*** VX855 ***/
+ {"VIA VT8562C", VIA_VX855, 0x1106, 0x5122, VIA_DEVICE_CRT},
++ {"OLPC XO 1.5", VIA_VX855, 0x152D, 0x0833, VIA_DEVICE_LCD},
+
+ /* keep this */
+ {NULL, VIA_UNKNOWN, 0x0000, 0x0000, VIA_DEVICE_NONE}
+diff -ruN xf86-video-openchrome-0.2.904/src/via_mode.h ../openchrome/xf86-video-openchrome-0.2.904/src/via_mode.h
+--- xf86-video-openchrome-0.2.904/src/via_mode.h 2009-10-07 23:31:47.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_mode.h 2010-03-07 01:09:00.000000000 +0100
+@@ -54,50 +54,50 @@
+ CARD16 UniChrome;
+ union pllparams UniChromePro;
+ } ViaDotClocks[] = {
+- { 25200, 0x513C, /* 0xa79004 */ { 1, 4, 6, 169 } },
+- { 25312, 0xC763, /* 0xc49005 */ { 1, 4, 7, 198 } },
+- { 26591, 0x471A, /* 0xce9005 */ { 1, 4, 7, 208 } },
+- { 31500, 0xC558, /* 0xae9003 */ { 1, 4, 5, 176 } },
+- { 31704, 0x471F, /* 0xaf9002 */ { 1, 4, 4, 177 } },
+- { 32663, 0xC449, /* 0x479000 */ { 1, 4, 2, 73 } },
+- { 33750, 0x4721, /* 0x959002 */ { 1, 4, 4, 151 } },
+- { 35500, 0x5877, /* 0x759001 */ { 1, 4, 3, 119 } },
+- { 36000, 0x5879, /* 0x9f9002 */ { 1, 4, 4, 161 } },
+- { 39822, 0xC459, /* 0x578c02 */ { 1, 3, 4, 89 } },
+- { 40000, 0x515F, /* 0x848c04 */ { 1, 3, 6, 134 } },
+- { 41164, 0x4417, /* 0x2c8c00 */ { 1, 3, 2, 46 } },
+- { 46981, 0x5069, /* 0x678c02 */ { 1, 3, 4, 105 } },
+- { 49500, 0xC353, /* 0xa48c04 */ { 3, 3, 5, 138 } },
+- { 50000, 0xC354, /* 0x368c00 */ { 1, 3, 2, 56 } },
+- { 56300, 0x4F76, /* 0x3d8c00 */ { 1, 3, 2, 63 } },
+- { 57275, 0, /* 0x3e8c00 */ { 1, 3, 5, 157 } }, /* For XO 1.5 no need for a unichrome clock */
+- { 57284, 0x4E70, /* 0x3e8c00 */ { 1, 3, 2, 64 } },
+- { 64995, 0x0D3B, /* 0x6b8c01 */ { 1, 3, 3, 109 } },
+- { 65000, 0x0D3B, /* 0x6b8c01 */ { 1, 3, 3, 109 } }, /* Slightly unstable on PM800 */
+- { 65028, 0x866D, /* 0x6b8c01 */ { 1, 3, 3, 109 } },
+- { 74480, 0x156E, /* 0x288800 */ { 1, 2, 2, 42 } },
+- { 75000, 0x156E, /* 0x288800 */ { 1, 2, 2, 42 } },
+- { 78800, 0x442C, /* 0x2a8800 */ { 1, 2, 2, 44 } },
+- { 81135, 0x0622, /* 0x428801 */ { 1, 2, 3, 68 } },
+- { 81613, 0x4539, /* 0x708803 */ { 1, 2, 5, 114 } },
+- { 94500, 0x4542, /* 0x4d8801 */ { 1, 2, 3, 79 } },
+- { 108000, 0x0B53, /* 0x778802 */ { 1, 2, 4, 121 } },
+- { 108280, 0x4879, /* 0x778802 */ { 1, 2, 4, 121 } },
+- { 122000, 0x0D6F, /* 0x428800 */ { 1, 2, 2, 68 } },
+- { 122726, 0x073C, /* 0x878802 */ { 1, 2, 4, 137 } },
+- { 135000, 0x0742, /* 0x6f8801 */ { 1, 2, 3, 113 } },
+- { 148500, 0x0853, /* 0x518800 */ { 1, 2, 2, 83 } },
+- { 155800, 0x0857, /* 0x558402 */ { 1, 1, 4, 87 } },
+- { 157500, 0x422C, /* 0x2a8400 */ { 1, 1, 2, 44 } },
+- { 161793, 0x4571, /* 0x6f8403 */ { 1, 1, 5, 113 } },
+- { 162000, 0x0A71, /* 0x6f8403 */ { 1, 1, 5, 113 } },
+- { 175500, 0x4231, /* 0x2f8400 */ { 1, 1, 2, 49 } },
+- { 189000, 0x0542, /* 0x4d8401 */ { 1, 1, 3, 79 } },
+- { 202500, 0x0763, /* 0x6F8402 */ { 1, 1, 4, 113 } },
+- { 204800, 0x0764, /* 0x548401 */ { 1, 1, 3, 86 } },
+- { 218300, 0x043D, /* 0x3b8400 */ { 1, 1, 2, 61 } },
+- { 229500, 0x0660, /* 0x3e8400 */ { 1, 1, 2, 64 } }, /* Not tested on Pro } */
+- { 0, 0, { 0, 0, 0, 0 } }
++ { 25200, 0x513C, /* 0xa79004 */ { { 1, 4, 6, 169 } } },
++ { 25312, 0xC763, /* 0xc49005 */ { { 1, 4, 7, 198 } } },
++ { 26591, 0x471A, /* 0xce9005 */ { { 1, 4, 7, 208 } } },
++ { 31500, 0xC558, /* 0xae9003 */ { { 1, 4, 5, 176 } } },
++ { 31704, 0x471F, /* 0xaf9002 */ { { 1, 4, 4, 177 } } },
++ { 32663, 0xC449, /* 0x479000 */ { { 1, 4, 2, 73 } } },
++ { 33750, 0x4721, /* 0x959002 */ { { 1, 4, 4, 151 } } },
++ { 35500, 0x5877, /* 0x759001 */ { { 1, 4, 3, 119 } } },
++ { 36000, 0x5879, /* 0x9f9002 */ { { 1, 4, 4, 161 } } },
++ { 39822, 0xC459, /* 0x578c02 */ { { 1, 3, 4, 89 } } },
++ { 40000, 0x515F, /* 0x848c04 */ { { 1, 3, 6, 134 } } },
++ { 41164, 0x4417, /* 0x2c8c00 */ { { 1, 3, 2, 46 } } },
++ { 46981, 0x5069, /* 0x678c02 */ { { 1, 3, 4, 105 } } },
++ { 49500, 0xC353, /* 0xa48c04 */ { { 3, 3, 5, 138 } } },
++ { 50000, 0xC354, /* 0x368c00 */ { { 1, 3, 2, 56 } } },
++ { 56300, 0x4F76, /* 0x3d8c00 */ { { 1, 3, 2, 63 } } },
++ { 57275, 0, /* 0x3e8c00 */ { { 1, 3, 5, 157 } } }, /* For XO 1.5 no need for a unichrome clock */
++ { 57284, 0x4E70, /* 0x3e8c00 */ { { 1, 3, 2, 64 } } },
++ { 64995, 0x0D3B, /* 0x6b8c01 */ { { 1, 3, 3, 109 } } },
++ { 65000, 0x0D3B, /* 0x6b8c01 */ { { 1, 3, 3, 109 } } }, /* Slightly unstable on PM800 */
++ { 65028, 0x866D, /* 0x6b8c01 */ { { 1, 3, 3, 109 } } },
++ { 74480, 0x156E, /* 0x288800 */ { { 1, 2, 2, 42 } } },
++ { 75000, 0x156E, /* 0x288800 */ { { 1, 2, 2, 42 } } },
++ { 78800, 0x442C, /* 0x2a8800 */ { { 1, 2, 2, 44 } } },
++ { 81135, 0x0622, /* 0x428801 */ { { 1, 2, 3, 68 } } },
++ { 81613, 0x4539, /* 0x708803 */ { { 1, 2, 5, 114 } } },
++ { 94500, 0x4542, /* 0x4d8801 */ { { 1, 2, 3, 79 } } },
++ { 108000, 0x0B53, /* 0x778802 */ { { 1, 2, 4, 121 } } },
++ { 108280, 0x4879, /* 0x778802 */ { { 1, 2, 4, 121 } } },
++ { 122000, 0x0D6F, /* 0x428800 */ { { 1, 2, 2, 68 } } },
++ { 122726, 0x073C, /* 0x878802 */ { { 1, 2, 4, 137 } } },
++ { 135000, 0x0742, /* 0x6f8801 */ { { 1, 2, 3, 113 } } },
++ { 148500, 0x0853, /* 0x518800 */ { { 1, 2, 2, 83 } } },
++ { 155800, 0x0857, /* 0x558402 */ { { 1, 1, 4, 87 } } },
++ { 157500, 0x422C, /* 0x2a8400 */ { { 1, 1, 2, 44 } } },
++ { 161793, 0x4571, /* 0x6f8403 */ { { 1, 1, 5, 113 } } },
++ { 162000, 0x0A71, /* 0x6f8403 */ { { 1, 1, 5, 113 } } },
++ { 175500, 0x4231, /* 0x2f8400 */ { { 1, 1, 2, 49 } } },
++ { 189000, 0x0542, /* 0x4d8401 */ { { 1, 1, 3, 79 } } },
++ { 202500, 0x0763, /* 0x6F8402 */ { { 1, 1, 4, 113 } } },
++ { 204800, 0x0764, /* 0x548401 */ { { 1, 1, 3, 86 } } },
++ { 218300, 0x043D, /* 0x3b8400 */ { { 1, 1, 2, 61 } } },
++ { 229500, 0x0660, /* 0x3e8400 */ { { 1, 1, 2, 64 } } }, /* Not tested on Pro } */
++ { 0, 0, { { 0, 0, 0, 0 } } }
+ };
+
+ /*
+diff -ruN xf86-video-openchrome-0.2.904/src/via_panel.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_panel.c
+--- xf86-video-openchrome-0.2.904/src/via_panel.c 2009-10-03 22:48:55.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_panel.c 2010-03-07 01:09:00.000000000 +0100
+@@ -171,12 +171,18 @@
+ resWidth, resHeight, panelWidth, panelHeight));
+
+ if (resWidth < panelWidth) {
+- /* FIXME: It is different for chipset < K8M800 */
+- horScalingFactor = ((resWidth - 1) * 4096) / (panelWidth - 1);
++ /* Load Horizontal Scaling Factor */
++ if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) {
++ horScalingFactor = ((resWidth - 1) * 4096) / (panelWidth - 1);
++
++ /* Horizontal scaling enabled */
++ cra2 = 0xC0;
++ cr9f = horScalingFactor & 0x0003; /* HSCaleFactor[1:0] at CR9F[1:0] */
++ } else {
++ /* TODO: Need testing */
++ horScalingFactor = ((resWidth - 1) * 1024) / (panelWidth - 1);
++ }
+
+- /* Horizontal scaling enabled */
+- cra2 = 0xC0;
+- cr9f = horScalingFactor & 0x0003; /* HSCaleFactor[1:0] at CR9F[1:0] */
+ cr77 = (horScalingFactor & 0x03FC) >> 2; /* HSCaleFactor[9:2] at CR77[7:0] */
+ cr79 = (horScalingFactor & 0x0C00) >> 10; /* HSCaleFactor[11:10] at CR79[5:4] */
+ cr79 <<= 4;
+@@ -184,11 +190,18 @@
+ }
+
+ if (resHeight < panelHeight) {
+- verScalingFactor = ((resHeight - 1) * 2048) / (panelHeight - 1);
++ /* Load Vertical Scaling Factor */
++ if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) {
++ verScalingFactor = ((resHeight - 1) * 2048) / (panelHeight - 1);
++
++ /* Vertical scaling enabled */
++ cra2 |= 0x08;
++ cr79 |= ((verScalingFactor & 0x0001) << 3); /* VSCaleFactor[0] at CR79[3] */
++ } else {
++ /* TODO: Need testing */
++ verScalingFactor = ((resHeight - 1) * 1024) / (panelHeight - 1);
++ }
+
+- /* Vertical scaling enabled */
+- cra2 |= 0x08;
+- cr79 |= ((verScalingFactor & 0x0001) << 3); /* VSCaleFactor[0] at CR79[3] */
+ cr78 |= (verScalingFactor & 0x01FE) >> 1; /* VSCaleFactor[8:1] at CR78[7:0] */
+ cr79 |= ((verScalingFactor & 0x0600) >> 9) << 6; /* VSCaleFactor[10:9] at CR79[7:6] */
+ scaling = TRUE;
+@@ -203,12 +216,18 @@
+ ViaCrtcMask(hwp, 0x77, cr77, 0xFF);
+ ViaCrtcMask(hwp, 0x78, cr78, 0xFF);
+ ViaCrtcMask(hwp, 0x79, cr79, 0xF8);
+- ViaCrtcMask(hwp, 0x9F, cr9f, 0x03);
++ if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) {
++ ViaCrtcMask(hwp, 0x9F, cr9f, 0x03);
++ }
+ ViaCrtcMask(hwp, 0x79, 0x03, 0x03);
+- } else
++ } else {
++ /* Disable panel scale */
+ ViaCrtcMask(hwp, 0x79, 0x00, 0x01);
+-
+- ViaCrtcMask(hwp, 0xA2, cra2, 0xC8);
++ }
++
++ if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400) {
++ ViaCrtcMask(hwp, 0xA2, cra2, 0xC8);
++ }
+
+ /* Horizontal scaling selection: interpolation */
+ // ViaCrtcMask(hwp, 0x79, 0x02, 0x02);
+@@ -233,14 +252,14 @@
+
+ if (panelMode->Width && panelMode->Height) {
+
+- /* TODO: fix refresh rate and check malloc */
++ /* TODO: fix refresh rate */
+ DisplayModePtr p = malloc( sizeof(DisplayModeRec) ) ;
+- memset(p, 0, sizeof(DisplayModeRec));
++ if (p) {
++ memset(p, 0, sizeof(DisplayModeRec));
+
+- float refresh = 60.0f ;
++ float refresh = 60.0f ;
+
+- /* The following code is borrowed from xf86SetModeCrtc. */
+- if (p) {
++ /* The following code is borrowed from xf86SetModeCrtc. */
+ viaTimingCvt(p, panelMode->Width, panelMode->Height, refresh, FALSE, TRUE);
+ p->CrtcHDisplay = p->HDisplay;
+ p->CrtcHSyncStart = p->HSyncStart;
+@@ -256,9 +275,13 @@
+ p->CrtcVBlankEnd = max(p->CrtcVSyncEnd, p->CrtcVTotal);
+ p->CrtcHBlankStart = min(p->CrtcHSyncStart, p->CrtcHDisplay);
+ p->CrtcHBlankEnd = max(p->CrtcHSyncEnd, p->CrtcHTotal);
+-
++
++ pVia->pBIOSInfo->Panel->NativeDisplayMode = p;
++ } else {
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++ "Out of memory. Size: %d bytes\n", sizeof(DisplayModeRec));
+ }
+- pVia->pBIOSInfo->Panel->NativeDisplayMode = p;
++
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Invalid panel dimension (%dx%d)\n", panelMode->Width,
+@@ -339,22 +362,22 @@
+ ViaPanelGetSizeFromEDID(ScrnInfoPtr pScrn, xf86MonPtr pMon,
+ int *width, int *height)
+ {
+- int i, max = 0, vsize;
++ int i, max_hsize = 0, vsize = 0;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAGetPanelSizeFromEDID\n"));
+
+ /* !!! Why are we not checking VESA modes? */
+
+ /* checking standard timings */
+- for (i = 0; i < 8; i++)
++ for (i = 0; i < STD_TIMINGS; i++)
+ if ((pMon->timings2[i].hsize > 256)
+- && (pMon->timings2[i].hsize > max)) {
+- max = pMon->timings2[i].hsize;
++ && (pMon->timings2[i].hsize > max_hsize)) {
++ max_hsize = pMon->timings2[i].hsize;
+ vsize = pMon->timings2[i].vsize;
+ }
+
+- if (max != 0) {
+- *width = max;
++ if (max_hsize != 0) {
++ *width = max_hsize;
+ *height = vsize;
+ return TRUE;
+ }
+@@ -369,14 +392,14 @@
+ struct detailed_timings timing = pMon->det_mon[i].section.d_timings;
+
+ /* ignore v_active for now */
+- if ((timing.clock > 15000000) && (timing.h_active > max)) {
+- max = timing.h_active;
++ if ((timing.clock > 15000000) && (timing.h_active > max_hsize)) {
++ max_hsize = timing.h_active;
+ vsize = timing.v_active;
+ }
+ }
+
+- if (max != 0) {
+- *width = max;
++ if (max_hsize != 0) {
++ *width = max_hsize;
+ *height = vsize;
+ return TRUE;
+ }
+diff -ruN xf86-video-openchrome-0.2.904/src/via_video.c ../openchrome/xf86-video-openchrome-0.2.904/src/via_video.c
+--- xf86-video-openchrome-0.2.904/src/via_video.c 2009-10-08 01:39:13.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_video.c 2010-03-07 01:09:00.000000000 +0100
+@@ -466,8 +466,8 @@
+
+ viaVidEng->video1_ctl = 0;
+ viaVidEng->video3_ctl = 0;
+- viaVidEng->compose = 0x80000000;
+- viaVidEng->compose = 0x40000000;
++ viaVidEng->compose = V1_COMMAND_FIRE;
++ viaVidEng->compose = V3_COMMAND_FIRE;
+ viaVidEng->color_key = 0x821;
+ viaVidEng->snd_color_key = 0x821;
+
+@@ -479,16 +479,16 @@
+ VIAPtr pVia = VIAPTR(pScrn);
+ vmmtr viaVidEng = (vmmtr) pVia->VidMapBase;
+
++ DBG_DD(ErrorF(" via_video.c : viaSaveVideo : \n"));
+ /* Save video registers */
+- /* TODO: Identify which registers should be saved and restored */
+ memcpy(pVia->VideoRegs, (void*)viaVidEng, sizeof(video_via_regs));
+
+ pVia->dwV1 = ((vmmtr) viaVidEng)->video1_ctl;
+ pVia->dwV3 = ((vmmtr) viaVidEng)->video3_ctl;
+ viaVidEng->video1_ctl = 0;
+ viaVidEng->video3_ctl = 0;
+- viaVidEng->compose = 0x80000000;
+- viaVidEng->compose = 0x40000000;
++ viaVidEng->compose = V1_COMMAND_FIRE;
++ viaVidEng->compose = V3_COMMAND_FIRE;
+ }
+
+ void
+@@ -496,16 +496,65 @@
+ {
+ VIAPtr pVia = VIAPTR(pScrn);
+ vmmtr viaVidEng = (vmmtr) pVia->VidMapBase;
++ video_via_regs *localVidEng = pVia->VideoRegs;
++
+
++ DBG_DD(ErrorF(" via_video.c : viaRestoreVideo : \n"));
+ /* Restore video registers */
+- /* TODO: Identify which registers should be saved and restored */
+- memcpy((void*)viaVidEng, pVia->VideoRegs, sizeof(video_via_regs));
+-
++ /* flush restored video engines' setting to VidMapBase */
++
++ viaVidEng->alphawin_hvstart = localVidEng->alphawin_hvstart;
++ viaVidEng->alphawin_size = localVidEng->alphawin_size;
++ viaVidEng->alphawin_ctl = localVidEng->alphawin_ctl;
++ viaVidEng->alphafb_stride = localVidEng->alphafb_stride;
++ viaVidEng->color_key = localVidEng->color_key;
++ viaVidEng->alphafb_addr = localVidEng->alphafb_addr;
++ viaVidEng->chroma_low = localVidEng->chroma_low;
++ viaVidEng->chroma_up = localVidEng->chroma_up;
++
++ if (pVia->ChipId != PCI_CHIP_VT3314)
++ {
++ /*VT3314 only has V3*/
++ viaVidEng->video1_ctl = localVidEng->video1_ctl;
++ viaVidEng->video1_fetch = localVidEng->video1_fetch;
++ viaVidEng->video1y_addr1 = localVidEng->video1y_addr1;
++ viaVidEng->video1_stride = localVidEng->video1_stride;
++ viaVidEng->video1_hvstart = localVidEng->video1_hvstart;
++ viaVidEng->video1_size = localVidEng->video1_size;
++ viaVidEng->video1y_addr2 = localVidEng->video1y_addr2;
++ viaVidEng->video1_zoom = localVidEng->video1_zoom;
++ viaVidEng->video1_mictl = localVidEng->video1_mictl;
++ viaVidEng->video1y_addr0 = localVidEng->video1y_addr0;
++ viaVidEng->video1_fifo = localVidEng->video1_fifo;
++ viaVidEng->video1y_addr3 = localVidEng->video1y_addr3;
++ viaVidEng->v1_source_w_h = localVidEng->v1_source_w_h ;
++ viaVidEng->video1_CSC1 = localVidEng->video1_CSC1;
++ viaVidEng->video1_CSC2 = localVidEng->video1_CSC2;
++ }
++ viaVidEng->snd_color_key = localVidEng->snd_color_key;
++ viaVidEng->v3alpha_prefifo = localVidEng->v3alpha_prefifo;
++ viaVidEng->v3alpha_fifo = localVidEng->v3alpha_fifo;
++ viaVidEng->video3_CSC2 = localVidEng->video3_CSC2;
++ viaVidEng->video3_CSC2 = localVidEng->video3_CSC2;
++ viaVidEng->v3_source_width = localVidEng->v3_source_width;
++ viaVidEng->video3_ctl = localVidEng->video3_ctl;
++ viaVidEng->video3_addr0 = localVidEng->video3_addr0;
++ viaVidEng->video3_addr1 = localVidEng->video3_addr1;
++ viaVidEng->video3_stride = localVidEng->video3_stride;
++ viaVidEng->video3_hvstart = localVidEng->video3_hvstart;
++ viaVidEng->video3_size = localVidEng->video3_size;
++ viaVidEng->v3alpha_fetch = localVidEng->v3alpha_fetch;
++ viaVidEng->video3_zoom = localVidEng->video3_zoom;
++ viaVidEng->video3_mictl = localVidEng->video3_mictl;
++ viaVidEng->video3_CSC1 = localVidEng->video3_CSC1;
++ viaVidEng->video3_CSC2 = localVidEng->video3_CSC2;
++ viaVidEng->compose = localVidEng->compose;
++
+ viaVidEng->video1_ctl = pVia->dwV1;
+ viaVidEng->video3_ctl = pVia->dwV3;
+- viaVidEng->compose = 0x80000000;
+- viaVidEng->compose = 0x40000000;
+-
++ if (pVia->ChipId != PCI_CHIP_VT3314)
++ viaVidEng->compose = V1_COMMAND_FIRE;
++ viaVidEng->compose = V3_COMMAND_FIRE;
+ }
+
+ void
+@@ -524,8 +573,8 @@
+
+ viaVidEng->video1_ctl = 0;
+ viaVidEng->video3_ctl = 0;
+- viaVidEng->compose = 0x80000000;
+- viaVidEng->compose = 0x40000000;
++ viaVidEng->compose = V1_COMMAND_FIRE;
++ viaVidEng->compose = V3_COMMAND_FIRE;
+
+ /*
+ * Free all adaptor info allocated in viaInitVideo.
+@@ -561,7 +610,7 @@
+ XF86VideoAdaptorPtr *adaptors, *newAdaptors;
+ int num_adaptors, num_new;
+
+- DBG_DD(ErrorF(" via_video.c : viaInitVideo : \n"));
++ DBG_DD(ErrorF(" via_video.c : viaInitVideo, Screen[%d]\n", pScrn->scrnIndex));
+
+ allAdaptors = NULL;
+ newAdaptors = NULL;
+@@ -832,7 +881,7 @@
+ DevUnion *pdevUnion;
+ int i, j, usedPorts, numPorts;
+
+- DBG_DD(ErrorF(" via_video.c : viaSetupImageVideo: \n"));
++ DBG_DD(ErrorF(" via_video.c : viaSetupAdaptors (viaSetupImageVideo): \n"));
+
+ xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
+ xvContrast = MAKE_ATOM("XV_CONTRAST");
+@@ -1042,6 +1091,8 @@
+ }
+
+ } else {
++ DBG_DD(ErrorF(" via_video.c : viaGetPortAttribute : is not supported the attribute\n"));
++
+ /*return BadMatch */;
+ }
+ return Success;
+@@ -1498,6 +1549,7 @@
+
+ DBG_DD(ErrorF(" via_video.c : viaQueryImageAttributes : FourCC=0x%x, ",
+ id));
++ DBG_DD(ErrorF(" via_video.c : Screen[%d], w=%d, h=%d\n", pScrn->scrnIndex, *w, *h));
+
+ if ((!w) || (!h))
+ return 0;
+@@ -1513,6 +1565,7 @@
+
+ switch (id) {
+ case FOURCC_YV12: /*Planar format : YV12 -4:2:0 */
++ case FOURCC_I420:
+ *h = (*h + 1) & ~1;
+ size = *w;
+ if (pVia->useDmaBlit)
+diff -ruN xf86-video-openchrome-0.2.904/src/via_video.h ../openchrome/xf86-video-openchrome-0.2.904/src/via_video.h
+--- xf86-video-openchrome-0.2.904/src/via_video.h 2009-10-03 22:48:55.000000000 +0200
++++ ../openchrome/xf86-video-openchrome-0.2.904/src/via_video.h 2010-03-07 01:09:00.000000000 +0100
+@@ -44,6 +44,10 @@
+
+ #define VIDEO_BPP 2
+
++
++#define V1_COMMAND_FIRE 0x80000000 /* V1 commands fire */
++#define V3_COMMAND_FIRE 0x40000000 /* V3 commands fire */
++
+ typedef struct
+ {
+ CARD32 interruptflag; /* 200 */
+@@ -89,7 +93,7 @@
+ CARD32 video3_ctl; /* 2a0 */
+ CARD32 video3_addr0; /* 2a4 */
+ CARD32 video3_addr1; /* 2a8 */
+- CARD32 video3_stribe; /* 2ac */
++ CARD32 video3_stride; /* 2ac */
+ CARD32 video3_hvstart; /* 2b0 */
+ CARD32 video3_size; /* 2b4 */
+ CARD32 v3alpha_fetch; /* 2b8 */
diff --git a/testing/xf86-video-r128/LICENSE b/testing/xf86-video-r128/LICENSE
new file mode 100644
index 000000000..229a26157
--- /dev/null
+++ b/testing/xf86-video-r128/LICENSE
@@ -0,0 +1,219 @@
+
+Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation, and
+that the name of Marc Aurele La France not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission. Marc Aurele La France makes no representations
+about the suitability of this software for any purpose. It is provided
+"as-is" without express or implied warranty.
+
+MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
+EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+Copyright 2000 Gareth Hughes
+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
+GARETH HUGHES 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.
+
+(c) 2004 Adam Jackson. Standard MIT license applies.
+
+Copyright 1999-2000 Precision Insight, Inc., Cedar Park, Texas.
+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 NON-INFRINGEMENT. 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.
+
+Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
+Precision Insight, Inc., Cedar Park, Texas, and
+VA Linux Systems Inc., Fremont, 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 on 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
+NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX
+SYSTEMS AND/OR THEIR 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.
+
+Copyright 2003 Alex Deucher.
+
+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 on 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
+NON-INFRINGEMENT. IN NO EVENT SHALL ALEX DEUCHER, OR ANY OTHER
+CONTRIBUTORS 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, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
+ Cedar Park, Texas.
+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
+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
+ATI, PRECISION INSIGHT AND/OR THEIR 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.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Kevin E. Martin <martin@valinux.com>
+ * Gareth Hughes <gareth@valinux.com>
+ *
+ */
+
+/**************************************************************************
+
+Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
+ VA Linux Systems Inc., Fremont, 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
+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
+ATI, VA LINUX SYSTEMS AND/OR THEIR 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.
+
+**************************************************************************/
+
+/*
+ * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
+ * Precision Insight, Inc., Cedar Park, Texas, and
+ * VA Linux Systems Inc., Fremont, 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 on 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
+ * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX
+ * SYSTEMS AND/OR THEIR 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.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <martin@valinux.com>
+ * Rickard E. Faith <faith@valinux.com>
+ * Daryll Strauss <daryll@valinux.com>
+ * Gareth Hughes <gareth@valinux.com>
+ *
+ */
+
diff --git a/testing/xf86-video-r128/PKGBUILD b/testing/xf86-video-r128/PKGBUILD
new file mode 100644
index 000000000..44c710729
--- /dev/null
+++ b/testing/xf86-video-r128/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 115348 2011-03-17 18:05:57Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-r128
+pkgver=6.8.1
+pkgrel=6
+pkgdesc="X.org ati Rage128 video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc' 'r128-dri')
+makedepends=('xorg-server-devel' 'xf86driproto' 'libdrm' 'mesa')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ LICENSE)
+md5sums=('2b90854a62a4d45d652062f582dc8d13'
+ '97ad034bea2a153f4418a6bb0c77acf4')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-dri
+ make
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-rendition/PKGBUILD b/testing/xf86-video-rendition/PKGBUILD
new file mode 100644
index 000000000..7c664a61b
--- /dev/null
+++ b/testing/xf86-video-rendition/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 115356 2011-03-17 18:07:25Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-rendition
+pkgver=4.2.4
+pkgrel=4
+pkgdesc="X.org Rendition video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool' '!strip')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('16148c25183f7829c22bc9dfdb588c1a16bf4565')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+
+ strip --strip-unneeded "${pkgdir}/usr/lib/xorg/modules/drivers/rendition_drv.so"
+}
diff --git a/testing/xf86-video-s3/LICENSE b/testing/xf86-video-s3/LICENSE
new file mode 100644
index 000000000..a4c8d5dd4
--- /dev/null
+++ b/testing/xf86-video-s3/LICENSE
@@ -0,0 +1,25 @@
+This package was downloaded from
+http://xorg.freedesktop.org/releases/individual/driver/
+
+ Copyright 2001 Ani Joshi <ajoshi@unixbox.com>
+
+ XFree86 4.x driver for S3 chipsets
+
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation and
+that the name of Ani Joshi not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission. Ani Joshi makes no representations
+about the suitability of this software for any purpose. It is provided
+"as-is" without express or implied warranty.
+
+ANI JOSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL ANI JOSHI BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/testing/xf86-video-s3/PKGBUILD b/testing/xf86-video-s3/PKGBUILD
new file mode 100644
index 000000000..fb0233d05
--- /dev/null
+++ b/testing/xf86-video-s3/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 115359 2011-03-17 18:08:59Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-s3
+pkgver=0.6.3
+pkgrel=5
+pkgdesc="X.org S3 video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ LICENSE)
+md5sums=('5eb06d88533fb327d067928faeb20860'
+ '6b2bea29522da7cbb81cadde3235024d')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/xf86-video-s3virge/LICENSE b/testing/xf86-video-s3virge/LICENSE
new file mode 100644
index 000000000..23c2aea22
--- /dev/null
+++ b/testing/xf86-video-s3virge/LICENSE
@@ -0,0 +1,25 @@
+This package was downloaded from
+http://xorg.freedesktop.org/releases/individual/driver/
+
+Copyright (C) 1994-2000 The XFree86 Project, Inc. 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 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, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+XFREE86 PROJECT 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.
+
+Except as contained in this notice, the name of the XFree86 Project shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the XFree86 Project.
diff --git a/testing/xf86-video-s3virge/PKGBUILD b/testing/xf86-video-s3virge/PKGBUILD
new file mode 100644
index 000000000..9e5e00ff6
--- /dev/null
+++ b/testing/xf86-video-s3virge/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 115362 2011-03-17 18:10:25Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Alexander Baldeck <alexander@archlinux.org>
+
+pkgname=xf86-video-s3virge
+pkgver=1.10.4
+pkgrel=5
+pkgdesc="X.org S3 Virge video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('pkgconfig' 'xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=(!libtool)
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ LICENSE)
+md5sums=('6517bbbf808c700502d51acdc44662f8' 'c0a38dfcd6288eff39322f7c584b8d1e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-savage/PKGBUILD b/testing/xf86-video-savage/PKGBUILD
new file mode 100644
index 000000000..14c73b0a8
--- /dev/null
+++ b/testing/xf86-video-savage/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 115365 2011-03-17 18:12:33Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-savage
+pkgver=2.3.2
+pkgrel=2
+pkgdesc="X.org savage video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc' 'savage-dri')
+makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'mesa')
+conflicts=('xorg-server<1.10.0')
+options=(!libtool !makeflags)
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('d675693d0b29cb24f624ef57c1fe2f271f6bf6c3')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-dri
+ make
+ make DESTDIR="${pkgdir}" install
+
+ install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-siliconmotion/PKGBUILD b/testing/xf86-video-siliconmotion/PKGBUILD
new file mode 100644
index 000000000..fc72fd1c9
--- /dev/null
+++ b/testing/xf86-video-siliconmotion/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 115368 2011-03-17 18:14:01Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Alexander Baldeck <alexander@archlinux.org>
+
+pkgname=xf86-video-siliconmotion
+pkgver=1.7.5
+pkgrel=2
+pkgdesc="X.org siliconmotion video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('946acae0822d51da57abe8b7ed049691bd731589')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-sis/PKGBUILD b/testing/xf86-video-sis/PKGBUILD
new file mode 100644
index 000000000..04958c1c4
--- /dev/null
+++ b/testing/xf86-video-sis/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 115371 2011-03-17 18:16:09Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-sis
+pkgver=0.10.3
+pkgrel=4
+pkgdesc="X.org SiS video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc' 'sis-dri')
+makedepends=('xorg-server-devel' 'xf86dgaproto' 'libdrm' 'xf86driproto' 'mesa')
+conflicts=('xorg-server<1.10.0')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('158673747e240b0c33499685a32d46bdaead7cd5')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-dri
+ make
+ 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-sisusb/PKGBUILD b/testing/xf86-video-sisusb/PKGBUILD
new file mode 100644
index 000000000..1a425a0c5
--- /dev/null
+++ b/testing/xf86-video-sisusb/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115377 2011-03-17 18:17:47Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-sisusb
+pkgver=0.9.4
+pkgrel=4
+pkgdesc="X.org SiS USB video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('600fd49dffe00121f9042555fea55948653d1a7e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-tdfx/LICENSE b/testing/xf86-video-tdfx/LICENSE
new file mode 100644
index 000000000..08b1adde5
--- /dev/null
+++ b/testing/xf86-video-tdfx/LICENSE
@@ -0,0 +1,160 @@
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+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, 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 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.
+
+
+/*
+ * Copyright 2000 VA Linux Systems Inc., Fremont, 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
+ * VA LINUX SYSTEMS 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.
+ */
+
+
+/*
+ * GLX Hardware Device Driver for Intel i810
+ * Copyright (C) 1999 Keith Whitwell
+ *
+ * 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 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
+ * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS 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.
+ *
+ *
+ */
+
+
+/*
+ * GLX Hardware Device Driver for Intel tdfx
+ * Copyright (C) 1999 Keith Whitwell
+ *
+ * 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 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
+ * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS 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.
+ *
+ *
+ */
+
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 4.1
+ *
+ * Copyright (C) 1999-2002 Brian Paul 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 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
+ * BRIAN PAUL 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.
+ */
+
+/* Authors:
+ * Keith Whitwell <keith@tungstengraphics.com>
+ * Daniel Borca <dborca@users.sourceforge.net>
+ */
+
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 5.1
+ *
+ * Copyright (C) 1999-2003 Brian Paul 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 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
+ * BRIAN PAUL 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.
+ */
+
+/* Authors:
+ * Keith Whitwell
+ * Daniel Borca
+ */
diff --git a/testing/xf86-video-tdfx/PKGBUILD b/testing/xf86-video-tdfx/PKGBUILD
new file mode 100644
index 000000000..d164f8f49
--- /dev/null
+++ b/testing/xf86-video-tdfx/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 115382 2011-03-17 18:19:40Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-tdfx
+pkgver=1.4.3
+pkgrel=6
+pkgdesc="X.org tdfx video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc' 'tdfx-dri')
+makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'mesa')
+conflicts=('xorg-server<1.10.0')
+options=(!libtool)
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ LICENSE)
+md5sums=('8161bbf2b100c21b609163f0010766b3'
+ '978e9486ffd4e4164c12dc68c84186e1')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-dri
+ make
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-trident/PKGBUILD b/testing/xf86-video-trident/PKGBUILD
new file mode 100644
index 000000000..07e2475b0
--- /dev/null
+++ b/testing/xf86-video-trident/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 115385 2011-03-17 18:21:11Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-trident
+pkgver=1.3.4
+pkgrel=4
+pkgdesc="X.org Trident video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'xf86dgaproto')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=(!libtool)
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('7c40f5c02bddf399862782b708941e79302318af')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
+}
diff --git a/testing/xf86-video-tseng/PKGBUILD b/testing/xf86-video-tseng/PKGBUILD
new file mode 100644
index 000000000..f252044c5
--- /dev/null
+++ b/testing/xf86-video-tseng/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115388 2011-03-17 18:22:47Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-tseng
+pkgver=1.2.4
+pkgrel=4
+pkgdesc="X.org tseng video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('1b45f55657b2c92f30abb0769cae57fca98d93b7')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-unichrome/LICENSE b/testing/xf86-video-unichrome/LICENSE
new file mode 100644
index 000000000..f4007667b
--- /dev/null
+++ b/testing/xf86-video-unichrome/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2004-2007 Luc Verhaegen. All Rights Reserved.
+Copyright (c) 2004-2005 The Unichrome Project. All Rights Reserved.
+Copyright (c) 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+Copyright (c) 2001-2003 S3 Graphics, Inc. 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, 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
+THE AUTHORS OR COPYRIGHT HOLDERS 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/xf86-video-unichrome/PKGBUILD b/testing/xf86-video-unichrome/PKGBUILD
new file mode 100644
index 000000000..71172840e
--- /dev/null
+++ b/testing/xf86-video-unichrome/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 115391 2011-03-17 18:24:27Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-unichrome
+pkgver=0.2.7
+pkgrel=5
+_gitversion=cd12cce88ff886031c23c743569fba97eccace4e
+pkgdesc="Unichrome video drivers for X.Org"
+arch=(i686 x86_64)
+url="http://unichrome.sf.net/"
+license=('custom')
+depends=('glibc' 'unichrome-dri')
+makedepends=('xorg-server-devel' 'libx11' 'libdrm' 'xf86driproto' 'mesa' 'libxvmc')
+options=('!libtool')
+conflicts=('xf86-video-via' 'openchrome' 'xf86-video-openchrome' 'xorg-server<1.10.0')
+source=(http://cgit.freedesktop.org/~libv/${pkgname}/snapshot/${pkgname}-${_gitversion}.tar.bz2
+ drm-include.patch
+ LICENSE)
+md5sums=('c64332e6c386ed9a580116e131f288f4'
+ '4a9bf2e3ef338c170a2f58988ebb97dc'
+ '6ea7d64c87c5c32201a1e38e3336e44a')
+
+build() {
+ cd "${srcdir}/${pkgname}-${_gitversion}"
+ patch -Np0 -i "${srcdir}/drm-include.patch"
+ ./autogen.sh --prefix=/usr --enable-dri
+ make
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-unichrome/drm-include.patch b/testing/xf86-video-unichrome/drm-include.patch
new file mode 100644
index 000000000..edfe9a8af
--- /dev/null
+++ b/testing/xf86-video-unichrome/drm-include.patch
@@ -0,0 +1,11 @@
+--- src/via_memory.h.orig 2010-05-09 16:17:00.143352805 +0200
++++ src/via_memory.h 2010-05-09 16:17:14.433351301 +0200
+@@ -30,7 +30,7 @@
+
+ /* don't include local via_drm.h when using modular */
+ #ifdef HAVE_CONFIG_H
+-#include "drm/via_drm.h"
++#include <via_drm.h>
+ #else
+ #include "via_drm.h"
+ #endif
diff --git a/testing/xf86-video-v4l/LICENSE b/testing/xf86-video-v4l/LICENSE
new file mode 100644
index 000000000..535595b88
--- /dev/null
+++ b/testing/xf86-video-v4l/LICENSE
@@ -0,0 +1,826 @@
+This package was downloaded from
+http://xorg.freedesktop.org/releases/individual/driver/
+
+ Licenses
+
+ The X.Org Foundation
+
+ March 2004
+
+1. Introduction
+
+The X.org Foundation X Window System distribution is a compilation of code
+and documentation from many sources. This document is intended primarily as
+a guide to the licenses used in the distribution: you must check each file
+and/or package for precise redistribution terms. None-the-less, this summary
+may be useful to many users. No software incorporating the XFree86 1.1
+license has been incorporated.
+
+This document is based on the compilation from XFree86.
+
+2. XFree86 License
+
+XFree86 code without an explicit copyright is covered by the following copy-
+right/license:
+
+Copyright (C) 1994-2003 The XFree86 Project, Inc. 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 fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice 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, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the XFree86 Project shall not
+be used in advertising or otherwise to promote the sale, use or other deal-
+ings in this Software without prior written authorization from the XFree86
+Project.
+
+3. Other Licenses
+
+Portions of code are covered by the following licenses/copyrights. See indi-
+vidual files for the copyright dates.
+
+3.1 X/MIT Copyrights
+
+3.1.1 X Consortium
+
+Copyright (C) <date> X Consortium
+
+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 fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice 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, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X
+CONSORTIUM 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.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+X Window System is a trademark of X Consortium, Inc.
+
+3.1.2 The Open Group
+
+Copyright <date> The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation.
+
+The above copyright notice and this permission notice 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, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+3.2 Berkeley-based copyrights:
+
+o
+
+3.2.1 General
+
+Redistribution and use in source and binary forms, with or without modifica-
+tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
+CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+3.2.2 UCB/LBL
+
+Copyright (c) 1993 The Regents of the University of California. All rights
+reserved.
+
+This software was developed by the Computer Systems Engineering group at
+Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to
+Berkeley.
+
+All advertising materials mentioning features or use of this software must
+display the following acknowledgement: This product includes software devel-
+oped by the University of California, Lawrence Berkeley Laboratory.
+
+Redistribution and use in source and binary forms, with or without modifica-
+tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement: This product includes soft-
+ ware developed by the University of California, Berkeley and its con-
+ tributors.
+
+ 4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
+CLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+3.2.3 The NetBSD Foundation, Inc.
+
+Copyright (c) 2003 The NetBSD Foundation, Inc. All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation by
+Ben Collver <collver1@attbi.com>
+
+Redistribution and use in source and binary forms, with or without modifica-
+tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement: This product includes soft-
+ ware developed by the NetBSD Foundation, Inc. and its contributors.
+
+ 4. Neither the name of The NetBSD Foundation nor the names of its con-
+ tributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSE-
+QUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAM-
+AGE.
+
+3.2.4 Theodore Ts'o.
+
+Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All rights
+reserved.
+
+Redistribution and use in source and binary forms, with or without modifica-
+tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ and the entire permission notice in its entirety, including the dis-
+ claimer of warranties.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. he name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+3.2.5 Theo de Raadt and Damien Miller
+
+Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. Copyright (c)
+2001-2002 Damien Miller. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modifica-
+tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
+CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+3.2.6 Todd C. Miller
+
+Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+
+Permission to use, copy, modify, and distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright
+notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MER-
+CHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE FOR ANY
+SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CON-
+TRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+3.2.7 Thomas Winischhofer
+
+Copyright (C) 2001-2004 Thomas Winischhofer
+
+Redistribution and use in source and binary forms, with or without modifica-
+tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
+ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+3.3 NVIDIA Corp
+
+Copyright (c) 1996 NVIDIA, Corp. All rights reserved.
+
+NOTICE TO USER: The source code is copyrighted under U.S. and international
+laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as
+design patents pending on the design and interface of the NV chips. Users
+and possessors of this source code are hereby granted a nonexclusive, roy-
+alty-free copyright and design patent license to use this code in individual
+and commercial software.
+
+Any use of this source code must include, in the user documentation and
+internal comments to the code, notices to the end user as follows:
+
+Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S.
+and foreign countries.
+
+NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
+CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WAR-
+RANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE
+FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAM-
+AGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
+
+3.4 GLX Public License
+
+GLX PUBLIC LICENSE (Version 1.0 (2/11/99)) ("License")
+
+Subject to any third party claims, Silicon Graphics, Inc. ("SGI") hereby
+grants permission to Recipient (defined below), under Recipient's copyrights
+in the Original Software (defined below), to use, copy, modify, merge, pub-
+lish, distribute, sublicense and/or sell copies of Subject Software (defined
+below), and to permit persons to whom the Subject Software is furnished in
+accordance with this License to do the same, subject to all of the following
+terms and conditions, which Recipient accepts by engaging in any such use,
+copying, modifying, merging, publishing, distributing, sublicensing or sell-
+ing:
+
+1. Definitions.
+
+ (a) "Original Software" means source code of computer software code
+ which is described in Exhibit A as Original Software.
+
+ (b) "Modifications" means any addition to or deletion from the sub-
+ stance or structure of either the Original Software or any previous
+ Modifications. When Subject Software is released as a series of
+ files, a Modification means (i) any addition to or deletion from
+ the contents of a file containing Original Software or previous
+ Modifications and (ii) any new file that contains any part of the
+ Original Code or previous Modifications.
+
+ (c) "Subject Software" means the Original Software or Modifications
+ or the combination of the Original Software and Modifications, or
+ portions of any of the foregoing.
+
+ (d) "Recipient" means an individual or a legal entity exercising
+ rights under, and complying with all of the terms of, this License.
+ For legal entities, "Recipient" includes any entity which controls,
+ is controlled by, or is under common control with Recipient. For
+ purposes of this definition, "control" of an entity means (a) the
+ power, direct or indirect, to direct or manage such entity, or (b)
+ ownership of fifty percent (50%) or more of the outstanding shares
+ or beneficial ownership of such entity.
+
+2. Redistribution of Source Code Subject to These Terms. Redistributions of
+Subject Software in source code form must retain the notice set forth in
+Exhibit A, below, in every file. A copy of this License must be included in
+any documentation for such Subject Software where the recipients' rights
+relating to Subject Software are described. Recipient may distribute the
+source code version of Subject Software under a license of Recipient's
+choice, which may contain terms different from this License, provided that
+(i) Recipient is in compliance with the terms of this License, and (ii) the
+license terms include this Section 2 and Sections 3, 4, 7, 8, 10, 12 and 13
+of this License, which terms may not be modified or superseded by any other
+terms of such license. If Recipient distributes the source code version under
+a different license Recipient must make it absolutely clear that any terms
+which differ from this License are offered by Recipient alone, not by SGI.
+Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as
+a result of any such terms Recipient offers.
+
+3. Redistribution in Executable Form. The notice set forth in Exhibit A must
+be conspicuously included in any notice in an executable version of Subject
+Software, related documentation or collateral in which Recipient describes
+the user's rights relating to the Subject Software. Recipient may distribute
+the executable version of Subject Software under a license of Recipient's
+choice, which may contain terms different from this License, provided that
+(i) Recipient is in compliance with the terms of this License, and (ii) the
+license terms include this Section 3 and Sections 4, 7, 8, 10, 12 and 13 of
+this License, which terms may not be modified or superseded by any other
+terms of such license. If Recipient distributes the executable version under
+a different license Recipient must make it absolutely clear that any terms
+which differ from this License are offered by Recipient alone, not by SGI.
+Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as
+a result of any such terms Recipient offers.
+
+4. Termination. This License and the rights granted hereunder will terminate
+automatically if Recipient fails to comply with terms herein and fails to
+cure such breach within 30 days of the breach. Any sublicense to the Subject
+Software which is properly granted shall survive any termination of this
+License absent termination by the terms of such sublicense. Provisions which,
+by their nature, must remain in effect beyond the termination of this License
+shall survive.
+
+5. No Trademark Rights. This License does not grant any rights to use any
+trade name, trademark or service mark whatsoever. No trade name, trademark or
+service mark of SGI may be used to endorse or promote products derived from
+the Subject Software without prior written permission of SGI.
+
+6. No Other Rights. This License does not grant any rights with respect to
+the OpenGL API or to any software or hardware implementation thereof or to
+any other software whatsoever, nor shall any other rights or licenses not
+expressly granted hereunder arise by implication, estoppel or otherwise with
+respect to the Subject Software. Title to and ownership of the Original Soft-
+ware at all times remains with SGI. All rights in the Original Software not
+expressly granted under this License are reserved.
+
+7. Compliance with Laws; Non-Infringement. Recipient shall comply with all
+applicable laws and regulations in connection with use and distribution of
+the Subject Software, including but not limited to, all export and import
+control laws and regulations of the U.S. government and other countries.
+Recipient may not distribute Subject Software that (i) in any way infringes
+(directly or contributorily) the rights (including patent, copyright, trade
+secret, trademark or other intellectual property rights of any kind) of any
+other person or entity or (ii) breaches any representation or warranty,
+express, implied or statutory, which under any applicable law it might be
+deemed to have been distributed.
+
+8. Claims of Infringement. If Recipient at any time has knowledge of any one
+or more third party claims that reproduction, modification, use, distribu-
+tion, import or sale of Subject Software (including particular functionality
+or code incorporated in Subject Software) infringes the third party's intel-
+lectual property rights, Recipient must place in a well-identified web page
+bearing the title "LEGAL" a description of each such claim and a description
+of the party making each such claim in sufficient detail that a user of the
+Subject Software will know whom to contact regarding the claim. Also, upon
+gaining such knowledge of any such claim, Recipient must conspicuously
+include the URL for such web page in the Exhibit A notice required under Sec-
+tions 2 and 3, above, and in the text of any related documentation, license
+agreement or collateral in which Recipient describes end user's rights relat-
+ing to the Subject Software. If Recipient obtains such knowledge after it
+makes Subject Software available to any other person or entity, Recipient
+shall take other steps (such as notifying appropriate mailing lists or news-
+groups) reasonably calculated to inform those who received the Subject Soft-
+ware that new knowledge has been obtained.
+
+9. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
+LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MER-
+CHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON- INFRINGING. SGI ASSUMES NO
+RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
+PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SER-
+VICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
+ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
+HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THE-
+ORY, WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIA-
+BILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR
+ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
+STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
+THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY
+TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
+NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES,
+SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
+
+11. Indemnity. Recipient shall be solely responsible for damages arising,
+directly or indirectly, out of its utilization of rights under this License.
+Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc.
+from and against any loss, liability, damages, costs or expenses (including
+the payment of reasonable attorneys fees) arising out of Recipient's use,
+modification, reproduction and distribution of the Subject Software or out of
+any representation or warranty made by Recipient.
+
+12. U.S. Government End Users. The Subject Software is a "commercial item"
+consisting of "commercial computer software" as such terms are defined in
+title 48 of the Code of Federal Regulations and all U.S. Government End
+Users acquire only the rights set forth in this License and are subject to
+the terms of this License.
+
+13. Miscellaneous. This License represents the complete agreement concerning
+subject matter hereof. If any provision of this License is held to be unen-
+forceable, such provision shall be reformed so as to achieve as nearly as
+possible the same economic effect as the original provision and the remainder
+of this License will remain in effect. This License shall be governed by and
+construed in accordance with the laws of the United States and the State of
+California as applied to agreements entered into and to be performed entirely
+within California between California residents. Any litigation relating to
+this License shall be subject to the exclusive jurisdiction of the Federal
+Courts of the Northern District of California (or, absent subject matter
+jurisdiction in such courts, the courts of the State of California), with
+venue lying exclusively in Santa Clara County, California, with the losing
+party responsible for costs, including without limitation, court costs and
+reasonable attorneys fees and expenses. The application of the United Nations
+Convention on Contracts for the International Sale of Goods is expressly
+excluded. Any law or regulation which provides that the language of a con-
+tract shall be construed against the drafter shall not apply to this License.
+
+Exhibit A
+
+The contents of this file are subject to Sections 2, 3, 4, 7, 8, 10, 12 and
+13 of the GLX Public License Version 1.0 (the "License"). You may not use
+this file except in compliance with those sections of the License. You may
+obtain a copy of the License at Silicon Graphics, Inc., attn: Legal Services,
+2011 N. Shoreline Blvd., Mountain View, CA 94043 or at
+http://www.sgi.com/software/opensource/glx/license.html.
+
+Software distributed under the License is distributed on an "AS IS" basis.
+ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
+WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-
+INFRINGEMENT. See the License for the specific language governing rights and
+limitations under the License.
+
+The Original Software is GLX version 1.2 source code, released February,
+1999. The developer of the Original Software is Silicon Graphics, Inc. Those
+portions of the Subject Software created by Silicon Graphics, Inc. are Copy-
+right (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
+
+3.5 CID Font Code Public License
+
+CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License")
+
+Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI")
+hereby grants permission to Recipient (defined below), under SGI's copyrights
+in the Original Software (defined below), to use, copy, modify, merge, pub-
+lish, distribute, sublicense and/or sell copies of Subject Software (defined
+below) in both source code and executable form, and to permit persons to whom
+the Subject Software is furnished in accordance with this License to do the
+same, subject to all of the following terms and conditions, which Recipient
+accepts by engaging in any such use, copying, modifying, merging, publica-
+tion, distributing, sublicensing or selling:
+
+1. Definitions.
+
+ a. "Original Software" means source code of computer software code
+ that is described in Exhibit A as Original Software.
+
+ b. "Modifications" means any addition to or deletion from the sub-
+ stance or structure of either the Original Software or any previous
+ Modifications. When Subject Software is released as a series of
+ files, a Modification means (i) any addition to or deletion from
+ the contents of a file containing Original Software or previous
+ Modifications and (ii) any new file that contains any part of the
+ Original Code or previous Modifications.
+
+ c. "Subject Software" means the Original Software or Modifications
+ or the combination of the Original Software and Modifications, or
+ portions of any of the foregoing.
+
+ d. "Recipient" means an individual or a legal entity exercising
+ rights under the terms of this License. For legal entities, "Recip-
+ ient" includes any entity that controls, is controlled by, or is
+ under common control with Recipient. For purposes of this defini-
+ tion, "control" of an entity means (i) the power, direct or indi-
+ rect, to direct or manage such entity, or (ii) ownership of fifty
+ percent (50%) or more of the outstanding shares or beneficial own-
+ ership of such entity.
+
+ e. "Required Notice" means the notice set forth in Exhibit A to
+ this License.
+
+ f. "Accompanying Technology" means any software or other technology
+ that is not a Modification and that is distributed or made publicly
+ available by Recipient with the Subject Software. Separate soft-
+ ware files that do not contain any Original Software or any previ-
+ ous Modification shall not be deemed a Modification, even if such
+ software files are aggregated as part of a product, or in any
+ medium of storage, with any file that does contain Original Soft-
+ ware or any previous Modification.
+
+2. License Terms. All distribution of the Subject Software must be made sub-
+ject to the terms of this License. A copy of this License and the Required
+Notice must be included in any documentation for Subject Software where
+Recipient's rights relating to Subject Software and/or any Accompanying Tech-
+nology are described. Distributions of Subject Software in source code form
+must also include the Required Notice in every file distributed. In addition,
+a ReadMe file entitled "Important Legal Notice" must be distributed with each
+distribution of one or more files that incorporate Subject Software. That
+file must be included with distributions made in both source code and exe-
+cutable form. A copy of the License and the Required Notice must be included
+in that file. Recipient may distribute Accompanying Technology under a
+license of Recipient's choice, which may contain terms different from this
+License, provided that (i) Recipient is in compliance with the terms of this
+License, (ii) such other license terms do not modify or supersede the terms
+of this License as applicable to the Subject Software, (iii) Recipient hereby
+indemnifies SGI for any liability incurred by SGI as a result of the distri-
+bution of Accompanying Technology or the use of other license terms.
+
+3. Termination. This License and the rights granted hereunder will terminate
+automatically if Recipient fails to comply with terms herein and fails to
+cure such breach within 30 days of the breach. Any sublicense to the Subject
+Software that is properly granted shall survive any termination of this
+License absent termination by the terms of such sublicense. Provisions which,
+by their nature, must remain in effect beyond the termination of this License
+shall survive.
+
+4. Trademark Rights. This License does not grant any rights to use any trade
+name, trademark or service mark whatsoever. No trade name, trademark or ser-
+vice mark of SGI may be used to endorse or promote products derived from or
+incorporating any Subject Software without prior written permission of SGI.
+
+5. No Other Rights. No rights or licenses not expressly granted hereunder
+shall arise by implication, estoppel or otherwise. Title to and ownership of
+the Original Software at all times remains with SGI. All rights in the Origi-
+nal Software not expressly granted under this License are reserved.
+
+6. Compliance with Laws; Non-Infringement. Recipient shall comply with all
+applicable laws and regulations in connection with use and distribution of
+the Subject Software, including but not limited to, all export and import
+control laws and regulations of the U.S. government and other countries.
+Recipient may not distribute Subject Software that (i) in any way infringes
+(directly or contributorily) the rights (including patent, copyright, trade
+secret, trademark or other intellectual property rights of any kind) of any
+other person or entity, or (ii) breaches any representation or warranty,
+express, implied or statutory, which under any applicable law it might be
+deemed to have been distributed.
+
+7. Claims of Infringement. If Recipient at any time has knowledge of any one
+or more third party claims that reproduction, modification, use, distribu-
+tion, import or sale of Subject Software (including particular functionality
+or code incorporated in Subject Software) infringes the third party's intel-
+lectual property rights, Recipient must place in a well-identified web page
+bearing the title "LEGAL" a description of each such claim and a description
+of the party making each such claim in sufficient detail that a user of the
+Subject Software will know whom to contact regarding the claim. Also, upon
+gaining such knowledge of any such claim, Recipient must conspicuously
+include the URL for such web page in the Required Notice, and in the text of
+any related documentation, license agreement or collateral in which Recipient
+describes end user's rights relating to the Subject Software. If Recipient
+obtains such knowledge after it makes Subject Software available to any other
+person or entity, Recipient shall take other steps (such as notifying appro-
+priate mailing lists or newsgroups) reasonably calculated to provide such
+knowledge to those who received the Subject Software.
+
+8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
+LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MER-
+CHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO
+RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
+PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SER-
+VICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
+ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
+HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY,
+WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY),
+CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR 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 SUBJECT SOFTWARE OR
+THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT
+ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND
+LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED.
+
+10. Indemnity. Recipient shall be solely responsible for damages arising,
+directly or indirectly, out of its utilization of rights under this License.
+Recipient will defend, indemnify and hold SGI and its successors and assigns
+harmless from and against any loss, liability, damages, costs or expenses
+(including the payment of reasonable attorneys fees) arising out of (Recipi-
+ent's use, modification, reproduction and distribution of the Subject Soft-
+ware or out of any representation or warranty made by Recipient.
+
+11. U.S. Government End Users. The Subject Software is a "commercial item"
+consisting of "commercial computer software" as such terms are defined in
+title 48 of the Code of Federal Regulations and all U.S. Government End Users
+acquire only the rights set forth in this License and are subject to the
+terms of this License.
+
+12. Miscellaneous. This License represents the complete agreement concerning
+subject matter hereof. If any provision of this License is held to be unen-
+forceable by any judicial or administrative authority having proper jurisdic-
+tion with respect thereto, such provision shall be reformed so as to achieve
+as nearly as possible the same economic effect as the original provision and
+the remainder of this License will remain in effect. This License shall be
+governed by and construed in accordance with the laws of the United States
+and the State of California as applied to agreements entered into and to be
+performed entirely within California between California residents. Any liti-
+gation relating to this License shall be subject to the exclusive jurisdic-
+tion of the Federal Courts of the Northern District of California (or, absent
+subject matter jurisdiction in such courts, the courts of the State of Cali-
+fornia), with venue lying exclusively in Santa Clara County, California, with
+the losing party responsible for costs, including without limitation, court
+costs and reasonable attorneys fees and expenses. The application of the
+United Nations Convention on Contracts for the International Sale of Goods is
+expressly excluded. Any law or regulation that provides that the language of
+a contract shall be construed against the drafter shall not apply to this
+License.
+
+Exhibit A
+
+Copyright (c) 1994-1999 Silicon Graphics, Inc.
+
+The contents of this file are subject to the CID Font Code Public License
+Version 1.0 (the "License"). You may not use this file except in compliance
+with the License. You may obtain a copy of the License at Silicon Graphics,
+Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
+or at http://www.sgi.com/software/opensource/cid/license.html
+
+Software distributed under the License is distributed on an "AS IS" basis.
+ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
+WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-
+INFRINGEMENT. See the License for the specific language governing rights and
+limitations under the License.
+
+The Original Software (as defined in the License) is CID font code that was
+developed by Silicon Graphics, Inc. Those portions of the Subject Software
+(as defined in the License) that were created by Silicon Graphics, Inc. are
+Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
+
+[NOTE: When using this text in connection with Subject Software delivered
+solely in object code form, Recipient may replace the words "this file" with
+"this software" in both the first and second sentences.]
+
+3.6 Bitstream Vera Fonts Copyright
+
+The fonts have a generous copyright, allowing derivative works (as long as
+"Bitstream" or "Vera" are not in the names), and full redistribution (so long
+as they are not *sold* by themselves). They can be be bundled, redistributed
+and sold with any software.
+
+The fonts are distributed under the following copyright:
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
+a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of the fonts accompanying this license ("Fonts") and associated documentation
+files (the "Font Software"), to reproduce and distribute the Font Software,
+including without limitation the rights to use, copy, merge, publish, dis-
+tribute, and/or sell copies of the Font Software, and to permit persons to
+whom the Font Software is furnished to do so, subject to the following condi-
+tions:
+
+The above copyright and trademark notices and this permission notice shall be
+included in all copies of one or more of the Font Software typefaces.
+
+The Font Software may be modified, altered, or added to, and in particular
+the designs of glyphs or characters in the Fonts may be modified and addi-
+tional glyphs or characters may be added to the Fonts, only if the fonts are
+renamed to names not containing either the words "Bitstream" or the word
+"Vera".
+
+This License becomes null and void to the extent applicable to Fonts or Font
+Software that has been modified and is distributed under the "Bitstream Vera"
+names.
+
+The Font Software may be sold as part of a larger software package but no
+copy of one or more of the Font Software typefaces may be sold by itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDA-
+TION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GEN-
+ERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
+INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFT-
+WARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome Foundation,
+and Bitstream Inc., shall not be used in advertising or otherwise to promote
+the sale, use or other dealings in this Font Software without prior written
+authorization from the Gnome Foundation or Bitstream Inc., respectively. For
+further information, contact: fonts at gnome dot org.
+
+3.7 Bigelow & Holmes Inc and URW++ GmbH Luxi font license
+
+Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font instruction
+code copyright (c) 2001 by URW++ GmbH. All Rights Reserved. Luxi is a regis-
+tered trademark of Bigelow & Holmes Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of these Fonts and associated documentation files (the "Font Software"), to
+deal in the Font Software, including without limitation the rights to use,
+copy, merge, publish, distribute, sublicense, and/or sell copies of the Font
+Software, and to permit persons to whom the Font Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission notice shall be
+included in all copies of one or more of the Font Software.
+
+The Font Software may not be modified, altered, or added to, and in particu-
+lar the designs of glyphs or characters in the Fonts may not be modified nor
+may additional glyphs or characters be added to the Fonts. This License
+becomes null and void when the Fonts or Font Software have been modified.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BIGELOW & HOLMES INC. OR URW++
+GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GEN-
+ERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
+INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFT-
+WARE.
+
+Except as contained in this notice, the names of Bigelow & Holmes Inc. and
+URW++ GmbH. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Font Software without prior written
+authorization from Bigelow & Holmes Inc. and URW++ GmbH.
+
+For further information, contact:
+
+info@urwpp.de or design@bigelowandholmes.com
+
+ $Id: LICENSE,v 1.3 2004/09/03 23:41:21 kem Exp $
diff --git a/testing/xf86-video-v4l/PKGBUILD b/testing/xf86-video-v4l/PKGBUILD
new file mode 100644
index 000000000..28d1c8c05
--- /dev/null
+++ b/testing/xf86-video-v4l/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 115394 2011-03-17 18:25:56Z andyrtr $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-v4l
+pkgver=0.2.0
+pkgrel=8
+pkgdesc="X.org v4l video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 LICENSE)
+md5sums=('2251ae2a0a905764941cd7b098e85ad1'
+ '7d4d018f6bbff7e42672d1aabc75c5cf')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-vesa/PKGBUILD b/testing/xf86-video-vesa/PKGBUILD
new file mode 100644
index 000000000..d5778d23f
--- /dev/null
+++ b/testing/xf86-video-vesa/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115397 2011-03-17 18:27:20Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-vesa
+pkgver=2.3.0
+pkgrel=5
+pkgdesc="X.org vesa video driver"
+arch=(i686 x86_64)
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('glibc')
+makedepends=('pkgconfig' 'xorg-server-devel')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('4689b7c295d7a8d7326302dafecb812739617134')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xf86-video-voodoo/PKGBUILD b/testing/xf86-video-voodoo/PKGBUILD
new file mode 100644
index 000000000..ea146879f
--- /dev/null
+++ b/testing/xf86-video-voodoo/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 115403 2011-03-17 18:35:27Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-voodoo
+pkgver=1.2.4
+pkgrel=4
+pkgdesc="X.org 3dfx Voodoo1/Voodoo2 2D video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'xf86dgaproto')
+conflicts=('xorg-server<1.10.0')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('7ecd232cc0b7fe507e18e08799791eefa9fdaf48')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/xf86-video-xgi/PKGBUILD b/testing/xf86-video-xgi/PKGBUILD
new file mode 100644
index 000000000..0c06d0615
--- /dev/null
+++ b/testing/xf86-video-xgi/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 115406 2011-03-17 18:37:02Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-xgi
+pkgver=1.6.0
+pkgrel=3
+pkgdesc="X.org XGI video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'glproto' 'mesa' 'xf86dgaproto')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('826f14d6ba799cd2aae9f0c818f84cf8b75f1ddb')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ 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-xgixp/PKGBUILD b/testing/xf86-video-xgixp/PKGBUILD
new file mode 100644
index 000000000..30d34d3a5
--- /dev/null
+++ b/testing/xf86-video-xgixp/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 115409 2011-03-17 18:38:51Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xf86-video-xgixp
+pkgver=1.8.0
+pkgrel=3
+pkgdesc="X.org XGIXP video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'mesa')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('67caeaa4c746572160208fe23c7257f62cb442a3')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/testing/xorg-server/10-quirks.conf b/testing/xorg-server/10-quirks.conf
new file mode 100644
index 000000000..7afad22dc
--- /dev/null
+++ b/testing/xorg-server/10-quirks.conf
@@ -0,0 +1,10 @@
+# Collection of quirks and blacklist/whitelists for specific devices.
+
+
+# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable
+# http://bugs.freedesktop.org/show_bug.cgi?id=22442
+Section "InputClass"
+ Identifier "ThinkPad HDAPS accelerometer blacklist"
+ MatchProduct "ThinkPad HDAPS accelerometer data"
+ Option "Ignore" "on"
+EndSection
diff --git a/testing/xorg-server/PKGBUILD b/testing/xorg-server/PKGBUILD
new file mode 100644
index 000000000..d33d3a62d
--- /dev/null
+++ b/testing/xorg-server/PKGBUILD
@@ -0,0 +1,175 @@
+# $Id: PKGBUILD 117185 2011-03-29 10:38:28Z jgc $
+# 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.10.0.901
+pkgrel=1
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://xorg.freedesktop.org"
+makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto' 'fontsproto' 'videoproto' 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess' 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp')
+options=('!libtool')
+source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
+ xorg-redhat-die-ugly-pattern-die-die-die.patch
+ xvfb-run
+ xvfb-run.1
+ 10-quirks.conf)
+md5sums=('d750cf5f6342b548b7ac2be56e9d1841'
+ '1a336eb22e27cbf443ec5a2ecddfa93c'
+ '52fd3effd80d7bc6c1660d4ecf23d31c'
+ '376c70308715cd2643f7bff936d9934b'
+ 'd4f7dfc6be4ef4e2c6dd7632a9d88abe')
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ # Get rid of the ugly pattern
+ patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch"
+
+ ./configure --prefix=/usr \
+ --enable-ipv6 \
+ --enable-dri \
+ --enable-dmx \
+ --enable-xvfb \
+ --enable-xnest \
+ --enable-composite \
+ --enable-xcsecurity \
+ --enable-xorg \
+ --enable-xephyr \
+ --enable-glx-tls \
+ --enable-kdrive \
+ --enable-install-setuid \
+ --enable-config-udev \
+ --disable-config-dbus \
+ --enable-record \
+ --disable-xfbdev \
+ --disable-xfake \
+ --disable-static \
+ --sysconfdir=/etc/X11 \
+ --localstatedir=/var \
+ --with-xkb-path=/usr/share/X11/xkb \
+ --with-xkb-output=/var/lib/xkb \
+ --with-fontrootdir=/usr/share/fonts # --with-dri-driver-path=/usr/lib/xorg/modules/dri \
+ make
+
+ sed -e 's/^DMX_SUBDIRS =.*/DMX_SUBDIRS =/' \
+ -e 's/^XVFB_SUBDIRS =.*/XVFB_SUBDIRS =/' \
+ -e 's/^XNEST_SUBDIRS =.*/XNEST_SUBDIRS = /' \
+ -e 's/^KDRIVE_SUBDIRS =.*/KDRIVE_SUBDIRS =/' \
+ -i hw/Makefile
+}
+
+package_xorg-server-common() {
+ pkgdesc="Xorg server common files"
+ depends=('xkeyboard-config' 'xorg-xkbcomp' 'xorg-setxkbmap' 'xorg-fonts-misc')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-common"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/xorg-server-common"
+
+ make -C xkb DESTDIR="${pkgdir}" install-data
+
+ install -m755 -d "${pkgdir}/usr/share/man/man1"
+ install -m644 doc/man/Xserver.1 "${pkgdir}/usr/share/man/man1/"
+
+ install -m755 -d "${pkgdir}/usr/lib/xorg"
+ install -m644 dix/protocol.txt "${pkgdir}/usr/lib/xorg/"
+}
+
+package_xorg-server() {
+ pkgdesc="Xorg X server"
+ depends=(libxdmcp libxfont udev libpciaccess libdrm pixman libgcrypt libxau xorg-server-common xf86-input-evdev)
+ backup=('etc/X11/xorg.conf.d/10-evdev.conf' 'etc/X11/xorg.conf.d/10-quirks.conf')
+ provides=('x-server')
+ groups=('xorg')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/etc/X11"
+ mv "${pkgdir}/usr/share/X11/xorg.conf.d" "${pkgdir}/etc/X11/"
+ install -m644 "${srcdir}/10-quirks.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
+
+ rmdir "${pkgdir}/usr/share/X11"
+
+ # Needed for non-mesa drivers, libgl will restore it
+ mv "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" \
+ "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.xorg"
+
+ rm -rf "${pkgdir}/var"
+
+ rm -f "${pkgdir}/usr/share/man/man1/Xserver.1"
+ rm -f "${pkgdir}/usr/lib/xorg/protocol.txt"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server/COPYING"
+
+ rm -rf "${pkgdir}/usr/lib/pkgconfig"
+ rm -rf "${pkgdir}/usr/include"
+ rm -rf "${pkgdir}/usr/share/aclocal"
+}
+
+package_xorg-server-xephyr() {
+ pkgdesc="A nested X server that runs as an X application"
+ depends=(libxfont libgl libgcrypt libxv pixman xorg-server-common)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/hw/kdrive"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xephyr"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xephyr/COPYING"
+}
+
+package_xorg-server-xvfb() {
+ pkgdesc="Virtual framebuffer X server"
+ depends=(libxfont libxdmcp libxau libgcrypt pixman xorg-server-common)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/hw/vfb"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 "${srcdir}/xvfb-run" "${pkgdir}/usr/bin/"
+ install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xvfb"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xvfb/COPYING"
+}
+
+package_xorg-server-xnest() {
+ pkgdesc="A nested X server that runs as an X application"
+ depends=(libxfont libxext libgcrypt pixman xorg-server-common)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/hw/xnest"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xnest"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xnest/COPYING"
+}
+
+package_xorg-server-xdmx() {
+ pkgdesc="Distributed Multihead X Server and utilities"
+ depends=(libxfont libxi libgcrypt libxaw libxrender libdmx libxfixes pixman xorg-server-common)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/hw/dmx"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xdmx"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xdmx/COPYING"
+}
+
+package_xorg-server-devel() {
+ pkgdesc="Development files for the X.Org X server"
+ depends=(xproto randrproto renderproto xextproto inputproto kbproto fontsproto videoproto dri2proto xineramaproto xorg-util-macros pixman libpciaccess)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ rm -rf "${pkgdir}/usr/bin"
+ rm -rf "${pkgdir}/usr/share/man"
+ rm -rf "${pkgdir}/usr/share/doc"
+ rm -rf "${pkgdir}/usr/share/X11"
+ rm -rf "${pkgdir}/usr/lib/xorg"
+ rm -rf "${pkgdir}/var"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-devel"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-devel/COPYING"
+}
diff --git a/testing/xorg-server/xorg-redhat-die-ugly-pattern-die-die-die.patch b/testing/xorg-server/xorg-redhat-die-ugly-pattern-die-die-die.patch
new file mode 100644
index 000000000..4e782f1c6
--- /dev/null
+++ b/testing/xorg-server/xorg-redhat-die-ugly-pattern-die-die-die.patch
@@ -0,0 +1,16 @@
+Remove the default root window grey stipple pattern, replacing it with
+blackness.
+
+--- xc/programs/Xserver/dix/window.c.die-ugly-pattern-die-die-die Tue Feb 12 16:33:04 2002
++++ xc/programs/Xserver/dix/window.c Tue Feb 12 16:45:32 2002
+@@ -119,8 +119,8 @@
+ *
+ ******/
+
+-static unsigned char _back_lsb[4] = {0x88, 0x22, 0x44, 0x11};
+-static unsigned char _back_msb[4] = {0x11, 0x44, 0x22, 0x88};
++static unsigned char _back_lsb[4] = {0x00, 0x00, 0x00, 0x00};
++static unsigned char _back_msb[4] = {0x00, 0x00, 0x00, 0x00};
+
+ int screenIsSaved = SCREEN_SAVER_OFF;
+
diff --git a/testing/xorg-server/xvfb-run b/testing/xorg-server/xvfb-run
new file mode 100644
index 000000000..4c2f4e0d3
--- /dev/null
+++ b/testing/xorg-server/xvfb-run
@@ -0,0 +1,180 @@
+#!/bin/sh
+
+# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
+
+# This script starts an instance of Xvfb, the "fake" X server, runs a command
+# with that server available, and kills the X server when done. The return
+# value of the command becomes the return value of this script.
+#
+# If anyone is using this to build a Debian package, make sure the package
+# Build-Depends on xvfb, xbase-clients, and xfonts-base.
+
+set -e
+
+PROGNAME=xvfb-run
+SERVERNUM=99
+AUTHFILE=
+ERRORFILE=/dev/null
+STARTWAIT=3
+XVFBARGS="-screen 0 640x480x8"
+LISTENTCP="-nolisten tcp"
+XAUTHPROTO=.
+
+# Query the terminal to establish a default number of columns to use for
+# displaying messages to the user. This is used only as a fallback in the event
+# the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while the
+# script is running, and this cannot, only being calculated once.)
+DEFCOLUMNS=$(stty size 2>/dev/null | awk '{print $2}') || true
+if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" >/dev/null 2>&1; then
+ DEFCOLUMNS=80
+fi
+
+# Display a message, wrapping lines at the terminal width.
+message () {
+ echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS}
+}
+
+# Display an error message.
+error () {
+ message "error: $*" >&2
+}
+
+# Display a usage message.
+usage () {
+ if [ -n "$*" ]; then
+ message "usage error: $*"
+ fi
+ cat <<EOF
+Usage: $PROGNAME [OPTION ...] COMMAND
+Run COMMAND (usually an X client) in a virtual X server environment.
+Options:
+-a --auto-servernum try to get a free server number, starting at
+ --server-num
+-e FILE --error-file=FILE file used to store xauth errors and Xvfb
+ output (default: $ERRORFILE)
+-f FILE --auth-file=FILE file used to store auth cookie
+ (default: ./.Xauthority)
+-h --help display this usage message and exit
+-n NUM --server-num=NUM server number to use (default: $SERVERNUM)
+-l --listen-tcp enable TCP port listening in the X server
+-p PROTO --xauth-protocol=PROTO X authority protocol name to use
+ (default: xauth command's default)
+-s ARGS --server-args=ARGS arguments (other than server number and
+ "-nolisten tcp") to pass to the Xvfb server
+ (default: "$XVFBARGS")
+-w DELAY --wait=DELAY delay in seconds to wait for Xvfb to start
+ before running COMMAND (default: $STARTWAIT)
+EOF
+}
+
+# Find a free server number by looking at .X*-lock files in /tmp.
+find_free_servernum() {
+ # Sadly, the "local" keyword is not POSIX. Leave the next line commented in
+ # the hope Debian Policy eventually changes to allow it in /bin/sh scripts
+ # anyway.
+ #local i
+
+ i=$SERVERNUM
+ while [ -f /tmp/.X$i-lock ]; do
+ i=$(($i + 1))
+ done
+ echo $i
+}
+
+# Clean up files
+clean_up() {
+ if [ -e "$AUTHFILE" ]; then
+ XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >>"$ERRORFILE" 2>&1
+ fi
+ if [ -n "$XVFB_RUN_TMPDIR" ]; then
+ if ! rm -r "$XVFB_RUN_TMPDIR"; then
+ error "problem while cleaning up temporary directory"
+ exit 5
+ fi
+ fi
+}
+
+# Parse the command line.
+ARGS=$(getopt --options +ae:f:hn:lp:s:w: \
+ --long auto-servernum,error-file:,auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \
+ --name "$PROGNAME" -- "$@")
+GETOPT_STATUS=$?
+
+if [ $GETOPT_STATUS -ne 0 ]; then
+ error "internal error; getopt exited with status $GETOPT_STATUS"
+ exit 6
+fi
+
+eval set -- "$ARGS"
+
+while :; do
+ case "$1" in
+ -a|--auto-servernum) SERVERNUM=$(find_free_servernum) ;;
+ -e|--error-file) ERRORFILE="$2"; shift ;;
+ -f|--auth-file) AUTHFILE="$2"; shift ;;
+ -h|--help) SHOWHELP="yes" ;;
+ -n|--server-num) SERVERNUM="$2"; shift ;;
+ -l|--listen-tcp) LISTENTCP="" ;;
+ -p|--xauth-protocol) XAUTHPROTO="$2"; shift ;;
+ -s|--server-args) XVFBARGS="$2"; shift ;;
+ -w|--wait) STARTWAIT="$2"; shift ;;
+ --) shift; break ;;
+ *) error "internal error; getopt permitted \"$1\" unexpectedly"
+ exit 6
+ ;;
+ esac
+ shift
+done
+
+if [ "$SHOWHELP" ]; then
+ usage
+ exit 0
+fi
+
+if [ -z "$*" ]; then
+ usage "need a command to run" >&2
+ exit 2
+fi
+
+if ! which xauth >/dev/null; then
+ error "xauth command not found"
+ exit 3
+fi
+
+# tidy up after ourselves
+trap clean_up EXIT
+
+# If the user did not specify an X authorization file to use, set up a temporary
+# directory to house one.
+if [ -z "$AUTHFILE" ]; then
+ XVFB_RUN_TMPDIR="$(mktemp -d -t $PROGNAME.XXXXXX)"
+ AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority"
+fi
+
+# Start Xvfb.
+MCOOKIE=$(mcookie)
+XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1
+add :$SERVERNUM $XAUTHPROTO $MCOOKIE
+EOF
+XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" \
+ 2>&1 &
+XVFBPID=$!
+sleep "$STARTWAIT"
+if ! kill -0 $XVFBPID 2>/dev/null; then
+ echo "Xvfb failed to start" >&2
+ exit 1
+fi
+
+# Start the command and save its exit status.
+set +e
+DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
+RETVAL=$?
+set -e
+
+# Kill Xvfb now that the command has exited.
+kill $XVFBPID
+
+# Return the executed command's exit status.
+exit $RETVAL
+
+# vim:set ai et sts=4 sw=4 tw=80:
diff --git a/testing/xorg-server/xvfb-run.1 b/testing/xorg-server/xvfb-run.1
new file mode 100644
index 000000000..137d3a196
--- /dev/null
+++ b/testing/xorg-server/xvfb-run.1
@@ -0,0 +1,282 @@
+.\" $Id: xvfb-run.1 2138 2005-01-17 23:40:27Z branden $
+.\"
+.\" Copyright 1998-2004 Branden Robinson <branden@debian.org>.
+.\"
+.\" This is free software; you may redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2,
+.\" or (at your option) any later version.
+.\"
+.\" This is distributed in the hope that it will be useful, but
+.\" WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License with
+.\" the Debian operating system, in /usr/share/common-licenses/GPL; if
+.\" not, write to the Free Software Foundation, Inc., 59 Temple Place,
+.\" Suite 330, Boston, MA 02111-1307 USA
+.\"
+.\" We need the URL macro from groff's www macro package, but also want
+.\" things to work all right for people who don't have it. So we define
+.\" our own URL macro and let the www macro package override it if it's
+.\" available.
+.de URL
+\\$2 \(laURL: \\$1 \(ra\\$3
+..
+.if \n[.g] .mso www.tmac
+.TH xvfb\-run 1 "2004\-11\-12" "Debian Project"
+.SH NAME
+xvfb\-run \- run specified X client or command in a virtual X server environment
+.SH SYNOPSIS
+.B xvfb\-run
+[
+.I options
+]
+.I command
+.SH DESCRIPTION
+.B xvfb\-run
+is a wrapper for the
+.BR Xvfb (1x)
+command which simplifies the task of running commands (typically an X
+client, or a script containing a list of clients to be run) within a virtual
+X server environment.
+.PP
+.B xvfb\-run
+sets up an X authority file (or uses an existing user\-specified one),
+writes a cookie to it (see
+.BR xauth (1x))
+and then starts the
+.B Xvfb
+X server as a background process.
+The process ID of
+.B Xvfb
+is stored for later use.
+The specified
+.I command
+is then run using the X display corresponding to the
+.B Xvfb
+server
+just started and the X authority file created earlier.
+.PP
+When the
+.I command
+exits, its status is saved, the
+.B Xvfb
+server is killed (using the process ID stored earlier), the X authority
+cookie removed, and the authority file deleted (if the user did not specify
+one to use).
+.B xvfb\-run
+then exits with the exit status of
+.IR command .
+.PP
+.B xvfb\-run
+requires the
+.B xauth
+command to function.
+.SH OPTIONS
+.TP
+.B \-a\fR,\fB \-\-auto\-servernum
+Try to get a free server number, starting at 99, or the argument to
+.BR \-\-server\-num .
+.TP
+.BI \-e\ file \fR,\fB\ \-\-error\-file= file
+Store output from
+.B xauth
+and
+.B Xvfb
+in
+.IR file .
+The default is
+.IR /dev/null .
+.TP
+.BI \-f\ file \fR,\fB\ \-\-auth\-file= file
+Store X authentication data in
+.IR file .
+By default, a temporary directory called
+.IR xvfb\-run. PID
+(where PID is the process ID of
+.B xvfb\-run
+itself) is created in the directory specified by the environment variable
+.B TMPDIR
+(or
+.I /tmp
+if that variable is null or unset), and the
+.BR tempfile (1)
+command is used to create a file in that temporary directory called
+.IR Xauthority .
+.TP
+.B \-h\fR,\fB \-\-help
+Display a usage message and exit.
+.TP
+.BI \-n\ servernumber \fR,\fB\ \-\-server\-num= servernumber
+Use
+.I servernumber
+as the server number (but see the
+.B \-a\fR,\fB \-\-auto\-servernum
+option above).
+The default is 99.
+.TP
+.B \-l\fR,\fB \-\-listen\-tcp
+Enable TCP port listening in the X server.
+For security reasons (to avoid denial\-of\-service attacks or exploits),
+TCP port listening is disabled by default.
+.TP
+.BI \-p\ protocolname \fR,\fB\ \-\-xauth\-protocol= protocolname
+Use
+.I protocolname
+as the X authority protocol to use.
+The default is \(oq.\(cq, which
+.B xauth
+interprets as its own default protocol, which is MIT\-MAGIC\-COOKIE\-1.
+.TP
+.BI \-s\ arguments \fR,\fB\ \-\-server\-args= arguments
+Pass
+.I arguments
+to the
+.B Xvfb
+server.
+Be careful to quote any whitespace characters that may occur within
+.I arguments
+to prevent them from regarded as separators for
+.BR xvfb\-run 's
+own arguments.
+Also, note that specification of \(oq\-nolisten tcp\(cq in
+.I arguments
+may override the function of
+.BR xvfb\-run 's
+own
+.B \-l\fR,\fB \-\-listen\-tcp
+option, and that specification of the server number (e.g., \(oq:1\(cq) may
+be ignored because of the way the X server parses its argument list.
+Use the
+.B xvfb\-run
+option
+.BI \-n\ servernumber \fR,\fB\ \-\-server\-num= servernumber
+to achieve the latter function.
+The default is \(oq\-screen 0 640x480x8\(cq.
+.TP
+.BI \-w\ delay \fR,\fB\ \-\-wait= delay
+Wait
+.I delay
+seconds after launching
+.B Xvfb
+before attempting to start the specified command.
+The default is 3.
+.SH ENVIRONMENT
+.TP
+.B COLUMNS
+indicates the width of the terminal device in character cells.
+This value is used for formatting diagnostic messages.
+If not set, the terminal is queried using
+.BR stty (1)
+to determine its width.
+If that fails, a value of \(oq80\(cq is assumed.
+.TP
+.B TMPDIR
+specifies the directory in which to place
+.BR xvfb\-run 's
+temporary directory for storage of the X authority file; only used if the
+.B \-f
+or
+.B \-\-auth\-file
+options are not specified.
+.SH "OUTPUT FILES"
+.PP
+Unless the
+.B \-f
+or
+.B \-\-auth\-file
+options are specified, a temporary
+directory and file within it are created (and deleted) to store the X
+authority cookies used by the
+.B Xvfb
+server and client(s) run under it.
+See
+.BR tempfile (1).
+If \-f or \-\-auth\-file are used, then the specified X authority file is
+only written to, not created or deleted (though
+.B xauth
+creates an authority file itself if told to use use that does not already
+exist).
+.PP
+An error file with a user\-specified name is also created if the
+.B \-e
+or
+.B \-\-error\-file
+options are specifed; see above.
+.SH "EXIT STATUS"
+.B xvfb\-run
+uses its exit status as well as output to standard error to communicate
+diagnostics.
+The exit status of \(oq1\(cq is not used, and should be interpreted as failure
+of the specified command.
+.TP
+0
+.B xvfb\-run
+only uses this exit status if the
+.B \-h\fR,\fB \-\-help
+option is given.
+In all other situations, this may be interpreted as success of the specified
+command.
+.TP
+2
+No command to run was specified.
+.TP
+3
+The
+.B xauth
+command is not available.
+.TP
+4
+The temporary directory that was going to be used already exists; since
+.B xvfb\-run
+produces a uniquely named directory, this may indicate an attempt by another
+process on the system to exploit a temporary file race condition.
+.TP
+5
+A problem was encountered while cleaning up the temporary directory.
+.TP
+6
+A problem was encountered while using
+.BR getopt (1)
+to parse the command\-line arguments.
+.SH EXAMPLES
+.TP
+.B xvfb\-run \-\-auto\-servernum \-\-server\-num=1 xlogo
+runs the
+.BR xlogo (1x)
+demonstration client inside the
+.B Xvfb
+X server on the first available server number greater than or equal to 1.
+.TP
+.B xvfb\-run \-\-server\-args="\-screen 0 1024x768x24" ico \-faces
+runs the
+.BR ico (1x)
+demonstration client (and passes it the
+.B \-faces
+argument) inside the
+.B Xvfb
+X server, configured with a root window of 1024 by 768 pixels and a color
+depth of 24 bits.
+.PP
+Note that the demo X clients used in the above examples will not exit on
+their own, so they will have to be killed before
+.B xvfb\-run
+will exit.
+.SH BUGS
+See
+.URL "http://bugs.debian.org/xvfb" "the Debian Bug Tracking System" .
+If you wish to report a bug in
+.BR xvfb\-run ,
+please use the
+.BR reportbug (1)
+command.
+.SH AUTHOR
+.B xfvb\-run
+was written by Branden Robinson and Jeff Licquia with sponsorship from
+Progeny Linux Systems.
+.SH "SEE ALSO"
+.BR Xvfb (1x),
+.BR xauth (1x)
+.\" vim:set et tw=80:
diff --git a/testing/xz/PKGBUILD b/testing/xz/PKGBUILD
new file mode 100644
index 000000000..3f85f5aa0
--- /dev/null
+++ b/testing/xz/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 117397 2011-04-01 14:53:10Z pierre $
+# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+# Contributor: François Charette <firmicus@gmx.net>
+
+pkgname=xz
+pkgver=5.0.2
+pkgrel=1
+pkgdesc='Library and command line tools for XZ and LZMA compressed files'
+arch=('i686' 'x86_64')
+url='http://tukaani.org/xz/'
+license=('GPL' 'LGPL' 'custom')
+depends=('sh')
+provides=('lzma' 'lzma-utils' 'xz-utils')
+replaces=('lzma' 'lzma-utils' 'xz-utils')
+conflicts=('lzma' 'lzma-utils' 'xz-utils')
+options=('!libtool')
+source=("http://tukaani.org/${pkgname}/${pkgname}-${pkgver}.tar.xz")
+md5sums=('870d0e6fec3b710903371defb48a2fad')
+
+# keep an upgrade path for older installations
+PKGEXT='.pkg.tar.gz'
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ ./configure --prefix=/usr \
+ --disable-rpath \
+ --enable-werror
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+ install -d -m755 ${pkgdir}/usr/share/licenses/xz/
+ ln -sf /usr/share/doc/xz/COPYING ${pkgdir}/usr/share/licenses/xz/
+ ln -sf /usr/share/licenses/common/GPL2/license.txt ${pkgdir}/usr/share/doc/xz/COPYING.GPLv2
+}