diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-11-21 14:44:37 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-11-21 14:44:37 -0300 |
commit | 9d6dd0a34cb8bd599c4d06c54dbd247ede60267f (patch) | |
tree | cc7662c9e2eda6f7e3b3b0fb3b7c094e4fa54d0b /testing | |
parent | fe0996f2e8716b772785a0bf93c6a3f2d5dc22ff (diff) | |
parent | 70b4878648fd376433739bd5c835503f6301a5b2 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/avifile/PKGBUILD
community/blackbox/PKGBUILD
community/blobby2/PKGBUILD
community/chmsee/PKGBUILD
community/extrema/PKGBUILD
community/floyd/PKGBUILD
community/gnash/PKGBUILD
community/gq/PKGBUILD
community/gsql/PKGBUILD
community/haddock/PKGBUILD
community/hashcash/PKGBUILD
community/kvpnc/PKGBUILD
community/uptimed/PKGBUILD
community/wol/PKGBUILD
core/jfsutils/PKGBUILD
core/reiserfsprogs/PKGBUILD
extra/gtk2/PKGBUILD
extra/libcroco/PKGBUILD
extra/libffado/PKGBUILD
extra/librsvg/PKGBUILD
extra/lua/PKGBUILD
extra/mesa/PKGBUILD
extra/valgrind/PKGBUILD
extra/xorg-server/PKGBUILD
libre/audacious-plugins-libre/PKGBUILD
libre/texlive-bin-libre/PKGBUILD
multilib/lib32-gtk2/PKGBUILD
multilib/lib32-mesa/PKGBUILD
multilib/wine/PKGBUILD
multilib/wine_gecko/PKGBUILD
Diffstat (limited to 'testing')
49 files changed, 2497 insertions, 8 deletions
diff --git a/testing/aisleriot/PKGBUILD b/testing/aisleriot/PKGBUILD new file mode 100644 index 000000000..7e0cb0321 --- /dev/null +++ b/testing/aisleriot/PKGBUILD @@ -0,0 +1,36 @@ +# $Id: PKGBUILD 142800 2011-11-15 14:17:38Z ibiru $ +# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com> + +pkgname=aisleriot +pkgver=3.2.2 +pkgrel=1 +pkgdesc="GNOME Solitaire card games" +arch=(i686 x86_64) +license=(GPL) +url="http://www.gnome.org" +groups=('gnome-extra') +depends=(libsm gconf guile libcanberra librsvg hicolor-icon-theme dconf) +makedepends=(gnome-doc-utils intltool itstool) +options=('!emptydirs' '!libtool') +install=aisleriot.install +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('818e16767f30238a98332fe07e8b905376a71de05feb3de19815652a48fdfcca') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/usr/share/gconf/schemas" + gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain aisleriot ${pkgdir}/etc/gconf/schemas/*.schemas + rm -f ${pkgdir}/etc/gconf/schemas/*.schemas +} diff --git a/testing/aisleriot/aisleriot.install b/testing/aisleriot/aisleriot.install new file mode 100644 index 000000000..713506dba --- /dev/null +++ b/testing/aisleriot/aisleriot.install @@ -0,0 +1,22 @@ +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + usr/sbin/gconfpkg --install aisleriot +} + +pre_upgrade() { + pre_remove +} + +post_upgrade() { + post_install +} + +pre_remove() { + usr/sbin/gconfpkg --uninstall aisleriot +} + +post_remove() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + gtk-update-icon-cache -q -f -t usr/share/icons/hicolor +} diff --git a/testing/curl/PKGBUILD b/testing/curl/PKGBUILD new file mode 100644 index 000000000..0e40bfe8e --- /dev/null +++ b/testing/curl/PKGBUILD @@ -0,0 +1,64 @@ +# $Id: PKGBUILD 142904 2011-11-17 21:30:16Z dreisner $ +# Maintainer: Dave Reisner <dreisner@archlinux.org> +# Contributor: Angel Velasquez <angvp@archlinux.org> +# Contributor: Eric Belanger <eric@archlinux.org> +# Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl> +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> + +pkgname=curl +pkgver=7.23.1 +pkgrel=1 +pkgdesc="An URL retrival utility and library" +arch=('i686' 'x86_64') +url="http://curl.haxx.se" +license=('MIT') +depends=('ca-certificates' 'libssh2' 'openssl' 'zlib') +makedepends=('perl-libwww') +options=('!libtool') +source=("http://curl.haxx.se/download/$pkgname-$pkgver.tar.gz"{,.asc} + curlbuild.h) +md5sums=('8e23151f569fb54afef093ac0695077d' + '5d8eb7e2e38be0fb00a043f714f6d49f' + '751bd433ede935c8fae727377625a8ae') + +ptrsize=$(cpp <<<'__SIZEOF_POINTER__' | sed '/^#/d') +case $ptrsize in + 8) _curlbuild=curlbuild-64.h ;; + 4) _curlbuild=curlbuild-32.h ;; + *) error "unknown pointer size for architecture: %s bytes" "$ptrsize" + exit 1 + ;; +esac + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --disable-dependency-tracking \ + --disable-ldap \ + --disable-ldaps \ + --enable-ipv6 \ + --enable-manual \ + --enable-versioned-symbols \ + --enable-threaded-resolver \ + --without-libidn \ + --with-random=/dev/urandom \ + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install + + # license + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" + + # devel + install -Dm644 docs/libcurl/libcurl.m4 "$pkgdir/usr/share/aclocal/libcurl.m4" + mv "$pkgdir/usr/include/curl/curlbuild.h" "$pkgdir/usr/include/curl/$_curlbuild" + install -m644 "$srcdir/curlbuild.h" "$pkgdir/usr/include/curl/curlbuild.h" +} diff --git a/testing/curl/curlbuild.h b/testing/curl/curlbuild.h new file mode 100644 index 000000000..b48862696 --- /dev/null +++ b/testing/curl/curlbuild.h @@ -0,0 +1,9 @@ +#include <bits/wordsize.h> + +#if __WORDSIZE == 32 +#include "curlbuild-32.h" +#elif __WORDSIZE == 64 +#include "curlbuild-64.h" +#else +#error "Unknown word size" +#endif diff --git a/testing/empathy/PKGBUILD b/testing/empathy/PKGBUILD new file mode 100644 index 000000000..e110edd83 --- /dev/null +++ b/testing/empathy/PKGBUILD @@ -0,0 +1,41 @@ +# $Id: PKGBUILD 142759 2011-11-14 21:14:45Z ibiru $ +# Maintainer: Ionut Biru <ibiru@archlinux.org> + +pkgname=empathy +pkgver=3.2.2 +pkgrel=1 +pkgdesc="A GNOME instant messaging client using the Telepathy framework." +arch=('i686' 'x86_64') +url="http://live.gnome.org/Empathy" +license=('GPL2') +depends=('libpulse' 'clutter-gtk' 'clutter-gst' 'telepathy-mission-control' 'telepathy-logger' 'telepathy-farsight' 'telepathy-farstream' 'folks' 'gnome-keyring' +'libcanberra' 'iso-codes' 'networkmanager') +makedepends=('intltool' 'gnome-doc-utils' 'nautilus-sendto') +optdepends=('telepathy-gabble: XMPP/Jabber support' + 'telepathy-butterfly: MSN support' + 'telepathy-idle: IRC support' + 'telepathy-salut: Link-local XMPP support' + 'telepathy-sofiasip: SIP support' + 'telepathy-haze: libpurple support') +options=('!libtool') +groups=('gnome-extra') +install=empathy.install +source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/3.2/$pkgname-$pkgver.tar.xz) +sha256sums=('d6a391b801f58024ed6f97d9bf4e774b9ab9e1262d79aefb5c1dd95233fd5aa1') + +build() { + cd "$srcdir/$pkgname-$pkgver" + PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib/empathy \ + --disable-static \ + --disable-scrollkeeper \ + --disable-schemas-compile + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/testing/empathy/empathy.install b/testing/empathy/empathy.install new file mode 100644 index 000000000..c3f7abf13 --- /dev/null +++ b/testing/empathy/empathy.install @@ -0,0 +1,18 @@ +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + echo "To use Empathy you need to install at least one Telepathy connection manager." +} + +post_upgrade() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_remove() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} diff --git a/testing/eog/PKGBUILD b/testing/eog/PKGBUILD new file mode 100644 index 000000000..dc1d2fd08 --- /dev/null +++ b/testing/eog/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 142770 2011-11-14 21:40:57Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=eog +pkgver=3.2.2 +pkgrel=1 +pkgdesc="Eye of Gnome: An image viewing and cataloging program" +arch=('i686' 'x86_64') +license=('GPL') +depends=('gnome-desktop' 'libexif' 'lcms2' 'desktop-file-utils' 'exempi' 'libpeas' 'librsvg' 'gnome-icon-theme' 'dconf') +makedepends=('gtk-doc' 'intltool') +install=eog.install +groups=('gnome-extra') +options=('!emptydirs' '!libtool') +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('315625babf04293341bd0b3ae26337d11c8696422d5dc4442ad551b25db42530') + +build() { + cd "$srcdir/$pkgname-$pkgver" + PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-scrollkeeper + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + # remove it from Xfce menu that ships its own thingy + echo "NotShowIn=XFCE" >> $pkgdir/usr/share/applications/eog.desktop +} diff --git a/testing/eog/eog.install b/testing/eog/eog.install new file mode 100644 index 000000000..284b24b18 --- /dev/null +++ b/testing/eog/eog.install @@ -0,0 +1,19 @@ +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +pre_upgrade() { + if (( $(vercmp $2 2.90.0) < 0 )); then + usr/sbin/gconfpkg --uninstall eog + fi +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/testing/evolution-data-server/PKGBUILD b/testing/evolution-data-server/PKGBUILD new file mode 100644 index 000000000..1975c38be --- /dev/null +++ b/testing/evolution-data-server/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 142742 2011-11-14 12:31:16Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=evolution-data-server +pkgver=3.2.2 +pkgrel=1 +pkgdesc="Centralized access to appointments and contacts" +arch=('i686' 'x86_64') +depends=('gconf' 'gnome-online-accounts' 'nss' 'krb5' 'libgweather' 'libical' 'db' 'libgdata') +makedepends=('intltool' 'gperf' 'gobject-introspection' 'vala') +options=('!libtool') +url="http://www.gnome.org" +license=('GPL') +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/3.2/${pkgname}-${pkgver}.tar.xz) +sha256sums=('2a129b4c9412b8b855ce28bd682e522b3af0309e407f9d900f1d48be649bc76a') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --with-openldap=yes \ + --libexecdir=/usr/lib/evolution-data-server \ + --with-krb5=/usr --with-libdb=/usr \ + --enable-vala-bindings + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/testing/evolution-ews/PKGBUILD b/testing/evolution-ews/PKGBUILD new file mode 100644 index 000000000..dfe853955 --- /dev/null +++ b/testing/evolution-ews/PKGBUILD @@ -0,0 +1,27 @@ +# $Id: PKGBUILD 142748 2011-11-14 13:31:05Z ibiru $ +# Maintainer: Ionut Biru <ibiru@archlinux.org> + +pkgname=evolution-ews +pkgver=3.2.2 +pkgrel=1 +pkgdesc="MS Exchange integration through Exchange Web Services" +arch=('i686' 'x86_64') +license=('LGPL2.1') +url="http://www.gnome.org" +depends=('evolution-data-server' 'gtkhtml4' 'gnome-desktop') +makedepends=('intltool' 'evolution') +options=('!libtool' '!emptydirs') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('f6a557a93e632e19cde1501f6f0540f67e41c193120d7297268662ddc7927439') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libexecdir=/usr/lib/evolution --disable-static + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/testing/evolution/PKGBUILD b/testing/evolution/PKGBUILD new file mode 100644 index 000000000..599ce0284 --- /dev/null +++ b/testing/evolution/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 142744 2011-11-14 13:03:36Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=evolution +pkgver=3.2.2 +pkgrel=1 +pkgdesc="Manage your email, contacts and schedule" +arch=('i686' 'x86_64') +license=('GPL') +depends=('gnome-desktop' 'evolution-data-server' 'gtkhtml4' 'libcanberra' 'gstreamer0.10' 'libpst' 'libytnef' 'desktop-file-utils' 'hicolor-icon-theme') +makedepends=('intltool' 'gnome-doc-utils' 'networkmanager') +optdepends=('bogofilter: possible junk filter plugin' + 'spamassassin: possible junk filter plugin') +groups=('gnome-extra') +options=('!libtool' '!emptydirs') +install=evolution.install +url=http://www.gnome.org/projects/evolution/ +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz) +sha256sums=('03c68242bbf494dda3bf34f52ec843c282c9bb07f9415a69fe58237c7efbbe7d') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib \ + --disable-scrollkeeper \ + --enable-nss=yes \ + --with-openldap=yes \ + --enable-smime=yes \ + --with-krb5=/usr \ + --disable-image-inline + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool + make + make -C plugins/tnef-attachments +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + make -C plugins/tnef-attachments DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/usr/share/gconf/schemas" + gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain evolution-3.2 ${pkgdir}/etc/gconf/schemas/*.schemas + rm -f ${pkgdir}/etc/gconf/schemas/*.schemas +} diff --git a/testing/evolution/evolution.install b/testing/evolution/evolution.install new file mode 100644 index 000000000..a2c3aaa54 --- /dev/null +++ b/testing/evolution/evolution.install @@ -0,0 +1,24 @@ +pkgname=evolution + +post_install() { + usr/sbin/gconfpkg --install ${pkgname} + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +pre_upgrade() { + pre_remove $1 +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + usr/sbin/gconfpkg --uninstall ${pkgname} +} + +post_remove() { + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} diff --git a/testing/gedit/PKGBUILD b/testing/gedit/PKGBUILD new file mode 100644 index 000000000..76b4571ad --- /dev/null +++ b/testing/gedit/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 142821 2011-11-15 17:49:57Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gedit +pkgver=3.2.3 +pkgrel=1 +pkgdesc="A text editor for GNOME" +arch=('i686' 'x86_64') +license=('GPL') +depends=('gtksourceview3' 'gsettings-desktop-schemas' 'libpeas' 'enchant' 'iso-codes' 'libsm' 'desktop-file-utils' 'python2-gobject' 'dconf') +makedepends=('gnome-doc-utils' 'intltool') +groups=('gnome-extra') +options=('!libtool' '!emptydirs') +url="http://www.gnome.org" +install=gedit.install +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('9db009de74874846edadc0f4a7dc0127a4272cff4348a13544c611cc3696b751') + +build() { + cd "$srcdir/$pkgname-$pkgver" + PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ + --sysconfdir=/etc --localstatedir=/var \ + --libexecdir=/usr/lib --disable-scrollkeeper \ + --disable-updater --disable-schemas-compile \ + --enable-python + make +} + +package(){ + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/testing/gedit/gedit.install b/testing/gedit/gedit.install new file mode 100644 index 000000000..9d88a1341 --- /dev/null +++ b/testing/gedit/gedit.install @@ -0,0 +1,18 @@ +post_install() { + glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q +} + +pre_upgrade() { + if [ -f usr/share/gconf/schemas/gedit.schemas ]; then + usr/sbin/gconfpkg --uninstall gedit + fi +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/testing/ghc/PKGBUILD b/testing/ghc/PKGBUILD new file mode 100644 index 000000000..aef26d06e --- /dev/null +++ b/testing/ghc/PKGBUILD @@ -0,0 +1,43 @@ +# $Id: PKGBUILD 142984 2011-11-19 18:41:40Z vesa $ +# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org> +# Special note for devs looking to upgrade this package: +# ghc places a unique hash for each library when it is built. +# Libraries depend on versions specified by those hashes. +# This implies that all libraries need to be rebuilt when ghc is rebuilt. +# Also, due to dependency loop problems, haskell-ghc-paths and haddock +# do not carry version dependencies. You will have to remember to build them too. +pkgname=ghc +pkgver=7.2.2 +pkgrel=1 +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) +install=ghc.install +options=(!strip) +groups=(haskell) +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 + + ./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 +} + +md5sums=('fa19d9fe5049b7a1352b0b7c9880c141' + '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/gnome-keyring/PKGBUILD b/testing/gnome-keyring/PKGBUILD new file mode 100644 index 000000000..2e1ceae52 --- /dev/null +++ b/testing/gnome-keyring/PKGBUILD @@ -0,0 +1,32 @@ +#$Id: PKGBUILD 142736 2011-11-14 11:27:00Z ibiru $ +# Maintainer: Jan De Groot <jgc@archlinux.org> + +pkgname=gnome-keyring +pkgver=3.2.2 +pkgrel=1 +pkgdesc="GNOME Password Management daemon" +arch=(i686 x86_64) +license=('GPL' 'LGPL') +depends=('gtk3' 'dconf' 'libgcrypt' 'libcap-ng' 'p11-kit' 'desktop-file-utils' 'hicolor-icon-theme') +makedepends=('intltool' 'python2') +groups=('gnome') +options=('!libtool' '!emptydirs') +url="http://www.gnome.org" +install=gnome-keyring.install +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz) +sha256sums=('f4cdc2c492a9b0157d59439310093e611e1f718a16f7ee2391ac03aadacfaaa3') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static \ + --libexecdir=/usr/lib/gnome-keyring \ + --with-pam-dir=/lib/security --with-root-certs=/etc/ssl/certs \ + --disable-schemas-compile --disable-update-mime + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/testing/gnome-keyring/gnome-keyring.install b/testing/gnome-keyring/gnome-keyring.install new file mode 100644 index 000000000..e899ab5a2 --- /dev/null +++ b/testing/gnome-keyring/gnome-keyring.install @@ -0,0 +1,15 @@ +post_install() { + glib-compile-schemas /usr/share/glib-2.0/schemas + update-mime-database /usr/share/mime 1> /dev/null + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor + update-desktop-database -q + setcap cap_ipc_lock=ep /usr/bin/gnome-keyring-daemon +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/testing/gtkhtml4/PKGBUILD b/testing/gtkhtml4/PKGBUILD new file mode 100644 index 000000000..940cee589 --- /dev/null +++ b/testing/gtkhtml4/PKGBUILD @@ -0,0 +1,29 @@ +# $Id: PKGBUILD 142738 2011-11-14 12:15:43Z ibiru $ +# Maintainer: Ionut Biru <ibiru@archlinux.org> + +pkgname=gtkhtml4 +_pkgbasename=gtkhtml +pkgver=4.2.2 +pkgrel=1 +pkgdesc="A lightweight HTML renderer/editor widget for GTK3" +arch=(i686 x86_64) +license=('GPL') +depends=('gtk3' 'enchant' 'iso-codes' 'gnome-icon-theme' 'libsoup') +makedepends=('intltool') +url="http://www.gnome.org" +options=('!libtool') +source=(http://ftp.gnome.org/pub/gnome/sources/${_pkgbasename}/${pkgver%.*}/${_pkgbasename}-${pkgver}.tar.xz) +sha256sums=('e20bb5d461e9ae9d3a8d4e13d544db1813707810ded7cbde9287485f2394dd2c') + +build() { + cd "${srcdir}/${_pkgbasename}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc \ + --libexecdir=/usr/lib/gtkhtml4 \ + --localstatedir=/var --disable-static + make +} + +package() { + cd "${srcdir}/${_pkgbasename}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/testing/gucharmap/PKGBUILD b/testing/gucharmap/PKGBUILD new file mode 100644 index 000000000..76c83e764 --- /dev/null +++ b/testing/gucharmap/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 142755 2011-11-14 19:44:44Z ibiru $ +# Maintainer: Jan De Groot <jgc@archlinux.org> + +pkgname=gucharmap +pkgver=3.2.2 +pkgrel=1 +pkgdesc="Gnome Unicode Charmap" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.gnome.org" +depends=('gconf' 'hicolor-icon-theme') +makedepends=('gtk-doc' 'intltool' 'gobject-introspection') +options=('!libtool' '!emptydirs') +install=gucharmap.install +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('da1e422d387ff4df8bfb61e8a340483f88b0d23e4309a776848dbeb4093a5a21') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static \ + --disable-scrollkeeper --enable-introspection + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install + + install -m755 -d "$pkgdir/usr/share/gconf/schemas" + gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain gucharmap $pkgdir/etc/gconf/schemas/*.schemas + rm -f $pkgdir/etc/gconf/schemas/*.schemas +} diff --git a/testing/gucharmap/gucharmap.install b/testing/gucharmap/gucharmap.install new file mode 100644 index 000000000..4de3253f6 --- /dev/null +++ b/testing/gucharmap/gucharmap.install @@ -0,0 +1,22 @@ +pkgname=gucharmap + +post_install() { + usr/sbin/gconfpkg --install ${pkgname} + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +pre_upgrade() { + pre_remove $1 +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + usr/sbin/gconfpkg --uninstall ${pkgname} +} + +post_remove() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} diff --git a/testing/libcroco/PKGBUILD b/testing/libcroco/PKGBUILD new file mode 100644 index 000000000..5beb276a6 --- /dev/null +++ b/testing/libcroco/PKGBUILD @@ -0,0 +1,26 @@ +# $Id: PKGBUILD 142751 2011-11-14 19:18:02Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=libcroco +pkgver=0.6.3 +pkgrel=1 +pkgdesc="A CSS parsing library" +arch=('x86_64' 'i686') +depends=('glib2' 'libxml2') +makedepends=('intltool') +license=('LGPL') +options=('!libtool') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/0.6/$pkgname-$pkgver.tar.xz) +url="http://www.gnome.org" +sha256sums=('8b7c565bf3eae1dff0a09d128fc3726acc1a492a7de23b25dce803a4f93d42c1') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --disable-static + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/testing/libffado/PKGBUILD b/testing/libffado/PKGBUILD index 09386a73f..a73d9a212 100644 --- a/testing/libffado/PKGBUILD +++ b/testing/libffado/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 140411 2011-10-13 03:56:02Z schiv $ -# Maintainer: Ray Rashif <schivmeister@gmail.com> +# $Id: PKGBUILD 142838 2011-11-16 19:18:19Z schiv $ +# Maintainer: Ray Rashif <schiv@archlinux.org> # Contributor: galiyosha@gmail.com # Contributor: Jon Kristian Nilsen <jokr.nilsen@gmail.com> pkgname=libffado pkgver=2.0.1 -pkgrel=4 +pkgrel=5 pkgdesc="Driver for FireWire audio devices" arch=('i686' 'x86_64') url="http://www.ffado.org/" @@ -13,7 +13,8 @@ license=('GPL') depends=('libiec61883' 'libavc1394' 'libsigc++' 'libxml++' 'alsa-lib' 'dbus') makedepends=('scons' 'python2-qt') -optdepends=('python2-qt: mixer applet') +optdepends=('python2: ffado-diag' + 'python2-qt: mixer applet') provides=('ffado') source=("http://www.ffado.org/files/$pkgname-$pkgver.tar.gz" '60-ffado.rules') @@ -43,7 +44,7 @@ build() { package() { cd "$srcdir/$pkgname-$pkgver" - scons DESTDIR="$pkgdir/" WILL_DEAL_WITH_XDG_MYSELF="True" install + scons DESTDIR="$pkgdir" WILL_DEAL_WITH_XDG_MYSELF="True" install # add audio device rules # see https://bugs.archlinux.org/task/26342 diff --git a/testing/libgnome-keyring/PKGBUILD b/testing/libgnome-keyring/PKGBUILD new file mode 100644 index 000000000..8f8cb25cb --- /dev/null +++ b/testing/libgnome-keyring/PKGBUILD @@ -0,0 +1,28 @@ +#$Id: PKGBUILD 142734 2011-11-14 11:17:40Z ibiru $ +#Maintainer: Jan De Groot <jgc@archlinux.org> + +pkgname=libgnome-keyring +pkgver=3.2.2 +pkgrel=1 +pkgdesc="GNOME keyring client library" +arch=(i686 x86_64) +license=('GPL' 'LGPL') +depends=('dbus-core' 'libgcrypt' 'glib2') +makedepends=('intltool' 'pkgconfig') +options=('!libtool' '!emptydirs') +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz) +sha256sums=('2bcbe47b1960737866835a516056c36d1a3d82d5ad101c70d5a87e1ad616adb3') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static \ + --libexecdir=/usr/lib/gnome-keyring + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/testing/librsvg/PKGBUILD b/testing/librsvg/PKGBUILD new file mode 100644 index 000000000..e9a4a7357 --- /dev/null +++ b/testing/librsvg/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 142753 2011-11-14 19:25:00Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=librsvg +pkgver=2.34.2 +pkgrel=1 +pkgdesc="A SVG viewing library" +arch=(i686 x86_64) +license=('LGPL') +depends=('gdk-pixbuf2' 'pango' 'libcroco') +makedepends=('intltool' 'gtk2') +optdepends=('gtk2: for rsvg-view support') +options=('!libtool' '!emptydirs') +url="http://librsvg.sourceforge.net/" +install=librsvg.install +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/2.34/$pkgname-$pkgver.tar.xz) +sha256sums=('5de701325b84c0a15ab6892f49ffd6471722044bfe0b350725bf420642ee4464') + +build() { + cd "$srcdir/$pkgname-$pkgver" + sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' rsvg.in + ./configure --prefix=/usr --libexecdir=/usr/lib/$pkgname \ + --with-croco --disable-static \ + --with-svgz + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/testing/librsvg/librsvg.install b/testing/librsvg/librsvg.install new file mode 100644 index 000000000..4d48b071f --- /dev/null +++ b/testing/librsvg/librsvg.install @@ -0,0 +1,11 @@ +post_install() { + usr/bin/gdk-pixbuf-query-loaders --update-cache +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/testing/p11-kit/PKGBUILD b/testing/p11-kit/PKGBUILD new file mode 100644 index 000000000..365b67cd7 --- /dev/null +++ b/testing/p11-kit/PKGBUILD @@ -0,0 +1,29 @@ +# $Id: PKGBUILD 142938 2011-11-18 18:11:54Z ibiru $ +# Maintainer: Ionut Biru <ibiru@archlinux.org> + +pkgname=p11-kit +pkgver=0.9 +pkgrel=1 +pkgdesc="Library to work with PKCS#11 modules" +arch=(i686 x86_64) +url="http://p11-glue.freedesktop.org" +license=('BSD') +depends=(glibc) +options=(!libtool) +source=($url/releases/$pkgname-$pkgver.tar.gz) +md5sums=('029aa2a3a103e7eb81b4aa731b93539e') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc \ + --with-module-path=/usr/lib/pkcs11 + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING +} + +# vim:set ts=2 sw=2 et: diff --git a/testing/seahorse/PKGBUILD b/testing/seahorse/PKGBUILD new file mode 100644 index 000000000..fdec5f80c --- /dev/null +++ b/testing/seahorse/PKGBUILD @@ -0,0 +1,40 @@ +# $Id: PKGBUILD 142740 2011-11-14 12:23:22Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> +# Contributor: Michel Brabants <michel.linux@tiscali.be> + +pkgname=seahorse +pkgver=3.2.2 +pkgrel=1 +pkgdesc="GNOME application for managing PGP keys." +arch=(i686 x86_64) +license=('GPL') +url="http://projects.gnome.org/seahorse/" +depends=('gtk3' 'libgnome-keyring' 'gnome-keyring' 'libsoup' 'gpgme' 'desktop-file-utils' 'hicolor-icon-theme' 'dconf') +makedepends=('gettext' 'libldap' 'intltool' 'pkgconfig' 'gnome-doc-utils' 'gobject-introspection' 'openssh' 'libsm') +optdepends=('openssh: SSH support') +provides=('x11-ssh-askpass') +options=('!libtool' '!emptydirs') +groups=('gnome-extra') +install=seahorse.install +source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz + seahorse-ssh-askpass.sh) +sha256sums=('25146aa4c4bb4c375ec1afec524e1907852989bd1b0c9e12490326616ac6a7e9' + '1792ab2c0bbad446b8fad0a0c9008a75f60a9666c895d37d2adcd827e49fafbb') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static \ + --enable-ldap --enable-hkp \ + --disable-scrollkeeper \ + --disable-update-mime-database \ + --disable-schemas-compile + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + install -Dm755 "$srcdir/seahorse-ssh-askpass.sh" \ + "$pkgdir/etc/profile.d/seahorse-ssh-askpass.sh" +} diff --git a/testing/seahorse/seahorse-ssh-askpass.sh b/testing/seahorse/seahorse-ssh-askpass.sh new file mode 100644 index 000000000..44281ac2b --- /dev/null +++ b/testing/seahorse/seahorse-ssh-askpass.sh @@ -0,0 +1,3 @@ +if [ -z "$SSH_ASKPASS" ]; then + export SSH_ASKPASS=/usr/lib/seahorse/seahorse-ssh-askpass +fi diff --git a/testing/seahorse/seahorse.install b/testing/seahorse/seahorse.install new file mode 100644 index 000000000..9a98d52e0 --- /dev/null +++ b/testing/seahorse/seahorse.install @@ -0,0 +1,21 @@ +pkgname=seahorse + +post_install() { + glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +pre_upgrade() { + if [ -f usr/share/gconf/schemas/$pkgname.schemas ]; then + usr/sbin/gconfpkg --uninstall $pkgname + fi +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/testing/tomboy/PKGBUILD b/testing/tomboy/PKGBUILD new file mode 100644 index 000000000..b386d328b --- /dev/null +++ b/testing/tomboy/PKGBUILD @@ -0,0 +1,37 @@ +# $Id: PKGBUILD 142761 2011-11-14 21:22:26Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=tomboy +pkgver=1.8.3 +pkgrel=1 +pkgdesc="Desktop note-taking application for Linux and Unix" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.gnome.org/projects/tomboy/" +depends=('gtk2' 'gtkspell' 'gconf' 'gconf-sharp' 'dbus-sharp' 'dbus-sharp-glib' 'mono-addins' 'hicolor-icon-theme') +makedepends=('intltool' 'pkgconfig' 'gnome-doc-utils') +options=('!libtool' '!emptydirs' '!makeflags') +groups=('gnome-extra') +install=tomboy.install +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/1.8/$pkgname-$pkgver.tar.xz) +sha256sums=('3f704bac772a54cf668aca769c766bc1fb9ebc8823a903ef108927805c020bea') + +build() { + export MONO_SHARED_DIR="$srcdir/.wabi" + mkdir -p "$MONO_SHARED_DIR" + + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-scrollkeeper \ + --disable-update-mimedb + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 install + + install -m755 -d "$pkgdir/usr/share/gconf/schemas" + gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain tomboy $pkgdir/etc/gconf/schemas/*.schemas + rm -f $pkgdir/etc/gconf/schemas/*.schemas +} diff --git a/testing/tomboy/tomboy.install b/testing/tomboy/tomboy.install new file mode 100644 index 000000000..f8e2e4a07 --- /dev/null +++ b/testing/tomboy/tomboy.install @@ -0,0 +1,25 @@ +pkgname=tomboy + +post_install() { + usr/sbin/gconfpkg --install ${pkgname} + + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + update-mime-database usr/share/mime +} + +pre_upgrade() { + pre_remove $1 +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + usr/sbin/gconfpkg --uninstall ${pkgname} +} + +post_remove() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + update-mime-database usr/share/mime +} diff --git a/testing/vinagre/PKGBUILD b/testing/vinagre/PKGBUILD new file mode 100644 index 000000000..e7fb8932a --- /dev/null +++ b/testing/vinagre/PKGBUILD @@ -0,0 +1,37 @@ +# $Id: PKGBUILD 142764 2011-11-14 21:29:43Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> +# Maintainer: Allan McRae <mcrae_allan@hotmail.com> +# Contributor: lp76 <l.peduto@gmail.com> + +pkgname=vinagre +pkgver=3.2.2 +pkgrel=1 +pkgdesc="A VNC Client for the GNOME Desktop" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.gnome.org/projects/vinagre/" +install=vinagre.install +depends=('libgnome-keyring' 'gtk-vnc' 'vte3' 'telepathy-glib' 'avahi' 'desktop-file-utils' 'dconf' 'shared-mime-info' 'gnome-icon-theme') +optdepends=('openssh: SSH plugin' + 'rdesktop: RDP plugin') +makedepends=('gnome-doc-utils' 'intltool' 'rdesktop' 'openssh') +groups=('gnome-extra') +options=('!emptydirs' '!libtool') +source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('1533cc447177f8d6c9cfe45d61b05904efbf66c86b86b4c332e972ff965d76bd') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + #building with as-needed breaks rdp + #https://bugzilla.gnome.org/show_bug.cgi?id=653558 + export LDFLAGS="$LDFLAGS,--no-as-needed" + ./configure --prefix=/usr --sysconfdir=/etc --disable-scrollkeeper \ + --libexecdir=/usr/lib/vinagre --enable-rdp --disable-spice + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/testing/vinagre/vinagre.install b/testing/vinagre/vinagre.install new file mode 100644 index 000000000..68158ac80 --- /dev/null +++ b/testing/vinagre/vinagre.install @@ -0,0 +1,20 @@ +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + update-mime-database usr/share/mime > /dev/null +} + +pre_upgrade() { + if (( $(vercmp $2 2.91.91-2) < 0 )); then + usr/sbin/gconfpkg --uninstall vinagre + fi +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/testing/vino/PKGBUILD b/testing/vino/PKGBUILD new file mode 100644 index 000000000..f3ff87b9b --- /dev/null +++ b/testing/vino/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 142766 2011-11-14 21:34:58Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=vino +pkgver=3.2.2 +pkgrel=1 +pkgdesc="a VNC server for the GNOME desktop" +arch=('i686' 'x86_64') +license=('GPL') +depends=('libnotify' 'libxtst' 'libsm' 'libsoup' 'telepathy-glib' 'gtk3' 'libgnome-keyring' 'avahi' 'desktop-file-utils') +makedepends=('intltool' 'networkmanager') +groups=('gnome-extra') +url="http://www.gnome.org" +options=(!emptydirs) +install=vino.install +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('51089c35b5187c37ebcd4f8ad921123f9a56713316876531189a3f3765dc87d1') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc \ + --libexecdir=/usr/lib/vino \ + --localstatedir=/var \ + --enable-gnome-keyring \ + --enable-avahi \ + --disable-http-server + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/testing/vino/vino.install b/testing/vino/vino.install new file mode 100644 index 000000000..469266843 --- /dev/null +++ b/testing/vino/vino.install @@ -0,0 +1,18 @@ +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q +} + +pre_upgrade() { + if (( $(vercmp $2 2.90.0) < 0 )); then + usr/sbin/gconfpkg --uninstall vino + fi +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/testing/xf86-video-intel/PKGBUILD b/testing/xf86-video-intel/PKGBUILD new file mode 100644 index 000000000..ecbe65fb5 --- /dev/null +++ b/testing/xf86-video-intel/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 142914 2011-11-18 08:37:24Z andyrtr $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=xf86-video-intel +pkgver=2.17.0 +pkgrel=1 +pkgdesc="X.org Intel i810/i830/i915/945G/G965+ video drivers" +arch=(i686 x86_64) +url="http://xorg.freedesktop.org/" +license=('custom') +depends=(intel-dri libxvmc libpciaccess libdrm xcb-util libxfixes udev) +makedepends=('xorg-server-devel>=1.10.99.902' 'libx11' 'libdrm' 'xf86driproto' 'glproto' 'mesa' 'libxvmc' 'xcb-util' 'libxrender') +conflicts=('xorg-server<1.10.99.902' 'xf86-video-i810' 'xf86-video-intel-legacy') +options=('!libtool') +groups=('xorg-drivers' 'xorg') +source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2) +sha1sums=('04ad9fa1f4c4e0a90f48752a709bf14700c864af') + +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/xfsprogs/PKGBUILD b/testing/xfsprogs/PKGBUILD index c062147da..044081699 100644 --- a/testing/xfsprogs/PKGBUILD +++ b/testing/xfsprogs/PKGBUILD @@ -1,7 +1,7 @@ -# $Id: PKGBUILD 141990 2011-11-03 20:33:03Z tpowa $ +# $Id: PKGBUILD 142910 2011-11-18 08:13:20Z tpowa $ # Maintainer: Paul Mattal <paul@archlinux.org> pkgname=xfsprogs -pkgver=3.1.6 +pkgver=3.1.7 pkgrel=1 pkgdesc="XFS filesystem utilities" arch=('i686' 'x86_64') @@ -12,7 +12,7 @@ depends=('util-linux-ng>=2.16') options=('!makeflags' '!libtool') # We mirror the sources as upstream tends to move them once a new release is out source=("ftp://ftp.archlinux.org/other/xfsprogs/${pkgname}-${pkgver}.tar.gz") -md5sums=('fbd2c1c5abed4b11047bea6ce53bc6e4') +md5sums=('049cf9873794ea49d0bb3f12d45748a4') build() { cd "${srcdir}/${pkgname}-${pkgver}" 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..c2a5e2c4f --- /dev/null +++ b/testing/xorg-server/PKGBUILD @@ -0,0 +1,205 @@ +# $Id: PKGBUILD 142829 2011-11-16 11:34:48Z 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.11.2 +pkgrel=2 +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' 'xorg-util-macros' 'xorg-font-util' 'glproto' 'dri2proto' 'udev' 'libgcrypt') +options=('!libtool') +source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 + autoconfig-nvidia.patch + autoconfig-sis.patch + revert-trapezoids.patch + git-fixes.patch + xserver-1.11.2-record-crasher.patch + Xi-allow-passive-keygrabs-on-the-XIAll-Master-Device.patch + xvfb-run + xvfb-run.1 + 10-quirks.conf) +md5sums=('8796fff441e5435ee36a72579008af24' + '6c7e87d63ac4b535e19a80c89d0cf091' + 'f8194638ca4872c2b0a67862a70bcebf' + 'f6c84f4936f8e00abdfbd9fb4eda83fb' + '6fb42ec979ecd6125b6599f54dc00d14' + '3f9de4dbfee2da90167192d8ca9eb2b4' + '47f9b979fe38043b42ff86eeee6fd0d0' + '52fd3effd80d7bc6c1660d4ecf23d31c' + '376c70308715cd2643f7bff936d9934b' + 'd4f7dfc6be4ef4e2c6dd7632a9d88abe') + +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + + # Use nouveau/nv/nvidia drivers for nvidia devices + patch -Np1 -i "${srcdir}/autoconfig-nvidia.patch" + + # Use unofficial imedia SiS driver for supported SiS devices + patch -Np0 -i "${srcdir}/autoconfig-sis.patch" + + # Revert commit that causes huge slowdowns with binary nVidia driver + patch -Np1 -i "${srcdir}/revert-trapezoids.patch" + + # Add post-release patches from 1.11 branch + patch -Np1 -i "${srcdir}/git-fixes.patch" + + # From Fedora. + # Upstream URL: http://patchwork.freedesktop.org/patch/7866/ + patch -Np1 -i "${srcdir}/xserver-1.11.2-record-crasher.patch" + + # From Fedora. + # Upstream URL: https://bugs.freedesktop.org/show_bug.cgi?id=42298 + patch -Np1 -i "${srcdir}/Xi-allow-passive-keygrabs-on-the-XIAll-Master-Device.patch" + + autoreconf -fi + ./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 + make + + # Disable subdirs for make install rule to make splitting easier + 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 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/Xi-allow-passive-keygrabs-on-the-XIAll-Master-Device.patch b/testing/xorg-server/Xi-allow-passive-keygrabs-on-the-XIAll-Master-Device.patch new file mode 100644 index 000000000..8bddb2945 --- /dev/null +++ b/testing/xorg-server/Xi-allow-passive-keygrabs-on-the-XIAll-Master-Device.patch @@ -0,0 +1,31 @@ +From 97f2af5876dab0dfab06be735416f3fc950ed39e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu, 27 Oct 2011 11:03:39 +1000 +Subject: [PATCH] Xi: allow passive keygrabs on the XIAll(Master)Devices fake + devices + +They don't have a KeyClassRec, but we must still allow passive grabs on +them. + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +Tested-by: Bastien Nocera <hadess@hadess.net> +--- + Xi/exevents.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Xi/exevents.c b/Xi/exevents.c +index 053c76f..edf2c39 100644 +--- a/Xi/exevents.c ++++ b/Xi/exevents.c +@@ -1495,7 +1495,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, + rc = CheckGrabValues(client, param); + if (rc != Success) + return rc; +- if (k == NULL) ++ if ((dev->id != XIAllDevices && dev->id != XIAllMasterDevices) && k == NULL) + return BadMatch; + if (grabtype == GRABTYPE_XI) + { +-- +1.7.7 + diff --git a/testing/xorg-server/autoconfig-nvidia.patch b/testing/xorg-server/autoconfig-nvidia.patch new file mode 100644 index 000000000..baa2eb601 --- /dev/null +++ b/testing/xorg-server/autoconfig-nvidia.patch @@ -0,0 +1,29 @@ +--- a/hw/xfree86/common/xf86pciBus.c ++++ b/hw/xfree86/common/xf86pciBus.c +@@ -1123,7 +1123,25 @@ videoPtrToDriverList(struct pci_device * + break; + case 0x102b: driverList[0] = "mga"; break; + case 0x10c8: driverList[0] = "neomagic"; break; +- case 0x10de: case 0x12d2: driverList[0] = "nv"; break; ++ case 0x10de: case 0x12d2: ++ switch (dev->device_id) { ++ /* NV1 */ ++ case 0x0008: ++ case 0x0009: ++ driverList[0] = "vesa"; ++ break; ++ /* NV3 */ ++ case 0x0018: ++ case 0x0019: ++ driverList[0] = "nv"; ++ break; ++ default: ++ driverList[0] = "nouveau"; ++ driverList[1] = "nv"; ++ driverList[2] = "nvidia"; ++ break; ++ } ++ break; + case 0x1106: driverList[0] = "openchrome"; break; + case 0x1b36: driverList[0] = "qxl"; break; + case 0x1163: driverList[0] = "rendition"; break; diff --git a/testing/xorg-server/autoconfig-sis.patch b/testing/xorg-server/autoconfig-sis.patch new file mode 100644 index 000000000..d936efaaa --- /dev/null +++ b/testing/xorg-server/autoconfig-sis.patch @@ -0,0 +1,19 @@ +--- hw/xfree86/common/xf86pciBus.c.orig 2011-09-24 10:53:45.421697668 +0000 ++++ hw/xfree86/common/xf86pciBus.c 2011-09-24 10:55:56.416250708 +0000 +@@ -1140,7 +1140,15 @@ + driverList[0] = "savage"; break; + } + break; +- case 0x1039: driverList[0] = "sis"; break; ++ case 0x1039: ++ switch (dev->device_id) ++ { ++ case 0x6350: case 0x6351: ++ driverList[0] = "sisimedia"; driverList[1] = "sis"; break; ++ default: ++ driverList[0] = "sis"; break; ++ } ++ break; + case 0x126f: driverList[0] = "siliconmotion"; break; + case 0x121a: + if (dev->device_id < 0x0003) diff --git a/testing/xorg-server/git-fixes.patch b/testing/xorg-server/git-fixes.patch new file mode 100644 index 000000000..27da61eca --- /dev/null +++ b/testing/xorg-server/git-fixes.patch @@ -0,0 +1,161 @@ +From 89626304ea1ad316c5b7145a40f09377148cff21 Mon Sep 17 00:00:00 2001 +From: Dave Airlie <airlied@redhat.com> +Date: Thu, 20 Oct 2011 13:43:01 +0000 +Subject: xf86Crtc: handle no outputs with no modes harder. + +If you started an X server with no connected outputs, we pick a default +1024x768 mode, however if you then ran an xvidmode using app against that +server it would segfault the server due to not finding any valid modes. + +This was due to the no output mode set code, only adding the modes to the +scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would +get called and remove all the modes and we'd end up with 0. + +This change fixes xf86SetScrnInfoModes to always report a scrn mode of at +least 1024x768, and pushes the initial configuration to just call it instead +of setting up the mode itself. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926 + +I've seen other bugs like this on other distros so it might also actually fix them. + +Signed-off-by: Dave Airlie <airlied@redhat.com> +Reviewed-by: Keith Packard <keithp@keithp.com> +Signed-off-by: Keith Packard <keithp@keithp.com> +(cherry picked from commit 17416e88dcfcc584fe5f87580d5d2b719b3521c3) +--- +diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c +index d75cd77..8906806 100644 +--- a/hw/xfree86/modes/xf86Crtc.c ++++ b/hw/xfree86/modes/xf86Crtc.c +@@ -1915,19 +1915,25 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn) + break; + } + +- if (scrn->modes != NULL) { +- /* For some reason, scrn->modes is circular, unlike the other mode +- * lists. How great is that? +- */ +- for (last = scrn->modes; last && last->next; last = last->next) +- ; +- last->next = scrn->modes; +- scrn->modes->prev = last; +- if (mode) { +- while (scrn->modes != mode) +- scrn->modes = scrn->modes->next; +- } ++ if (!scrn->modes) { ++ scrn->modes = xf86ModesAdd(scrn->modes, ++ xf86CVTMode(scrn->display->virtualX, ++ scrn->display->virtualY, ++ 60, 0, 0)); ++ } ++ ++ /* For some reason, scrn->modes is circular, unlike the other mode ++ * lists. How great is that? ++ */ ++ for (last = scrn->modes; last && last->next; last = last->next) ++ ; ++ last->next = scrn->modes; ++ scrn->modes->prev = last; ++ if (mode) { ++ while (scrn->modes != mode) ++ scrn->modes = scrn->modes->next; + } ++ + scrn->currentMode = scrn->modes; + #ifdef XFreeXDGA + if (scrn->pScreen) +@@ -2529,16 +2535,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) + width, height); + } + +- if (have_outputs) { +- /* Mirror output modes to scrn mode list */ +- xf86SetScrnInfoModes (scrn); +- } else { +- /* Clear any existing modes from scrn->modes */ +- while (scrn->modes != NULL) +- xf86DeleteMode(&scrn->modes, scrn->modes); +- scrn->modes = xf86ModesAdd(scrn->modes, +- xf86CVTMode(width, height, 60, 0, 0)); +- } ++ xf86SetScrnInfoModes (scrn); + + success = TRUE; + bailout: +-- +cgit v0.9.0.2-2-gbebe +From 97f2ae60fc0cc755abd8b88df826fcb1a20464fe Mon Sep 17 00:00:00 2001 +From: Christopher Yeleighton <giecrilj@stegny.2a.pl> +Date: Tue, 25 Oct 2011 01:47:06 +0000 +Subject: Bug 38420: Xvfb crashes in miInitVisuals() when started with depth=2 + +https://bugs.freedesktop.org/show_bug.cgi?id=38420 + +Exit with fatal error message, not segfault. + +Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> +Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> +Signed-off-by: Keith Packard <keithp@keithp.com> +(cherry picked from commit 7d50211ab57a35910d79fc3f67ae89aff91fa995) +--- +diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c +index 31ed505..dce3f84 100644 +--- a/hw/vfb/InitOutput.c ++++ b/hw/vfb/InitOutput.c +@@ -864,6 +864,8 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) + (1 << DirectColor)), + 10, TrueColor, 0x3ff00000, 0x000ffc00, 0x000003ff); + break; ++ default: ++ return FALSE; + } + + miSetPixmapDepths (); +-- +cgit v0.9.0.2-2-gbebe +From 34bb83b9df20ff63dbb147ed661f39efb8bae8e4 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon, 24 Oct 2011 02:00:32 +0000 +Subject: dix: block signals when closing all devices + +When closing down all devices, we manually unset master for all attached +devices, but the device's sprite info still points to the master's sprite +info. This leaves us a window where the master is freed already but the +device isn't yet. A signal during that window causes dereference of the +already freed spriteInfo in mieqEnqueue's EnqueueScreen macro. + +Simply block signals when removing all devices. It's not like we're really +worrying about high-responsive input at this stage. + +https://bugzilla.redhat.com/show_bug.cgi?id=737031 + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +Reviewed-by: Julien Cristau <jcristau@debian.org> +(cherry picked from commit d7c44a7c9760449bef263413ad3b20f19b1dc95a) +--- +diff --git a/dix/devices.c b/dix/devices.c +index 0ccf252..cbdd4ea 100644 +--- a/dix/devices.c ++++ b/dix/devices.c +@@ -982,6 +982,8 @@ CloseDownDevices(void) + { + DeviceIntPtr dev; + ++ OsBlockSignals(); ++ + /* Float all SDs before closing them. Note that at this point resources + * (e.g. cursors) have been freed already, so we can't just call + * AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master +@@ -1004,6 +1006,8 @@ CloseDownDevices(void) + inputInfo.keyboard = NULL; + inputInfo.pointer = NULL; + XkbDeleteRulesDflts(); ++ ++ OsReleaseSignals(); + } + + /** +-- +cgit v0.9.0.2-2-gbebe diff --git a/testing/xorg-server/revert-trapezoids.patch b/testing/xorg-server/revert-trapezoids.patch new file mode 100644 index 000000000..b9046c5cb --- /dev/null +++ b/testing/xorg-server/revert-trapezoids.patch @@ -0,0 +1,179 @@ +diff -ru a/fb/fbpict.c b/fb/fbpict.c +--- a/fb/fbpict.c 2011-08-01 01:44:24.000000000 +0200 ++++ b/fb/fbpict.c 2011-10-05 22:45:29.000000000 +0200 +@@ -364,7 +364,7 @@ + ps->Glyphs = miGlyphs; + ps->CompositeRects = miCompositeRects; + ps->RasterizeTrapezoid = fbRasterizeTrapezoid; +- ps->Trapezoids = fbTrapezoids; ++ ps->Trapezoids = miTrapezoids; + ps->AddTraps = fbAddTraps; + ps->AddTriangles = fbAddTriangles; + ps->Triangles = fbTriangles; +diff -ru a/render/mipict.c b/render/mipict.c +--- a/render/mipict.c 2011-04-04 05:19:50.000000000 +0200 ++++ b/render/mipict.c 2011-10-05 22:02:53.000000000 +0200 +@@ -573,6 +573,67 @@ + } + } + ++void ++miTrapezoids (CARD8 op, ++ PicturePtr pSrc, ++ PicturePtr pDst, ++ PictFormatPtr maskFormat, ++ INT16 xSrc, ++ INT16 ySrc, ++ int ntrap, ++ xTrapezoid *traps) ++{ ++ ScreenPtr pScreen = pDst->pDrawable->pScreen; ++ PictureScreenPtr ps = GetPictureScreen(pScreen); ++ ++ /* ++ * Check for solid alpha add ++ */ ++ if (op == PictOpAdd && miIsSolidAlpha (pSrc)) ++ { ++ for (; ntrap; ntrap--, traps++) ++ (*ps->RasterizeTrapezoid) (pDst, traps, 0, 0); ++ } ++ else if (maskFormat) ++ { ++ PicturePtr pPicture; ++ BoxRec bounds; ++ INT16 xDst, yDst; ++ INT16 xRel, yRel; ++ ++ xDst = traps[0].left.p1.x >> 16; ++ yDst = traps[0].left.p1.y >> 16; ++ ++ miTrapezoidBounds (ntrap, traps, &bounds); ++ if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) ++ return; ++ pPicture = miCreateAlphaPicture (pScreen, pDst, maskFormat, ++ bounds.x2 - bounds.x1, ++ bounds.y2 - bounds.y1); ++ if (!pPicture) ++ return; ++ for (; ntrap; ntrap--, traps++) ++ (*ps->RasterizeTrapezoid) (pPicture, traps, ++ -bounds.x1, -bounds.y1); ++ xRel = bounds.x1 + xSrc - xDst; ++ yRel = bounds.y1 + ySrc - yDst; ++ CompositePicture (op, pSrc, pPicture, pDst, ++ xRel, yRel, 0, 0, bounds.x1, bounds.y1, ++ bounds.x2 - bounds.x1, ++ bounds.y2 - bounds.y1); ++ FreePicture (pPicture, 0); ++ } ++ else ++ { ++ if (pDst->polyEdge == PolyEdgeSharp) ++ maskFormat = PictureMatchFormat (pScreen, 1, PICT_a1); ++ else ++ maskFormat = PictureMatchFormat (pScreen, 8, PICT_a8); ++ for (; ntrap; ntrap--, traps++) ++ miTrapezoids (op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, traps); ++ } ++} ++ + Bool + miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) + { +@@ -599,7 +660,7 @@ + ps->Composite = 0; /* requires DDX support */ + ps->Glyphs = miGlyphs; + ps->CompositeRects = miCompositeRects; +- ps->Trapezoids = 0; ++ ps->Trapezoids = miTrapezoids; + ps->Triangles = 0; + + ps->RasterizeTrapezoid = 0; /* requires DDX support */ +diff -ru a/render/mipict.h b/render/mipict.h +--- a/render/mipict.h 2011-04-04 05:19:50.000000000 +0200 ++++ b/render/mipict.h 2011-10-05 22:06:19.000000000 +0200 +@@ -129,6 +129,23 @@ + CARD32 pixel, + xRenderColor *color); + ++extern _X_EXPORT PicturePtr ++miCreateAlphaPicture (ScreenPtr pScreen, ++ PicturePtr pDst, ++ PictFormatPtr pPictFormat, ++ CARD16 width, ++ CARD16 height); ++ ++extern _X_EXPORT void ++miTrapezoids (CARD8 op, ++ PicturePtr pSrc, ++ PicturePtr pDst, ++ PictFormatPtr maskFormat, ++ INT16 xSrc, ++ INT16 ySrc, ++ int ntrap, ++ xTrapezoid *traps); ++ + extern _X_EXPORT Bool + miIsSolidAlpha (PicturePtr pSrc); + +diff -ru a/render/mitrap.c b/render/mitrap.c +--- a/render/mitrap.c 2011-04-04 05:19:50.000000000 +0200 ++++ b/render/mitrap.c 2011-10-05 22:05:29.000000000 +0200 +@@ -34,6 +34,55 @@ + #include "picturestr.h" + #include "mipict.h" + ++PicturePtr ++miCreateAlphaPicture (ScreenPtr pScreen, ++ PicturePtr pDst, ++ PictFormatPtr pPictFormat, ++ CARD16 width, ++ CARD16 height) ++{ ++ PixmapPtr pPixmap; ++ PicturePtr pPicture; ++ GCPtr pGC; ++ int error; ++ xRectangle rect; ++ ++ if (width > 32767 || height > 32767) ++ return 0; ++ ++ if (!pPictFormat) ++ { ++ if (pDst->polyEdge == PolyEdgeSharp) ++ pPictFormat = PictureMatchFormat (pScreen, 1, PICT_a1); ++ else ++ pPictFormat = PictureMatchFormat (pScreen, 8, PICT_a8); ++ if (!pPictFormat) ++ return 0; ++ } ++ ++ pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, ++ pPictFormat->depth, 0); ++ if (!pPixmap) ++ return 0; ++ pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); ++ if (!pGC) ++ { ++ (*pScreen->DestroyPixmap) (pPixmap); ++ return 0; ++ } ++ ValidateGC (&pPixmap->drawable, pGC); ++ rect.x = 0; ++ rect.y = 0; ++ rect.width = width; ++ rect.height = height; ++ (*pGC->ops->PolyFillRect)(&pPixmap->drawable, pGC, 1, &rect); ++ FreeScratchGC (pGC); ++ pPicture = CreatePicture (0, &pPixmap->drawable, pPictFormat, ++ 0, 0, serverClient, &error); ++ (*pScreen->DestroyPixmap) (pPixmap); ++ return pPicture; ++} ++ + static xFixed + miLineFixedX (xLineFixed *l, xFixed y, Bool ceil) + { + diff --git a/testing/xorg-server/xserver-1.11.2-record-crasher.patch b/testing/xorg-server/xserver-1.11.2-record-crasher.patch new file mode 100644 index 000000000..3af207bb9 --- /dev/null +++ b/testing/xorg-server/xserver-1.11.2-record-crasher.patch @@ -0,0 +1,241 @@ +From patchwork Tue Nov 8 18:22:13 2011 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: Save major/minor opcodes in ClientRec for RecordAReply +Date: Tue, 08 Nov 2011 18:22:13 -0000 +From: Keith Packard <keithp@keithp.com> +X-Patchwork-Id: 7866 +Message-Id: <1320776533-3120-1-git-send-email-keithp@keithp.com> +To: xorg-devel@lists.freedesktop.org + +The record extension needs the major and minor opcodes in the reply +hook, but the request buffer may have been freed by the time the hook +is invoked. Saving the request major and minor codes as the request is +executed avoids fetching from the defunct request buffer. + +This patch also eliminates the public MinorOpcodeOfRequest function, +making it static to dispatch. Usages of that function have been +replaced with direct access to the new ClientRec field. + +Signed-off-by: Keith Packard <keithp@keithp.com> +Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + +--- +Here's what I was thinking of to fix this -- just record the major and +minor opcodes of the request in the ClientRec during Dispatch and then +using those fields in RecordAReply instead of fetching the discarded +request buffer. + +This is entirely untested; I don't know how to make the old code break. + + Xext/security.c | 4 +--- + Xext/xselinux_hooks.c | 4 ++-- + dix/dispatch.c | 31 ++++++++++++++++++++++--------- + dix/extension.c | 14 -------------- + include/dixstruct.h | 1 + + include/extension.h | 2 -- + record/record.c | 8 +++----- + 7 files changed, 29 insertions(+), 35 deletions(-) + +[ fedora: technically this is an ABI breaker since it's changing ClientRec, + but hopefully not in a way that matters. If it does matter, easiest thing + to do is have Record add a hook for XaceHookDispatch. - ajax ] + +diff --git a/Xext/security.c b/Xext/security.c +index 08d8158..b0d82ab 100644 +--- a/Xext/security.c ++++ b/Xext/security.c +@@ -148,9 +148,7 @@ SecurityLabelInitial(void) + static _X_INLINE const char * + SecurityLookupRequestName(ClientPtr client) + { +- int major = ((xReq *)client->requestBuffer)->reqType; +- int minor = MinorOpcodeOfRequest(client); +- return LookupRequestName(major, minor); ++ return LookupRequestName(client->majorOp, client->minorOp); + } + + +diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c +index f1d8e5d..0d4c9ab 100644 +--- a/Xext/xselinux_hooks.c ++++ b/Xext/xselinux_hooks.c +@@ -263,8 +263,8 @@ SELinuxAudit(void *auditdata, + if (client) { + REQUEST(xReq); + if (stuff) { +- major = stuff->reqType; +- minor = MinorOpcodeOfRequest(client); ++ major = client->majorOp; ++ minor = client->minorOp; + } + } + if (audit->id) +diff --git a/dix/dispatch.c b/dix/dispatch.c +index 6e33615..3600acd 100644 +--- a/dix/dispatch.c ++++ b/dix/dispatch.c +@@ -337,7 +337,20 @@ DisableLimitedSchedulingLatency(void) + SmartScheduleLatencyLimited = 0; + } + +-#define MAJOROP ((xReq *)client->requestBuffer)->reqType ++static inline unsigned short ++MinorOpcodeOfRequest(ClientPtr client) ++{ ++ unsigned char major; ++ ExtensionEntry *ext; ++ ++ major = ((xReq *)client->requestBuffer)->reqType; ++ if (major < EXTENSION_BASE) ++ return 0; ++ ext = GetExtensionEntry(major); ++ if (!ext) ++ return 0; ++ return ext->MinorOpcode (client); ++} + + void + Dispatch(void) +@@ -419,21 +432,23 @@ Dispatch(void) + } + + client->sequence++; ++ client->majorOp = ((xReq *)client->requestBuffer)->reqType; ++ client->minorOp = MinorOpcodeOfRequest(client); + #ifdef XSERVER_DTRACE +- XSERVER_REQUEST_START(LookupMajorName(MAJOROP), MAJOROP, ++ XSERVER_REQUEST_START(LookupMajorName(client->majorOp), client->majorOp, + ((xReq *)client->requestBuffer)->length, + client->index, client->requestBuffer); + #endif + if (result > (maxBigRequestSize << 2)) + result = BadLength; + else { +- result = XaceHookDispatch(client, MAJOROP); ++ result = XaceHookDispatch(client, client->majorOp); + if (result == Success) +- result = (* client->requestVector[MAJOROP])(client); ++ result = (* client->requestVector[client->majorOp])(client); + XaceHookAuditEnd(client, result); + } + #ifdef XSERVER_DTRACE +- XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP, ++ XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), client->majorOp, + client->sequence, client->index, result); + #endif + +@@ -444,8 +459,8 @@ Dispatch(void) + } + else if (result != Success) + { +- SendErrorToClient(client, MAJOROP, +- MinorOpcodeOfRequest(client), ++ SendErrorToClient(client, client->majorOp, ++ client->minorOp, + client->errorValue, result); + break; + } +@@ -466,8 +481,6 @@ Dispatch(void) + SmartScheduleLatencyLimited = 0; + } + +-#undef MAJOROP +- + static int VendorRelease = VENDOR_RELEASE; + static char *VendorString = VENDOR_NAME; + +diff --git a/dix/extension.c b/dix/extension.c +index c7bbac5..b677cdb 100644 +--- a/dix/extension.c ++++ b/dix/extension.c +@@ -228,20 +228,6 @@ StandardMinorOpcode(ClientPtr client) + return ((xReq *)client->requestBuffer)->data; + } + +-unsigned short +-MinorOpcodeOfRequest(ClientPtr client) +-{ +- unsigned char major; +- +- major = ((xReq *)client->requestBuffer)->reqType; +- if (major < EXTENSION_BASE) +- return 0; +- major -= EXTENSION_BASE; +- if (major >= NumExtensions) +- return 0; +- return (*extensions[major]->MinorOpcode)(client); +-} +- + void + CloseDownExtensions(void) + { +diff --git a/include/dixstruct.h b/include/dixstruct.h +index 6cc9614..0a85f40 100644 +--- a/include/dixstruct.h ++++ b/include/dixstruct.h +@@ -122,6 +122,7 @@ typedef struct _Client { + + DeviceIntPtr clientPtr; + ClientIdPtr clientIds; ++ unsigned short majorOp, minorOp; + } ClientRec; + + /* +diff --git a/include/extension.h b/include/extension.h +index 29a11c3..9249951 100644 +--- a/include/extension.h ++++ b/include/extension.h +@@ -52,8 +52,6 @@ _XFUNCPROTOBEGIN + + extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/); + +-extern _X_EXPORT unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/); +- + extern _X_EXPORT Bool EnableDisableExtension(char *name, Bool enable); + + extern _X_EXPORT void EnableDisableExtensionError(char *name, Bool enable); +diff --git a/record/record.c b/record/record.c +index 68311ac..4a0fe23 100644 +--- a/record/record.c ++++ b/record/record.c +@@ -546,7 +546,7 @@ RecordARequest(ClientPtr client) + } + else /* extension, check minor opcode */ + { +- int minorop = MinorOpcodeOfRequest(client); ++ int minorop = client->minorOp; + int numMinOpInfo; + RecordMinorOpPtr pMinorOpInfo = pRCAP->pRequestMinOpInfo; + +@@ -603,12 +603,9 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) + RecordContextPtr pContext; + RecordClientsAndProtocolPtr pRCAP; + int eci; +- int majorop; + ReplyInfoRec *pri = (ReplyInfoRec *)calldata; + ClientPtr client = pri->client; +- REQUEST(xReq); + +- majorop = stuff->reqType; + for (eci = 0; eci < numEnabledContexts; eci++) + { + pContext = ppAllContexts[eci]; +@@ -616,6 +613,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) + NULL); + if (pRCAP) + { ++ int majorop = client->majorOp; + if (pContext->continuedReply) + { + RecordAProtocolElement(pContext, client, XRecordFromServer, +@@ -635,7 +633,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) + } + else /* extension, check minor opcode */ + { +- int minorop = MinorOpcodeOfRequest(client); ++ int minorop = client->minorOp; + int numMinOpInfo; + RecordMinorOpPtr pMinorOpInfo = pRCAP->pReplyMinOpInfo; + assert (pMinorOpInfo); 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: |