summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/alex/PKGBUILD31
-rw-r--r--testing/archboot/PKGBUILD49
-rw-r--r--testing/archboot/archboot.install20
-rw-r--r--testing/archboot/vmware-detect.c13
-rw-r--r--testing/cairo-perl/PKGBUILD32
-rw-r--r--testing/claws-mail-extra-plugins/PKGBUILD67
-rw-r--r--testing/claws-mail-extra-plugins/claws-mail-notification-0.26-libnotify-0.7.patch25
-rw-r--r--testing/coreutils/PKGBUILD69
-rw-r--r--testing/coreutils/coreutils-pam.patch428
-rw-r--r--testing/coreutils/coreutils-uname.patch173
-rw-r--r--testing/coreutils/coreutils.install21
-rw-r--r--testing/coreutils/su.pam9
-rw-r--r--testing/dvdrip/PKGBUILD40
-rw-r--r--testing/dvdrip/dvdrip.desktop8
-rw-r--r--testing/dvdrip/dvdrip.install11
-rw-r--r--testing/frozen-bubble/PKGBUILD41
-rw-r--r--testing/frozen-bubble/frozen-bubble.desktop9
-rw-r--r--testing/gconf-perl/PKGBUILD32
-rw-r--r--testing/ghc/PKGBUILD86
-rw-r--r--testing/ghc/build.mk150
-rw-r--r--testing/ghc/ghc.install19
-rw-r--r--testing/git/ChangeLog53
-rw-r--r--testing/git/PKGBUILD85
-rw-r--r--testing/git/git-daemon70
-rw-r--r--testing/git/git-daemon.conf5
-rw-r--r--testing/glade-perl/PKGBUILD23
-rw-r--r--testing/glib-perl/PKGBUILD33
-rw-r--r--testing/gnome-perl/PKGBUILD23
-rw-r--r--testing/gnome-vfs-perl/PKGBUILD23
-rw-r--r--testing/gnomecanvas-perl/PKGBUILD23
-rw-r--r--testing/gnumeric/PKGBUILD36
-rw-r--r--testing/gnumeric/gnumeric.install26
-rw-r--r--testing/graphviz/LICENSE87
-rw-r--r--testing/graphviz/PKGBUILD50
-rw-r--r--testing/graphviz/install17
-rw-r--r--testing/gtk2-perl/PKGBUILD25
-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/imagemagick/PKGBUILD81
-rw-r--r--testing/imagemagick/perlmagick.rpath.patch10
-rw-r--r--testing/irssi/PKGBUILD29
-rw-r--r--testing/libproxy/PKGBUILD41
-rw-r--r--testing/libva/PKGBUILD35
-rw-r--r--testing/libva/libva-dont-install-tests.patch48
-rw-r--r--testing/mesa/LICENSE82
-rw-r--r--testing/mesa/PKGBUILD377
-rw-r--r--testing/mesa/gnome-shell-shader-fix.patch535
-rw-r--r--testing/mesa/nouveau-fix-header.patch86
-rw-r--r--testing/moc/PKGBUILD44
-rw-r--r--testing/moc/gcc-undefined-symbols.diff12
-rw-r--r--testing/mod_perl/PKGBUILD27
-rw-r--r--testing/net-snmp/PKGBUILD43
-rw-r--r--testing/net-snmp/libnl-2.patch67
-rw-r--r--testing/net-snmp/snmpd.rc38
-rw-r--r--testing/net-tools/PKGBUILD44
-rw-r--r--testing/net-tools/gcc340.patch46
-rw-r--r--testing/net-tools/net-tools-1.60-2.6-compilefix.patch23
-rw-r--r--testing/net-tools/net-tools-1.60-miiioctl.patch17
-rw-r--r--testing/net-tools/net-tools-1.60-nameif.patch58
-rw-r--r--testing/net-tools/net-tools-1.60-nameif_strncpy.patch13
-rw-r--r--testing/net-tools/net-tools.patch52
-rw-r--r--testing/pango-perl/PKGBUILD24
-rw-r--r--testing/perl-alien-sdl/PKGBUILD31
-rw-r--r--testing/perl-bit-vector/PKGBUILD33
-rw-r--r--testing/perl-compress-bzip2/PKGBUILD25
-rw-r--r--testing/perl-crypt-ssleay/PKGBUILD31
-rw-r--r--testing/perl-dbd-mysql/PKGBUILD49
-rw-r--r--testing/perl-dbd-sqlite/PKGBUILD28
-rw-r--r--testing/perl-dbi/PKGBUILD32
-rw-r--r--testing/perl-digest-nilsimsa/PKGBUILD35
-rw-r--r--testing/perl-digest-sha1/PKGBUILD38
-rw-r--r--testing/perl-event/PKGBUILD36
-rw-r--r--testing/perl-fcgi/PKGBUILD31
-rw-r--r--testing/perl-html-parser/PKGBUILD31
-rw-r--r--testing/perl-libintl-perl/PKGBUILD33
-rw-r--r--testing/perl-locale-gettext/PKGBUILD38
-rw-r--r--testing/perl-locale-gettext/compatibility-with-POSIX-module.patch10
-rw-r--r--testing/perl-net-dns/PKGBUILD33
-rw-r--r--testing/perl-net-ssleay/PKGBUILD33
-rw-r--r--testing/perl-net-upnp/PKGBUILD27
-rw-r--r--testing/perl-netaddr-ip/PKGBUILD34
-rw-r--r--testing/perl-sdl/PKGBUILD40
-rw-r--r--testing/perl-template-toolkit/PKGBUILD32
-rw-r--r--testing/perl-term-readkey/PKGBUILD36
-rw-r--r--testing/perl-text-iconv/PKGBUILD28
-rw-r--r--testing/perl-time-hires/PKGBUILD25
-rw-r--r--testing/perl-tk/PKGBUILD44
-rw-r--r--testing/perl-unicode-string/PKGBUILD33
-rw-r--r--testing/perl-xml-parser/PKGBUILD38
-rw-r--r--testing/perl-yaml-syck/PKGBUILD37
-rw-r--r--testing/perl/ChangeLog57
-rw-r--r--testing/perl/PKGBUILD91
-rw-r--r--testing/perl/fix-h2ph-and-tests.patch104
-rw-r--r--testing/perl/perl.install18
-rwxr-xr-xtesting/perl/perlbin.sh23
-rw-r--r--testing/pidgin/PKGBUILD110
-rw-r--r--testing/pidgin/nm09-more.patch49
-rw-r--r--testing/pidgin/pidgin.install11
-rw-r--r--testing/postgresql/PKGBUILD141
-rw-r--r--testing/postgresql/build.patch11
-rw-r--r--testing/postgresql/perl-5.14-fix.patch25
-rwxr-xr-xtesting/postgresql/postgresql79
-rw-r--r--testing/postgresql/postgresql.confd5
-rw-r--r--testing/postgresql/postgresql.install22
-rw-r--r--testing/postgresql/postgresql.logrotate4
-rw-r--r--testing/postgresql/postgresql.pam3
-rw-r--r--testing/razor/PKGBUILD41
-rw-r--r--testing/re-alpine/PKGBUILD38
-rw-r--r--testing/re-alpine/maildir.patch3712
-rw-r--r--testing/rxvt-unicode/ChangeLog5
-rw-r--r--testing/rxvt-unicode/PKGBUILD53
-rw-r--r--testing/rxvt-unicode/rxvt-unicode.desktop10
-rw-r--r--testing/spamassassin/PKGBUILD54
-rw-r--r--testing/spamassassin/spamassassin.install25
-rw-r--r--testing/spamassassin/spamd49
-rw-r--r--testing/spamassassin/spamd.conf.d1
-rw-r--r--testing/subversion/PKGBUILD98
-rw-r--r--testing/subversion/subversion.rpath.fix.patch10
-rw-r--r--testing/subversion/subversion.suppress.deprecation.warnings.patch22
-rw-r--r--testing/subversion/svn11
-rw-r--r--testing/subversion/svnmerge.py2370
-rwxr-xr-xtesting/subversion/svnserve42
-rw-r--r--testing/subversion/svnserve.conf7
-rw-r--r--testing/vim/PKGBUILD198
-rw-r--r--testing/vim/archlinux.vim26
-rw-r--r--testing/vim/gvim.desktop42
-rw-r--r--testing/vim/gvim.install13
-rw-r--r--testing/vim/vimrc16
-rw-r--r--testing/weechat/PKGBUILD33
-rw-r--r--testing/xf86-input-wacom/70-wacom.rules8
-rw-r--r--testing/xf86-input-wacom/PKGBUILD31
-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/xorg-server/10-quirks.conf10
-rw-r--r--testing/xorg-server/PKGBUILD196
-rw-r--r--testing/xorg-server/autoconfig-nvidia.patch104
-rw-r--r--testing/xorg-server/bg-none-revert.patch58
-rw-r--r--testing/xorg-server/git-fixes.patch318
-rw-r--r--testing/xorg-server/xorg-redhat-die-ugly-pattern-die-die-die.patch16
-rw-r--r--testing/xorg-server/xserver-1.10-pointer-barriers.patch1054
-rw-r--r--testing/xorg-server/xvfb-run180
-rw-r--r--testing/xorg-server/xvfb-run.1282
191 files changed, 0 insertions, 16057 deletions
diff --git a/testing/alex/PKGBUILD b/testing/alex/PKGBUILD
deleted file mode 100644
index d49dc3d6f..000000000
--- a/testing/alex/PKGBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# $Id: PKGBUILD 120390 2011-04-23 17:05:09Z vesa $
-# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
-# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
-# Contributor: Philip Nilsson <pnilsson@nullref.se>
-
-pkgname=alex
-pkgver=2.3.5
-pkgrel=1.2
-pkgdesc='a lexical analyser generator for Haskell'
-arch=('i686' 'x86_64')
-url='http://www.haskell.org/alex/'
-license=('custom:BSD3')
-depends=('gmp')
-makedepends=('ghc=7.0.3')
-source=("http://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz")
-
-build() {
- cd $srcdir/$pkgname-$pkgver
- runghc Setup.lhs configure --prefix=/usr --datasubdir=$pkgname
- runghc Setup.lhs build
-}
-
-package() {
- cd $srcdir/$pkgname-$pkgver
- runghc Setup.lhs copy --destdir=$pkgdir
- install -D -m644 LICENSE $pkgdir/usr/share/licenses/alex/BSD3
-
- # doc/ contains only license which already installed into proper place
- rm -rf $pkgdir/usr/share/doc
-}
-md5sums=('5e08c688ded0dcff98eaad6fc03a9402')
diff --git a/testing/archboot/PKGBUILD b/testing/archboot/PKGBUILD
deleted file mode 100644
index 9f2ddcd51..000000000
--- a/testing/archboot/PKGBUILD
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id: PKGBUILD 124155 2011-05-17 06:46:14Z tpowa $
-# Maintainer : Tobias Powalowski <tpowa@archlinux.org>
-
-pkgname=archboot
-pkgver=2011.05
-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.12-1' 'mksyslinux>=2010.08-1' 'mkpxelinux>=2010.08-1' 'mkisolinux>=2010.08-1' 'initscripts>=2011.05.2-1' 'subversion>=1.6.15-2' 'wget>=1.12-7' 'bash>=4.2.010-1' 'coreutils>=8.12-1' 'cryptsetup>=1.3.0-1' 'dialog>=1.1_20110302-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>=443-1' 'lvm2>=2.02.85-1' 'mdadm>=3.2.1-3' 'module-init-tools>=3.12-2' 'nano>=2.2.6-1' 'ncurses>=5.9-1' 'net-tools>=1.60-14' 'gnu-netcat>=0.7.1-3' 'ntfsprogs>=2011.4.12-1' 'pcmciautils>=017-2' '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.4-1' 'sysvinit>=2.88-2' 'tar>=1.26-1' 'util-linux>=2.19.1-2' 'which>=2.20-4' 'kbd>=1.15.3-1' 'wireless_tools>=29-4' 'xfsprogs>=3.1.5-1' 'dnsutils>=9.8.0.P1-1' 'hdparm>=9.37-1' 'memtest86+>=4.20-1' 'inetutils>=1.8-2' 'openssh>=5.8p2-6' 'hwdetect>=2011.03-1' 'shadow>=4.1.4.3-1' 'bridge-utils>=1.4-4' 'ifenslave>=1.1.0-6' 'cpufrequtils>=008-1' 'links>=2.3pre1-1' 'tcp_wrappers>=7.6-12' 'dosfstools>=3.0.11-1' 'glibc>=2.13-5' 'linux-api-headers>=2.6.38.1-1' 'kernel26>=2.6.38.6-2' 'kernel26-lts>=2.6.32.40-1' 'xinetd>=2.3.14-6' 'kexec-tools>=2.0.2-3' 'ppp>=2.4.5-2' 'rp-pppoe>=3.10-6' 'lilo>=23.2-1' 'iptables>=1.4.10-1' 'capi4k-utils>=050718-7' 'isdn4k-utils>=3.2p1-6' 'ntfs-3g>=2011.4.12-1' 'pciutils>=3.1.7-4' 'usbutils>=002-3' 'vpnc>=0.5.3-3' 'openvpn>=2.2.0-1' 'b43-fwcutter>=014-1' 'wpa_supplicant>=0.7.3-3' 'rsync>=3.0.8-1' 'gzip>=1.4-2' 'libarchive>=2.8.4-2' 'device-mapper>=2.02.85-1' 'screen>=4.0.3-11' 'elfutils>=0.152-1' 'pam>=1.1.3-1' 'cracklib>=2.8.18-1' 'nfs-utils>=1.2.3-2' 'nfsidmap>=0.24-2' 'readline>=6.2.001-1' 'acl>=2.2.51-1' 'attr>=2.4.46-1' 'pcre>=8.12-1' 'cpio>=2.11-2' 'fuse>=2.8.5-1' 'libusb>=1.0.8-1' 'vim>=7.3.177-1' 'lzo2>=2.05-1' 'libsasl>=2.1.23-5' 'libldap>=2.4.24-1' 'gpm>=1.20.6-6' 'libevent>=2.0.11-1' 'gcc-libs>=4.6.0-5' 'sdparm>=1.06-1' 'licenses>=2.8-1' 'pptpclient>=1.7.2-3' 'ndiswrapper>=1.56-9' 'ndiswrapper-utils>=1.56-2' 'zd1211-firmware>=1.4-4' 'ipw2100-fw>=1.3-5' 'ipw2200-fw>=3.1-3' 'smbclient>=3.5.8-3' 'bittorrent>=5.2.2-4' 'dhcpcd>=5.2.12-1' 'openssl>=1.0.0.d-1' 'git>=1.7.5.1-1' 'dmraid>=1.0.0.rc16.3-1' 'linux-atm>=2.5.1-2' 'netcfg>=2.5.4-1' 'tiacx>=20080210-21' 'tiacx-firmware>=2-3' 'parted>=2.3-1' 'tzdata>=2011g-1' 'ntp>=4.2.6.p3-3' 'libgcrypt>=1.4.6-3' 'iw>=0.9.22-1' 'crda>=1.1.1-3' 'libnl>=1.1-2' 'iproute2>=2.6.38-2' 'wireless-regdb>=2010.11.24-1' 'v86d>=0.1.10-1' 'dhclient>=4.2.1.1-1' 'syslinux>=4.04-1' 'mtools>=4.0.16-1' 'fsarchiver>=0.6.12-1' 'xz>=5.0.2-1' 'libtirpc>=0.2.1-3' 'librpcsecgss>=0.19-5' 'rpcbind>=0.2.0-3' 'testdisk>=6.12-1' 'wipe>=2.3.1-1' 'ddrescue>=1.14-1' 'udev>=168-1' 'ifplugd>=0.28-7' 'wpa_actiond>=1.1-2' 'nouveau-firmware>=20091212-4' 'rfkill>=0.4-2' 'libgssglue>=0.1-4' 'mkinitcpio-nfs-utils>=0.2-1' 'gptfdisk>=0.7.1-1' 'nilfs-utils>=2.0.23-1' 'btrfs-progs-unstable>=0.19.20101006-1' 'ndiswrapper-lts>=1.56-5' 'nouveau-drm-lts>=0.0.16_20100313-5' 'linux-firmware>=20110512-2' 'iana-etc>=2.30-1' 'libusb-compat>=0.1.3-1' 'eject>=2.1.5-5' 'keyutils>=1.4-1')
-optdepends=('grub2-bios: for grub2 support'
- 'grub2-efi-i386: for grub2 support'
- 'grub2-efi-x86_64: for grub2 support'
- 'efibootmgr: for grub2 support'
- 'clamav: for clamav 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=('e6d26e24c7491a3203421bd14e570c04'
- '7e2b03463747cb22ab388e79a09fa0cb')
diff --git a/testing/archboot/archboot.install b/testing/archboot/archboot.install
deleted file mode 100644
index 315f97d7e..000000000
--- a/testing/archboot/archboot.install
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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
deleted file mode 100644
index d242a388d..000000000
--- a/testing/archboot/vmware-detect.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#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/cairo-perl/PKGBUILD b/testing/cairo-perl/PKGBUILD
deleted file mode 100644
index b697e5e16..000000000
--- a/testing/cairo-perl/PKGBUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# $Id: PKGBUILD 124873 2011-05-24 21:13:32Z remy $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-
-pkgname=cairo-perl
-_realname=Cairo
-pkgver=1.061
-pkgrel=4
-pkgdesc="Perl wrappers for cairo"
-arch=(i686 x86_64)
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-options=('!emptydirs')
-depends=('cairo>=1.8.10' 'perl>=5.14')
-makedepends=('perl-extutils-depends' 'perl-extutils-pkgconfig')
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('08cd5e847f61858651fc4de769066e88')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- perl Makefile.PL INSTALLDIRS=vendor
- make
-}
-
-check() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make test || true
-}
-
-package() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/claws-mail-extra-plugins/PKGBUILD b/testing/claws-mail-extra-plugins/PKGBUILD
deleted file mode 100644
index 9d233d726..000000000
--- a/testing/claws-mail-extra-plugins/PKGBUILD
+++ /dev/null
@@ -1,67 +0,0 @@
-# $Id: PKGBUILD 125144 2011-05-25 19:01:27Z foutrelis $
-# Maintainer: Andreas Radke <andyrtr@archlinux.org>
-# Contributor: Mildred <mildred593 at online dot fr>
-
-pkgname=claws-mail-extra-plugins
-pkgver=3.7.9
-pkgrel=4
-pkgdesc="Extra plugins for claws-mail"
-url="http://www.claws-mail.org/plugins.php?branch=EXT"
-license=('GPL3')
-arch=('i686' 'x86_64')
-depends=('claws-mail>=3.7.8')
-makedepends=('make' 'bc' 'perl>=5.10.1-5' 'libgtkhtml>=2.11.1-2' 'libnotify>=0.7'
- 'libxml2>=2.7.6' 'curl>=7.19.7' 'libytnef>=1.5-2' 'libwebkit>=1.3.13'
- 'pygtk>=2.16.0' 'libsoup-gnome' 'libcanberra')
-optdepends=('libgtkhtml: for gtkhtml2_viewer plugin'
- 'perl: for perl plugin'
- 'libnotify: for notification plugin'
- 'libcanberra: for notification plugin'
- 'dbus-core: for notification plugin'
- 'libxml2: for gtkhtml2_viewer and rssyl plugins'
- 'curl: for gtkhtml2_viewer, vcalendar, rssyl and spamreport plugins'
- 'libarchive: for archive plugin'
- 'libytnef: for tnef_parse plugin'
- 'libwebkit: for the fancy webkit html plugin'
- 'libsoup-gnome: for the fancy webkit html plugin'
- 'python2: for python plugin')
-conflicts=('claws-gtkhtml2_viewer' 'claws-mail-acpinotifier-plugin'
- 'sylpheed-claws-gtkhtml2-plugin' 'sylpheed-claws-rssyl-plugin'
- 'sylpheed-claws-extra-plugins' 'claws-tnef-plugin'
- 'claws-webkit-plugin-svn' 'claws-mayflower-plugin-svn')
-replaces=('sylpheed-claws-extra-plugins')
-options=('!libtool' '!strip')
-source=(http://downloads.sourceforge.net/project/sylpheed-claws/extra%20plugins/$pkgver/claws-mail-extra-plugins-$pkgver.tar.bz2
- claws-mail-notification-0.26-libnotify-0.7.patch)
-md5sums=('3d1ebc48f686ab10702380c776b5d5d0'
- 'a02be84594ebd28b18811ccc358509be')
-
-build() {
- cd "$srcdir/claws-mail-extra-plugins-$pkgver"
-
- # fix for python2
- export PYTHON="/usr/bin/python2"
-
- for dir in */; do
- [[ $dir != geolocation_plugin-* ]] && (
- cd $dir
-
- [[ $dir == notification_plugin-* ]] &&
- patch -Np2 -i "$srcdir/claws-mail-notification-0.26-libnotify-0.7.patch"
-
- ./configure --prefix=/usr --disable-static
- make
- )
- done
-}
-
-package() {
- cd "$srcdir/claws-mail-extra-plugins-$pkgver"
- for dir in */; do
- [[ $dir != geolocation_plugin-* ]] &&
- make -C $dir DESTDIR="$pkgdir" install
- done
-
- # fix fileconflict with libical, #11485
- rm -f "$pkgdir/usr/include/ical.h"
-}
diff --git a/testing/claws-mail-extra-plugins/claws-mail-notification-0.26-libnotify-0.7.patch b/testing/claws-mail-extra-plugins/claws-mail-notification-0.26-libnotify-0.7.patch
deleted file mode 100644
index efc06a472..000000000
--- a/testing/claws-mail-extra-plugins/claws-mail-notification-0.26-libnotify-0.7.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Nur claws-mail-extra-plugins-3.7.6-orig/notification_plugin-0.25/src/notification_popup.c claws-mail-extra-plugins-3.7.6/notification_plugin-0.25/src/notification_popup.c
---- claws-mail-extra-plugins-3.7.6-orig/notification_plugin-0.25/src/notification_popup.c 2009-04-26 03:05:05.000000000 +0200
-+++ claws-mail-extra-plugins-3.7.6/notification_plugin-0.25/src/notification_popup.c 2010-11-12 13:39:02.363909583 +0100
-@@ -339,7 +339,7 @@
- break;
- }
-
-- ppopup->notification = notify_notification_new(summary, utf8_str, NULL, NULL);
-+ ppopup->notification = notify_notification_new(summary, utf8_str, NULL);
- g_free(utf8_str);
- if(ppopup->notification == NULL) {
- debug_print("Notification Plugin: Failed to create a new "
-diff -Nur claws-mail-extra-plugins-3.7.6-orig/notification_plugin-0.25/src/notification_trayicon.c claws-mail-extra-plugins-3.7.6/notification_plugin-0.25/src/notification_trayicon.c
---- claws-mail-extra-plugins-3.7.6-orig/notification_plugin-0.25/src/notification_trayicon.c 2010-03-25 09:56:34.000000000 +0100
-+++ claws-mail-extra-plugins-3.7.6/notification_plugin-0.25/src/notification_trayicon.c 2010-11-12 13:38:30.809340907 +0100
-@@ -589,8 +589,7 @@
- summary = notification_trayicon_popup_assemble_summary();
- utf8_str = notification_trayicon_popup_assemble_body(msginfo);
-
-- popup.notification = notify_notification_new(summary, utf8_str, NULL, NULL);
-- notify_notification_attach_to_status_icon(popup.notification, trayicon);
-+ popup.notification = notify_notification_new(summary, utf8_str, NULL);
-
- g_free(summary);
- g_free(utf8_str);
diff --git a/testing/coreutils/PKGBUILD b/testing/coreutils/PKGBUILD
deleted file mode 100644
index 6d75f0659..000000000
--- a/testing/coreutils/PKGBUILD
+++ /dev/null
@@ -1,69 +0,0 @@
-# $Id: PKGBUILD 127042 2011-06-10 00:56:53Z bisson $
-# Maintainer: Allan McRae <allan@archlinux.org>
-# Contributor: judd <jvinet@zeroflux.org>
-
-pkgname=coreutils
-pkgver=8.12
-pkgrel=3
-pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
-arch=('i686' 'x86_64')
-license=('GPL3')
-url="http://www.gnu.org/software/coreutils"
-groups=('base')
-depends=('glibc' 'shadow' 'pam' 'acl' 'gmp' 'libcap')
-replaces=('mktemp')
-backup=('etc/pam.d/su')
-install=${pkgname}.install
-options=('!emptydirs')
-source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
- coreutils-uname.patch
- coreutils-pam.patch
- su.pam)
-md5sums=('0f7d43c2d2e24314b43a6c6267e25b90'
- 'c4fcca138b6abf6d443d48a6f0cd8833'
- 'aad79a2aa6d566c375d7bdd1b0767278'
- 'fa85e5cce5d723275b14365ba71a8aad')
-
-build() {
- cd ${srcdir}/${pkgname}-${pkgver}
-
- # added su wheel group pam patch (from fedora git)
- patch -Np1 -i ${srcdir}/coreutils-pam.patch
-
- # linux specific uname improvement (from gentoo portage)
- patch -Np1 -i ${srcdir}/coreutils-uname.patch
-
- autoreconf -v
- ./configure --prefix=/usr \
- --enable-install-program=su \
- --enable-no-install-program=groups,hostname,kill,uptime \
- --enable-pam
- make
-}
-
-check() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make RUN_EXPENSIVE_TESTS=yes check
-}
-
-package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
-
- cd ${pkgdir}/usr/bin
- install -dm755 ${pkgdir}/{bin,usr/sbin}
-
- # binaries required by FHS
- _fhs="cat chgrp chmod chown cp date dd df echo false ln ls \
- mkdir mknod mv pwd rm rmdir stty su sync true uname"
- mv ${_fhs} ${pkgdir}/bin
-
- # binaries required by various Arch scripts
- _bin="cut dir dircolors du install mkfifo readlink shred \
- sleep touch tr vdir"
- mv ${_bin} ${pkgdir}/bin
- ln -sf /bin/sleep ${pkgdir}/usr/bin/sleep
-
- mv chroot ${pkgdir}/usr/sbin
- install -Dm644 ${srcdir}/su.pam ${pkgdir}/etc/pam.d/su
-}
diff --git a/testing/coreutils/coreutils-pam.patch b/testing/coreutils/coreutils-pam.patch
deleted file mode 100644
index e61908f3f..000000000
--- a/testing/coreutils/coreutils-pam.patch
+++ /dev/null
@@ -1,428 +0,0 @@
-diff -urNp coreutils-8.4-orig/configure.ac coreutils-8.4/configure.ac
---- coreutils-8.4-orig/configure.ac 2010-01-11 18:20:42.000000000 +0100
-+++ coreutils-8.4/configure.ac 2010-02-12 10:17:46.000000000 +0100
-@@ -126,6 +126,13 @@ if test "$gl_gcc_warnings" = yes; then
- AC_SUBST([GNULIB_WARN_CFLAGS])
- fi
-
-+dnl Give the chance to enable PAM
-+AC_ARG_ENABLE(pam, dnl
-+[ --enable-pam Enable use of the PAM libraries],
-+[AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM])
-+LIB_PAM="-ldl -lpam -lpam_misc"
-+AC_SUBST(LIB_PAM)])
-+
- AC_FUNC_FORK
-
- optional_bin_progs=
-diff -urNp coreutils-8.4-orig/doc/coreutils.texi coreutils-8.4/doc/coreutils.texi
---- coreutils-8.4-orig/doc/coreutils.texi 2010-01-03 18:06:20.000000000 +0100
-+++ coreutils-8.4/doc/coreutils.texi 2010-02-12 10:17:46.000000000 +0100
-@@ -15081,8 +15081,11 @@ to certain shells, etc.).
- @findex syslog
- @command{su} can optionally be compiled to use @code{syslog} to report
- failed, and optionally successful, @command{su} attempts. (If the system
--supports @code{syslog}.) However, GNU @command{su} does not check if the
--user is a member of the @code{wheel} group; see below.
-+supports @code{syslog}.)
-+
-+This version of @command{su} has support for using PAM for
-+authentication. You can edit @file{/etc/pam.d/su} to customize its
-+behaviour.
-
- The program accepts the following options. Also see @ref{Common options}.
-
-@@ -15124,6 +15127,8 @@ environment variables except @env{TERM},
- @env{PATH} to a compiled-in default value. Change to @var{user}'s home
- directory. Prepend @samp{-} to the shell's name, intended to make it
- read its login startup file(s).
-+Additionaly @env{DISPLAY} and @env{XAUTHORITY} environment variables
-+are preserved as well for PAM functionality.
-
- @item -m
- @itemx -p
-@@ -15163,33 +15168,6 @@ Exit status:
- the exit status of the subshell otherwise
- @end display
-
--@cindex wheel group, not supported
--@cindex group wheel, not supported
--@cindex fascism
--@subsection Why GNU @command{su} does not support the @samp{wheel} group
--
--(This section is by Richard Stallman.)
--
--@cindex Twenex
--@cindex MIT AI lab
--Sometimes a few of the users try to hold total power over all the
--rest. For example, in 1984, a few users at the MIT AI lab decided to
--seize power by changing the operator password on the Twenex system and
--keeping it secret from everyone else. (I was able to thwart this coup
--and give power back to the users by patching the kernel, but I
--wouldn't know how to do that in Unix.)
--
--However, occasionally the rulers do tell someone. Under the usual
--@command{su} mechanism, once someone learns the root password who
--sympathizes with the ordinary users, he or she can tell the rest. The
--``wheel group'' feature would make this impossible, and thus cement the
--power of the rulers.
--
--I'm on the side of the masses, not that of the rulers. If you are
--used to supporting the bosses and sysadmins in whatever they do, you
--might find this idea strange at first.
--
--
- @node timeout invocation
- @section @command{timeout}: Run a command with a time limit
-
-diff -urNp coreutils-8.4-orig/src/Makefile.am coreutils-8.4/src/Makefile.am
---- coreutils-8.4-orig/src/Makefile.am 2010-01-03 18:06:20.000000000 +0100
-+++ coreutils-8.4/src/Makefile.am 2010-02-12 10:17:46.000000000 +0100
-@@ -361,7 +361,7 @@ factor_LDADD += $(LIB_GMP)
- uptime_LDADD += $(GETLOADAVG_LIBS)
-
- # for crypt
--su_LDADD += $(LIB_CRYPT)
-+su_LDADD += $(LIB_CRYPT) @LIB_PAM@
-
- # for various ACL functions
- copy_LDADD += $(LIB_ACL)
-diff -urNp coreutils-8.4-orig/src/su.c coreutils-8.4/src/su.c
---- coreutils-8.4-orig/src/su.c 2010-02-12 10:15:15.000000000 +0100
-+++ coreutils-8.4/src/su.c 2010-02-12 10:24:29.000000000 +0100
-@@ -37,6 +37,16 @@
- restricts who can su to UID 0 accounts. RMS considers that to
- be fascist.
-
-+#ifdef USE_PAM
-+
-+ Actually, with PAM, su has nothing to do with whether or not a
-+ wheel group is enforced by su. RMS tries to restrict your access
-+ to a su which implements the wheel group, but PAM considers that
-+ to be fascist, and gives the user/sysadmin the opportunity to
-+ enforce a wheel group by proper editing of /etc/pam.conf
-+
-+#endif
-+
- Compile-time options:
- -DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog.
- -DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog.
-@@ -53,6 +63,15 @@
- #include <pwd.h>
- #include <grp.h>
-
-+#ifdef USE_PAM
-+# include <signal.h>
-+# include <sys/wait.h>
-+# include <sys/fsuid.h>
-+# include <unistd.h>
-+# include <security/pam_appl.h>
-+# include <security/pam_misc.h>
-+#endif /* USE_PAM */
-+
- #include "system.h"
- #include "getpass.h"
-
-@@ -120,10 +139,17 @@
- /* The user to become if none is specified. */
- #define DEFAULT_USER "root"
-
-+#ifndef USE_PAM
- char *crypt (char const *key, char const *salt);
-+#endif
-
--static void run_shell (char const *, char const *, char **, size_t)
-+static void run_shell (char const *, char const *, char **, size_t,
-+ const struct passwd *)
-+#ifdef USE_PAM
-+ ;
-+#else
- ATTRIBUTE_NORETURN;
-+#endif
-
- /* If true, pass the `-f' option to the subshell. */
- static bool fast_startup;
-@@ -209,7 +235,26 @@ log_su (struct passwd const *pw, bool su
- }
- #endif
-
-+#ifdef USE_PAM
-+static pam_handle_t *pamh = NULL;
-+static int retval;
-+static struct pam_conv conv = {
-+ misc_conv,
-+ NULL
-+};
-+
-+#define PAM_BAIL_P if (retval) { \
-+ pam_end(pamh, PAM_SUCCESS); \
-+ return 0; \
-+}
-+#define PAM_BAIL_P_VOID if (retval) { \
-+ pam_end(pamh, PAM_SUCCESS); \
-+return; \
-+}
-+#endif
-+
- /* Ask the user for a password.
-+ If PAM is in use, let PAM ask for the password if necessary.
- Return true if the user gives the correct password for entry PW,
- false if not. Return true without asking for a password if run by UID 0
- or if PW has an empty password. */
-@@ -217,6 +262,44 @@ log_su (struct passwd const *pw, bool su
- static bool
- correct_password (const struct passwd *pw)
- {
-+#ifdef USE_PAM
-+ struct passwd *caller;
-+ char *tty_name, *ttyn;
-+ retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh);
-+ PAM_BAIL_P;
-+
-+ if (getuid() != 0 && !isatty(0)) {
-+ fprintf(stderr, "standard in must be a tty\n");
-+ exit(1);
-+ }
-+
-+ caller = getpwuid(getuid());
-+ if(caller != NULL && caller->pw_name != NULL) {
-+ retval = pam_set_item(pamh, PAM_RUSER, caller->pw_name);
-+ PAM_BAIL_P;
-+ }
-+
-+ ttyn = ttyname(0);
-+ if (ttyn) {
-+ if (strncmp(ttyn, "/dev/", 5) == 0)
-+ tty_name = ttyn+5;
-+ else
-+ tty_name = ttyn;
-+ retval = pam_set_item(pamh, PAM_TTY, tty_name);
-+ PAM_BAIL_P;
-+ }
-+ retval = pam_authenticate(pamh, 0);
-+ PAM_BAIL_P;
-+ retval = pam_acct_mgmt(pamh, 0);
-+ if (retval == PAM_NEW_AUTHTOK_REQD) {
-+ /* password has expired. Offer option to change it. */
-+ retval = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
-+ PAM_BAIL_P;
-+ }
-+ PAM_BAIL_P;
-+ /* must be authenticated if this point was reached */
-+ return 1;
-+#else /* !USE_PAM */
- char *unencrypted, *encrypted, *correct;
- #if HAVE_GETSPNAM && HAVE_STRUCT_SPWD_SP_PWDP
- /* Shadow passwd stuff for SVR3 and maybe other systems. */
-@@ -241,6 +324,7 @@ correct_password (const struct passwd *p
- encrypted = crypt (unencrypted, correct);
- memset (unencrypted, 0, strlen (unencrypted));
- return STREQ (encrypted, correct);
-+#endif /* !USE_PAM */
- }
-
- /* Update `environ' for the new shell based on PW, with SHELL being
-@@ -254,12 +338,18 @@ modify_environment (const struct passwd
- /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH.
- Unset all other environment variables. */
- char const *term = getenv ("TERM");
-+ char const *display = getenv ("DISPLAY");
-+ char const *xauthority = getenv ("XAUTHORITY");
- if (term)
- term = xstrdup (term);
- environ = xmalloc ((6 + !!term) * sizeof (char *));
- environ[0] = NULL;
- if (term)
- xsetenv ("TERM", term);
-+ if (display)
-+ xsetenv ("DISPLAY", display);
-+ if (xauthority)
-+ xsetenv ("XAUTHORITY", xauthority);
- xsetenv ("HOME", pw->pw_dir);
- xsetenv ("SHELL", shell);
- xsetenv ("USER", pw->pw_name);
-@@ -292,8 +382,13 @@ change_identity (const struct passwd *pw
- {
- #ifdef HAVE_INITGROUPS
- errno = 0;
-- if (initgroups (pw->pw_name, pw->pw_gid) == -1)
-+ if (initgroups (pw->pw_name, pw->pw_gid) == -1) {
-+#ifdef USE_PAM
-+ pam_close_session(pamh, 0);
-+ pam_end(pamh, PAM_ABORT);
-+#endif
- error (EXIT_CANCELED, errno, _("cannot set groups"));
-+ }
- endgrent ();
- #endif
- if (setgid (pw->pw_gid))
-@@ -302,6 +397,31 @@ change_identity (const struct passwd *pw
- error (EXIT_CANCELED, errno, _("cannot set user id"));
- }
-
-+#ifdef USE_PAM
-+static int caught=0;
-+/* Signal handler for parent process later */
-+static void su_catch_sig(int sig)
-+{
-+ ++caught;
-+}
-+
-+int
-+pam_copyenv (pam_handle_t *pamh)
-+{
-+ char **env;
-+
-+ env = pam_getenvlist(pamh);
-+ if(env) {
-+ while(*env) {
-+ if (putenv (*env))
-+ xalloc_die ();
-+ env++;
-+ }
-+ }
-+ return(0);
-+}
-+#endif
-+
- /* Run SHELL, or DEFAULT_SHELL if SHELL is empty.
- If COMMAND is nonzero, pass it to the shell with the -c option.
- Pass ADDITIONAL_ARGS to the shell as more arguments; there
-@@ -309,17 +429,49 @@ change_identity (const struct passwd *pw
-
- static void
- run_shell (char const *shell, char const *command, char **additional_args,
-- size_t n_additional_args)
-+ size_t n_additional_args, const struct passwd *pw)
- {
- size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1;
- char const **args = xnmalloc (n_args, sizeof *args);
- size_t argno = 1;
-+#ifdef USE_PAM
-+ int child;
-+ sigset_t ourset;
-+ int status;
-+
-+ retval = pam_open_session(pamh,0);
-+ if (retval != PAM_SUCCESS) {
-+ fprintf (stderr, "could not open session\n");
-+ exit (1);
-+ }
-+
-+/* do this at the last possible moment, because environment variables may
-+ be passed even in the session phase
-+*/
-+ if(pam_copyenv(pamh) != PAM_SUCCESS)
-+ fprintf (stderr, "error copying PAM environment\n");
-+
-+ /* Credentials should be set in the parent */
-+ if (pam_setcred(pamh, PAM_ESTABLISH_CRED) != PAM_SUCCESS) {
-+ pam_close_session(pamh, 0);
-+ fprintf(stderr, "could not set PAM credentials\n");
-+ exit(1);
-+ }
-+
-+ child = fork();
-+ if (child == 0) { /* child shell */
-+ change_identity (pw);
-+ pam_end(pamh, 0);
-+#endif
-
- if (simulate_login)
- {
- char *arg0;
- char *shell_basename;
-
-+ if(chdir(pw->pw_dir))
-+ error(0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
-+
- shell_basename = last_component (shell);
- arg0 = xmalloc (strlen (shell_basename) + 2);
- arg0[0] = '-';
-@@ -344,6 +496,67 @@ run_shell (char const *shell, char const
- error (0, errno, "%s", shell);
- exit (exit_status);
- }
-+#ifdef USE_PAM
-+ } else if (child == -1) {
-+ fprintf(stderr, "can not fork user shell: %s", strerror(errno));
-+ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
-+ pam_close_session(pamh, 0);
-+ pam_end(pamh, PAM_ABORT);
-+ exit(1);
-+ }
-+ /* parent only */
-+ sigfillset(&ourset);
-+ if (sigprocmask(SIG_BLOCK, &ourset, NULL)) {
-+ fprintf(stderr, "%s: signal malfunction\n", PROGRAM_NAME);
-+ caught = 1;
-+ }
-+ if (!caught) {
-+ struct sigaction action;
-+ action.sa_handler = su_catch_sig;
-+ sigemptyset(&action.sa_mask);
-+ action.sa_flags = 0;
-+ sigemptyset(&ourset);
-+ if (sigaddset(&ourset, SIGTERM)
-+ || sigaddset(&ourset, SIGALRM)
-+ || sigaction(SIGTERM, &action, NULL)
-+ || sigprocmask(SIG_UNBLOCK, &ourset, NULL)) {
-+ fprintf(stderr, "%s: signal masking malfunction\n", PROGRAM_NAME);
-+ caught = 1;
-+ }
-+ }
-+ if (!caught) {
-+ do {
-+ int pid;
-+
-+ pid = waitpid(-1, &status, WUNTRACED);
-+
-+ if (((pid_t)-1 != pid) && (0 != WIFSTOPPED (status))) {
-+ kill(getpid(), WSTOPSIG(status));
-+ /* once we get here, we must have resumed */
-+ kill(pid, SIGCONT);
-+ }
-+ } while (0 != WIFSTOPPED(status));
-+ }
-+
-+ if (caught) {
-+ fprintf(stderr, "\nSession terminated, killing shell...");
-+ kill (child, SIGTERM);
-+ }
-+ /* Not checking retval on this because we need to call close session */
-+ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
-+ retval = pam_close_session(pamh, 0);
-+ PAM_BAIL_P_VOID;
-+ retval = pam_end(pamh, PAM_SUCCESS);
-+ PAM_BAIL_P_VOID;
-+ if (caught) {
-+ sleep(2);
-+ kill(child, SIGKILL);
-+ fprintf(stderr, " ...killed.\n");
-+ exit(-1);
-+ }
-+ exit ((0 != WIFEXITED (status)) ? WEXITSTATUS (status)
-+ : WTERMSIG (status) + 128);
-+#endif /* USE_PAM */
- }
-
- /* Return true if SHELL is a restricted shell (one not returned by
-@@ -511,9 +724,9 @@ main (int argc, char **argv)
- shell = xstrdup (shell ? shell : pw->pw_shell);
- modify_environment (pw, shell);
-
-+#ifndef USE_PAM
- change_identity (pw);
-- if (simulate_login && chdir (pw->pw_dir) != 0)
-- error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
-+#endif
-
- /* error() flushes stderr, but does not check for write failure.
- Normally, we would catch this via our atexit() hook of
-@@ -523,5 +736,5 @@ main (int argc, char **argv)
- if (ferror (stderr))
- exit (EXIT_CANCELED);
-
-- run_shell (shell, command, argv + optind, MAX (0, argc - optind));
-+ run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw);
- }
diff --git a/testing/coreutils/coreutils-uname.patch b/testing/coreutils/coreutils-uname.patch
deleted file mode 100644
index b458abeba..000000000
--- a/testing/coreutils/coreutils-uname.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-On linux platforms, grok /proc/cpuinfo for the CPU/vendor info.
-
-Prob not suitable for upstream seeing as how it's 100% linux-specific
-http://lists.gnu.org/archive/html/bug-coreutils/2005-09/msg00063.html
-
-Patch originally by Carlos E. Gorges <carlos@techlinux.com.br>, but
-heavily reworked to suck less.
-
-To add support for additional platforms, check out the show_cpuinfo()
-func in the linux/arch/<ARCH>/ source tree of the kernel.
-
---- coreutils/src/uname.c
-+++ coreutils/src/uname.c
-@@ -50,6 +50,11 @@
- # include <mach-o/arch.h>
- #endif
-
-+#if defined(__linux__)
-+# define USE_PROCINFO
-+# define UNAME_HARDWARE_PLATFORM
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "quote.h"
-@@ -138,6 +143,117 @@
- exit (status);
- }
-
-+#if defined(USE_PROCINFO)
-+
-+# if defined(__s390__) || defined(__s390x__)
-+# define CPUINFO_FILE "/proc/sysinfo"
-+# define CPUINFO_FORMAT "%64[^\t :]%*[ :]%256[^\n]%c"
-+# else
-+# define CPUINFO_FILE "/proc/cpuinfo"
-+# define CPUINFO_FORMAT "%64[^\t:]\t:%256[^\n]%c"
-+# endif
-+
-+# define PROCINFO_PROCESSOR 0
-+# define PROCINFO_HARDWARE_PLATFORM 1
-+
-+static void __eat_cpuinfo_space(char *buf)
-+{
-+ /* first eat trailing space */
-+ char *tmp = buf + strlen(buf) - 1;
-+ while (tmp > buf && isspace(*tmp))
-+ *tmp-- = '\0';
-+ /* then eat leading space */
-+ tmp = buf;
-+ while (*tmp && isspace(*tmp))
-+ tmp++;
-+ if (tmp != buf)
-+ memmove(buf, tmp, strlen(tmp)+1);
-+ /* finally collapse whitespace */
-+ tmp = buf;
-+ while (tmp[0] && tmp[1]) {
-+ if (isspace(tmp[0]) && isspace(tmp[1])) {
-+ memmove(tmp, tmp+1, strlen(tmp));
-+ continue;
-+ }
-+ ++tmp;
-+ }
-+}
-+
-+static int __linux_procinfo(int x, char *fstr, size_t s)
-+{
-+ FILE *fp;
-+
-+ char *procinfo_keys[] = {
-+ /* --processor --hardware-platform */
-+ #if defined(__alpha__)
-+ "cpu model", "system type"
-+ #elif defined(__arm__)
-+ "Processor", "Hardware"
-+ #elif defined(__avr32__)
-+ "processor", "cpu family"
-+ #elif defined(__bfin__)
-+ "CPU", "BOARD Name"
-+ #elif defined(__cris__)
-+ "cpu", "cpu model"
-+ #elif defined(__frv__)
-+ "CPU-Core", "System"
-+ #elif defined(__i386__) || defined(__x86_64__)
-+ "model name", "vendor_id"
-+ #elif defined(__ia64__)
-+ "family", "vendor"
-+ #elif defined(__hppa__)
-+ "cpu", "model"
-+ #elif defined(__m68k__)
-+ "CPU", "MMU"
-+ #elif defined(__mips__)
-+ "cpu model", "system type"
-+ #elif defined(__powerpc__) || defined(__powerpc64__)
-+ "cpu", "machine"
-+ #elif defined(__s390__) || defined(__s390x__)
-+ "Type", "Manufacturer"
-+ #elif defined(__sh__)
-+ "cpu type", "machine"
-+ #elif defined(sparc) || defined(__sparc__)
-+ "type", "cpu"
-+ #elif defined(__vax__)
-+ "cpu type", "cpu"
-+ #else
-+ "unknown", "unknown"
-+ #endif
-+ };
-+
-+ if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
-+ char key[65], value[257], eol, *ret = NULL;
-+
-+ while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
-+ __eat_cpuinfo_space(key);
-+ if (!strcmp(key, procinfo_keys[x])) {
-+ __eat_cpuinfo_space(value);
-+ ret = value;
-+ break;
-+ }
-+ if (eol != '\n') {
-+ /* we need two fscanf's here in case the previous
-+ * length limit caused us to read right up to the
-+ * newline ... doing "%*[^\n]\n" wont eat the newline
-+ */
-+ fscanf(fp, "%*[^\n]");
-+ fscanf(fp, "\n");
-+ }
-+ }
-+ fclose(fp);
-+
-+ if (ret) {
-+ strncpy(fstr, ret, s);
-+ return 0;
-+ }
-+ }
-+
-+ return -1;
-+}
-+
-+#endif
-+
- /* Print ELEMENT, preceded by a space if something has already been
- printed. */
-
-@@ -250,10 +344,14 @@ main (int argc, char **argv)
- if (toprint & PRINT_PROCESSOR)
- {
- char const *element = unknown;
--#if HAVE_SYSINFO && defined SI_ARCHITECTURE
-+#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
- {
- static char processor[257];
-+#if defined(USE_PROCINFO)
-+ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
-+#else
- if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
-+#endif
- element = processor;
- }
- #endif
-@@ -306,9 +404,13 @@ main (int argc, char **argv)
- if (element == unknown)
- {
- static char hardware_platform[257];
-+#if defined(USE_PROCINFO)
-+ if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
-+#else
- size_t s = sizeof hardware_platform;
- static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
- if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
-+#endif
- element = hardware_platform;
- }
- #endif
diff --git a/testing/coreutils/coreutils.install b/testing/coreutils/coreutils.install
deleted file mode 100644
index 8caae6686..000000000
--- a/testing/coreutils/coreutils.install
+++ /dev/null
@@ -1,21 +0,0 @@
-infodir=usr/share/info
-filelist=(coreutils.info)
-
-post_install() {
- [ -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
-}
-
-post_upgrade() {
- post_install $1
-}
-
-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/coreutils/su.pam b/testing/coreutils/su.pam
deleted file mode 100644
index cf15f40f1..000000000
--- a/testing/coreutils/su.pam
+++ /dev/null
@@ -1,9 +0,0 @@
-#%PAM-1.0
-auth sufficient pam_rootok.so
-# Uncomment the following line to implicitly trust users in the "wheel" group.
-#auth sufficient pam_wheel.so trust use_uid
-# Uncomment the following line to require a user to be in the "wheel" group.
-#auth required pam_wheel.so use_uid
-auth required pam_unix.so
-account required pam_unix.so
-session required pam_unix.so
diff --git a/testing/dvdrip/PKGBUILD b/testing/dvdrip/PKGBUILD
deleted file mode 100644
index 119a2a1d9..000000000
--- a/testing/dvdrip/PKGBUILD
+++ /dev/null
@@ -1,40 +0,0 @@
-# $Id: PKGBUILD 126069 2011-06-01 10:23:05Z foutrelis $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: Fredrik Hammar <Horney_C86@Hotmail.com>
-
-pkgname=dvdrip
-pkgver=0.98.11
-pkgrel=8
-pkgdesc="A Gtk frontend for transcode writen in Perl"
-arch=('i686' 'x86_64')
-license=('custom')
-url="http://www.exit1.org/dvdrip/"
-install=${pkgname}.install
-depends=('perl-gtk2-ex-formfactory' 'transcode' 'imagemagick'
- 'perl-libintl-perl' 'desktop-file-utils' 'perl-event-execflow')
-optdepends=('ogmtools: for ogm/odd video creation'
- 'lsdvd: fast reading of DVD table')
-source=(http://www.exit1.org/dvdrip/dist/${pkgname}-${pkgver}.tar.gz \
- ${pkgname}.desktop)
-options=('!emptydirs' '!makeflags')
-md5sums=('6dfa4199d451757a37eea233a07da4c0'
- 'e91cf411928fd0500d07a0022b4ef546')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make install DESTDIR="${pkgdir}"
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-
- install -Dm644 ${srcdir}/${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- install -Dm 644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
diff --git a/testing/dvdrip/dvdrip.desktop b/testing/dvdrip/dvdrip.desktop
deleted file mode 100644
index dd19b4aae..000000000
--- a/testing/dvdrip/dvdrip.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=dvd::rip
-Comment=DVD Ripper and Encoder - Backup and compression utility for DVDs
-Exec=/usr/bin/vendor_perl/dvdrip
-Icon=/usr/share/perl5/vendor_perl/Video/DVDRip/icon.xpm
-Terminal=false
-Type=Application
-Categories=Application;AudioVideo;Video;
diff --git a/testing/dvdrip/dvdrip.install b/testing/dvdrip/dvdrip.install
deleted file mode 100644
index e111ef946..000000000
--- a/testing/dvdrip/dvdrip.install
+++ /dev/null
@@ -1,11 +0,0 @@
-post_install() {
- update-desktop-database -q
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
diff --git a/testing/frozen-bubble/PKGBUILD b/testing/frozen-bubble/PKGBUILD
deleted file mode 100644
index fb21cbd21..000000000
--- a/testing/frozen-bubble/PKGBUILD
+++ /dev/null
@@ -1,41 +0,0 @@
-# $Id: PKGBUILD 127529 2011-06-15 21:23:24Z remy $
-# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
-# Contributor: Allan McRae <allan@archlinux.org>
-# Contributor: Brandon Niemczyk <maccorin@cfl.rr.com>
-
-pkgname=frozen-bubble
-_pkgver=2.2.1-beta1
-pkgver=${_pkgver/-/}
-pkgrel=3
-pkgdesc="A game in which you throw colorful bubbles and build groups to destroy the bubbles"
-arch=(i686 x86_64)
-url="http://www.frozen-bubble.org"
-license=(GPL2)
-depends=(perl-sdl perl-ipc-system-simple perl-compress-bzip2 perl-file-which)
-makedepends=(perl-file-slurp perl-locale-maketext-lexicon)
-options=('!emptydirs')
-source=(http://www.frozen-bubble.org/data/$pkgname-$_pkgver.tar.bz2 \
- frozen-bubble.desktop)
-md5sums=('825cc23ed806838b9d86de9982a5687a'
- '01b10b77ba6ad856f5c199121c582272')
-
-build() {
- cd "$srcdir/$pkgname-$_pkgver"
- unset CFLAGS
- # install module in vendor directories
- perl Build.PL installdirs=vendor
- perl Build
-}
-
-check() {
- cd "$srcdir/$pkgname-$_pkgver"
- perl Build test
-}
-
-package() {
- cd "$srcdir/$pkgname-$_pkgver"
- perl Build install destdir="$pkgdir"
-
- install -D -m644 share/icons/frozen-bubble-icon-64x64.png "$pkgdir/usr/share/pixmaps/frozen-bubble.png"
- install -D -m644 "$srcdir/frozen-bubble.desktop" "$pkgdir/usr/share/applications/frozen-bubble.desktop"
-}
diff --git a/testing/frozen-bubble/frozen-bubble.desktop b/testing/frozen-bubble/frozen-bubble.desktop
deleted file mode 100644
index 76a7bcd88..000000000
--- a/testing/frozen-bubble/frozen-bubble.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Encoding=UTF-8
-Name=Frozen Bubble
-Icon=frozen-bubble.png
-Exec=/usr/bin/vendor_perl/frozen-bubble
-Terminal=false
-Categories=Game;
diff --git a/testing/gconf-perl/PKGBUILD b/testing/gconf-perl/PKGBUILD
deleted file mode 100644
index e4f58af63..000000000
--- a/testing/gconf-perl/PKGBUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# $Id: PKGBUILD 124841 2011-05-24 18:04:05Z remy $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-
-pkgname=gconf-perl
-_realname=Gnome2-GConf
-pkgver=1.044
-pkgrel=5
-pkgdesc="Gnome2-GConf perl bindings for gconf"
-arch=('i686' 'x86_64')
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
-depends=('glib-perl' 'gconf' 'perl>=5.14')
-options=(!emptydirs)
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('ea386003b18f067524833b0eeb271330')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- perl Makefile.PL INSTALLDIRS=vendor
- make
-}
-
-check() {
- cd "${srcdir}/${_realname}-${pkgver}"
- dbus-launch --exit-with-session make test
-}
-
-package() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/ghc/PKGBUILD b/testing/ghc/PKGBUILD
deleted file mode 100644
index a526404af..000000000
--- a/testing/ghc/PKGBUILD
+++ /dev/null
@@ -1,86 +0,0 @@
-# $Id: PKGBUILD 120001 2011-04-18 09:44:35Z 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.0.3
-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)
-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')
-md5sums=('10bc5e9ae1b581404376efb85f260ff3'
- '5a3e0880c80b1dcecf779ff2e63a9c0d')
diff --git a/testing/ghc/build.mk b/testing/ghc/build.mk
deleted file mode 100644
index f918a0f16..000000000
--- a/testing/ghc/build.mk
+++ /dev/null
@@ -1,150 +0,0 @@
-# -----------------------------------------------------------------------------
-# 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
deleted file mode 100644
index 7d56083bc..000000000
--- a/testing/ghc/ghc.install
+++ /dev/null
@@ -1,19 +0,0 @@
-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/git/ChangeLog b/testing/git/ChangeLog
deleted file mode 100644
index 76298e68f..000000000
--- a/testing/git/ChangeLog
+++ /dev/null
@@ -1,53 +0,0 @@
-Simple version bumps are omitted from the following ChangeLog.
-
-2011-05-05 Dan McGee <dan@archlinux.org>
- Version 1.7.5.1-1
- * Byte compile emacs files (FS#20874)
- * Respect CFLAGS/LDFLAGS (FS#23963)
-
-2011-04-27 Dan McGee <dan@archlinux.org>
- Version 1.7.5-1
- * Add missing optdepends for git send-email (FS#20923)
-
-2011-01-05 Dan McGee <dan@archlinux.org>
- Version 1.7.3.5-1
- * More flexible git-daemon RC scripts (FS#20575)
-
-2010-10-01 Allan McRae <allan@archlinux.org>
- Version 1.7.3.1-2
- * Python 2/3 rebuild
-
-2010-06-29 Dan McGee <dan@archlinux.org>
- Version 1.7.1.1-1
- * Add emacs completion files (FS#17968)
- * Add git-daemon RC scripts (FS#19291)
-
-2009-06-05 Dan McGee <dan@archlinux.org>
- Version 1.6.3.2-1
- * Remove gitweb from /usr/share; it needs customization to be helpful
- * Add NO_CROSS_DIRECTORY_HARDLINKS option to build (FS#13683)
-
-2008-09-14 Dan McGee <dan@archlinux.org>
- Version 1.6.0.2-1
- * Moved optional depends from install file to optdepends array
-
-2008-06-15 Dan McGee <dan@archlinux.org>
- Version 1.5.6-1
- * Removed 'cpio' dependency, clone is now a builtin and no longer needs it
-
-2008-02-02 Dan McGee <dan@archlinux.org>
- Version 1.5.4-1
- * Upstream version 1.5.4
- * Enable pthreads support in pack-objects. To use, set the pack.threads
- git config option. Read manpages of pack-objects and config for more
- details.
- * Changelog added (with entries going back a bit).
-
-2008-01-28 Kevin Piche <kevin@archlinux.org>
- Version 1.5.3.7-2
- * Updated for new perl policy (vendor dirs)
- * Change license to GPL2
-
-2007-11-01 Eric Belanger <eric@archlinux.org>
- Version 1.5.3.5-2
- * Fix Perl module location
diff --git a/testing/git/PKGBUILD b/testing/git/PKGBUILD
deleted file mode 100644
index 713c5dd11..000000000
--- a/testing/git/PKGBUILD
+++ /dev/null
@@ -1,85 +0,0 @@
-# $Id: PKGBUILD 126224 2011-06-02 19:12:58Z dan $
-# Maintainer: Dan McGee <dan@archlinux.org>
-
-pkgname=git
-pkgver=1.7.5.4
-pkgrel=1
-pkgdesc="the fast distributed version control system"
-arch=(i686 x86_64)
-url="http://git-scm.com/"
-license=('GPL2')
-depends=('curl' 'expat>=2.0' 'perl-error' 'perl>=5.12.2')
-makedepends=('python2' 'emacs')
-optdepends=('tk: gitk and git gui'
- 'perl-libwww: git svn'
- 'perl-term-readkey: git svn'
- 'perl-mime-tools: git send-email'
- 'perl-net-smtp-ssl: git send-email TLS support'
- 'perl-authen-sasl: git send-email TLS support'
- 'python2: various helper scripts'
- 'subversion: git svn'
- 'cvsps: git cvsimport')
-replaces=('git-core')
-provides=('git-core')
-backup=('etc/conf.d/git-daemon.conf')
-source=("http://kernel.org/pub/software/scm/git/${pkgname}-${pkgver}.tar.bz2" \
- "http://kernel.org/pub/software/scm/git/git-manpages-${pkgver}.tar.bz2"
- git-daemon
- git-daemon.conf)
-changelog=ChangeLog
-
-build() {
- export PYTHON_PATH='/usr/bin/python2'
- cd "$srcdir/$pkgname-$pkgver"
- make prefix=/usr gitexecdir=/usr/lib/git-core \
- CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
-
- cd contrib/emacs
- make prefix=/usr
-}
-
-package() {
- export PYTHON_PATH='/usr/bin/python2'
- cd "$srcdir/$pkgname-$pkgver"
- make prefix=/usr gitexecdir=/usr/lib/git-core \
- CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
- NO_CROSS_DIRECTORY_HARDLINKS=1 \
- INSTALLDIRS=vendor DESTDIR="$pkgdir" install
-
- # bash completion
- mkdir -p $pkgdir/etc/bash_completion.d/
- install -m644 ./contrib/completion/git-completion.bash "$pkgdir"/etc/bash_completion.d/git
- # more contrib stuff
- cp -a ./contrib $pkgdir/usr/share/git/
- # scripts are for python 2.x
- sed -i 's|#![ ]*/usr/bin/env python|#!/usr/bin/env python2|' \
- $(find "$pkgdir" -name '*.py') \
- "$pkgdir"/usr/share/git/{fast-import/git-p4,gitview/gitview}
-
- # emacs interface
- cd contrib/emacs
- make prefix=/usr DESTDIR="$pkgdir" install
-
- # how 'bout some manpages?
- for mansect in man1 man5 man7; do
- for manpage in "$srcdir"/$mansect/*; do
- install -D -m644 $manpage "$pkgdir"/usr/share/man/$mansect/$(basename $manpage)
- done
- done
-
- # remove perllocal.pod, .packlist, and empty directories.
- rm -rf "$pkgdir"/usr/lib/perl5
-
- # git daemon script
- install -D -m755 "$srcdir"/git-daemon "$pkgdir"/etc/rc.d/git-daemon
- install -D -m644 "$srcdir"/git-daemon.conf "$pkgdir"/etc/conf.d/git-daemon.conf
-}
-
-md5sums=('4985b774db84d3bbcc2b8d90952552a3'
- '7a74ef1c64395a07301359a8707c828a'
- '8e2648910fd5dd4f1c41d3c7fa9e9156'
- '2e42bf97779a1c6411d89043334c9e78')
-sha256sums=('fed9a6c7d07b063cfba9e3eb40fbd0d8120785225289fcf2fb56bee18dffd5ee'
- '87d612195426fedfe4ee5274d9903e8f85aa16c410b4a3ba41610c23ed9211d7'
- '2e0a50bdaf8f387a499895e1c204bff78244eaa72b78187c8a84ef40c0b82598'
- 'e8bfe29d8393d2b87517c4dd56ea834b213aa00bf3d7fcde4ead3457cadbbc68')
diff --git a/testing/git/git-daemon b/testing/git/git-daemon
deleted file mode 100644
index 21ba73ed5..000000000
--- a/testing/git/git-daemon
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-
-daemon_bin="/usr/lib/git-core/git-daemon"
-daemon_name=$(basename $daemon_bin)
-PIDF="/var/run/$daemon_name.pid"
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/$daemon_name.conf
-
-get_pid() {
- pidof -o %PPID $daemon_name
-}
-
-case "$1" in
- start)
- stat_busy "Starting $daemon_name daemon"
-
- PID=$(get_pid)
- if [ -z "$PID" ]; then
- [ -f $PIDF ] && rm -f $PIDF
- # RUN
- $daemon_bin --pid-file=$PIDF $GIT_DAEMON_ARGS
- #
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- echo $(get_pid) > $PIDF
- add_daemon $daemon_name
- stat_done
- fi
- else
- stat_fail
- exit 1
- fi
- ;;
-
- stop)
- stat_busy "Stopping $daemon_name daemon"
- PID=$(get_pid)
- # KILL
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- #
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- rm -f $PIDF &> /dev/null
- rm_daemon $daemon_name
- stat_done
- fi
- ;;
-
- restart)
- $0 stop
- sleep 3
- $0 start
- ;;
-
- status)
- stat_busy "Checking $daemon_name status";
- ck_status $daemon_name
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart|status}"
-esac
-
-exit 0
diff --git a/testing/git/git-daemon.conf b/testing/git/git-daemon.conf
deleted file mode 100644
index 3f9a12060..000000000
--- a/testing/git/git-daemon.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# path to git repositories served
-GIT_REPO="/srv/git/"
-# see `man git-daemon` for all available options
-# $GIT_REPO will be present twice in most configs
-GIT_DAEMON_ARGS="--detach --syslog --verbose --base-path=$GIT_REPO $GIT_REPO"
diff --git a/testing/glade-perl/PKGBUILD b/testing/glade-perl/PKGBUILD
deleted file mode 100644
index 96d77bced..000000000
--- a/testing/glade-perl/PKGBUILD
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Id: PKGBUILD 125153 2011-05-25 19:04:01Z foutrelis $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-
-pkgname=glade-perl
-_realname=Gtk2-GladeXML
-pkgver=1.007
-pkgrel=4
-pkgdesc="Gtk2-GladeXML perl bindings for glade 2.x"
-arch=(i686 x86_64)
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
-depends=('libglade' 'gtk2-perl' 'perl')
-options=('!emptydirs')
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('e6ca234e2a9f0221263acd2a593c583b')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/glib-perl/PKGBUILD b/testing/glib-perl/PKGBUILD
deleted file mode 100644
index 89610fe1e..000000000
--- a/testing/glib-perl/PKGBUILD
+++ /dev/null
@@ -1,33 +0,0 @@
-# $Id: PKGBUILD 124651 2011-05-23 19:33:30Z remy $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-# Contributor: Sarah Hay <sarah@archlinux.org>
-
-pkgname=glib-perl
-_realname=Glib
-pkgver=1.223
-pkgrel=3
-pkgdesc="Perl wrappers for glib 2.x, including GObject"
-arch=(i686 x86_64)
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-options=('!emptydirs')
-depends=('glib2>=2.24.1' 'perl>=5.14')
-makedepends=('perl-extutils-depends>=0.302' 'perl-extutils-pkgconfig>=1.12')
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('cfdeaa8c95448f86c30b505e4701abf1')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- perl Makefile.PL INSTALLDIRS=vendor
- make
-}
-
-check() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make test
-}
-
-package() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/gnome-perl/PKGBUILD b/testing/gnome-perl/PKGBUILD
deleted file mode 100644
index 81f68ee25..000000000
--- a/testing/gnome-perl/PKGBUILD
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Id: PKGBUILD 125159 2011-05-25 19:04:51Z foutrelis $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-
-pkgname=gnome-perl
-_realname=Gnome2
-pkgver=1.042
-pkgrel=6
-pkgdesc="Perl bindings for libgnome"
-arch=('i686' 'x86_64')
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
-depends=('gnomecanvas-perl' 'gnome-vfs-perl' 'libgnomeui' 'perl')
-options=('!emptydirs')
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('eb7b624114e45e54e022a633ffc1cce6')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/gnome-vfs-perl/PKGBUILD b/testing/gnome-vfs-perl/PKGBUILD
deleted file mode 100644
index 3960f5285..000000000
--- a/testing/gnome-vfs-perl/PKGBUILD
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Id: PKGBUILD 125162 2011-05-25 19:05:23Z foutrelis $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-
-pkgname=gnome-vfs-perl
-_realname=Gnome2-VFS
-pkgver=1.081
-pkgrel=4
-pkgdesc="Gnome2-VFS perl bindings for gnome-vfs"
-arch=(i686 x86_64)
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
-depends=('gtk2-perl' 'gnome-vfs' 'perl')
-options=('!emptydirs')
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('3d220cbbe9f1ebc78d7047593f9cd633')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/gnomecanvas-perl/PKGBUILD b/testing/gnomecanvas-perl/PKGBUILD
deleted file mode 100644
index 2563caae4..000000000
--- a/testing/gnomecanvas-perl/PKGBUILD
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Id: PKGBUILD 125156 2011-05-25 19:04:24Z foutrelis $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-
-pkgname=gnomecanvas-perl
-_realname=Gnome2-Canvas
-pkgver=1.002
-pkgrel=8
-pkgdesc="Gnome2-Canvas perl bindings for libgnomecanvas"
-arch=('i686' 'x86_64')
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
-depends=('gtk2-perl' 'libgnomecanvas' 'perl')
-options=(!emptydirs)
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('93405a987ba4bbd03c2f91592b88f5cb')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make install DESTDIR="${pkgdir}"
-}
diff --git a/testing/gnumeric/PKGBUILD b/testing/gnumeric/PKGBUILD
deleted file mode 100644
index 2fd9e4799..000000000
--- a/testing/gnumeric/PKGBUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Id: PKGBUILD 125165 2011-05-25 19:05:49Z foutrelis $
-# Maintainer: Eric Belanger <eric@archlinux.org>
-# Contributor: Kritoke <typeolinux@yahoo.com>
-
-pkgname=gnumeric
-pkgver=1.10.15
-pkgrel=2
-pkgdesc="A GNOME Spreadsheet Program"
-arch=('i686' 'x86_64')
-url="http://www.gnome.org/projects/gnumeric/"
-license=('GPL')
-depends=('goffice' 'gconf' 'desktop-file-utils' 'hicolor-icon-theme')
-makedepends=('intltool' 'python2' 'gnome-doc-utils' 'pygobject' 'psiconv')
-optdepends=('pygobject: for python plugin support'
- 'psiconv: for Psion 5 file support'
- 'yelp: for viewing the help manual')
-install=gnumeric.install
-options=('libtool')
-source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('4343a8e72bd19380d83ab5d4937388b2327e0dbb6187296e66dc7ca2d2b9025a')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
- --disable-schemas-install --enable-ssindex
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-
- install -d "${pkgdir}/usr/share/gconf/schemas"
- gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gnumeric "${pkgdir}"/etc/gconf/schemas/*.schemas
- rm -rf "${pkgdir}/etc/gconf"
-}
diff --git a/testing/gnumeric/gnumeric.install b/testing/gnumeric/gnumeric.install
deleted file mode 100644
index 50ee0a7e2..000000000
--- a/testing/gnumeric/gnumeric.install
+++ /dev/null
@@ -1,26 +0,0 @@
-pkgname=gnumeric
-
-post_install() {
- usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
- usr/sbin/gconfpkg --install ${pkgname}
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
- update-desktop-database -q
-}
-
-pre_upgrade() {
- pre_remove $1
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- usr/sbin/gconfpkg --uninstall ${pkgname}
-}
-
-post_remove() {
- usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
- update-desktop-database -q
-}
diff --git a/testing/graphviz/LICENSE b/testing/graphviz/LICENSE
deleted file mode 100644
index 16cc69a52..000000000
--- a/testing/graphviz/LICENSE
+++ /dev/null
@@ -1,87 +0,0 @@
-Eclipse Public License - v 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
-
-b) in the case of each subsequent Contributor:
-
-i) changes to the Program, and
-
-ii) additions to the Program;
-
-where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-
-b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-
-b) its license agreement:
-
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-
-ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-
-b) a copy of this Agreement must be included with each copy of the Program.
-
-Contributors may not remove or alter any copyright notices contained within the Program.
-
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
diff --git a/testing/graphviz/PKGBUILD b/testing/graphviz/PKGBUILD
deleted file mode 100644
index c31b3977d..000000000
--- a/testing/graphviz/PKGBUILD
+++ /dev/null
@@ -1,50 +0,0 @@
-# $Id: PKGBUILD 124548 2011-05-22 22:43:30Z bisson $
-# Maintainer: kevin <kevin@archlinux.org>
-# Maintainer: Gaetan Bisson <bisson@archlinux.org>
-# Contributor: John Proctor <jproctor@prium.net>
-
-pkgname=graphviz
-pkgver=2.28.0
-pkgrel=2
-pkgdesc='Graph visualization software'
-url='http://www.graphviz.org/'
-license=('custom:EPL')
-arch=('i686' 'x86_64')
-depends=('gd' 'librsvg' 'libxaw' 'ghostscript' 'pango')
-makedepends=('swig' 'mono' 'guile' 'lua' 'ocaml' 'perl' 'php' 'python2' 'r' 'ruby' 'tk')
-optdepends=('mono: sharp bindings'
- 'guile: guile bindings'
- 'lua: lua bindings'
- 'ocaml: ocaml bindings'
- 'perl: perl bindings'
- 'php: php bindings'
- 'python2: python bindings'
- 'r: r bindings'
- 'ruby: ruby bindings'
- 'tcl: tcl bindings')
-source=("${url}/pub/${pkgname}/stable/SOURCES/${pkgname}-${pkgver}.tar.gz"
- 'LICENSE')
-sha1sums=('4725d88a13e071ee22e632de551d4a55ca08ee7d'
- 'e78277e502c29abb74b9587a5dc951ec392554ea')
-
-options=('!libtool')
-install=install
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- sed -i "/RUBY_INCLUDES=\"/s|\"$| `eval echo -I/usr/include/ruby-1.9.1/{$CARCH-linux,ruby/backward,}`\"|" configure
- sed -i '/LIBPOSTFIX="64"/d' configure
- export PYTHON=python2
-
- ./configure --prefix=/usr
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-
- # cf. http://www.graphviz.org/License.php
- install -Dm644 ../LICENSE "${pkgdir}"/usr/share/licenses/graphviz/LICENSE
-}
diff --git a/testing/graphviz/install b/testing/graphviz/install
deleted file mode 100644
index 00510e3f6..000000000
--- a/testing/graphviz/install
+++ /dev/null
@@ -1,17 +0,0 @@
-# arg 1: the new package version
-post_install() {
- # Create plugin config /usr/lib/graphviz/config6
- rm -f usr/lib/graphviz/config{,6}
- usr/bin/dot -c
-}
-
-# arg 1: the new package version
-# arg 2: the old package version
-post_upgrade() {
- post_install $1
-}
-
-# arg 1: the old package version
-pre_remove() {
- rm -f usr/lib/graphviz/config{,6}
-}
diff --git a/testing/gtk2-perl/PKGBUILD b/testing/gtk2-perl/PKGBUILD
deleted file mode 100644
index 215b21109..000000000
--- a/testing/gtk2-perl/PKGBUILD
+++ /dev/null
@@ -1,25 +0,0 @@
-# $Id: PKGBUILD 124902 2011-05-25 01:27:30Z foutrelis $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-# Contributor: Sarah Hay <sarah@archlinux.org>
-
-pkgname=gtk2-perl
-_realname=Gtk2
-pkgver=1.222
-pkgrel=3
-pkgdesc="Gtk2-Perl allows Perl developers to write GTK+ 2.x applications."
-arch=(i686 x86_64)
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
-depends=('gtk2' 'pango-perl')
-options=('!emptydirs')
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('8f8a170b33dc2cf4e69769e97c05185a')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make install DESTDIR="${pkgdir}"
-}
diff --git a/testing/haddock/PKGBUILD b/testing/haddock/PKGBUILD
deleted file mode 100644
index e061249d3..000000000
--- a/testing/haddock/PKGBUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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
deleted file mode 100644
index 278da355e..000000000
--- a/testing/haddock/haddock.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index ebee2e82e..000000000
--- a/testing/haskell-cgi/PKGBUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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
deleted file mode 100644
index 533fe4dc5..000000000
--- a/testing/haskell-cgi/haskell-cgi.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index b89f39f8b..000000000
--- a/testing/haskell-deepseq/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index 8ba51eac7..000000000
--- a/testing/haskell-deepseq/haskell-deepseq.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 4a866601d..000000000
--- a/testing/haskell-fgl/PKGBUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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
deleted file mode 100644
index 0da0edb7b..000000000
--- a/testing/haskell-fgl/haskell-fgl.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 5a744ac49..000000000
--- a/testing/haskell-ghc-paths/PKGBUILD
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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
deleted file mode 100644
index 4fd2c6c56..000000000
--- a/testing/haskell-ghc-paths/haskell-ghc-paths.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index a42385959..000000000
--- a/testing/haskell-glut/PKGBUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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
deleted file mode 100644
index 44c7cb3c1..000000000
--- a/testing/haskell-glut/haskell-glut.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 8b9340c4f..000000000
--- a/testing/haskell-haskell-src/PKGBUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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
deleted file mode 100644
index 03ce601bc..000000000
--- a/testing/haskell-haskell-src/haskell-haskell-src.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 10a04cbdf..000000000
--- a/testing/haskell-html/PKGBUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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
deleted file mode 100644
index 768297e0a..000000000
--- a/testing/haskell-html/haskell-html.install
+++ /dev/null
@@ -1,19 +0,0 @@
-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
deleted file mode 100644
index 80fce6663..000000000
--- a/testing/haskell-http/PKGBUILD
+++ /dev/null
@@ -1,40 +0,0 @@
-# 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
deleted file mode 100644
index fdebb1cb8..000000000
--- a/testing/haskell-http/haskell-http.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 634fd49f3..000000000
--- a/testing/haskell-hunit/PKGBUILD
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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
deleted file mode 100644
index ceb108b5b..000000000
--- a/testing/haskell-hunit/haskell-hunit.install
+++ /dev/null
@@ -1,19 +0,0 @@
-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
deleted file mode 100644
index ea29d2633..000000000
--- a/testing/haskell-mtl/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index 9325811e8..000000000
--- a/testing/haskell-mtl/haskell-mtl.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 685e5fe2b..000000000
--- a/testing/haskell-network/PKGBUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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
deleted file mode 100644
index a56c31d0a..000000000
--- a/testing/haskell-network/haskell-network.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index a45b3f303..000000000
--- a/testing/haskell-opengl/PKGBUILD
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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
deleted file mode 100644
index d0f3474b3..000000000
--- a/testing/haskell-opengl/haskell-opengl.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 1191611e8..000000000
--- a/testing/haskell-parallel/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index e6ec0c449..000000000
--- a/testing/haskell-parallel/haskell-parallel.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 516621979..000000000
--- a/testing/haskell-parsec/PKGBUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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
deleted file mode 100644
index dfa0701b9..000000000
--- a/testing/haskell-parsec/haskell-parsec.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 0b6c908d2..000000000
--- a/testing/haskell-platform/PKGBUILD
+++ /dev/null
@@ -1,40 +0,0 @@
-# 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
deleted file mode 100644
index 3da28a0cb..000000000
--- a/testing/haskell-quickcheck/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index c9e12fadc..000000000
--- a/testing/haskell-quickcheck/haskell-quickcheck.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index a28c3daa0..000000000
--- a/testing/haskell-regex-base/PKGBUILD
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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
deleted file mode 100644
index 3ad2fea28..000000000
--- a/testing/haskell-regex-base/haskell-regex-base.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index b0778ac42..000000000
--- a/testing/haskell-regex-compat/PKGBUILD
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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
deleted file mode 100644
index 898c0bba1..000000000
--- a/testing/haskell-regex-compat/haskell-regex-compat.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 69f3773d6..000000000
--- a/testing/haskell-regex-posix/PKGBUILD
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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
deleted file mode 100644
index 2b89fae7b..000000000
--- a/testing/haskell-regex-posix/haskell-regex-posix.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 5f3a97ed7..000000000
--- a/testing/haskell-stm/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index 0283c2fc5..000000000
--- a/testing/haskell-stm/haskell-stm.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index f90006a56..000000000
--- a/testing/haskell-syb/PKGBUILD
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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
deleted file mode 100644
index 080055165..000000000
--- a/testing/haskell-syb/haskell-syb.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index e60891918..000000000
--- a/testing/haskell-text/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index 620db3921..000000000
--- a/testing/haskell-text/haskell-text.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index c14b2eecc..000000000
--- a/testing/haskell-transformers/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index eec2af6e1..000000000
--- a/testing/haskell-transformers/haskell-transformers.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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
deleted file mode 100644
index 63abbbb64..000000000
--- a/testing/haskell-xhtml/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index d03b8a053..000000000
--- a/testing/haskell-xhtml/haskell-xhtml.install
+++ /dev/null
@@ -1,19 +0,0 @@
-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
deleted file mode 100644
index 7aca7312b..000000000
--- a/testing/haskell-zlib/PKGBUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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
deleted file mode 100644
index d387b7b65..000000000
--- a/testing/haskell-zlib/haskell-zlib.install
+++ /dev/null
@@ -1,18 +0,0 @@
-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/imagemagick/PKGBUILD b/testing/imagemagick/PKGBUILD
deleted file mode 100644
index 29f188e18..000000000
--- a/testing/imagemagick/PKGBUILD
+++ /dev/null
@@ -1,81 +0,0 @@
-# $Id: PKGBUILD 126048 2011-06-01 05:22:12Z eric $
-# Maintainer: Eric Bélanger <eric@archlinux.org>
-
-pkgbase=imagemagick
-pkgname=('imagemagick' 'imagemagick-doc')
-pkgver=6.7.0.2
-pkgrel=1
-arch=('i686' 'x86_64')
-url="http://www.imagemagick.org/"
-license=('custom')
-depends=('libtool' 'lcms' 'libxt' 'gcc-libs' 'bzip2' 'xz' 'freetype2' 'fontconfig' \
- 'libxext' 'libjpeg-turbo')
-makedepends=('ghostscript' 'openexr' 'libwmf' 'librsvg' 'libxml2' 'jasper' 'libpng')
-source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz \
- perlmagick.rpath.patch)
-md5sums=('23a53b96b8e75c3ffd8cbbbfc1041b2f'
- 'ff9974decbfe9846f8e347239d87e4eb')
-sha1sums=('ff8e666d58a27af1ce3ab2c5408d10c233a4d809'
- '23405f80904b1de94ebd7bd6fe2a332471b8c283')
-
-build() {
- cd "${srcdir}"/ImageMagick-${pkgver%.*}-${pkgver##*.}
-
- sed '/AC_PATH_XTRA/d' -i configure.ac
- autoreconf
- patch -Np0 -i ../perlmagick.rpath.patch
-
- ./configure --prefix=/usr --sysconfdir=/etc --with-modules --disable-static \
- --enable-openmp --with-wmf --with-openexr --with-xml \
- --with-gslib --with-gs-font-dir=/usr/share/fonts/Type1 \
- --with-perl --with-perl-options="INSTALLDIRS=vendor" \
- --without-gvc --without-djvu --without-autotrace --with-jp2 \
- --without-jbig --without-fpx --without-dps --without-fftw
- make
-}
-
-package_imagemagick() {
- pkgdesc="An image viewing/manipulation program"
- optdepends=('ghostscript: for Ghostscript support'
- 'openexr: for OpenEXR support'
- 'libwmf: for WMF support'
- 'librsvg: for SVG support'
- 'libxml2: for XML support'
- 'jasper: for JPEG-2000 support'
- 'libpng: for PNG support')
- backup=('etc/ImageMagick/coder.xml'
- 'etc/ImageMagick/colors.xml'
- 'etc/ImageMagick/delegates.xml'
- 'etc/ImageMagick/log.xml'
- 'etc/ImageMagick/magic.xml'
- 'etc/ImageMagick/mime.xml'
- 'etc/ImageMagick/policy.xml'
- 'etc/ImageMagick/sRGB.icm'
- 'etc/ImageMagick/thresholds.xml'
- 'etc/ImageMagick/type.xml'
- 'etc/ImageMagick/type-dejavu.xml'
- 'etc/ImageMagick/type-ghostscript.xml'
- 'etc/ImageMagick/type-windows.xml')
- options=('!makeflags' '!docs' 'libtool')
-
- cd "${srcdir}"/ImageMagick-${pkgver%.*}-${pkgver##*.}
- make DESTDIR="${pkgdir}" install
- chmod 755 "${pkgdir}/usr/lib/perl5/vendor_perl/auto/Image/Magick/Magick.so"
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/imagemagick/LICENSE"
- install -Dm644 NOTICE "${pkgdir}/usr/share/licenses/imagemagick/NOTICE"
-
-#Cleaning
- find "${pkgdir}" -name '*.bs' -delete
- rm -f "${pkgdir}"/usr/lib/*.la
-}
-
-package_imagemagick-doc() {
- pkgdesc="The ImageMagick documentation (utilities manuals and libraries API)"
- depends=()
- options=('!makeflags')
-
- cd "${srcdir}"/ImageMagick-${pkgver%.*}-${pkgver##*.}
- make DESTDIR="${pkgdir}" install-data-html
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/imagemagick-doc/LICENSE"
- install -Dm644 NOTICE "${pkgdir}/usr/share/licenses/imagemagick-doc/NOTICE"
-}
diff --git a/testing/imagemagick/perlmagick.rpath.patch b/testing/imagemagick/perlmagick.rpath.patch
deleted file mode 100644
index 958c0f2ee..000000000
--- a/testing/imagemagick/perlmagick.rpath.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- Makefile.in.orig 2009-05-26 16:22:11.000000000 -0300
-+++ Makefile.in 2009-05-26 16:23:27.000000000 -0300
-@@ -10067,6 +10067,7 @@
-
- @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@$(PERLMAKEFILE): perl-sources $(PERLMAKEMAKER)
- @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && @PERL@ Makefile.PL $(PERL_MAKE_OPTIONS)
-+@WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && @SED@ -i 's|LD_RUN_PATH|DIE_LD_RUN_PATH_DIE|g' Makefile
-
- @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@install-exec-perl: $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(PERLMAKEFILE)
- @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && $(MAKE) CC='@CC@' install
diff --git a/testing/irssi/PKGBUILD b/testing/irssi/PKGBUILD
deleted file mode 100644
index bba878633..000000000
--- a/testing/irssi/PKGBUILD
+++ /dev/null
@@ -1,29 +0,0 @@
-# $Id: PKGBUILD 125226 2011-05-25 19:11:10Z foutrelis $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: Dan McGee <dan@archlinux.org>
-
-pkgname=irssi
-pkgver=0.8.15
-pkgrel=5
-pkgdesc="Modular text mode IRC client with Perl scripting"
-arch=('i686' 'x86_64')
-url="http://irssi.org/"
-license=('GPL')
-depends=('glib2' 'openssl' 'perl')
-optdepends=('perl-libwww: for the scriptassist script')
-backup=(etc/irssi.conf)
-source=(http://irssi.org/files/${pkgname}-${pkgver}.tar.bz2)
-options=('!libtool')
-md5sums=('1dcb3f511b88df94b0c996f36668c7da')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- ./configure --prefix=/usr \
- --enable-ipv6 \
- --with-proxy \
- --sysconfdir=/etc \
- --with-perl-lib=vendor
- make
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/libproxy/PKGBUILD b/testing/libproxy/PKGBUILD
deleted file mode 100644
index 7fde7ae6d..000000000
--- a/testing/libproxy/PKGBUILD
+++ /dev/null
@@ -1,41 +0,0 @@
-# $Id: PKGBUILD 24494 2009-01-17 20:42:01Z jgc $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-
-pkgname=libproxy
-pkgver=0.4.6
-pkgrel=7
-pkgdesc="A library that provides automatic proxy configuration management"
-arch=(i686 x86_64)
-license=('LGPL')
-depends=('gcc-libs')
-optdepends=('gconf: GNOME configuration module'
- 'kdelibs: KDE configuration module'
- 'networkmanager: NetworkManager configuration module'
- 'perl: Perl bindings'
- 'python2: Python bindings')
-makedepends=('gconf' 'cmake' 'networkmanager' 'automoc4' 'python2' 'kdelibs' 'perl')
-url="http://libproxy.googlecode.com"
-source=(http://libproxy.googlecode.com/files/${pkgname}-${pkgver}.tar.gz)
-options=('!libtool')
-md5sums=('199c6b120baf1f7258a55f38d5ec74f5')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
- -DLIBEXEC_INSTALL_DIR=/usr/lib/libproxy \
- -DCMAKE_SKIP_RPATH=ON \
- -DPERL_VENDORINSTALL=yes \
- -DCMAKE_BUILD_TYPE=None \
- -DWITH_WEBKIT=OFF \
- -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
- -DCMAKE_C_FLAGS="${CFLAGS}" \
- ..
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}/build"
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/libva/PKGBUILD b/testing/libva/PKGBUILD
deleted file mode 100644
index 3996e0059..000000000
--- a/testing/libva/PKGBUILD
+++ /dev/null
@@ -1,35 +0,0 @@
-# $Id: PKGBUILD 125889 2011-05-31 13:21:31Z ibiru $
-# Maintainer : Ionut Biru <ibiru@archlinux.org>
-pkgname=libva
-pkgver=1.0.13
-pkgrel=1
-pkgdesc="Video Acceleration (VA) API for Linux"
-arch=('i686' 'x86_64')
-url="http://freedesktop.org/wiki/Software/vaapi"
-license=('MIT')
-depends=('libgl' 'libdrm>=2.4.23' 'libxfixes')
-makedepends=('mesa')
-optdepends=('vdpau-video: VDPAU backend for VA API')
-options=('!libtool')
-source=(http://cgit.freedesktop.org/libva/snapshot/${pkgname}-${pkgver}.tar.bz2
- libva-dont-install-tests.patch)
-md5sums=('221207c386129e02fc05827147af7aa6'
- 'd13d1868f2db99bedec1057bbfbd9c61')
-
-build() {
- cd ${srcdir}/${pkgname}-${pkgver}
- patch -Np1 -i "${srcdir}/libva-dont-install-tests.patch"
- ./autogen.sh
- ./configure --prefix=/usr \
- --enable-i965-driver \
- --enable-glx
- make
-}
-
-package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR="${pkgdir}" install
- install -m644 -D COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/testing/libva/libva-dont-install-tests.patch b/testing/libva/libva-dont-install-tests.patch
deleted file mode 100644
index 97f33e32d..000000000
--- a/testing/libva/libva-dont-install-tests.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff -Nur libva-1.0.13.orig/test/basic/Makefile.am libva-1.0.13/test/basic/Makefile.am
---- libva-1.0.13.orig/test/basic/Makefile.am 2011-05-31 13:10:55.021797329 +0000
-+++ libva-1.0.13/test/basic/Makefile.am 2011-05-31 13:11:52.252331062 +0000
-@@ -20,7 +20,7 @@
- # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--bin_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \
-+check_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \
- test_07 test_08 test_09 test_10 test_11
-
- AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
-diff -Nur libva-1.0.13.orig/test/decode/Makefile.am libva-1.0.13/test/decode/Makefile.am
---- libva-1.0.13.orig/test/decode/Makefile.am 2011-05-31 13:10:55.021797329 +0000
-+++ libva-1.0.13/test/decode/Makefile.am 2011-05-31 13:12:12.175851534 +0000
-@@ -20,7 +20,7 @@
- # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--bin_PROGRAMS = mpeg2vldemo
-+check_PROGRAMS = mpeg2vldemo
-
- AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
-
-diff -Nur libva-1.0.13.orig/test/encode/Makefile.am libva-1.0.13/test/encode/Makefile.am
---- libva-1.0.13.orig/test/encode/Makefile.am 2011-05-31 13:10:55.021797329 +0000
-+++ libva-1.0.13/test/encode/Makefile.am 2011-05-31 13:12:35.499399421 +0000
-@@ -20,7 +20,7 @@
- # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--bin_PROGRAMS = h264encode avcenc
-+check_PROGRAMS = h264encode avcenc
-
- AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
-
-diff -Nur libva-1.0.13.orig/test/putsurface/Makefile.am libva-1.0.13/test/putsurface/Makefile.am
---- libva-1.0.13.orig/test/putsurface/Makefile.am 2011-05-31 13:10:55.021797329 +0000
-+++ libva-1.0.13/test/putsurface/Makefile.am 2011-05-31 13:12:48.836190403 +0000
-@@ -20,7 +20,7 @@
- # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--bin_PROGRAMS = putsurface
-+check_PROGRAMS = putsurface
-
- AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
-
diff --git a/testing/mesa/LICENSE b/testing/mesa/LICENSE
deleted file mode 100644
index ae33d2709..000000000
--- a/testing/mesa/LICENSE
+++ /dev/null
@@ -1,82 +0,0 @@
-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
deleted file mode 100644
index edd92d262..000000000
--- a/testing/mesa/PKGBUILD
+++ /dev/null
@@ -1,377 +0,0 @@
-# $Id: PKGBUILD 127284 2011-06-12 11:12:35Z andyrtr $
-# 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') # 'llvm-dri')
-
-_git=true
-#_git=false
-
-if [ "${_git}" = "true" ]; then
- pkgver=7.10.99.git20110612
- else
- pkgver=7.10.2
-fi
-pkgrel=1
-arch=('i686' 'x86_64')
-makedepends=('glproto>=1.4.12' 'pkgconfig' 'libdrm>=2.4.25' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.3' 'libxt>=1.1.1'
- 'gcc-libs>=4.5' 'dri2proto=2.3' 'python2' 'libxml2' 'imake' 'llvm')
-url="http://mesa3d.sourceforge.net"
-license=('custom')
-source=(LICENSE gnome-shell-shader-fix.patch nouveau-fix-header.patch)
-if [ "${_git}" = "true" ]; then
- # mesa git shot from mastee (will become 7.11) branch - see for state: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a00dd974699e369b1eb292103fbde8bc6adfb87
- source=(${source[@]} 'ftp://ftp.archlinux.org/other/mesa/mesa-9a00dd974699e369b1eb292103fbde8bc6adfb87.tar.bz2')
- else
- source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2"
-)
-fi
-md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
- '3ec78f340f9387abd7a37b195e764cbf'
- '67c87b77cc2236b52a3b47dad3fbb5d4'
- '77b10baeba21268d2a65440f99f97c12')
-
-build() {
-if [ "${_git}" = "true" ]; then
- cd ${srcdir}/mesa-*
- autoreconf -vfi
- else
- cd "${srcdir}/Mesa-${pkgver}"
-fi
-
-if [ "${_git}" != "true" ]; then
-#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"
-patch -Np1 -i "${srcdir}/nouveau-fix-header.patch"
-fi
-
-if [ "${_git}" = "true" ]; then
- ./autogen.sh --prefix=/usr \
- --with-dri-driverdir=/usr/lib/xorg/modules/dri \
- --enable-gallium-r300 \
- --enable-gallium-r600 \
- --enable-gallium-nouveau \
- --enable-gallium-llvm \
- --enable-gallium-egl \
- --enable-gallium-swrast \
- --enable-glx-tls \
- --with-driver=dri \
- --enable-xcb \
- --with-state-trackers=dri,glx,egl \
- --disable-glut \
- --enable-gles1 \
- --enable-gles2 \
- --enable-egl \
- --enable-texture-float
- # --enable-gallium-svga \
-
- # --enable-texture-float (enable floating-point textures and renderbuffers) - http://www.phoronix.com/scan.php?page=news_item&px=OTMzMg
- #The source code to implement ARB_texture_float extension is included and can be toggled on at compile time only by those who purchased a license from SGI, or are in a country where the patent does not apply.
-
- #--enable-shared-dricore - http://bugs.gentoo.org/show_bug.cgi?id=357177
-
- 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.25' 'libxxf86vm>=1.1.1' '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 -m644 "${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 -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgles/"
-}
-
-package_libegl() {
- depends=('libgl')
- pkgdesc="Mesa libEGL libraries and headers"
-
-if [ "${_git}" = "true" ]; then
- cd ${srcdir}/mesa-*
- make -C src/gallium/targets/egl DESTDIR="${pkgdir}" install
- 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/"
- 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/"
-if [ "${_git}" != "true" ]; then
- install -m755 -d "${pkgdir}/usr/lib/egl"
- bin/minstall lib/egl/* "${pkgdir}/usr/lib/egl/"
-fi
- 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 -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libegl/"
-}
-
-package_mesa() {
- depends=('libgl' 'libx11>=1.4.3' 'libxt>=1.1.1' 'gcc-libs>=4.5' 'dri2proto=2.3' 'libdrm>=2.4.25' '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 -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
-}
-
-package_ati-dri() {
- depends=("libgl=${pkgver}")
- pkgdesc="Mesa DRI radeon/r200 + Gallium3D r300,r600 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
-}
-
-#package_llvm-dri() {
-# depends=("libgl=${pkgver}")
-# pkgdesc="Mesa common LLVM support"
-
-#if [ "${_git}" = "true" ]; then
-# cd ${srcdir}/mesa-*/src/gallium
-# else
-# cd "${srcdir}/Mesa-${pkgver}/src/gallium"
-#fi
-
- # gallium llvmpipe
-#if [ "${_git}" = "true" ]; then
-# make -C drivers/llvmpipe DESTDIR="${pkgdir}" install
-# #make -C targets/dri-swrast 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
deleted file mode 100644
index 3b3f37591..000000000
--- a/testing/mesa/gnome-shell-shader-fix.patch
+++ /dev/null
@@ -1,535 +0,0 @@
-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/mesa/nouveau-fix-header.patch b/testing/mesa/nouveau-fix-header.patch
deleted file mode 100644
index 38aa996f1..000000000
--- a/testing/mesa/nouveau-fix-header.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 5c102dd94f435e97507213fbd128e50dd15f5f54 Mon Sep 17 00:00:00 2001
-From: Ben Skeggs <bskeggs@redhat.com>
-Date: Mon, 20 Dec 2010 03:39:36 +0000
-Subject: nouveau: fix includes for latest libdrm
-
-Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
----
-diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
-index ab480ca..747b084 100644
---- a/src/gallium/drivers/nouveau/nouveau_winsys.h
-+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
-@@ -10,7 +10,7 @@
- #include "nouveau/nouveau_grobj.h"
- #include "nouveau/nouveau_notifier.h"
- #include "nouveau/nouveau_resource.h"
--#include "nouveau/nouveau_pushbuf.h"
-+#include "nouveau/nv04_pushbuf.h"
-
- #ifndef NV04_PFIFO_MAX_PACKET_LEN
- #define NV04_PFIFO_MAX_PACKET_LEN 2047
-diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
-index ce48022..a99df76 100644
---- a/src/gallium/drivers/nv50/nv50_surface.c
-+++ b/src/gallium/drivers/nv50/nv50_surface.c
-@@ -22,7 +22,7 @@
-
- #define __NOUVEAU_PUSH_H__
- #include <stdint.h>
--#include "nouveau/nouveau_pushbuf.h"
-+#include "nouveau/nv04_pushbuf.h"
- #include "nv50_context.h"
- #include "nv50_resource.h"
- #include "pipe/p_defines.h"
-diff --git a/src/gallium/drivers/nvfx/nv04_2d.c b/src/gallium/drivers/nvfx/nv04_2d.c
-index e0e65e7..e2fadd3 100644
---- a/src/gallium/drivers/nvfx/nv04_2d.c
-+++ b/src/gallium/drivers/nvfx/nv04_2d.c
-@@ -34,11 +34,11 @@
- #include <stdio.h>
- #include <stdint.h>
- #include <nouveau/nouveau_device.h>
--#include <nouveau/nouveau_pushbuf.h>
- #include <nouveau/nouveau_channel.h>
- #include <nouveau/nouveau_bo.h>
- #include <nouveau/nouveau_notifier.h>
- #include <nouveau/nouveau_grobj.h>
-+#include <nouveau/nv04_pushbuf.h>
- #include "nv04_2d.h"
-
- #include "nouveau/nv_object.xml.h"
-diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
-index 597664e..339b317 100644
---- a/src/gallium/drivers/nvfx/nvfx_vbo.c
-+++ b/src/gallium/drivers/nvfx/nvfx_vbo.c
-@@ -9,8 +9,7 @@
- #include "nvfx_resource.h"
-
- #include "nouveau/nouveau_channel.h"
--
--#include "nouveau/nouveau_pushbuf.h"
-+#include "nouveau/nv04_pushbuf.h"
-
- static inline unsigned
- util_guess_unique_indices_count(unsigned mode, unsigned indices)
-diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
-index 8036b18..c5ac128 100644
---- a/src/mesa/drivers/dri/nouveau/nouveau_driver.h
-+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
-@@ -38,7 +38,6 @@
- #include <assert.h>
-
- #include "nouveau_device.h"
--#include "nouveau_pushbuf.h"
- #include "nouveau_grobj.h"
- #include "nouveau_channel.h"
- #include "nouveau_bo.h"
-@@ -46,6 +45,7 @@
- #include "nouveau_screen.h"
- #include "nouveau_state.h"
- #include "nouveau_surface.h"
-+#include "nv04_pushbuf.h"
-
- #define DRIVER_DATE "20091015"
- #define DRIVER_AUTHOR "Nouveau"
---
-cgit v0.8.3-6-g21f6
diff --git a/testing/moc/PKGBUILD b/testing/moc/PKGBUILD
deleted file mode 100644
index 535afc1a5..000000000
--- a/testing/moc/PKGBUILD
+++ /dev/null
@@ -1,44 +0,0 @@
-# $Id: PKGBUILD 126916 2011-06-08 17:30:45Z eric $
-# Maintainer: Eric Bélanger <eric@archlinux.org>
-
-pkgname=moc
-pkgver=20110528
-pkgrel=2
-pkgdesc="An ncurses console audio player with support for the mp3, ogg, and wave formats"
-arch=('i686' 'x86_64')
-url="http://moc.daper.net/"
-license=('GPL')
-depends=('libmad' 'libid3tag' 'jack' 'curl' 'libsamplerate' 'libtool' 'file')
-makedepends=('speex' 'ffmpeg' 'taglib' 'libmpcdec' 'wavpack' 'libmodplug')
-optdepends=('speex: for using the speex plugin'
- 'ffmpeg: for using the ffmpeg plugin'
- 'taglib: for using the musepack plugin'
- 'libmpcdec: for using the musepack plugin'
- 'wavpack: for using the wavpack plugin'
- 'libmodplug: for using the modplug plugin')
-options=('!libtool')
-source=(ftp://ftp.archlinux.org/other/moc/${pkgname}-${pkgver}.tar.xz \
- gcc-undefined-symbols.diff)
-md5sums=('003fd01af2165264eb666040e4f586cd'
- 'efacb8559e9145e15b0c25f8fa2a9d79')
-sha1sums=('f79049136ce6616bfd6af2f5e08246a5921441cf'
- 'a811a4ac7e049914aab528d3f06a6be6634c2720')
-
-build() {
- cd "${srcdir}/${pkgname}"
- patch -p0 -i ../gcc-undefined-symbols.diff
-
-# Disabling aac to use the external ffmpeg to play them (FS#13164)
- ./autogen.sh
- ./configure --prefix=/usr --without-rcc --without-aac \
- --with-oss --with-alsa --with-jack --with-mp3 \
- --with-musepack --with-vorbis --with-flac --with-wavpack \
- --with-sndfile --with-modplug --with-ffmpeg --with-speex \
- --with-samplerate --with-curl --disable-debug
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}"
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/moc/gcc-undefined-symbols.diff b/testing/moc/gcc-undefined-symbols.diff
deleted file mode 100644
index 09e9b8bda..000000000
--- a/testing/moc/gcc-undefined-symbols.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- decoder.c~ 2011-05-08 09:28:28.077137883 +0200
-+++ decoder.c 2011-05-10 21:40:48.887941968 +0200
-@@ -259,6 +259,9 @@
- for (i = 0; i < plugins_num; i++)
- if (plugins[i].decoder->destroy)
- plugins[i].decoder->destroy ();
-+ for (i = 0; i < plugins_num; i++)
-+ if (plugins[i].handle)
-+ lt_dlclose(plugins[i].handle);
-
- if (lt_dlexit())
- logit ("lt_exit() failed: %s", lt_dlerror());
diff --git a/testing/mod_perl/PKGBUILD b/testing/mod_perl/PKGBUILD
deleted file mode 100644
index 4c76eb05b..000000000
--- a/testing/mod_perl/PKGBUILD
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id: PKGBUILD 126963 2011-06-08 23:54:03Z foutrelis $
-# Maintainer: Firmicus <francois.archlinux.org>
-# Contributor: Tom K <tomk@runbox.com>
-
-pkgname=mod_perl
-pkgver=2.0.5
-pkgrel=4
-pkgdesc="Apache module that embeds the Perl interpreter within the server"
-url="http://search.cpan.org/dist/${pkgname}/"
-depends=('perl' 'apache' 'db' 'apr-util')
-license=('APACHE')
-arch=('i686' 'x86_64')
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/P/PH/PHRED/${pkgname}-${pkgver}.tar.gz)
-md5sums=('03d01d135a122bd8cebd0cd5b185d674')
-
-build() {
- cd ${srcdir}/${pkgname}-${pkgver}
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor MP_APXS=/usr/sbin/apxs
- make
-}
-
-package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make install DESTDIR=${pkgdir}
-}
diff --git a/testing/net-snmp/PKGBUILD b/testing/net-snmp/PKGBUILD
deleted file mode 100644
index 42faa88a3..000000000
--- a/testing/net-snmp/PKGBUILD
+++ /dev/null
@@ -1,43 +0,0 @@
-# $Id: PKGBUILD 125239 2011-05-25 19:13:43Z foutrelis $
-# Maintainer: Eric Belanger <eric@archlinux.org>
-# Contributor: Dale Blount <dale@archlinux.org>
-
-pkgname=net-snmp
-pkgver=5.6.1
-pkgrel=2
-pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6"
-arch=('i686' 'x86_64')
-url="http://www.net-snmp.org/"
-license=('custom')
-depends=('openssl' 'tcp_wrappers' 'libnl')
-makedepends=('setuptools')
-optdepends=('perl-term-readkey: for snmpcheck application'
- 'perl-tk: for snmpcheck and tkmib applications'
- 'python2: for the python modules')
-provides=('ucd-snmp')
-options=('!libtool' '!makeflags' '!emptydirs')
-source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
- 'snmpd.rc')
-md5sums=('b4e30ead5783b0bb1d280172c6095ea4'
- '9f0d13676ba1fae1eb7eb178edd85b43')
-sha1sums=('45bbf1295253d5379a5d1efd918593160387fd00' '2c679b564a2c319d9ce2714a9776aa0e6d89c60a')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${pkgdir}':" Makefile.in
- ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
- --enable-ucd-snmp-compatibility --enable-ipv6 --with-libwrap --with-python-modules \
- --with-default-snmp-version="3" --with-sys-contact="root@localhost" \
- --with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log" \
- --with-mib-modules="host misc/ipfwacc ucd-snmp/diskio tunnel ucd-snmp/dlmod" \
- --with-persistent-directory="/var/net-snmp" \
- PYTHONPROG=/usr/bin/python2
- make NETSNMP_DONT_CHECK_VERSION=1 LDFLAGS+="-Wl,-rpath -Wl,/usr/lib/perl5/core_perl/CORE"
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" INSTALL_PREFIX="${pkgdir}" INSTALLDIRS=vendor install
- install -D -m755 "${srcdir}/snmpd.rc" "${pkgdir}/etc/rc.d/snmpd"
- install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
-}
diff --git a/testing/net-snmp/libnl-2.patch b/testing/net-snmp/libnl-2.patch
deleted file mode 100644
index 7c140fe83..000000000
--- a/testing/net-snmp/libnl-2.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -Nur net-snmp-5.5.orig//agent/mibgroup/mibII/tcpTable.c net-snmp-5.5//agent/mibgroup/mibII/tcpTable.c
---- net-snmp-5.5.orig//agent/mibgroup/mibII/tcpTable.c 2009-06-13 04:02:02.000000000 +0200
-+++ net-snmp-5.5//agent/mibgroup/mibII/tcpTable.c 2011-01-15 10:31:03.579735957 +0100
-@@ -555,8 +555,10 @@
- static int
- tcpTable_load_netlink()
- {
-+ int err;
-+
- /* TODO: perhaps use permanent nl handle? */
-- struct nl_handle *nl = nl_handle_alloc();
-+ struct nl_sock *nl = nl_socket_alloc();
-
- if (nl == NULL) {
- DEBUGMSGTL(("mibII/tcpTable", "Failed to allocate netlink handle\n"));
-@@ -564,10 +566,10 @@
- return -1;
- }
-
-- if (nl_connect(nl, NETLINK_INET_DIAG) < 0) {
-- DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror()));
-- snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror());
-- nl_handle_destroy(nl);
-+ if ((err = nl_connect(nl, NETLINK_INET_DIAG)) < 0) {
-+ DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror(err)));
-+ snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror(err));
-+ nl_socket_free(nl);
- return -1;
- }
-
-@@ -579,10 +581,10 @@
- struct nl_msg *nm = nlmsg_alloc_simple(TCPDIAG_GETSOCK, NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST);
- nlmsg_append(nm, &req, sizeof(struct inet_diag_req), 0);
-
-- if (nl_send_auto_complete(nl, nm) < 0) {
-- DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror()));
-- snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror());
-- nl_handle_destroy(nl);
-+ if ((err = nl_send_auto_complete(nl, nm)) < 0) {
-+ DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror(err)));
-+ snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror(err));
-+ nl_socket_free(nl);
- return -1;
- }
- nlmsg_free(nm);
-@@ -593,9 +595,9 @@
-
- while (running) {
- if ((len = nl_recv(nl, &peer, &buf, NULL)) <= 0) {
-- DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror()));
-- snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror());
-- nl_handle_destroy(nl);
-+ DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror(len)));
-+ snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror(len));
-+ nl_socket_free(nl);
- return -1;
- }
-
-@@ -644,7 +646,7 @@
- free(buf);
- }
-
-- nl_handle_destroy(nl);
-+ nl_socket_free(nl);
-
- if (tcp_head) {
- DEBUGMSGTL(("mibII/tcpTable", "Loaded TCP Table using netlink\n"));
diff --git a/testing/net-snmp/snmpd.rc b/testing/net-snmp/snmpd.rc
deleted file mode 100644
index 9f1b83f64..000000000
--- a/testing/net-snmp/snmpd.rc
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/sbin/snmpd`
-case "$1" in
- start)
- stat_busy "Starting Net-SNMP"
- [ -z "$PID" ] && /usr/sbin/snmpd
- if [ $? -gt 0 ]; then
- stat_fail
- else
- echo $PID > /var/run/snmpd.pid
- add_daemon snmpd
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping Net-SNMP"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm /var/run/snmpd.pid
- rm_daemon snmpd
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 2
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
diff --git a/testing/net-tools/PKGBUILD b/testing/net-tools/PKGBUILD
deleted file mode 100644
index 6a81124ea..000000000
--- a/testing/net-tools/PKGBUILD
+++ /dev/null
@@ -1,44 +0,0 @@
-# $Id: PKGBUILD 127037 2011-06-10 00:48:19Z bisson $
-# Maintainer: judd <jvinet@zeroflux.org>
-pkgname=net-tools
-pkgver=1.60
-pkgrel=18
-pkgdesc="Configuration tools for Linux networking"
-arch=(i686 x86_64)
-license=('GPL')
-url="http://www.tazenda.demon.co.uk/phil/net-tools"
-depends=('glibc')
-source=(http://www.tazenda.demon.co.uk/phil/$pkgname/$pkgname-$pkgver.tar.bz2
- net-tools.patch gcc340.patch net-tools-1.60-2.6-compilefix.patch
- net-tools-1.60-miiioctl.patch
- net-tools-1.60-nameif.patch
- net-tools-1.60-nameif_strncpy.patch)
-options=(!makeflags)
-install=net-tools.install
-
-build() {
- cd $srcdir/$pkgname-$pkgver
- patch -Np1 -i ../net-tools.patch
- patch -Np1 -i ../net-tools-1.60-2.6-compilefix.patch
- patch -Np1 -i ../net-tools-1.60-miiioctl.patch
- patch -Np1 -i ../gcc340.patch
- patch -Np1 -i ${srcdir}/net-tools-1.60-nameif.patch
- patch -Np1 -i ${srcdir}/net-tools-1.60-nameif_strncpy.patch
- yes "" | make
-}
-
-package() {
- cd $srcdir/$pkgname-$pkgver
- make BASEDIR=$pkgdir update
-
- # the following is provided by yp-tools
- rm "${pkgdir}"/bin/{nis,yp}domainname
- rm "${pkgdir}"/usr/share/man/man1/{nis,yp}domainname.1
-}
-md5sums=('888774accab40217dde927e21979c165'
- '7ef8d0c6818faa0fdeea94970a20e3fb'
- 'b52d899cba9956bb0055150506f41ac1'
- '51de6eabe2d6d6dc860f72c41cee636b'
- 'c16109863bc63f3dad4ef35305a340bb'
- '29a32617382fab1735acba4d920f1fcd'
- 'e66466b9304dac85eb42b32f1ec3b284')
diff --git a/testing/net-tools/gcc340.patch b/testing/net-tools/gcc340.patch
deleted file mode 100644
index 8089bf217..000000000
--- a/testing/net-tools/gcc340.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -Naur net-tools-1.60-orig/hostname.c net-tools-1.60/hostname.c
---- net-tools-1.60-orig/hostname.c 2001-04-08 10:04:23.000000000 -0700
-+++ net-tools-1.60/hostname.c 2004-05-07 17:22:14.000000000 -0700
-@@ -78,6 +78,7 @@
- fprintf(stderr, _("%s: name too long\n"), program_name);
- break;
- default:
-+ ;
- }
- exit(1);
- }
-@@ -98,6 +99,7 @@
- fprintf(stderr, _("%s: name too long\n"), program_name);
- break;
- default:
-+ ;
- }
- exit(1);
- };
-@@ -117,6 +119,7 @@
- fprintf(stderr, _("%s: name too long\n"), program_name);
- break;
- default:
-+ ;
- }
- exit(1);
- };
-@@ -174,6 +177,7 @@
- printf("%s\n", hp->h_name);
- break;
- default:
-+ ;
- }
- }
-
-diff -Naur net-tools-1.60-orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c
---- net-tools-1.60-orig/lib/inet_sr.c 2000-02-20 13:46:45.000000000 -0800
-+++ net-tools-1.60/lib/inet_sr.c 2004-05-07 17:20:14.000000000 -0700
-@@ -105,6 +105,7 @@
- case 2:
- isnet = 0; break;
- default:
-+ ;
- }
-
- /* Fill in the other fields. */
diff --git a/testing/net-tools/net-tools-1.60-2.6-compilefix.patch b/testing/net-tools/net-tools-1.60-2.6-compilefix.patch
deleted file mode 100644
index 92ce90128..000000000
--- a/testing/net-tools/net-tools-1.60-2.6-compilefix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -ruN net-tools-1.60.orig/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c
---- net-tools-1.60.orig/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200
-+++ net-tools-1.60/lib/x25_sr.c 2003-10-18 20:33:31.927574928 +0200
-@@ -22,6 +22,7 @@
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- #include <linux/x25.h>
-+#include <linux/version.h>
- #include <ctype.h>
- #include <errno.h>
- #include <netdb.h>
-@@ -77,7 +78,11 @@
- rt.sigdigits=sigdigits;
-
- /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
- memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
-+#else
-+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
-+#endif
-
- while (*args) {
- if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
diff --git a/testing/net-tools/net-tools-1.60-miiioctl.patch b/testing/net-tools/net-tools-1.60-miiioctl.patch
deleted file mode 100644
index 4859273ed..000000000
--- a/testing/net-tools/net-tools-1.60-miiioctl.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001
-+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001
-@@ -11,11 +11,9 @@
-
- /* network interface ioctl's for MII commands */
- #ifndef SIOCGMIIPHY
--#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */
--#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */
--#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */
--#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */
--#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */
-+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */
-+#define SIOCGMIIREG 0x8948 /* Read any PHY register */
-+#define SIOCSMIIREG 0x8949 /* Write any PHY register */
- #endif
-
- #include <linux/types.h>
diff --git a/testing/net-tools/net-tools-1.60-nameif.patch b/testing/net-tools/net-tools-1.60-nameif.patch
deleted file mode 100644
index 54def00c2..000000000
--- a/testing/net-tools/net-tools-1.60-nameif.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- net-tools-1.60/nameif.c.nameif 2000-10-18 19:26:29.000000000 +0200
-+++ net-tools-1.60/nameif.c 2003-03-19 11:02:01.000000000 +0100
-@@ -117,7 +117,8 @@
- }
-
- struct change {
-- struct change *next,**pprev;
-+ struct change *next;
-+ int found;
- char ifname[IFNAMSIZ+1];
- unsigned char mac[6];
- };
-@@ -139,10 +140,7 @@
- ch->ifname, pos);
- if (parsemac(p,ch->mac) < 0)
- complain(_("cannot parse MAC `%s' at %s"), p, pos);
-- if (clist)
-- clist->pprev = &ch->next;
- ch->next = clist;
-- ch->pprev = &clist;
- clist = ch;
- return 0;
- }
-@@ -200,7 +198,7 @@
-
- void usage(void)
- {
-- fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}"));
-+ fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}\n"));
- exit(1);
- }
-
-@@ -277,21 +275,21 @@
- ch = lookupmac(mac);
- if (!ch)
- continue;
--
-- *ch->pprev = ch->next;
-+
-+ ch->found = 1;
- if (strcmp(p, ch->ifname)) {
- if (setname(p, ch->ifname) < 0)
- complain(_("cannot change name of %s to %s: %s"),
- p, ch->ifname, strerror(errno));
- }
-- free(ch);
- }
- fclose(ifh);
-
- while (clist) {
- struct change *ch = clist;
- clist = clist->next;
-- warning(_("interface '%s' not found"), ch->ifname);
-+ if (!ch->found)
-+ warning(_("interface '%s' not found"), ch->ifname);
- free(ch);
- }
-
diff --git a/testing/net-tools/net-tools-1.60-nameif_strncpy.patch b/testing/net-tools/net-tools-1.60-nameif_strncpy.patch
deleted file mode 100644
index 7568e21a2..000000000
--- a/testing/net-tools/net-tools-1.60-nameif_strncpy.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- net-tools-1.60/nameif.c.ncpy 2006-10-03 14:24:21.000000000 +0200
-+++ net-tools-1.60/nameif.c 2006-10-03 14:22:43.000000000 +0200
-@@ -100,8 +100,8 @@
- struct ifreq ifr;
- opensock();
- memset(&ifr,0,sizeof(struct ifreq));
-- strcpy(ifr.ifr_name, oldname);
-- strcpy(ifr.ifr_newname, newname);
-+ strncpy(ifr.ifr_name, oldname, IF_NAMESIZE);
-+ strncpy(ifr.ifr_newname, newname, IF_NAMESIZE);
- return ioctl(ctl_sk, SIOCSIFNAME, &ifr);
- }
-
diff --git a/testing/net-tools/net-tools.patch b/testing/net-tools/net-tools.patch
deleted file mode 100644
index 87e062eb2..000000000
--- a/testing/net-tools/net-tools.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -Naur net-tools-1.60-orig/config.in net-tools-1.60/config.in
---- net-tools-1.60-orig/config.in 2000-05-21 07:32:12.000000000 -0700
-+++ net-tools-1.60/config.in 2004-05-31 12:36:00.000000000 -0700
-@@ -49,7 +49,7 @@
- *
- bool 'UNIX protocol family' HAVE_AFUNIX y
- bool 'INET (TCP/IP) protocol family' HAVE_AFINET y
--bool 'INET6 (IPv6) protocol family' HAVE_AFINET6 n
-+bool 'INET6 (IPv6) protocol family' HAVE_AFINET6 y
- bool 'Novell IPX/SPX protocol family' HAVE_AFIPX y
- bool 'Appletalk DDP protocol family' HAVE_AFATALK y
- bool 'AX25 (packet radio) protocol family' HAVE_AFAX25 y
-@@ -86,6 +86,6 @@
- *
- * Other Features.
- *
--bool 'IP Masquerading support' HAVE_FW_MASQUERADE n
--bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS n
--bool 'Build mii-tool' HAVE_MII n
-+bool 'IP Masquerading support' HAVE_FW_MASQUERADE y
-+bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS y
-+bool 'Build mii-tool' HAVE_MII y
-diff -Naur net-tools-1.60-orig/mii-tool.c net-tools-1.60/mii-tool.c
---- net-tools-1.60-orig/mii-tool.c 2000-05-21 07:31:17.000000000 -0700
-+++ net-tools-1.60/mii-tool.c 2004-05-31 12:35:21.000000000 -0700
-@@ -379,16 +379,16 @@
- /*--------------------------------------------------------------------*/
-
- const char *usage =
--"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]
-- -V, --version display version information
-- -v, --verbose more verbose output
-- -R, --reset reset MII to poweron state
-- -r, --restart restart autonegotiation
-- -w, --watch monitor for link status changes
-- -l, --log with -w, write events to syslog
-- -A, --advertise=media,... advertise only specified media
-- -F, --force=media force specified media technology
--media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
-+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n\
-+ -V, --version display version information\n\
-+ -v, --verbose more verbose output\n\
-+ -R, --reset reset MII to poweron state\n\
-+ -r, --restart restart autonegotiation\n\
-+ -w, --watch monitor for link status changes\n\
-+ -l, --log with -w, write events to syslog\n\
-+ -A, --advertise=media,... advertise only specified media\n\
-+ -F, --force=media force specified media technology\n\
-+media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n\
- (to advertise both HD and FD) 100baseTx, 10baseT\n";
-
- int main(int argc, char **argv)
diff --git a/testing/pango-perl/PKGBUILD b/testing/pango-perl/PKGBUILD
deleted file mode 100644
index ad489dec4..000000000
--- a/testing/pango-perl/PKGBUILD
+++ /dev/null
@@ -1,24 +0,0 @@
-# $Id: PKGBUILD 124899 2011-05-25 01:24:25Z foutrelis $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-
-pkgname=pango-perl
-_realname=Pango
-pkgver=1.221
-pkgrel=4
-pkgdesc="Perl bindings for Pango"
-arch=(i686 x86_64)
-license=('LGPL')
-url="http://gtk2-perl.sourceforge.net/"
-makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
-depends=('pango' 'glib-perl' 'cairo-perl')
-options=('!emptydirs')
-source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
-md5sums=('8d257209aa11bd6c3a2beb235c2f103f')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make install DESTDIR="${pkgdir}"
-}
diff --git a/testing/perl-alien-sdl/PKGBUILD b/testing/perl-alien-sdl/PKGBUILD
deleted file mode 100644
index 25bd18eeb..000000000
--- a/testing/perl-alien-sdl/PKGBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# $Id: PKGBUILD 124820 2011-05-24 15:44:07Z heftig $
-# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
-# Contributor: Allan McRae <allan@archlinux.org>
-# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
-
-# This package must not by "any" arch.
-# Requires rebuild with every change to sdl-config
-
-pkgname=perl-alien-sdl
-_realname=Alien-SDL
-pkgver=1.426
-pkgrel=1
-pkgdesc="Building, finding and using SDL binaries"
-arch=(i686 x86_64)
-license=(PerlArtistic GPL)
-url="http://search.cpan.org/dist/Alien-SDL/"
-depends=(sdl=1.2.14 perl-file-sharedir perl-capture-tiny)
-makedepends=(perl-file-which perl-text-patch)
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/F/FR/FROGGS/$_realname-$pkgver.tar.gz)
-md5sums=('ab5e1167934418f4a7b3285a9d05c89b')
-
-package() {
- cd "$srcdir/$_realname-$pkgver"
-
- # install module in vendor directories
- perl Build.PL installdirs=vendor destdir="$pkgdir" --with-sdl-config
-
- perl Build
- perl Build install
-}
diff --git a/testing/perl-bit-vector/PKGBUILD b/testing/perl-bit-vector/PKGBUILD
deleted file mode 100644
index ebdc0719d..000000000
--- a/testing/perl-bit-vector/PKGBUILD
+++ /dev/null
@@ -1,33 +0,0 @@
-# $Id: PKGBUILD 125243 2011-05-25 19:15:01Z foutrelis $
-# Maintainer: Kevin Piche <kevin@archlinux.org>
-# Contributor: K. Piche <kpiche@rogers.com>
-
-pkgname=perl-bit-vector
-_cpanname=Bit-Vector
-pkgver=7.1
-pkgrel=3
-pkgdesc='Efficient bit vector, set of integers and "big int" math library'
-arch=(i686 x86_64)
-license=('GPL' 'LGPL' 'PerlArtistic')
-url="http://search.cpan.org/dist/${_cpanname}/"
-depends=('perl-carp-clan' 'perl>=5.10.0')
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/S/ST/STBEY/${_cpanname}-${pkgver}.tar.gz)
-md5sums=('164c8574b728f6171b2a6f564fcd2e50')
-
-build() {
- cd ${srcdir}/${_cpanname}-$pkgver
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${_cpanname}-$pkgver
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
diff --git a/testing/perl-compress-bzip2/PKGBUILD b/testing/perl-compress-bzip2/PKGBUILD
deleted file mode 100644
index ad5f788ac..000000000
--- a/testing/perl-compress-bzip2/PKGBUILD
+++ /dev/null
@@ -1,25 +0,0 @@
-# $Id: PKGBUILD 124543 2011-05-22 21:27:46Z angvp $
-# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
-pkgname=perl-compress-bzip2
-_realname=Compress-Bzip2
-pkgver=2.09
-pkgrel=2
-pkgdesc="Interface to Bzip2 compression library"
-arch=(i686 x86_64)
-license=(GPL2)
-depends=(perl bzip2)
-url='http://search.cpan.org/dist/$_realname'
-options=('!emptydirs')
-source=("http://search.cpan.org/CPAN/authors/id/A/AR/ARJAY/$_realname-$pkgver.tar.gz")
-md5sums=('1699fde3e86f2a036f135ae606d456bf')
-
-build() {
- cd "$srcdir/$_realname-$pkgver"
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
-}
-
-package() {
- cd "$srcdir/$_realname-$pkgver"
- make DESTDIR="$pkgdir" install
-}
diff --git a/testing/perl-crypt-ssleay/PKGBUILD b/testing/perl-crypt-ssleay/PKGBUILD
deleted file mode 100644
index 37f315f89..000000000
--- a/testing/perl-crypt-ssleay/PKGBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# $Id: PKGBUILD 125246 2011-05-25 19:15:29Z foutrelis $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: François Charette <firmicus ατ gmx δοτ net>
-
-pkgname=perl-crypt-ssleay
-pkgver=0.58
-pkgrel=3
-pkgdesc="OpenSSL glue that provides LWP https support"
-arch=('i686' 'x86_64')
-url="http://search.cpan.org/dist/Crypt-SSLeay"
-license=('GPL' 'PerlArtistic')
-depends=('openssl')
-options=('!emptydirs')
-source=(http://www.cpan.org/CPAN/authors/id/N/NA/NANIS/Crypt-SSLeay-$pkgver.tar.gz)
-md5sums=('fbf3d12e58462cee00ea63239c0b13c7')
-
-build() {
- cd "${srcdir}/Crypt-SSLeay-${pkgver}"
-
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd "${srcdir}/Crypt-SSLeay-${pkgver}"
- make install DESTDIR="${pkgdir}"
-
- find ${pkgdir} -name '.packlist' -delete
- find ${pkgdir} -name '*.pod' -delete
-}
diff --git a/testing/perl-dbd-mysql/PKGBUILD b/testing/perl-dbd-mysql/PKGBUILD
deleted file mode 100644
index 42d22d211..000000000
--- a/testing/perl-dbd-mysql/PKGBUILD
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id: PKGBUILD 125309 2011-05-25 19:54:00Z remy $
-# Maintainer: kevin <kevin@archlinux.org>
-# Contributor: Eric Johnson <eric@coding-zone.com>
-
-pkgname=perl-dbd-mysql
-_realname=DBD-mysql
-pkgver=4.019
-pkgrel=1
-pkgdesc="Perl/CPAN DBD::mysql module for interacting with MySQL via DBD"
-arch=(i686 x86_64)
-license=('GPL' 'PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('libmysqlclient' 'perl-dbi' 'perl>=5.14.0')
-makedepends=('mysql')
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/${_realname}-${pkgver}.tar.gz)
-md5sums=('566d98ab8ffac9626a31f6f6d455558e')
-
-build() {
- cd ${srcdir}/${_realname}-${pkgver}
-
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor --testsocket=/tmp/socket.mysql
- make
-}
-
-check() {
- cd ${srcdir}/${_realname}-${pkgver}
- mkdir -p /tmp/mysql_test
- mysql_install_db \
- --basedir=/usr \
- --datadir=/tmp/mysql_test
- mysqld -P 17999 \
- --socket=/tmp/socket.mysql \
- --datadir=/tmp/mysql_test &
- sleep 10
- DAEMON_PORT=$!
- make test || true
- kill -9 $DAEMON_PORT
-}
-
-package() {
- cd ${srcdir}/${_realname}-${pkgver}
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
diff --git a/testing/perl-dbd-sqlite/PKGBUILD b/testing/perl-dbd-sqlite/PKGBUILD
deleted file mode 100644
index 298cc2008..000000000
--- a/testing/perl-dbd-sqlite/PKGBUILD
+++ /dev/null
@@ -1,28 +0,0 @@
-# $Id: PKGBUILD 125249 2011-05-25 19:15:53Z foutrelis $
-# Contributor: Tom Killian <tomk@runbox.com>
-# Contributor: francois at archlinux dot org
-
-pkgname=perl-dbd-sqlite
-_cpanname=DBD-SQLite
-pkgver=1.31
-pkgrel=2
-pkgdesc="Self-contained RDBMS in a DBI driver"
-arch=('i686' 'x86_64')
-url="http://search.cpan.org/dist/${_cpanname}"
-license=('GPL' 'PerlArtistic')
-depends=('perl-dbi>=1.61' 'sqlite3')
-options=('!emptydirs')
-source=(http://www.cpan.org/authors/id/A/AD/ADAMK/${_cpanname}-${pkgver}.tar.gz)
-md5sums=('67b3575104efd606c8093bc416e3338d')
-
-build() {
- cd "${srcdir}/${_cpanname}-${pkgver}"
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd "${srcdir}/${_cpanname}-${pkgver}"
- make install DESTDIR="${pkgdir}"
-}
diff --git a/testing/perl-dbi/PKGBUILD b/testing/perl-dbi/PKGBUILD
deleted file mode 100644
index 42f7a5770..000000000
--- a/testing/perl-dbi/PKGBUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# $Id: PKGBUILD 124915 2011-05-25 07:47:08Z foutrelis $
-# Maintainer: kevin <kevin@archlinux.org>
-# Contributor: Matt Thompson <mattt@defunct.ca>
-
-pkgname=perl-dbi
-_realname=DBI
-pkgver=1.616
-pkgrel=2
-pkgdesc="Database independent interface for Perl"
-arch=(i686 x86_64)
-license=('GPL' 'PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl>=5.12.1')
-options=(!emptydirs)
-source=(http://www.cpan.org/authors/id/T/TI/TIMB/${_realname}-${pkgver}.tar.gz)
-md5sums=('799313e54a693beb635b47918458f7c4')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
-
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make install DESTDIR="${pkgdir}"
-}
-
-# vim: ts=2 sw=2 et ft=sh
diff --git a/testing/perl-digest-nilsimsa/PKGBUILD b/testing/perl-digest-nilsimsa/PKGBUILD
deleted file mode 100644
index 40e9ae353..000000000
--- a/testing/perl-digest-nilsimsa/PKGBUILD
+++ /dev/null
@@ -1,35 +0,0 @@
-# $Id: PKGBUILD 125252 2011-05-25 19:16:38Z foutrelis $
-# Maintainer: kevin <kevin@archlinux.org>
-# Contributor: Manolis Tzanidakis
-
-pkgname=perl-digest-nilsimsa
-_realname=Digest-Nilsimsa
-pkgver=0.06
-pkgrel=7
-pkgdesc="Perl version of Nilsimsa code."
-arch=('i686' 'x86_64')
-license=('LGPL')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl>=5.10.0')
-options=(!emptydirs)
-source=(http://www.cpan.org/authors/id/V/VI/VIPUL/${_realname}-${pkgver}.tar.gz)
-replaces=('digest-nilsimsa')
-provides=('digest-nilsimsa')
-md5sums=('08e940bd7f5d1167ef3fd1aa7ce234d7')
-
-build() {
- cd ${srcdir}/${_realname}-${pkgver}
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${_realname}-${pkgver}
- make install DESTDIR=${pkgdir}
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
-# vim: ts=2 sw=2 et ft=sh
diff --git a/testing/perl-digest-sha1/PKGBUILD b/testing/perl-digest-sha1/PKGBUILD
deleted file mode 100644
index eaae5e528..000000000
--- a/testing/perl-digest-sha1/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# $Id: PKGBUILD 125255 2011-05-25 19:17:02Z foutrelis $
-# Maintainer: kevin <kevin@archlinux.org>
-# Contributor: Manolis Tzanidakis
-
-pkgname=perl-digest-sha1
-_realname=Digest-SHA1
-pkgver=2.13
-pkgrel=2
-pkgdesc="Perl interface to the SHA-1 Algorithm"
-arch=(i686 x86_64)
-license=('PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl>=5.10.0')
-options=(!emptydirs)
-source=(http://www.cpan.org/authors/id/G/GA/GAAS/${_realname}-${pkgver}.tar.gz)
-replaces=('digest-sha1')
-provides=('digest-sha1')
-md5sums=('bd22388f268434f2b24f64e28bf1aa35')
-
-build() {
- cd ${srcdir}/${_realname}-${pkgver}
-
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${_realname}-${pkgver}
-
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
-# vim: ts=2 sw=2 et ft=sh
diff --git a/testing/perl-event/PKGBUILD b/testing/perl-event/PKGBUILD
deleted file mode 100644
index 3e20ec4c2..000000000
--- a/testing/perl-event/PKGBUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Id: PKGBUILD 125258 2011-05-25 19:17:24Z foutrelis $
-# Maintainer: tobias <tobias@archlinux.org>
-# Contributor: Tobias Kieslich <tobias@justdreams.de>
-# Contributor: François Charette <francois.archlinux.org>
-
-pkgname=perl-event
-_srcname=Event
-pkgver=1.17
-pkgrel=1
-pkgdesc="Framework for GUI events"
-arch=('i686' 'x86_64')
-license=('PerlArtistic' 'GPL')
-url="http://search.cpan.org/dist/${_srcname}/"
-depends=('perl')
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/J/JP/JPRIT/${_srcname}-${pkgver}.tar.gz)
-md5sums=('c58cdf7c56cd5f10a58b234d2c81295f')
-
-build() {
- cd "${srcdir}/${_srcname}-${pkgver}"
-
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd "${srcdir}/${_srcname}-${pkgver}"
-
- make install DESTDIR="${pkgdir}"
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
diff --git a/testing/perl-fcgi/PKGBUILD b/testing/perl-fcgi/PKGBUILD
deleted file mode 100644
index d44eddf2a..000000000
--- a/testing/perl-fcgi/PKGBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# $Id: PKGBUILD 125303 2011-05-25 19:27:52Z remy $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: François Charette <firmicus ατ gmx δοτ net>
-
-pkgname=perl-fcgi
-pkgver=0.72
-pkgrel=1
-pkgdesc="Fast CGI"
-arch=('i686' 'x86_64')
-url="http://search.cpan.org/dist/FCGI"
-license=('GPL' 'PerlArtistic')
-depends=('perl>=5.14')
-options=('!emptydirs')
-source=(http://www.cpan.org/CPAN/authors/id/F/FL/FLORA/FCGI-${pkgver}.tar.gz)
-md5sums=('7b793e177caa93d972c6fb7ebe7c7ae1')
-
-build() {
- cd "${srcdir}/FCGI-${pkgver}"
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
-}
-
-check() {
- cd "${srcdir}/FCGI-${pkgver}"
- make test
-}
-
-package() {
- cd "${srcdir}/FCGI-${pkgver}"
- make install DESTDIR="${pkgdir}"
-}
diff --git a/testing/perl-html-parser/PKGBUILD b/testing/perl-html-parser/PKGBUILD
deleted file mode 100644
index 7e3b0a701..000000000
--- a/testing/perl-html-parser/PKGBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# $Id: PKGBUILD 125261 2011-05-25 19:17:47Z foutrelis $
-# Maintainer: kevin <kevin@archlinux.org>
-# Contributor: Manolis Tzanidakis
-# Contributor: Firmicus <francois.archlinux.org>
-
-pkgname=perl-html-parser
-_realname=HTML-Parser
-pkgver=3.68
-pkgrel=2
-pkgdesc="Perl HTML parser class"
-arch=('i686' 'x86_64')
-license=('PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl-html-tagset' 'perl>=5.12.1')
-options=(!emptydirs)
-source=(http://www.cpan.org/authors/id/G/GA/GAAS/${_realname}-${pkgver}.tar.gz)
-md5sums=('5550b2da7aa94341f1e8a17a4ac20c68')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make install DESTDIR="${pkgdir}"
-}
-# vim: ts=2 sw=2 et ft=sh
diff --git a/testing/perl-libintl-perl/PKGBUILD b/testing/perl-libintl-perl/PKGBUILD
deleted file mode 100644
index af266d871..000000000
--- a/testing/perl-libintl-perl/PKGBUILD
+++ /dev/null
@@ -1,33 +0,0 @@
-# $Id: PKGBUILD 125264 2011-05-25 19:18:10Z foutrelis $
-# Maintainer: kevin <kevin@archlinux.org>
-# Contributor: Tobias Kieslich <tobias@justdreams.de>
-
-pkgname=perl-libintl-perl
-_realname=libintl-perl
-pkgver=1.20
-pkgrel=3
-pkgdesc="Perl Module: Localization support"
-arch=('i686' 'x86_64')
-license=('LGPL')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('gettext' 'perl>=5.10.0')
-options=(!emptydirs)
-source=(http://www.cpan.org/authors/id/G/GU/GUIDO/${_realname}-$pkgver.tar.gz)
-md5sums=('cb36f58a7d2e15974f25b35381548b1b')
-
-build() {
- cd ${srcdir}/${_realname}-$pkgver
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${_realname}-$pkgver
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
diff --git a/testing/perl-locale-gettext/PKGBUILD b/testing/perl-locale-gettext/PKGBUILD
deleted file mode 100644
index 6f916e28e..000000000
--- a/testing/perl-locale-gettext/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# $Id: PKGBUILD 125267 2011-05-25 19:18:48Z foutrelis $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: Mark Rosenstand <mark@borkware.net>
-# Contributor: Paul Mattal <paul@archlinux.org>
-
-pkgname=perl-locale-gettext
-_realname=gettext
-pkgver=1.05
-pkgrel=7
-pkgdesc="Permits access from Perl to the gettext() family of functions"
-arch=('i686' 'x86_64')
-license=('GPL' 'PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('gettext' 'perl>=5.10.0')
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/P/PV/PVANDRY/${_realname}-${pkgver}.tar.gz
- compatibility-with-POSIX-module.patch)
-md5sums=('f3d3f474a1458f37174c410dfef61a46'
- '854302f34d01a2f8ae739187788973dd')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
-
- patch -Np1 -i ${srcdir}/compatibility-with-POSIX-module.patch
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make install DESTDIR="${pkgdir}"
-
- # remove perllocal.pod and .packlist
- find "${pkgdir}" -name perllocal.pod -delete
- find "${pkgdir}" -name .packlist -delete
-}
diff --git a/testing/perl-locale-gettext/compatibility-with-POSIX-module.patch b/testing/perl-locale-gettext/compatibility-with-POSIX-module.patch
deleted file mode 100644
index ad675516b..000000000
--- a/testing/perl-locale-gettext/compatibility-with-POSIX-module.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/gettext.pm 2005-05-31 20:11:16.000000000 -0700
-+++ b/gettext.pm 2009-10-07 12:39:42.000000000 -0700
-@@ -32,6 +32,7 @@
- =cut
-
- use Carp;
-+use POSIX qw(:locale_h);
-
- require Exporter;
- require DynaLoader;
diff --git a/testing/perl-net-dns/PKGBUILD b/testing/perl-net-dns/PKGBUILD
deleted file mode 100644
index 1a4f7c0cc..000000000
--- a/testing/perl-net-dns/PKGBUILD
+++ /dev/null
@@ -1,33 +0,0 @@
-# $Id: PKGBUILD 125273 2011-05-25 19:19:34Z foutrelis $
-# Maintainer: kevin <kevin@archlinux.org>
-# Contributor: Manolis Tzanidakis
-
-pkgname=perl-net-dns
-_realname=Net-DNS
-pkgver=0.66
-pkgrel=4
-pkgdesc="Perl Module: Interface to the DNS resolver."
-arch=(i686 x86_64)
-license=('PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl-digest-hmac' 'perl-net-ip' 'perl>=5.10.0')
-source=(http://www.cpan.org/authors/id/O/OL/OLAF/${_realname}-$pkgver.tar.gz)
-options=(!emptydirs)
-
-build() {
- cd $srcdir/${_realname}-${pkgver}
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
-}
-
-package() {
- cd $srcdir/${_realname}-${pkgver}
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
-# vim: ts=2 sw=2 et ft=sh
-md5sums=('1635d876324e3c2f6e277d5778bfe94c')
diff --git a/testing/perl-net-ssleay/PKGBUILD b/testing/perl-net-ssleay/PKGBUILD
deleted file mode 100644
index 6620fbd6f..000000000
--- a/testing/perl-net-ssleay/PKGBUILD
+++ /dev/null
@@ -1,33 +0,0 @@
-# $Id: PKGBUILD 125276 2011-05-25 19:20:00Z foutrelis $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: Manolis Tzanidakis
-
-pkgname=perl-net-ssleay
-_cpanname=Net-SSLeay
-pkgver=1.36
-pkgrel=5
-pkgdesc="Perl extension for using OpenSSL"
-arch=('i686' 'x86_64')
-license=('custom:BSD')
-url="http://search.cpan.org/dist/${_cpanname}/"
-depends=('perl' 'openssl')
-options=(!emptydirs)
-replaces=('net-ssleay')
-provides=('net-ssleay')
-source=(http://www.cpan.org/authors/id/F/FL/FLORA/${_cpanname}-${pkgver}.tar.gz)
-md5sums=('54061638720dd6a325395331c77f21d8')
-
-build() {
- cd ${srcdir}/${_cpanname}-${pkgver}
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL -- INSTALLDIRS=vendor
- make
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-
- install -D -m644 README ${pkgdir}/usr/share/licenses/${pkgname}/README
-}
-# vim: ts=2 sw=2 et ft=sh
diff --git a/testing/perl-net-upnp/PKGBUILD b/testing/perl-net-upnp/PKGBUILD
deleted file mode 100644
index e54c70917..000000000
--- a/testing/perl-net-upnp/PKGBUILD
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id: PKGBUILD 125279 2011-05-25 19:20:27Z foutrelis $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: Drew Gilbert <gilbert dot drew at gmail dot com>
-
-pkgname=perl-net-upnp
-pkgver=1.4.2
-pkgrel=3
-pkgdesc="Perl Module UPnP"
-arch=('i686' 'x86_64')
-url="http://search.cpan.org/~skonno/Net-UPnP-1.4.2/"
-license=('BSD' 'PerlArtistic')
-options=('!emptydirs')
-source=("http://search.cpan.org/CPAN/authors/id/S/SK/SKONNO/Net-UPnP-${pkgver}.tar.gz")
-depends=('perl')
-md5sums=('bc009fd76b565df40a70aca49af82a7d')
-
-build() {
- cd "${srcdir}/Net-UPnP-${pkgver}"
-
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make install DESTDIR="${pkgdir}"
-
- find ${pkgdir} -name '.packlist' -delete
- find ${pkgdir} -name '*.pod' -delete
-}
diff --git a/testing/perl-netaddr-ip/PKGBUILD b/testing/perl-netaddr-ip/PKGBUILD
deleted file mode 100644
index fa6549515..000000000
--- a/testing/perl-netaddr-ip/PKGBUILD
+++ /dev/null
@@ -1,34 +0,0 @@
-# $Id: PKGBUILD 125270 2011-05-25 19:19:11Z foutrelis $
-# Maintainer: Dale Blount <dale@archlinux.org>
-# Contributor: Dale Blount <dale@archlinux.org>
-# Contributor: Francois Charette <francois.archlinux.org>
-
-pkgname=perl-netaddr-ip
-_realname=NetAddr-IP
-pkgver=4.037
-pkgrel=2
-pkgdesc="Perl module to manage IP addresses and subnets"
-arch=(i686 x86_64)
-license=('PerlArtistic' 'GPL')
-depends=('perl>=5.10.0')
-options=(!emptydirs)
-url="http://search.cpan.org/dist/${_realname}/"
-source=(http://search.cpan.org/CPAN/authors/id/M/MI/MIKER/${_realname}-${pkgver}.tar.gz)
-md5sums=('d966eac6b5941af3f7c1fad839569cb4')
-
-build() {
- cd ${srcdir}/${_realname}-${pkgver}
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${_realname}-${pkgver}
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
diff --git a/testing/perl-sdl/PKGBUILD b/testing/perl-sdl/PKGBUILD
deleted file mode 100644
index 29483fdc1..000000000
--- a/testing/perl-sdl/PKGBUILD
+++ /dev/null
@@ -1,40 +0,0 @@
-# $Id: PKGBUILD 127524 2011-06-15 21:01:17Z remy $
-# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
-# Contributor: Allan McRae <allan@archlinux.org>
-# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
-
-pkgname=perl-sdl
-pkgver=2.531
-pkgrel=3
-pkgdesc="Simple DirectMedia Layer for Perl"
-arch=(i686 x86_64)
-license=(LGPL)
-url="http://sdl.perl.org"
-depends=(perl-alien-sdl perl-tie-simple
- sdl_{net,ttf,image,mixer,gfx,pango} mesa smpeg)
-#makedepends=(perl-yaml)
-options=('!emptydirs')
-replaces=(sdl_perl)
-conflicts=(sdl_perl)
-provides=("sdl_perl=$pkgver")
-source=(http://search.cpan.org/CPAN/authors/id/G/GA/GARU/SDL-$pkgver.tar.gz)
-md5sums=('ed39c87ae685d3a933705a2ea82a9e18')
-
-build() {
- cd "$srcdir/SDL-$pkgver"
- # Perl selects the proper CFLAGS set for binary modules
- unset CFLAGS
- # install module in vendor directories
- perl Build.PL installdirs=vendor
- perl Build
-}
-
-check() {
- cd "$srcdir/SDL-$pkgver"
- perl Build test || true
-}
-
-package() {
- cd "$srcdir/SDL-$pkgver"
- perl Build install destdir="$pkgdir"
-}
diff --git a/testing/perl-template-toolkit/PKGBUILD b/testing/perl-template-toolkit/PKGBUILD
deleted file mode 100644
index d955edfdd..000000000
--- a/testing/perl-template-toolkit/PKGBUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# Maintainer: Firmicus <francois.archlinux.org>
-# Contributor: Tom Killian <tomk@runbox.com>
-# Contributor: FJ <joostef@gmail.com>
-
-pkgname=perl-template-toolkit
-_realname=Template-Toolkit
-pkgver=2.22
-pkgrel=4
-pkgdesc="Perl template processing system"
-arch=(i686 x86_64)
-license=('PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl-appconfig' 'perl>=5.10.0')
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/A/AB/ABW/${_realname}-$pkgver.tar.gz)
-md5sums=('d98277f6420e5da6b93d99a8db2b3934')
-
-build() {
- cd ${srcdir}/${_realname}-$pkgver
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
-}
-
-package() {
- cd ${srcdir}/${_realname}-$pkgver
- make install DESTDIR=${startdir}/pkg
-
- # remove perllocal.pod and .packlist
- find ${startdir}/pkg -name perllocal.pod -delete
- find ${startdir}/pkg -name .packlist -delete
-}
diff --git a/testing/perl-term-readkey/PKGBUILD b/testing/perl-term-readkey/PKGBUILD
deleted file mode 100644
index 25f9e397d..000000000
--- a/testing/perl-term-readkey/PKGBUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Id: PKGBUILD 125285 2011-05-25 19:22:27Z foutrelis $
-# Maintainer: kevin <kevin@archlinux.org>
-# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>
-# Contributor: Francois Charette <francois.archlinux.org>
-
-pkgname=perl-term-readkey
-_realname=TermReadKey
-pkgver=2.30.01
-pkgrel=4
-pkgdesc="Provides simple control over terminal driver modes"
-arch=('i686' 'x86_64')
-license=('custom')
-depends=('perl>=5.10.0' 'glibc')
-url="http://search.cpan.org/~stsi/${_realname}/"
-source=(http://search.cpan.org/CPAN/authors/id/S/ST/STSI/${_realname}-$pkgver.tar.gz)
-options=('!emptydirs')
-md5sums=('6c099eddb76ec9b92179f1ed929be71a')
-
-build()
-{
- cd ${srcdir}/TermReadKey-$pkgver
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/TermReadKey-$pkgver
- make DESTDIR=${pkgdir} install
- install -d ${pkgdir}/usr/share/licenses/$pkgname/
- head -7 README > ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
diff --git a/testing/perl-text-iconv/PKGBUILD b/testing/perl-text-iconv/PKGBUILD
deleted file mode 100644
index acd6932e2..000000000
--- a/testing/perl-text-iconv/PKGBUILD
+++ /dev/null
@@ -1,28 +0,0 @@
-# $Id: PKGBUILD 125288 2011-05-25 19:22:57Z foutrelis $
-# Maintainer:
-# Contributor: Francois Charette <firmicus@gmx.net>
-
-pkgname=perl-text-iconv
-_realname=Text-Iconv
-pkgver=1.7
-pkgrel=6
-pkgdesc="Interface to iconv codeset conversion"
-arch=('i686' 'x86_64')
-url="http://search.cpan.org/dist/${_realname}/"
-license=('GPL' 'PerlArtistic')
-depends=('perl>=5.10.0')
-options=('!emptydirs')
-source=(http://www.cpan.org/authors/id/M/MP/MPIOTR/${_realname}-${pkgver}.tar.gz)
-md5sums=('81b26e069eaebb084e91ea3c009b67ae')
-
-build() {
- cd ${srcdir}/${_realname}-${pkgver}
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${_realname}-${pkgver}
- make DESTDIR=${pkgdir} install
-}
diff --git a/testing/perl-time-hires/PKGBUILD b/testing/perl-time-hires/PKGBUILD
deleted file mode 100644
index db9ddcb7f..000000000
--- a/testing/perl-time-hires/PKGBUILD
+++ /dev/null
@@ -1,25 +0,0 @@
-# $Id: PKGBUILD 125291 2011-05-25 19:23:52Z foutrelis $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: mezcal <fila at pruda dot com>
-
-pkgname=perl-time-hires
-pkgver=1.9721
-pkgrel=4
-pkgdesc="Perl module: high resolution time, sleep, and alarm"
-arch=('i686' 'x86_64')
-license=('PerlArtistic')
-url="http://search.cpan.org/dist/Time-HiRes/"
-depends=('perl')
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/J/JH/JHI/Time-HiRes-${pkgver}.tar.gz)
-md5sums=('bf09911a36b9481537c8e0d28fbb3aaf')
-
-build() {
- cd "${srcdir}/Time-HiRes-${pkgver}"
-
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
- make install DESTDIR="${pkgdir}"
-}
diff --git a/testing/perl-tk/PKGBUILD b/testing/perl-tk/PKGBUILD
deleted file mode 100644
index 2a80a320e..000000000
--- a/testing/perl-tk/PKGBUILD
+++ /dev/null
@@ -1,44 +0,0 @@
-# $Id: PKGBUILD 124660 2011-05-23 20:07:22Z remy $
-# Maintainer: François Charette <francois ατ archlinux δοτ org>
-# Contributor: Jason Chu <jchu@xentac.net>
-# Contributor: Juergen Hoetzel <juergen@archlinux.org>
-
-pkgname=perl-tk
-_cpanname=Tk
-pkgver=804.029
-pkgrel=3
-pkgdesc="A graphical user interface toolkit for Perl"
-arch=('i686' 'x86_64')
-url="http://search.cpan.org/dist/${_cpanname}"
-license=('PerlArtistic' 'GPL' 'custom')
-depends=('libx11' 'libpng' 'libjpeg' 'tk' 'perl')
-options=('!emptydirs')
-replaces=('perltk')
-provides=('perltk')
-source=(http://www.cpan.org/authors/id/S/SR/SREZIC/${_cpanname}-${pkgver}.tar.gz)
-md5sums=('f4aebe6fcdb309a8480514f2ccf8117c')
-
-build() {
- cd $srcdir/${_cpanname}-$pkgver
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- /bin/chmod -R u+w *
- # The Xlib header is wrong...
- sed -i 's/XKeycodeToKeysym\(.*\)unsigned int/XKeycodeToKeysym\1KeyCode/' pTk/Xlib.h
- make
-}
-
-#check() {
-# cd $srcdir/${_cpanname}-$pkgver
-# make test
-#}
-
-package() {
- cd $srcdir/${_cpanname}-$pkgver
- make install DESTDIR=$pkgdir
-
- # license
- install -D -m644 pTk/license.terms \
- ${startdir}/pkg/usr/share/licenses/${pkgname}/tk.license
- install -D -m644 pTk/Tix.license \
- ${startdir}/pkg/usr/share/licenses/${pkgname}/tix.license
-}
diff --git a/testing/perl-unicode-string/PKGBUILD b/testing/perl-unicode-string/PKGBUILD
deleted file mode 100644
index c8bcd6c7a..000000000
--- a/testing/perl-unicode-string/PKGBUILD
+++ /dev/null
@@ -1,33 +0,0 @@
-# $Id: PKGBUILD 125294 2011-05-25 19:24:14Z foutrelis $
-# Maintainer: James Rayner <iphitus@gmail.com>
-# Contributor: Andrew Simmons <andrew.simmons@gmail.com>
-
-pkgname=perl-unicode-string
-_realname=Unicode-String
-pkgver=2.09
-pkgrel=6
-pkgdesc="String of Unicode characters for perl (UCS2/UTF16)"
-arch=('i686' 'x86_64')
-license=('PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl>=5.10.0')
-options=(!emptydirs)
-source=(http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/${_realname}-${pkgver}.tar.gz)
-md5sums=('553e68e603723bf7c631f8701ab0d678')
-
-build() {
- cd ${srcdir}/${_realname}-${pkgver}
- # in stall module in vendor directories.
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${_realname}-${pkgver}
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-}
diff --git a/testing/perl-xml-parser/PKGBUILD b/testing/perl-xml-parser/PKGBUILD
deleted file mode 100644
index 46ffa0923..000000000
--- a/testing/perl-xml-parser/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# $Id: PKGBUILD 124562 2011-05-22 23:45:41Z andrea $
-# Maintainer:
-# Contributor: firmicus <francois@archlinux.org>
-# Contributor: dorphell <dorphell@archlinux.org>
-# Contributor: herb <hrose@archlinux.org>
-
-pkgname=perl-xml-parser
-_realname=XML-Parser
-pkgver=2.40
-pkgrel=3
-pkgdesc="Expat-based XML parser module for perl"
-arch=('i686' 'x86_64')
-license=('GPL' 'PerlArtistic')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl' 'expat')
-replaces=('perlxml')
-provides=("perlxml=${pkgver}")
-options=('!emptydirs')
-source=("http://search.cpan.org/CPAN/authors/id/C/CH/CHORNY/${_realname}-${pkgver}.tar.gz")
-md5sums=('c66e9adba003d0667cc40115ccd837a5')
-
-build() {
- cd "${srcdir}/${_realname}-${pkgver}"
-
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd "${srcdir}/${_realname}-${pkgver}"
- make install DESTDIR="${pkgdir}"
-
- # remove perllocal.pod and .packlist.
- find "${pkgdir}" -name perllocal.pod -delete
- find "${pkgdir}" -name .packlist -delete
-}
diff --git a/testing/perl-yaml-syck/PKGBUILD b/testing/perl-yaml-syck/PKGBUILD
deleted file mode 100644
index c2ab5a4f8..000000000
--- a/testing/perl-yaml-syck/PKGBUILD
+++ /dev/null
@@ -1,37 +0,0 @@
-# $Id: PKGBUILD 125297 2011-05-25 19:24:39Z foutrelis $
-# This PKGBUILD was generated by cpan4pacman via CPANPLUS::Dist::Pacman
-# Maintainer: kevin <kevin@archlinux.org>
-
-pkgname=perl-yaml-syck
-_realname=YAML-Syck
-pkgver=1.17
-pkgrel=2
-pkgdesc="Fast, lightweight YAML loader and dumper"
-arch=('i686' 'x86_64')
-license=('custom')
-url="http://search.cpan.org/dist/${_realname}/"
-depends=('perl>=5.10.0')
-options=('!emptydirs')
-source=(http://www.cpan.org/authors/id/A/AV/AVAR/${_realname}-$pkgver.tar.gz)
-md5sums=('f788529ad4b2c2fd037ccdfd5e7a88ab')
-
-build() {
- cd ${srcdir}/${_realname}-$pkgver
-
- # install module in vendor directories.
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${_realname}-$pkgver
- make install DESTDIR=${pkgdir}
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-
- # license.
- install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
-}
diff --git a/testing/perl/ChangeLog b/testing/perl/ChangeLog
deleted file mode 100644
index f6c2500df..000000000
--- a/testing/perl/ChangeLog
+++ /dev/null
@@ -1,57 +0,0 @@
-2011-05-16 Angel Velasquez <angvp@archlinux.org>
- * perl 5.14.0
- * Removed patch for h2ph warning from 5.12.3
- * Removed provides array, you can use corelist -v 5.14.0 to know the
- modules included with the perl core, through Module::CoreList (thx j3nnn1
- for the tip)
-
-2010-11-07 kevin <kevin@archlinux.org>
-
- * perl 5.12.2-1
- - Using /usr/bin/*_perl for script directories
-
-2010-11-06 kevin <kevin@archlinux.org>
-
- - Removed otherlibdirs directive from Configure
- - Removed /usr/*/perl5/site_perl/5.10.1 from INC
- - Finally removed legacy dirs /usr/lib/perl5/current and
- /usr/lib/perl5/site_perl/current from @INC
-
-2010-05-23 kevin <kevin@archlinux.org>
-
- * perl 5.12.1-2
- - Francois updated the provides array.
-
-2010-05-23 kevin <kevin@archlinux.org>
-
- * perl 5.12.1-1
-
-2010-05-16 kevin <kevin@archlinux.org>
-
- * perl 5.12.0-2
-
-2010-05-12 kevin <kevin@archlinux.org>
-
- - FS#19411. Removed the for loop in perlbin.sh which didn't work on zsh.
- This makes the loop variables unnecessary so the script no longer
- pollutes the user's environment.
- - FS#19427. Added /usr/*/perl5/site_perl/5.10.1 to otherlibdirs to support
- user built modules.
-
-2010-05-09 kevin <kevin@archlinux.org>
-
- * perl 5.12.0-1
- - Modified perlbin.sh to only add existing dirs to PATH. Fixes FS#17402,
- path points to non-existant directories
-
-2010-05-07 kevin <kevin@archlinux.org>
-
- - Added this changelog.
- - Added -Dinc_version_list=none to fix FS#19136, double entry in @INC.
- This removes the duplicates and versioned directory entries.
- - Change scriptdirs to /usr/lib/perl5/{core,vendor,site}_perl/bin to fix
- Fix FS#13808, binaries don't follow FHS.
- - Stopped using versioned directories in sitelib and sitearch.
-
-
-# vim: set ft=changelog ts=4 sw=4 et:
diff --git a/testing/perl/PKGBUILD b/testing/perl/PKGBUILD
deleted file mode 100644
index aabf4dbc0..000000000
--- a/testing/perl/PKGBUILD
+++ /dev/null
@@ -1,91 +0,0 @@
-# $Id: PKGBUILD 124529 2011-05-22 19:14:50Z angvp $
-# Maintainer: Angel Velasquez <angvp@archlinux.org>
-# Contributor: kevin <kevin.archlinux.org>
-# Contributor: judd <jvinet.zeroflux.org>
-# Contributor: francois <francois.archlinux.org>
-pkgname=perl
-pkgver=5.14.0
-pkgrel=1
-pkgdesc="A highly capable, feature-rich programming language"
-arch=(i686 x86_64)
-license=('GPL' 'PerlArtistic')
-url="http://www.perl.org"
-groups=('base')
-depends=('gdbm' 'db>=4.8' 'coreutils' 'glibc' 'sh')
-changelog=ChangeLog
-source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2 perlbin.sh)
-install=perl.install
-options=('!makeflags' '!purge')
-md5sums=('e7457deea78330c5f8eebb2fd2a45479'
- 'f86eb0dba1638ca6d1c8fff1b06c2a71')
-
-build() {
- cd ${srcdir}/${pkgname}-${pkgver}
-
- if [ "${CARCH}" = "x86_64" ]; then
- # for x86_64
- arch_opts="-Dcccdlflags='-fPIC'"
- else
- # for i686
- arch_opts=""
- fi
- ./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
- -Dprefix=/usr -Dinstallprefix=${pkgdir}/usr -Dvendorprefix=/usr \
- -Dprivlib=/usr/share/perl5/core_perl \
- -Darchlib=/usr/lib/perl5/core_perl \
- -Dsitelib=/usr/share/perl5/site_perl \
- -Dsitearch=/usr/lib/perl5/site_perl \
- -Dvendorlib=/usr/share/perl5/vendor_perl \
- -Dvendorarch=/usr/lib/perl5/vendor_perl \
- -Dscriptdir=/usr/bin/core_perl \
- -Dsitescript=/usr/bin/site_perl \
- -Dvendorscript=/usr/bin/vendor_perl \
- -Dinc_version_list=none \
- -Dman1ext=1perl -Dman3ext=3perl ${arch_opts}
- make
-}
-package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make install
-
- ### Perl Settings ###
- # Change man page extensions for site and vendor module builds.
- # Use archlinux email address instead of my own.
- sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \
- -e "/^cf_email=/ s/'.*'/'kevin@archlinux.org'/" \
- -e "/^perladmin=/ s/'.*'/'kevin@archlinux.org'/" \
- -i ${pkgdir}/usr/lib/perl5/core_perl/Config_heavy.pl
-
- ### CPAN Settings ###
- # Set CPAN default config to use the site directories.
- sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \
- -e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \
- -i ${pkgdir}/usr/share/perl5/core_perl/CPAN/FirstTime.pm
-
- ### CPANPLUS Settings ###
- # Set CPANPLUS default config to use the site directories.
- sed -e "/{'makemakerflags'}/ s/'';/'INSTALLDIRS=site';/" \
- -e "/{'buildflags'}/ s/'';/'installdirs=site';/" \
- -i ${pkgdir}/usr/share/perl5/core_perl/CPANPLUS/Config.pm
-
- # Profile script so set paths to perl scripts.
- install -D -m755 ${srcdir}/perlbin.sh \
- ${pkgdir}/etc/profile.d/perlbin.sh
-
- (cd ${pkgdir}/usr/bin; mv perl${pkgver} perl)
- (cd ${pkgdir}/usr/bin/core_perl; ln -sf c2ph pstruct; ln -sf s2p psed)
- grep -Rl "${pkgdir}" ${pkgdir}/usr | \
- xargs sed -i "s^${pkgdir}^^g"
-
- # Remove all pod files *except* those under /usr/share/perl5/core_perl/pod/
- # (FS#16488)
- rm -f $pkgdir/usr/share/perl5/core_perl/*.pod
- for d in $pkgdir/usr/share/perl5/core_perl/*; do
- if [ -d $d -a $(basename $d) != "pod" ]; then
- find $d -name *.pod -delete
- fi
- done
- find $pkgdir/usr/lib -name *.pod -delete
- find $pkgdir -name .packlist -delete
-}
-
diff --git a/testing/perl/fix-h2ph-and-tests.patch b/testing/perl/fix-h2ph-and-tests.patch
deleted file mode 100644
index a2d176ec6..000000000
--- a/testing/perl/fix-h2ph-and-tests.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 8d66b3f930dc6d88b524d103e304308ae73a46e7 Mon Sep 17 00:00:00 2001
-From: Robin Barker <rmbarker@cpan.org>
-Date: Thu, 22 Apr 2010 11:51:20 +0100
-Subject: [PATCH 1/1] Fix h2ph and test
-
----
- lib/h2ph.t | 12 ++++++++++--
- utils/h2ph.PL | 28 +++++++++++++++++++++++-----
- 2 files changed, 33 insertions(+), 7 deletions(-)
-
-diff --git a/lib/h2ph.t b/lib/h2ph.t
-index 27dd7b9..8d62d46 100644
---- a/lib/h2ph.t
-+++ b/lib/h2ph.t
-@@ -18,7 +18,7 @@ if (!(-e $extracted_program)) {
- exit 0;
- }
-
--plan(4);
-+plan(5);
-
- # quickly compare two text files
- sub txt_compare {
-@@ -41,8 +41,16 @@ $result = runperl( progfile => 'lib/h2ph.pht',
- stderr => 1 );
- like( $result, qr/syntax OK$/, "output compiles");
-
-+$result = runperl( progfile => '_h2ph_pre.ph',
-+ switches => ['-c'],
-+ stderr => 1 );
-+like( $result, qr/syntax OK$/, "preamble compiles");
-+
- $result = runperl( switches => ["-w"],
-- prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
-+ stderr => 1,
-+ prog => <<'PROG' );
-+$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
-+PROG
- is( $result, '', "output free of warnings" );
-
- # cleanup
-diff --git a/utils/h2ph.PL b/utils/h2ph.PL
-index 8f56db4..1255807 100644
---- a/utils/h2ph.PL
-+++ b/utils/h2ph.PL
-@@ -401,7 +401,10 @@ if ($opt_e && (scalar(keys %bad_file) > 0)) {
- exit $Exit;
-
- sub expr {
-- $new = '"(assembly code)"' and return if /\b__asm__\b/; # freak out.
-+ if (/\b__asm__\b/) { # freak out
-+ $new = '"(assembly code)"';
-+ return
-+ }
- my $joined_args;
- if(keys(%curargs)) {
- $joined_args = join('|', keys(%curargs));
-@@ -770,7 +773,7 @@ sub inc_dirs
- sub build_preamble_if_necessary
- {
- # Increment $VERSION every time this function is modified:
-- my $VERSION = 2;
-+ my $VERSION = 3;
- my $preamble = "$Dest_dir/_h2ph_pre.ph";
-
- # Can we skip building the preamble file?
-@@ -798,7 +801,16 @@ sub build_preamble_if_necessary
- # parenthesized value: d=(v)
- $define{$_} = $1;
- }
-- if ($define{$_} =~ /^([+-]?(\d+)?\.\d+([eE][+-]?\d+)?)[FL]?$/) {
-+ if (/^(\w+)\((\w)\)$/) {
-+ my($macro, $arg) = ($1, $2);
-+ my $def = $define{$_};
-+ $def =~ s/$arg/\$\{$arg\}/g;
-+ print PREAMBLE <<DEFINE;
-+unless (defined &$macro) { sub $macro(\$) { my (\$$arg) = \@_; \"$def\" } }
-+
-+DEFINE
-+ } elsif
-+ ($define{$_} =~ /^([+-]?(\d+)?\.\d+([eE][+-]?\d+)?)[FL]?$/) {
- # float:
- print PREAMBLE
- "unless (defined &$_) { sub $_() { $1 } }\n\n";
-@@ -807,8 +819,14 @@ sub build_preamble_if_necessary
- print PREAMBLE
- "unless (defined &$_) { sub $_() { $1 } }\n\n";
- } elsif ($define{$_} =~ /^\w+$/) {
-- print PREAMBLE
-- "unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";
-+ my $def = $define{$_};
-+ if ($isatype{$def}) {
-+ print PREAMBLE
-+ "unless (defined &$_) { sub $_() { \"$def\" } }\n\n";
-+ } else {
-+ print PREAMBLE
-+ "unless (defined &$_) { sub $_() { &$def } }\n\n";
-+ }
- } else {
- print PREAMBLE
- "unless (defined &$_) { sub $_() { \"",
---
-1.6.5.2.74.g610f9.dirty
-
diff --git a/testing/perl/perl.install b/testing/perl/perl.install
deleted file mode 100644
index 3f7d58f23..000000000
--- a/testing/perl/perl.install
+++ /dev/null
@@ -1,18 +0,0 @@
-# arg 1: the new package version
-post_install() {
- for ver in 5.8.{0,1,2,3,4,5,6,7,8}; do
- [ -h usr/lib/perl5/$ver ] && rm usr/lib/perl5/$ver
- [ -h usr/lib/perl5/site_perl/$ver ] && rm usr/lib/perl5/site_perl/$ver
- [ -h usr/bin/perl$ver ] && rm usr/bin/perl$ver
- done
- return 0
-}
-
-post_upgrade() {
- echo '- The directories /usr/lib/perl5/current, /usr/lib/perl5/site_perl/current,'
- echo ' /usr/lib/perl5/site_perl/5.10.1, and /usr/share/perl5/site_perl/5.10.1'
- echo ' have been removed from @INC.'
-
- echo '- The script/binary directories are now /usr/bin/*_perl instead of'
- echo ' /usr/lib/perl5/*_perl/bin which will be eventually removed.'
-}
diff --git a/testing/perl/perlbin.sh b/testing/perl/perlbin.sh
deleted file mode 100755
index 09811a8b4..000000000
--- a/testing/perl/perlbin.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-# Set path to perl scriptdirs if they exist
-# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_Scripts
-# Added /usr/bin/*_perl dirs for scripts
-# Remove /usr/lib/perl5/*_perl/bin in next release
-
-[ -d /usr/bin/site_perl ] &&
- PATH=$PATH:/usr/bin/site_perl
-[ -d /usr/lib/perl5/site_perl/bin ] &&
- PATH=$PATH:/usr/lib/perl5/site_perl/bin
-
-[ -d /usr/bin/vendor_perl ] &&
- PATH=$PATH:/usr/bin/vendor_perl
-[ -d /usr/lib/perl5/vendor_perl/bin ] &&
- PATH=$PATH:/usr/lib/perl5/vendor_perl/bin
-
-[ -d /usr/bin/core_perl ] &&
- PATH=$PATH:/usr/bin/core_perl
-
-export PATH
-
-# If you have modules in non-standard directories you can add them here.
-#export PERLLIB=dir1:dir2
-
diff --git a/testing/pidgin/PKGBUILD b/testing/pidgin/PKGBUILD
deleted file mode 100644
index e0c7170bd..000000000
--- a/testing/pidgin/PKGBUILD
+++ /dev/null
@@ -1,110 +0,0 @@
-# $Id: PKGBUILD 126958 2011-06-08 23:47:29Z foutrelis $
-# Maintainer: Evangelos Foutras <foutrelis@gmail.com>
-# Contributor: Ionut Biru <ibiru@archlinux.org>
-# Contributor: Andrea Scarpino <andrea@archlinux.org>
-# Contributor: Alexander Fehr <pizzapunk gmail com>
-# Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl>
-
-pkgname=('pidgin' 'libpurple' 'finch')
-pkgver=2.8.0
-pkgrel=3
-arch=('i686' 'x86_64')
-url="http://pidgin.im/"
-license=('GPL')
-makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
- 'python2' 'hicolor-icon-theme' 'silc-toolkit' 'gstreamer0.10'
- 'farsight2' 'avahi' 'tk' 'ca-certificates' 'intltool'
- 'networkmanager')
-options=('!libtool')
-source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
- nm09-more.patch)
-md5sums=('d1656c443a5d91f4aa0d95915f1f50c3'
- 'a673659d86c7a65aa710f7c8c7feda82')
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # Further fixes for NetworkManager 0.9
- # (http://developer.pidgin.im/ticket/13859)
- patch -Np1 -i "$srcdir/nm09-more.patch"
-
- # Use Python 2
- sed -i 's/env python$/\02/' */plugins/*.py \
- libpurple/purple-{remote,notifications-example,url-handler}
-
- ./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --disable-schemas-install \
- --disable-meanwhile \
- --disable-gnutls \
- --enable-cyrus-sasl \
- --disable-doxygen \
- --enable-nm \
- --with-python=/usr/bin/python2 \
- --with-system-ssl-certs=/etc/ssl/certs
- make
-}
-
-package_pidgin(){
- pkgdesc="Multi-protocol instant messaging client"
- depends=("libpurple=$pkgver-$pkgrel" 'startup-notification' 'gtkspell'
- 'libxss' 'libsm' 'gstreamer0.10' 'hicolor-icon-theme')
- optdepends=('aspell: for spelling correction'
- 'ca-certificates: SSL CA certificates'
- 'gstreamer0.10-good-plugins: video and voice support'
- 'tk: Tcl/Tk scripting support')
- install=pidgin.install
-
- cd "$srcdir/pidgin-$pkgver"
-
- # For linking
- make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
-
- make -C pidgin DESTDIR="$pkgdir" install
- make -C doc DESTDIR="$pkgdir" install
-
- # Remove files that are packaged in libpurle
- make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
-
- install -Dm644 pidgin.desktop "$pkgdir"/usr/share/applications/pidgin.desktop
-
- rm "$pkgdir/usr/share/man/man1/finch.1"
-}
-
-package_libpurple(){
- pkgdesc="IM library extracted from Pidgin"
- depends=('farsight2' 'libsasl' 'dbus-glib' 'silc-toolkit' 'nss'
- 'cyrus-sasl-plugins')
- optdepends=('avahi: Bonjour protocol support'
- 'dbus-python: for purple-remote and purple-url-handler')
-
- cd "$srcdir/pidgin-$pkgver"
-
- for _dir in libpurple share/sounds share/ca-certs m4macros po; do
- make -C "$_dir" DESTDIR="$pkgdir" install
- done
-}
-
-package_finch(){
- pkgdesc="A ncurses-based messaging client"
- depends=("libpurple=$pkgver-$pkgrel" 'python2' 'gstreamer0.10')
- optdepends=('avahi: Bonjour protocol support'
- 'ca-certificates: SSL CA certificates'
- 'tk: Tcl/Tk scripting support')
-
- cd "$srcdir/pidgin-$pkgver"
-
- # For linking
- make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
-
- make -C finch DESTDIR="$pkgdir" install
- make -C doc DESTDIR="$pkgdir" install
-
- # Remove files that are packaged in libpurle
- make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
-
- rm "$pkgdir"/usr/share/man/man1/pidgin.1
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/testing/pidgin/nm09-more.patch b/testing/pidgin/nm09-more.patch
deleted file mode 100644
index 8c708df9a..000000000
--- a/testing/pidgin/nm09-more.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -up pidgin-2.7.11/libpurple/network.c.nm09more pidgin-2.7.11/libpurple/network.c
---- pidgin-2.7.11/libpurple/network.c.nm09more 2011-04-26 12:01:27.700085246 -0500
-+++ pidgin-2.7.11/libpurple/network.c 2011-05-24 13:13:28.185165657 -0500
-@@ -833,8 +833,20 @@ purple_network_is_available(void)
- purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
- }
-
-- if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
-- return TRUE;
-+ switch (nm_state)
-+ {
-+ case NM_STATE_UNKNOWN:
-+#if NM_CHECK_VERSION(0,8,992)
-+ case NM_STATE_CONNECTED_LOCAL:
-+ case NM_STATE_CONNECTED_SITE:
-+ case NM_STATE_CONNECTED_GLOBAL:
-+#else
-+ case NM_STATE_CONNECTED:
-+#endif
-+ return TRUE;
-+ default:
-+ break;
-+ }
-
- return FALSE;
-
-@@ -1170,9 +1182,14 @@ purple_network_init(void)
- NM_DBUS_SERVICE,
- NM_DBUS_PATH,
- NM_DBUS_INTERFACE);
-+ /* NM 0.6 signal */
- dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
- dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
- G_CALLBACK(nm_state_change_cb), NULL, NULL);
-+ /* NM 0.7 and later signal */
-+ dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
-+ dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
-+ G_CALLBACK(nm_state_change_cb), NULL, NULL);
-
- dbus_proxy = dbus_g_proxy_new_for_name(nm_conn,
- DBUS_SERVICE_DBUS,
-@@ -1207,6 +1224,7 @@ purple_network_uninit(void)
- #ifdef HAVE_NETWORKMANAGER
- if (nm_proxy) {
- dbus_g_proxy_disconnect_signal(nm_proxy, "StateChange", G_CALLBACK(nm_state_change_cb), NULL);
-+ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChanged", G_CALLBACK(nm_state_change_cb), NULL);
- g_object_unref(G_OBJECT(nm_proxy));
- }
- if (dbus_proxy) {
diff --git a/testing/pidgin/pidgin.install b/testing/pidgin/pidgin.install
deleted file mode 100644
index 1a05f573e..000000000
--- a/testing/pidgin/pidgin.install
+++ /dev/null
@@ -1,11 +0,0 @@
-post_install() {
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
diff --git a/testing/postgresql/PKGBUILD b/testing/postgresql/PKGBUILD
deleted file mode 100644
index d5a887585..000000000
--- a/testing/postgresql/PKGBUILD
+++ /dev/null
@@ -1,141 +0,0 @@
-# $Id: PKGBUILD 125329 2011-05-25 22:33:15Z dan $
-# Maintainer: Dan McGee <dan@archlinux.org>
-
-pkgbase=postgresql
-pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql')
-pkgver=9.0.4
-pkgrel=4
-arch=('i686' 'x86_64')
-url="http://www.postgresql.org"
-license=('custom:PostgreSQL')
-makedepends=('libxml2' 'python2' 'perl')
-source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2 \
- postgresql postgresql.confd build.patch postgresql.pam postgresql.logrotate
- perl-5.14-fix.patch)
-install=postgresql.install
-
-build() {
- cd "${srcdir}/${pkgbase}-${pkgver}"
-
- # patch to remove regress/test make target (won't build with it present)
- patch -Np1 -i ../build.patch
- # fix for perl 5.14
- patch -Np1 -i ../perl-5.14-fix.patch
-
- # configure
- ./configure --prefix=/usr --mandir=/usr/share/man --with-libxml \
- --with-openssl --with-perl \
- --with-python PYTHON=/usr/bin/python2 --with-pam \
- --with-system-tzdata=/usr/share/zoneinfo --enable-nls \
- --datadir=/usr/share/postgresql --enable-thread-safety
-
- sed -i -e '/interfaces/d' src/Makefile
-
- # build
- make world
-
- # build libs
- for dir in src/interfaces src/bin/pg_config; do
- pushd ${dir}
- make
- popd
- done
-}
-
-package_postgresql-libs() {
- pkgdesc="Libraries for use with PostgreSQL"
- depends=('openssl>=1.0.0')
-
- cd "${srcdir}/${pkgbase}-${pkgver}"
-
- # install license
- install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/postgresql-libs/LICENSE"
-
- # install libs
- for dir in src/interfaces src/bin/pg_config; do
- pushd ${dir}
- make DESTDIR="${pkgdir}" install
- popd
- done
-
- install -D -m644 doc/src/sgml/man1/pg_config.1 "${pkgdir}/usr/share/man/man1/pg_config.1"
-
- cd src/include
-
- mkdir -p "${pkgdir}"/usr/include/{libpq,postgresql/internal/libpq}
-
- # these headers are needed by the public headers of the interfaces
- install -m644 pg_config.h "${pkgdir}/usr/include/"
- install -m644 pg_config_os.h "${pkgdir}/usr/include/"
- install -m644 postgres_ext.h "${pkgdir}/usr/include/"
- install -m644 libpq/libpq-fs.h "${pkgdir}/usr/include/libpq/"
- install -m644 pg_config_manual.h "${pkgdir}/usr/include/"
-
- # these headers are needed by the not-so-public headers of the interfaces
- install -m644 c.h "${pkgdir}/usr/include/postgresql/internal/"
- install -m644 port.h "${pkgdir}/usr/include/postgresql/internal/"
- install -m644 postgres_fe.h "${pkgdir}/usr/include/postgresql/internal/"
- install -m644 libpq/pqcomm.h "${pkgdir}/usr/include/postgresql/internal/libpq/"
-}
-
-package_postgresql-docs() {
- pkgdesc="HTML documentation for PostgreSQL"
- options=(docs)
-
- cd "${srcdir}/${pkgbase}-${pkgver}"
-
- # install license
- install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/postgresql-docs/LICENSE"
-
- make -C doc/src/sgml DESTDIR="${pkgdir}" install-html
- chown -R root:root "${pkgdir}/usr/share/doc/postgresql/html/"
-}
-
-package_postgresql() {
- pkgdesc="A sophisticated object-relational DBMS"
- backup=('etc/conf.d/postgresql' 'etc/pam.d/postgresql' 'etc/logrotate.d/postgresql')
- depends=("postgresql-libs>=${pkgver}" 'libxml2' 'readline>=6.0')
- optdepends=('python2: for PL/Python support'
- 'perl: for PL/Perl support')
- provides=('postgresql-client')
- conflicts=('postgresql-client')
-
- cd "${srcdir}/${pkgbase}-${pkgver}"
-
- # install
- make DESTDIR="${pkgdir}" install
- make -C contrib DESTDIR="${pkgdir}" install
- make -C doc/src/sgml DESTDIR="${pkgdir}" install-man
- # we don't want this, it is in the -libs package
- make -C src/bin/pg_config DESTDIR="${pkgdir}" uninstall
- rm "${pkgdir}/usr/share/man/man1/pg_config.1"
-
- # install license
- install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgbase}/LICENSE"
-
- # clean up unneeded installed items
- rm -rf "${pkgdir}/usr/include/postgresql/internal"
- rm -rf "${pkgdir}/usr/include/libpq"
- find "${pkgdir}/usr/include" -maxdepth 1 -type f -execdir rm {} +
-
- # install launch script
- install -D -m755 "${srcdir}/postgresql" "${pkgdir}/etc/rc.d/postgresql"
-
- # install conf file
- install -D -m644 ${srcdir}/postgresql.confd \
- "${pkgdir}/etc/conf.d/postgresql"
-
- install -D -m644 ${srcdir}/postgresql.pam \
- "${pkgdir}/etc/pam.d/postgresql"
-
- install -D -m644 ${srcdir}/postgresql.logrotate \
- "${pkgdir}/etc/logrotate.d/postgresql"
-}
-
-md5sums=('80390514d568a7af5ab61db1cda27e29'
- 'eacf91f987d230f2dc2d040618ea1817'
- 'd63a05943cf0a2726aa2070f3033c569'
- '4d74f4227dc5e12bf95b3490758d86c9'
- '96f82c38f3f540b53f3e5144900acf17'
- 'd28e443f9f65a5712c52018b84e27137'
- '6606e4279d91fc617b5c4dae0d76c603')
diff --git a/testing/postgresql/build.patch b/testing/postgresql/build.patch
deleted file mode 100644
index c8f665d12..000000000
--- a/testing/postgresql/build.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur postgresql-8.2.3-orig/src/Makefile postgresql-8.2.3/src/Makefile
---- postgresql-8.2.3-orig/src/Makefile 2006-06-22 16:50:35.000000000 -0700
-+++ postgresql-8.2.3/src/Makefile 2007-03-05 10:46:24.000000000 -0800
-@@ -23,7 +23,6 @@
- $(MAKE) -C bin $@
- $(MAKE) -C pl $@
- $(MAKE) -C makefiles $@
-- $(MAKE) -C test/regress $@
-
- install: install-local
-
diff --git a/testing/postgresql/perl-5.14-fix.patch b/testing/postgresql/perl-5.14-fix.patch
deleted file mode 100644
index 82ef7d688..000000000
--- a/testing/postgresql/perl-5.14-fix.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/src/pl/plperl/plperl.c
-+++ b/src/pl/plperl/plperl.c
-@@ -926,7 +926,7 @@ plperl_trusted_init(void)
- if (!isGV_with_GP(sv) || !GvCV(sv))
- continue;
- SvREFCNT_dec(GvCV(sv)); /* free the CV */
-- GvCV(sv) = NULL; /* prevent call via GV */
-+ GvCV_set(sv, NULL); /* prevent call via GV */
- }
- hv_clear(stash);
-
---- a/src/pl/plperl/plperl.h
-+++ b/src/pl/plperl/plperl.h
-@@ -49,6 +49,11 @@
- (U32)HeKUTF8(he))
- #endif
-
-+/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */
-+#ifndef GvCV_set
-+#define GvCV_set(gv, cv) (GvCV(gv) = cv)
-+#endif
-+
- /* declare routines from plperl.c for access by .xs files */
- HV *plperl_spi_exec(char *, int);
- void plperl_return_next(SV *);
diff --git a/testing/postgresql/postgresql b/testing/postgresql/postgresql
deleted file mode 100755
index 0fbe94036..000000000
--- a/testing/postgresql/postgresql
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/postgresql
-
-# Default PGROOT if it wasn't defined in the conf.d file
-PGROOT=${PGROOT:-/var/lib/postgres}
-PG_CTL="/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -s -w"
-
-postgres_init() {
- # initialization
- if [ ! -d $PGROOT/data ]; then
- mkdir -p $PGROOT/data && chown -R postgres:postgres $PGROOT
- su - postgres -c "/usr/bin/initdb $INITOPTS -D $PGROOT/data"
- fi
- if [ ! -e /var/log/postgresql.log ]; then
- touch /var/log/postgresql.log
- chown postgres /var/log/postgresql.log
- fi
-}
-
-case "$1" in
- start)
- postgres_init
- stat_busy "Starting PostgreSQL"
- su - postgres -c \
- "$PG_CTL start"
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- add_daemon postgresql
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping PostgreSQL"
- su - postgres -c \
- "$PG_CTL stop -m fast"
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon postgresql
- stat_done
- fi
- ;;
- reload)
- stat_busy "Reloading PostgreSQL"
- su - postgres -c \
- "$PG_CTL reload"
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- stat_done
- fi
- ;;
- restart)
- postgres_init
- stat_busy "Restarting PostgreSQL"
- su - postgres -c \
- "$PG_CTL restart -m fast"
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- add_daemon postgresql
- stat_done
- fi
- ;;
- status)
- stat_busy "Checking PostgreSQL status";
- ck_status postgresql
- ;;
- *)
- echo "usage: $0 {start|stop|reload|restart|status}"
-esac
-exit 0
diff --git a/testing/postgresql/postgresql.confd b/testing/postgresql/postgresql.confd
deleted file mode 100644
index 5f8fa034c..000000000
--- a/testing/postgresql/postgresql.confd
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Parameters to be passed to postgresql
-#
-PGROOT="/var/lib/postgres"
-INITOPTS="--locale $LANG"
diff --git a/testing/postgresql/postgresql.install b/testing/postgresql/postgresql.install
deleted file mode 100644
index d65bb6a7f..000000000
--- a/testing/postgresql/postgresql.install
+++ /dev/null
@@ -1,22 +0,0 @@
-post_install() {
- if [ ! -d '/var/lib/postgres' ]; then
- mkdir -p '/var/lib/postgres'
- fi
- getent group postgres >/dev/null || groupadd -g 88 postgres
- getent passwd postgres >/dev/null || useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /bin/bash postgres
- passwd -l postgres >/dev/null
-}
-
-post_upgrade() {
- post_install $1
- # FS#23858, fix postgres user shell issue
- postgres_shell=$(getent passwd postgres | cut -d: -f7)
- if [ "$postgres_shell" = "/sbin/nologin" ]; then
- chsh -s /bin/bash postgres
- fi
-}
-
-post_remove() {
- getent passwd postgres >/dev/null && userdel postgres
- getent group postgres >/dev/null && groupdel postgres
-}
diff --git a/testing/postgresql/postgresql.logrotate b/testing/postgresql/postgresql.logrotate
deleted file mode 100644
index 9c36918be..000000000
--- a/testing/postgresql/postgresql.logrotate
+++ /dev/null
@@ -1,4 +0,0 @@
-/var/log/postgresql.log {
- copytruncate
- missingok
-}
diff --git a/testing/postgresql/postgresql.pam b/testing/postgresql/postgresql.pam
deleted file mode 100644
index 53724d1f8..000000000
--- a/testing/postgresql/postgresql.pam
+++ /dev/null
@@ -1,3 +0,0 @@
-auth required pam_unix.so
-account required pam_unix.so
-session required pam_unix.so
diff --git a/testing/razor/PKGBUILD b/testing/razor/PKGBUILD
deleted file mode 100644
index 87905b577..000000000
--- a/testing/razor/PKGBUILD
+++ /dev/null
@@ -1,41 +0,0 @@
-# $Id: PKGBUILD 124559 2011-05-22 23:44:08Z andrea $
-# Maintainer:
-# Contributor: Dale Blount <dale@archlinux.org>
-# Contributor: Manolis Tzanidakis
-
-pkgname=razor
-pkgver=2.84
-pkgrel=5
-pkgdesc="A distributed, collaborative, spam detection and filtering network"
-arch=('i686' 'x86_64')
-url="http://razor.sourceforge.net"
-license=('PerlArtistic')
-depends=('perl-net-dns' 'perl-digest-sha1' 'perl-uri' 'perl-digest-nilsimsa' 'perl>=5.14.0')
-source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-agents-${pkgver}.tar.bz2)
-md5sums=('8b9a11a6ce020383c32c45d1530d77c2')
-options=(!emptydirs)
-
-build() {
- cd "${srcdir}"/${pkgname}-agents-${pkgver}
-
- # skip install_razor_agents (we'll do the linking later)
- # /bin/sed -i "s|install :: all pure_install doc_install install_razor_agents|install :: all pure_install doc_install|g" Makefile
-
- perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
-}
-
-package() {
- cd ${srcdir}/${pkgname}-agents-${pkgver}
- make DESTDIR=${pkgdir} install
-
- # remove perllocal.pod and .packlist
- find ${pkgdir} -name perllocal.pod -delete
- find ${pkgdir} -name .packlist -delete
-
- # cd ${pkgdir}/usr/bin
- # for i in razor-check razor-report razor-revoke razor-admin; do
- # /bin/ln -sf razor-client $i;
- # done
-}
diff --git a/testing/re-alpine/PKGBUILD b/testing/re-alpine/PKGBUILD
deleted file mode 100644
index 9293744c9..000000000
--- a/testing/re-alpine/PKGBUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# $Id: PKGBUILD 125747 2011-05-29 05:24:41Z eric $
-# Maintainer: Eric Bélanger <eric@archlinux.org>
-# Contributor: Smith Dhumbumroong <zodmaner@gmail.com>
-
-pkgname=re-alpine
-pkgver=2.02
-pkgrel=3
-pkgdesc="The continuation of the Alpine email client from University of Washington"
-arch=('i686' 'x86_64')
-url="http://sourceforge.net/projects/re-alpine/"
-license=('APACHE')
-depends=('libldap' 'krb5')
-optdepends=('aspell: spell-checking support'
- 'hunspell: spell-checking support')
-provides=('pine' 'alpine')
-conflicts=('pine' 'alpine')
-replaces=('pine' 'alpine')
-options=('!makeflags')
-source=(http://downloads.sourceforge.net/project/re-alpine/${pkgname}-${pkgver}.tar.bz2
- maildir.patch)
-md5sums=('5e75826b15f05674856be8618bdefdfb'
- '8d7a0e8d940e84e978f50266405c7361')
-sha1sums=('9c2f13dbc7ca75e7a09f81df607db84694b10fa6'
- 'c09a8e42f9dba3e63a3755a9c418af95da721d8d')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -p1 < ../maildir.patch
- LIBS+=-lpam ./configure --prefix=/usr --without-passfile --without-tcl \
- --disable-shared --with-system-pinerc=/etc/alpine.d/pine.conf \
- --with-system-fixed-pinerc=/etc/alpine.d/pine.conf.fixed
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-}
diff --git a/testing/re-alpine/maildir.patch b/testing/re-alpine/maildir.patch
deleted file mode 100644
index cff18cb3f..000000000
--- a/testing/re-alpine/maildir.patch
+++ /dev/null
@@ -1,3712 +0,0 @@
-diff -rc alpine-2.00/alpine/alpine.c alpine-2.00.maildir/alpine/alpine.c
-*** alpine-2.00/alpine/alpine.c 2008-06-03 17:31:05.000000000 -0500
---- alpine-2.00.maildir/alpine/alpine.c 2011-01-15 19:11:06.000000000 -0600
-***************
-*** 553,558 ****
---- 553,563 ----
- if(F_ON(F_MAILDROPS_PRESERVE_STATE, ps_global))
- mail_parameters(NULL, SET_SNARFPRESERVE, (void *) TRUE);
-
-+ #ifndef _WINDOWS
-+ mail_parameters(NULL,SET_COURIERSTYLE,
-+ (void *)(F_ON(F_COURIER_FOLDER_LIST, ps_global) ? 1 : 0));
-+ #endif
-+
- rvl = 0L;
- if(pine_state->VAR_NNTPRANGE){
- if(!SVAR_NNTPRANGE(pine_state, rvl, tmp_20k_buf, SIZEOF_20KBUF))
-diff -rc alpine-2.00/alpine/confscroll.c alpine-2.00.maildir/alpine/confscroll.c
-*** alpine-2.00/alpine/confscroll.c 2008-08-21 17:14:45.000000000 -0500
---- alpine-2.00.maildir/alpine/confscroll.c 2011-01-15 19:11:06.000000000 -0600
-***************
-*** 5489,5494 ****
---- 5489,5500 ----
- (void *)var->current_val.p);
- }
- #endif
-+ #ifndef _WINDOWS
-+ else if(var == &ps->vars[V_MAILDIR_LOCATION]){
-+ if(var->current_val.p && var->current_val.p[0])
-+ mail_parameters(NULL, SET_MDINBOXPATH, (void *)var->current_val.p);
-+ }
-+ #endif
- else if(revert && standard_radio_var(ps, var)){
-
- cur_rule_value(var, TRUE, FALSE);
-diff -rc alpine-2.00/imap/src/c-client/mail.c alpine-2.00.maildir/imap/src/c-client/mail.c
-*** alpine-2.00/imap/src/c-client/mail.c 2008-06-04 13:39:54.000000000 -0500
---- alpine-2.00.maildir/imap/src/c-client/mail.c 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 991,997 ****
- MAILSTREAM *ts;
- char *s,*t,tmp[MAILTMPLEN];
- size_t i;
-! DRIVER *d;
- /* never allow names with newlines */
- if (s = strpbrk (mailbox,"\015\012")) {
- MM_LOG ("Can't create mailbox with such a name",ERROR);
---- 991,997 ----
- MAILSTREAM *ts;
- char *s,*t,tmp[MAILTMPLEN];
- size_t i;
-! DRIVER *d, *md;
- /* never allow names with newlines */
- if (s = strpbrk (mailbox,"\015\012")) {
- MM_LOG ("Can't create mailbox with such a name",ERROR);
-***************
-*** 1015,1020 ****
---- 1015,1022 ----
- return NIL;
- }
-
-+ /* Hack, we should do this better, but it works */
-+ for (md = maildrivers; md && strcmp (md->name, "md"); md = md->next);
- /* see if special driver hack */
- if ((mailbox[0] == '#') && ((mailbox[1] == 'd') || (mailbox[1] == 'D')) &&
- ((mailbox[2] == 'r') || (mailbox[2] == 'R')) &&
-***************
-*** 1045,1050 ****
---- 1047,1059 ----
- (((*mailbox == '{') || (*mailbox == '#')) &&
- (stream = mail_open (NIL,mailbox,OP_PROTOTYPE | OP_SILENT))))
- d = stream->dtb;
-+ else if(mailbox[0] == '#'
-+ && (mailbox[1] == 'm' || mailbox[1] == 'M')
-+ && (mailbox[2] == 'd' || mailbox[2] == 'D'
-+ || mailbox[2] == 'c' || mailbox[2] == 'C')
-+ && mailbox[3] == '/'
-+ && mailbox[4] != '\0')
-+ return (*md->create)(stream, mailbox);
- else if ((*mailbox != '{') && (ts = default_proto (NIL))) d = ts->dtb;
- else { /* failed utterly */
- sprintf (tmp,"Can't create mailbox %.80s: indeterminate format",mailbox);
-diff -rc alpine-2.00/imap/src/c-client/mail.h alpine-2.00.maildir/imap/src/c-client/mail.h
-*** alpine-2.00/imap/src/c-client/mail.h 2008-08-08 12:34:22.000000000 -0500
---- alpine-2.00.maildir/imap/src/c-client/mail.h 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 353,358 ****
---- 353,362 ----
- #define SET_SCANCONTENTS (long) 573
- #define GET_MHALLOWINBOX (long) 574
- #define SET_MHALLOWINBOX (long) 575
-+ #define GET_COURIERSTYLE (long) 576
-+ #define SET_COURIERSTYLE (long) 577
-+ #define SET_MDINBOXPATH (long) 578
-+ #define GET_MDINBOXPATH (long) 579
-
- /* Driver flags */
-
-diff -rc alpine-2.00/imap/src/osdep/unix/dummy.c alpine-2.00.maildir/imap/src/osdep/unix/dummy.c
-*** alpine-2.00/imap/src/osdep/unix/dummy.c 2008-06-04 13:18:34.000000000 -0500
---- alpine-2.00.maildir/imap/src/osdep/unix/dummy.c 2011-01-15 20:01:59.000000000 -0600
-***************
-*** 106,118 ****
- * Accepts: mailbox name
- * Returns: our driver if name is valid, NIL otherwise
- */
-!
- DRIVER *dummy_valid (char *name)
- {
-! char *s,tmp[MAILTMPLEN];
- struct stat sbuf;
- /* must be valid local mailbox */
-! if (name && *name && (*name != '{') && (s = mailboxfile (tmp,name))) {
- /* indeterminate clearbox INBOX */
- if (!*s) return &dummydriver;
- else if (!stat (s,&sbuf)) switch (sbuf.st_mode & S_IFMT) {
---- 106,124 ----
- * Accepts: mailbox name
- * Returns: our driver if name is valid, NIL otherwise
- */
-! char * maildir_remove_root(char *);
- DRIVER *dummy_valid (char *name)
- {
-! char *s,tmp[MAILTMPLEN], *rname;
- struct stat sbuf;
-+
-+ if(strlen(name) > MAILTMPLEN)
-+ name[MAILTMPLEN] = '\0';
-+
-+ strcpy(tmp, name);
-+ rname = maildir_remove_root(tmp);
- /* must be valid local mailbox */
-! if (rname && *rname && (*rname != '{') && (s = mailboxfile (tmp,rname))) {
- /* indeterminate clearbox INBOX */
- if (!*s) return &dummydriver;
- else if (!stat (s,&sbuf)) switch (sbuf.st_mode & S_IFMT) {
-***************
-*** 121,128 ****
- return &dummydriver;
- }
- /* blackbox INBOX does not exist yet */
-! else if (!compare_cstring (name,"INBOX")) return &dummydriver;
- }
- return NIL;
- }
-
---- 127,135 ----
- return &dummydriver;
- }
- /* blackbox INBOX does not exist yet */
-! else if (!compare_cstring (rname,"INBOX")) return &dummydriver;
- }
-+ if(rname) fs_give((void **)&rname);
- return NIL;
- }
-
-***************
-*** 454,459 ****
---- 461,468 ----
- {
- char *s,tmp[MAILTMPLEN];
- long ret = NIL;
-+ if(!strncmp(mailbox,"#md/",4) || !strncmp(mailbox,"#mc/", 4))
-+ return maildir_create(stream, mailbox);
- /* validate name */
- if (!(compare_cstring (mailbox,"INBOX") && (s = dummy_file (tmp,mailbox)))) {
- sprintf (tmp,"Can't create %.80s: invalid name",mailbox);
-***************
-*** 519,524 ****
---- 528,541 ----
- {
- struct stat sbuf;
- char *s,tmp[MAILTMPLEN];
-+ if (!strncmp(mailbox,"#md/",4) || !strncmp(mailbox,"#mc/", 4)
-+ || is_valid_maildir(&mailbox)){
-+ char tmp[MAILTMPLEN] = {'\0'};
-+ strcpy(tmp, mailbox);
-+ if(tmp[strlen(tmp) - 1] != '/')
-+ tmp[strlen(tmp)] = '/';
-+ return maildir_delete(stream, tmp);
-+ }
- if (!(s = dummy_file (tmp,mailbox))) {
- sprintf (tmp,"Can't delete - invalid name: %.80s",s);
- MM_LOG (tmp,ERROR);
-***************
-*** 544,555 ****
- long dummy_rename (MAILSTREAM *stream,char *old,char *newname)
- {
- struct stat sbuf;
-! char c,*s,tmp[MAILTMPLEN],mbx[MAILTMPLEN],oldname[MAILTMPLEN];
- /* no trailing / allowed */
-! if (!dummy_file (oldname,old) || !(s = dummy_file (mbx,newname)) ||
- stat (oldname,&sbuf) || ((s = strrchr (s,'/')) && !s[1] &&
- ((sbuf.st_mode & S_IFMT) != S_IFDIR))) {
-! sprintf (mbx,"Can't rename %.80s to %.80s: invalid name",old,newname);
- MM_LOG (mbx,ERROR);
- return NIL;
- }
---- 561,583 ----
- long dummy_rename (MAILSTREAM *stream,char *old,char *newname)
- {
- struct stat sbuf;
-! char c,*s,tmp[MAILTMPLEN],mbx[MAILTMPLEN],oldname[MAILTMPLEN], *rold, *rnewname;
-!
-! if(strlen(old) > MAILTMPLEN)
-! old[MAILTMPLEN] = '\0';
-!
-! if(strlen(newname) > MAILTMPLEN)
-! newname[MAILTMPLEN] = '\0';
-!
-! strcpy(tmp, old);
-! rold = maildir_remove_root(tmp);
-! strcpy(tmp, newname);
-! rnewname = maildir_remove_root(tmp);
- /* no trailing / allowed */
-! if (!dummy_file (oldname,rold) || !(s = dummy_file (mbx,rnewname)) ||
- stat (oldname,&sbuf) || ((s = strrchr (s,'/')) && !s[1] &&
- ((sbuf.st_mode & S_IFMT) != S_IFDIR))) {
-! sprintf (mbx,"Can't rename %.80s to %.80s: invalid name",rold,rnewname);
- MM_LOG (mbx,ERROR);
- return NIL;
- }
-***************
-*** 565,578 ****
- }
- }
- /* rename of non-ex INBOX creates dest */
-! if (!compare_cstring (old,"INBOX") && stat (oldname,&sbuf))
- return dummy_create (NIL,mbx);
- if (rename (oldname,mbx)) {
-! sprintf (tmp,"Can't rename mailbox %.80s to %.80s: %.80s",old,newname,
- strerror (errno));
- MM_LOG (tmp,ERROR);
- return NIL;
- }
- return T; /* return success */
- }
-
---- 593,608 ----
- }
- }
- /* rename of non-ex INBOX creates dest */
-! if (!compare_cstring (rold,"INBOX") && stat (oldname,&sbuf))
- return dummy_create (NIL,mbx);
- if (rename (oldname,mbx)) {
-! sprintf (tmp,"Can't rename mailbox %.80s to %.80s: %.80s",rold,rnewname,
- strerror (errno));
- MM_LOG (tmp,ERROR);
- return NIL;
- }
-+ if(rold) fs_give((void **)&rold);
-+ if(rnewname) fs_give((void **)&rnewname);
- return T; /* return success */
- }
-
-diff -rc alpine-2.00/imap/src/osdep/unix/maildir.c alpine-2.00.maildir/imap/src/osdep/unix/maildir.c
-*** alpine-2.00/imap/src/osdep/unix/maildir.c 2011-01-24 19:38:50.000000000 -0600
---- alpine-2.00.maildir/imap/src/osdep/unix/maildir.c 2011-01-15 19:38:50.000000000 -0600
-***************
-*** 0 ****
---- 1,2584 ----
-+ /*
-+ * Maildir driver for Alpine 2.00
-+ *
-+ * Written by Eduardo Chappa <chappa@washington.edu>
-+ * Last Update: November 6, 2010.
-+ *
-+ */
-+
-+ #include <stdio.h>
-+ #include <ctype.h>
-+ #include <errno.h>
-+ extern int errno; /* just in case */
-+ #include "mail.h"
-+ #include <pwd.h>
-+ #include <sys/stat.h>
-+ #include <sys/time.h>
-+ #include "osdep.h"
-+ #include "rfc822.h"
-+ #include "fdstring.h"
-+ #include "misc.h"
-+ #include "dummy.h"
-+ #include "maildir.h"
-+
-+ /* Driver dispatch used by MAIL */
-+ DRIVER maildirdriver = {
-+ "md", /* driver name, yes it's md, not maildir */
-+ /* driver flags */
-+ DR_MAIL|DR_LOCAL|DR_NAMESPACE|DR_DIRFMT,
-+ (DRIVER *) NIL, /* next driver */
-+ maildir_valid, /* mailbox is valid for us */
-+ maildir_parameters, /* manipulate parameters */
-+ NIL, /* scan mailboxes */
-+ maildir_list, /* find mailboxes */
-+ maildir_lsub, /* find subscribed mailboxes */
-+ maildir_sub, /* subscribe to mailbox */
-+ maildir_unsub, /* unsubscribe from mailbox */
-+ maildir_create, /* create mailbox */
-+ maildir_delete, /* delete mailbox */
-+ maildir_rename, /* rename mailbox */
-+ mail_status_default, /* status of mailbox */
-+ maildir_open, /* open mailbox */
-+ maildir_close, /* close mailbox */
-+ maildir_fast, /* fetch message "fast" attributes */
-+ NIL, /* fetch message flags */
-+ NIL, /* fetch overview */
-+ NIL, /* fetch message structure */
-+ maildir_header, /* fetch message header */
-+ maildir_text, /* fetch message body */
-+ NIL, /* fetch partial message text */
-+ NIL, /* unique identifier */
-+ NIL, /* message number */
-+ NIL, /* modify flags */
-+ maildir_flagmsg, /* per-message modify flags */
-+ NIL, /* search for message based on criteria */
-+ NIL, /* sort messages */
-+ NIL, /* thread messages */
-+ maildir_ping, /* ping mailbox to see if still alive */
-+ maildir_check, /* check for new messages */
-+ maildir_expunge, /* expunge deleted messages */
-+ maildir_copy, /* copy messages to another mailbox */
-+ maildir_append, /* append string message to mailbox */
-+ NIL /* garbage collect stream */
-+ };
-+
-+
-+ DRIVER courierdriver = {
-+ "mc", /* Why a separate driver? So that
-+ createproto will work */
-+ /* driver flags */
-+ DR_MAIL|DR_LOCAL|DR_NAMESPACE|DR_DIRFMT,
-+ (DRIVER *) NIL, /* next driver */
-+ maildir_valid, /* mailbox is valid for us */
-+ maildir_parameters, /* manipulate parameters */
-+ NIL, /* scan mailboxes */
-+ courier_list, /* find mailboxes */
-+ maildir_lsub, /* find subscribed mailboxes */
-+ maildir_sub, /* subscribe to mailbox */
-+ maildir_unsub, /* unsubscribe from mailbox */
-+ maildir_create, /* create mailbox */
-+ maildir_delete, /* delete mailbox */
-+ maildir_rename, /* rename mailbox */
-+ mail_status_default, /* status of mailbox */
-+ maildir_open, /* open mailbox */
-+ maildir_close, /* close mailbox */
-+ maildir_fast, /* fetch message "fast" attributes */
-+ NIL, /* fetch message flags */
-+ NIL, /* fetch overview */
-+ NIL, /* fetch message structure */
-+ maildir_header, /* fetch message header */
-+ maildir_text, /* fetch message body */
-+ NIL, /* fetch partial message text */
-+ NIL, /* unique identifier */
-+ NIL, /* message number */
-+ NIL, /* modify flags */
-+ maildir_flagmsg, /* per-message modify flags */
-+ NIL, /* search for message based on criteria */
-+ NIL, /* sort messages */
-+ NIL, /* thread messages */
-+ maildir_ping, /* ping mailbox to see if still alive */
-+ maildir_check, /* check for new messages */
-+ maildir_expunge, /* expunge deleted messages */
-+ maildir_copy, /* copy messages to another mailbox */
-+ maildir_append, /* append string message to mailbox */
-+ NIL /* garbage collect stream */
-+ };
-+
-+ MAILSTREAM maildirproto = {&maildirdriver}; /* prototype stream */
-+ MAILSTREAM courierproto = {&courierdriver}; /* prototype stream */
-+
-+ long maildir_dirfmttest (char *name)
-+ {
-+ int i;
-+ for (i = 0; mdstruct[i] && strcmp(name, mdstruct[i]); i++);
-+ return (i < EndDir) || !strcmp(name, MDDIR)
-+ || !strncmp(name, MDUIDLAST, strlen(MDUIDLAST))
-+ || !strncmp(name, MDUIDTEMP, strlen(MDUIDTEMP)) ? LONGT : NIL;
-+ }
-+
-+ void
-+ md_domain_name(void)
-+ {
-+ int i;
-+
-+ strcpy(mdlocaldomain,mylocalhost ());
-+ for (i = 0; mdlocaldomain[i] ; i++)
-+ if(mdlocaldomain[i] == '/')
-+ mdlocaldomain[i] = '\057';
-+ else if (mdlocaldomain[i] == ':')
-+ mdlocaldomain[i] = '\072';
-+ }
-+
-+ char *
-+ myrootdir(char *name)
-+ {
-+ return myhomedir();
-+ }
-+
-+ char *
-+ mdirpath(void)
-+ {
-+ char *path = maildir_parameters(GET_MDINBOXPATH,NIL);
-+ return path ? (path[0] ? path : ".") : "Maildir";
-+ }
-+
-+ /* remove the "#md/" or "#mc/" part from a folder name */
-+ char *
-+ maildir_remove_root (char *name)
-+ {
-+ int courier = IS_COURIER(name), offset;
-+ char realname[MAILTMPLEN];
-+
-+ offset = maildir_valid_name(name) ? (name[3] == '/' ? 4 : 3) : 0;
-+ if(courier)
-+ courier_realname(name+offset, realname);
-+ else
-+ strcpy(realname, name+offset);
-+ return cpystr(realname);
-+ }
-+
-+
-+ /* Check validity of the name, we accept:
-+ * a) #md/directory/folder
-+ * b) #md/inbox
-+ * A few considerations: We can only accept as valid
-+ * a) names that start with #md/ and the directory exists or
-+ * b) names that do not start with #md/ but are maildir directories (have
-+ * the /cur, /tmp and /new structure)
-+ */
-+ int maildir_valid_name (char *name)
-+ {
-+ char tmpname[MAILTMPLEN] = {'\0'};
-+
-+ if (mdfpath)
-+ fs_give((void **)&mdfpath);
-+ if (name && (name[0] != '#'))
-+ sprintf(tmpname,"%s%s",MDPREFIX(CCLIENT), name);
-+ mdfpath = cpystr(tmpname[0] ? tmpname : name);
-+
-+ return IS_CCLIENT(name) || IS_COURIER(name);
-+ }
-+
-+ /* Check if the directory whose path is given by name is a valid maildir
-+ * directory (contains /cur, /tmp and /new)
-+ */
-+ int maildir_valid_dir (char *name)
-+ {
-+ int len;
-+ DirNamesType i;
-+ struct stat sbuf;
-+ char tmp[MAILTMPLEN];
-+
-+ if(name[strlen(name) - 1] == '/')
-+ name[strlen(name) - 1] = '\0';
-+ len = strlen(name);
-+ for (i = Cur; i != EndDir; i++){
-+ MDFLD(tmp, name, i);
-+ if (stat(tmp, &sbuf) < 0 || !S_ISDIR(sbuf.st_mode))
-+ break;
-+ }
-+ name[len] = '\0';
-+ return (i == EndDir) ? T : NIL;
-+ }
-+
-+ void courier_realname(char *name, char *realname)
-+ {
-+ int i,j;
-+
-+ if(!name)
-+ return;
-+
-+ for (i = 0, j = 0; i < MAILTMPLEN && j < strlen(name); j++, i++){
-+ realname[i] = name[j];
-+ if(name[j] == '/' && name[j+1] != '.' && name[j+1] != '%'
-+ && name[j+1] != '*')
-+ realname[++i] = '.';
-+ }
-+ if(realname[i-1] == '.')
-+ i--;
-+ realname[i] = '\0';
-+ }
-+
-+
-+ /* given a maildir folder, return its path. Memory freed by caller. Directory
-+ * does not contain the trailing slash "/". On error NULL is returned.
-+ */
-+ int maildir_file_path (char *name, char *tmp)
-+ {
-+ char *maildirpath = mdirpath(), *rname;
-+ int courier = IS_COURIER(name);
-+
-+ /* There are several ways in which the path can come, so we will handle
-+ them here. First we deal with #mc/ or #md/ prefix by removing the
-+ prefix, if any */
-+
-+ if(strlen(name) >= MAILTMPLEN)
-+ name[MAILTMPLEN] = '\0';
-+ strcpy(tmp, name);
-+ rname = maildir_remove_root(tmp);
-+ tmp[0] = '\0'; /* just in case something fails */
-+
-+ if (strlen(myrootdir(rname)) +
-+ max(strlen(rname), strlen(maildirpath)) > MAILTMPLEN){
-+ errno = ENAMETOOLONG;
-+ sprintf(tmp,"Error opening \"%s\": %s", rname, strerror (errno));
-+ mm_log(tmp,ERROR);
-+ return NIL;
-+ }
-+
-+ /* There are two ways in which the name can come here, either as a
-+ full path or not. If it is not a full path it can come in two ways,
-+ either as a file system path (Maildir/.Drafts) or as a maildir path
-+ (INBOX.Drafts)
-+ */
-+
-+ if(*rname == '/') /* full path */
-+ strcpy(tmp, rname); /* do nothing */
-+ else{
-+ sprintf (tmp,"%s/%s%s%s", myrootdir (rname),
-+ strncmp (ucase (strcpy (tmp, rname)), "INBOX", 5)
-+ ? rname : maildirpath,
-+ strncmp (ucase (strcpy (tmp, rname)), "INBOX", 5)
-+ ? "" : (courier ? "/" : ""),
-+ strncmp (ucase (strcpy (tmp, rname)), "INBOX", 5)
-+ ? "" : (*(rname+5) == MDSEPARATOR(courier) ? rname+5 : ""));
-+ }
-+ if(rname) fs_give((void **)&rname);
-+ return tmp[0] ? T : NIL;
-+ }
-+
-+ /* This function is given a full path for a mailbox and returns
-+ * if it is a valid maildir transformed to canonical notation
-+ */
-+ int
-+ is_valid_maildir (char **name)
-+ {
-+ if (!strncmp(*name, myrootdir (*name), strlen(myrootdir(*name)))){
-+ (*name) += strlen(myrootdir(*name));
-+ if (**name == '/') (*name)++;
-+ }
-+ return maildir_valid(*name) ? T : NIL;
-+ }
-+
-+ /* Check validity of mailbox. This routine does not send errors to log, other
-+ * routines calling this one may do so, though
-+ */
-+
-+ DRIVER *maildir_valid (char *name)
-+ {
-+ char tmpname[MAILTMPLEN];
-+
-+ maildir_file_path(name, tmpname);
-+
-+ return maildir_valid_dir(tmpname)
-+ ? (IS_COURIER(name) ? &courierdriver : &maildirdriver) : NIL;
-+ }
-+
-+ void maildir_fast (MAILSTREAM *stream,char *sequence,long flags)
-+ {
-+ unsigned long i;
-+ MESSAGECACHE *elt;
-+ /* get sequence */
-+ if (stream && LOCAL && ((flags & FT_UID) ?
-+ mail_uid_sequence (stream,sequence) :
-+ mail_sequence (stream,sequence)))
-+ for (i = 1L; i <= stream->nmsgs; i++) {
-+ if ((elt = mail_elt (stream,i))->sequence && (elt->valid = T) &&
-+ !(elt->day && elt->rfc822_size)) {
-+ ENVELOPE **env = NIL;
-+ ENVELOPE *e = NIL;
-+ if (!stream->scache) env = &elt->private.msg.env;
-+ else if (stream->msgno == i) env = &stream->env;
-+ else env = &e;
-+ if (!*env || !elt->rfc822_size) {
-+ STRING bs;
-+ unsigned long hs;
-+ char *ht = (*stream->dtb->header) (stream,i,&hs,NIL);
-+
-+ if (!*env) rfc822_parse_msg (env,NIL,ht,hs,NIL,BADHOST,
-+ stream->dtb->flags);
-+ if (!elt->rfc822_size) {
-+ (*stream->dtb->text) (stream,i,&bs,FT_PEEK);
-+ elt->rfc822_size = hs + SIZE (&bs) - GETPOS (&bs);
-+ }
-+ }
-+
-+ if (!elt->day && *env && (*env)->date)
-+ mail_parse_date (elt,(*env)->date);
-+
-+ if (!elt->day) elt->day = elt->month = 1;
-+ mail_free_envelope (&e);
-+ }
-+ }
-+ }
-+
-+ int
-+ maildir_eliminate_duplicate (char *name, struct direct ***flist, unsigned long *nfiles)
-+ {
-+ int i, j, k, error = 0, scanr;
-+ char new[MAILTMPLEN], old[MAILTMPLEN], tmp[MAILTMPLEN], *str;
-+ struct direct **names = NIL;
-+
-+ if((scanr = maildir_doscandir(name, &names, CCLIENT)) < 0)
-+ return -1;
-+
-+ if(nfiles) *nfiles = scanr;
-+ for(i = 0, j = 1, k = 0; j < scanr; i++, j++){
-+ if(k)
-+ names[i] = names[i+k];
-+ if(same_maildir_file(names[i]->d_name, names[j]->d_name)){
-+ int d, f, r, s;
-+ maildir_getflag(names[i]->d_name, &d, &f, &r, &s, NIL);
-+ sprintf(old,"%s/%s", name, names[i]->d_name);
-+ sprintf(new,"%s/.%s", name, names[i]->d_name);
-+ if(rename(old, new) < 0 && errno != EEXIST)
-+ error++;
-+ if(!error){
-+ for(; j < scanr
-+ && same_maildir_file(names[i]->d_name, names[j]->d_name)
-+ ; j++, k++){
-+ maildir_getflag(names[j]->d_name, (d ? NIL : &d),
-+ (f ? NIL : &f), (r ? NIL : &r), (s ? NIL : &s), NIL);
-+ sprintf(tmp,"%s/%s", name, names[j]->d_name);
-+ if(unlink(tmp) < 0){ /* Hmmm... a problem, let's see */
-+ struct stat sbuf;
-+ if (stat(tmp, &sbuf) == 0 && (sbuf.st_mode & S_IFMT) == S_IFREG)
-+ error++;
-+ }
-+ }
-+ if((str = strrchr(names[i]->d_name,FLAGSEP)) != NULL) *str = '\0';
-+ sprintf (old,"%s/%s%s%s%s%s%s", name, names[i]->d_name, MDSEP(2),
-+ MDFLAG(Draft, d), MDFLAG(Flagged, f), MDFLAG(Replied, r),
-+ MDFLAG(Seen, s));
-+ if(rename(new, old) < 0)
-+ error++;
-+ }
-+ }
-+
-+ }
-+ if(k > 0)
-+ fs_give((void **)&names);
-+ else
-+ *flist = names;
-+ return error ? -1 : k;
-+ }
-+
-+ int
-+ maildir_doscandir(char *name, struct direct ***flist, int flag)
-+ {
-+ return scandir(name, flist,
-+ flag == CCLIENT ? maildir_select : courier_dir_select,
-+ flag == CCLIENT ? maildir_namesort : courier_dir_sort);
-+ }
-+
-+ /*
-+ * return all files in a given directory. This is a separate call
-+ * so that if there are warnings during compilation this only appears once.
-+ */
-+ unsigned long
-+ maildir_scandir (char *name, struct direct ***flist,
-+ unsigned long *nfiles, int *scand, int flag)
-+ {
-+ struct stat sbuf;
-+ int rv = -2; /* impossible value */
-+
-+ if (scand)
-+ *scand = -1; /* assume error for safety */
-+ *nfiles = 0;
-+ if((stat(name,&sbuf) < 0)
-+ || (flag == CCLIENT
-+ && ((rv = maildir_eliminate_duplicate(name, flist, nfiles)) < 0)))
-+ return 0L;
-+
-+ if (scand && (rv > 0 || rv == -2))
-+ *nfiles = maildir_doscandir(name, flist, flag);
-+
-+ if(scand) *scand = *nfiles;
-+
-+ return (unsigned long) sbuf.st_ctime;
-+ }
-+
-+ /* Does a message with given name exists (or was it removed)?
-+ * Returns: 1 - yes, such message exist,
-+ * 0 - No, that message does not exist anymore
-+ *
-+ * Parameters: stream, name of mailbox, new name if his message does not
-+ * exist.
-+ */
-+
-+ int maildir_message_exists(MAILSTREAM *stream, char *name, char *newfile)
-+ {
-+ char tmp[MAILTMPLEN];
-+ int gotit = NIL;
-+ DIR *dir;
-+ struct direct *d;
-+ struct stat sbuf;
-+
-+ /* First check directly if it exists, if not there, look for it */
-+ sprintf(tmp,"%s/%s", LOCAL->curdir, name);
-+ if ((stat(tmp, &sbuf) == 0) && ((sbuf.st_mode & S_IFMT) == S_IFREG))
-+ return T;
-+
-+ if (!(dir = opendir (LOCAL->curdir)))
-+ return NIL;
-+
-+ while ((d = readdir(dir)) && gotit == NIL){
-+ if (d->d_name[0] == '.')
-+ continue;
-+ if (same_maildir_file(d->d_name, name)){
-+ gotit = T;
-+ strcpy(newfile, d->d_name);
-+ }
-+ }
-+ closedir(dir);
-+ return gotit;
-+ }
-+
-+ /* Maildir open */
-+
-+ MAILSTREAM *maildir_open (MAILSTREAM *stream)
-+ {
-+ char tmp[MAILTMPLEN];
-+ struct stat sbuf;
-+
-+ if (!stream) return &maildirproto;
-+ if (stream->local) fatal ("maildir recycle stream");
-+ md_domain_name(); /* get domain name for maildir files in mdlocaldomain */
-+ if(mypid == (pid_t) 0)
-+ mypid = getpid();
-+ if (!stream->rdonly){
-+ stream->perm_seen = stream->perm_deleted = stream->perm_flagged =
-+ stream->perm_answered = stream->perm_draft = T;
-+ }
-+ stream->local = (MAILDIRLOCAL *) fs_get (sizeof (MAILDIRLOCAL));
-+ memset(LOCAL, 0, sizeof(MAILDIRLOCAL));
-+ LOCAL->fd = -1;
-+
-+ LOCAL->courier = IS_COURIER(stream->mailbox);
-+ strcpy(tmp, stream->mailbox);
-+ if (maildir_file_path (stream->mailbox, tmp))
-+ LOCAL->dir = cpystr (tmp);
-+ LOCAL->candouid = maildir_can_assign_uid(stream);
-+ maildir_read_uid(stream, &stream->uid_last, &stream->uid_validity);
-+ if (LOCAL->dir){
-+ MDFLD(tmp, LOCAL->dir, Cur);
-+ LOCAL->curdir = cpystr (tmp);
-+ if (stat (LOCAL->curdir,&sbuf) < 0) {
-+ sprintf (tmp,"Can't open folder %s: %s",
-+ stream->mailbox,strerror (errno));
-+ mm_log (tmp,ERROR);
-+ maildir_close(stream, 0);
-+ return NIL;
-+ }
-+ }
-+
-+ if(maildir_file_path (stream->mailbox, tmp)){
-+ fs_give ((void **) &stream->mailbox);
-+ stream->mailbox = cpystr(tmp);
-+ }
-+
-+ LOCAL->buf = (char *) fs_get ((LOCAL->buflen = SENDBUFLEN) + 1);
-+ stream->sequence++;
-+ stream->nmsgs = stream->recent = 0L;
-+
-+ maildir_parse_folder(stream, 1);
-+
-+ return stream;
-+ }
-+
-+ /* Maildir initial parsing of the folder */
-+ void
-+ maildir_parse_folder (MAILSTREAM *stream, int full)
-+ {
-+ char tmp[MAILTMPLEN], tmp2[MAILTMPLEN];
-+ struct direct **namescur = NIL, **namesnew = NIL;
-+ unsigned long i, nfilescur = 0L, nfilesnew = 0L, oldpos, newpos, total;
-+ int scan_err, rescan, loop = 0;
-+
-+ if (!stream) /* what??? */
-+ return;
-+
-+ MM_CRITICAL(stream);
-+
-+ MDFLD(tmp, LOCAL->dir, New);
-+ maildir_scandir (tmp, &namesnew, &nfilesnew, &scan_err, CCLIENT);
-+ if (scan_err < 0)
-+ maildir_abort(stream);
-+
-+ /* Scan old messages first, escoba! */
-+ if(stream->rdonly ||
-+ (LOCAL && ((maildir_initial_check(stream, Cur) == 0)
-+ || nfilesnew > 0L))){
-+ MDFLD(tmp, LOCAL->dir, Cur);
-+ LOCAL->scantime = maildir_scandir (tmp, &namescur, &nfilescur,
-+ &scan_err, CCLIENT);
-+ if (scan_err < 0){
-+ if(namesnew){
-+ for(i = 0L; i < nfilesnew; i++)
-+ fs_give((void **)&namesnew[i]);
-+ fs_give((void **) &namesnew);
-+ }
-+ maildir_abort(stream);
-+ }
-+ }
-+ if(LOCAL && (maildir_initial_check(stream, New) == 0)
-+ && (nfilescur > 0L)){
-+ MDFLD(tmp, LOCAL->dir, New);
-+ while(LOCAL && loop < 10){
-+ if(nfilesnew == 0L)
-+ maildir_scandir (tmp, &namesnew, &nfilesnew, &scan_err, CCLIENT);
-+ if (scan_err < 0){
-+ if(namesnew){
-+ for(i = 0L; i < nfilesnew; i++)
-+ fs_give((void **)&namesnew[i]);
-+ fs_give((void **) &namesnew);
-+ }
-+ maildir_abort(stream);
-+ break;
-+ }
-+ for(i = 0L, rescan = 0, newpos = oldpos = 0L;
-+ newpos < nfilescur && i < nfilesnew; i++){
-+ if(maildir_message_in_list(namesnew[i]->d_name, namescur, oldpos,
-+ nfilescur - 1L, &newpos)){
-+ oldpos = newpos;
-+ sprintf(tmp2,"%s/%s",tmp,namesnew[i]->d_name);
-+ if(unlink(tmp2) < 0)
-+ scan_err = -1;
-+ rescan++;
-+ }
-+ else
-+ newpos = oldpos;
-+ }
-+ if(scan_err < 0)
-+ maildir_abort(stream);
-+ if(rescan == 0)
-+ break;
-+ else{ /* restart */
-+ if(namesnew){
-+ for(i = 0L; i < nfilesnew; i++)
-+ fs_give((void **)&namesnew[i]);
-+ fs_give((void **) &namesnew);
-+ }
-+ nfilesnew = 0L;
-+ loop++;
-+ }
-+ }
-+ }
-+ if(loop == 10)
-+ maildir_abort(stream);
-+ if(LOCAL){
-+ if(stream->rdonly)
-+ stream->recent = 0L;
-+ total = namescur || stream->rdonly
-+ ? maildir_parse_dir(stream, 0L, Cur, namescur,
-+ nfilescur, full) : stream->nmsgs;
-+ stream->nmsgs = maildir_parse_dir(stream, total, New, namesnew,
-+ nfilesnew, full);
-+ }
-+ if(namesnew){
-+ for(i = 0L; i < nfilesnew; i++)
-+ fs_give((void **)&namesnew[i]);
-+ fs_give((void **) &namesnew);
-+ }
-+ if(namescur){
-+ for(i = 0L; i < nfilescur; i++)
-+ fs_give((void **)&namescur[i]);
-+ fs_give((void **) &namescur);
-+ }
-+ MM_NOCRITICAL(stream);
-+ }
-+
-+ int
-+ maildir_initial_check (MAILSTREAM *stream, DirNamesType dirtype)
-+ {
-+ char tmp[MAILTMPLEN];
-+ struct stat sbuf;
-+
-+ MDFLD(tmp, LOCAL->dir, dirtype);
-+ if (access (tmp, R_OK|W_OK|X_OK) != 0){
-+ maildir_abort(stream);
-+ return -1;
-+ }
-+
-+ MDFLD(tmp, LOCAL->dir, Cur);
-+ if (dirtype != New &&
-+ (stat(tmp, &sbuf) < 0 || sbuf.st_ctime == LOCAL->scantime))
-+ return -1;
-+ return 0;
-+ }
-+
-+
-+ /* Return the number of messages in the directory, while filling the
-+ * elt structure.
-+ */
-+
-+ unsigned long
-+ maildir_parse_dir(MAILSTREAM *stream, unsigned long nmsgs,
-+ DirNamesType dirtype, struct direct **names,
-+ unsigned long nfiles, int full)
-+ {
-+ char tmp[MAILTMPLEN], tmp2[MAILTMPLEN], file[MAILTMPLEN],
-+ newfile[MAILTMPLEN], *mdstr;
-+ struct stat sbuf;
-+ unsigned long i, new = 0L, l, uid_last;
-+ unsigned long recent = stream ? stream->recent : 0L;
-+ int d = 0, f = 0, r = 0, s = 0, t = 0;
-+ int we_compute, in_list;
-+ int silent = stream ? stream->silent : NIL;
-+ MESSAGECACHE *elt;
-+
-+ MDFLD(tmp, LOCAL->dir, dirtype);
-+ if (dirtype == Cur && !stream->rdonly)
-+ for (i = 1L; i <= stream->nmsgs;){
-+ elt = mail_elt(stream, i);
-+ in_list = elt && elt->private.spare.ptr && nfiles > 0L
-+ ? (MDPOS(elt) < nfiles
-+ ? same_maildir_file(MDFILE(elt), names[MDPOS(elt)]->d_name)
-+ : NIL)
-+ || maildir_message_in_list(MDFILE(elt), names, 0L,
-+ nfiles - 1L, &MDPOS(elt))
-+ : NIL;
-+ if (!in_list){
-+ if (elt->private.spare.ptr)
-+ maildir_free_file ((void **) &elt->private.spare.ptr);
-+
-+ if (elt->recent) --recent;
-+ mail_expunged(stream,i);
-+ }
-+ else i++;
-+ }
-+
-+ stream->silent = T;
-+ uid_last = 0L;
-+ for (we_compute = 0, i = l = 1L; l <= nfiles; l++){
-+ unsigned long pos, uid;
-+ if (dirtype == New && !stream->rdonly){ /* move new messages to cur */
-+ pos = l - 1L;
-+ sprintf (file,"%s/%s", tmp, names[pos]->d_name);
-+ if(lstat(file,&sbuf) == 0)
-+ switch(sbuf.st_mode & S_IFMT){
-+ case S_IFREG:
-+ strcpy(tmp2, names[pos]->d_name);
-+ if((mdstr = strstr(tmp2,MDSEP(3)))
-+ || (mdstr = strstr(tmp2,MDSEP(2))))
-+ *(mdstr+1) = '2';
-+ else
-+ strcat(tmp2, MDSEP(2));
-+ sprintf(newfile, "%s/%s",LOCAL->curdir, tmp2);
-+ if(rename (file, newfile) != 0){
-+ mm_log("Unable to read new mail!", WARN);
-+ continue;
-+ }
-+ unlink (file);
-+ new++;
-+ break;
-+ case S_IFLNK: /* clean up, clean up, everybody, everywhere */
-+ if(unlink(file) < 0){
-+ if(LOCAL->link == NIL){
-+ mm_log("Unable to remove symbolic link", WARN);
-+ LOCAL->link = T;
-+ }
-+ }
-+ continue;
-+ break;
-+ default:
-+ if(LOCAL && LOCAL->link == NIL){
-+ mm_log("Unrecognized file or link in folder", WARN);
-+ LOCAL->link = T;
-+ }
-+ continue;
-+ break;
-+ }
-+ }
-+ mail_exists(stream, i + nmsgs);
-+ elt = mail_elt(stream, i + nmsgs);
-+ pos = (elt && elt->private.spare.ptr) ? MDPOS(elt) : l - 1L;
-+ if (dirtype == New) elt->recent = T;
-+ maildir_getflag(names[pos]->d_name, &d, &f, &r ,&s, &t);
-+ if (elt->private.spare.ptr)
-+ maildir_free_file_only ((void **)&elt->private.spare.ptr);
-+ else{
-+ maildir_get_file((MAILDIRFILE **)&elt->private.spare.ptr);
-+ we_compute++;
-+ }
-+ MDFILE(elt) = cpystr(names[pos]->d_name);
-+ MDPOS(elt) = pos;
-+ MDLOC(elt) = dirtype;
-+ if (dirtype == Cur){ /* deal with UIDs */
-+ if(elt->private.uid == 0L)
-+ elt->private.uid = maildir_get_uid(MDFILE(elt));
-+ if(elt->private.uid <= uid_last){
-+ uid = (we_compute ? uid_last : stream->uid_last) + 1L;
-+ if(LOCAL->candouid)
-+ maildir_assign_uid(stream, i + nmsgs, uid);
-+ else
-+ elt->private.uid = uid;
-+ }
-+ else
-+ uid = elt->private.uid;
-+ uid_last = uid;
-+ if(uid_last > stream->uid_last)
-+ stream->uid_last = uid_last;
-+ }
-+ if(dirtype == New && !stream->rdonly){
-+ maildir_free_file_only((void **)&elt->private.spare.ptr);
-+ MDFILE(elt) = cpystr(tmp2);
-+ MDSIZE(elt) = sbuf.st_size;
-+ MDMTIME(elt) = sbuf.st_mtime;
-+ MDLOC(elt) = Cur;
-+ }
-+ if (elt->draft != d || elt->flagged != f ||
-+ elt->answered != r || elt->seen != s || elt->deleted != t){
-+ elt->draft = d; elt->flagged = f; elt->answered = r;
-+ elt->seen = s; elt->deleted = t;
-+ if (!we_compute && !stream->rdonly)
-+ MM_FLAGS(stream, i+nmsgs);
-+ }
-+ maildir_get_date(stream, i+nmsgs);
-+ elt->valid = T;
-+ i++;
-+ }
-+ stream->silent = silent;
-+ if(LOCAL->candouid && dirtype == Cur)
-+ maildir_read_uid(stream, NULL, &stream->uid_validity);
-+ if (dirtype == New && stream->rdonly)
-+ new = nfiles;
-+ mail_exists(stream, nmsgs + ((dirtype == New) ? new : nfiles));
-+ mail_recent(stream, recent + ((dirtype == New) ? new : 0L));
-+
-+ return (nmsgs + (dirtype == New ? new : nfiles));
-+ }
-+
-+ long maildir_ping (MAILSTREAM *stream)
-+ {
-+ maildir_parse_folder(stream, 0);
-+ if(stream && LOCAL){
-+ if(LOCAL->candouid)
-+ maildir_uid_renew_tempfile(stream);
-+ else /* try again to get uids */
-+ LOCAL->candouid = maildir_can_assign_uid(stream);
-+ }
-+ return stream && LOCAL ? LONGT : NIL;
-+ }
-+
-+ int maildir_select (const struct direct *name)
-+ {
-+ return (name->d_name[0] != '.');
-+ }
-+
-+ /*
-+ * Unfortunately, there is no way to sort by arrival in this driver, this
-+ * means that opening a folder in this driver using the scandir function
-+ * will always make this driver slower than any driver that has a natural
-+ * way of sorting by arrival (like a flat file format, "mbox", "mbx", etc).
-+ */
-+ int maildir_namesort (const void *d1, const void *d2)
-+ {
-+ const struct direct *e1 = *(const struct direct **) d1;
-+ const struct direct *e2 = *(const struct direct **) d2;
-+
-+ return comp_maildir_file((char *) e1->d_name, (char *) e2->d_name);
-+ }
-+
-+ /* Maildir close */
-+
-+ void maildir_close (MAILSTREAM *stream, long options)
-+ {
-+ MESSAGECACHE *elt;
-+ unsigned long i;
-+ int silent = stream ? stream->silent : 0;
-+ mailcache_t mc = (mailcache_t) mail_parameters (NIL,GET_CACHE,NIL);
-+
-+ if (!stream) return;
-+
-+ for (i = 1L; i <= stream->nmsgs; i++)
-+ if((elt = (MESSAGECACHE *) (*mc)(stream,i,CH_ELT)) && elt->private.spare.ptr)
-+ maildir_free_file ((void **) &elt->private.spare.ptr);
-+ stream->silent = T;
-+ if (options & CL_EXPUNGE) maildir_expunge (stream, NIL, NIL);
-+ maildir_abort(stream);
-+ if (mdfpath) fs_give((void **)&mdfpath);
-+ if (mypid) mypid = (pid_t) 0;
-+ stream->silent = silent;
-+ }
-+
-+ void maildir_check (MAILSTREAM *stream)
-+ {
-+ if (maildir_ping (stream)) mm_log ("Check completed",(long) NIL);
-+ }
-+
-+ long maildir_text (MAILSTREAM *stream,unsigned long msgno,STRING *bs, long flags)
-+ {
-+ char tmp[MAILTMPLEN];
-+ unsigned long i;
-+ MESSAGECACHE *elt;
-+ char *s;
-+ /* UID call "impossible" */
-+ if (flags & FT_UID || !LOCAL) return NIL;
-+ elt = mail_elt (stream, msgno);
-+
-+ if (!(flags & FT_PEEK) && !elt->seen){
-+ elt->seen = T;
-+ maildir_flagmsg (stream, elt);
-+ MM_FLAGS(stream, elt->msgno);
-+ }
-+
-+ MSGPATH(tmp, LOCAL->dir, MDFILE(elt), MDLOC(elt));
-+ if (LOCAL->fd < 0) /* if file closed ? */
-+ LOCAL->fd = open(tmp,O_RDONLY,NIL);
-+
-+ if (LOCAL->fd < 0 && (errno == EACCES || errno == ENOENT)){
-+ INIT (bs, mail_string, "", 0);
-+ elt->rfc822_size = 0L;
-+ return NIL;
-+ }
-+
-+ s = maildir_text_work(stream, elt, &i, flags);
-+ INIT (bs, mail_string, s, i);
-+ return LONGT;
-+ }
-+
-+ char *maildir_text_work (MAILSTREAM *stream,MESSAGECACHE *elt,
-+ unsigned long *length,long flags)
-+ {
-+ FDDATA d;
-+ STRING bs;
-+ char *s,tmp[CHUNK];
-+ unsigned long msgno = elt->msgno;
-+ static int try = 0;
-+
-+ if (length)
-+ *length = 0L;
-+ LOCAL->buf[0] = '\0';
-+
-+ MSGPATH(tmp, LOCAL->dir, MDFILE(elt), MDLOC(elt));
-+ if (LOCAL->fd < 0) /* if file closed ? */
-+ LOCAL->fd = open(tmp,O_RDONLY,NIL);
-+
-+ if (LOCAL->fd < 0){ /* flag change? */
-+ if (try < 5){
-+ try++;
-+ if (maildir_update_elt_maildirp(stream, msgno) > 0)
-+ try = 0;
-+ return maildir_text_work(stream, mail_elt(stream, msgno),length, flags);
-+ }
-+ try = 0;
-+ return NULL;
-+ }
-+
-+ lseek (LOCAL->fd, elt->private.msg.text.offset,L_SET);
-+
-+ if (flags & FT_INTERNAL) { /* initial data OK? */
-+ if (elt->private.msg.text.text.size > LOCAL->buflen) {
-+ fs_give ((void **) &LOCAL->buf);
-+ LOCAL->buf = (char *) fs_get ((LOCAL->buflen =
-+ elt->private.msg.text.text.size) + 1);
-+ }
-+ read (LOCAL->fd,LOCAL->buf,elt->private.msg.text.text.size);
-+ LOCAL->buf[*length = elt->private.msg.text.text.size] = '\0';
-+ }
-+ else {
-+ if (elt->rfc822_size > LOCAL->buflen) {
-+ fs_give ((void **) &LOCAL->buf);
-+ LOCAL->buf = (char *) fs_get ((LOCAL->buflen = elt->rfc822_size) + 1);
-+ }
-+ d.fd = LOCAL->fd; /* yes, set up file descriptor */
-+ d.pos = elt->private.msg.text.offset;
-+ d.chunk = tmp; /* initial buffer chunk */
-+ d.chunksize = CHUNK;
-+ INIT (&bs,fd_string,&d,elt->private.msg.text.text.size);
-+ for (s = LOCAL->buf; SIZE (&bs);) switch (CHR (&bs)) {
-+ case '\r': /* carriage return seen */
-+ *s++ = SNX (&bs); /* copy it and any succeeding LF */
-+ if (SIZE (&bs) && (CHR (&bs) == '\n')) *s++ = SNX (&bs);
-+ break;
-+ case '\n':
-+ *s++ = '\r'; /* insert a CR */
-+ default:
-+ *s++ = SNX (&bs); /* copy characters */
-+ }
-+ *s = '\0'; /* tie off buffer */
-+ *length = s - (char *) LOCAL->buf; /* calculate length */
-+ }
-+ close(LOCAL->fd); LOCAL->fd = -1;
-+ return LOCAL->buf;
-+ }
-+
-+ /* maildir parse, fill the elt structure... well not all of it... */
-+ unsigned long maildir_parse_message(MAILSTREAM *stream, unsigned long msgno,
-+ DirNamesType dirtype)
-+ {
-+ char *b, *s, *t, c;
-+ char tmp[MAILTMPLEN];
-+ struct stat sbuf;
-+ unsigned long i, len;
-+ int d, f, r, se, dt;
-+ MESSAGECACHE *elt;
-+
-+ elt = mail_elt (stream,msgno);
-+ MSGPATH(tmp, LOCAL->dir, MDFILE(elt), dirtype);
-+ if(stat(tmp, &sbuf) == 0)
-+ MDSIZE(elt) = sbuf.st_size;
-+
-+ maildir_get_date(stream, msgno);
-+ maildir_getflag(MDFILE(elt), &d, &f, &r ,&se, &dt);
-+ elt->draft = d; elt->flagged = f; elt->answered = r; elt->seen = se;
-+ elt->deleted = dt; elt->valid = T;
-+ if (LOCAL->fd < 0) /* if file closed ? */
-+ LOCAL->fd = open(tmp,O_RDONLY,NIL);
-+
-+ if (LOCAL->fd >= 0){
-+ s = (char *) fs_get (MDSIZE(elt) + 1);
-+ read (LOCAL->fd,s,MDSIZE(elt));
-+ s[MDSIZE(elt)] = '\0';
-+ t = s + strlen(s); /* make t point to the end of s */
-+ for (i = 0L, b = s; b < t && !(i && (*b == '\n')); i = (*b++ == '\n'));
-+ len = (*b ? ++b : b) - s;
-+ elt->private.msg.header.text.size =
-+ elt->private.msg.text.offset = len;
-+ elt->private.msg.text.text.size = MDSIZE(elt) - len;
-+ for (i = 0L, b = s, c = *b; b &&
-+ ((c < '\016' && ((c == '\012' && ++i)
-+ ||(c == '\015' && *(b+1) == '\012' && ++b && (i +=2))))
-+ || b < t); i++, c= *++b);
-+ elt->rfc822_size = i;
-+ fs_give ((void **) &s);
-+ close(LOCAL->fd); LOCAL->fd = -1;
-+ }
-+ return elt->rfc822_size;
-+ }
-+
-+ int
-+ maildir_update_elt_maildirp(MAILSTREAM *stream, unsigned long msgno)
-+ {
-+ char tmp[MAILTMPLEN];
-+ struct direct **names = NIL;
-+ unsigned long i, nfiles, pos;
-+ int d = 0, f = 0 , r = 0, s = 0, t = 0, in_list, scan_err;
-+ MESSAGECACHE *elt;
-+
-+ MDFLD(tmp, LOCAL->dir, Cur);
-+
-+ maildir_scandir (tmp, &names, &nfiles, &scan_err, CCLIENT);
-+
-+ elt = mail_elt (stream,msgno);
-+
-+ in_list = nfiles > 0L
-+ ? maildir_message_in_list(MDFILE(elt), names, 0L, nfiles - 1L, &pos)
-+ : NIL;
-+
-+ if (in_list && pos >= 0L && pos < nfiles
-+ && !strcmp(MDFILE(elt), names[pos]->d_name)){
-+ in_list = NIL;
-+ maildir_abort(stream);
-+ }
-+
-+ if (in_list && pos >= 0L && pos < nfiles){
-+ maildir_free_file_only((void **)&elt->private.spare.ptr);
-+ MDFILE(elt) = cpystr(names[pos]->d_name);
-+ maildir_getflag(MDFILE(elt), &d, &f, &r ,&s, &t);
-+ if (elt->draft != d || elt->flagged != f ||
-+ elt->answered != r || elt->seen != s || elt->deleted != t){
-+ elt->draft = d; elt->flagged = f; elt->answered = r;
-+ elt->seen = s; elt->deleted = t;
-+ MM_FLAGS(stream, msgno);
-+ }
-+ }
-+ for (i = 0L; i < nfiles; i++)
-+ fs_give((void **) &names[i]);
-+ if (names)
-+ fs_give((void **) &names);
-+ return in_list ? 1 : -1;
-+ }
-+
-+ /* Maildir fetch message header */
-+
-+ char *maildir_header (MAILSTREAM *stream,unsigned long msgno,
-+ unsigned long *length, long flags)
-+ {
-+ char tmp[MAILTMPLEN], *s;
-+ MESSAGECACHE *elt;
-+ static int try = 0;
-+
-+ if (length) *length = 0;
-+ if (flags & FT_UID || !LOCAL) return ""; /* UID call "impossible" */
-+ elt = mail_elt (stream,msgno);
-+ if(elt->private.msg.header.text.size == 0)
-+ maildir_parse_message(stream, msgno, MDLOC(elt));
-+
-+ MSGPATH(tmp, LOCAL->dir, MDFILE(elt), MDLOC(elt));
-+ if (LOCAL->fd < 0)
-+ LOCAL->fd = open (tmp,O_RDONLY,NIL);
-+
-+ if (LOCAL->fd < 0 && errno == EACCES){
-+ mm_log ("Message exists but can not be read. Envelope and body lost!",ERROR);
-+ return NULL;
-+ }
-+
-+ if (LOCAL->fd < 0){ /* flag change? */
-+ if (try < 5){
-+ try++;
-+ if (maildir_update_elt_maildirp(stream, msgno) > 0)
-+ try = 0;
-+ return maildir_header(stream, msgno, length, flags);
-+ }
-+ try = 0;
-+ return NULL;
-+ }
-+
-+ if (flags & FT_INTERNAL){
-+ if(elt->private.msg.header.text.size > LOCAL->buflen){
-+ fs_give ((void **) &LOCAL->buf);
-+ LOCAL->buf = (char *) fs_get ((LOCAL->buflen =
-+ elt->private.msg.header.text.size) + 1);
-+ }
-+ read (LOCAL->fd, (void *)LOCAL->buf, elt->private.msg.header.text.size);
-+ LOCAL->buf[*length = elt->private.msg.header.text.size] = '\0';
-+ }
-+ else{
-+ s = (char *) fs_get(elt->private.msg.header.text.size+1);
-+ read (LOCAL->fd, (void *)s, elt->private.msg.header.text.size);
-+ s[elt->private.msg.header.text.size] = '\0';
-+ *length = strcrlfcpy (&LOCAL->buf,&LOCAL->buflen,s,
-+ elt->private.msg.header.text.size);
-+ fs_give ((void **) &s);
-+ }
-+ elt->private.msg.text.offset = elt->private.msg.header.text.size;
-+ elt->private.msg.text.text.size = MDSIZE(elt) - elt->private.msg.text.offset;
-+ close(LOCAL->fd); LOCAL->fd = -1;
-+ return LOCAL->buf;
-+ }
-+
-+ /* Maildir find list of subscribed mailboxes
-+ * Accepts: mail stream
-+ * pattern to search
-+ */
-+
-+ void maildir_list (MAILSTREAM *stream,char *ref, char *pat)
-+ {
-+ char *s,test[MAILTMPLEN],file[MAILTMPLEN];
-+ long i = 0L;
-+
-+ if((!pat || !*pat) && maildir_canonicalize (test,ref,"*")
-+ && maildir_valid_name(test)){ /* there is a #md/ leading here */
-+ for (i = 3L; test[i] && test[i] != '/'; i++);
-+ if ((s = strchr (test+i+1,'/')) != NULL) *++s = '\0';
-+ else test[0] = '\0';
-+ mm_list (stream,'/',test, LATT_NOSELECT);
-+ }
-+ else if (maildir_canonicalize (test,ref,pat)) {
-+ if (test[3] == '/') { /* looking down levels? */
-+ /* yes, found any wildcards? */
-+ if ((s = strpbrk (test,"%*")) != NULL){
-+ /* yes, copy name up to that point */
-+ strncpy (file,test+4,i = s - (test+4));
-+ file[i] = '\0'; /* tie off */
-+ }
-+ else strcpy (file,test+4);/* use just that name then */
-+ /* find directory name */
-+ if ((s = strrchr (file, '/')) != NULL){
-+ *s = '\0'; /* found, tie off at that point */
-+ s = file;
-+ }
-+ /* do the work */
-+ if(IS_COURIER(test))
-+ courier_list_work (stream,s,test,0);
-+ else
-+ maildir_list_work (stream,s,test,0);
-+ }
-+ /* always an INBOX */
-+ if (!compare_cstring (test,"#MD/INBOX"))
-+ mm_list (stream,NIL,"#MD/INBOX",LATT_NOINFERIORS);
-+ if (!compare_cstring (test,"#MC/INBOX"))
-+ mm_list (stream,NIL,"#MC/INBOX",LATT_NOINFERIORS);
-+ }
-+ }
-+
-+ void courier_list (MAILSTREAM *stream,char *ref, char *pat)
-+ {
-+ /* I am too lazy to do anything. Do you care to ask maildir list, please?
-+ The real reason why this is a dummy function is because we do not want to
-+ see the same folder listed twice.
-+ */
-+ }
-+
-+ /* For those that want to hide things, we give them a chance to do so */
-+ void *maildir_parameters (long function, void *value)
-+ {
-+ void *ret = NIL;
-+ switch ((int) function) {
-+ case SET_MDINBOXPATH:
-+ if(strlen((char *) value ) > 49)
-+ strcpy(myMdInboxDir, "Maildir");
-+ else
-+ strcpy(myMdInboxDir, (char *) value);
-+ case GET_MDINBOXPATH:
-+ if (myMdInboxDir[0] == '\0') strcpy(myMdInboxDir,"Maildir");
-+ ret = (void *) myMdInboxDir;
-+ break;
-+ case SET_COURIERSTYLE:
-+ CourierStyle = (long) value;
-+ case GET_COURIERSTYLE:
-+ ret = (void *) CourierStyle;
-+ break;
-+ case GET_DIRFMTTEST:
-+ ret = (void *) maildir_dirfmttest;
-+ break;
-+ default:
-+ break;
-+ }
-+ return ret;
-+ }
-+
-+ int maildir_create_folder(char *mailbox)
-+ {
-+ char tmp[MAILTMPLEN], err[MAILTMPLEN];
-+ int i;
-+
-+ for (i = Cur; i != EndDir; i++){
-+ MDFLD(tmp, mailbox, i);
-+ if (mkdir(tmp, 0700) && errno != EEXIST){ /* try to make new dir */
-+ sprintf (err, "Can't create %s: %s", tmp, strerror(errno));
-+ mm_log (err,ERROR);
-+ return NIL;
-+ }
-+ }
-+ return T;
-+ }
-+
-+ int maildir_create_work(char *mailbox, int loop)
-+ {
-+ char *s, c, err[MAILTMPLEN], tmp[MAILTMPLEN], tmp2[MAILTMPLEN], mbx[MAILTMPLEN];
-+ int fnlen, create_dir = 0, courier, mv;
-+ struct stat sbuf;
-+ long style = (long) maildir_parameters(GET_COURIERSTYLE, NIL);
-+
-+ courier = IS_COURIER(mailbox);
-+ strcpy(mbx, mailbox);
-+ mv = maildir_valid(mbx) ? 1 : 0;
-+ maildir_file_path(mailbox, tmp);
-+ if (mailbox[strlen(mailbox) - 1] == MDSEPARATOR(courier)){
-+ create_dir++;
-+ mailbox[strlen(mailbox) - 1] = '\0';
-+ }
-+
-+ if(!loop && courier){
-+ if(mv){
-+ if(create_dir){
-+ if(style == CCLIENT)
-+ strcpy (err,"Can not create directory: folder exists. Create subfolder");
-+ else
-+ strcpy(err,"Folder and Directory already exist");
-+ }
-+ else
-+ strcpy (err, "Can't create mailbox: mailbox already exists");
-+ }
-+ else{
-+ if(create_dir)
-+ strcpy(err, "Can not create directory. Cread folder instead");
-+ else
-+ err[0] = '\0';
-+ }
-+ if(err[0]){
-+ mm_log (err,ERROR);
-+ return NIL;
-+ }
-+ }
-+
-+ fnlen = strlen(tmp);
-+ if ((s = strrchr(mailbox,MDSEPARATOR(courier))) != NULL){
-+ c = *++s;
-+ *s = '\0';
-+ if ((stat(tmp,&sbuf) || ((sbuf.st_mode & S_IFMT) != S_IFDIR)) &&
-+ !maildir_create_work (mailbox, ++loop))
-+ return NIL;
-+ *s = c;
-+ }
-+ tmp[fnlen] = '\0';
-+
-+ if (mkdir(tmp,0700) && errno != EEXIST)
-+ return NIL;
-+
-+ if (create_dir)
-+ mailbox[fnlen] = '/';
-+
-+ if (create_dir){
-+ if(style == CCLIENT){
-+ if(!courier){
-+ FILE *fp = NULL;
-+ sprintf(tmp2,"%s%s", tmp, MDDIR);
-+ if ((fp = fopen(tmp2,"w")) == NULL){
-+ sprintf (err,"Problem creating %s: %s", tmp2, strerror(errno));
-+ mm_log (err,ERROR);
-+ return NIL;
-+ }
-+ fclose(fp);
-+ }
-+ }
-+ return T;
-+ }
-+ else
-+ return maildir_create_folder(tmp);
-+ }
-+
-+ long maildir_create (MAILSTREAM *stream,char *mailbox)
-+ {
-+ char tmp[MAILTMPLEN], err[MAILTMPLEN];
-+ int rv, create_dir;
-+
-+ create_dir = mailbox ?
-+ (mailbox[strlen(mailbox) - 1] ==
-+ MDSEPARATOR(IS_COURIER(mailbox))) : 0;
-+ maildir_file_path(mailbox, tmp);
-+ strcpy(tmp, mailbox);
-+ rv = maildir_create_work(mailbox, 0);
-+ strcpy(mailbox, tmp);
-+ if (rv == 0){
-+ sprintf (err,"Can't create %s %s",
-+ (create_dir ? "directory" : "mailbox"), mailbox);
-+ mm_log (err,ERROR);
-+ }
-+ return rv ? LONGT : NIL;
-+ }
-+
-+ #define MAXTRY 10000
-+ void maildir_flagmsg (MAILSTREAM *stream,MESSAGECACHE *elt)
-+ {
-+ char oldfile[MAILTMPLEN],newfile[MAILTMPLEN],fn[MAILTMPLEN];
-+ char *s;
-+ int ren, try = 0;
-+
-+ if (elt->valid){
-+ for (try = 1; try > 0 && try < MAXTRY; try++){
-+ /* build the new filename */
-+ sprintf (oldfile,"%s/%s",LOCAL->curdir, MDFILE(elt));
-+ fn[0] = '\0';
-+ if ((ren = maildir_message_exists(stream, MDFILE(elt), fn)) == 0){
-+ errno = ENOENT;
-+ try = MAXTRY;
-+ }
-+ if (*fn) /* new oldfile! */
-+ sprintf (oldfile,"%s/%s",LOCAL->curdir,fn);
-+ if ((s = strrchr (MDFILE(elt), FLAGSEP))) *s = '\0';
-+ sprintf (fn,"%s%s%s%s%s%s%s", MDFILE(elt), MDSEP(2),
-+ MDFLAG(Draft, elt->draft), MDFLAG(Flagged, elt->flagged),
-+ MDFLAG(Replied, elt->answered), MDFLAG(Seen, elt->seen),
-+ MDFLAG(Trashed, elt->deleted));
-+ sprintf (newfile,"%s/%s",LOCAL->curdir,fn);
-+ if (ren != 0 && rename (oldfile,newfile) >= 0)
-+ try = -1;
-+ }
-+
-+ if (try > 0){
-+ sprintf(oldfile,"Unable to write flags to disk: %s",
-+ (errno == ENOENT) ? "message is gone!" : strerror (errno));
-+ mm_log(oldfile,ERROR);
-+ return;
-+ }
-+ #ifdef __CYGWIN__
-+ utime(LOCAL->curdir, NIL); /* make sure next scan will catch the change */
-+ #endif
-+ maildir_free_file_only ((void **) &elt->private.spare.ptr);
-+ MDFILE(elt) = cpystr (fn);
-+ }
-+ }
-+
-+ long maildir_expunge (MAILSTREAM *stream, char *sequence, long options)
-+ {
-+ long ret;
-+ MESSAGECACHE *elt;
-+ unsigned long i, n = 0L;
-+ unsigned long recent = stream->recent;
-+ char tmp[MAILTMPLEN];
-+
-+ mm_critical (stream); /* go critical */
-+ ret = sequence ? ((options & EX_UID) ?
-+ mail_uid_sequence (stream,sequence) :
-+ mail_sequence (stream,sequence)) : LONGT;
-+ if(ret == 0L)
-+ return 0L;
-+ for (i = 1L; i <= stream->nmsgs;){
-+ elt = mail_elt (stream,i);
-+ if (elt->deleted && (sequence ? elt->sequence : T)){
-+ sprintf (tmp,"%s/%s",LOCAL->curdir, MDFILE(elt));
-+ if (unlink (tmp) < 0) {/* try to delete the message */
-+ sprintf (tmp,"Expunge of message %ld failed, aborted: %s",i,
-+ strerror (errno));
-+ if (!stream->silent)
-+ mm_log (tmp,WARN);
-+ break;
-+ }
-+ if (elt->private.spare.ptr)
-+ maildir_free_file ((void **) &elt->private.spare.ptr);
-+ if (elt->recent) --recent;/* if recent, note one less recent message */
-+ mail_expunged (stream,i); /* notify upper levels */
-+ n++; /* count up one more expunged message */
-+ }
-+ else i++;
-+ }
-+ if(n){ /* output the news if any expunged */
-+ sprintf (tmp,"Expunged %ld messages",n);
-+ if (!stream->silent)
-+ mm_log (tmp,(long) NIL);
-+ }
-+ else
-+ if (!stream->silent)
-+ mm_log ("No messages deleted, so no update needed",(long) NIL);
-+ mm_nocritical (stream); /* release critical */
-+ /* notify upper level of new mailbox size */
-+ mail_exists (stream,stream->nmsgs);
-+ mail_recent (stream,recent);
-+ return ret;
-+ }
-+
-+ long maildir_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
-+ {
-+ STRING st;
-+ MESSAGECACHE *elt;
-+ unsigned long len;
-+ int fd;
-+ unsigned long i;
-+ struct stat sbuf;
-+ char tmp[MAILTMPLEN], flags[MAILTMPLEN], path[MAILTMPLEN], *s;
-+ /* copy the messages */
-+ if ((options & CP_UID) ? mail_uid_sequence (stream, sequence) :
-+ mail_sequence (stream,sequence))
-+ for (i = 1L; i <= stream->nmsgs; i++)
-+ if ((elt = mail_elt (stream,i))->sequence){
-+ MSGPATH(path, LOCAL->dir, MDFILE(elt), MDLOC(elt));
-+ if (((fd = open (path,O_RDONLY,NIL)) < 0)
-+ ||((!elt->rfc822_size &&
-+ ((stat(path, &sbuf) < 0) || !S_ISREG (sbuf.st_mode)))))
-+ return NIL;
-+ if(!elt->rfc822_size)
-+ MDSIZE(elt) = sbuf.st_size;
-+ s = (char *) fs_get(MDSIZE(elt) + 1);
-+ read (fd,s,MDSIZE(elt));
-+ s[MDSIZE(elt)] = '\0';
-+ close (fd);
-+ len = strcrlfcpy (&LOCAL->buf,&LOCAL->buflen, s, MDSIZE(elt));
-+ INIT (&st,mail_string, LOCAL->buf, len);
-+ elt->rfc822_size = len;
-+ fs_give ((void **)&s);
-+
-+ flags[0] = flags[1] = '\0';
-+ if (elt->seen) strcat (flags," \\Seen");
-+ if (elt->draft) strcat (flags," \\Draft");
-+ if (elt->deleted) strcat (flags," \\Deleted");
-+ if (elt->flagged) strcat (flags," \\Flagged");
-+ if (elt->answered) strcat (flags," \\Answered");
-+ flags[0] = '('; /* open list */
-+ strcat (flags,")"); /* close list */
-+ mail_date (tmp,elt); /* generate internal date */
-+ if (!mail_append_full (NIL,mailbox,flags,tmp,&st))
-+ return NIL;
-+ if (options & CP_MOVE) elt->deleted = T;
-+ }
-+ return LONGT; /* return success */
-+ }
-+
-+ long maildir_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
-+ {
-+ int fd, k;
-+ STRING *message;
-+ char c,*s, *flags, *date;
-+ char tmp[MAILTMPLEN],file[MAILTMPLEN],path1[MAILTMPLEN],path2[MAILTMPLEN];
-+ MESSAGECACHE elt;
-+ long i, size = 0L, ret = LONGT, f;
-+ unsigned long uf, ti;
-+ static unsigned int transact = 0;
-+
-+ if (!maildir_valid(mailbox)) {
-+ sprintf (tmp,"Not a valid Maildir mailbox: %s",mailbox);
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+
-+ if (!*mdlocaldomain)
-+ md_domain_name(); /* get domain name for maildir files in mdlocaldomain now! */
-+
-+ if (mypid == (pid_t) 0)
-+ mypid = getpid();
-+
-+ if (!stream){
-+ stream = &maildirproto;
-+
-+ for (k = 0; k < NUSERFLAGS && stream->user_flags[k]; ++k)
-+ fs_give ((void **) &stream->user_flags[k]);
-+ }
-+
-+ if (!(*af) (stream,data,&flags,&date,&message)) return NIL;
-+
-+ mm_critical (stream); /* go critical */
-+ /* call time(0) only once, use transact to distinguish instead */
-+ ti = time(0);
-+ do {
-+ if (!SIZE (message)) { /* guard against zero-length */
-+ mm_log ("Append of zero-length message",ERROR);
-+ ret = NIL;
-+ break;
-+ }
-+ if (date && !mail_parse_date(&elt,date)){
-+ sprintf (tmp,"Bad date in append: %.80s",date);
-+ mm_log (tmp,ERROR);
-+ ret = NIL;
-+ break;
-+ }
-+ f = mail_parse_flags (stream,flags,&uf);
-+ /* build file name we will use */
-+ sprintf (file,"%lu.%d_%09u.%s%s%s%s%s%s",
-+ ti, mypid, transact++, mdlocaldomain, (f ? MDSEP(2) : ""),
-+ MDFLAG(Draft, f&fDRAFT), MDFLAG(Flagged, f&fFLAGGED),
-+ MDFLAG(Replied, f&fANSWERED), MDFLAG(Seen, f&fSEEN));
-+ /* build tmp file name */
-+ if (maildir_file_path(mailbox, tmp))
-+ MSGPATH(path1, tmp, file, Tmp);
-+
-+ if ((fd = open (path1,O_WRONLY|O_CREAT|O_EXCL,S_IREAD|S_IWRITE)) < 0) {
-+ sprintf (tmp, "Can't open append mailbox: %s", strerror (errno));
-+ mm_log (tmp, ERROR);
-+ return NIL;
-+ }
-+ for (size = 0,i = SIZE (message),s = (char *) fs_get (i + 1); i; --i)
-+ if ((c = SNX (message)) != '\015') s[size++] = c;
-+ if ((write (fd, s, size) < 0) || fsync (fd)) {
-+ unlink (path1); /* delete message */
-+ sprintf (tmp, "Message append failed: %s", strerror (errno));
-+ mm_log (tmp, ERROR);
-+ ret = NIL;
-+ }
-+ fs_give ((void **) &s); /* flush the buffer */
-+ close (fd); /* close the file */
-+ /* build final filename to use */
-+ if (maildir_file_path(mailbox, tmp))
-+ MSGPATH(path2, tmp, file, New);
-+ if (rename (path1,path2) < 0) {
-+ sprintf (tmp, "Message append failed: %s", strerror (errno));
-+ mm_log (tmp, ERROR);
-+ ret = NIL;
-+ }
-+ unlink (path1);
-+
-+ if (ret)
-+ if (!(*af) (stream,data,&flags,&date,&message)) ret = NIL;
-+
-+ } while (ret && message); /* write the data */
-+ mm_nocritical (stream); /* release critical */
-+ return ret;
-+ }
-+
-+ long maildir_delete (MAILSTREAM *stream,char *mailbox)
-+ {
-+ DIR *dirp;
-+ struct direct *d;
-+ int i, remove_dir = 0, mddir = 0, rv, error = 0;
-+ char tmp[MAILTMPLEN],tmp2[MAILTMPLEN], realname[MAILTMPLEN];
-+ struct stat sbuf;
-+ int courier = IS_COURIER(mailbox);
-+
-+ if (mailbox[strlen(mailbox) - 1] == MDSEPARATOR(courier)){
-+ remove_dir++;
-+ mailbox[strlen(mailbox) -1] = '\0';
-+ }
-+
-+ if (!maildir_valid(mailbox)){
-+ maildir_file_path(mailbox, tmp);
-+ if (stat(tmp, &sbuf) < 0 || !S_ISDIR(sbuf.st_mode)){
-+ sprintf(tmp,"Can not remove %s", mailbox);
-+ error++;
-+ }
-+ }
-+
-+ if (!error && remove_dir && !maildir_dir_is_empty(mailbox)){
-+ sprintf(tmp,"Can not remove directory %s/: directory not empty", mailbox);
-+ error++;
-+ }
-+
-+ if(error){
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+
-+ maildir_close(stream,0); /* even if stream was NULL */
-+
-+ maildir_file_path(mailbox, realname);
-+
-+ if (remove_dir){
-+ sprintf(tmp,"%s/%s", realname, MDDIR);
-+ if ((rv = stat (tmp,&sbuf)) == 0 && S_ISREG(sbuf.st_mode))
-+ rv = unlink(tmp);
-+ else if (errno == ENOENT)
-+ rv = 0;
-+ if (rv != 0){
-+ sprintf(tmp,"Can not remove %s/%s: %s", tmp2, MDDIR, strerror(errno));
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+ if (!maildir_valid(realname) && rmdir(realname) != 0){
-+ sprintf(tmp,"Can not remove %s/: %s", mailbox, strerror(errno));
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+ return LONGT;
-+ }
-+ /* else remove just the folder. Remove all hidden files, except MDDIR */
-+ for (i = Cur; i != EndDir; i++){
-+ MDFLD(tmp, realname, i);
-+
-+ if (!(dirp = opendir (tmp))){
-+ sprintf(tmp,"Can not read %s/: %s", mailbox, strerror(errno));
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+
-+ while ((d = readdir(dirp)) != NULL){
-+ if (strcmp(d->d_name, ".") && strcmp(d->d_name,"..")){
-+ sprintf(tmp2,"%s/%s", tmp, d->d_name);
-+ if (unlink(tmp2) != 0){
-+ sprintf(tmp2,"Can not remove %s: %s", mailbox, strerror(errno));
-+ mm_log (tmp2,ERROR);
-+ return NIL;
-+ }
-+ }
-+ }
-+ closedir(dirp);
-+ if (rmdir(tmp) != 0){
-+ sprintf(tmp,"Can not remove %s: %s", mailbox, strerror(errno));
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+ }
-+ /*
-+ * ok we have removed all subdirectories of the folder mailbox, Remove the
-+ * hidden files.
-+ */
-+
-+ if(!(dirp = opendir (realname))){
-+ sprintf(tmp,"Can not read %s/: %s", realname, strerror(errno));
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+
-+ while ((d = readdir(dirp)) != NULL){
-+ if (strcmp(d->d_name, ".") && strcmp(d->d_name,"..")
-+ && (!strcmp(d->d_name, MDDIR)
-+ || !strncmp(d->d_name, MDUIDLAST, strlen(MDUIDLAST))
-+ || !strncmp(d->d_name, MDUIDTEMP, strlen(MDUIDTEMP)))){
-+ if(strcmp(d->d_name, MDDIR) == 0)
-+ mddir++;
-+ sprintf(tmp,"%s/%s", realname, d->d_name);
-+ if (unlink(tmp) != 0)
-+ error++;
-+ }
-+ }
-+ closedir(dirp);
-+ if (error ||
-+ (maildir_dir_is_empty(mailbox) && mddir == 0 && rmdir(realname) < 0)){
-+ sprintf(tmp,"Can not remove folder %s: %s", mailbox, strerror(errno));
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+ return LONGT;
-+ }
-+
-+ long maildir_rename (MAILSTREAM *stream, char *old, char *new)
-+ {
-+ char tmp[MAILTMPLEN],tmpnew[MAILTMPLEN], realold[MAILTMPLEN];
-+ char realnew[MAILTMPLEN];
-+ int courier = IS_COURIER(old) && IS_COURIER(new);
-+ int i;
-+ long rv = LONGT;
-+ COURIER_S *cdir;
-+
-+ if((IS_COURIER(old) || IS_COURIER(new)) && !courier){
-+ sprintf (tmp,"Can't rename mailbox %s to %s",old, new);
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+
-+ if (!maildir_valid(old)){
-+ sprintf (tmp,"Can't rename mailbox %s: folder not in maildir format",old);
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+ maildir_file_path(old, realold);
-+ if (!maildir_valid_name(new) && new[0] == '#'){
-+ sprintf (tmp,"Can't rename mailbox %s: folder not in maildir format",new);
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+ maildir_file_path(new, realnew);
-+ if (access(tmpnew,F_OK) == 0){ /* new mailbox name must not exist */
-+ sprintf (tmp,"Can't rename to mailbox %s: destination already exists",new);
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+
-+ if(!courier){
-+ if (rename (realold,realnew)){ /* try to rename the directory */
-+ sprintf (tmp,"Can't rename mailbox %s to %s: %s",old, new,
-+ strerror(errno));
-+ mm_log (tmp,ERROR);
-+ return NIL;
-+ }
-+ return LONGT; /* return success */
-+ }
-+
-+ cdir = courier_list_dir(old);
-+ for (i = 0; cdir && i < cdir->total; i++){
-+ if(strstr(cdir->data[i]->name, old)){
-+ sprintf(tmp,"%s%s", new, cdir->data[i]->name+strlen(old));
-+ maildir_file_path(cdir->data[i]->name, realold);
-+ maildir_file_path(tmp, realnew);
-+ if (rename (realold,realnew)){
-+ sprintf (tmp,"Can't rename mailbox %s to %s: %s",old, new,
-+ strerror(errno));
-+ mm_log (tmp,ERROR);
-+ rv = NIL;
-+ }
-+ }
-+ }
-+ courier_free_cdir(&cdir);
-+ return rv;
-+ }
-+
-+ long maildir_sub (MAILSTREAM *stream,char *mailbox)
-+ {
-+ return sm_subscribe (mailbox);
-+ }
-+
-+ long maildir_unsub (MAILSTREAM *stream,char *mailbox)
-+ {
-+ return sm_unsubscribe (mailbox);
-+ }
-+
-+ void maildir_lsub (MAILSTREAM *stream,char *ref,char *pat)
-+ {
-+ void *sdb = NIL;
-+ char *s, test[MAILTMPLEN];
-+ /* get canonical form of name */
-+ if (maildir_canonicalize (test,ref,pat) && (s = sm_read (&sdb))) {
-+ do if (pmatch_full (s,test,'/')) mm_lsub (stream,'/',s,NIL);
-+ while ((s = sm_read (&sdb)) != NULL); /* until no more subscriptions */
-+ }
-+ }
-+
-+ long maildir_canonicalize (char *pattern,char *ref,char *pat)
-+ {
-+ if (ref && *ref) { /* have a reference */
-+ strcpy (pattern,ref); /* copy reference to pattern */
-+ /* # overrides mailbox field in reference */
-+ if (*pat == '#') strcpy (pattern,pat);
-+ /* pattern starts, reference ends, with / */
-+ else if ((*pat == '/') && (pattern[strlen (pattern) - 1] == '/'))
-+ strcat (pattern,pat + 1); /* append, omitting one of the period */
-+
-+ else strcat (pattern,pat); /* anything else is just appended */
-+ }
-+ else strcpy (pattern,pat); /* just have basic name */
-+ return maildir_valid_name(pattern) ? LONGT : NIL;
-+ }
-+
-+ void maildir_list_work (MAILSTREAM *stream,char *dir,char *pat,long level)
-+ {
-+ DIR *dp;
-+ struct direct *d;
-+ struct stat sbuf;
-+ char curdir[MAILTMPLEN],name[MAILTMPLEN], tmp[MAILTMPLEN];
-+ char realpat[MAILTMPLEN];
-+ long i;
-+ char *maildirpath = mdirpath();
-+
-+ sprintf(curdir,"%s/%s/", myrootdir(pat), dir ? dir : maildirpath);
-+ if ((dp = opendir (curdir)) != NULL){
-+ if (dir) sprintf (name,"%s%s/",MDPREFIX(CCLIENT),dir);
-+ else strcpy (name, pat);
-+
-+ if (level == 0 && !strpbrk(pat,"%*")){
-+ if(maildir_valid(pat)){
-+ i = maildir_contains_folder(pat, NULL)
-+ ? LATT_HASCHILDREN
-+ : (maildir_is_dir(pat, NULL)
-+ ? LATT_HASNOCHILDREN : LATT_NOINFERIORS);
-+ maildir_file_path(pat, realpat);
-+ i += maildir_any_new_msgs(realpat)
-+ ? LATT_MARKED : LATT_UNMARKED;
-+ mm_list (stream,'/', pat, i);
-+ }
-+ else
-+ if(pat[strlen(pat) - 1] == '/')
-+ mm_list (stream,'/', pat, LATT_NOSELECT);
-+ }
-+
-+ while ((d = readdir (dp)) != NULL)
-+ if(strcmp(d->d_name, ".") && strcmp(d->d_name,"..")
-+ && strcmp(d->d_name, MDNAME(Cur))
-+ && strcmp(d->d_name, MDNAME(Tmp))
-+ && strcmp(d->d_name, MDNAME(New))){
-+
-+ if (dir) sprintf (tmp,"%s%s", name,d->d_name);
-+ else strcpy(tmp, d->d_name);
-+
-+ if(pmatch_full (tmp, pat,'/')){
-+ sprintf(tmp,"%s/%s/%s", myrootdir(d->d_name),
-+ (dir ? dir : maildirpath), d->d_name);
-+ if(stat (tmp,&sbuf) == 0
-+ && ((sbuf.st_mode & S_IFMT) == S_IFDIR)){
-+ if (dir) sprintf (tmp,"%s%s", name,d->d_name);
-+ else strcpy(tmp, d->d_name);
-+ i = maildir_valid(tmp)
-+ ? (maildir_contains_folder(dir, d->d_name)
-+ ? LATT_HASCHILDREN
-+ : (maildir_is_dir(dir, d->d_name)
-+ ? LATT_HASNOCHILDREN : LATT_NOINFERIORS))
-+ : LATT_NOSELECT;
-+ i += maildir_any_new_msgs(tmp)
-+ ? LATT_MARKED : LATT_UNMARKED;
-+ mm_list (stream,'/',tmp, i);
-+ strcat (tmp, "/");
-+ if(dmatch (tmp, pat,'/') &&
-+ (level < (long) mail_parameters (NIL,GET_LISTMAXLEVEL,NIL))){
-+ sprintf(tmp,"%s/%s",dir,d->d_name);
-+ maildir_list_work (stream,tmp,pat,level+1);
-+ }
-+ }
-+ }
-+ }
-+ closedir (dp);
-+ }
-+ }
-+
-+ void courier_list_work (MAILSTREAM *stream, char *dir, char *pat, long level)
-+ {
-+ char c, curdir[MAILTMPLEN], tmp[MAILTMPLEN];
-+ char realname[MAILTMPLEN], realpat[MAILTMPLEN] = {'\0'};
-+ int i, found;
-+ long style = (long) maildir_parameters(GET_COURIERSTYLE, NIL), j;
-+ char *maildirpath = mdirpath();
-+ COURIER_S *cdir;
-+
-+ if(!strpbrk(pat,"%*")){ /* a mailbox */
-+ maildir_file_path(pat, curdir);
-+ i = strlen(curdir) - 1;
-+ if(curdir[i] == '/')
-+ curdir[i] = '\0';
-+ cdir = courier_list_dir(curdir);
-+ if(cdir){
-+ found = 0; j = 0L;
-+ if(maildir_valid_name(pat)){
-+ for(i = 0; !found && i < cdir->total; i++)
-+ if(strstr(curdir, cdir->data[i]->name)){
-+ if(strlen(curdir) < strlen(cdir->data[i]->name))
-+ found += 2;
-+ else if(strlen(curdir) == strlen(cdir->data[i]->name))
-+ found -= 1;
-+ }
-+ if(found > 0)
-+ j = LATT_HASCHILDREN;
-+ else if(found == 0)
-+ j = (style == COURIER) ? LATT_HASNOCHILDREN : LATT_NOINFERIORS;
-+ }
-+ else
-+ j = LATT_NOSELECT;
-+ j += maildir_any_new_msgs(curdir) ? LATT_MARKED : LATT_UNMARKED;
-+ if (found)
-+ mm_list (stream, '.', pat, j);
-+ courier_free_cdir(&cdir);
-+ }
-+ return;
-+ }
-+
-+ strcpy(tmp,pat + 4); /* a directory */
-+ j = strlen(pat) - 1;
-+ maildir_file_path(pat, realpat);
-+ c = pat[j];
-+ pat[j] = '\0';
-+ realname[0] = '\0';
-+ if(dir)
-+ maildir_file_path(dir, realname);
-+ sprintf(curdir,"%s%s%s/%s", (dir ? "" : myrootdir(pat)), (dir ? "" : "/"),
-+ (dir ? realname : maildirpath), (dir ? "" : "."));
-+ sprintf(tmp, "%s%s/.", MDPREFIX(COURIER), dir ? dir : maildirpath);
-+ if (level == 0 && tmp && pmatch_full (tmp, realpat, '.'))
-+ mm_list (stream,'.', tmp, LATT_NOSELECT);
-+
-+ cdir = courier_list_dir(pat);
-+ pat[j] = c;
-+ for (i = 0; cdir && i < cdir->total; i++)
-+ if(pmatch_full (cdir->data[i]->name, pat, '.')){
-+ sprintf(tmp, "%s.", cdir->data[i]->name);
-+ courier_list_info(&cdir, tmp, i);
-+ mm_list (stream,'.',cdir->data[i]->name, cdir->data[i]->attribute);
-+ }
-+ courier_free_cdir(&cdir);
-+ }
-+
-+ int
-+ same_maildir_file(char *name1, char *name2)
-+ {
-+ char tmp1[MAILTMPLEN], tmp2[MAILTMPLEN];
-+ char *s;
-+
-+ strcpy(tmp1, name1 ? name1 : "");
-+ strcpy(tmp2, name2 ? name2 : "");
-+ if ((s = strrchr(tmp1, FLAGSEP)) != NULL)
-+ *s = '\0';
-+ if (((s = strrchr(tmp1, SIZESEP)) != NULL) && (strchr(s,'.') == NULL))
-+ *s = '\0';
-+ if ((s = strrchr(tmp2, FLAGSEP)) != NULL)
-+ *s = '\0';
-+ if (((s = strrchr(tmp2, SIZESEP)) != NULL) && (strchr(s,'.') == NULL))
-+ *s = '\0';
-+
-+ return !strcmp(tmp1, tmp2);
-+ }
-+
-+ unsigned long antoul(char *seed)
-+ {
-+ int i, error = 0;
-+ unsigned long val = 0L, rv1 = 0L, t;
-+ char c, *p;
-+ if(!seed)
-+ return 0L;
-+ t = strtoul(seed, &p, 10);
-+ if(p && (*p == '.' || *p == '_'))
-+ return t;
-+ /* else */
-+ if((p = strchr(seed,'.')) != NULL)
-+ *p = '\0';
-+ error = (strlen(seed) > 6); /* too long */
-+ for(i= strlen(seed)-1; error == 0 && i >= 0; i--){
-+ c = seed[i];
-+ if (c >= 'A' && c <= 'Z') val = c - 'A';
-+ else if (c >= 'a' && c <= 'z') val = c - 'a' + 26;
-+ else if (c >= '0' && c <= '9') val = c - '0' + 26 + 26;
-+ else if (c == '-') val = c - '-' + 26 + 26 + 10;
-+ else if (c == '_') val = c - '_' + 26 + 26 + 10 + 1;
-+ else error++;
-+ rv1 = val + (rv1 << 6);
-+ }
-+ if(p)
-+ *p = '.';
-+ return error ? 0L : rv1;
-+ }
-+
-+ unsigned long mdfntoul (char *name)
-+ {
-+ unsigned long t;
-+ char *r, last;
-+
-+ if((*name == '_') && ((r = strpbrk(name,".,%+")) != NULL)){ /* Grrr!!! */
-+ last = *r;
-+ *r = '\0';
-+ t = antoul(r+1);
-+ *r = last;
-+ }
-+ else
-+ t = antoul(name);
-+ return t;
-+ }
-+
-+ int comp_maildir_file(char *name1, char *name2)
-+ {
-+ int uset1 = 1, uset2 = 1, i, j, cmp;
-+ unsigned long t1, t2;
-+ char *s1, *s2;
-+
-+ if (!(name1 && *name1))
-+ return (name2 && *name2) ? (*name2 == FLAGSEP ? 0 : -1) : 0;
-+
-+ if (!(name2 && *name2))
-+ return (name1 && *name1) ? (*name1 == FLAGSEP ? 0 : 1) : 0;
-+
-+ if((cmp = strcmp(name1,name2)) == 0)
-+ return 0;
-+
-+ t1 = strtoul(name1, &s1, 10);
-+ t2 = strtoul(name2, &s2, 10);
-+
-+ if(!s1 || *s1 != '.')
-+ uset1 = 0;
-+
-+ if(!s2 || *s2 != '.')
-+ uset2 = 0;
-+
-+ if(uset1 && uset2) /* normal sort order */
-+ return (t1 < t2) ? -1 : (t1 > t2 ? 1 : (cmp < 0 ? -1 : 1));
-+
-+ /* If we make it here we say Grrrr.... first, then we try to figure out
-+ * how to sort this mess.
-+ * These are the rules.
-+ * If there is a number at the beginning it is bigger than anything else.
-+ * If there are digits, then the number of digits decides which one is bigger.
-+ */
-+
-+ for(i = 0; isdigit(name1[i]); i++);
-+ for(j = 0; isdigit(name2[j]); j++);
-+
-+ return(uset1 ? 1
-+ : (uset2 ? -1
-+ : (i < j ? -1 : (i > j ? 1 : (cmp < 0 ? -1 : 1)))));
-+ }
-+
-+ void
-+ maildir_getflag(char *name, int *d, int *f, int *r ,int *s, int *t)
-+ {
-+ char tmp[MAILTMPLEN], *b;
-+ int offset = 0;
-+ int tmpd, tmpf, tmpr, tmps, tmpt;
-+
-+ if(d) *d = 0;
-+ if(f) *f = 0;
-+ if(r) *r = 0;
-+ if(s) *s = 0;
-+ if(t) *t = 0;
-+
-+ tmpd = tmpf = tmpr = tmps = tmpt = NIL; /* no flags set by default */
-+ strcpy(tmp,name);
-+ while ((b = strrchr(tmp+offset, FLAGSEP)) != NULL){
-+ char flag,last;
-+ int k;
-+ if (!++b) break;
-+ switch (*b){
-+ case '1':
-+ case '2':
-+ case '3': flag = *b; b += 2;
-+ for (k = 0; b[k] && b[k] != FLAGSEP && b[k] != ','; k++);
-+ last = b[k];
-+ b[k] = '\0';
-+ if (flag == '2' || flag == '3'){
-+ tmpd = strchr (b, MDFLAGC(Draft)) ? T : NIL;
-+ tmpf = strchr (b, MDFLAGC(Flagged)) ? T : NIL;
-+ tmpr = strchr (b, MDFLAGC(Replied)) ? T : NIL;
-+ tmps = strchr (b, MDFLAGC(Seen)) ? T : NIL;
-+ tmpt = strchr (b, MDFLAGC(Trashed)) ? T : NIL;
-+ }
-+ b[k] = last;
-+ b += k;
-+ for (; tmp[offset] && tmp[offset] != FLAGSEP; offset++);
-+ offset++;
-+ break;
-+ default: break; /* Should we crash?... Nahhh */
-+ }
-+ }
-+ if(d) *d = tmpd;
-+ if(f) *f = tmpf;
-+ if(r) *r = tmpr;
-+ if(s) *s = tmps;
-+ if(t) *t = tmpt;
-+ }
-+
-+ int
-+ maildir_message_in_list(char *msgname, struct direct **names,
-+ unsigned long bottom, unsigned long top, unsigned long *pos)
-+ {
-+ unsigned long middle = (bottom + top)/2;
-+ int test;
-+
-+ if (!msgname)
-+ return NIL;
-+
-+ if (pos) *pos = middle;
-+
-+ if (same_maildir_file(msgname, names[middle]->d_name))
-+ return T;
-+
-+ if (middle == bottom){ /* 0 <= 0 < 1 */
-+ int rv = NIL;
-+ if (same_maildir_file(msgname, names[middle]->d_name)){
-+ rv = T;
-+ if (pos) *pos = middle;
-+ }
-+ else
-+ if (same_maildir_file(msgname, names[top]->d_name)){
-+ rv = T;
-+ if (pos) *pos = top;
-+ }
-+ return rv;
-+ }
-+
-+ test = comp_maildir_file(msgname, names[middle]->d_name);
-+
-+ if (top <= bottom)
-+ return test ? NIL : T;
-+
-+ if (test < 0 ) /* bottom < msgname < middle */
-+ return maildir_message_in_list(msgname, names, bottom, middle, pos);
-+ else if (test > 0) /* middle < msgname < top */
-+ return maildir_message_in_list(msgname, names, middle, top, pos);
-+ else return T;
-+ }
-+
-+ void
-+ maildir_abort(MAILSTREAM *stream)
-+ {
-+ if (LOCAL){
-+ if(LOCAL->candouid)
-+ maildir_read_uid(stream, NULL, &stream->uid_validity);
-+ if (LOCAL->dir) fs_give ((void **) &LOCAL->dir);
-+ if (LOCAL->curdir) fs_give ((void **) &LOCAL->curdir);
-+ if (LOCAL->buf) fs_give ((void **) &LOCAL->buf);
-+ if(LOCAL->uidtempfile){
-+ unlink(LOCAL->uidtempfile);
-+ fs_give ((void **) &LOCAL->uidtempfile);
-+ }
-+ fs_give ((void **) &stream->local);
-+ }
-+ if (mdfpath) fs_give((void **)&mdfpath);
-+ stream->dtb = NIL;
-+ }
-+
-+ int
-+ maildir_contains_folder(char *dirname, char *name)
-+ {
-+ char tmp[MAILTMPLEN], tmp2[MAILTMPLEN];
-+ int rv = 0;
-+ DIR *dir;
-+ struct direct *d;
-+
-+ maildir_file_path(dirname, tmp2);
-+ if(name){
-+ strcat(tmp2,"/");
-+ strcat(tmp2, name);
-+ }
-+
-+ if (!(dir = opendir (tmp2)))
-+ return NIL;
-+
-+ while ((d = readdir(dir)) != NULL){
-+ if (strcmp(d->d_name, ".") && strcmp(d->d_name,"..")
-+ && strcmp(d->d_name, MDNAME(Cur))
-+ && strcmp(d->d_name, MDNAME(Tmp))
-+ && strcmp(d->d_name, MDNAME(New))){
-+
-+ sprintf(tmp,"%s/%s", tmp2, d->d_name);
-+ if(maildir_valid(tmp)){
-+ rv++;
-+ break;
-+ }
-+ }
-+ }
-+ closedir(dir);
-+ return rv;
-+ }
-+
-+ int
-+ maildir_is_dir(char *dirname, char *name)
-+ {
-+ char tmp[MAILTMPLEN];
-+ struct stat sbuf;
-+
-+ maildir_file_path(dirname, tmp);
-+ if(name){
-+ strcat(tmp,"/");
-+ strcat(tmp,name);
-+ }
-+ strcat(tmp,"/");
-+ strcat(tmp,MDDIR);
-+
-+ return ((stat(tmp, &sbuf) == 0) && S_ISREG (sbuf.st_mode)) ? 1 : 0;
-+ }
-+
-+ int
-+ maildir_dir_is_empty(char *mailbox)
-+ {
-+ char tmp[MAILTMPLEN], tmp2[MAILTMPLEN], tmp3[MAILTMPLEN],*s;
-+ int rv = 1, courier = IS_COURIER(mailbox);
-+ DIR *dir;
-+ struct direct *d;
-+ struct stat sbuf;
-+
-+ maildir_file_path(mailbox, tmp2);
-+
-+ if(courier){
-+ strcpy(tmp3, tmp2);
-+ if(s = strrchr(tmp2, '/'))
-+ *s = '\0';
-+ }
-+
-+ if (!(dir = opendir (tmp2)))
-+ return rv;
-+
-+ if(courier){
-+ while((d = readdir(dir)) != NULL){
-+ sprintf(tmp,"%s/%s", tmp2, d->d_name);
-+ if(!strncmp(tmp, tmp3, strlen(tmp3))
-+ && tmp[strlen(tmp3)] == '.'){
-+ rv = 0;
-+ break;
-+ }
-+ }
-+ }
-+ else
-+ while ((d = readdir(dir)) != NULL){
-+ sprintf(tmp,"%s/%s", tmp2, d->d_name);
-+ if (strcmp(d->d_name, ".")
-+ && strcmp(d->d_name,"..")
-+ && strcmp(d->d_name, MDNAME(Cur))
-+ && strcmp(d->d_name, MDNAME(Tmp))
-+ && strcmp(d->d_name, MDNAME(New))
-+ && strcmp(d->d_name, MDDIR)
-+ && strcmp(d->d_name, MDUIDVALIDITY)
-+ && !(d->d_name[0] == '.'
-+ && stat (tmp,&sbuf) == 0
-+ && S_ISREG(sbuf.st_mode))){
-+ rv = 0;
-+ break;
-+ }
-+ }
-+ closedir(dir);
-+ return rv;
-+ }
-+
-+ void
-+ maildir_get_file (MAILDIRFILE **mdfile)
-+ {
-+ MAILDIRFILE *md;
-+
-+ md = (MAILDIRFILE *) fs_get(sizeof(MAILDIRFILE));
-+ memset(md, 0, sizeof(MAILDIRFILE));
-+ *mdfile = md;
-+ }
-+
-+ void
-+ maildir_free_file (void **mdfile)
-+ {
-+ MAILDIRFILE *md = (mdfile && *mdfile) ? (MAILDIRFILE *) *mdfile : NULL;
-+
-+ if (md){
-+ if (md->name) fs_give((void **)&md->name);
-+ fs_give((void **)&md);
-+ }
-+ }
-+
-+ void
-+ maildir_free_file_only (void **mdfile)
-+ {
-+ MAILDIRFILE *md = (mdfile && *mdfile) ? (MAILDIRFILE *) *mdfile : NULL;
-+
-+ if (md && md->name)
-+ fs_give((void **)&md->name);
-+ }
-+
-+ int
-+ maildir_any_new_msgs(char *mailbox)
-+ {
-+ char tmp[MAILTMPLEN];
-+ int rv = NIL;
-+ DIR *dir;
-+ struct direct *d;
-+
-+ MDFLD(tmp, mailbox, New);
-+
-+ if (!(dir = opendir (tmp)))
-+ return rv;
-+
-+ while ((d = readdir(dir)) != NULL){
-+ if (d->d_name[0] == '.')
-+ continue;
-+ rv = T;
-+ break;
-+ }
-+ closedir(dir);
-+ return rv;
-+ }
-+
-+
-+ void
-+ maildir_get_date(MAILSTREAM *stream, unsigned long msgno)
-+ {
-+ MESSAGECACHE *elt;
-+ struct tm *t;
-+ time_t ti;
-+ int i,k;
-+
-+ elt = mail_elt (stream,msgno);
-+ if(elt && elt->year != 0)
-+ return;
-+ if ((ti = mdfntoul(MDFILE(elt))) > 0L && (t = gmtime(&ti))){
-+ i = t->tm_hour * 60 + t->tm_min;
-+ k = t->tm_yday;
-+ t = localtime(&ti);
-+ i = t->tm_hour * 60 + t->tm_min - i;
-+ if((k = t->tm_yday - k) != 0)
-+ i += ((k < 0) == (abs (k) == 1)) ? -24*60 : 24*60;
-+ k = abs (i);
-+ elt->hours = t->tm_hour;
-+ elt->minutes = t->tm_min;
-+ elt->seconds = t->tm_sec;
-+ elt->day = t->tm_mday; elt->month = t->tm_mon + 1;
-+ elt->year = t->tm_year - (BASEYEAR - 1900);
-+ elt->zoccident = (k == i) ? 0 : 1;
-+ elt->zhours = k/60;
-+ elt->zminutes = k % 60;
-+ }
-+ }
-+
-+ /* Support for Courier Style directories
-+ When this code is complete there will be two types of support, which
-+ will be configurable. The problem is the following: In Courier style
-+ folder structure, a "folder" may have a subfolder called
-+ "folder.subfolder", which is not natural in the file system in the
-+ sense that I can not stat for "folder.subfolder" wihtout knowing what
-+ "subfolder" is. It needs to be guessed. Because of this I need to look
-+ in the list of folders if there is a folder with a name
-+ "folder.subfolder", before I can say if the folder is dual or not. One
-+ can avoid this annoyance if one ignores the problem by declaring that
-+ every folder is dual. I will however code as the default the more
-+ complicated idea of scaning the containing directory each time it is
-+ modified and search for subfolders, and list the entries it found.
-+ */
-+
-+ int courier_dir_select (const struct direct *name)
-+ {
-+ return name->d_name[0] == '.' && (strlen(name->d_name) > 2
-+ || (strlen(name->d_name) == 2 && name->d_name[1] != '.'));
-+ }
-+
-+ int courier_dir_sort (const void *d1, const void *d2)
-+ {
-+ const struct direct *e1 = *(const struct direct **) d1;
-+ const struct direct *e2 = *(const struct direct **) d2;
-+
-+ return strcmp((char *) e1->d_name, (char *) e2->d_name);
-+ }
-+
-+ void courier_free_cdir (COURIER_S **cdir)
-+ {
-+ int i;
-+
-+ if (!*cdir)
-+ return;
-+
-+ if ((*cdir)->path) fs_give((void **)&((*cdir)->path));
-+ for (i = 0; i < (*cdir)->total; i++)
-+ if((*cdir)->data[i]->name) fs_give((void **)&((*cdir)->data[i]->name));
-+ fs_give((void **)&((*cdir)->data));
-+ fs_give((void **)&(*cdir));
-+ }
-+
-+ COURIER_S *courier_get_cdir (int total)
-+ {
-+ COURIER_S *cdir;
-+
-+ cdir = (COURIER_S *)fs_get(sizeof(COURIER_S));
-+ memset(cdir, 0, sizeof(COURIER_S));
-+ cdir->data = (COURIERLOCAL **) fs_get(total*sizeof(COURIERLOCAL *));
-+ memset(cdir->data, 0, sizeof(COURIERLOCAL *));
-+ cdir->total = total;
-+ return cdir;
-+ }
-+
-+ int courier_search_list(COURIERLOCAL **data, char *name, int first, int last)
-+ {
-+ int try = (first + last)/2;
-+
-+ if(!strstr(data[try]->name, name)){
-+ if(first == try) /* first == last || first + 1 == last */
-+ return strstr(data[last]->name, name) ? 1 : 0;
-+ if(strcmp(data[try]->name, name) < 0) /*data[try] < name < data[end] */
-+ return courier_search_list(data, name, try, last);
-+ else /* data[begin] < name < data[try] */
-+ return courier_search_list(data, name, first, try);
-+ }
-+ return 1;
-+ }
-+
-+ /* Lists all directories that are subdirectories of a given directory */
-+
-+ COURIER_S *courier_list_dir(char *curdir)
-+ {
-+ struct direct **names = NIL;
-+ struct stat sbuf;
-+ unsigned long ndir;
-+ COURIER_S *cdir = NULL;
-+ char tmp[MAILTMPLEN], tmp2[MAILTMPLEN], pathname[MAILTMPLEN],
-+ realname[MAILTMPLEN];
-+ int i, j, scand, td;
-+
-+ /* There are two cases, either curdir is
-+ #mc/INBOX. #mc/INBOX.foo
-+ or
-+ #mc/Maildir/. #mc/Maildir/.foo
-+ */
-+ strcpy(tmp,curdir + 4);
-+ if(!strncmp(ucase(tmp), "INBOX", 5))
-+ strcpy(tmp, "#mc/INBOX.");
-+ else{
-+ strcpy(tmp, curdir);
-+ for (i = strlen(tmp) - 1; tmp[i] && tmp[i] != '/'; i--);
-+ tmp[i+2] = '\0'; /* keep the last "." intact */
-+ }
-+ maildir_file_path(tmp, realname);
-+ maildir_scandir (realname, &names, &ndir, &scand, COURIER);
-+
-+ if (scand > 0){
-+ cdir = courier_get_cdir(ndir);
-+ cdir->path = cpystr(realname);
-+ for(i = 0, j = 0; i < ndir; i++){
-+ td = realname[strlen(realname) - 1] == '.'
-+ && *names[i]->d_name == '.';
-+ sprintf(tmp2,"%s%s", tmp, names[i]->d_name+1);
-+ sprintf(pathname,"%s%s", realname, names[i]->d_name + td);
-+ if(stat(pathname, &sbuf) == 0 && S_ISDIR(sbuf.st_mode)){
-+ cdir->data[j] = (COURIERLOCAL *) fs_get(sizeof(COURIERLOCAL));
-+ cdir->data[j++]->name = cpystr(tmp2);
-+ }
-+ fs_give((void **)&names[i]);
-+ }
-+ cdir->total = j;
-+ if(cdir->total == 0)
-+ courier_free_cdir(&cdir);
-+ }
-+ if(names)
-+ fs_give((void **) &names);
-+ return cdir;
-+ }
-+
-+ void
-+ courier_list_info(COURIER_S **cdirp, char *data, int i)
-+ {
-+ long style = (long) maildir_parameters(GET_COURIERSTYLE, NIL);
-+ COURIER_S *cdir = *cdirp;
-+
-+ if(maildir_valid(cdir->data[i]->name)){
-+ if(courier_search_list(cdir->data, data, 0, cdir->total - 1))
-+ cdir->data[i]->attribute = LATT_HASCHILDREN;
-+ else
-+ cdir->data[i]->attribute = (style == COURIER)
-+ ? LATT_HASNOCHILDREN : LATT_NOINFERIORS;
-+ }
-+ else
-+ cdir->data[i]->attribute = LATT_NOSELECT;
-+ cdir->data[i]->attribute += maildir_any_new_msgs(cdir->data[i]->name)
-+ ? LATT_MARKED : LATT_UNMARKED;
-+ }
-+
-+ /* UID Support */
-+ /* Yes, I know I procastinated a lot about this, but here it is finally */
-+
-+ unsigned int
-+ maildir_can_assign_uid (MAILSTREAM *stream)
-+ {
-+ unsigned int rv = 0;
-+ int createtemp;
-+ unsigned long t;
-+ char tmp[MAILTMPLEN], *s;
-+ DIR *dir;
-+ struct direct *d;
-+
-+ if(!stream || stream->rdonly
-+ || !LOCAL || !LOCAL->dir || !(dir = opendir(LOCAL->dir)))
-+ return rv;
-+
-+ sprintf(tmp, "%s.%d", MDUIDTEMP, mypid);
-+ while ((d = readdir(dir)) != NULL){
-+ if(!strncmp(d->d_name, tmp, strlen(tmp))
-+ || !strncmp(d->d_name, MDUIDTEMP, strlen(MDUIDTEMP)))
-+ break;
-+ }
-+ rv = d ? !strncmp(d->d_name, tmp, strlen(tmp)) : 1;
-+ createtemp = d ? 0 : 1;
-+ if (d && rv == 0){ /* is there a temp file that is not ours? */
-+ s = strrchr(d->d_name, '.');
-+ t = strtoul(s+1, &s, 10);
-+ if(s != NULL && *s != '\0')
-+ createtemp++;
-+ if(time(0) > t + MAXTEMPUID){
-+ createtemp++;
-+ sprintf(tmp,"%s/%s", LOCAL->dir, d->d_name);
-+ unlink(tmp);
-+ }
-+ }
-+ closedir(dir);
-+ if(createtemp){
-+ FILE *fp;
-+ sprintf(tmp,"%s/%s.%d.%lu", LOCAL->dir, MDUIDTEMP, mypid, time(0));
-+ if(fp = fopen(tmp, "w")){
-+ fclose(fp);
-+ if(LOCAL->uidtempfile)
-+ fs_give((void **)&LOCAL->uidtempfile);
-+ LOCAL->uidtempfile = cpystr(tmp);
-+ rv++;
-+ }
-+ }
-+ return rv;
-+ }
-+
-+ void
-+ maildir_read_uid(MAILSTREAM *stream, unsigned long *uid_last,
-+ unsigned long *uid_validity)
-+ {
-+ int createuid, deleteuid = 0;
-+ char tmp[MAILTMPLEN], *s = NULL;
-+ DIR *dir;
-+ struct direct *d;
-+
-+ if(uid_last) *uid_last = 0L;
-+ if(uid_last && uid_validity) *uid_validity = time(0);
-+ if(!stream || !LOCAL || !LOCAL->dir || !(dir = opendir(LOCAL->dir)))
-+ return;
-+
-+ while ((d = readdir(dir)) != NULL){
-+ if(!strncmp(d->d_name, MDUIDLAST, strlen(MDUIDLAST)))
-+ break;
-+ }
-+ createuid = d == NULL ? 1 : 0;
-+ if(uid_last == NULL)
-+ deleteuid++;
-+ if(d){
-+ if(uid_last){
-+ s = d->d_name + strlen(MDUIDLAST) + 1;
-+ *uid_last = strtoul(s, &s, 10);
-+ if(!s || *s != '.'){
-+ deleteuid++;
-+ createuid++;
-+ *uid_last = 0L;
-+ }
-+ }
-+ if(s && *s == '.'){
-+ if(uid_validity){
-+ s++;
-+ *uid_validity = strtoul(s, &s, 10);
-+ if(s && *s != '\0'){
-+ *uid_validity = time(0);
-+ deleteuid++;
-+ createuid++;
-+ }
-+ }
-+ }
-+ else{
-+ deleteuid++;
-+ createuid++;
-+ }
-+ }
-+ if(deleteuid){
-+ sprintf(tmp,"%s/%s", LOCAL->dir, d->d_name);
-+ unlink(tmp);
-+ }
-+ if(createuid)
-+ maildir_write_uid(stream, (uid_last ? *uid_last : stream->uid_last),
-+ uid_validity ? *uid_validity : time(0));
-+ closedir(dir);
-+ }
-+
-+ void
-+ maildir_write_uid(MAILSTREAM *stream, unsigned long uid_last,
-+ unsigned long uid_validity)
-+ {
-+ char tmp[MAILTMPLEN];
-+ FILE *fp;
-+
-+ if(!stream || stream->rdonly || !LOCAL || !LOCAL->dir)
-+ return;
-+
-+ sprintf(tmp,"%s/%s.%010lu.%010lu", LOCAL->dir, MDUIDLAST,
-+ uid_last, uid_validity);
-+ if(fp = fopen(tmp, "w"))
-+ fclose(fp);
-+ }
-+
-+ unsigned long
-+ maildir_get_uid(char *name)
-+ {
-+ char *s;
-+ unsigned long rv = 0L;
-+
-+ if(!name || (s = strstr(name,MDUIDSEP)) == NULL)
-+ return rv;
-+
-+ s += strlen(MDUIDSEP);
-+ rv = strtoul(s, NULL, 10);
-+ return rv;
-+ }
-+
-+
-+ void
-+ maildir_delete_uid(MAILSTREAM *stream, unsigned long msgno)
-+ {
-+ char old[MAILTMPLEN], new[MAILTMPLEN], *s, *t;
-+ MESSAGECACHE *elt;
-+
-+ elt = mail_elt(stream, msgno);
-+ if(!stream || !elt || !elt->private.spare.ptr || !LOCAL || !LOCAL->dir)
-+ return;
-+
-+ sprintf(old, "%s/%s/%s", LOCAL->dir, MDNAME(Cur), MDFILE(elt));
-+ t = MDFILE(elt);
-+ if(s = strstr(MDFILE(elt), MDUIDSEP)){
-+ *s = '\0';
-+ s += strlen(MDUIDSEP);
-+ strtoul(s, &s, 10);
-+ sprintf(new, "%s/%s/%s%s", LOCAL->dir, MDNAME(Cur), t, s);
-+ if(rename(old, new) == 0){
-+ maildir_free_file_only ((void **)&elt->private.spare.ptr);
-+ s = strrchr(new, '/');
-+ MDFILE(elt) = cpystr(s+1);
-+ }
-+ elt->private.uid = 0L;
-+ }
-+ }
-+
-+ void
-+ maildir_assign_uid(MAILSTREAM *stream, unsigned long msgno, unsigned long uid)
-+ {
-+ int createuid, deleteuid = 0;
-+ char old[MAILTMPLEN], new[MAILTMPLEN], *s, *t;
-+ MESSAGECACHE *elt;
-+
-+ elt = mail_elt(stream, msgno);
-+ if(!stream || !elt || !elt->private.spare.ptr || !LOCAL || !LOCAL->dir)
-+ return;
-+
-+ maildir_delete_uid(stream, msgno);
-+ sprintf(old, "%s/%s/%s", LOCAL->dir, MDNAME(Cur), MDFILE(elt));
-+ t = MDFILE(elt);
-+ if((s = strrchr(MDFILE(elt),FLAGSEP)) != NULL){
-+ *s++ = '\0';
-+ sprintf(new, "%s/%s/%s%s%lu%c%s",
-+ LOCAL->dir, MDNAME(Cur), t, MDUIDSEP, uid, FLAGSEP, s);
-+ if(rename(old, new) == 0){
-+ maildir_free_file_only ((void **)&elt->private.spare.ptr);
-+ s = strrchr(new, '/');
-+ MDFILE(elt) = cpystr(s+1);
-+ stream->uid_validity = time(0);
-+ }
-+ elt->private.uid = uid;
-+ }
-+ }
-+
-+ void
-+ maildir_uid_renew_tempfile(MAILSTREAM *stream)
-+ {
-+ char tmp[MAILTMPLEN];
-+
-+ if(!stream || stream->rdonly
-+ || !LOCAL || !LOCAL->candouid || !LOCAL->dir || !LOCAL->uidtempfile)
-+ return;
-+
-+ sprintf(tmp,"%s/%s.%d.%lu", LOCAL->dir, MDUIDTEMP, mypid, time(0));
-+ if(rename(LOCAL->uidtempfile, tmp) == 0){
-+ fs_give((void **)&LOCAL->uidtempfile);
-+ LOCAL->uidtempfile = cpystr(tmp);
-+ }
-+ }
-diff -rc alpine-2.00/imap/src/osdep/unix/maildir.h alpine-2.00.maildir/imap/src/osdep/unix/maildir.h
-*** alpine-2.00/imap/src/osdep/unix/maildir.h 2011-01-24 19:38:50.000000000 -0600
---- alpine-2.00.maildir/imap/src/osdep/unix/maildir.h 2011-01-15 19:11:36.000000000 -0600
-***************
-*** 0 ****
---- 1,226 ----
-+ /*
-+ * A few definitions that try to make this module portable to other
-+ * platforms (e.g. Cygwin). This module is based on the information from
-+ * http://cr.yp.to/proto/maildir.html
-+ */
-+
-+ /* First we deal with the separator character */
-+ #ifndef FLAGSEP
-+ #define FLAGSEP ':'
-+ #endif
-+ #define SIZESEP ','
-+
-+ const char sep1[] = {FLAGSEP, '1', ',', '\0'}; /* experimental semantics*/
-+ const char sep2[] = {FLAGSEP, '2', ',', '\0'}; /* Flags Information */
-+ const char sep3[] = {FLAGSEP, '3', ',', '\0'}; /* Grrrr.... */
-+
-+ const char *sep[] = { sep1, sep2, sep3, NULL};
-+
-+ #define MDSEP(i) sep[((i) - 1)]
-+
-+ /* Now we deal with flags. Woohoo! */
-+ typedef enum {Draft, Flagged, Passed, Replied, Seen, Trashed,
-+ EmptyFlag, EndFlags} MdFlagNamesType;
-+ const int mdimapflags[] = {Draft, Flagged, Replied, Seen, Trashed, EmptyFlag, EndFlags};
-+ const int mdkwdflags[] = {Passed, EmptyFlag, EndFlags};
-+
-+ /* this array lists the codes for mdflgnms (maildir flag names) above */
-+ const char *mdflags[] = { "D", "F", "P", "R", "S", "T", "", NULL};
-+ /* and as characters too */
-+ const char cmdflags[] = { 'D', 'F', 'P', 'R', 'S', 'T', '0', '\0'};
-+
-+ /* MDFLAG(Seen, elt->seen) */
-+ #define MDFLAG(i,j) mdflags[j ? (i) : EmptyFlag]
-+ /* MDFLAGC(Seen) */
-+ #define MDFLAGC(i) cmdflags[(i)]
-+
-+ /* Now we deal with the directory structure */
-+ typedef enum {Cur, Tmp, New, EndDir} DirNamesType;
-+ char *mdstruct[] = {"cur", "tmp", "new", NULL};
-+ #define MDNAME(i) mdstruct[(i)]
-+ #define MDFLD(tmp, dir, i) sprintf((tmp),"%s/%s", (dir), mdstruct[(i)])
-+ #define MSGPATH(tmp, dir, msg,i) sprintf((tmp),"%s/%s/%s", (dir), mdstruct[(i)],(msg))
-+
-+ /* Files associated to a maildir directory */
-+
-+ #define MDUIDVALIDITY ".uidvalidity" /* support for old maildirs */
-+ #define MDDIR ".mdir" /* this folder is a directory */
-+ #define MDUIDLAST ".uidlast" /* last assigned uid */
-+ #define MDUIDTEMP ".uidtemp" /* We assign uid's no one else */
-+
-+
-+
-+ /* Support of Courier Structure */
-+ #define CCLIENT 0
-+ #define COURIER 1
-+ #define IS_CCLIENT(t) \
-+ (((t) && (t)[0] == '#' && ((t)[1] == 'm' || (t)[1] == 'M')\
-+ && ((t)[2] == 'd' || (t)[2] == 'D')\
-+ && (t)[3] == '/' && (t)[4] != '\0') ? 1 : 0)
-+
-+ #define IS_COURIER(t) \
-+ (((t) && (t)[0] == '#' && ((t)[1] == 'm' || (t)[1] == 'M')\
-+ && ((t)[2] == 'c' || (t)[2] == 'C')\
-+ && (t)[3] == '/' && (t)[4] != '\0') ? 1 : 0)
-+ #define MDPREFIX(s) ((s) ? "#mc/" : "#md/")
-+ #define MDSEPARATOR(s) ((s) ? '.' : '/')
-+
-+ /* UID Support */
-+
-+ #define MAXTEMPUID (unsigned long) 180L
-+ const char mduid[] = {',','u','=','\0'};
-+ #define MDUIDSEP mduid
-+
-+
-+ /* Now we deal with messages filenames */
-+ char mdlocaldomain[MAILTMPLEN+1] = {'\0'};
-+ pid_t mypid = (pid_t) 0;
-+ static char *mdfpath = NULL;
-+ static char myMdInboxDir[50] = { '\0' };/* Location of the Maildir INBOX */
-+ static long CourierStyle = CCLIENT;
-+
-+ #define CHUNK 16384 /* from unix.h */
-+
-+ typedef struct courier_local {
-+ char *name; /* name of directory/folder */
-+ int attribute; /* attributes (children/marked/etc) */
-+ } COURIERLOCAL;
-+
-+ typedef struct courier {
-+ char *path; /* Path to collection */
-+ time_t scantime; /* time at which information was generated */
-+ int total; /* total number of elements in data */
-+ COURIERLOCAL **data;
-+ } COURIER_S;
-+
-+ /* In gdb this is the *(struct maildir_local *)stream->local structure */
-+ typedef struct maildir_local {
-+ unsigned int dirty : 1; /* diskcopy needs updating */
-+ unsigned int courier : 1; /* It is Courier style file system */
-+ unsigned int link : 1; /* There is a symbolic link */
-+ unsigned int candouid; /* we can assign uids and no one else */
-+ char *uidtempfile; /* path to uid temp file */
-+ int fd; /* fd of open message */
-+ char *dir; /* mail directory name */
-+ char *curdir; /* mail directory name/cur */
-+ unsigned char *buf; /* temporary buffer */
-+ unsigned long buflen; /* current size of temporary buffer */
-+ time_t scantime; /* last time directory scanned */
-+ } MAILDIRLOCAL;
-+
-+ /* Convenient access to local data */
-+ #define LOCAL ((MAILDIRLOCAL *) stream->local)
-+
-+ typedef struct maildir_file_info {
-+ char *name; /* name of the file */
-+ DirNamesType loc; /* location of this file */
-+ unsigned long pos; /* place in list where this file is listed */
-+ off_t size; /* size in bytes, on disk */
-+ time_t atime; /* last access time */
-+ time_t mtime; /* last modified time */
-+ time_t ctime; /* last changed time */
-+ } MAILDIRFILE;
-+
-+ #define MDFILE(F) (((MAILDIRFILE *)((F)->private.spare.ptr))->name)
-+ #define MDLOC(F) (((MAILDIRFILE *)((F)->private.spare.ptr))->loc)
-+ #define MDPOS(F) (((MAILDIRFILE *)((F)->private.spare.ptr))->pos)
-+ #define MDSIZE(F) (((MAILDIRFILE *)((F)->private.spare.ptr))->size)
-+ #define MDATIME(F) (((MAILDIRFILE *)((F)->private.spare.ptr))->atime)
-+ #define MDMTIME(F) (((MAILDIRFILE *)((F)->private.spare.ptr))->mtime)
-+ #define MDCTIME(F) (((MAILDIRFILE *)((F)->private.spare.ptr))->ctime)
-+
-+ /* Function prototypes */
-+
-+ DRIVER *maildir_valid (char *name);
-+ MAILSTREAM *maildir_open (MAILSTREAM *stream);
-+ void maildir_close (MAILSTREAM *stream, long options);
-+ long maildir_ping (MAILSTREAM *stream);
-+ void maildir_check (MAILSTREAM *stream);
-+ long maildir_text (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flags);
-+ char *maildir_header (MAILSTREAM *stream,unsigned long msgno,
-+ unsigned long *length, long flags);
-+ void maildir_list (MAILSTREAM *stream,char *ref,char *pat);
-+ void *maildir_parameters (long function,void *value);
-+ int maildir_create_folder (char *mailbox);
-+ long maildir_create (MAILSTREAM *stream,char *mailbox);
-+ void maildir_flagmsg (MAILSTREAM *stream,MESSAGECACHE *elt); /*check */
-+ long maildir_expunge (MAILSTREAM *stream, char *sequence, long options);
-+ long maildir_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options);
-+ long maildir_append (MAILSTREAM *stream,char *mailbox, append_t af, void *data);
-+ long maildir_delete (MAILSTREAM *stream,char *mailbox);
-+ long maildir_rename (MAILSTREAM *stream,char *old,char *new);
-+ long maildir_sub (MAILSTREAM *stream,char *mailbox);
-+ long maildir_unsub (MAILSTREAM *stream,char *mailbox);
-+ void maildir_lsub (MAILSTREAM *stream,char *ref,char *pat);
-+ void courier_list (MAILSTREAM *stream,char *ref, char *pat);
-+
-+ /* utility functions */
-+ void courier_realname (char *name, char *realname);
-+ long maildir_dirfmttest (char *name);
-+ char *maildir_file (char *dst,char *name);
-+ int maildir_select (const struct direct *name);
-+ int maildir_namesort (const void *d1, const void *d2);
-+ unsigned long antoul (char *seed);
-+ unsigned long mdfntoul (char *name);
-+ int courier_dir_select (const struct direct *name);
-+ int courier_dir_sort (const void *d1, const void *d2);
-+ long maildir_canonicalize (char *pattern,char *ref,char *pat);
-+ void maildir_list_work (MAILSTREAM *stream,char *subdir,char *pat,long level);
-+ void courier_list_work (MAILSTREAM *stream,char *subdir,char *pat,long level);
-+ int maildir_file_path(char *name, char *tmp);
-+ int maildir_valid_name (char *name);
-+ int maildir_valid_dir (char *name);
-+ int is_valid_maildir (char **name);
-+ int maildir_message_exists(MAILSTREAM *stream,char *name, char *tmp);
-+ char *maildir_remove_root(char *name);
-+ char *maildir_text_work (MAILSTREAM *stream,MESSAGECACHE *elt, unsigned long *length,long flags);
-+ unsigned long maildir_parse_message(MAILSTREAM *stream, unsigned long msgno,
-+ DirNamesType dirtype);
-+ int maildir_eliminate_duplicate (char *name, struct direct ***flist,
-+ unsigned long *nfiles);
-+ int maildir_doscandir (char *name, struct direct ***flist, int flag);
-+ unsigned long maildir_scandir (char *name, struct direct ***flist,
-+ unsigned long *nfiles, int *scand, int flag);
-+ void maildir_parse_folder (MAILSTREAM *stream, int full);
-+ void md_domain_name (void);
-+ char *myrootdir (char *name);
-+ char *mdirpath (void);
-+ int maildir_initial_check (MAILSTREAM *stream, DirNamesType dirtype);
-+ unsigned long maildir_parse_dir(MAILSTREAM *stream, unsigned long nmsgs,
-+ DirNamesType dirtype, struct direct **names, unsigned long nfiles, int full);
-+ int same_maildir_file(char *name1, char *name2);
-+ int comp_maildir_file(char *name1, char *name2);
-+ int maildir_message_in_list(char *msgname, struct direct **names,
-+ unsigned long bottom, unsigned long top, unsigned long *pos);
-+ void maildir_getflag(char *name, int *d, int *f, int *r ,int *s, int *t);
-+ int maildir_update_elt_maildirp(MAILSTREAM *stream, unsigned long msgno);
-+ void maildir_abort (MAILSTREAM *stream);
-+ int maildir_contains_folder(char *dirname, char *name);
-+ int maildir_is_dir(char *dirname, char *name);
-+ int maildir_dir_is_empty(char *mailbox);
-+ int maildir_create_work (char *mailbox, int loop);
-+ void maildir_get_file (MAILDIRFILE **mdfile);
-+ void maildir_free_file (void **mdfile);
-+ void maildir_free_file_only (void **mdfile);
-+ int maildir_any_new_msgs(char *mailbox);
-+ void maildir_get_date(MAILSTREAM *stream, unsigned long msgno);
-+ void maildir_fast (MAILSTREAM *stream,char *sequence,long flags);
-+
-+ /* Courier server support */
-+ void courier_free_cdir (COURIER_S **cdir);
-+ COURIER_S *courier_get_cdir (int total);
-+ int courier_search_list(COURIERLOCAL **data, char *name, int first, int last);
-+ COURIER_S *courier_list_dir(char *curdir);
-+ void courier_list_info(COURIER_S **cdirp, char *data, int i);
-+
-+ /* UID Support */
-+ unsigned int maildir_can_assign_uid (MAILSTREAM *stream);
-+ void maildir_read_uid(MAILSTREAM *stream, unsigned long *uid_last,
-+ unsigned long *uid_validity);
-+ void maildir_write_uid(MAILSTREAM *stream, unsigned long uid_last,
-+ unsigned long uid_validity);
-+ unsigned long maildir_get_uid(char *name);
-+ void maildir_delete_uid(MAILSTREAM *stream, unsigned long msgno);
-+ void maildir_assign_uid(MAILSTREAM *stream, unsigned long msgno, unsigned long uid);
-+ void maildir_uid_renew_tempfile(MAILSTREAM *stream);
-+
-diff -rc alpine-2.00/imap/src/osdep/unix/Makefile alpine-2.00.maildir/imap/src/osdep/unix/Makefile
-*** alpine-2.00/imap/src/osdep/unix/Makefile 2008-06-04 13:18:34.000000000 -0500
---- alpine-2.00.maildir/imap/src/osdep/unix/Makefile 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 144,150 ****
- # However, mh needs to be before any sysinbox formats (such as mmdf or unix)
- # since otherwise INBOX won't work correctly when mh_allow_inbox is set.
- #
-! DEFAULTDRIVERS=imap nntp pop3 mix mx mbx tenex mtx mh mmdf unix news phile
- CHUNKSIZE=65536
-
- # Normally no need to change any of these
---- 144,150 ----
- # However, mh needs to be before any sysinbox formats (such as mmdf or unix)
- # since otherwise INBOX won't work correctly when mh_allow_inbox is set.
- #
-! DEFAULTDRIVERS=maildir courier imap nntp pop3 mix mx mbx tenex mtx mh mmdf unix news phile
- CHUNKSIZE=65536
-
- # Normally no need to change any of these
-***************
-*** 153,159 ****
- BINARIES=osdep.o mail.o misc.o newsrc.o smanager.o utf8.o utf8aux.o siglocal.o \
- dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
- rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
-! unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
- CFLAGS=-g
-
- CAT=cat
---- 153,159 ----
- BINARIES=osdep.o mail.o misc.o newsrc.o smanager.o utf8.o utf8aux.o siglocal.o \
- dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
- rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
-! unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o maildir.o
- CFLAGS=-g
-
- CAT=cat
-***************
-*** 282,288 ****
-
- cyg: # Cygwin - note that most local file drivers don't work!!
- $(BUILD) `$(CAT) SPECIALS` OS=$@ \
-! DEFAULTDRIVERS="imap nntp pop3 mbx unix phile" \
- SIGTYPE=psx CHECKPW=cyg LOGINPW=cyg CRXTYPE=std \
- SPOOLDIR=/var \
- ACTIVEFILE=/usr/local/news/lib/active \
---- 282,288 ----
-
- cyg: # Cygwin - note that most local file drivers don't work!!
- $(BUILD) `$(CAT) SPECIALS` OS=$@ \
-! DEFAULTDRIVERS="imap nntp pop3 mbx unix maildir phile" \
- SIGTYPE=psx CHECKPW=cyg LOGINPW=cyg CRXTYPE=std \
- SPOOLDIR=/var \
- ACTIVEFILE=/usr/local/news/lib/active \
-***************
-*** 892,898 ****
- unix.o: mail.h misc.h osdep.h unix.h pseudo.h dummy.h
- utf8.o: mail.h misc.h osdep.h utf8.h tmap.c widths.c
- utf8aux.o: mail.h misc.h osdep.h utf8.h
-!
-
- # OS-dependent
-
---- 892,898 ----
- unix.o: mail.h misc.h osdep.h unix.h pseudo.h dummy.h
- utf8.o: mail.h misc.h osdep.h utf8.h tmap.c widths.c
- utf8aux.o: mail.h misc.h osdep.h utf8.h
-! maildir.o: mail.h misc.h osdep.h maildir.h dummy.h
-
- # OS-dependent
-
-diff -rc alpine-2.00/imap/src/osdep/unix/os_cyg.h alpine-2.00.maildir/imap/src/osdep/unix/os_cyg.h
-*** alpine-2.00/imap/src/osdep/unix/os_cyg.h 2008-06-04 13:18:34.000000000 -0500
---- alpine-2.00.maildir/imap/src/osdep/unix/os_cyg.h 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 47,52 ****
---- 47,53 ----
- #define setpgrp setpgid
-
- #define SYSTEMUID 18 /* Cygwin returns this for SYSTEM */
-+ #define FLAGSEP ';'
- #define geteuid Geteuid
- uid_t Geteuid (void);
-
-diff -rc alpine-2.00/pith/conf.c alpine-2.00.maildir/pith/conf.c
-*** alpine-2.00/pith/conf.c 2008-08-22 19:07:05.000000000 -0500
---- alpine-2.00.maildir/pith/conf.c 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 427,432 ****
---- 427,435 ----
-
- CONF_TXT_T cf_text_newsrc_path[] = "Full path and name of NEWSRC file";
-
-+ #ifndef _WINDOWS
-+ CONF_TXT_T cf_text_maildir_location[] = "Location relative to your HOME directory of the directory where your INBOX\n# for the maildir format is located. Default value is \"Maildir\". If your\n# inbox is located at \"~/Maildir\" you do not need to change this value.\n# A common value is also \".maildir\"";
-+ #endif
-
- /*----------------------------------------------------------------------
- These are the variables that control a number of pine functions. They
-***************
-*** 627,632 ****
---- 630,639 ----
- NULL, cf_text_news_active},
- {"news-spool-directory", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
- NULL, cf_text_news_spooldir},
-+ #ifndef _WINDOWS
-+ {"maildir-location", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
-+ "Maildir Location", cf_text_maildir_location},
-+ #endif
- {"upload-command", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
- NULL, cf_text_upload_cmd},
- {"upload-command-prefix", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
-***************
-*** 2216,2221 ****
---- 2223,2234 ----
- mail_parameters(NULL, SET_NEWSSPOOL,
- (void *)VAR_NEWS_SPOOL_DIR);
-
-+ #ifndef _WINDOWS
-+ set_current_val(&vars[V_MAILDIR_LOCATION], TRUE, TRUE);
-+ if(VAR_MAILDIR_LOCATION && VAR_MAILDIR_LOCATION[0])
-+ mail_parameters(NULL, SET_MDINBOXPATH, (void *)VAR_MAILDIR_LOCATION);
-+ #endif
-+
- /* guarantee a save default */
- set_current_val(&vars[V_DEFAULT_SAVE_FOLDER], TRUE, TRUE);
- if(!VAR_DEFAULT_SAVE_FOLDER || !VAR_DEFAULT_SAVE_FOLDER[0])
-***************
-*** 2832,2837 ****
---- 2845,2854 ----
- F_SORT_DEFAULT_SAVE_ALPHA, h_config_sort_save_alpha, PREF_FLDR, 0},
- {"vertical-folder-list", "Use Vertical Folder List",
- F_VERTICAL_FOLDER_LIST, h_config_vertical_list, PREF_FLDR, 0},
-+ #ifndef _WINDOWS
-+ {"use-courier-folder-list", "Courier Style Folder List",
-+ F_COURIER_FOLDER_LIST, h_config_courier_list, PREF_FLDR, 0},
-+ #endif
-
- /* Addr book */
- {"combined-addrbook-display", "Combined Address Book Display",
-***************
-*** 6895,6900 ****
---- 6912,6923 ----
-
- break;
-
-+ #ifndef _WINDOWS
-+ case F_COURIER_FOLDER_LIST:
-+ mail_parameters(NULL,SET_COURIERSTYLE,(void *)(F_ON(f->id ,ps)? 1 : 0));
-+ break; /* COURIER == 1, CCLIENT == 0, see maildir.h */
-+ #endif
-+
- case F_COLOR_LINE_IMPORTANT :
- case F_DATES_TO_LOCAL :
- clear_index_cache(ps->mail_stream, 0);
-***************
-*** 7676,7681 ****
---- 7699,7708 ----
- return(h_config_newmailwidth);
- case V_NEWSRC_PATH :
- return(h_config_newsrc_path);
-+ #ifndef _WINDOWS
-+ case V_MAILDIR_LOCATION :
-+ return(h_config_maildir_location);
-+ #endif
- case V_BROWSER :
- return(h_config_browser);
- #if defined(DOS) || defined(OS2)
-diff -rc alpine-2.00/pith/conf.h alpine-2.00.maildir/pith/conf.h
-*** alpine-2.00/pith/conf.h 2008-08-19 19:27:11.000000000 -0500
---- alpine-2.00.maildir/pith/conf.h 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 249,254 ****
---- 249,258 ----
- #define GLO_NEWS_ACTIVE_PATH vars[V_NEWS_ACTIVE_PATH].global_val.p
- #define VAR_NEWS_SPOOL_DIR vars[V_NEWS_SPOOL_DIR].current_val.p
- #define GLO_NEWS_SPOOL_DIR vars[V_NEWS_SPOOL_DIR].global_val.p
-+ #ifndef _WINDOWS
-+ #define VAR_MAILDIR_LOCATION vars[V_MAILDIR_LOCATION].current_val.p
-+ #define GLO_MAILDIR_LOCATION vars[V_MAILDIR_LOCATION].global_val.p
-+ #endif
- #define VAR_DISABLE_DRIVERS vars[V_DISABLE_DRIVERS].current_val.l
- #define VAR_DISABLE_AUTHS vars[V_DISABLE_AUTHS].current_val.l
- #define VAR_REMOTE_ABOOK_METADATA vars[V_REMOTE_ABOOK_METADATA].current_val.p
-diff -rc alpine-2.00/pith/conftype.h alpine-2.00.maildir/pith/conftype.h
-*** alpine-2.00/pith/conftype.h 2008-08-19 19:27:11.000000000 -0500
---- alpine-2.00.maildir/pith/conftype.h 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 114,119 ****
---- 114,122 ----
- , V_NEWSRC_PATH
- , V_NEWS_ACTIVE_PATH
- , V_NEWS_SPOOL_DIR
-+ #ifndef _WINDOWS
-+ , V_MAILDIR_LOCATION
-+ #endif
- , V_UPLOAD_CMD
- , V_UPLOAD_CMD_PREFIX
- , V_DOWNLOAD_CMD
-***************
-*** 380,385 ****
---- 383,391 ----
- F_PASS_C1_CONTROL_CHARS,
- F_SINGLE_FOLDER_LIST,
- F_VERTICAL_FOLDER_LIST,
-+ #ifndef _WINDOWS
-+ F_COURIER_FOLDER_LIST,
-+ #endif
- F_TAB_CHK_RECENT,
- F_AUTO_REPLY_TO,
- F_VERBOSE_POST,
-diff -rc alpine-2.00/pith/init.c alpine-2.00.maildir/pith/init.c
-*** alpine-2.00/pith/init.c 2007-08-16 17:25:10.000000000 -0500
---- alpine-2.00.maildir/pith/init.c 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 407,412 ****
---- 407,415 ----
- && stricmp(filename, folder_base)){
- #else
- if(strncmp(filename, folder_base, folder_base_len) == 0
-+ #ifndef _WINDOWS
-+ && filename[folder_base_len] != list_cntxt->dir->delim
-+ #endif
- && strcmp(filename, folder_base)){
- #endif
- #endif
-diff -rc alpine-2.00/pith/pattern.c alpine-2.00.maildir/pith/pattern.c
-*** alpine-2.00/pith/pattern.c 2008-07-14 13:01:54.000000000 -0500
---- alpine-2.00.maildir/pith/pattern.c 2011-01-24 19:38:41.000000000 -0600
-***************
-*** 5482,5487 ****
---- 5482,5496 ----
- break;
-
- case '#':
-+ #ifndef _WINDOWS
-+ if(!struncmp(patfolder, "#md/", 4)
-+ || !struncmp(patfolder, "#mc/", 4)){
-+ maildir_file_path(patfolder, tmp1);
-+ if(!strcmp(patfolder, stream->mailbox))
-+ match++;
-+ break;
-+ }
-+ #endif
- if(!strcmp(patfolder, stream->mailbox))
- match++;
-
-***************
-*** 7894,7900 ****
- int we_cancel = 0, width;
- CONTEXT_S *save_context = NULL;
- char buf[MAX_SCREEN_COLS+1], sbuf[MAX_SCREEN_COLS+1];
-! char *save_ref = NULL;
- #define FILTMSG_MAX 30
-
- if(!stream)
---- 7903,7909 ----
- int we_cancel = 0, width;
- CONTEXT_S *save_context = NULL;
- char buf[MAX_SCREEN_COLS+1], sbuf[MAX_SCREEN_COLS+1];
-! char *save_ref = NULL, *save_dstfldr = NULL, *save_dstfldr2 = NULL;
- #define FILTMSG_MAX 30
-
- if(!stream)
-***************
-*** 7928,7933 ****
---- 7937,7952 ----
- if(F_OFF(F_QUELL_FILTER_MSGS, ps_global))
- we_cancel = busy_cue(buf, NULL, 0);
-
-+ #ifndef _WINDOWS
-+ if(!struncmp(dstfldr, "#md/", 4) || !struncmp(dstfldr, "#mc/", 4)){
-+ char tmp1[MAILTMPLEN];
-+ maildir_file_path(dstfldr, tmp1);
-+ save_dstfldr2 = dstfldr;
-+ save_dstfldr = cpystr(tmp1);
-+ dstfldr = save_dstfldr;
-+ }
-+ #endif
-+
- if(!is_absolute_path(dstfldr)
- && !(save_context = default_save_context(ps_global->context_list)))
- save_context = ps_global->context_list;
-***************
-*** 7991,7996 ****
---- 8010,8020 ----
- if(we_cancel)
- cancel_busy_cue(buf[0] ? 0 : -1);
-
-+ if(save_dstfldr){
-+ fs_give((void **)&save_dstfldr);
-+ dstfldr = save_dstfldr2;
-+ }
-+
- return(buf[0] != '\0');
- }
-
-diff -rc alpine-2.00/pith/pine.hlp alpine-2.00.maildir/pith/pine.hlp
-*** alpine-2.00/pith/pine.hlp 2008-08-22 19:07:05.000000000 -0500
---- alpine-2.00.maildir/pith/pine.hlp 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 21253,21258 ****
---- 21253,21354 ----
- &lt;End of help on this topic&gt;
- </BODY>
- </HTML>
-+ ====== h_config_maildir_location ======
-+ <HTML>
-+ <HEAD>
-+ <TITLE>OPTION: <!--#echo var="VAR_maildir-location"--></TITLE>
-+ </HEAD>
-+ <BODY>
-+ <H1>OPTION: <!--#echo var="VAR_maildir-location"--></H1>
-+
-+ <P>
-+ This option should be used only if you have a Maildir folder which you
-+ want to use as your INBOX. If this is not your case (or don't know what
-+ this is), you can safely ignore this option.
-+
-+ <P>
-+ This option overrides the default directory Pine uses to find the location of
-+ your INBOX, in case this is in Maildir format. The default value of this
-+ option is "Maildir", but in some systems, this directory could have been
-+ renamed (e.g. to ".maildir"). If this is your case use this option to change
-+ the default.
-+
-+ <P>
-+ The value of this option is prefixed with the "~/" string to determine the
-+ full path to your INBOX.
-+
-+ <P>
-+ You should probably <A HREF="h_config_maildir">read</A> a few tips that
-+ teach you how to configure your maildir for optimal performance. This
-+ version also has <A HREF="h_config_courier_list">support</A> for the
-+ Courier style file system when a maildir collection is accessed locally.
-+
-+ <P><UL>
-+ <LI><A HREF="h_finding_help">Finding more information and requesting help</A>
-+ </UL>
-+ <P>
-+ &lt;End of help on this topic&gt;
-+ </BODY>
-+ </HTML>
-+ ====== h_config_maildir =====
-+ <HTML>
-+ <HEAD>
-+ <TITLE>Maildir Support</TITLE>
-+ </HEAD>
-+ <BODY>
-+ <H1>Maildir Support</H1>
-+
-+ This version of Alpine has been enhanced with Maildir support. This text is
-+ intended to be a reference on its support.
-+ <P>
-+
-+ A Maildir folder is a directory that contains three directories called
-+ cur, tmp and new. A program that delivers mail (e.g. postfix) will put new
-+ mail in the new directory. A program that reads mail will look for for old
-+ messages in the cur directory, while it will look for new mail in the new
-+ directory.
-+ <P>
-+
-+ In order to use maildir support it is better to set your inbox-path to the
-+ value &quot;#md/inbox&quot; (without quotes). This assumes that your mail
-+ delivery agent is delivering new mail to ~/Maildir/new. If the directory
-+ where new mail is being delivered is not called "Maildir", you can set the
-+ name of the subdirectory of home where it is being delivered in the <A
-+ HREF="h_config_maildir_location"><!--#echo var="VAR_maildir-location"--></A> configuration
-+ variable. Most of the time you will not have to worry about the
-+ <!--#echo var="VAR_maildirlocation"--> variable, because it will probably be set by your
-+ administrator in the pine.conf configuration file.
-+ <P>
-+
-+ One of the advantages of the Maildir support of this version of Alpine is
-+ that you do not have to stop using folders in another styles (mbox, mbx,
-+ etc.). This is desirable since the usage of a specific mail storage system
-+ is a personal decision. Folders in the maildir format that are part of the
-+ Mail collection will be recognized without any extra configuration of your
-+ part. If your mail/ collection is located under the mail/ directory, then
-+ creating a new maildir folder in this collection is done by pressing "A"
-+ and entering the string "#driver.md/mail/newfolder". Observe that adding a
-+ new folder as "newfolder" may not create such folder in maildir format.
-+
-+ <P>
-+ If you would like to have all folders created in the maildir format by
-+ default, you do so by adding a Maildir Collection. In order to convert
-+ your current mail/ collection into a maildir collection, edit the
-+ collection and change the path variable from &quot;mail/&quot; to
-+ &quot;#md/mail&quot;. In a maildir collection folders of any other format
-+ are ignored.
-+
-+ <P> Finally, This version also has
-+ <A HREF="h_config_courier_list">support</A> for the Courier style file system
-+ when a maildir collection is accessed locally.
-+
-+ <P>
-+ <UL>
-+ <LI><A HREF="h_finding_help">Finding more information and requesting help</A>
-+ </UL><P>
-+ &lt;End of help on this topic&gt;
-+ </BODY>
-+ </HTML>
- ====== h_config_literal_sig =====
- <HTML>
- <HEAD>
-***************
-*** 29126,29131 ****
---- 29222,29270 ----
- <P>
- &lt;End of help on this topic&gt;
- </BODY>
-+ </HTML>
-+ ====== h_config_courier_list =====
-+ <HTML>
-+ <HEAD>
-+ <TITLE>FEATURE: <!--#echo var="FEAT_courier-folder-list"--></TITLE>
-+ </HEAD>
-+ <BODY>
-+ <H1>FEATURE: <!--#echo var="FEAT_courier-folder-list"--></H1>
-+
-+ In a maildir collection, a folder could be used as a directory to store
-+ folders. In the Courier server if you create a folder, then a directory
-+ with the same name is created. If you use this patch to access a
-+ collection created by the Courier server, then the display of such
-+ collection will look confusing. The best way to access a maildir
-+ collection created by the Courier server is by using the &quot;#mc/&quot;
-+ prefix instead of the &quot;#md/&quot; prefix. If you use this alternate
-+ prefix, then this feature applies to you, otherwise you can safely ignore
-+ the text that follows.
-+ <P>
-+ Depending on if you have enabled the option
-+ <a href="h_config_separate_fold_dir_view"><!--#echo var="FEAT_separate-folder-and-directory-entries"--></a>
-+ a folder may be listed as &quot;folder[.]&quot;, or as two entries in the
-+ list by &quot;folder&quot; and &quot;folder.&quot;.
-+ <P>
-+ If this option is disabled, Pine will list local folders that are in Courier
-+ style format, as &quot;folder&quot;, and those that are also directories as
-+ &quot;folder[.]&quot;. This makes the default display cleaner.
-+ <P>
-+ If this feature is enabled then creating folders in a maildir collection
-+ will create a directory with the same name. If this feature is disabled, then
-+ a folder is considered a directory only if it contains subfolders, so you can
-+ not create a directory with the same name as an exisiting folder unless
-+ you create a subfolder of that folder first (e.g. if you have a folder
-+ called &quot;foo&quot; simply add &quot;foo.bar&quot; directly. This will
-+ create the directory &quot;foo&quot; and the subfolder &quot;bar&quot; of it).
-+ <P>
-+ Observe that this feature works only for maildir collections that are accessed
-+ locally. If a collection is accessed remotely then this feature has no value,
-+ as the report is created in a server, and Pine only reports what received
-+ from the server in this case.
-+ <P>
-+ &lt;End of help on this topic&gt;
-+ </BODY>
- </HTML>
- ====== h_config_verbose_post =====
- <HTML>
-diff -rc alpine-2.00/pith/send.c alpine-2.00.maildir/pith/send.c
-*** alpine-2.00/pith/send.c 2008-08-06 13:25:58.000000000 -0500
---- alpine-2.00.maildir/pith/send.c 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 256,261 ****
---- 256,268 ----
-
- if(exists & FEX_ISFILE){
- context_apply(tmp, p_cntxt, mbox, sizeof(tmp));
-+ #ifndef _WINDOWS
-+ if (!struncmp(tmp, "#md/",4) || !struncmp(tmp, "#mc/", 4)){
-+ char tmp2[MAILTMPLEN];
-+ maildir_file_path(tmp, tmp2);
-+ strcpy(tmp, tmp2);
-+ }
-+ #endif
- if(!(IS_REMOTE(tmp) || is_absolute_path(tmp))){
- /*
- * The mbox is relative to the home directory.
-diff -rc alpine-2.00/README.maildir alpine-2.00.maildir/README.maildir
-*** alpine-2.00/README.maildir 2011-01-24 19:38:50.000000000 -0600
---- alpine-2.00.maildir/README.maildir 2011-01-15 19:11:07.000000000 -0600
-***************
-*** 0 ****
---- 1,153 ----
-+ ---------------------------------------
-+
-+ Maildir Driver for Alpine 1.0
-+ By Eduardo Chappa <chappa@washington.edu>
-+ http://staff.washington.edu/chappa/alpine/
-+
-+ ---------------------------------------
-+ 1. General Information About This Patch
-+ ---------------------------------------
-+
-+ This patch adds support for the maildir format to Alpine. We take the
-+ approach that this patch is one more driver among the number of formats
-+ supported by Alpine (more generally c-client). This approach differs from
-+ older versions of similar patches, in that once a maildir patch was
-+ applied, it was assumed that all your folders would be created in the
-+ maildir format.
-+
-+ This patch does not assume that maildir is a preferred format, instead
-+ puts maildir in equal footing with other formats (mbox, mbx, mix, etc),
-+ and so a maildir folder in the mail/ collection is treated in the same way
-+ as any other folder in any other format. In other words, just by reading
-+ the name of a folder, or opening it, or doing any operation with it, you
-+ can not know in which format the folder is.
-+
-+ This implies that if you want to add a folder in the maildir format to the
-+ mail/ collection, then you must add by pressing "A" in the folder list
-+ collection and enter "#driver.md/mail/name_maildir_folder".
-+
-+ If you only want to use maildir, however, you can do so too. In this case,
-+ you must create a maildir collection. In that collection, only maildir
-+ folders will be listed. If there is any folder in any other format, that
-+ folder will be ignored. In another words, any folder listed there is in
-+ maildir format and can be accessed through that collection, conversely,
-+ any folder not listed there is not in maildir format and there is no way
-+ to access it using this collection.
-+
-+ In order to create a maildir collection, you could press M S L, and "A" to
-+ add a collection. Fill in the required fields as follows:
-+
-+ Nickname : Anything
-+ Server :
-+ Path : #md/relative/path/to/maildir/collection/
-+ View :
-+
-+ For example, if "path" is set to "#md/mail/", then Alpine will look for your
-+ maildir folders that are in ~/mail/.
-+
-+ The code in this patch is mostly based in code for the unix driver plus
-+ some combinations of the mh, mbx and nntp drivers for the c-client
-+ library. Those drivers were designed by Mark Crispin, and bugs in this
-+ code are not his bugs, but my own.
-+
-+ I got all the specification for this patch from
-+ http://cr.yp.to/proto/maildir.html. If you know of a place with a better
-+ specification for maildir format please let me know. The method this patch
-+ uses to create a unique filename for a message is one of the "old
-+ fashioned" methods. I realize that this is old fashioned, but it is
-+ portable, and portability is the main reason why I decided to use an old
-+ fashioned method (most methods are not portable. See the word
-+ "Unfortunately" in that document).
-+
-+ --------------
-+ 2. Other Goals
-+ --------------
-+
-+ It is intended that this code will work well with any application
-+ written using the c-client library. Of paramount importance is to make the
-+ associated imap server work well when the server accesses a folder in
-+ Maildir format. The program mailutil should also work flawlessly with this
-+ implemetation of the driver.
-+
-+ It is intended that this driver be fast and stable. We intend not to
-+ patch Alpine to make this driver do its work, unless such patching is for
-+ fixing bugs in Alpine or to pass parameters to the driver.
-+
-+ ------------------------------------------------------------------------
-+ 3. What are the known bugs of this implementation of the Maildir driver?
-+ ------------------------------------------------------------------------
-+
-+ I don't know any at this time. There have been bugs before, though, but
-+ I try to fix bugs as soon as they are reported. A complete list of updates
-+ for this patch, which includes bug fixes, improvements and addition of new
-+ features can be found at
-+
-+ http://staff.washington.edu/chappa/alpine/updates/maildir.html
-+
-+ ----------
-+ 4. On UIDs
-+ ----------
-+
-+ This patch keeps uids in the name of the file that contains the message,
-+ by adding a ",u=" string to the file name to save the uid of a message. A
-+ file is kept between sessions to save information on the last uid assigned
-+ and its time of validity. Only one session with writing access can write
-+ uids, all others must wait for the other session to assign them. The
-+ session assigning uids creates a ".uidtemp" file which other sessions must
-+ not disturb.
-+
-+ Uid support appeared in Alpine 1.00 (snapshot 925), and is experimental,
-+ please report any problems.
-+
-+ --------------------------------------------
-+ 5. Configuring Alpine and Setting up a Maildir
-+ --------------------------------------------
-+
-+ Once this approach was chosen, it implied the following:
-+
-+ * This patch assumes that your INBOX is located at "$HOME/Maildir".
-+ This is a directory which should have three subdirectories "cur",
-+ "tmp" and "new". Mail is delivered to 'new' and read from 'cur'. I
-+ have added a configuration option "maildir-location" which can be
-+ used to tell Alpine where your Maildir inbox is, in case your system
-+ do not use the above directory (e.g. your system may use
-+ "~/.maildir"). In this case define that variable to be the name of
-+ the directory where your e-mail is being delivered (e.g.
-+ ".maildir").
-+
-+ * If you want to use the above configuration as your inbox, you must
-+ define your inbox-path as "#md/inbox" (no quotes). You can define
-+ the inbox-path like above even if you have changed the
-+ maildir-location variable. That's the whole point of that variable.
-+
-+ -----------------------------------
-+ 6. What about Courier file systems?
-+ -----------------------------------
-+
-+ In a courier file system all folders are subfolders of a root folder
-+ called INBOX. Normally INBOX is located at ~/Maildir and subfolders are
-+ "dot" directories in ~/Maildir. For example ~/Maildir/.Trash is a
-+ subfolder of INBOX and is accessed with the nickname "INBOX.Trash".
-+
-+ You can not access folders in this way unless you preceed them with the
-+ string "#mc/". The purpose of the string "#mc/" is to warn Alpine that a
-+ collection in the Courier format is going to be accessed, so you can
-+ SELECT a folder like "#mc/INBOX.Trash", but not "INBOX.Trash"
-+
-+ You can access a collection through a server, but if you want to access a
-+ collection of folders created using the Courier server, you MUST edit your
-+ ".pinerc" file and enter the definition of the collection as follows:
-+
-+ folder-collections="Anything you want" #mc/INBOX.[]
-+
-+ You can replace the string "#mc/INBOX." by something different, for example
-+ "#mc/Courier/." will make Alpine search for your collection in ~/Courier.
-+
-+ You can not add this directly into Alpine because Alpine fails to accept this
-+ value from its input, but it takes it correctly when it is added through
-+ the ".pinerc" file.
-+
-+ You can access your inbox as "#mc/INBOX" or "#md/INBOX". Both definitions
-+ point to the same place.
-+
-+ Last Updated February 9, 2008
diff --git a/testing/rxvt-unicode/ChangeLog b/testing/rxvt-unicode/ChangeLog
deleted file mode 100644
index d4275a700..000000000
--- a/testing/rxvt-unicode/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2011-05-22 Angel Velasquez <angvp@archlinux.org>
- * Rebuilt against perl 5.14.0
-
-2011-05-17 Angel Velasquez <angvp@archlinux.org>
- * Removed not accepted upstream patch (closes FS#23324)
diff --git a/testing/rxvt-unicode/PKGBUILD b/testing/rxvt-unicode/PKGBUILD
deleted file mode 100644
index a72fa7c11..000000000
--- a/testing/rxvt-unicode/PKGBUILD
+++ /dev/null
@@ -1,53 +0,0 @@
-# $Id: PKGBUILD 124538 2011-05-22 21:23:30Z angvp $
-# Maintainer: Angel Velasquez <angvp@archlinux.org>
-# Contributor: tobias <tobias@archlinux.org>
-# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
-
-pkgname=rxvt-unicode
-pkgver=9.11
-pkgrel=4
-pkgdesc="An unicode enabled rxvt-clone terminal emulator (urxvt)"
-arch=('i686' 'x86_64')
-url="http://software.schmorp.de/pkg/rxvt-unicode.html"
-license=('GPL')
-depends=('gcc-libs' 'libxft' 'gdk-pixbuf2')
-optdepends=('perl: lots of utilities' 'gtk2-perl: to use the urxvt-tabbed')
-changelog=ChangeLog
-source=(http://dist.schmorp.de/rxvt-unicode/${pkgname}-${pkgver}.tar.bz2 \
- ${pkgname}.desktop)
-md5sums=('1bed5bfeed026e0bfafa0e9e4f62aa37'
- '3de6c13126a45bc3bc9f6bba077a1311')
-sha1sums=('21d0fad9a6032dbcf2c43a85f288543c6bd5ab3d'
- '962aebc88982dbeb62a7c4a051ff567e015f61a0')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr \
- --with-terminfo=/usr/share/terminfo \
- --enable-256-color \
- --enable-font-styles \
- --enable-xim \
- --enable-keepscrolling \
- --enable-selectionscrolling \
- --enable-smart-resize \
- --enable-pixbuf \
- --enable-transparency \
- --enable-utmp \
- --enable-wtmp \
- --enable-lastlog \
- --disable-frills
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- install -d "${pkgdir}/usr/share/terminfo"
- export TERMINFO="${pkgdir}/usr/share/terminfo"
- make DESTDIR="${pkgdir}" install
- # install the tabbing wrapper ( requires gtk2-perl! )
- sed -i 's/\"rxvt\"/"urxvt"/' doc/rxvt-tabbed
- install -Dm 755 doc/rxvt-tabbed "${pkgdir}/usr/bin/urxvt-tabbed"
- # install freedesktop menu
- install -Dm644 ../${pkgname}.desktop \
- "${pkgdir}/usr/share/applications/${pkgname}.desktop"
-}
diff --git a/testing/rxvt-unicode/rxvt-unicode.desktop b/testing/rxvt-unicode/rxvt-unicode.desktop
deleted file mode 100644
index 68d613dbd..000000000
--- a/testing/rxvt-unicode/rxvt-unicode.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Encoding=UTF-8
-Name=rxvt-unicode
-Comment=An Unicode capable rxvt clone
-Exec=urxvt
-Icon=terminal
-Terminal=false
-Type=Application
-Categories=Application;System;TerminalEmulator;
diff --git a/testing/spamassassin/PKGBUILD b/testing/spamassassin/PKGBUILD
deleted file mode 100644
index 6b97ea8c1..000000000
--- a/testing/spamassassin/PKGBUILD
+++ /dev/null
@@ -1,54 +0,0 @@
-# $Id: PKGBUILD 125325 2011-05-25 21:40:50Z remy $
-# Maintainer: Dale Blount <dale@archlinux.org>
-# Contributor: Manolis Tzanidakis
-
-pkgname=spamassassin
-pkgver=3.3.1
-pkgrel=5
-pkgdesc="A mail filter to identify spam."
-arch=(i686 x86_64)
-license=(APACHE)
-url="http://spamassassin.apache.org"
-depends=('perl>=5.14' 'perl-net-dns' 'perl-uri' 'perl-html-parser' \
- 'perl-digest-sha1' 'perl-io-socket-ssl' 'openssl' \
- 'perl-libwww' 'perl-mail-spf' \
- 'zlib' 're2c')
- # perl-archive-tar perl-io-zlib)
-makedepends=('razor' 'perl-dbi')
-optdepends=('razor: to identify collaborately-flagged spam'
- 'gnupg: gpg support, without this use --nogpg flag for sa-update'
- 're2c: regexp compiler, for compiling rules with sa-compile')
-backup=(etc/conf.d/spamd etc/mail/spamassassin/local.cf \
- etc/mail/spamassassin/init.pre \
- etc/mail/spamassassin/v310.pre \
- etc/mail/spamassassin/v312.pre \
- etc/mail/spamassassin/v320.pre)
-install=${pkgname}.install
-options=(!emptydirs)
-source=(http://mirrors.devlib.org/apache/${pkgname}/source/Mail-SpamAssassin-${pkgver}.tar.gz \
- spamd.conf.d spamd)
-md5sums=('5a93f81fda315411560ff5da099382d2'
- 'af501c6b0bb937a2775b747cc4b6d150'
- '0534d3071a526a27ddc2b297afa03b04')
-
-build() {
- cd ${srcdir}/Mail-SpamAssassin-${pkgver}
-
- # install module in vendor directories.
- PERL_MM_USE_DEFAULT=1 /usr/bin/perl Makefile.PL INSTALLDIRS=vendor \
- CONTACT_ADDRESS=root@localhost ENABLE_SSL=yes PERL_TAINT=no
- /usr/bin/make
-}
-
-check() {
- cd ${srcdir}/Mail-SpamAssassin-${pkgver}
- /usr/bin/make test || true
-}
-
-package() {
- cd ${srcdir}/Mail-SpamAssassin-${pkgver}
- /usr/bin/make DESTDIR=${pkgdir} install
-
- /bin/install -D -m644 ${srcdir}/spamd.conf.d ${pkgdir}/etc/conf.d/spamd
- /bin/install -D -m755 ${srcdir}/spamd ${pkgdir}/etc/rc.d/spamd
-}
diff --git a/testing/spamassassin/spamassassin.install b/testing/spamassassin/spamassassin.install
deleted file mode 100644
index 5109956c9..000000000
--- a/testing/spamassassin/spamassassin.install
+++ /dev/null
@@ -1,25 +0,0 @@
-# arg 1: the new package version
-post_install() {
- echo "You must run 'sa-update' to install spam rules before use."
- /bin/true
-}
-
-# arg 1: the new package version
-# arg 2: the old package version
-post_upgrade() {
- # Compile rules, if rules have previously been compiled, and it's possible
- if [ -x /usr/bin/re2c -a -x /usr/bin/perlbin/vendor/sa-compile -a -d /var/lib/spamassassin/compiled ]; then
- echo "Detected compiled rules, running sa-compile..."
- sa-compile > /dev/null 2>&1
-fi
-}
-
-# arg 1: the old package version
-pre_remove() {
- /bin/true
-}
-
-# arg 1: the old package version
-post_remove() {
- /bin/true
-}
diff --git a/testing/spamassassin/spamd b/testing/spamassassin/spamd
deleted file mode 100644
index 11d35f7cd..000000000
--- a/testing/spamassassin/spamd
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-
-# source application-specific settings
-[ -f /etc/conf.d/spamd ] && . /etc/conf.d/spamd
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/bin/vendor_perl/spamd`
-case "$1" in
- start)
- stat_busy "Starting spamd"
- [ -z "$PID" ] && /usr/bin/vendor_perl/spamd -d ${SPAMD_OPTS}
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon spamd
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping spamd"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- # Some users report that a second attempt at stopping the process
- # works. So, take a little nap and give it another whirl...
- sleep 2
- kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon spamd
- stat_done
- fi
- else
- rm_daemon spamd
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 3
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
-# vim: ts=2 sw=2 et ft=sh
diff --git a/testing/spamassassin/spamd.conf.d b/testing/spamassassin/spamd.conf.d
deleted file mode 100644
index 4295e0073..000000000
--- a/testing/spamassassin/spamd.conf.d
+++ /dev/null
@@ -1 +0,0 @@
-SPAMD_OPTS="-c"
diff --git a/testing/subversion/PKGBUILD b/testing/subversion/PKGBUILD
deleted file mode 100644
index 19cb12294..000000000
--- a/testing/subversion/PKGBUILD
+++ /dev/null
@@ -1,98 +0,0 @@
-# $Id: PKGBUILD 127222 2011-06-11 09:32:25Z andrea $
-# Maintainer: Paul Mattal <paul@archlinux.org>
-# Contributor: Jason Chu <jason@archlinux.org>
-
-pkgname=subversion
-pkgver=1.6.17
-pkgrel=4
-pkgdesc="Replacement for CVS, another versioning system (SVN)"
-arch=('i686' 'x86_64')
-license=('apache' 'bsd')
-depends=('neon' 'apr-util' 'sqlite3')
-makedepends=('krb5' 'apache' 'python2' 'perl' 'swig' 'ruby' 'java-runtime'
- 'autoconf' 'db' 'e2fsprogs' 'libgnome-keyring' 'kdelibs')
-source=(http://subversion.tigris.org/downloads/$pkgname-$pkgver.tar.bz2
- svnserve svn svnserve.conf svnmerge.py
- subversion.rpath.fix.patch
- subversion.suppress.deprecation.warnings.patch)
-
-backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve')
-url="http://subversion.apache.org/"
-provides=('svn')
-options=('!makeflags' '!libtool')
-optdepends=('libgnome-keyring' 'kdeutils-kwallet' 'bash-completion: for svn bash completion')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- export PYTHON=/usr/bin/python2
-
- # apply patches
- patch -Np0 -i ../subversion.rpath.fix.patch
- patch -Np1 -i ../subversion.suppress.deprecation.warnings.patch
-
- # configure
- autoreconf
- ./configure --prefix=/usr --with-apr=/usr --with-apr-util=/usr \
- --with-zlib=/usr --with-neon=/usr --with-apxs \
- --with-sqlite=/usr --with-berkeley-db=:/usr/include/:/usr/lib:db-5.1 \
- --enable-javahl --with-gnome-keyring --with-kwallet
-
- # build
- (make external-all && make LT_LDFLAGS="-L$Fdestdir/usr/lib" local-all )
-}
-
-#check() {
-# cd "${srcdir}/${pkgname}-${pkgver}"
-# export LANG=C LC_ALL=C
-# make check check-swig-pl check-swig-py CLEANUP=yes
-#}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # install
- export LD_LIBRARY_PATH=${pkgdir}/usr/lib:$LD_LIBRARY_PATH
- make DESTDIR=${pkgdir} install
-
- make DESTDIR=${pkgdir} swig-py
- make install-swig-py DESTDIR=${pkgdir}
-
- install -d ${pkgdir}/usr/lib/python2.7
- mv ${pkgdir}/usr/lib/svn-python/ ${pkgdir}/usr/lib/python2.7/site-packages
-
- install -d ${pkgdir}/usr/share/subversion
- install -d -m 755 tools/hook-scripts ${pkgdir}/usr/share/subversion/
- rm -f ${pkgdir}/usr/share/subversion/hook-scripts/*.in
-
- make DESTDIR=${pkgdir} swig-pl
- make install-swig-pl DESTDIR=${pkgdir} INSTALLDIRS=vendor
- rm -f ${pkgdir}/usr/lib/perl5/vendor_perl/auto/SVN/_Core/.packlist
- rm -rf ${pkgdir}/usr/lib/perl5/core_perl
-
- make DESTDIR=${pkgdir} swig-rb
- make install-swig-rb DESTDIR=${pkgdir}
-
- make DESTDIR=${pkgdir} javahl
- make DESTDIR=${pkgdir} install-javahl
-
- install -d ${pkgdir}/etc/{rc.d,xinetd.d,conf.d}
-
- install -m 755 ${srcdir}/svnserve ${pkgdir}/etc/rc.d
- install -m 644 ${srcdir}/svn ${pkgdir}/etc/xinetd.d
- install -m 644 ${srcdir}/svnserve.conf ${pkgdir}/etc/conf.d/svnserve
- install -m 755 ${srcdir}/svnmerge.py ${pkgdir}/usr/bin/svnmerge
- install -D -m 644 ${srcdir}/subversion-$pkgver/COPYING \
- ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
-
- # bash completion
- install -Dm 644 ${srcdir}/${pkgname}-${pkgver}/tools/client-side/bash_completion \
- ${pkgdir}/etc/bash_completion.d/subversion
-}
-md5sums=('81e5dc5beee4b3fc025ac70c0b6caa14'
- 'a2b029e8385007ffb99b437b30521c90'
- 'a0db6dd43af33952739b6ec089852630'
- 'c459e299192552f61578f3438abf0664'
- 'a6371baeda7e224504629ecdda2749b4'
- '6b4340ba9d8845cd8497e013ae01be3f'
- '1166f3b7413d7e7450299b3525680bbe')
diff --git a/testing/subversion/subversion.rpath.fix.patch b/testing/subversion/subversion.rpath.fix.patch
deleted file mode 100644
index ba6ee9e4e..000000000
--- a/testing/subversion/subversion.rpath.fix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- Makefile.in.orig 2009-02-16 14:10:48.000000000 -0200
-+++ Makefile.in 2009-06-04 00:56:29.000000000 -0300
-@@ -678,6 +678,7 @@
-
- $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
- cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
-+ cd $(SWIG_PL_DIR)/native; sed -i 's|LD_RUN_PATH|DIE_RPATH_DIE|g' Makefile{,.{client,delta,fs,ra,repos,wc}}
-
- swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \
- $(SWIG_PL_DIR)/native/Makefile
diff --git a/testing/subversion/subversion.suppress.deprecation.warnings.patch b/testing/subversion/subversion.suppress.deprecation.warnings.patch
deleted file mode 100644
index 94ce89b18..000000000
--- a/testing/subversion/subversion.suppress.deprecation.warnings.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -urN subversion-1.6.9/subversion/bindings/swig/python/svn/core.py subversion-1.6.9-fixed/subversion/bindings/swig/python/svn/core.py
---- subversion-1.6.9/subversion/bindings/swig/python/svn/core.py 2009-02-13 11:22:26.000000000 -0500
-+++ subversion-1.6.9-fixed/subversion/bindings/swig/python/svn/core.py 2010-02-08 07:46:29.000000000 -0500
-@@ -19,6 +19,7 @@
- from libsvn.core import *
- import libsvn.core as _libsvncore
- import atexit as _atexit
-+import warnings
-
- class SubversionException(Exception):
- def __init__(self, message=None, apr_err=None, child=None,
-@@ -44,7 +45,9 @@
- Exception.__init__(self, *args)
-
- self.apr_err = apr_err
-- self.message = message
-+ with warnings.catch_warnings():
-+ warnings.simplefilter("ignore", DeprecationWarning)
-+ self.message = message
- self.child = child
- self.file = file
- self.line = line
diff --git a/testing/subversion/svn b/testing/subversion/svn
deleted file mode 100644
index 8988aaf63..000000000
--- a/testing/subversion/svn
+++ /dev/null
@@ -1,11 +0,0 @@
-service svn
-{
- flags = REUSE
- socket_type = stream
- wait = no
- user = root
- server = /usr/bin/svnserve
- server_args = -i
- log_on_failure += USERID
- disable = yes
-}
diff --git a/testing/subversion/svnmerge.py b/testing/subversion/svnmerge.py
deleted file mode 100644
index d8931648f..000000000
--- a/testing/subversion/svnmerge.py
+++ /dev/null
@@ -1,2370 +0,0 @@
-#!/usr/bin/env python2
-# -*- coding: utf-8 -*-
-# Copyright (c) 2005, Giovanni Bajo
-# Copyright (c) 2004-2005, Awarix, Inc.
-# All rights reserved.
-#
-# This program is free software; you can 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
-# of the License, or (at your option) any later version.
-#
-# This program 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
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-#
-# Author: Archie Cobbs <archie at awarix dot com>
-# Rewritten in Python by: Giovanni Bajo <rasky at develer dot com>
-#
-# Acknowledgments:
-# John Belmonte <john at neggie dot net> - metadata and usability
-# improvements
-# Blair Zajac <blair at orcaware dot com> - random improvements
-# Raman Gupta <rocketraman at fastmail dot fm> - bidirectional and transitive
-# merging support
-# Dustin J. Mitchell <dustin at zmanda dot com> - support for multiple
-# location identifier formats
-#
-# $HeadURL$
-# $LastChangedDate$
-# $LastChangedBy$
-# $LastChangedRevision$
-#
-# Requisites:
-# svnmerge.py has been tested with all SVN major versions since 1.1 (both
-# client and server). It is unknown if it works with previous versions.
-#
-# Differences from svnmerge.sh:
-# - More portable: tested as working in FreeBSD and OS/2.
-# - Add double-verbose mode, which shows every svn command executed (-v -v).
-# - "svnmerge avail" now only shows commits in source, not also commits in
-# other parts of the repository.
-# - Add "svnmerge block" to flag some revisions as blocked, so that
-# they will not show up anymore in the available list. Added also
-# the complementary "svnmerge unblock".
-# - "svnmerge avail" has grown two new options:
-# -B to display a list of the blocked revisions
-# -A to display both the blocked and the available revisions.
-# - Improved generated commit message to make it machine parsable even when
-# merging commits which are themselves merges.
-# - Add --force option to skip working copy check
-# - Add --record-only option to "svnmerge merge" to avoid performing
-# an actual merge, yet record that a merge happened.
-# - Can use a variety of location-identifier formats
-#
-# TODO:
-# - Add "svnmerge avail -R": show logs in reverse order
-#
-# Information for Hackers:
-#
-# Identifiers for branches:
-# A branch is identified in three ways within this source:
-# - as a working copy (variable name usually includes 'dir')
-# - as a fully qualified URL
-# - as a path identifier (an opaque string indicating a particular path
-# in a particular repository; variable name includes 'pathid')
-# A "target" is generally user-specified, and may be a working copy or
-# a URL.
-
-import sys, os, getopt, re, types, tempfile, time, locale
-from bisect import bisect
-from xml.dom import pulldom
-
-NAME = "svnmerge"
-if not hasattr(sys, "version_info") or sys.version_info < (2, 0):
- error("requires Python 2.0 or newer")
-
-# Set up the separator used to separate individual log messages from
-# each revision merged into the target location. Also, create a
-# regular expression that will find this same separator in already
-# committed log messages, so that the separator used for this run of
-# svnmerge.py will have one more LOG_SEPARATOR appended to the longest
-# separator found in all the commits.
-LOG_SEPARATOR = 8 * '.'
-LOG_SEPARATOR_RE = re.compile('^((%s)+)' % re.escape(LOG_SEPARATOR),
- re.MULTILINE)
-
-# Each line of the embedded log messages will be prefixed by LOG_LINE_PREFIX.
-LOG_LINE_PREFIX = 2 * ' '
-
-# Set python to the default locale as per environment settings, same as svn
-# TODO we should really parse config and if log-encoding is specified, set
-# the locale to match that encoding
-locale.setlocale(locale.LC_ALL, '')
-
-# We want the svn output (such as svn info) to be non-localized
-# Using LC_MESSAGES should not affect localized output of svn log, for example
-if os.environ.has_key("LC_ALL"):
- del os.environ["LC_ALL"]
-os.environ["LC_MESSAGES"] = "C"
-
-###############################################################################
-# Support for older Python versions
-###############################################################################
-
-# True/False constants are Python 2.2+
-try:
- True, False
-except NameError:
- True, False = 1, 0
-
-def lstrip(s, ch):
- """Replacement for str.lstrip (support for arbitrary chars to strip was
- added in Python 2.2.2)."""
- i = 0
- try:
- while s[i] == ch:
- i = i+1
- return s[i:]
- except IndexError:
- return ""
-
-def rstrip(s, ch):
- """Replacement for str.rstrip (support for arbitrary chars to strip was
- added in Python 2.2.2)."""
- try:
- if s[-1] != ch:
- return s
- i = -2
- while s[i] == ch:
- i = i-1
- return s[:i+1]
- except IndexError:
- return ""
-
-def strip(s, ch):
- """Replacement for str.strip (support for arbitrary chars to strip was
- added in Python 2.2.2)."""
- return lstrip(rstrip(s, ch), ch)
-
-def rsplit(s, sep, maxsplits=0):
- """Like str.rsplit, which is Python 2.4+ only."""
- L = s.split(sep)
- if not 0 < maxsplits <= len(L):
- return L
- return [sep.join(L[0:-maxsplits])] + L[-maxsplits:]
-
-###############################################################################
-
-def kwextract(s):
- """Extract info from a svn keyword string."""
- try:
- return strip(s, "$").strip().split(": ")[1]
- except IndexError:
- return "<unknown>"
-
-__revision__ = kwextract('$Rev$')
-__date__ = kwextract('$Date$')
-
-# Additional options, not (yet?) mapped to command line flags
-default_opts = {
- "svn": "svn",
- "prop": NAME + "-integrated",
- "block-prop": NAME + "-blocked",
- "commit-verbose": True,
- "verbose": 0,
-}
-logs = {}
-
-def console_width():
- """Get the width of the console screen (if any)."""
- try:
- return int(os.environ["COLUMNS"])
- except (KeyError, ValueError):
- pass
-
- try:
- # Call the Windows API (requires ctypes library)
- from ctypes import windll, create_string_buffer
- h = windll.kernel32.GetStdHandle(-11)
- csbi = create_string_buffer(22)
- res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi)
- if res:
- import struct
- (bufx, bufy,
- curx, cury, wattr,
- left, top, right, bottom,
- maxx, maxy) = struct.unpack("hhhhHhhhhhh", csbi.raw)
- return right - left + 1
- except ImportError:
- pass
-
- # Parse the output of stty -a
- if os.isatty(1):
- out = os.popen("stty -a").read()
- m = re.search(r"columns (\d+);", out)
- if m:
- return int(m.group(1))
-
- # sensible default
- return 80
-
-def error(s):
- """Subroutine to output an error and bail."""
- print >> sys.stderr, "%s: %s" % (NAME, s)
- sys.exit(1)
-
-def report(s):
- """Subroutine to output progress message, unless in quiet mode."""
- if opts["verbose"]:
- print "%s: %s" % (NAME, s)
-
-def prefix_lines(prefix, lines):
- """Given a string representing one or more lines of text, insert the
- specified prefix at the beginning of each line, and return the result.
- The input must be terminated by a newline."""
- assert lines[-1] == "\n"
- return prefix + lines[:-1].replace("\n", "\n"+prefix) + "\n"
-
-def recode_stdout_to_file(s):
- if locale.getdefaultlocale()[1] is None or not hasattr(sys.stdout, "encoding") \
- or sys.stdout.encoding is None:
- return s
- u = s.decode(sys.stdout.encoding)
- return u.encode(locale.getdefaultlocale()[1])
-
-class LaunchError(Exception):
- """Signal a failure in execution of an external command. Parameters are the
- exit code of the process, the original command line, and the output of the
- command."""
-
-try:
- """Launch a sub-process. Return its output (both stdout and stderr),
- optionally split by lines (if split_lines is True). Raise a LaunchError
- exception if the exit code of the process is non-zero (failure).
-
- This function has two implementations, one based on subprocess (preferred),
- and one based on popen (for compatibility).
- """
- import subprocess
- import shlex
-
- def launch(cmd, split_lines=True):
- # Requiring python 2.4 or higher, on some platforms we get
- # much faster performance from the subprocess module (where python
- # doesn't try to close an exhorbitant number of file descriptors)
- stdout = ""
- stderr = ""
- try:
- if os.name == 'nt':
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, \
- close_fds=False, stderr=subprocess.PIPE)
- else:
- # Use shlex to break up the parameters intelligently,
- # respecting quotes. shlex can't handle unicode.
- args = shlex.split(cmd.encode('ascii'))
- p = subprocess.Popen(args, stdout=subprocess.PIPE, \
- close_fds=False, stderr=subprocess.PIPE)
- stdoutAndErr = p.communicate()
- stdout = stdoutAndErr[0]
- stderr = stdoutAndErr[1]
- except OSError, inst:
- # Using 1 as failure code; should get actual number somehow? For
- # examples see svnmerge_test.py's TestCase_launch.test_failure and
- # TestCase_launch.test_failurecode.
- raise LaunchError(1, cmd, stdout + " " + stderr + ": " + str(inst))
-
- if p.returncode == 0:
- if split_lines:
- # Setting keepends=True for compatibility with previous logic
- # (where file.readlines() preserves newlines)
- return stdout.splitlines(True)
- else:
- return stdout
- else:
- raise LaunchError(p.returncode, cmd, stdout + stderr)
-except ImportError:
- # support versions of python before 2.4 (slower on some systems)
- def launch(cmd, split_lines=True):
- if os.name not in ['nt', 'os2']:
- import popen2
- p = popen2.Popen4(cmd)
- p.tochild.close()
- if split_lines:
- out = p.fromchild.readlines()
- else:
- out = p.fromchild.read()
- ret = p.wait()
- if ret == 0:
- ret = None
- else:
- ret >>= 8
- else:
- i,k = os.popen4(cmd)
- i.close()
- if split_lines:
- out = k.readlines()
- else:
- out = k.read()
- ret = k.close()
-
- if ret is None:
- return out
- raise LaunchError(ret, cmd, out)
-
-def launchsvn(s, show=False, pretend=False, **kwargs):
- """Launch SVN and grab its output."""
- username = password = configdir = ""
- if opts.get("username", None):
- username = "--username=" + opts["username"]
- if opts.get("password", None):
- password = "--password=" + opts["password"]
- if opts.get("config-dir", None):
- configdir = "--config-dir=" + opts["config-dir"]
- cmd = ' '.join(filter(None, [opts["svn"], "--non-interactive",
- username, password, configdir, s]))
- if show or opts["verbose"] >= 2:
- print cmd
- if pretend:
- return None
- return launch(cmd, **kwargs)
-
-def svn_command(s):
- """Do (or pretend to do) an SVN command."""
- out = launchsvn(s, show=opts["show-changes"] or opts["dry-run"],
- pretend=opts["dry-run"],
- split_lines=False)
- if not opts["dry-run"]:
- print out
-
-def check_dir_clean(dir):
- """Check the current status of dir for local mods."""
- if opts["force"]:
- report('skipping status check because of --force')
- return
- report('checking status of "%s"' % dir)
-
- # Checking with -q does not show unversioned files or external
- # directories. Though it displays a debug message for external
- # directories, after a blank line. So, practically, the first line
- # matters: if it's non-empty there is a modification.
- out = launchsvn("status -q %s" % dir)
- if out and out[0].strip():
- error('"%s" has local modifications; it must be clean' % dir)
-
-class PathIdentifier:
- """Abstraction for a path identifier, so that we can start talking
- about it before we know the form that it takes in the properties (its
- external_form). Objects are referenced in the class variable 'locobjs',
- keyed by all known forms."""
-
- # a map of UUID (or None) to repository root URL.
- repo_hints = {}
-
- # a map from any known string form to the corresponding PathIdentifier
- locobjs = {}
-
- def __init__(self, repo_relative_path, uuid=None, url=None, external_form=None):
- self.repo_relative_path = repo_relative_path
- self.uuid = uuid
- self.url = url
- self.external_form = external_form
-
- def __repr__(self):
- return "<PathIdentifier " + ', '.join('%s=%r' % i for i in self.__dict__.items()) + '>'
-
- def __str__(self):
- """Return a printable string representation"""
- if self.external_form:
- return self.external_form
- if self.url:
- return self.format('url')
- if self.uuid:
- return self.format('uuid')
- return self.format('path')
-
- def from_pathid(pathid_str):
- """convert pathid_str to a PathIdentifier"""
- if not PathIdentifier.locobjs.has_key(pathid_str):
- if is_url(pathid_str):
- # we can determine every form; PathIdentifier.hint knows how to do that
- PathIdentifier.hint(pathid_str)
- elif pathid_str[:7] == 'uuid://':
- mo = re.match('uuid://([^/]*)(.*)', pathid_str)
- if not mo:
- error("Invalid path identifier '%s'" % pathid_str)
- uuid, repo_relative_path = mo.groups()
- pathid = PathIdentifier(repo_relative_path, uuid=uuid)
- # we can cache this by uuid:// pathid and by repo-relative path
- PathIdentifier.locobjs[pathid_str] = PathIdentifier.locobjs[repo_relative_path] = pathid
- elif pathid_str and pathid_str[0] == '/':
- # strip any trailing slashes
- pathid_str = pathid_str.rstrip('/')
- pathid = PathIdentifier(repo_relative_path=pathid_str)
- # we can only cache this by repo-relative path
- PathIdentifier.locobjs[pathid_str] = pathid
- else:
- error("Invalid path identifier '%s'" % pathid_str)
- return PathIdentifier.locobjs[pathid_str]
- from_pathid = staticmethod(from_pathid)
-
- def from_target(target):
- """Convert a target (either a working copy path or an URL) into a
- path identifier."""
- # prime the cache first if we don't know about this target yet
- if not PathIdentifier.locobjs.has_key(target):
- PathIdentifier.hint(target)
-
- try:
- return PathIdentifier.locobjs[target]
- except KeyError:
- error("Could not recognize path identifier '%s'" % target)
- from_target = staticmethod(from_target)
-
- def hint(target):
- """Cache some information about target, as it may be referenced by
- repo-relative path in subversion properties; the cache can help to
- expand such a relative path to a full path identifier."""
- if PathIdentifier.locobjs.has_key(target): return
- if not is_url(target) and not is_wc(target): return
-
- url = target_to_url(target)
-
- root = get_repo_root(url)
- assert root[-1] != "/"
- assert url[:len(root)] == root, "url=%r, root=%r" % (url, root)
- repo_relative_path = url[len(root):]
-
- try:
- uuid = get_svninfo(target)['Repository UUID']
- uuid_pathid = 'uuid://%s%s' % (uuid, repo_relative_path)
- except KeyError:
- uuid = None
- uuid_pathid = None
-
- locobj = PathIdentifier.locobjs.get(url) or \
- (uuid_pathid and PathIdentifier.locobjs.get(uuid_pathid))
- if not locobj:
- locobj = PathIdentifier(repo_relative_path, uuid=uuid, url=url)
-
- PathIdentifier.repo_hints[uuid] = root # (uuid may be None)
-
- PathIdentifier.locobjs[target] = locobj
- PathIdentifier.locobjs[url] = locobj
- if uuid_pathid:
- PathIdentifier.locobjs[uuid_pathid] = locobj
- if not PathIdentifier.locobjs.has_key(repo_relative_path):
- PathIdentifier.locobjs[repo_relative_path] = locobj
- hint = staticmethod(hint)
-
- def format(self, fmt):
- if fmt == 'path':
- return self.repo_relative_path
- elif fmt == 'uuid':
- return "uuid://%s%s" % (self.uuid, self.repo_relative_path)
- elif fmt == 'url':
- return self.url
- else:
- error("Unkonwn path type '%s'" % fmt)
-
- def match_substring(self, str):
- """Test whether str is a substring of any representation of this
- PathIdentifier."""
- if self.repo_relative_path.find(str) >= 0:
- return True
-
- if self.uuid:
- if ("uuid://%s%s" % (self.uuid, self.repo_relative_path)).find(str) >= 0:
- return True
-
- if self.url:
- if (self.url + self.repo_relative_path).find(str) >= 0:
- return True
-
- return False
-
- def get_url(self):
- """Convert a pathid into a URL. If this is not possible, error out."""
- if self.url:
- return self.url
- # if we have a uuid and happen to know the URL for it, use that
- elif self.uuid and PathIdentifier.repo_hints.has_key(self.uuid):
- self.url = PathIdentifier.repo_hints[self.uuid] + self.repo_relative_path
- PathIdentifier.locobjs[self.url] = self
- return self.url
- # if we've only seen one rep, use that (a guess, but an educated one)
- elif not self.uuid and len(PathIdentifier.repo_hints) == 1:
- uuid, root = PathIdentifier.repo_hints.items()[0]
- if uuid:
- self.uuid = uuid
- PathIdentifier.locobjs['uuid://%s%s' % (uuid, self.repo_relative_path)] = self
- self.url = root + self.repo_relative_path
- PathIdentifier.locobjs[self.url] = self
- report("Guessing that '%s' refers to '%s'" % (self, self.url))
- return self.url
- else:
- error("Cannot determine URL for '%s'; " % self +
- "Explicit source argument (-S/--source) required.\n")
-
-class RevisionLog:
- """
- A log of the revisions which affected a given URL between two
- revisions.
- """
-
- def __init__(self, url, begin, end, find_propchanges=False):
- """
- Create a new RevisionLog object, which stores, in self.revs, a list
- of the revisions which affected the specified URL between begin and
- end. If find_propchanges is True, self.propchange_revs will contain a
- list of the revisions which changed properties directly on the
- specified URL. URL must be the URL for a directory in the repository.
- """
- self.url = url
-
- # Setup the log options (--quiet, so we don't show log messages)
- log_opts = '--xml --quiet -r%s:%s "%s"' % (begin, end, url)
- if find_propchanges:
- # The --verbose flag lets us grab merge tracking information
- # by looking at propchanges
- log_opts = "--verbose " + log_opts
-
- # Read the log to look for revision numbers and merge-tracking info
- self.revs = []
- self.propchange_revs = []
- repos_pathid = PathIdentifier.from_target(url)
- for chg in SvnLogParser(launchsvn("log %s" % log_opts,
- split_lines=False)):
- self.revs.append(chg.revision())
- for p in chg.paths():
- if p.action() == 'M' and p.pathid() == repos_pathid.repo_relative_path:
- self.propchange_revs.append(chg.revision())
-
- # Save the range of the log
- self.begin = int(begin)
- if end == "HEAD":
- # If end is not provided, we do not know which is the latest
- # revision in the repository. So we set 'end' to the latest
- # known revision.
- self.end = self.revs[-1]
- else:
- self.end = int(end)
-
- self._merges = None
- self._blocks = None
-
- def merge_metadata(self):
- """
- Return a VersionedProperty object, with a cached view of the merge
- metadata in the range of this log.
- """
-
- # Load merge metadata if necessary
- if not self._merges:
- self._merges = VersionedProperty(self.url, opts["prop"])
- self._merges.load(self)
-
- return self._merges
-
- def block_metadata(self):
- if not self._blocks:
- self._blocks = VersionedProperty(self.url, opts["block-prop"])
- self._blocks.load(self)
-
- return self._blocks
-
-
-class VersionedProperty:
- """
- A read-only, cached view of a versioned property.
-
- self.revs contains a list of the revisions in which the property changes.
- self.values stores the new values at each corresponding revision. If the
- value of the property is unknown, it is set to None.
-
- Initially, we set self.revs to [0] and self.values to [None]. This
- indicates that, as of revision zero, we know nothing about the value of
- the property.
-
- Later, if you run self.load(log), we cache the value of this property over
- the entire range of the log by noting each revision in which the property
- was changed. At the end of the range of the log, we invalidate our cache
- by adding the value "None" to our cache for any revisions which fall out
- of the range of our log.
-
- Once self.revs and self.values are filled, we can find the value of the
- property at any arbitrary revision using a binary search on self.revs.
- Once we find the last revision during which the property was changed,
- we can lookup the associated value in self.values. (If the associated
- value is None, the associated value was not cached and we have to do
- a full propget.)
-
- An example: We know that the 'svnmerge' property was added in r10, and
- changed in r21. We gathered log info up until r40.
-
- revs = [0, 10, 21, 40]
- values = [None, "val1", "val2", None]
-
- What these values say:
- - From r0 to r9, we know nothing about the property.
- - In r10, the property was set to "val1". This property stayed the same
- until r21, when it was changed to "val2".
- - We don't know what happened after r40.
- """
-
- def __init__(self, url, name):
- """View the history of a versioned property at URL with name"""
- self.url = url
- self.name = name
-
- # We know nothing about the value of the property. Setup revs
- # and values to indicate as such.
- self.revs = [0]
- self.values = [None]
-
- # We don't have any revisions cached
- self._initial_value = None
- self._changed_revs = []
- self._changed_values = []
-
- def load(self, log):
- """
- Load the history of property changes from the specified
- RevisionLog object.
- """
-
- # Get the property value before the range of the log
- if log.begin > 1:
- self.revs.append(log.begin-1)
- try:
- self._initial_value = self.raw_get(log.begin-1)
- except LaunchError:
- # The specified URL might not exist before the
- # range of the log. If so, we can safely assume
- # that the property was empty at that time.
- self._initial_value = { }
- self.values.append(self._initial_value)
- else:
- self._initial_value = { }
- self.values[0] = self._initial_value
-
- # Cache the property values in the log range
- old_value = self._initial_value
- for rev in log.propchange_revs:
- new_value = self.raw_get(rev)
- if new_value != old_value:
- self._changed_revs.append(rev)
- self._changed_values.append(new_value)
- self.revs.append(rev)
- self.values.append(new_value)
- old_value = new_value
-
- # Indicate that we know nothing about the value of the property
- # after the range of the log.
- if log.revs:
- self.revs.append(log.end+1)
- self.values.append(None)
-
- def raw_get(self, rev=None):
- """
- Get the property at revision REV. If rev is not specified, get
- the property at revision HEAD.
- """
- return get_revlist_prop(self.url, self.name, rev)
-
- def get(self, rev=None):
- """
- Get the property at revision REV. If rev is not specified, get
- the property at revision HEAD.
- """
-
- if rev is not None:
-
- # Find the index using a binary search
- i = bisect(self.revs, rev) - 1
-
- # Return the value of the property, if it was cached
- if self.values[i] is not None:
- return self.values[i]
-
- # Get the current value of the property
- return self.raw_get(rev)
-
- def changed_revs(self, key=None):
- """
- Get a list of the revisions in which the specified dictionary
- key was changed in this property. If key is not specified,
- return a list of revisions in which any key was changed.
- """
- if key is None:
- return self._changed_revs
- else:
- changed_revs = []
- old_val = self._initial_value
- for rev, val in zip(self._changed_revs, self._changed_values):
- if val.get(key) != old_val.get(key):
- changed_revs.append(rev)
- old_val = val
- return changed_revs
-
- def initialized_revs(self):
- """
- Get a list of the revisions in which keys were added or
- removed in this property.
- """
- initialized_revs = []
- old_len = len(self._initial_value)
- for rev, val in zip(self._changed_revs, self._changed_values):
- if len(val) != old_len:
- initialized_revs.append(rev)
- old_len = len(val)
- return initialized_revs
-
-class RevisionSet:
- """
- A set of revisions, held in dictionary form for easy manipulation. If we
- were to rewrite this script for Python 2.3+, we would subclass this from
- set (or UserSet). As this class does not include branch
- information, it's assumed that one instance will be used per
- branch.
- """
- def __init__(self, parm):
- """Constructs a RevisionSet from a string in property form, or from
- a dictionary whose keys are the revisions. Raises ValueError if the
- input string is invalid."""
-
- self._revs = {}
-
- revision_range_split_re = re.compile('[-:]')
-
- if isinstance(parm, types.DictType):
- self._revs = parm.copy()
- elif isinstance(parm, types.ListType):
- for R in parm:
- self._revs[int(R)] = 1
- else:
- parm = parm.strip()
- if parm:
- for R in parm.split(","):
- rev_or_revs = re.split(revision_range_split_re, R)
- if len(rev_or_revs) == 1:
- self._revs[int(rev_or_revs[0])] = 1
- elif len(rev_or_revs) == 2:
- for rev in range(int(rev_or_revs[0]),
- int(rev_or_revs[1])+1):
- self._revs[rev] = 1
- else:
- raise ValueError, 'Ill formatted revision range: ' + R
-
- def sorted(self):
- revnums = self._revs.keys()
- revnums.sort()
- return revnums
-
- def normalized(self):
- """Returns a normalized version of the revision set, which is an
- ordered list of couples (start,end), with the minimum number of
- intervals."""
- revnums = self.sorted()
- revnums.reverse()
- ret = []
- while revnums:
- s = e = revnums.pop()
- while revnums and revnums[-1] in (e, e+1):
- e = revnums.pop()
- ret.append((s, e))
- return ret
-
- def __str__(self):
- """Convert the revision set to a string, using its normalized form."""
- L = []
- for s,e in self.normalized():
- if s == e:
- L.append(str(s))
- else:
- L.append(str(s) + "-" + str(e))
- return ",".join(L)
-
- def __contains__(self, rev):
- return self._revs.has_key(rev)
-
- def __sub__(self, rs):
- """Compute subtraction as in sets."""
- revs = {}
- for r in self._revs.keys():
- if r not in rs:
- revs[r] = 1
- return RevisionSet(revs)
-
- def __and__(self, rs):
- """Compute intersections as in sets."""
- revs = {}
- for r in self._revs.keys():
- if r in rs:
- revs[r] = 1
- return RevisionSet(revs)
-
- def __nonzero__(self):
- return len(self._revs) != 0
-
- def __len__(self):
- """Return the number of revisions in the set."""
- return len(self._revs)
-
- def __iter__(self):
- return iter(self.sorted())
-
- def __or__(self, rs):
- """Compute set union."""
- revs = self._revs.copy()
- revs.update(rs._revs)
- return RevisionSet(revs)
-
-def merge_props_to_revision_set(merge_props, pathid):
- """A converter which returns a RevisionSet instance containing the
- revisions from PATH as known to BRANCH_PROPS. BRANCH_PROPS is a
- dictionary of pathid -> revision set branch integration information
- (as returned by get_merge_props())."""
- if not merge_props.has_key(pathid):
- error('no integration info available for path "%s"' % pathid)
- return RevisionSet(merge_props[pathid])
-
-def dict_from_revlist_prop(propvalue):
- """Given a property value as a string containing per-source revision
- lists, return a dictionary whose key is a source path identifier
- and whose value is the revisions for that source."""
- prop = {}
-
- # Multiple sources are separated by any whitespace.
- for L in propvalue.split():
- # We use rsplit to play safe and allow colons in pathids.
- pathid_str, revs = rsplit(L.strip(), ":", 1)
-
- pathid = PathIdentifier.from_pathid(pathid_str)
-
- # cache the "external" form we saw
- pathid.external_form = pathid_str
-
- prop[pathid] = revs
- return prop
-
-def get_revlist_prop(url_or_dir, propname, rev=None):
- """Given a repository URL or working copy path and a property
- name, extract the values of the property which store per-source
- revision lists and return a dictionary whose key is a source path
- identifier, and whose value is the revisions for that source."""
-
- # Note that propget does not return an error if the property does
- # not exist, it simply does not output anything. So we do not need
- # to check for LaunchError here.
- args = '--strict "%s" "%s"' % (propname, url_or_dir)
- if rev:
- args = '-r %s %s' % (rev, args)
- out = launchsvn('propget %s' % args, split_lines=False)
-
- return dict_from_revlist_prop(out)
-
-def get_merge_props(dir):
- """Extract the merged revisions."""
- return get_revlist_prop(dir, opts["prop"])
-
-def get_block_props(dir):
- """Extract the blocked revisions."""
- return get_revlist_prop(dir, opts["block-prop"])
-
-def get_blocked_revs(dir, source_pathid):
- p = get_block_props(dir)
- if p.has_key(source_pathid):
- return RevisionSet(p[source_pathid])
- return RevisionSet("")
-
-def format_merge_props(props, sep=" "):
- """Formats the hash PROPS as a string suitable for use as a
- Subversion property value."""
- assert sep in ["\t", "\n", " "] # must be a whitespace
- props = props.items()
- props.sort()
- L = []
- for h, r in props:
- L.append("%s:%s" % (h, r))
- return sep.join(L)
-
-def _run_propset(dir, prop, value):
- """Set the property 'prop' of directory 'dir' to value 'value'. We go
- through a temporary file to not run into command line length limits."""
- try:
- fd, fname = tempfile.mkstemp()
- f = os.fdopen(fd, "wb")
- except AttributeError:
- # Fallback for Python <= 2.3 which does not have mkstemp (mktemp
- # suffers from race conditions. Not that we care...)
- fname = tempfile.mktemp()
- f = open(fname, "wb")
-
- try:
- f.write(value)
- f.close()
- report("property data written to temp file: %s" % value)
- svn_command('propset "%s" -F "%s" "%s"' % (prop, fname, dir))
- finally:
- os.remove(fname)
-
-def set_props(dir, name, props):
- props = format_merge_props(props)
- if props:
- _run_propset(dir, name, props)
- else:
- # Check if NAME exists on DIR before trying to delete it.
- # As of 1.6 propdel no longer supports deleting a
- # non-existent property.
- out = launchsvn('propget "%s" "%s"' % (name, dir))
- if out:
- svn_command('propdel "%s" "%s"' % (name, dir))
-
-def set_merge_props(dir, props):
- set_props(dir, opts["prop"], props)
-
-def set_block_props(dir, props):
- set_props(dir, opts["block-prop"], props)
-
-def set_blocked_revs(dir, source_pathid, revs):
- props = get_block_props(dir)
- if revs:
- props[source_pathid] = str(revs)
- elif props.has_key(source_pathid):
- del props[source_pathid]
- set_block_props(dir, props)
-
-def is_url(url):
- """Check if url looks like a valid url."""
- return re.search(r"^[a-zA-Z][-+\.\w]*://[^\s]+$", url) is not None and url[:4] != 'uuid'
-
-def check_url(url):
- """Similar to is_url, but actually invoke get_svninfo to find out"""
- return get_svninfo(url) != {}
-
-def is_pathid(pathid):
- return isinstance(pathid, PathIdentifier)
-
-def is_wc(dir):
- """Check if a directory is a working copy."""
- return os.path.isdir(os.path.join(dir, ".svn")) or \
- os.path.isdir(os.path.join(dir, "_svn"))
-
-_cache_svninfo = {}
-def get_svninfo(target):
- """Extract the subversion information for a target (through 'svn info').
- This function uses an internal cache to let clients query information
- many times."""
- if _cache_svninfo.has_key(target):
- return _cache_svninfo[target]
- info = {}
- for L in launchsvn('info "%s"' % target):
- L = L.strip()
- if not L:
- continue
- key, value = L.split(": ", 1)
- info[key] = value.strip()
- _cache_svninfo[target] = info
- return info
-
-def target_to_url(target):
- """Convert working copy path or repos URL to a repos URL."""
- if is_wc(target):
- info = get_svninfo(target)
- return info["URL"]
- return target
-
-_cache_reporoot = {}
-def get_repo_root(target):
- """Compute the root repos URL given a working-copy path, or a URL."""
- # Try using "svn info WCDIR". This works only on SVN clients >= 1.3
- if not is_url(target):
- try:
- info = get_svninfo(target)
- root = info["Repository Root"]
- _cache_reporoot[root] = None
- return root
- except KeyError:
- pass
- url = target_to_url(target)
- assert url[-1] != '/'
- else:
- url = target
-
- # Go through the cache of the repository roots. This avoids extra
- # server round-trips if we are asking the root of different URLs
- # in the same repository (the cache in get_svninfo() cannot detect
- # that of course and would issue a remote command).
- assert is_url(url)
- for r in _cache_reporoot:
- if url.startswith(r):
- return r
-
- # Try using "svn info URL". This works only on SVN clients >= 1.2
- try:
- info = get_svninfo(url)
- # info may be {}, in which case we'll see KeyError here
- root = info["Repository Root"]
- _cache_reporoot[root] = None
- return root
- except (KeyError, LaunchError):
- pass
-
- # Constrained to older svn clients, we are stuck with this ugly
- # trial-and-error implementation. It could be made faster with a
- # binary search.
- while url:
- temp = os.path.dirname(url)
- try:
- launchsvn('proplist "%s"' % temp)
- except LaunchError:
- _cache_reporoot[url] = None
- return rstrip(url, "/")
- url = temp
-
- error("svn repos root of %s not found" % target)
-
-class SvnLogParser:
- """
- Parse the "svn log", going through the XML output and using pulldom (which
- would even allow streaming the command output).
- """
- def __init__(self, xml):
- self._events = pulldom.parseString(xml)
- def __getitem__(self, idx):
- for event, node in self._events:
- if event == pulldom.START_ELEMENT and node.tagName == "logentry":
- self._events.expandNode(node)
- return self.SvnLogRevision(node)
- raise IndexError, "Could not find 'logentry' tag in xml"
-
- class SvnLogRevision:
- def __init__(self, xmlnode):
- self.n = xmlnode
- def revision(self):
- return int(self.n.getAttribute("revision"))
- def author(self):
- return self.n.getElementsByTagName("author")[0].firstChild.data
- def paths(self):
- return [self.SvnLogPath(n)
- for n in self.n.getElementsByTagName("path")]
-
- class SvnLogPath:
- def __init__(self, xmlnode):
- self.n = xmlnode
- def action(self):
- return self.n.getAttribute("action")
- def pathid(self):
- return self.n.firstChild.data
- def copyfrom_rev(self):
- try: return self.n.getAttribute("copyfrom-rev")
- except KeyError: return None
- def copyfrom_pathid(self):
- try: return self.n.getAttribute("copyfrom-path")
- except KeyError: return None
-
-def get_copyfrom(target):
- """Get copyfrom info for a given target (it represents the
- repository-relative path from where it was branched). NOTE:
- repos root has no copyfrom info. In this case None is returned.
-
- Returns the:
- - source file or directory from which the copy was made
- - revision from which that source was copied
- - revision in which the copy was committed
- """
- repos_path = PathIdentifier.from_target(target).repo_relative_path
- for chg in SvnLogParser(launchsvn('log -v --xml --stop-on-copy "%s"'
- % target, split_lines=False)):
- for p in chg.paths():
- if p.action() == 'A' and p.pathid() == repos_path:
- # These values will be None if the corresponding elements are
- # not found in the log.
- return p.copyfrom_pathid(), p.copyfrom_rev(), chg.revision()
- return None,None,None
-
-def get_latest_rev(url):
- """Get the latest revision of the repository of which URL is part."""
- try:
- info = get_svninfo(url)
- if not info.has_key("Revision"):
- error("Not a valid URL: %s" % url)
- return info["Revision"]
- except LaunchError:
- # Alternative method for latest revision checking (for svn < 1.2)
- report('checking latest revision of "%s"' % url)
- L = launchsvn('proplist --revprop -r HEAD "%s"' % opts["source-url"])[0]
- rev = re.search("revision (\d+)", L).group(1)
- report('latest revision of "%s" is %s' % (url, rev))
- return rev
-
-def get_created_rev(url):
- """Lookup the revision at which the path identified by the
- provided URL was first created."""
- oldest_rev = -1
- report('determining oldest revision for URL "%s"' % url)
- ### TODO: Refactor this to use a modified RevisionLog class.
- lines = None
- cmd = "log -r1:HEAD --stop-on-copy -q " + url
- try:
- lines = launchsvn(cmd + " --limit=1")
- except LaunchError:
- # Assume that --limit isn't supported by the installed 'svn'.
- lines = launchsvn(cmd)
- if lines and len(lines) > 1:
- i = lines[1].find(" ")
- if i != -1:
- oldest_rev = int(lines[1][1:i])
- if oldest_rev == -1:
- error('unable to determine oldest revision for URL "%s"' % url)
- return oldest_rev
-
-def get_commit_log(url, revnum):
- """Return the log message for a specific integer revision
- number."""
- out = launchsvn("log --incremental -r%d %s" % (revnum, url))
- return recode_stdout_to_file("".join(out[1:]))
-
-def construct_merged_log_message(url, revnums):
- """Return a commit log message containing all the commit messages
- in the specified revisions at the given URL. The separator used
- in this log message is determined by searching for the longest
- svnmerge separator existing in the commit log messages and
- extending it by one more separator. This results in a new commit
- log message that is clearer in describing merges that contain
- other merges. Trailing newlines are removed from the embedded
- log messages."""
- messages = ['']
- longest_sep = ''
- for r in revnums.sorted():
- message = get_commit_log(url, r)
- if message:
- message = re.sub(r'(\r\n|\r|\n)', "\n", message)
- message = rstrip(message, "\n") + "\n"
- messages.append(prefix_lines(LOG_LINE_PREFIX, message))
- for match in LOG_SEPARATOR_RE.findall(message):
- sep = match[1]
- if len(sep) > len(longest_sep):
- longest_sep = sep
-
- longest_sep += LOG_SEPARATOR + "\n"
- messages.append('')
- return longest_sep.join(messages)
-
-def get_default_source(branch_target, branch_props):
- """Return the default source for branch_target (given its branch_props).
- Error out if there is ambiguity."""
- if not branch_props:
- error("no integration info available")
-
- props = branch_props.copy()
- pathid = PathIdentifier.from_target(branch_target)
-
- # To make bidirectional merges easier, find the target's
- # repository local path so it can be removed from the list of
- # possible integration sources.
- if props.has_key(pathid):
- del props[pathid]
-
- if len(props) > 1:
- err_msg = "multiple sources found. "
- err_msg += "Explicit source argument (-S/--source) required.\n"
- err_msg += "The merge sources available are:"
- for prop in props:
- err_msg += "\n " + str(prop)
- error(err_msg)
-
- return props.keys()[0]
-
-def should_find_reflected(branch_dir):
- should_find_reflected = opts["bidirectional"]
-
- # If the source has integration info for the target, set find_reflected
- # even if --bidirectional wasn't specified
- if not should_find_reflected:
- source_props = get_merge_props(opts["source-url"])
- should_find_reflected = source_props.has_key(PathIdentifier.from_target(branch_dir))
-
- return should_find_reflected
-
-def analyze_revs(target_pathid, url, begin=1, end=None,
- find_reflected=False):
- """For the source of the merges in the source URL being merged into
- target_pathid, analyze the revisions in the interval begin-end (which
- defaults to 1-HEAD), to find out which revisions are changes in
- the url, which are changes elsewhere (so-called 'phantom'
- revisions), optionally which are reflected changes (to avoid
- conflicts that can occur when doing bidirectional merging between
- branches), and which revisions initialize merge tracking against other
- branches. Return a tuple of four RevisionSet's:
- (real_revs, phantom_revs, reflected_revs, initialized_revs).
-
- NOTE: To maximize speed, if "end" is not provided, the function is
- not able to find phantom revisions following the last real
- revision in the URL.
- """
-
- begin = str(begin)
- if end is None:
- end = "HEAD"
- else:
- end = str(end)
- if long(begin) > long(end):
- return RevisionSet(""), RevisionSet(""), \
- RevisionSet(""), RevisionSet("")
-
- logs[url] = RevisionLog(url, begin, end, find_reflected)
- revs = RevisionSet(logs[url].revs)
-
- if end == "HEAD":
- # If end is not provided, we do not know which is the latest revision
- # in the repository. So return the phantom revision set only up to
- # the latest known revision.
- end = str(list(revs)[-1])
-
- phantom_revs = RevisionSet("%s-%s" % (begin, end)) - revs
-
- if find_reflected:
- reflected_revs = logs[url].merge_metadata().changed_revs(target_pathid)
- reflected_revs += logs[url].block_metadata().changed_revs(target_pathid)
- else:
- reflected_revs = []
-
- initialized_revs = RevisionSet(logs[url].merge_metadata().initialized_revs())
- reflected_revs = RevisionSet(reflected_revs)
-
- return revs, phantom_revs, reflected_revs, initialized_revs
-
-def analyze_source_revs(branch_target, source_url, **kwargs):
- """For the given branch and source, extract the real and phantom
- source revisions."""
- branch_url = target_to_url(branch_target)
- branch_pathid = PathIdentifier.from_target(branch_target)
-
- # Extract the latest repository revision from the URL of the branch
- # directory (which is already cached at this point).
- end_rev = get_latest_rev(source_url)
-
- # Calculate the base of analysis. If there is a "1-XX" interval in the
- # merged_revs, we do not need to check those.
- base = 1
- r = opts["merged-revs"].normalized()
- if r and r[0][0] == 1:
- base = r[0][1] + 1
-
- # See if the user filtered the revision set. If so, we are not
- # interested in something outside that range.
- if opts["revision"]:
- revs = RevisionSet(opts["revision"]).sorted()
- if base < revs[0]:
- base = revs[0]
- if end_rev > revs[-1]:
- end_rev = revs[-1]
-
- return analyze_revs(branch_pathid, source_url, base, end_rev, **kwargs)
-
-def minimal_merge_intervals(revs, phantom_revs):
- """Produce the smallest number of intervals suitable for merging. revs
- is the RevisionSet which we want to merge, and phantom_revs are phantom
- revisions which can be used to concatenate intervals, thus minimizing the
- number of operations."""
- revnums = revs.normalized()
- ret = []
-
- cur = revnums.pop()
- while revnums:
- next = revnums.pop()
- assert next[1] < cur[0] # otherwise it is not ordered
- assert cur[0] - next[1] > 1 # otherwise it is not normalized
- for i in range(next[1]+1, cur[0]):
- if i not in phantom_revs:
- ret.append(cur)
- cur = next
- break
- else:
- cur = (next[0], cur[1])
-
- ret.append(cur)
- ret.reverse()
- return ret
-
-def display_revisions(revs, display_style, revisions_msg, source_url):
- """Show REVS as dictated by DISPLAY_STYLE, either numerically, in
- log format, or as diffs. When displaying revisions numerically,
- prefix output with REVISIONS_MSG when in verbose mode. Otherwise,
- request logs or diffs using SOURCE_URL."""
- if display_style == "revisions":
- if revs:
- report(revisions_msg)
- print revs
- elif display_style == "logs":
- for start,end in revs.normalized():
- svn_command('log --incremental -v -r %d:%d %s' % \
- (start, end, source_url))
- elif display_style in ("diffs", "summarize"):
- if display_style == 'summarize':
- summarize = '--summarize '
- else:
- summarize = ''
-
- for start, end in revs.normalized():
- print
- if start == end:
- print "%s: changes in revision %d follow" % (NAME, start)
- else:
- print "%s: changes in revisions %d-%d follow" % (NAME,
- start, end)
- print
-
- # Note: the starting revision number to 'svn diff' is
- # NOT inclusive so we have to subtract one from ${START}.
- svn_command("diff -r %d:%d %s %s" % (start - 1, end, summarize,
- source_url))
- else:
- assert False, "unhandled display style: %s" % display_style
-
-def action_init(target_dir, target_props):
- """Initialize for merges."""
- # Check that directory is ready for being modified
- check_dir_clean(target_dir)
-
- target_pathid = PathIdentifier.from_target(target_dir)
- source_pathid = opts['source-pathid']
- if source_pathid == target_pathid:
- error("cannot init integration source path '%s'\nIts path identifier does not "
- "differ from the path identifier of the current directory, '%s'."
- % (source_pathid, target_pathid))
-
- source_url = opts['source-url']
-
- # If the user hasn't specified the revisions to use, see if the
- # "source" is a copy from the current tree and if so, we can use
- # the version data obtained from it.
- revision_range = opts["revision"]
- if not revision_range:
- # If source was originally copied from target, and we are merging
- # changes from source to target (the copy target is the merge source,
- # and the copy source is the merge target), then we want to mark as
- # integrated up to the rev in which the copy was committed which
- # created the merge source:
- cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(source_url)
-
- cf_pathid = None
- if cf_source:
- cf_url = get_repo_root(source_url) + cf_source
- if is_url(cf_url) and check_url(cf_url):
- cf_pathid = PathIdentifier.from_target(cf_url)
-
- if target_pathid == cf_pathid:
- report('the source "%s" was copied from "%s" in rev %s and committed in rev %s' %
- (source_url, target_dir, cf_rev, copy_committed_in_rev))
- revision_range = "1-" + str(copy_committed_in_rev)
-
- if not revision_range:
- # If the reverse is true: copy source is the merge source, and
- # the copy target is the merge target, then we want to mark as
- # integrated up to the specific rev of the merge target from
- # which the merge source was copied. (Longer discussion at:
- # http://subversion.tigris.org/issues/show_bug.cgi?id=2810 )
- cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(target_dir)
-
- cf_pathid = None
- if cf_source:
- cf_url = get_repo_root(target_dir) + cf_source
- if is_url(cf_url) and check_url(cf_url):
- cf_pathid = PathIdentifier.from_target(cf_url)
-
- source_pathid = PathIdentifier.from_target(source_url)
- if source_pathid == cf_pathid:
- report('the target "%s" was copied the source "%s" in rev %s and committed in rev %s' %
- (target_dir, source_url, cf_rev, copy_committed_in_rev))
- revision_range = "1-" + cf_rev
-
- # When neither the merge source nor target is a copy of the other, and
- # the user did not specify a revision range, then choose a default which is
- # the current revision; saying, in effect, "everything has been merged, so
- # mark as integrated up to the latest rev on source url).
- if not revision_range:
- revision_range = "1-" + get_latest_rev(source_url)
-
- revs = RevisionSet(revision_range)
-
- report('marking "%s" as already containing revisions "%s" of "%s"' %
- (target_dir, revs, source_url))
-
- revs = str(revs)
- # If the local svnmerge-integrated property already has an entry
- # for the source-pathid, simply error out.
- if not opts["force"] and target_props.has_key(source_pathid):
- error('Repository-relative path %s has already been initialized at %s\n'
- 'Use --force to re-initialize' % (source_pathid, target_dir))
- # set the pathid's external_form based on the user's options
- source_pathid.external_form = source_pathid.format(opts['location-type'])
-
- revs = str(revs)
- target_props[source_pathid] = revs
-
- # Set property
- set_merge_props(target_dir, target_props)
-
- # Write out commit message if desired
- if opts["commit-file"]:
- f = open(opts["commit-file"], "w")
- print >>f, 'Initialized merge tracking via "%s" with revisions "%s" from ' \
- % (NAME, revs)
- print >>f, '%s' % source_url
- f.close()
- report('wrote commit message to "%s"' % opts["commit-file"])
-
-def action_avail(branch_dir, branch_props):
- """Show commits available for merges."""
- source_revs, phantom_revs, reflected_revs, initialized_revs = \
- analyze_source_revs(branch_dir, opts["source-url"],
- find_reflected=
- should_find_reflected(branch_dir))
- report('skipping phantom revisions: %s' % phantom_revs)
- if reflected_revs:
- report('skipping reflected revisions: %s' % reflected_revs)
- report('skipping initialized revisions: %s' % initialized_revs)
-
- blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"])
- avail_revs = source_revs - opts["merged-revs"] - blocked_revs - \
- reflected_revs - initialized_revs
-
- # Compose the set of revisions to show
- revs = RevisionSet("")
- report_msg = "revisions available to be merged are:"
- if "avail" in opts["avail-showwhat"]:
- revs |= avail_revs
- if "blocked" in opts["avail-showwhat"]:
- revs |= blocked_revs
- report_msg = "revisions blocked are:"
-
- # Limit to revisions specified by -r (if any)
- if opts["revision"]:
- revs = revs & RevisionSet(opts["revision"])
-
- display_revisions(revs, opts["avail-display"],
- report_msg,
- opts["source-url"])
-
-def action_integrated(branch_dir, branch_props):
- """Show change sets already merged. This set of revisions is
- calculated from taking svnmerge-integrated property from the
- branch, and subtracting any revision older than the branch
- creation revision."""
- # Extract the integration info for the branch_dir
- branch_props = get_merge_props(branch_dir)
- revs = merge_props_to_revision_set(branch_props, opts["source-pathid"])
-
- # Lookup the oldest revision on the branch path.
- oldest_src_rev = get_created_rev(opts["source-url"])
-
- # Subtract any revisions which pre-date the branch.
- report("subtracting revisions which pre-date the source URL (%d)" %
- oldest_src_rev)
- revs = revs - RevisionSet(range(1, oldest_src_rev))
-
- # Limit to revisions specified by -r (if any)
- if opts["revision"]:
- revs = revs & RevisionSet(opts["revision"])
-
- display_revisions(revs, opts["integrated-display"],
- "revisions already integrated are:", opts["source-url"])
-
-def action_merge(branch_dir, branch_props):
- """Record merge meta data, and do the actual merge (if not
- requested otherwise via --record-only)."""
- # Check branch directory is ready for being modified
- check_dir_clean(branch_dir)
-
- source_revs, phantom_revs, reflected_revs, initialized_revs = \
- analyze_source_revs(branch_dir, opts["source-url"],
- find_reflected=
- should_find_reflected(branch_dir))
-
- if opts["revision"]:
- revs = RevisionSet(opts["revision"])
- else:
- revs = source_revs
-
- blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"])
- merged_revs = opts["merged-revs"]
-
- # Show what we're doing
- if opts["verbose"]: # just to avoid useless calculations
- if merged_revs & revs:
- report('"%s" already contains revisions %s' % (branch_dir,
- merged_revs & revs))
- if phantom_revs:
- report('memorizing phantom revision(s): %s' % phantom_revs)
- if reflected_revs:
- report('memorizing reflected revision(s): %s' % reflected_revs)
- if blocked_revs & revs:
- report('skipping blocked revisions(s): %s' % (blocked_revs & revs))
- if initialized_revs:
- report('skipping initialized revision(s): %s' % initialized_revs)
-
- # Compute final merge set.
- revs = revs - merged_revs - blocked_revs - reflected_revs - \
- phantom_revs - initialized_revs
- if not revs:
- report('no revisions to merge, exiting')
- return
-
- # When manually marking revisions as merged, we only update the
- # integration meta data, and don't perform an actual merge.
- record_only = opts["record-only"]
-
- if record_only:
- report('recording merge of revision(s) %s from "%s"' %
- (revs, opts["source-url"]))
- else:
- report('merging in revision(s) %s from "%s"' %
- (revs, opts["source-url"]))
-
- # Do the merge(s). Note: the starting revision number to 'svn merge'
- # is NOT inclusive so we have to subtract one from start.
- # We try to keep the number of merge operations as low as possible,
- # because it is faster and reduces the number of conflicts.
- old_block_props = get_block_props(branch_dir)
- merge_metadata = logs[opts["source-url"]].merge_metadata()
- block_metadata = logs[opts["source-url"]].block_metadata()
- for start,end in minimal_merge_intervals(revs, phantom_revs):
- if not record_only:
- # Preset merge/blocked properties to the source value at
- # the start rev to avoid spurious property conflicts
- set_merge_props(branch_dir, merge_metadata.get(start - 1))
- set_block_props(branch_dir, block_metadata.get(start - 1))
- # Do the merge
- svn_command("merge --force -r %d:%d %s %s" % \
- (start - 1, end, opts["source-url"], branch_dir))
- # TODO: to support graph merging, add logic to merge the property
- # meta-data manually
-
- # Update the set of merged revisions.
- merged_revs = merged_revs | revs | reflected_revs | phantom_revs | initialized_revs
- branch_props[opts["source-pathid"]] = str(merged_revs)
- set_merge_props(branch_dir, branch_props)
- # Reset the blocked revs
- set_block_props(branch_dir, old_block_props)
-
- # Write out commit message if desired
- if opts["commit-file"]:
- f = open(opts["commit-file"], "w")
- if record_only:
- print >>f, 'Recorded merge of revisions %s via %s from ' % \
- (revs, NAME)
- else:
- print >>f, 'Merged revisions %s via %s from ' % \
- (revs, NAME)
- print >>f, '%s' % opts["source-url"]
- if opts["commit-verbose"]:
- print >>f
- print >>f, construct_merged_log_message(opts["source-url"], revs),
-
- f.close()
- report('wrote commit message to "%s"' % opts["commit-file"])
-
-def action_block(branch_dir, branch_props):
- """Block revisions."""
- # Check branch directory is ready for being modified
- check_dir_clean(branch_dir)
-
- source_revs, phantom_revs, reflected_revs, initialized_revs = \
- analyze_source_revs(branch_dir, opts["source-url"])
- revs_to_block = source_revs - opts["merged-revs"]
-
- # Limit to revisions specified by -r (if any)
- if opts["revision"]:
- revs_to_block = RevisionSet(opts["revision"]) & revs_to_block
-
- if not revs_to_block:
- error('no available revisions to block')
-
- # Change blocked information
- blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"])
- blocked_revs = blocked_revs | revs_to_block
- set_blocked_revs(branch_dir, opts["source-pathid"], blocked_revs)
-
- # Write out commit message if desired
- if opts["commit-file"]:
- f = open(opts["commit-file"], "w")
- print >>f, 'Blocked revisions %s via %s' % (revs_to_block, NAME)
- if opts["commit-verbose"]:
- print >>f
- print >>f, construct_merged_log_message(opts["source-url"],
- revs_to_block),
-
- f.close()
- report('wrote commit message to "%s"' % opts["commit-file"])
-
-def action_unblock(branch_dir, branch_props):
- """Unblock revisions."""
- # Check branch directory is ready for being modified
- check_dir_clean(branch_dir)
-
- blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"])
- revs_to_unblock = blocked_revs
-
- # Limit to revisions specified by -r (if any)
- if opts["revision"]:
- revs_to_unblock = revs_to_unblock & RevisionSet(opts["revision"])
-
- if not revs_to_unblock:
- error('no available revisions to unblock')
-
- # Change blocked information
- blocked_revs = blocked_revs - revs_to_unblock
- set_blocked_revs(branch_dir, opts["source-pathid"], blocked_revs)
-
- # Write out commit message if desired
- if opts["commit-file"]:
- f = open(opts["commit-file"], "w")
- print >>f, 'Unblocked revisions %s via %s' % (revs_to_unblock, NAME)
- if opts["commit-verbose"]:
- print >>f
- print >>f, construct_merged_log_message(opts["source-url"],
- revs_to_unblock),
- f.close()
- report('wrote commit message to "%s"' % opts["commit-file"])
-
-def action_rollback(branch_dir, branch_props):
- """Rollback previously integrated revisions."""
-
- # Make sure the revision arguments are present
- if not opts["revision"]:
- error("The '-r' option is mandatory for rollback")
-
- # Check branch directory is ready for being modified
- check_dir_clean(branch_dir)
-
- # Extract the integration info for the branch_dir
- branch_props = get_merge_props(branch_dir)
- # Get the list of all revisions already merged into this source-pathid.
- merged_revs = merge_props_to_revision_set(branch_props,
- opts["source-pathid"])
-
- # At which revision was the src created?
- oldest_src_rev = get_created_rev(opts["source-url"])
- src_pre_exist_range = RevisionSet("1-%d" % oldest_src_rev)
-
- # Limit to revisions specified by -r (if any)
- revs = merged_revs & RevisionSet(opts["revision"])
-
- # make sure there's some revision to rollback
- if not revs:
- report("Nothing to rollback in revision range r%s" % opts["revision"])
- return
-
- # If even one specified revision lies outside the lifetime of the
- # merge source, error out.
- if revs & src_pre_exist_range:
- err_str = "Specified revision range falls out of the rollback range.\n"
- err_str += "%s was created at r%d" % (opts["source-pathid"],
- oldest_src_rev)
- error(err_str)
-
- record_only = opts["record-only"]
-
- if record_only:
- report('recording rollback of revision(s) %s from "%s"' %
- (revs, opts["source-url"]))
- else:
- report('rollback of revision(s) %s from "%s"' %
- (revs, opts["source-url"]))
-
- # Do the reverse merge(s). Note: the starting revision number
- # to 'svn merge' is NOT inclusive so we have to subtract one from start.
- # We try to keep the number of merge operations as low as possible,
- # because it is faster and reduces the number of conflicts.
- rollback_intervals = minimal_merge_intervals(revs, [])
- # rollback in the reverse order of merge
- rollback_intervals.reverse()
- for start, end in rollback_intervals:
- if not record_only:
- # Do the merge
- svn_command("merge --force -r %d:%d %s %s" % \
- (end, start - 1, opts["source-url"], branch_dir))
-
- # Write out commit message if desired
- # calculate the phantom revs first
- if opts["commit-file"]:
- f = open(opts["commit-file"], "w")
- if record_only:
- print >>f, 'Recorded rollback of revisions %s via %s from ' % \
- (revs , NAME)
- else:
- print >>f, 'Rolled back revisions %s via %s from ' % \
- (revs , NAME)
- print >>f, '%s' % opts["source-url"]
-
- f.close()
- report('wrote commit message to "%s"' % opts["commit-file"])
-
- # Update the set of merged revisions.
- merged_revs = merged_revs - revs
- branch_props[opts["source-pathid"]] = str(merged_revs)
- set_merge_props(branch_dir, branch_props)
-
-def action_uninit(branch_dir, branch_props):
- """Uninit SOURCE URL."""
- # Check branch directory is ready for being modified
- check_dir_clean(branch_dir)
-
- # If the source-pathid does not have an entry in the svnmerge-integrated
- # property, simply error out.
- if not branch_props.has_key(opts["source-pathid"]):
- error('Repository-relative path "%s" does not contain merge '
- 'tracking information for "%s"' \
- % (opts["source-pathid"], branch_dir))
-
- del branch_props[opts["source-pathid"]]
-
- # Set merge property with the selected source deleted
- set_merge_props(branch_dir, branch_props)
-
- # Set blocked revisions for the selected source to None
- set_blocked_revs(branch_dir, opts["source-pathid"], None)
-
- # Write out commit message if desired
- if opts["commit-file"]:
- f = open(opts["commit-file"], "w")
- print >>f, 'Removed merge tracking for "%s" for ' % NAME
- print >>f, '%s' % opts["source-url"]
- f.close()
- report('wrote commit message to "%s"' % opts["commit-file"])
-
-###############################################################################
-# Command line parsing -- options and commands management
-###############################################################################
-
-class OptBase:
- def __init__(self, *args, **kwargs):
- self.help = kwargs["help"]
- del kwargs["help"]
- self.lflags = []
- self.sflags = []
- for a in args:
- if a.startswith("--"): self.lflags.append(a)
- elif a.startswith("-"): self.sflags.append(a)
- else:
- raise TypeError, "invalid flag name: %s" % a
- if kwargs.has_key("dest"):
- self.dest = kwargs["dest"]
- del kwargs["dest"]
- else:
- if not self.lflags:
- raise TypeError, "cannot deduce dest name without long options"
- self.dest = self.lflags[0][2:]
- if kwargs:
- raise TypeError, "invalid keyword arguments: %r" % kwargs.keys()
- def repr_flags(self):
- f = self.sflags + self.lflags
- r = f[0]
- for fl in f[1:]:
- r += " [%s]" % fl
- return r
-
-class Option(OptBase):
- def __init__(self, *args, **kwargs):
- self.default = kwargs.setdefault("default", 0)
- del kwargs["default"]
- self.value = kwargs.setdefault("value", None)
- del kwargs["value"]
- OptBase.__init__(self, *args, **kwargs)
- def apply(self, state, value):
- assert value == ""
- if self.value is not None:
- state[self.dest] = self.value
- else:
- state[self.dest] += 1
-
-class OptionArg(OptBase):
- def __init__(self, *args, **kwargs):
- self.default = kwargs["default"]
- del kwargs["default"]
- self.metavar = kwargs.setdefault("metavar", None)
- del kwargs["metavar"]
- OptBase.__init__(self, *args, **kwargs)
-
- if self.metavar is None:
- if self.dest is not None:
- self.metavar = self.dest.upper()
- else:
- self.metavar = "arg"
- if self.default:
- self.help += " (default: %s)" % self.default
- def apply(self, state, value):
- assert value is not None
- state[self.dest] = value
- def repr_flags(self):
- r = OptBase.repr_flags(self)
- return r + " " + self.metavar
-
-class CommandOpts:
- class Cmd:
- def __init__(self, *args):
- self.name, self.func, self.usage, self.help, self.opts = args
- def short_help(self):
- return self.help.split(".")[0]
- def __str__(self):
- return self.name
- def __call__(self, *args, **kwargs):
- return self.func(*args, **kwargs)
-
- def __init__(self, global_opts, common_opts, command_table, version=None):
- self.progname = NAME
- self.version = version.replace("%prog", self.progname)
- self.cwidth = console_width() - 2
- self.ctable = command_table.copy()
- self.gopts = global_opts[:]
- self.copts = common_opts[:]
- self._add_builtins()
- for k in self.ctable.keys():
- cmd = self.Cmd(k, *self.ctable[k])
- opts = []
- for o in cmd.opts:
- if isinstance(o, types.StringType) or \
- isinstance(o, types.UnicodeType):
- o = self._find_common(o)
- opts.append(o)
- cmd.opts = opts
- self.ctable[k] = cmd
-
- def _add_builtins(self):
- self.gopts.append(
- Option("-h", "--help", help="show help for this command and exit"))
- if self.version is not None:
- self.gopts.append(
- Option("-V", "--version", help="show version info and exit"))
- self.ctable["help"] = (self._cmd_help,
- "help [COMMAND]",
- "Display help for a specific command. If COMMAND is omitted, "
- "display brief command description.",
- [])
-
- def _cmd_help(self, cmd=None, *args):
- if args:
- self.error("wrong number of arguments", "help")
- if cmd is not None:
- cmd = self._command(cmd)
- self.print_command_help(cmd)
- else:
- self.print_command_list()
-
- def _paragraph(self, text, width=78):
- chunks = re.split("\s+", text.strip())
- chunks.reverse()
- lines = []
- while chunks:
- L = chunks.pop()
- while chunks and len(L) + len(chunks[-1]) + 1 <= width:
- L += " " + chunks.pop()
- lines.append(L)
- return lines
-
- def _paragraphs(self, text, *args, **kwargs):
- pars = text.split("\n\n")
- lines = self._paragraph(pars[0], *args, **kwargs)
- for p in pars[1:]:
- lines.append("")
- lines.extend(self._paragraph(p, *args, **kwargs))
- return lines
-
- def _print_wrapped(self, text, indent=0):
- text = self._paragraphs(text, self.cwidth - indent)
- print text.pop(0)
- for t in text:
- print " " * indent + t
-
- def _find_common(self, fl):
- for o in self.copts:
- if fl in o.lflags+o.sflags:
- return o
- assert False, fl
-
- def _compute_flags(self, opts, check_conflicts=True):
- back = {}
- sfl = ""
- lfl = []
- for o in opts:
- sapp = lapp = ""
- if isinstance(o, OptionArg):
- sapp, lapp = ":", "="
- for s in o.sflags:
- if check_conflicts and back.has_key(s):
- raise RuntimeError, "option conflict: %s" % s
- back[s] = o
- sfl += s[1:] + sapp
- for l in o.lflags:
- if check_conflicts and back.has_key(l):
- raise RuntimeError, "option conflict: %s" % l
- back[l] = o
- lfl.append(l[2:] + lapp)
- return sfl, lfl, back
-
- def _extract_command(self, args):
- """
- Try to extract the command name from the argument list. This is
- non-trivial because we want to allow command-specific options even
- before the command itself.
- """
- opts = self.gopts[:]
- for cmd in self.ctable.values():
- opts.extend(cmd.opts)
- sfl, lfl, _ = self._compute_flags(opts, check_conflicts=False)
-
- lopts,largs = getopt.getopt(args, sfl, lfl)
- if not largs:
- return None
- return self._command(largs[0])
-
- def _fancy_getopt(self, args, opts, state=None):
- if state is None:
- state= {}
- for o in opts:
- if not state.has_key(o.dest):
- state[o.dest] = o.default
-
- sfl, lfl, back = self._compute_flags(opts)
- try:
- lopts,args = getopt.gnu_getopt(args, sfl, lfl)
- except AttributeError:
- # Before Python 2.3, there was no gnu_getopt support.
- # So we can't parse intermixed positional arguments
- # and options.
- lopts,args = getopt.getopt(args, sfl, lfl)
-
- for o,v in lopts:
- back[o].apply(state, v)
- return state, args
-
- def _command(self, cmd):
- if not self.ctable.has_key(cmd):
- self.error("unknown command: '%s'" % cmd)
- return self.ctable[cmd]
-
- def parse(self, args):
- if not args:
- self.print_small_help()
- sys.exit(0)
-
- cmd = None
- try:
- cmd = self._extract_command(args)
- opts = self.gopts[:]
- if cmd:
- opts.extend(cmd.opts)
- args.remove(cmd.name)
- state, args = self._fancy_getopt(args, opts)
- except getopt.GetoptError, e:
- self.error(e, cmd)
-
- # Handle builtins
- if self.version is not None and state["version"]:
- self.print_version()
- sys.exit(0)
- if state["help"]: # special case for --help
- if cmd:
- self.print_command_help(cmd)
- sys.exit(0)
- cmd = self.ctable["help"]
- else:
- if cmd is None:
- self.error("command argument required")
- if str(cmd) == "help":
- cmd(*args)
- sys.exit(0)
- return cmd, args, state
-
- def error(self, s, cmd=None):
- print >>sys.stderr, "%s: %s" % (self.progname, s)
- if cmd is not None:
- self.print_command_help(cmd)
- else:
- self.print_small_help()
- sys.exit(1)
- def print_small_help(self):
- print "Type '%s help' for usage" % self.progname
- def print_usage_line(self):
- print "usage: %s <subcommand> [options...] [args...]\n" % self.progname
- def print_command_list(self):
- print "Available commands (use '%s help COMMAND' for more details):\n" \
- % self.progname
- cmds = self.ctable.keys()
- cmds.sort()
- indent = max(map(len, cmds))
- for c in cmds:
- h = self.ctable[c].short_help()
- print " %-*s " % (indent, c),
- self._print_wrapped(h, indent+6)
- def print_command_help(self, cmd):
- cmd = self.ctable[str(cmd)]
- print 'usage: %s %s\n' % (self.progname, cmd.usage)
- self._print_wrapped(cmd.help)
- def print_opts(opts, self=self):
- if not opts: return
- flags = [o.repr_flags() for o in opts]
- indent = max(map(len, flags))
- for f,o in zip(flags, opts):
- print " %-*s :" % (indent, f),
- self._print_wrapped(o.help, indent+5)
- print '\nCommand options:'
- print_opts(cmd.opts)
- print '\nGlobal options:'
- print_opts(self.gopts)
-
- def print_version(self):
- print self.version
-
-###############################################################################
-# Options and Commands description
-###############################################################################
-
-global_opts = [
- Option("-F", "--force",
- help="force operation even if the working copy is not clean, or "
- "there are pending updates"),
- Option("-n", "--dry-run",
- help="don't actually change anything, just pretend; "
- "implies --show-changes"),
- Option("-s", "--show-changes",
- help="show subversion commands that make changes"),
- Option("-v", "--verbose",
- help="verbose mode: output more information about progress"),
- OptionArg("-u", "--username",
- default=None,
- help="invoke subversion commands with the supplied username"),
- OptionArg("-p", "--password",
- default=None,
- help="invoke subversion commands with the supplied password"),
- OptionArg("-c", "--config-dir", metavar="DIR",
- default=None,
- help="cause subversion commands to consult runtime config directory DIR"),
-]
-
-common_opts = [
- Option("-b", "--bidirectional",
- value=True,
- default=False,
- help="remove reflected and initialized revisions from merge candidates. "
- "Not required but may be specified to speed things up slightly"),
- OptionArg("-f", "--commit-file", metavar="FILE",
- default="svnmerge-commit-message.txt",
- help="set the name of the file where the suggested log message "
- "is written to"),
- Option("-M", "--record-only",
- value=True,
- default=False,
- help="do not perform an actual merge of the changes, yet record "
- "that a merge happened"),
- OptionArg("-r", "--revision",
- metavar="REVLIST",
- default="",
- help="specify a revision list, consisting of revision numbers "
- 'and ranges separated by commas, e.g., "534,537-539,540"'),
- OptionArg("-S", "--source", "--head",
- default=None,
- help="specify a merge source for this branch. It can be either "
- "a working directory path, a full URL, or an unambiguous "
- "substring of one of the locations for which merge tracking was "
- "already initialized. Needed only to disambiguate in case of "
- "multiple merge sources"),
-]
-
-command_table = {
- "init": (action_init,
- "init [OPTION...] [SOURCE]",
- """Initialize merge tracking from SOURCE on the current working
- directory.
-
- If SOURCE is specified, all the revisions in SOURCE are marked as already
- merged; if this is not correct, you can use --revision to specify the
- exact list of already-merged revisions.
-
- If SOURCE is omitted, then it is computed from the "svn cp" history of the
- current working directory (searching back for the branch point); in this
- case, %s assumes that no revision has been integrated yet since
- the branch point (unless you teach it with --revision).""" % NAME,
- [
- "-f", "-r", # import common opts
- OptionArg("-L", "--location-type",
- dest="location-type",
- default="path",
- help="Use this type of location identifier in the new " +
- "Subversion properties; 'uuid', 'url', or 'path' " +
- "(default)"),
- ]),
-
- "avail": (action_avail,
- "avail [OPTION...] [PATH]",
- """Show unmerged revisions available for PATH as a revision list.
- If --revision is given, the revisions shown will be limited to those
- also specified in the option.
-
- When svnmerge is used to bidirectionally merge changes between a
- branch and its source, it is necessary to not merge the same changes
- forth and back: e.g., if you committed a merge of a certain
- revision of the branch into the source, you do not want that commit
- to appear as available to merged into the branch (as the code
- originated in the branch itself!). svnmerge will automatically
- exclude these so-called "reflected" revisions.""",
- [
- Option("-A", "--all",
- dest="avail-showwhat",
- value=["blocked", "avail"],
- default=["avail"],
- help="show both available and blocked revisions (aka ignore "
- "blocked revisions)"),
- "-b",
- Option("-B", "--blocked",
- dest="avail-showwhat",
- value=["blocked"],
- help="show the blocked revision list (see '%s block')" % NAME),
- Option("-d", "--diff",
- dest="avail-display",
- value="diffs",
- default="revisions",
- help="show corresponding diff instead of revision list"),
- Option("--summarize",
- dest="avail-display",
- value="summarize",
- help="show summarized diff instead of revision list"),
- Option("-l", "--log",
- dest="avail-display",
- value="logs",
- help="show corresponding log history instead of revision list"),
- "-r",
- "-S",
- ]),
-
- "integrated": (action_integrated,
- "integrated [OPTION...] [PATH]",
- """Show merged revisions available for PATH as a revision list.
- If --revision is given, the revisions shown will be limited to
- those also specified in the option.""",
- [
- Option("-d", "--diff",
- dest="integrated-display",
- value="diffs",
- default="revisions",
- help="show corresponding diff instead of revision list"),
- Option("-l", "--log",
- dest="integrated-display",
- value="logs",
- help="show corresponding log history instead of revision list"),
- "-r",
- "-S",
- ]),
-
- "rollback": (action_rollback,
- "rollback [OPTION...] [PATH]",
- """Rollback previously merged in revisions from PATH. The
- --revision option is mandatory, and specifies which revisions
- will be rolled back. Only the previously integrated merges
- will be rolled back.
-
- When manually rolling back changes, --record-only can be used to
- instruct %s that a manual rollback of a certain revision
- already happened, so that it can record it and offer that
- revision for merge henceforth.""" % (NAME),
- [
- "-f", "-r", "-S", "-M", # import common opts
- ]),
-
- "merge": (action_merge,
- "merge [OPTION...] [PATH]",
- """Merge in revisions into PATH from its source. If --revision is omitted,
- all the available revisions will be merged. In any case, already merged-in
- revisions will NOT be merged again.
-
- When svnmerge is used to bidirectionally merge changes between a
- branch and its source, it is necessary to not merge the same changes
- forth and back: e.g., if you committed a merge of a certain
- revision of the branch into the source, you do not want that commit
- to appear as available to merged into the branch (as the code
- originated in the branch itself!). svnmerge will automatically
- exclude these so-called "reflected" revisions.
-
- When manually merging changes across branches, --record-only can
- be used to instruct %s that a manual merge of a certain revision
- already happened, so that it can record it and not offer that
- revision for merge anymore. Conversely, when there are revisions
- which should not be merged, use '%s block'.""" % (NAME, NAME),
- [
- "-b", "-f", "-r", "-S", "-M", # import common opts
- ]),
-
- "block": (action_block,
- "block [OPTION...] [PATH]",
- """Block revisions within PATH so that they disappear from the available
- list. This is useful to hide revisions which will not be integrated.
- If --revision is omitted, it defaults to all the available revisions.
-
- Do not use this option to hide revisions that were manually merged
- into the branch. Instead, use '%s merge --record-only', which
- records that a merge happened (as opposed to a merge which should
- not happen).""" % NAME,
- [
- "-f", "-r", "-S", # import common opts
- ]),
-
- "unblock": (action_unblock,
- "unblock [OPTION...] [PATH]",
- """Revert the effect of '%s block'. If --revision is omitted, all the
- blocked revisions are unblocked""" % NAME,
- [
- "-f", "-r", "-S", # import common opts
- ]),
-
- "uninit": (action_uninit,
- "uninit [OPTION...] [PATH]",
- """Remove merge tracking information from PATH. It cleans any kind of merge
- tracking information (including the list of blocked revisions). If there
- are multiple sources, use --source to indicate which source you want to
- forget about.""",
- [
- "-f", "-S", # import common opts
- ]),
-}
-
-
-def main(args):
- global opts
-
- # Initialize default options
- opts = default_opts.copy()
- logs.clear()
-
- optsparser = CommandOpts(global_opts, common_opts, command_table,
- version="%%prog r%s\n modified: %s\n\n"
- "Copyright (C) 2004,2005 Awarix Inc.\n"
- "Copyright (C) 2005, Giovanni Bajo"
- % (__revision__, __date__))
-
- cmd, args, state = optsparser.parse(args)
- opts.update(state)
-
- source = opts.get("source", None)
- branch_dir = "."
-
- if str(cmd) == "init":
- if len(args) == 1:
- source = args[0]
- elif len(args) > 1:
- optsparser.error("wrong number of parameters", cmd)
- elif str(cmd) in command_table.keys():
- if len(args) == 1:
- branch_dir = args[0]
- elif len(args) > 1:
- optsparser.error("wrong number of parameters", cmd)
- else:
- assert False, "command not handled: %s" % cmd
-
- # Validate branch_dir
- if not is_wc(branch_dir):
- if str(cmd) == "avail":
- info = None
- # it should be noted here that svn info does not error exit
- # if an invalid target is specified to it (as is
- # intuitive). so the try, except code is not absolutely
- # necessary. but, I retain it to indicate the intuitive
- # handling.
- try:
- info = get_svninfo(branch_dir)
- except LaunchError:
- pass
- # test that we definitely targeted a subversion directory,
- # mirroring the purpose of the earlier is_wc() call
- if info is None or not info.has_key("Node Kind") or info["Node Kind"] != "directory":
- error('"%s" is neither a valid URL, nor a working directory' % branch_dir)
- else:
- error('"%s" is not a subversion working directory' % branch_dir)
-
- # give out some hints as to potential pathids
- PathIdentifier.hint(branch_dir)
- if source: PathIdentifier.hint(source)
-
- # Extract the integration info for the branch_dir
- branch_props = get_merge_props(branch_dir)
-
- # Calculate source_url and source_path
- report("calculate source path for the branch")
- if not source:
- if str(cmd) == "init":
- cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(branch_dir)
- if not cf_source:
- error('no copyfrom info available. '
- 'Explicit source argument (-S/--source) required.')
- opts["source-url"] = get_repo_root(branch_dir) + cf_source
- opts["source-pathid"] = PathIdentifier.from_target(opts["source-url"])
-
- if not opts["revision"]:
- opts["revision"] = "1-" + cf_rev
- else:
- opts["source-pathid"] = get_default_source(branch_dir, branch_props)
- opts["source-url"] = opts["source-pathid"].get_url()
-
- assert is_pathid(opts["source-pathid"])
- assert is_url(opts["source-url"])
- else:
- # The source was given as a command line argument and is stored in
- # SOURCE. Ensure that the specified source does not end in a /,
- # otherwise it's easy to have the same source path listed more
- # than once in the integrated version properties, with and without
- # trailing /'s.
- source = rstrip(source, "/")
- if not is_wc(source) and not is_url(source):
- # Check if it is a substring of a pathid recorded
- # within the branch properties.
- found = []
- for pathid in branch_props.keys():
- if pathid.match_substring(source):
- found.append(pathid)
- if len(found) == 1:
- # (assumes pathid is a repository-relative-path)
- source_pathid = found[0]
- source = source_pathid.get_url()
- else:
- error('"%s" is neither a valid URL, nor an unambiguous '
- 'substring of a repository path, nor a working directory'
- % source)
- else:
- source_pathid = PathIdentifier.from_target(source)
-
- source_pathid = PathIdentifier.from_target(source)
- if str(cmd) == "init" and \
- source_pathid == PathIdentifier.from_target("."):
- error("cannot init integration source path '%s'\n"
- "Its repository-relative path must differ from the "
- "repository-relative path of the current directory."
- % source_pathid)
- opts["source-pathid"] = source_pathid
- opts["source-url"] = target_to_url(source)
-
- # Sanity check source_url
- assert is_url(opts["source-url"])
- # SVN does not support non-normalized URL (and we should not
- # have created them)
- assert opts["source-url"].find("/..") < 0
-
- report('source is "%s"' % opts["source-url"])
-
- # Get previously merged revisions (except when command is init)
- if str(cmd) != "init":
- opts["merged-revs"] = merge_props_to_revision_set(branch_props,
- opts["source-pathid"])
-
- # Perform the action
- cmd(branch_dir, branch_props)
-
-
-if __name__ == "__main__":
- try:
- main(sys.argv[1:])
- except LaunchError, (ret, cmd, out):
- err_msg = "command execution failed (exit code: %d)\n" % ret
- err_msg += cmd + "\n"
- err_msg += "".join(out)
- error(err_msg)
- except KeyboardInterrupt:
- # Avoid traceback on CTRL+C
- print "aborted by user"
- sys.exit(1)
diff --git a/testing/subversion/svnserve b/testing/subversion/svnserve
deleted file mode 100755
index 670fee742..000000000
--- a/testing/subversion/svnserve
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/svnserve
-
-PID=`pidof -o %PPID /usr/bin/svnserve`
-case "$1" in
- start)
- stat_busy "Starting svnserve"
- if [ -z "$PID" ]; then
- if [ -n "$SVNSERVE_USER" ]; then
- su -s '/bin/sh' $SVNSERVE_USER -c "/usr/bin/svnserve -d $SVNSERVE_ARGS" &
- else
- /usr/bin/svnserve -d $SVNSERVE_ARGS &
- fi
- fi
- if [ ! -z "$PID" -o $? -gt 0 ]; then
- stat_fail
- else
- add_daemon svnserve
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping svnserve"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon svnserve
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
diff --git a/testing/subversion/svnserve.conf b/testing/subversion/svnserve.conf
deleted file mode 100644
index 37fb7ea10..000000000
--- a/testing/subversion/svnserve.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# Parameters to be passed to svnserve
-#
-#SVNSERVE_ARGS="-r /path/to/some/repos"
-SVNSERVE_ARGS=""
-
-#SVNSERVE_USER="svn"
diff --git a/testing/vim/PKGBUILD b/testing/vim/PKGBUILD
deleted file mode 100644
index 603de624a..000000000
--- a/testing/vim/PKGBUILD
+++ /dev/null
@@ -1,198 +0,0 @@
-# $Id: PKGBUILD 125313 2011-05-25 20:09:55Z heftig $
-# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
-# Maintainer: tobias [ tobias at archlinux org ]
-# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
-
-pkgbase=vim
-pkgname=(vim gvim vim-runtime)
-_topver=7.3
-_patchlevel=206
-pkgver=${_topver}.${_patchlevel}
-__hgrev=e9538cfd0d9c
-pkgrel=1
-arch=('i686' 'x86_64')
-license=('custom:vim')
-url="http://www.vim.org"
-makedepends=('gpm' 'perl' 'python2>=2.7.1' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2'
- 'gettext' 'pkgconfig' 'mercurial' 'rsync' 'sed')
-source=(pythoncomplete.vim::http://www.vim.org/scripts/download_script.php\?src_id=10872
- vimrc archlinux.vim gvim.desktop)
-md5sums=('6e7adfbd5d26c1d161030ec203a7f243'
- 'e57777374891063b9ca48a1fe392ac05'
- '10353a61aadc3f276692d0e17db1478e'
- '4b83e5fe0e534c53daaba91dd1cd4cbb')
-
-__hgroot='http://vim.googlecode.com/hg/'
-__hgrepo='vim'
-__hgbranch='default'
-
-_versiondir="vim${_topver//./}"
-
-##### Build #####
-
-build() {
- cd ${srcdir}
-
- msg2 'Checking out source from Mercurial...'
-
- if [[ -d ${__hgrepo} ]]; then
- cd ${__hgrepo}
- hg pull -b ${__hgbranch}|| warning 'hg pull failed!'
- hg update -r ${__hgrev}
- else
- hg clone -b ${__hgbranch} -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo}
- cd ${__hgrepo}
- fi
-
- if (( $(hg id -n) < $(hg id -nr ${__hgbranch}) )); then
- warning 'You are not building the latest revision!'
- warning "Consider updating __hgrev to $(hg id -r ${__hgbranch})."
- sleep 10
- fi
-
- cd ..
- rm -rf vim-build gvim-build
- rsync -a --exclude='.hg/' ${__hgrepo}/ vim-build
-
- msg2 'Patching...'
-
- # define the place for the global (g)vimrc file (set to /etc/vimrc)
- sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \
- vim-build/src/feature.h
- sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \
- vim-build/src/feature.h
- # fix python name
- sed -i -e 's|vi_cv_path_python, python|vi_cv_path_python, python2|' \
- vim-build/src/configure.in
- (cd vim-build/src && autoconf)
-
- msg2 'Building...'
-
- cp -a vim-build gvim-build
-
- cd ${srcdir}/vim-build
-
- ./configure --prefix=/usr --localstatedir=/var/lib/vim \
- --mandir=/usr/share/man --with-compiledby=ArchLinux \
- --with-features=big --enable-gpm --enable-acl --with-x=no \
- --disable-gui --enable-multibyte --enable-cscope \
- --disable-netbeans --enable-perlinterp --disable-pythoninterp \
- --disable-rubyinterp
-
- make
-
- cd ${srcdir}/gvim-build
-
- ./configure --prefix=/usr --localstatedir=/var/lib/vim \
- --mandir=/usr/share/man --with-compiledby=ArchLinux \
- --with-features=big --enable-gpm --enable-acl --with-x=yes \
- --enable-gui=gtk2 --enable-multibyte --enable-cscope \
- --enable-netbeans --enable-perlinterp --enable-pythoninterp \
- --enable-rubyinterp
-
- make
-}
-
-##### Packaging #####
-
-package_vim() {
- pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor'
- depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'perl')
- conflicts=('gvim')
-
- cd ${srcdir}/vim-build
- make -j1 VIMRCLOC=/etc DESTDIR=${pkgdir} install
-
- # provided by (n)vi in core
- rm ${pkgdir}/usr/bin/{ex,view}
-
- # delete some manpages
- find ${pkgdir}/usr/share/man -type d -name 'man1' 2>/dev/null | \
- while read _mandir; do
- cd ${_mandir}
- rm -f ex.1 view.1 # provided by (n)vi
- rm -f evim.1 # this does not make sense if we have no GUI
- done
-
- # Runtime provided by runtime package
- rm -r ${pkgdir}/usr/share/vim
-
- # license
- install -dm755 ${pkgdir}/usr/share/licenses/vim
- ln -s /usr/share/vim/${_versiondir}/doc/uganda.txt \
- ${pkgdir}/usr/share/licenses/vim/license.txt
-}
-
-package_gvim() {
- pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with advanced features, such as a GUI)'
- depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'perl' 'python2>=2.7.1' 'ruby' 'libxt'
- 'desktop-file-utils' 'gtk2')
- provides=("vim=${pkgver}-${pkgrel}")
- conflicts=('vim')
- install=gvim.install
-
- cd ${srcdir}/gvim-build
- make -j1 VIMRCLOC=/etc DESTDIR=${pkgdir} install
-
- # provided by (n)vi in core
- rm ${pkgdir}/usr/bin/{ex,view}
-
- # delete some manpages
- find ${pkgdir}/usr/share/man -type d -name 'man1' 2>/dev/null | \
- while read _mandir; do
- cd ${_mandir}
- rm -f ex.1 view.1 # provided by (n)vi
- done
-
- # Move the runtime for later packaging
- mv ${pkgdir}/usr/share/vim ${srcdir}/runtime-install
-
- # freedesktop links
- install -Dm644 ${srcdir}/gvim.desktop \
- ${pkgdir}/usr/share/applications/gvim.desktop
- install -Dm644 runtime/vim48x48.png ${pkgdir}/usr/share/pixmaps/gvim.png
-
- # license
- install -dm755 ${pkgdir}/usr/share/licenses/gvim
- ln -s /usr/share/vim/${_versiondir}/doc/uganda.txt \
- ${pkgdir}/usr/share/licenses/gvim/license.txt
-}
-
-package_vim-runtime() {
- pkgdesc='Runtime for vim and gvim'
- backup=(etc/vimrc)
-
- # Install the runtime split from gvim
- install -dm755 ${pkgdir}/usr/share
- mv ${srcdir}/runtime-install ${pkgdir}/usr/share/vim
-
- # Don't forget logtalk.dict
- install -Dm644 ${srcdir}/gvim-build/runtime/ftplugin/logtalk.dict \
- ${pkgdir}/usr/share/vim/${_versiondir}/ftplugin/logtalk.dict
-
- # fix FS#17216
- sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \
- ${pkgdir}/usr/share/vim/${_versiondir}/filetype.vim
-
- # patch filetype.vim for better handling of pacman related files
- sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" \
- ${pkgdir}/usr/share/vim/${_versiondir}/filetype.vim
- sed -i "/find the end/,+3{s/changelog_date_entry_search/changelog_date_end_entry_search/}" \
- ${pkgdir}/usr/share/vim/${_versiondir}/ftplugin/changelog.vim
-
- # make Aaron happy
- install -Dm644 ${srcdir}/pythoncomplete.vim \
- ${pkgdir}/usr/share/vim/${_versiondir}/autoload/pythoncomplete.vim
-
- # rc files
- install -Dm644 ${srcdir}/vimrc ${pkgdir}/etc/vimrc
- install -Dm644 ${srcdir}/archlinux.vim \
- ${pkgdir}/usr/share/vim/vimfiles/archlinux.vim
-
- # license
- install -dm755 ${pkgdir}/usr/share/licenses/vim-runtime
- ln -s /usr/share/vim/${_versiondir}/doc/uganda.txt \
- ${pkgdir}/usr/share/licenses/vim-runtime/license.txt
-}
-
-# vim:set sw=2 sts=2 et:
diff --git a/testing/vim/archlinux.vim b/testing/vim/archlinux.vim
deleted file mode 100644
index 148bb930f..000000000
--- a/testing/vim/archlinux.vim
+++ /dev/null
@@ -1,26 +0,0 @@
-" The ArchLinux global vimrc - setting only a few sane defaults
-"
-" Maintainer: Tobias Kieslich [tobias funnychar archlinux dot org]
-"
-" NEVER EDIT THIS FILE, IT'S OVERWRITTEN UPON UPGRADES, GLOBAL CONFIGURATION
-" SHALL BE DONE IN /etc/vimrc, USER SPECIFIC CONFIGURATION IN ~/.vimrc
-
-" Normally we use vim-extensions. If you want true vi-compatibility
-" remove change the following statements
-set nocompatible " Use Vim defaults instead of 100% vi compatibility
-set backspace=indent,eol,start " more powerful backspacing
-
-" Now we set some defaults for the editor
-set history=50 " keep 50 lines of command line history
-set ruler " show the cursor position all the time
-
-" Suffixes that get lower priority when doing tab completion for filenames.
-" These are files we are not likely to want to edit or read.
-set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
-
-
-if has('gui_running')
- " Make shift-insert work like in Xterm
- map <S-Insert> <MiddleMouse>
- map! <S-Insert> <MiddleMouse>
-endif
diff --git a/testing/vim/gvim.desktop b/testing/vim/gvim.desktop
deleted file mode 100644
index 56fd61b8f..000000000
--- a/testing/vim/gvim.desktop
+++ /dev/null
@@ -1,42 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Name=gVim
-Name[eo]=VIM-fasado
-Name[sv]=gVim
-Name[xx]=xx
-Comment=GTK2 enhanced vim text editor
-Comment[ar]=محرر نصوص
-Comment[bg]=Текст Редактор
-Comment[de]=Texteditor
-Comment[el]=Διορθωτής Κειμένου
-Comment[eo]=Tekstredaktilo
-Comment[et]=Tekstiredaktor
-Comment[eu]=Testu Editorea
-Comment[fi]=Tekstieditori
-Comment[he]=עורך טקסט
-Comment[is]=Textaritill
-Comment[ja]=テキストエディタ
-Comment[lt]=Teksto redaktorius
-Comment[mt]=Editur tat-test
-Comment[pt_BR]=Editor de Texto
-Comment[ro]=Editor de text
-Comment[ru]=редактор
-Comment[sk]=Textový editor
-Comment[sl]=Urejevalnik besedil
-Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
-Comment[tr]=Metin Düzenleyici
-Comment[uk]=Редактор текстів
-Comment[vi]=Trình soạn văn bản
-Comment[xx]=xx
-Comment[zh_CN]=文本编辑器
-Comment[zh_TW]=文字編輯器
-GenericName=Text Editor
-Type=Application
-TryExec=gvim
-Exec=gvim %u
-Icon=gvim
-Terminal=false
-X-MultipleArgs=false
-Categories=GTK;Application;Utility;TextEditor;
-MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-c;text/x-objc;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-php;text/x-php-source;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text/x-xslt;
diff --git a/testing/vim/gvim.install b/testing/vim/gvim.install
deleted file mode 100644
index 0a8d3b0a9..000000000
--- a/testing/vim/gvim.install
+++ /dev/null
@@ -1,13 +0,0 @@
-post_install() {
- echo -n "Updating desktop and mime database..."
- update-desktop-database -q
- echo "done."
-}
-
-post_upgrade() {
- post_install $1
-}
-
-post_remove() {
- post_install $1
-}
diff --git a/testing/vim/vimrc b/testing/vim/vimrc
deleted file mode 100644
index 92d3ff980..000000000
--- a/testing/vim/vimrc
+++ /dev/null
@@ -1,16 +0,0 @@
-" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
-" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
-" you can find below. If you wish to change any of those settings, you should
-" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
-" everytime an upgrade of the vim packages is performed. It is recommended to
-" make changes after sourcing archlinux.vim since it alters the value of the
-" 'compatible' option.
-
-" This line should not be removed as it ensures that various options are
-" properly set to work with the Vim-related packages.
-runtime! archlinux.vim
-
-" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
-" Or better yet, read /usr/share/vim/vim72/vimrc_example.vim or the vim manual
-" and configure vim to your own liking!
-
diff --git a/testing/weechat/PKGBUILD b/testing/weechat/PKGBUILD
deleted file mode 100644
index 7e2144efc..000000000
--- a/testing/weechat/PKGBUILD
+++ /dev/null
@@ -1,33 +0,0 @@
-# $Id: PKGBUILD 125306 2011-05-25 19:29:12Z foutrelis $
-# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
-# Contributor: lucke <lucke at o2 dot pl>
-
-pkgname=weechat
-pkgver=0.3.5
-pkgrel=2
-pkgdesc="Fast, light and extensible IRC client (curses UI)"
-arch=('i686' 'x86_64')
-url="http://www.weechat.org/"
-license=('GPL')
-depends=('gnutls')
-makedepends=('cmake' 'pkgconfig' 'perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell')
-optdepends=('perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell')
-options=('!libtool')
-source=("http://www.weechat.org/files/src/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('0d2a089bfbfa550e0c65618a171fb3c4')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- mkdir build
- cd build
- cmake .. -DPREFIX=/usr \
- -DPYTHON_EXECUTABLE=/usr/bin/python2 \
- -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}/build"
-
- make DESTDIR="${pkgdir}/" install
-}
diff --git a/testing/xf86-input-wacom/70-wacom.rules b/testing/xf86-input-wacom/70-wacom.rules
deleted file mode 100644
index 67e5580cc..000000000
--- a/testing/xf86-input-wacom/70-wacom.rules
+++ /dev/null
@@ -1,8 +0,0 @@
-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
deleted file mode 100644
index f1bf57b06..000000000
--- a/testing/xf86-input-wacom/PKGBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# $Id: PKGBUILD 124965 2011-05-25 13:01:43Z heftig $
-# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
-# Contributor: Jan de Groot <jgc@archlinux.org>
-# Contributor: M Rawash <mrawash@gmail.com>
-
-pkgname=xf86-input-wacom
-pkgver=0.11.0
-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=('e0f6182cf7fba19c13f3db7e0da1baf3'
- '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-ati/PKGBUILD b/testing/xf86-video-ati/PKGBUILD
deleted file mode 100644
index c10416455..000000000
--- a/testing/xf86-video-ati/PKGBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# $Id: PKGBUILD 125569 2011-05-26 19:49:03Z andyrtr $
-# Maintainer: Jan de Groot <jgc@archlinux.org>
-# Contributor: Alexander Baldeck <alexander@archlinux.org>
-
-pkgname=xf86-video-ati
-pkgver=6.14.2
-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=('111ec4aef32a4298df7e38afa8bef373')
-
-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
deleted file mode 100644
index 75980cbf3..000000000
--- a/testing/xf86-video-ati/ati-fix-build-1.10.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-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/xorg-server/10-quirks.conf b/testing/xorg-server/10-quirks.conf
deleted file mode 100644
index 7afad22dc..000000000
--- a/testing/xorg-server/10-quirks.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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
deleted file mode 100644
index 274da6f98..000000000
--- a/testing/xorg-server/PKGBUILD
+++ /dev/null
@@ -1,196 +0,0 @@
-# $Id: PKGBUILD 125811 2011-05-30 08:49:25Z 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.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')
-options=('!libtool')
-source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
- git-fixes.patch
- bg-none-revert.patch
- xserver-1.10-pointer-barriers.patch
- xorg-redhat-die-ugly-pattern-die-die-die.patch
- autoconfig-nvidia.patch
- xvfb-run
- xvfb-run.1
- 10-quirks.conf)
-sha1sums=('fd831b3c6297d1a68830c602d767752d87b9ca54'
- '6dd2bcd9d8b17d1a50ed8c15eb1cba480558e695'
- '629c6d8d52126eab81ee1b72a9e4209535f8cb81'
- '1b95e91384a57d966428c7db98ed06f4cc562f91'
- '0efcdf61bde3c0cd813072b94e2b30ab922775b9'
- 'f9328fd7bc931bb02c8909ecfcef35403de33782'
- 'c94f742d3f9cabf958ae58e4015d9dd185aabedc'
- '6838fc00ef4618c924a77e0fb03c05346080908a'
- '993798f3d22ad672d769dae5f48d1fa068d5578f')
-
-build() {
- cd "${srcdir}/${pkgbase}-${pkgver}"
- # Get rid of the ugly pattern
- patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch"
-
- # Add pointer barrier support, patch from Fedora
- patch -Np1 -i "${srcdir}/xserver-1.10-pointer-barriers.patch"
-
- # Patches from ~ajax/xserver xserver-next branch
- patch -Np1 -i "${srcdir}/bg-none-revert.patch"
-
- # Upstream fixes from 1.10 branch
- patch -Np1 -i "${srcdir}/git-fixes.patch"
-
- # Use nouveau/nv/nvidia drivers for nvidia devices
- patch -Np1 -i "${srcdir}/autoconfig-nvidia.patch"
-
- autoreconf
- ./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
-
- 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/autoconfig-nvidia.patch b/testing/xorg-server/autoconfig-nvidia.patch
deleted file mode 100644
index c56586d54..000000000
--- a/testing/xorg-server/autoconfig-nvidia.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From a685b5cf34532cef96fc9b05f735088ac0c0c7ad Mon Sep 17 00:00:00 2001
-From: Fedora X Ninjas <x@fedoraproject.org>
-Date: Tue, 16 Feb 2010 11:38:17 +1000
-Subject: [PATCH 08/17] autoconfig: select nouveau by default for NVIDIA GPUs
-
-Also, don't treat DRI setup failure as an error for nouveau.
-
-Modified by Archlinux:
-Append nvidia driver to the list of prefered drivers
----
- glx/glxdri.c | 7 +++++--
- glx/glxdri2.c | 7 +++++--
- hw/xfree86/common/xf86AutoConfig.c | 19 ++++++++++++++++++-
- 3 files changed, 28 insertions(+), 5 deletions(-)
-
---- a/glx/glxdri.c
-+++ b/glx/glxdri.c
-@@ -978,6 +978,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
- const __DRIconfig **driConfigs;
- const __DRIextension **extensions;
- int i;
-+ int from = X_ERROR;
-
- if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
- !DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
-@@ -1057,7 +1058,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
-
- screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
- if (screen->driver == NULL) {
-- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
-+ if (!strcmp(driverName, "nouveau"))
-+ from = X_INFO;
-+ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n",
- filename, dlerror());
- goto handle_error;
- }
-@@ -1193,7 +1196,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
-
- free(screen);
-
-- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n");
-+ LogMessage(from, "AIGLX: reverting to software rendering\n");
-
- return NULL;
- }
---- a/glx/glxdri2.c
-+++ b/glx/glxdri2.c
-@@ -708,6 +708,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
- const __DRIextension **extensions;
- const __DRIconfig **driConfigs;
- int i;
-+ int from = X_ERROR;
-
- screen = calloc(1, sizeof *screen);
- if (screen == NULL)
-@@ -734,7 +735,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
-
- screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
- if (screen->driver == NULL) {
-- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
-+ if (!strcmp(driverName, "nouveau"))
-+ from = X_INFO;
-+ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n",
- filename, dlerror());
- goto handle_error;
- }
-@@ -826,7 +829,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
-
- free(screen);
-
-- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n");
-+ LogMessage(from, "AIGLX: reverting to software rendering\n");
-
- return NULL;
- }
---- 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/bg-none-revert.patch b/testing/xorg-server/bg-none-revert.patch
deleted file mode 100644
index 1a38f1f41..000000000
--- a/testing/xorg-server/bg-none-revert.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 3bc6ed2d8c9028ec28015d05b60af67a194f3694 Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Tue, 29 Mar 2011 14:09:46 +0000
-Subject: Revert "composite: Don't backfill non-bg-None windows"
-
-This reverts commit 6dd775f57d2f94f0ddaee324aeec33b9b66ed5bc.
-
-Bugzilla: https://bugs.freedesktop.org/34427
-
-Acked-by: Alex Deucher <alexdeucher@gmail.com>
-Signed-off-by: Adam Jackson <ajax@redhat.com>
----
-diff --git a/composite/compalloc.c b/composite/compalloc.c
-index e4064f6..7164c0d 100644
---- a/composite/compalloc.c
-+++ b/composite/compalloc.c
-@@ -508,17 +508,6 @@ compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin)
- return Success;
- }
-
--static int
--bgNoneVisitWindow(WindowPtr pWin, void *null)
--{
-- if (pWin->backgroundState != BackgroundPixmap)
-- return WT_WALKCHILDREN;
-- if (pWin->background.pixmap != None)
-- return WT_WALKCHILDREN;
--
-- return WT_STOPWALKING;
--}
--
- static PixmapPtr
- compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map)
- {
-@@ -539,21 +528,6 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map)
- if (!map)
- return pPixmap;
-
-- /*
-- * If there's no bg=None in the tree, we're done.
-- *
-- * We could optimize this more by collection the regions of all the
-- * bg=None subwindows and feeding that in as the clip for the
-- * CopyArea below, but since window trees are shallow these days it
-- * might not be worth the effort.
-- */
-- if (TraverseTree(pWin, bgNoneVisitWindow, NULL) == WT_NOMATCH)
-- return pPixmap;
--
-- /*
-- * Copy bits from the parent into the new pixmap so that it will
-- * have "reasonable" contents in case for background None areas.
-- */
- if (pParent->drawable.depth == pWin->drawable.depth)
- {
- GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen);
---
-cgit v0.8.3-6-g21f6
diff --git a/testing/xorg-server/git-fixes.patch b/testing/xorg-server/git-fixes.patch
deleted file mode 100644
index 3eadd81ba..000000000
--- a/testing/xorg-server/git-fixes.patch
+++ /dev/null
@@ -1,318 +0,0 @@
-From 613e0e9ef74c4542ed458200165adbcdfdf3cd17 Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu@apple.com>
-Date: Wed, 13 Apr 2011 18:51:30 +0000
-Subject: Send events that were missing from RRSelectInput
-
-The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out
-events corresponding to the event mask, if there have been changes to
-CRTCs or outputs. Only screen events were being generated, however.
-
-Fixes http://bugs.freedesktop.org/21760
-
-Signed-off-by: Federico Mena Quintero <federico@novell.com>
-Reviewd-by: Keith Packard <keithp@keithp.com>
-Signed-off-by: Keith Packard <keithp@keithp.com>
-(cherry picked from commit b2997431fd426ab318bc5dfd2cd43956d733ebec)
----
-diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
-index ac4d2ac..2135504 100644
---- a/randr/rrdispatch.c
-+++ b/randr/rrdispatch.c
-@@ -146,7 +146,7 @@ ProcRRSelectInput (ClientPtr client)
- /*
- * Now see if the client needs an event
- */
-- if (pScrPriv && (pRREvent->mask & RRScreenChangeNotifyMask))
-+ if (pScrPriv)
- {
- pTimes = &((RRTimesPtr) (pRRClient + 1))[pScreen->myNum];
- if (CompareTimeStamps (pTimes->setTime,
-@@ -154,7 +154,35 @@ ProcRRSelectInput (ClientPtr client)
- CompareTimeStamps (pTimes->configTime,
- pScrPriv->lastConfigTime) != 0)
- {
-- RRDeliverScreenEvent (client, pWin, pScreen);
-+ if (pRREvent->mask & RRScreenChangeNotifyMask)
-+ {
-+ RRDeliverScreenEvent (client, pWin, pScreen);
-+ }
-+
-+ if (pRREvent->mask & RRCrtcChangeNotifyMask)
-+ {
-+ int i;
-+
-+ for (i = 0; i < pScrPriv->numCrtcs; i++)
-+ {
-+ RRDeliverCrtcEvent (client, pWin, pScrPriv->crtcs[i]);
-+ }
-+ }
-+
-+ if (pRREvent->mask & RROutputChangeNotifyMask)
-+ {
-+ int i;
-+
-+ for (i = 0; i < pScrPriv->numOutputs; i++)
-+ {
-+ RRDeliverOutputEvent (client, pWin, pScrPriv->outputs[i]);
-+ }
-+ }
-+
-+ /* We don't check for RROutputPropertyNotifyMask, as randrproto.txt doesn't
-+ * say if there ought to be notifications of changes to output properties
-+ * if those changes occurred before the time RRSelectInput is called.
-+ */
- }
- }
- }
---
-cgit v0.8.3-6-g21f6
-From 50b9d3142ff90af2f7fa35b7b1bf9e5a07723dbd Mon Sep 17 00:00:00 2001
-From: Aaron Plattner <aplattner@nvidia.com>
-Date: Tue, 24 May 2011 23:02:42 +0000
-Subject: randr: check rotated virtual size limits correctly
-
-Commit d1107918d4626268803b54033a07405122278e7f introduced checks to
-the RandR path that cause RRSetScreenConfig requests to fail if the
-size is too large. Unfortunately, when RandR 1.1 rotation is enabled
-it compares the rotated screen dimensions to the unrotated limits,
-which causes 90- and 270-degree rotation to fail unless your screen
-happens to be square:
-
- X Error of failed request: BadValue (integer parameter out of range for operation)
- Major opcode of failed request: 153 (RANDR)
- Minor opcode of failed request: 2 (RRSetScreenConfig)
- Value in failed request: 0x780
- Serial number of failed request: 14
- Current serial number in output stream: 14
-
-Fix this by moving the check above the code that swaps the dimensions
-based on the rotation.
-
-Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-Tested-by: Robert Hooker <robert.hooker@canonical.com>
-Tested-by: Kent Baxley <kent.baxley@canonical.com>
-Signed-off-by: Keith Packard <keithp@keithp.com>
-(cherry picked from commit b6c7b9b2f39e970cedb6bc1e073f901e28cb0fa3)
----
-diff --git a/randr/rrscreen.c b/randr/rrscreen.c
-index 1bc1a9e..da6d48d 100644
---- a/randr/rrscreen.c
-+++ b/randr/rrscreen.c
-@@ -910,12 +910,6 @@ ProcRRSetScreenConfig (ClientPtr client)
- */
- width = mode->mode.width;
- height = mode->mode.height;
-- if (rotation & (RR_Rotate_90|RR_Rotate_270))
-- {
-- width = mode->mode.height;
-- height = mode->mode.width;
-- }
--
- if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
- client->errorValue = width;
- free(pData);
-@@ -927,6 +921,12 @@ ProcRRSetScreenConfig (ClientPtr client)
- return BadValue;
- }
-
-+ if (rotation & (RR_Rotate_90|RR_Rotate_270))
-+ {
-+ width = mode->mode.height;
-+ height = mode->mode.width;
-+ }
-+
- if (width != pScreen->width || height != pScreen->height)
- {
- int c;
---
-cgit v0.8.3-6-g21f6
-From 4bfb22e7667c4cd55da5e7a31af29ce5769ecc65 Mon Sep 17 00:00:00 2001
-From: Aaron Plattner <aplattner@nvidia.com>
-Date: Mon, 18 Apr 2011 15:23:48 +0000
-Subject: linux: Retry VT ioctls while errno == EINTR
-
-When the smart scheduler is enabled, the VT ioctls (particularly
-VT_WAITACTIVE) can be interrupted by the smart scheduler's SIGALRMs.
-Previously, this caused the server to immediately continue on to
-ScreenInit, almost certainly causing a crash or failure because the X
-server that owned the VT hadn't finished cleaning up. As of commit
-7ee965a300c9eddcc1acacf9414cfe3e589222a8, it causes a FatalError
-instead.
-
-Retrying the ioctl as long as it fails with errno == EINTR fixes the
-problem and allows server regenerations to trigger VT switches that
-actually succeed.
-
-Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-Reviewed-by: Cyril Brulebois <kibi@debian.org>
-Signed-off-by: Keith Packard <keithp@keithp.com>
-(cherry picked from commit 88c4622b594a1725d0cee86bc82ad640d241c520)
----
-diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
-index 9c71a42..77dfb2f 100644
---- a/hw/xfree86/os-support/linux/lnx_init.c
-+++ b/hw/xfree86/os-support/linux/lnx_init.c
-@@ -62,17 +62,21 @@ drain_console(int fd, void *closure)
- static void
- switch_to(int vt, const char *from)
- {
-- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt) < 0)
-- FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
-+ int ret;
-
-- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt) < 0)
-- FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
-+ if (ret < 0)
-+ FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
-+
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
-+ if (ret < 0)
-+ FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
- }
-
- void
- xf86OpenConsole(void)
- {
-- int i, fd = -1;
-+ int i, fd = -1, ret;
- struct vt_mode VT;
- struct vt_stat vts;
- MessageType from = X_PROBED;
-@@ -107,17 +111,19 @@ xf86OpenConsole(void)
-
- if (ShareVTs)
- {
-- if (ioctl(fd, VT_GETSTATE, &vts) == 0)
-- xf86Info.vtno = vts.v_active;
-- else
-- FatalError("xf86OpenConsole: Cannot find the current"
-- " VT (%s)\n", strerror(errno));
-+ SYSCALL(ret = ioctl(fd, VT_GETSTATE, &vts));
-+ if (ret < 0)
-+ FatalError("xf86OpenConsole: Cannot find the current"
-+ " VT (%s)\n", strerror(errno));
-+ xf86Info.vtno = vts.v_active;
- } else {
-- if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
-- (xf86Info.vtno == -1))
-- FatalError("xf86OpenConsole: Cannot find a free VT: %s\n",
-- strerror(errno));
-- }
-+ SYSCALL(ret = ioctl(fd, VT_OPENQRY, &xf86Info.vtno));
-+ if (ret < 0)
-+ FatalError("xf86OpenConsole: Cannot find a free VT: "
-+ "%s\n", strerror(errno));
-+ if (xf86Info.vtno == -1)
-+ FatalError("xf86OpenConsole: Cannot find a free VT\n");
-+ }
- close(fd);
- }
-
-@@ -159,7 +165,8 @@ xf86OpenConsole(void)
- * Linux doesn't switch to an active vt after the last close of a vt,
- * so we do this ourselves by remembering which is active now.
- */
-- if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts) < 0)
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts));
-+ if (ret < 0)
- xf86Msg(X_WARNING,"xf86OpenConsole: VT_GETSTATE failed: %s\n",
- strerror(errno));
- else
-@@ -171,7 +178,7 @@ xf86OpenConsole(void)
- * Detach from the controlling tty to avoid char loss
- */
- if ((i = open("/dev/tty",O_RDWR)) >= 0) {
-- ioctl(i, TIOCNOTTY, 0);
-+ SYSCALL(ioctl(i, TIOCNOTTY, 0));
- close(i);
- }
- }
-@@ -186,9 +193,10 @@ xf86OpenConsole(void)
- */
- switch_to(xf86Info.vtno, "xf86OpenConsole");
-
-- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
-- FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
-- strerror(errno));
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
-+ if (ret < 0)
-+ FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
-+ strerror(errno));
-
- signal(SIGUSR1, xf86VTRequest);
-
-@@ -196,20 +204,23 @@ xf86OpenConsole(void)
- VT.relsig = SIGUSR1;
- VT.acqsig = SIGUSR1;
-
-- if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
-- FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed: %s\n",
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT));
-+ if (ret < 0)
-+ FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed: %s\n",
- strerror(errno));
--
-- if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
-- FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n",
-- strerror(errno));
-+
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS));
-+ if (ret < 0)
-+ FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n",
-+ strerror(errno));
-
- tcgetattr(xf86Info.consoleFd, &tty_attr);
-- ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode);
-+ SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode));
-
-- if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0)
-- FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
-- strerror(errno));
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW));
-+ if (ret < 0)
-+ FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
-+ strerror(errno));
-
- nTty = tty_attr;
- nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
-@@ -241,6 +252,7 @@ void
- xf86CloseConsole(void)
- {
- struct vt_mode VT;
-+ int ret;
-
- if (ShareVTs) {
- close(xf86Info.consoleFd);
-@@ -253,20 +265,23 @@ xf86CloseConsole(void)
- };
-
- /* Back to text mode ... */
-- if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT) < 0)
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
-+ if (ret < 0)
- xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
- strerror(errno));
-
-- ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
-+ SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode));
- tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
-
-- if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
-+ if (ret < 0)
- xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n",
- strerror(errno));
- else {
- /* set dflt vt handling */
- VT.mode = VT_AUTO;
-- if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
-+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT));
-+ if (ret < 0)
- xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s\n",
- strerror(errno));
- }
---
-cgit v0.8.3-6-g21f6
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
deleted file mode 100644
index 4e782f1c6..000000000
--- a/testing/xorg-server/xorg-redhat-die-ugly-pattern-die-die-die.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-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/xserver-1.10-pointer-barriers.patch b/testing/xorg-server/xserver-1.10-pointer-barriers.patch
deleted file mode 100644
index 099565436..000000000
--- a/testing/xorg-server/xserver-1.10-pointer-barriers.patch
+++ /dev/null
@@ -1,1054 +0,0 @@
-From 14f1112bec18ccece8e732fe6c200a56546230c7 Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Thu, 17 Mar 2011 13:56:17 -0400
-Subject: [PATCH] CRTC confine and pointer barriers
-
----
- dix/events.c | 7 +
- dix/getevents.c | 12 +-
- include/dix.h | 1 +
- include/protocol-versions.h | 2 +-
- mi/mipointer.c | 16 ++-
- mi/mipointer.h | 6 +
- randr/randr.c | 2 +
- randr/randrstr.h | 4 +
- randr/rrcrtc.c | 155 ++++++++++++++++
- test/Makefile.am | 4 +-
- xfixes/cursor.c | 408 ++++++++++++++++++++++++++++++++++++++++++-
- xfixes/xfixes.c | 24 ++-
- xfixes/xfixes.h | 17 ++
- xfixes/xfixesint.h | 16 ++
- 14 files changed, 658 insertions(+), 16 deletions(-)
-
-diff --git a/dix/events.c b/dix/events.c
-index 07f8b05..d2be84f 100644
---- a/dix/events.c
-+++ b/dix/events.c
-@@ -328,6 +328,13 @@ IsMaster(DeviceIntPtr dev)
- return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD;
- }
-
-+Bool
-+IsFloating(DeviceIntPtr dev)
-+{
-+ return GetMaster(dev, MASTER_KEYBOARD) == NULL;
-+}
-+
-+
- /**
- * Max event opcode.
- */
-diff --git a/dix/getevents.c b/dix/getevents.c
-index 794df42..c66e516 100644
---- a/dix/getevents.c
-+++ b/dix/getevents.c
-@@ -812,7 +812,11 @@ accelPointer(DeviceIntPtr dev, int first, int num, int *valuators, CARD32 ms)
- * miPointerSetPosition() and then scale back into device coordinates (if
- * needed). miPSP will change x/y if the screen was crossed.
- *
-+ * The coordinates provided are always absolute. The parameter mode whether
-+ * it was relative or absolute movement that landed us at those coordinates.
-+ *
- * @param dev The device to be moved.
-+ * @param mode Movement mode (Absolute or Relative)
- * @param x Pointer to current x-axis value, may be modified.
- * @param y Pointer to current y-axis value, may be modified.
- * @param x_frac Fractional part of current x-axis value, may be modified.
-@@ -824,7 +828,8 @@ accelPointer(DeviceIntPtr dev, int first, int num, int *valuators, CARD32 ms)
- * @param screeny_frac Fractional part of screen y coordinate, as above.
- */
- static void
--positionSprite(DeviceIntPtr dev, int *x, int *y, float x_frac, float y_frac,
-+positionSprite(DeviceIntPtr dev, int mode,
-+ int *x, int *y, float x_frac, float y_frac,
- ScreenPtr scr, int *screenx, int *screeny, float *screenx_frac, float *screeny_frac)
- {
- int old_screenx, old_screeny;
-@@ -863,7 +868,7 @@ positionSprite(DeviceIntPtr dev, int *x, int *y, float x_frac, float y_frac,
- old_screeny = *screeny;
- /* This takes care of crossing screens for us, as well as clipping
- * to the current screen. */
-- miPointerSetPosition(dev, screenx, screeny);
-+ _miPointerSetPosition(dev, mode, screenx, screeny);
-
- if (dev->u.master) {
- dev->u.master->last.valuators[0] = *screenx;
-@@ -1193,7 +1198,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
-
- set_raw_valuators(raw, &mask, raw->valuators.data);
-
-- positionSprite(pDev, &x, &y, x_frac, y_frac, scr, &cx, &cy, &cx_frac, &cy_frac);
-+ positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative,
-+ &x, &y, x_frac, y_frac, scr, &cx, &cy, &cx_frac, &cy_frac);
- updateHistory(pDev, &mask, ms);
-
- /* Update the valuators with the true value sent to the client*/
-diff --git a/include/dix.h b/include/dix.h
-index 12e4b59..3f99098 100644
---- a/include/dix.h
-+++ b/include/dix.h
-@@ -570,6 +570,7 @@ extern Bool _X_EXPORT IsPointerDevice( DeviceIntPtr dev);
- extern Bool _X_EXPORT IsKeyboardDevice(DeviceIntPtr dev);
- extern Bool IsPointerEvent(InternalEvent *event);
- extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev);
-+extern _X_EXPORT Bool IsFloating(DeviceIntPtr dev);
-
- extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
- extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what);
-diff --git a/include/protocol-versions.h b/include/protocol-versions.h
-index 1d33bdd..1dc66ad 100644
---- a/include/protocol-versions.h
-+++ b/include/protocol-versions.h
-@@ -126,7 +126,7 @@
- #define SERVER_XF86VIDMODE_MINOR_VERSION 2
-
- /* Fixes */
--#define SERVER_XFIXES_MAJOR_VERSION 4
-+#define SERVER_XFIXES_MAJOR_VERSION 5
- #define SERVER_XFIXES_MINOR_VERSION 0
-
- /* X Input */
-diff --git a/mi/mipointer.c b/mi/mipointer.c
-index 554397a..85f1949 100644
---- a/mi/mipointer.c
-+++ b/mi/mipointer.c
-@@ -229,6 +229,10 @@ miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen,
- SetupScreen (pScreen);
-
- GenerateEvent = generateEvent;
-+
-+ if (pScreen->ConstrainCursorHarder)
-+ pScreen->ConstrainCursorHarder(pDev, pScreen, Absolute, &x, &y);
-+
- /* device dependent - must pend signal and call miPointerWarpCursor */
- (*pScreenPriv->screenFuncs->WarpCursor) (pDev, pScreen, x, y);
- if (!generateEvent)
-@@ -484,7 +488,7 @@ miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen,
- }
-
- void
--miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
-+_miPointerSetPosition(DeviceIntPtr pDev, int mode, int *x, int *y)
- {
- miPointerScreenPtr pScreenPriv;
- ScreenPtr pScreen;
-@@ -529,6 +533,9 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
- if (*y >= pPointer->limits.y2)
- *y = pPointer->limits.y2 - 1;
-
-+ if (pScreen->ConstrainCursorHarder)
-+ pScreen->ConstrainCursorHarder(pDev, pScreen, mode, x, y);
-+
- if (pPointer->x == *x && pPointer->y == *y &&
- pPointer->pScreen == pScreen)
- return;
-@@ -536,6 +543,13 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
- miPointerMoveNoEvent(pDev, pScreen, *x, *y);
- }
-
-+/* ABI hack */
-+void
-+miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
-+{
-+ _miPointerSetPosition(pDev, Absolute, x, y);
-+}
-+
- void
- miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y)
- {
-diff --git a/mi/mipointer.h b/mi/mipointer.h
-index 3c86110..6b6010c 100644
---- a/mi/mipointer.h
-+++ b/mi/mipointer.h
-@@ -131,6 +131,12 @@ extern _X_EXPORT void miPointerGetPosition(
-
- /* Moves the cursor to the specified position. May clip the co-ordinates:
- * x and y are modified in-place. */
-+extern _X_EXPORT void _miPointerSetPosition(
-+ DeviceIntPtr pDev,
-+ int mode,
-+ int *x,
-+ int *y);
-+
- extern _X_EXPORT void miPointerSetPosition(
- DeviceIntPtr pDev,
- int *x,
-diff --git a/randr/randr.c b/randr/randr.c
-index 6077705..d337129 100644
---- a/randr/randr.c
-+++ b/randr/randr.c
-@@ -270,6 +270,8 @@ Bool RRScreenInit(ScreenPtr pScreen)
-
- wrap (pScrPriv, pScreen, CloseScreen, RRCloseScreen);
-
-+ pScreen->ConstrainCursorHarder = RRConstrainCursorHarder;
-+
- pScrPriv->numOutputs = 0;
- pScrPriv->outputs = NULL;
- pScrPriv->numCrtcs = 0;
-diff --git a/randr/randrstr.h b/randr/randrstr.h
-index 7ea6080..d8dd37d 100644
---- a/randr/randrstr.h
-+++ b/randr/randrstr.h
-@@ -297,6 +297,7 @@ typedef struct _rrScrPriv {
- int rate;
- int size;
- #endif
-+ Bool discontiguous;
- } rrScrPrivRec, *rrScrPrivPtr;
-
- extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
-@@ -700,6 +701,9 @@ ProcRRGetPanning (ClientPtr client);
- int
- ProcRRSetPanning (ClientPtr client);
-
-+void
-+RRConstrainCursorHarder (DeviceIntPtr, ScreenPtr, int, int *, int *);
-+
- /* rrdispatch.c */
- extern _X_EXPORT Bool
- RRClientKnowsRates (ClientPtr pClient);
-diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
-index 98206a2..d4d8f2a 100644
---- a/randr/rrcrtc.c
-+++ b/randr/rrcrtc.c
-@@ -1,5 +1,6 @@
- /*
- * Copyright © 2006 Keith Packard
-+ * Copyright 2010 Red Hat, Inc
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
-@@ -22,6 +23,7 @@
-
- #include "randrstr.h"
- #include "swaprep.h"
-+#include "mipointer.h"
-
- RESTYPE RRCrtcType;
-
-@@ -292,6 +294,92 @@ RRCrtcPendingProperties (RRCrtcPtr crtc)
- return FALSE;
- }
-
-+static void
-+crtc_bounds(RRCrtcPtr crtc, int *left, int *right, int *top, int *bottom)
-+{
-+ *left = crtc->x;
-+ *top = crtc->y;
-+
-+ switch (crtc->rotation) {
-+ case RR_Rotate_0:
-+ case RR_Rotate_180:
-+ default:
-+ *right = crtc->x + crtc->mode->mode.width;
-+ *bottom = crtc->y + crtc->mode->mode.height;
-+ return;
-+ case RR_Rotate_90:
-+ case RR_Rotate_270:
-+ *right = crtc->x + crtc->mode->mode.height;
-+ *bottom = crtc->y + crtc->mode->mode.width;
-+ return;
-+ }
-+}
-+
-+/* overlapping counts as adjacent */
-+static Bool
-+crtcs_adjacent(const RRCrtcPtr a, const RRCrtcPtr b)
-+{
-+ /* left, right, top, bottom... */
-+ int al, ar, at, ab;
-+ int bl, br, bt, bb;
-+ int cl, cr, ct, cb; /* the overlap, if any */
-+
-+ crtc_bounds(a, &al, &ar, &at, &ab);
-+ crtc_bounds(b, &bl, &br, &bt, &bb);
-+
-+ cl = max(al, bl);
-+ cr = min(ar, br);
-+ ct = max(at, bt);
-+ cb = min(ab, bb);
-+
-+ return (cl <= cr) && (ct <= cb);
-+}
-+
-+/* Depth-first search and mark all CRTCs reachable from cur */
-+static void
-+mark_crtcs (rrScrPrivPtr pScrPriv, int *reachable, int cur)
-+{
-+ int i;
-+ reachable[cur] = TRUE;
-+ for (i = 0; i < pScrPriv->numCrtcs; ++i) {
-+ if (reachable[i] || !pScrPriv->crtcs[i]->mode)
-+ continue;
-+ if (crtcs_adjacent(pScrPriv->crtcs[cur], pScrPriv->crtcs[i]))
-+ mark_crtcs(pScrPriv, reachable, i);
-+ }
-+}
-+
-+static void
-+RRComputeContiguity (ScreenPtr pScreen)
-+{
-+ rrScrPriv(pScreen);
-+ Bool discontiguous = TRUE;
-+ int i, n = pScrPriv->numCrtcs;
-+
-+ int *reachable = calloc(n, sizeof(int));
-+ if (!reachable)
-+ goto out;
-+
-+ /* Find first enabled CRTC and start search for reachable CRTCs from it */
-+ for (i = 0; i < n; ++i) {
-+ if (pScrPriv->crtcs[i]->mode) {
-+ mark_crtcs(pScrPriv, reachable, i);
-+ break;
-+ }
-+ }
-+
-+ /* Check that all enabled CRTCs were marked as reachable */
-+ for (i = 0; i < n; ++i)
-+ if (pScrPriv->crtcs[i]->mode && !reachable[i])
-+ goto out;
-+
-+ discontiguous = FALSE;
-+
-+out:
-+ free(reachable);
-+ pScrPriv->discontiguous = discontiguous;
-+}
-+
- /*
- * Request that the Crtc be reconfigured
- */
-@@ -306,6 +394,7 @@ RRCrtcSet (RRCrtcPtr crtc,
- {
- ScreenPtr pScreen = crtc->pScreen;
- Bool ret = FALSE;
-+ Bool recompute = TRUE;
- rrScrPriv(pScreen);
-
- /* See if nothing changed */
-@@ -318,6 +407,7 @@ RRCrtcSet (RRCrtcPtr crtc,
- !RRCrtcPendingProperties (crtc) &&
- !RRCrtcPendingTransform (crtc))
- {
-+ recompute = FALSE;
- ret = TRUE;
- }
- else
-@@ -381,6 +471,10 @@ RRCrtcSet (RRCrtcPtr crtc,
- RRPostPendingProperties (outputs[o]);
- }
- }
-+
-+ if (recompute)
-+ RRComputeContiguity(pScreen);
-+
- return ret;
- }
-
-@@ -1349,3 +1443,64 @@ ProcRRGetCrtcTransform (ClientPtr client)
- free(reply);
- return Success;
- }
-+
-+void
-+RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x, int *y)
-+{
-+ rrScrPriv (pScreen);
-+ int i;
-+
-+ /* intentional dead space -> let it float */
-+ if (pScrPriv->discontiguous)
-+ return;
-+
-+ /* if we're moving inside a crtc, we're fine */
-+ for (i = 0; i < pScrPriv->numCrtcs; i++) {
-+ RRCrtcPtr crtc = pScrPriv->crtcs[i];
-+
-+ int left, right, top, bottom;
-+
-+ if (!crtc->mode)
-+ continue;
-+
-+ crtc_bounds(crtc, &left, &right, &top, &bottom);
-+
-+ if ((*x >= left) && (*x <= right) && (*y >= top) && (*y <= bottom))
-+ return;
-+ }
-+
-+ /* if we're trying to escape, clamp to the CRTC we're coming from */
-+ for (i = 0; i < pScrPriv->numCrtcs; i++) {
-+ RRCrtcPtr crtc = pScrPriv->crtcs[i];
-+ int nx, ny;
-+ int left, right, top, bottom;
-+
-+ if (!crtc->mode)
-+ continue;
-+
-+ crtc_bounds(crtc, &left, &right, &top, &bottom);
-+ miPointerGetPosition(pDev, &nx, &ny);
-+
-+ if ((nx >= left) && (nx <= right) && (ny >= top) && (ny <= bottom)) {
-+ if ((*x <= left) || (*x >= right)) {
-+ int dx = *x - nx;
-+
-+ if (dx > 0)
-+ *x = right;
-+ else if (dx < 0)
-+ *x = left;
-+ }
-+
-+ if ((*y <= top) || (*y >= bottom)) {
-+ int dy = *y - ny;
-+
-+ if (dy > 0)
-+ *y = bottom;
-+ else if (dy < 0)
-+ *y = top;
-+ }
-+
-+ return;
-+ }
-+ }
-+}
-diff --git a/test/Makefile.am b/test/Makefile.am
-index 456221e..ccdb859 100644
---- a/test/Makefile.am
-+++ b/test/Makefile.am
-@@ -1,6 +1,6 @@
- if UNITTESTS
- SUBDIRS= . xi2
--check_PROGRAMS = xkb input xtest
-+check_PROGRAMS = xkb input xtest list fixes
- check_LTLIBRARIES = libxservertest.la
-
- TESTS=$(check_PROGRAMS)
-@@ -16,6 +16,8 @@ endif
- xkb_LDADD=$(TEST_LDADD)
- input_LDADD=$(TEST_LDADD)
- xtest_LDADD=$(TEST_LDADD)
-+list_LDADD=$(TEST_LDADD)
-+fixes_LDADD=$(TEST_LDADD)
-
- libxservertest_la_LIBADD = \
- $(XSERVER_LIBS) \
-diff --git a/xfixes/cursor.c b/xfixes/cursor.c
-index fb608f6..5c55c95 100644
---- a/xfixes/cursor.c
-+++ b/xfixes/cursor.c
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright 2010 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
-@@ -50,13 +51,16 @@
- #include "cursorstr.h"
- #include "dixevents.h"
- #include "servermd.h"
-+#include "mipointer.h"
- #include "inputstr.h"
- #include "windowstr.h"
- #include "xace.h"
-+#include "list.h"
-
- static RESTYPE CursorClientType;
- static RESTYPE CursorHideCountType;
- static RESTYPE CursorWindowType;
-+RESTYPE PointerBarrierType;
- static CursorPtr CursorCurrent[MAXDEVICES];
-
- static DevPrivateKeyRec CursorScreenPrivateKeyRec;
-@@ -107,6 +111,14 @@ typedef struct _CursorHideCountRec {
- XID resource;
- } CursorHideCountRec;
-
-+typedef struct PointerBarrierClient *PointerBarrierClientPtr;
-+
-+struct PointerBarrierClient {
-+ ScreenPtr screen;
-+ struct PointerBarrier barrier;
-+ struct list entry;
-+};
-+
- /*
- * Wrap DisplayCursor to catch cursor change events
- */
-@@ -114,7 +126,9 @@ typedef struct _CursorHideCountRec {
- typedef struct _CursorScreen {
- DisplayCursorProcPtr DisplayCursor;
- CloseScreenProcPtr CloseScreen;
-+ ConstrainCursorHarderProcPtr ConstrainCursorHarder;
- CursorHideCountPtr pCursorHideCounts;
-+ struct list barriers;
- } CursorScreenRec, *CursorScreenPtr;
-
- #define GetCursorScreen(s) ((CursorScreenPtr)dixLookupPrivate(&(s)->devPrivates, CursorScreenPrivateKey))
-@@ -184,9 +198,11 @@ CursorCloseScreen (int index, ScreenPtr pScreen)
- Bool ret;
- CloseScreenProcPtr close_proc;
- DisplayCursorProcPtr display_proc;
-+ ConstrainCursorHarderProcPtr constrain_proc;
-
- Unwrap (cs, pScreen, CloseScreen, close_proc);
- Unwrap (cs, pScreen, DisplayCursor, display_proc);
-+ Unwrap (cs, pScreen, ConstrainCursorHarder, constrain_proc);
- deleteCursorHideCountsForScreen(pScreen);
- ret = (*pScreen->CloseScreen) (index, pScreen);
- free(cs);
-@@ -1029,6 +1045,391 @@ CursorFreeWindow (pointer data, XID id)
- return 1;
- }
-
-+static BOOL
-+barrier_is_horizontal(const struct PointerBarrier *barrier)
-+{
-+ return barrier->y1 == barrier->y2;
-+}
-+
-+static BOOL
-+barrier_is_vertical(const struct PointerBarrier *barrier)
-+{
-+ return barrier->x1 == barrier->x2;
-+}
-+
-+/**
-+ * @return The set of barrier movement directions the movement vector
-+ * x1/y1 → x2/y2 represents.
-+ */
-+int
-+barrier_get_direction(int x1, int y1, int x2, int y2)
-+{
-+ int direction = 0;
-+
-+ /* which way are we trying to go */
-+ if (x2 > x1)
-+ direction |= BarrierPositiveX;
-+ if (x2 < x1)
-+ direction |= BarrierNegativeX;
-+ if (y2 > y1)
-+ direction |= BarrierPositiveY;
-+ if (y2 < y1)
-+ direction |= BarrierNegativeY;
-+
-+ return direction;
-+}
-+
-+/**
-+ * Test if the barrier may block movement in the direction defined by
-+ * x1/y1 → x2/y2. This function only tests whether the directions could be
-+ * blocked, it does not test if the barrier actually blocks the movement.
-+ *
-+ * @return TRUE if the barrier blocks the direction of movement or FALSE
-+ * otherwise.
-+ */
-+BOOL
-+barrier_is_blocking_direction(const struct PointerBarrier *barrier, int direction)
-+{
-+ /* Barriers define which way is ok, not which way is blocking */
-+ return (barrier->directions & direction) != direction;
-+}
-+
-+/**
-+ * Test if the movement vector x1/y1 → x2/y2 is intersecting with the
-+ * barrier. A movement vector with the startpoint or endpoint on the barrier
-+ * itself counts as intersecting.
-+ *
-+ * @param x1 X start coordinate of movement vector
-+ * @param y1 Y start coordinate of movement vector
-+ * @param x2 X end coordinate of movement vector
-+ * @param y2 Y end coordinate of movement vector
-+ * @param[out] distance The distance between the start point and the
-+ * intersection with the barrier (if applicable).
-+ * @return TRUE if the barrier intersects with the given vector
-+ */
-+BOOL
-+barrier_is_blocking(const struct PointerBarrier *barrier,
-+ int x1, int y1, int x2, int y2,
-+ double *distance)
-+{
-+ BOOL rc = FALSE;
-+ float ua, ub, ud;
-+ int dir = barrier_get_direction(x1, y1, x2, y2);
-+
-+ /* Algorithm below doesn't handle edge cases well, hence the extra
-+ * checks. */
-+ if (barrier_is_vertical(barrier)) {
-+ /* handle immediate barrier adjacency, moving away */
-+ if (dir & BarrierPositiveX && x1 == barrier->x1)
-+ return FALSE;
-+ if (dir & BarrierNegativeX && x1 == (barrier->x1 - 1))
-+ return FALSE;
-+ /* startpoint on barrier */
-+ if (x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) {
-+ *distance = 0;
-+ return TRUE;
-+ }
-+ /* endpoint on barrier */
-+ if (x2 == barrier->x1 && y2 >= barrier->y1 && y2 <= barrier->y2) {
-+ *distance = abs(x2 - x1);
-+ return TRUE;
-+ }
-+ } else {
-+ /* handle immediate barrier adjacency, moving away */
-+ if (dir & BarrierPositiveY && y1 == barrier->y1)
-+ return FALSE;
-+ if (dir & BarrierNegativeY && y1 == (barrier->y1 - 1))
-+ return FALSE;
-+ /* startpoint on barrier */
-+ if (y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) {
-+ *distance = 0;
-+ return TRUE;
-+ }
-+ /* endpoint on barrier */
-+ if (y2 == barrier->y1 && x2 >= barrier->x1 && x2 <= barrier->x2) {
-+ *distance = abs(y2 - y1);
-+ return TRUE;
-+ }
-+ }
-+
-+ /* not an edge case, compute distance */
-+ ua = 0;
-+ ud = (barrier->y2 - barrier->y1) * (x2 - x1) - (barrier->x2 - barrier->x1) * (y2 - y1);
-+ if (ud != 0) {
-+ ua = ((barrier->x2 - barrier->x1) * (y1 - barrier->y1) -
-+ (barrier->y2 - barrier->y1) * (x1 - barrier->x1)) / ud;
-+ ub = ((x2 - x1) * (y1 - barrier->y1) -
-+ (y2 - y1) * (x1 - barrier->x1)) / ud;
-+ if (ua < 0 || ua > 1 || ub < 0 || ub > 1)
-+ ua = 0;
-+ }
-+
-+ if (ua > 0 && ua <= 1)
-+ {
-+ double ix = barrier->x1 + ua * (barrier->x2 - barrier->x1);
-+ double iy = barrier->y1 + ua * (barrier->y2 - barrier->y1);
-+
-+ *distance = sqrt(pow(x1 - ix, 2) + pow(y1 - iy, 2));
-+ rc = TRUE;
-+ }
-+
-+ return rc;
-+}
-+
-+/**
-+ * Find the nearest barrier that is blocking movement from x1/y1 to x2/y2.
-+ *
-+ * @param dir Only barriers blocking movement in direction dir are checked
-+ * @param x1 X start coordinate of movement vector
-+ * @param y1 Y start coordinate of movement vector
-+ * @param x2 X end coordinate of movement vector
-+ * @param y2 Y end coordinate of movement vector
-+ * @return The barrier nearest to the movement origin that blocks this movement.
-+ */
-+static struct PointerBarrier*
-+barrier_find_nearest(CursorScreenPtr cs, int dir,
-+ int x1, int y1, int x2, int y2)
-+{
-+ struct PointerBarrierClient *c;
-+ struct PointerBarrier *nearest = NULL;
-+ double min_distance = INT_MAX; /* can't get higher than that in X anyway */
-+
-+ list_for_each_entry(c, &cs->barriers, entry) {
-+ struct PointerBarrier *b = &c->barrier;
-+ double distance;
-+
-+ if (!barrier_is_blocking_direction(b, dir))
-+ continue;
-+
-+ if (barrier_is_blocking(b, x1, y1, x2, y2, &distance))
-+ {
-+ if (min_distance > distance)
-+ {
-+ min_distance = distance;
-+ nearest = b;
-+ }
-+ }
-+ }
-+
-+ return nearest;
-+}
-+
-+/**
-+ * Clamp to the given barrier given the movement direction specified in dir.
-+ *
-+ * @param barrier The barrier to clamp to
-+ * @param dir The movement direction
-+ * @param[out] x The clamped x coordinate.
-+ * @param[out] y The clamped x coordinate.
-+ */
-+void
-+barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y)
-+{
-+ if (barrier_is_vertical(barrier)) {
-+ if ((dir & BarrierNegativeX) & ~barrier->directions)
-+ *x = barrier->x1;
-+ if ((dir & BarrierPositiveX) & ~barrier->directions)
-+ *x = barrier->x1 - 1;
-+ }
-+ if (barrier_is_horizontal(barrier))
-+ {
-+ if ((dir & BarrierNegativeY) & ~barrier->directions)
-+ *y = barrier->y1;
-+ if ((dir & BarrierPositiveY) & ~barrier->directions)
-+ *y = barrier->y1 - 1;
-+ }
-+}
-+
-+static void
-+CursorConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, int *x, int *y)
-+{
-+ CursorScreenPtr cs = GetCursorScreen(screen);
-+
-+ if (!list_is_empty(&cs->barriers) && !IsFloating(dev) && mode == Relative) {
-+ int ox, oy;
-+ int dir;
-+ struct PointerBarrier *nearest = NULL;
-+
-+ /* where are we coming from */
-+ miPointerGetPosition(dev, &ox, &oy);
-+
-+ /* How this works:
-+ * Given the origin and the movement vector, get the nearest barrier
-+ * to the origin that is blocking the movement.
-+ * Clamp to that barrier.
-+ * Then, check from the clamped position to the original
-+ * destination, again finding the nearest barrier and clamping.
-+ */
-+ dir = barrier_get_direction(ox, oy, *x, *y);
-+
-+ nearest = barrier_find_nearest(cs, dir, ox, oy, *x, *y);
-+ if (nearest) {
-+ barrier_clamp_to_barrier(nearest, dir, x, y);
-+
-+ if (barrier_is_vertical(nearest)) {
-+ dir &= ~(BarrierNegativeX | BarrierPositiveX);
-+ ox = *x;
-+ } else if (barrier_is_horizontal(nearest)) {
-+ dir &= ~(BarrierNegativeY | BarrierPositiveY);
-+ oy = *y;
-+ }
-+
-+ nearest = barrier_find_nearest(cs, dir, ox, oy, *x, *y);
-+ if (nearest) {
-+ barrier_clamp_to_barrier(nearest, dir, x, y);
-+ }
-+ }
-+ }
-+
-+ if (cs->ConstrainCursorHarder) {
-+ screen->ConstrainCursorHarder = cs->ConstrainCursorHarder;
-+ screen->ConstrainCursorHarder(dev, screen, mode, x, y);
-+ screen->ConstrainCursorHarder = CursorConstrainCursorHarder;
-+ }
-+}
-+
-+static struct PointerBarrierClient *
-+CreatePointerBarrierClient(ScreenPtr screen, ClientPtr client,
-+ xXFixesCreatePointerBarrierReq *stuff)
-+{
-+ CursorScreenPtr cs = GetCursorScreen(screen);
-+ struct PointerBarrierClient *ret = malloc(sizeof(*ret));
-+
-+ if (ret) {
-+ ret->screen = screen;
-+ ret->barrier.x1 = min(stuff->x1, stuff->x2);
-+ ret->barrier.x2 = max(stuff->x1, stuff->x2);
-+ ret->barrier.y1 = min(stuff->y1, stuff->y2);
-+ ret->barrier.y2 = max(stuff->y1, stuff->y2);
-+ ret->barrier.directions = stuff->directions & 0x0f;
-+ if (barrier_is_horizontal(&ret->barrier))
-+ ret->barrier.directions &= ~(BarrierPositiveX | BarrierNegativeX);
-+ if (barrier_is_vertical(&ret->barrier))
-+ ret->barrier.directions &= ~(BarrierPositiveY | BarrierNegativeY);
-+ list_add(&ret->entry, &cs->barriers);
-+ }
-+
-+ return ret;
-+}
-+
-+int
-+ProcXFixesCreatePointerBarrier (ClientPtr client)
-+{
-+ int err;
-+ WindowPtr pWin;
-+ struct PointerBarrierClient *barrier;
-+ struct PointerBarrier b;
-+ REQUEST (xXFixesCreatePointerBarrierReq);
-+
-+ REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq);
-+ LEGAL_NEW_RESOURCE(stuff->barrier, client);
-+
-+ err = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
-+ if (err != Success) {
-+ client->errorValue = stuff->window;
-+ return err;
-+ }
-+
-+ /* This sure does need fixing. */
-+ if (stuff->num_devices)
-+ return BadImplementation;
-+
-+ b.x1 = stuff->x1;
-+ b.x2 = stuff->x2;
-+ b.y1 = stuff->y1;
-+ b.y2 = stuff->y2;
-+
-+ if (!barrier_is_horizontal(&b) && !barrier_is_vertical(&b))
-+ return BadValue;
-+
-+ /* no 0-sized barriers */
-+ if (barrier_is_horizontal(&b) && barrier_is_vertical(&b))
-+ return BadValue;
-+
-+ if (!(barrier = CreatePointerBarrierClient(pWin->drawable.pScreen,
-+ client, stuff)))
-+ return BadAlloc;
-+
-+ if (!AddResource(stuff->barrier, PointerBarrierType, &barrier->barrier))
-+ return BadAlloc;
-+
-+ return Success;
-+}
-+
-+int
-+SProcXFixesCreatePointerBarrier (ClientPtr client)
-+{
-+ int n;
-+ REQUEST(xXFixesCreatePointerBarrierReq);
-+
-+ swaps(&stuff->length, n);
-+ REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq);
-+ swapl(&stuff->barrier, n);
-+ swapl(&stuff->window, n);
-+ swaps(&stuff->x1, n);
-+ swaps(&stuff->y1, n);
-+ swaps(&stuff->x2, n);
-+ swaps(&stuff->y2, n);
-+ swapl(&stuff->directions, n);
-+ return ProcXFixesVector[stuff->xfixesReqType](client);
-+}
-+
-+static int
-+CursorFreeBarrier(void *data, XID id)
-+{
-+ struct PointerBarrierClient *b = NULL, *barrier;
-+ ScreenPtr screen;
-+ CursorScreenPtr cs;
-+
-+ barrier = container_of(data, struct PointerBarrierClient, barrier);
-+ screen = barrier->screen;
-+ cs = GetCursorScreen(screen);
-+
-+ /* find and unlink from the screen private */
-+ list_for_each_entry(b, &cs->barriers, entry) {
-+ if (b == barrier) {
-+ list_del(&b->entry);
-+ break;
-+ }
-+ }
-+
-+ free(barrier);
-+ return Success;
-+}
-+
-+int
-+ProcXFixesDestroyPointerBarrier (ClientPtr client)
-+{
-+ int err;
-+ void *barrier;
-+ REQUEST (xXFixesDestroyPointerBarrierReq);
-+
-+ REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
-+
-+ err = dixLookupResourceByType((void **)&barrier, stuff->barrier,
-+ PointerBarrierType, client,
-+ DixDestroyAccess);
-+ if (err != Success) {
-+ client->errorValue = stuff->barrier;
-+ return err;
-+ }
-+
-+ FreeResource(stuff->barrier, RT_NONE);
-+ return Success;
-+}
-+
-+int
-+SProcXFixesDestroyPointerBarrier (ClientPtr client)
-+{
-+ int n;
-+ REQUEST(xXFixesDestroyPointerBarrierReq);
-+
-+ swaps(&stuff->length, n);
-+ REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
-+ swapl(&stuff->barrier, n);
-+ return ProcXFixesVector[stuff->xfixesReqType](client);
-+}
-+
- Bool
- XFixesCursorInit (void)
- {
-@@ -1048,8 +1449,10 @@ XFixesCursorInit (void)
- cs = (CursorScreenPtr) calloc(1, sizeof (CursorScreenRec));
- if (!cs)
- return FALSE;
-+ list_init(&cs->barriers);
- Wrap (cs, pScreen, CloseScreen, CursorCloseScreen);
- Wrap (cs, pScreen, DisplayCursor, CursorDisplayCursor);
-+ Wrap (cs, pScreen, ConstrainCursorHarder, CursorConstrainCursorHarder);
- cs->pCursorHideCounts = NULL;
- SetCursorScreen (pScreen, cs);
- }
-@@ -1059,7 +1462,10 @@ XFixesCursorInit (void)
- "XFixesCursorHideCount");
- CursorWindowType = CreateNewResourceType(CursorFreeWindow,
- "XFixesCursorWindow");
-+ PointerBarrierType = CreateNewResourceType(CursorFreeBarrier,
-+ "XFixesPointerBarrier");
-
-- return CursorClientType && CursorHideCountType && CursorWindowType;
-+ return CursorClientType && CursorHideCountType && CursorWindowType &&
-+ PointerBarrierType;
- }
-
-diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
-index e8c7bf1..a57884b 100644
---- a/xfixes/xfixes.c
-+++ b/xfixes/xfixes.c
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright 2010 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
-@@ -47,10 +48,6 @@
-
- #include "xfixesint.h"
- #include "protocol-versions.h"
--/*
-- * Must use these instead of the constants from xfixeswire.h. They advertise
-- * what we implement, not what the protocol headers define.
-- */
-
- static unsigned char XFixesReqCode;
- int XFixesEventBase;
-@@ -97,11 +94,12 @@ ProcXFixesQueryVersion(ClientPtr client)
-
- /* Major version controls available requests */
- static const int version_requests[] = {
-- X_XFixesQueryVersion, /* before client sends QueryVersion */
-- X_XFixesGetCursorImage, /* Version 1 */
-- X_XFixesChangeCursorByName, /* Version 2 */
-- X_XFixesExpandRegion, /* Version 3 */
-- X_XFixesShowCursor, /* Version 4 */
-+ X_XFixesQueryVersion, /* before client sends QueryVersion */
-+ X_XFixesGetCursorImage, /* Version 1 */
-+ X_XFixesChangeCursorByName, /* Version 2 */
-+ X_XFixesExpandRegion, /* Version 3 */
-+ X_XFixesShowCursor, /* Version 4 */
-+ X_XFixesDestroyPointerBarrier, /* Version 5 */
- };
-
- #define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0]))
-@@ -142,6 +140,9 @@ int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
- /*************** Version 4 ****************/
- ProcXFixesHideCursor,
- ProcXFixesShowCursor,
-+/*************** Version 5 ****************/
-+ ProcXFixesCreatePointerBarrier,
-+ ProcXFixesDestroyPointerBarrier,
- };
-
- static int
-@@ -205,6 +206,9 @@ static int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
- /*************** Version 4 ****************/
- SProcXFixesHideCursor,
- SProcXFixesShowCursor,
-+/*************** Version 5 ****************/
-+ SProcXFixesCreatePointerBarrier,
-+ SProcXFixesDestroyPointerBarrier,
- };
-
- static int
-@@ -260,6 +264,8 @@ XFixesExtensionInit(void)
- EventSwapVector[XFixesEventBase + XFixesCursorNotify] =
- (EventSwapPtr) SXFixesCursorNotifyEvent;
- SetResourceTypeErrorValue(RegionResType, XFixesErrorBase + BadRegion);
-+ SetResourceTypeErrorValue(PointerBarrierType,
-+ XFixesErrorBase + BadBarrier);
- }
- }
-
-diff --git a/xfixes/xfixes.h b/xfixes/xfixes.h
-index 1638350..5765e64 100644
---- a/xfixes/xfixes.h
-+++ b/xfixes/xfixes.h
-@@ -30,6 +30,7 @@
- #include "resource.h"
-
- extern _X_EXPORT RESTYPE RegionResType;
-+extern _X_EXPORT RESTYPE PointerBarrierType;
- extern _X_EXPORT int XFixesErrorBase;
-
- #define VERIFY_REGION(pRegion, rid, client, mode) \
-@@ -51,5 +52,21 @@ extern _X_EXPORT int XFixesErrorBase;
- extern _X_EXPORT RegionPtr
- XFixesRegionCopy (RegionPtr pRegion);
-
-+struct PointerBarrier {
-+ CARD16 x1, x2, y1, y2;
-+ CARD32 directions;
-+};
-+
-+
-+extern int
-+barrier_get_direction(int, int, int, int);
-+extern BOOL
-+barrier_is_blocking(const struct PointerBarrier*, int, int, int, int, double*);
-+extern BOOL
-+barrier_is_blocking_direction(const struct PointerBarrier*, int);
-+extern void
-+barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y);
-+
-+
-
- #endif /* _XFIXES_H_ */
-diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h
-index d005369..6ba276e 100644
---- a/xfixes/xfixesint.h
-+++ b/xfixes/xfixesint.h
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright 2010 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
-@@ -278,6 +279,21 @@ ProcXFixesShowCursor (ClientPtr client);
- int
- SProcXFixesShowCursor (ClientPtr client);
-
-+/* Version 5 */
-+
-+int
-+ProcXFixesCreatePointerBarrier (ClientPtr client);
-+
-+int
-+SProcXFixesCreatePointerBarrier (ClientPtr client);
-+
-+int
-+ProcXFixesDestroyPointerBarrier (ClientPtr client);
-+
-+int
-+SProcXFixesDestroyPointerBarrier (ClientPtr client);
-+
-+/* Xinerama */
- extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests])(ClientPtr);
- void PanoramiXFixesInit (void);
- void PanoramiXFixesReset (void);
---
-1.7.4
-
diff --git a/testing/xorg-server/xvfb-run b/testing/xorg-server/xvfb-run
deleted file mode 100644
index 4c2f4e0d3..000000000
--- a/testing/xorg-server/xvfb-run
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/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
deleted file mode 100644
index 137d3a196..000000000
--- a/testing/xorg-server/xvfb-run.1
+++ /dev/null
@@ -1,282 +0,0 @@
-.\" $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: