summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-18 00:02:54 +0000
committerroot <root@rshg054.dnsready.net>2012-03-18 00:02:54 +0000
commitd14a25fc4f65ae3d6e62f4668e9cb88d74834255 (patch)
tree7c4f618283e9b502f0d9cfb5059ce38daa7738be
parent9a940818cc3edb82afac4d73a6474e6e3374f987 (diff)
Sun Mar 18 00:02:53 UTC 2012
-rw-r--r--community/calibre/PKGBUILD8
-rw-r--r--community/gpg-crypter/PKGBUILD19
-rw-r--r--community/gpsmanshp/PKGBUILD26
-rw-r--r--community/gtk2fontsel/PKGBUILD11
-rw-r--r--community/happy/PKGBUILD29
-rw-r--r--community/ibus-anthy/PKGBUILD6
-rw-r--r--community/ibus-unikey/PKGBUILD6
-rw-r--r--community/iftop/PKGBUILD19
-rw-r--r--community/jbig2dec/PKGBUILD21
-rw-r--r--community/kaa-base/PKGBUILD4
-rw-r--r--community/kaa-imlib2/PKGBUILD6
-rw-r--r--community/kaa-metadata/PKGBUILD4
-rw-r--r--community/lazarus/PKGBUILD8
-rw-r--r--community/libmatio/PKGBUILD6
-rw-r--r--community/mcdp/PKGBUILD5
-rw-r--r--community/mezogis/PKGBUILD11
-rw-r--r--community/mmsrip/PKGBUILD8
-rw-r--r--community/mp3unicode/PKGBUILD17
-rw-r--r--community/mtpfs/PKGBUILD10
-rw-r--r--community/musepack-tools/PKGBUILD10
-rw-r--r--community/mxml/PKGBUILD8
-rw-r--r--community/nmon/PKGBUILD21
-rw-r--r--community/noip/PKGBUILD14
-rw-r--r--community/parrot/PKGBUILD34
-rw-r--r--community/pigeonhole/PKGBUILD4
-rw-r--r--community/solfege/PKGBUILD4
-rw-r--r--community/sqlite2/PKGBUILD7
-rw-r--r--community/tightvnc/PKGBUILD44
-rw-r--r--community/xmms-pulse/PKGBUILD16
-rw-r--r--community/xmms2/PKGBUILD6
-rw-r--r--community/xnee/PKGBUILD7
-rw-r--r--community/xtmsplit/PKGBUILD7
-rw-r--r--core/e2fsprogs/PKGBUILD7
-rw-r--r--core/krb5/PKGBUILD37
-rw-r--r--core/pcmciautils/PKGBUILD12
-rw-r--r--core/udev/0001-reinstate-TIMEOUT-handling.patch126
-rw-r--r--core/udev/PKGBUILD18
-rw-r--r--core/util-linux/PKGBUILD7
-rw-r--r--extra/bftpd/PKGBUILD22
-rw-r--r--extra/clamav/PKGBUILD12
-rw-r--r--extra/dovecot/PKGBUILD8
-rw-r--r--extra/fwbuilder/PKGBUILD10
-rw-r--r--extra/iptraf-ng/PKGBUILD5
-rw-r--r--extra/jhead/PKGBUILD6
-rw-r--r--extra/kdeadmin/PKGBUILD19
-rw-r--r--extra/kdebindings-python/PKGBUILD50
-rw-r--r--extra/kdegames/PKGBUILD8
-rw-r--r--extra/kdesdk/PKGBUILD6
-rw-r--r--extra/kshutdown/PKGBUILD13
-rw-r--r--extra/libmtp/PKGBUILD10
-rw-r--r--extra/libreoffice/PKGBUILD545
-rw-r--r--extra/libreoffice/libreoffice.install9
-rw-r--r--extra/libx11/PKGBUILD6
-rw-r--r--extra/libxt/PKGBUILD14
-rw-r--r--extra/samba/PKGBUILD4
-rw-r--r--extra/systemd/0001-util-never-follow-symlinks-in-rm_rf_children.patch32
-rw-r--r--extra/systemd/PKGBUILD20
-rw-r--r--extra/xf86-input-mouse/PKGBUILD8
-rw-r--r--extra/xf86-input-synaptics/PKGBUILD11
-rw-r--r--extra/xf86-input-synaptics/synaptics-Fix-inverted-circular-scrolling-direction.patch40
-rw-r--r--extra/zziplib/PKGBUILD11
-rw-r--r--multilib/lib32-libx11/PKGBUILD6
-rw-r--r--testing/psmisc/PKGBUILD25
-rw-r--r--testing/xf86-video-mga/PKGBUILD8
-rw-r--r--testing/xf86-video-mga/git-fixes.patch4830
65 files changed, 5410 insertions, 941 deletions
diff --git a/community/calibre/PKGBUILD b/community/calibre/PKGBUILD
index 733288b0e..d43c88e55 100644
--- a/community/calibre/PKGBUILD
+++ b/community/calibre/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 67895 2012-03-15 23:14:18Z ebelanger $
+# $Id: PKGBUILD 67914 2012-03-16 09:03:50Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Petrov Roman <nwhisper@gmail.com>
# Contributor: Andrea Fagiani <andfagiani _at_ gmail dot com>
pkgname=calibre
-pkgver=0.8.42
-pkgrel=2
+pkgver=0.8.43
+pkgrel=1
pkgdesc="Ebook management application"
arch=('i686' 'x86_64')
url="http://calibre-ebook.com/"
@@ -21,7 +21,7 @@ install=calibre.install
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.xz"
'desktop_integration.patch'
'calibre-mount-helper')
-md5sums=('8353d4294984b8a3ff0981505e75eff2'
+md5sums=('9c9656b0881ef8013018ec4cf42b3119'
'253ce4fe5d01f8ff76b63cd3825755ea'
'675cd87d41342119827ef706055491e7')
diff --git a/community/gpg-crypter/PKGBUILD b/community/gpg-crypter/PKGBUILD
index 88787c6d0..b8b49c4ce 100644
--- a/community/gpg-crypter/PKGBUILD
+++ b/community/gpg-crypter/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 9138 2010-01-23 20:04:16Z jlichtblau $
+# $Id: PKGBUILD 67947 2012-03-16 11:29:44Z giovanni $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>
# Contributor: lp76 <l.peduto@gmail.com>
pkgname=gpg-crypter
pkgver=0.3.5
-pkgrel=4
+pkgrel=5
pkgdesc="A graphical front-end to GnuPG(GPG) using the GTK2 toolkit and libgpgme"
arch=('i686' 'x86_64')
url="http://gpg-crypter.sourceforge.net/"
@@ -19,18 +19,25 @@ md5sums=('be33140ae205b8a3f37217c1c2c0737a'
build() {
cd ${srcdir}/$pkgname-$pkgver
+ export CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
./configure --prefix=/usr
- make || return 1
+ make
+}
+
+package() {
+ cd ${srcdir}/$pkgname-$pkgver
+
make DESTDIR=${pkgdir} install
# icon
install -Dm644 ${srcdir}/$pkgname-$pkgver/pixmaps/$pkgname.png \
- ${pkgdir}/usr/share/pixmaps/$pkgname.png || return 1
+ ${pkgdir}/usr/share/pixmaps/$pkgname.png
# .desktop file
install -Dm644 ${srcdir}/$pkgname.desktop \
- ${pkgdir}/usr/share/applications/$pkgname.desktop || return 1
+ ${pkgdir}/usr/share/applications/$pkgname.desktop
# delete unneeded icon
- rm -rf ${pkgdir}/usr/share/$pkgname || return 1
+ rm -rf ${pkgdir}/usr/share/$pkgname
}
diff --git a/community/gpsmanshp/PKGBUILD b/community/gpsmanshp/PKGBUILD
index 36e723e7e..972e8f837 100644
--- a/community/gpsmanshp/PKGBUILD
+++ b/community/gpsmanshp/PKGBUILD
@@ -1,23 +1,25 @@
-# $Id: PKGBUILD 21514 2010-07-16 14:22:13Z tdziedzic $
+# $Id: PKGBUILD 67943 2012-03-16 11:12:57Z giovanni $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
pkgname=gpsmanshp
-pkgver=1.2
-pkgrel=4
-pkgdesc='A Tcl package to read and write shapefiles'
+pkgver=1.2.1
+pkgrel=1
+pkgdesc="A Tcl package to read and write shapefiles"
arch=('i686' 'x86_64')
-url='http://www.ncc.up.pt/gpsmanshp'
+url="http://gpsmanshp.sourceforge.net/"
license=('GPL')
-depends=('bash' 'tcl' 'shapelib')
-source=("http://www.ncc.up.pt/${pkgname}/${pkgname}_${pkgver}.tgz")
-md5sums=('b32e16afe3e306cf991ea38713fd0c9e')
+depends=('glibc' 'shapelib' 'tcl')
+source=("http://sourceforge.net/projects/${pkgname}/files/distr/${pkgname}_${pkgver}.tgz")
+md5sums=('c2876d7f67c8215b46b336b5b859d49f')
build() {
- cd ${pkgname}_${pkgver}
+ cd "${pkgname}_${pkgver}"
- mv Makefile8.4.4 Makefile
+ mv Makefile8.5 Makefile
+ sed -i -e "s:shapefil.h:libshp/shapefil.h:g" gpsmanshp.c
- mkdir -p ${pkgdir}/usr/lib/
+ install -d ${pkgdir}/usr/lib/
# set install path
sed -i -e "s|/usr/lib/tcl\$(TCLVERSION)|${pkgdir}/usr/lib/gpsmanshp|g" Makefile
@@ -29,7 +31,7 @@ build() {
}
package() {
- cd ${pkgname}_${pkgver}
+ cd "${pkgname}_${pkgver}"
make install
}
diff --git a/community/gtk2fontsel/PKGBUILD b/community/gtk2fontsel/PKGBUILD
index 9cabdf360..4abc01cbf 100644
--- a/community/gtk2fontsel/PKGBUILD
+++ b/community/gtk2fontsel/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 22401 2010-07-21 18:22:42Z jlichtblau $
+# $Id: PKGBUILD 67937 2012-03-16 10:28:59Z giovanni $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
pkgname=gtk2fontsel
pkgver=0.1
-pkgrel=3
+pkgrel=4
pkgdesc="Font selection and preview tool"
arch=('i686' 'x86_64')
url="http://gtk2fontsel.sourceforge.net/"
@@ -17,6 +17,11 @@ build() {
cd ${srcdir}/$pkgname-$pkgver
./configure --prefix=/usr
- make || return 1
+ make
+}
+
+package() {
+ cd ${srcdir}/$pkgname-$pkgver
+
make prefix=${pkgdir}/usr install
}
diff --git a/community/happy/PKGBUILD b/community/happy/PKGBUILD
new file mode 100644
index 000000000..783bb51d6
--- /dev/null
+++ b/community/happy/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 67990 2012-03-16 18:40:06Z tdziedzic $
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Contributor: simo <simo@archlinux.org>
+# Contributor: Vesa Kaihlavirta <vegai@iki.fi>
+
+pkgname=happy
+pkgver=1.18.9
+pkgrel=4
+pkgdesc="The Parser Generator for Haskell"
+url="http://www.haskell.org/happy/"
+arch=('i686' 'x86_64')
+license=("custom:BSD3")
+depends=('gmp')
+makedepends=('ghc=7.4.1' 'haskell-mtl=2.0.1.0-4')
+source=(http://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz)
+md5sums=('aeb565fe572f979f15a24db0df2de37d')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ runhaskell Setup.lhs configure -O --prefix=/usr
+ runhaskell Setup.lhs build
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ runhaskell Setup.lhs copy --destdir="${pkgdir}"
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/community/ibus-anthy/PKGBUILD b/community/ibus-anthy/PKGBUILD
index e6bda9859..c93ffb015 100644
--- a/community/ibus-anthy/PKGBUILD
+++ b/community/ibus-anthy/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 47888 2011-05-25 23:35:15Z ebelanger $
+# $Id: PKGBUILD 68017 2012-03-17 00:56:59Z ebelanger $
# Contributor: Rainy <rainylau(at)gmail(dot)com>
# Contributor: Lee.MaRS <leemars at gmail dot com>
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=ibus-anthy
-pkgver=1.2.6
+pkgver=1.2.7
pkgrel=1
pkgdesc="Japanese input method Anthy IMEngine for IBus Framework"
arch=('i686' 'x86_64')
@@ -14,7 +14,7 @@ depends=('ibus' 'anthy' 'python2')
makedepends=('swig' 'intltool')
options=('!libtool')
source=(http://ibus.googlecode.com/files/${pkgname}-${pkgver}.tar.gz)
-md5sums=('894c7311f4d5c96b1fdb8b3795446ead')
+md5sums=('091a13ff950171981768463993ffb683')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/community/ibus-unikey/PKGBUILD b/community/ibus-unikey/PKGBUILD
index c59d1e645..3415bd9dc 100644
--- a/community/ibus-unikey/PKGBUILD
+++ b/community/ibus-unikey/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 55971 2011-09-27 06:50:51Z ebelanger $
+# $Id: PKGBUILD 68023 2012-03-17 01:19:28Z ebelanger $
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Trương Xuân Tính <xuantinh at gmail dot com>
pkgname=ibus-unikey
-pkgver=0.6.0
+pkgver=0.6.1
pkgrel=1
pkgdesc='IBus module for Vietnamese Keyboard'
arch=('i686' 'x86_64')
@@ -12,7 +12,7 @@ url='http://code.google.com/p/ibus-unikey/'
depends=('ibus')
makedepends=('intltool')
source=("http://ibus-unikey.googlecode.com/files/${pkgname}-${pkgver}.tar.gz")
-md5sums=('cef0e737ea3fba5bf79642bfd85d44b3')
+md5sums=('3bae6df0d4609a8c438c246030b9a61e')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/community/iftop/PKGBUILD b/community/iftop/PKGBUILD
index 763ae31ed..18c013068 100644
--- a/community/iftop/PKGBUILD
+++ b/community/iftop/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 17240 2010-05-22 14:21:13Z daenyth $
+# $Id: PKGBUILD 67935 2012-03-16 10:23:32Z giovanni $
# Maintainer: Daenyth <Daenyth+Arch at gmail dot com>
# Contributor: Jeff Mickey <jeff@archlinux.org>
# Contributor: Alexander Mieland (dma147) <dma147@linux-stats.org>
@@ -6,21 +6,26 @@
pkgname=iftop
pkgver=0.17
-pkgrel=9
+pkgrel=10
pkgdesc="iftop does for network usage what top(1) does for CPU usage"
arch=('i686' 'x86_64')
url="http://www.ex-parrot.com/~pdw/iftop/"
license=('GPL')
-depends=('libpcap>=1.0.0' 'ncurses')
+depends=('libpcap' 'ncurses')
options=('!makeflags')
source=(http://www.ex-parrot.com/~pdw/$pkgname/download/$pkgname-$pkgver.tar.gz)
md5sums=('062bc8fb3856580319857326e0b8752d')
build() {
cd "$srcdir/$pkgname-$pkgver"
- ./configure --prefix=/usr --mandir=/usr/share/man || return 1
- make || return 1
- make DESTDIR="$pkgdir" install
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
+ make
}
-# vim:set ts=2 sw=2 et:
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+}
diff --git a/community/jbig2dec/PKGBUILD b/community/jbig2dec/PKGBUILD
index ea49b8be4..24cc37fe5 100644
--- a/community/jbig2dec/PKGBUILD
+++ b/community/jbig2dec/PKGBUILD
@@ -1,24 +1,29 @@
-# $Id: PKGBUILD 64909 2012-02-18 20:14:11Z bpiotrowski $
-# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
+# $Id: PKGBUILD 67870 2012-03-15 15:48:59Z bpiotrowski $
+# Maintainer: Bartłomiej Piotrowski
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
pkgname=jbig2dec
pkgver=0.11
-pkgrel=3
+pkgrel=5
pkgdesc="decoder implementation of the JBIG2 image compression format"
arch=('x86_64' 'i686')
url="http://jbig2dec.sourceforge.net/"
license=('GPL3')
-source=(http://ghostscript.com/~giles/jbig2/$pkgname/$pkgname-$pkgver.tar.gz)
-md5sums=('1f61e144852c86563fee6e5ddced63f1')
-depends=('glibc')
+depends=('glibc' 'libpng')
+source=(http://ghostscript.com/~giles/jbig2/$pkgname/$pkgname-$pkgver.tar.gz
+ $pkgname-$pkgver-libpng15.patch)
+md5sums=('1f61e144852c86563fee6e5ddced63f1'
+ '6d80db1f3a5581a5e38234b9ed599b20')
build() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$srcdir"/$pkgname-$pkgver
+ patch -Np0 -i "$srcdir"/$pkgname-$pkgver-libpng15.patch
+ autoreconf -fi
./configure --prefix=/usr
make
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$srcdir"/$pkgname-$pkgver
make DESTDIR="$pkgdir/" install
}
diff --git a/community/kaa-base/PKGBUILD b/community/kaa-base/PKGBUILD
index 06deb8f6d..89c535bc2 100644
--- a/community/kaa-base/PKGBUILD
+++ b/community/kaa-base/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 27071 2010-09-17 12:26:08Z schuay $
+# $Id: PKGBUILD 68025 2012-03-17 01:28:26Z giovanni $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: DonVla <donvla@users.sourceforge.net>
pkgname=kaa-base
pkgver=0.6.0
-pkgrel=3
+pkgrel=4
pkgdesc="KAA base package"
url="http://freevo.sourceforge.net/"
license=('GPL2')
diff --git a/community/kaa-imlib2/PKGBUILD b/community/kaa-imlib2/PKGBUILD
index a220f36be..bd6f33915 100644
--- a/community/kaa-imlib2/PKGBUILD
+++ b/community/kaa-imlib2/PKGBUILD
@@ -1,13 +1,13 @@
-# $Id: PKGBUILD 27187 2010-09-18 15:58:45Z schuay $
+# $Id: PKGBUILD 68027 2012-03-17 01:32:31Z giovanni $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: DonVla <donvla@users.sourceforge.net>
pkgname=kaa-imlib2
pkgver=0.2.3
-pkgrel=4
+pkgrel=5
pkgdesc="KAA imlib2 package"
url="http://freevo.sourceforge.net/"
-license=(GPL2)
+license=('GPL2')
depends=('imlib2' 'python2' 'kaa-base')
arch=('i686' 'x86_64')
source=(http://downloads.sourceforge.net/freevo/$pkgname-$pkgver.tar.gz)
diff --git a/community/kaa-metadata/PKGBUILD b/community/kaa-metadata/PKGBUILD
index 116766032..29be1626d 100644
--- a/community/kaa-metadata/PKGBUILD
+++ b/community/kaa-metadata/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 27187 2010-09-18 15:58:45Z schuay $
+# $Id: PKGBUILD 68029 2012-03-17 01:35:40Z giovanni $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: DonVla <donvla@users.sourceforge.net>
pkgname=kaa-metadata
pkgver=0.7.7
-pkgrel=3
+pkgrel=4
pkgdesc="KAA metadata package"
url="http://freevo.sourceforge.net/"
license=('GPL2')
diff --git a/community/lazarus/PKGBUILD b/community/lazarus/PKGBUILD
index 254d6f68f..515f5551c 100644
--- a/community/lazarus/PKGBUILD
+++ b/community/lazarus/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 61622 2012-01-04 22:29:04Z spupykin $
+# $Id: PKGBUILD 67923 2012-03-16 10:10:35Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jens Adam (byte/jra) <j_adam@web.de>
pkgname=lazarus
-pkgver=0.9.30.2
-pkgrel=2
+pkgver=0.9.30.4
+pkgrel=1
pkgdesc='Delphi-like IDE for FreePascal'
url='http://www.lazarus.freepascal.org/'
license=('GPL2' 'MPL' 'custom:LGPL')
@@ -13,7 +13,7 @@ depends=('fpc' 'fpc-src' 'gtk2')
#makedepends=(rpmextract)
options=('!emptydirs' '!makeflags')
source=(http://downloads.sourceforge.net/project/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20$pkgver/lazarus-$pkgver-src.tar.bz2)
-md5sums=('0dcf54613c2f9d38a32d183431e2dfc9')
+md5sums=('ebd40cdfdfc4b66d1ced7a0d48d6da84')
build() {
cd $srcdir/${pkgname}
diff --git a/community/libmatio/PKGBUILD b/community/libmatio/PKGBUILD
index 35563bd11..43744b2a6 100644
--- a/community/libmatio/PKGBUILD
+++ b/community/libmatio/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 59370 2011-11-23 21:07:37Z andrea $
+# $Id: PKGBUILD 67968 2012-03-16 13:07:02Z giovanni $
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=libmatio
pkgver=1.3.3
-pkgrel=2
+pkgrel=3
pkgdesc="A C library with a fortran 90/95 module interface for reading/writing MATLAB MAT-files"
arch=('i686' 'x86_64')
license=('LGPL')
@@ -19,7 +19,7 @@ build() {
cd $srcdir/matio-$pkgver
./bootstrap
./configure --prefix=/usr --enable-fortran --enable-shared
- make
+ make -j1
}
package() {
diff --git a/community/mcdp/PKGBUILD b/community/mcdp/PKGBUILD
index ffba24072..a59874434 100644
--- a/community/mcdp/PKGBUILD
+++ b/community/mcdp/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 56613 2011-10-09 07:12:22Z jlichtblau $
+# $Id: PKGBUILD 67966 2012-03-16 12:59:54Z giovanni $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Tino Reichardt <milky-archlinux@mcmilk.de>
@@ -6,11 +6,12 @@
pkgname=mcdp
pkgver=0.4b
-pkgrel=1
+pkgrel=2
pkgdesc="Small console cd player"
arch=('i686' 'x86_64')
url="http://www.mcmilk.de/projects/mcdp/"
license=('GPL')
+depends=('glibc')
makedepends=('dietlibc')
source=(http://www.mcmilk.de/projects/$pkgname/dl/${pkgname}-${pkgver}.tar.bz2)
sha256sums=('0faa031b07299b0fb2353306a669328c877717e1bc7e274e40c3d2612e103cab')
diff --git a/community/mezogis/PKGBUILD b/community/mezogis/PKGBUILD
index 988d38ae9..bed55dc27 100644
--- a/community/mezogis/PKGBUILD
+++ b/community/mezogis/PKGBUILD
@@ -1,18 +1,19 @@
-# $Id: PKGBUILD 27071 2010-09-17 12:26:08Z schuay $
+# $Id: PKGBUILD 67954 2012-03-16 12:03:52Z giovanni $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=mezogis
pkgver=0.1.5
-pkgrel=4
+pkgrel=5
pkgdesc="A GIS application to query and analyse spatial data"
arch=('i686' 'x86_64')
url="http://www.mezogis.org"
license=('GPL')
-depends=('pygtk' 'python-geotypes' 'postgis>=1.4')
-source=(http://www.mezogis.org/files/mezogis-$pkgver.tar.gz)
+depends=('pygtk' 'python-geotypes' 'postgis')
+source=("http://www.mezogis.org/files/mezogis-$pkgver.tar.gz")
md5sums=('1f886b849109a1a1bd3e165353b82368')
-build() {
+package() {
cd $srcdir/mezogis-$pkgver
# python2 fix
diff --git a/community/mmsrip/PKGBUILD b/community/mmsrip/PKGBUILD
index 19cf7ac6a..2d0314986 100644
--- a/community/mmsrip/PKGBUILD
+++ b/community/mmsrip/PKGBUILD
@@ -1,21 +1,23 @@
-# $Id: PKGBUILD 29248 2010-10-11 20:22:17Z jlichtblau $
+# $Id: PKGBUILD 67956 2012-03-16 12:10:10Z giovanni $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
pkgname=mmsrip
pkgver=0.7.0
-pkgrel=3
+pkgrel=4
pkgdesc="A downloader for the proprietary protocol MMS://"
arch=('i686' 'x86_64')
url="http://nbenoit.tuxfamily.org/projects.php?rq=mmsrip"
license=('GPL2')
+depends=('glibc')
source=(http://nbenoit.tuxfamily.org/projects/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=('498a5ec10a004481532eaceacdff3a10')
build() {
cd ${srcdir}/$pkgname-$pkgver
- ./configure --prefix=/usr --mandir=/usr/share/man
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
make
}
diff --git a/community/mp3unicode/PKGBUILD b/community/mp3unicode/PKGBUILD
index 15ad0a5de..d9122cba7 100644
--- a/community/mp3unicode/PKGBUILD
+++ b/community/mp3unicode/PKGBUILD
@@ -1,23 +1,28 @@
-# $Id: PKGBUILD 22433 2010-07-21 19:17:58Z jlichtblau $
+# $Id: PKGBUILD 67970 2012-03-16 13:11:55Z giovanni $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Zhukov Pavel <gelios@gmail.com>
pkgname=mp3unicode
pkgver=1.2
-pkgrel=4
+pkgrel=5
pkgdesc="A command line utility to convert ID3 tags in mp3 files between different encodings"
arch=('i686' 'x86_64')
url="http://mp3unicode.yellowsite.ru/"
license=('GPL')
depends=('taglib')
-source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2")
md5sums=('36665ee3ed71585e377f46fda6124a09')
build() {
cd ${srcdir}/$pkgname-$pkgver
- #. /etc/profile.d/qt.sh
- ./configure --prefix=/usr --mandir=/usr/share/man
- make || return 1
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd ${srcdir}/$pkgname-$pkgver
+
make DESTDIR=${pkgdir} install
}
diff --git a/community/mtpfs/PKGBUILD b/community/mtpfs/PKGBUILD
index 89b1c25a9..7f2731b40 100644
--- a/community/mtpfs/PKGBUILD
+++ b/community/mtpfs/PKGBUILD
@@ -1,19 +1,19 @@
-# $Id: PKGBUILD 64861 2012-02-18 18:17:04Z lcarlier $
+# $Id: PKGBUILD 67994 2012-03-16 19:16:02Z lcarlier $
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: yugrotavele <yugrotavele at archlinux dot us>
# Contributor: Anton Pirogov <anton.pirogov <AT> googlemail.com>
pkgname=mtpfs
-pkgver=1.0
-pkgrel=2
+pkgver=1.1
+pkgrel=1
pkgdesc="A FUSE filesystem that supports reading and writing from any MTP device"
arch=('i686' 'x86_64')
url="http://www.adebenham.com/mtpfs/"
license=('GPL3')
depends=('libmtp' 'glib2' 'libid3tag' 'fuse' 'libmad')
makedepends=('pkg-config')
-source=(http://www.adebenham.com/debian/${pkgname}-${pkgver}.tar.gz)
-md5sums=('7d62fdfdb59d87d115e2f804d0dc7f85')
+source=(http://www.adebenham.com/files/mtp/${pkgname}-${pkgver}.tar.gz)
+md5sums=('a299cadca336e6945b7275b44c6e8d27')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/community/musepack-tools/PKGBUILD b/community/musepack-tools/PKGBUILD
index 3cebcc68a..eac151149 100644
--- a/community/musepack-tools/PKGBUILD
+++ b/community/musepack-tools/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 56848 2011-10-14 21:03:20Z schiv $
-# Maintainer:
+# $Id: PKGBUILD 67972 2012-03-16 13:24:52Z giovanni $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: Eric Belanger <belanger@astro.umontreal.ca>
pkgname=musepack-tools
pkgver=475
-pkgrel=1
+pkgrel=2
pkgdesc="Musepack decoder/encoder"
arch=('i686' 'x86_64')
url="http://www.musepack.net/"
@@ -13,7 +13,7 @@ license=('LGPL')
depends=('libcuefile' 'libreplaygain')
makedepends=('cmake')
source=("http://files.musepack.net/source/musepack_src_r$pkgver.tar.gz"
- "math.patch")
+ 'math.patch')
md5sums=('754d67be67f713e54baf70fcfdb2817e'
'9de31f07a3492c7b1db1248b055fbdc8')
@@ -36,6 +36,8 @@ package() {
for bin in chap cut dec enc gain 2sv8; do
install -Dm755 mpc$bin/mpc$bin "$pkgdir/usr/bin/mpc$bin"
done
+
+ find ${pkgdir} -depth -type d -name .svn -exec rm -rf {} \;
}
# vim:set ts=2 sw=2 et:
diff --git a/community/mxml/PKGBUILD b/community/mxml/PKGBUILD
index 6894d1b8b..26b4ca03d 100644
--- a/community/mxml/PKGBUILD
+++ b/community/mxml/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 59790 2011-11-30 09:27:23Z spupykin $
+# $Id: PKGBUILD 67931 2012-03-16 10:17:49Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: Johannes Sjolund <j.sjolund@gmail.com>
pkgname=mxml
-pkgver=2.6
-pkgrel=4
+pkgver=2.7
+pkgrel=1
pkgdesc="A small XML parsing library"
arch=('i686' 'x86_64')
url="http://www.minixml.org/"
license=('LGPL')
source=("http://ftp.easysw.com/pub/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz")
-md5sums=('68977789ae64985dddbd1a1a1652642e')
+md5sums=('76f2ae49bf0f5745d5cb5d9507774dc9')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/community/nmon/PKGBUILD b/community/nmon/PKGBUILD
index 9cf278e07..6420dedb8 100644
--- a/community/nmon/PKGBUILD
+++ b/community/nmon/PKGBUILD
@@ -1,20 +1,25 @@
-# $Id$
+# $Id: PKGBUILD 67998 2012-03-16 23:55:43Z giovanni $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=nmon
pkgver=14g
-pkgrel=2
+pkgrel=3
pkgdesc="AIX & Linux Performance Monitoring tool"
arch=('i686' 'x86_64')
url="http://nmon.sourceforge.net"
-license=("GPL")
-depends=("ncurses")
+license=('GPL')
+depends=('ncurses')
source=("http://downloads.sourceforge.net/${pkgname}/lmon$pkgver.c")
+md5sums=('e537f51446fb375140368b115dc8278b')
build() {
- cd ${srcdir}
- cc -o nmon lmon$pkgver.c -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -g
- install -D -m 0755 nmon "${pkgdir}/usr/bin/nmon"
+ cd ${srcdir}
+
+ cc -o nmon lmon$pkgver.c -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -g
}
-md5sums=('e537f51446fb375140368b115dc8278b')
+package() {
+ cd ${srcdir}
+
+ install -D -m 0755 nmon "${pkgdir}/usr/bin/nmon"
+}
diff --git a/community/noip/PKGBUILD b/community/noip/PKGBUILD
index 4ed673e68..202d09d58 100644
--- a/community/noip/PKGBUILD
+++ b/community/noip/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 5867 2009-11-21 17:42:53Z jlichtblau $
+# $Id: PKGBUILD 67996 2012-03-16 23:45:15Z giovanni $
# Contributor: Lyle Putnam <lcputnam@amerytel.net>
# Maintainer: Daenyth
pkgname=noip
pkgver=2.1.9
-pkgrel=2
+pkgrel=3
pkgdesc="A Dynamic DNS Client Updater for no-ip.com services"
arch=('i686' 'x86_64')
url="http://www.no-ip.com/downloads.php?page=linux"
@@ -12,9 +12,8 @@ license=('GPL')
backup=('etc/no-ip2.conf')
install=noip.install
# Note that they have the one file for the current release, so if the md5sum breaks, it means they updated.
-source=('http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz'
+source=("http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz"
'noip-rc.d')
-
md5sums=('3b0f5f2ff8637c73ab337be403252a60'
'63253de6f4d847015d111e5e5b20f2cf')
@@ -24,9 +23,12 @@ build() {
# Their Makefile is fucking horrid, do it by hand instead
sed -i '/^#define CONFIG_FILEPATH/s/PREFIX//' noip2.c
sed -i '/^#define CONFIG_FILENAME/s/PREFIX//' noip2.c
- gcc -Wall $CLFAGS $LDFLAGS -g -Dlinux -DPREFIX="/usr" noip2.c -o noip2 || return 1
+ gcc -Wall $CLFAGS $LDFLAGS -g -Dlinux -DPREFIX="/usr" noip2.c -o noip2
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver-1
install -Dm755 noip2 $pkgdir/usr/bin/noip2
install -Dm755 $srcdir/noip-rc.d $pkgdir/etc/rc.d/noip
}
-# vim:set ts=2 sw=2 et:
diff --git a/community/parrot/PKGBUILD b/community/parrot/PKGBUILD
index 0f0d9d4be..4ea0dd058 100644
--- a/community/parrot/PKGBUILD
+++ b/community/parrot/PKGBUILD
@@ -1,25 +1,25 @@
-# $Id: PKGBUILD 62750 2012-01-25 18:56:38Z spupykin $
+# $Id: PKGBUILD 67927 2012-03-16 10:14:41Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
-# Contributer: mpie <michael.kyne-phillips1@ntlworld.com>
+# Contributor: mpie <michael.kyne-phillips1@ntlworld.com>
pkgname=parrot
-pkgver=4.0.0
-#_rel=devel
-_rel=stable
+pkgver=4.1.0
+#_rel=stable
+_rel=devel
pkgrel=2
-pkgdesc="standalone virtual machine that can be used to execute bytecode compiled dynamic languages"
-arch=(i686 x86_64)
+pkgdesc="Standalone VM that can execute bytecode compiled dynamic languages"
+arch=('x86_64' 'i686')
url="http://www.parrotcode.org/"
license=('GPL')
depends=('gmp' 'gdbm' 'readline' 'icu' 'openssl' 'libffi')
makedepends=('perl-json')
optdepends=('freeglut')
options=(!emptydirs !makeflags)
-source=(ftp://ftp.parrot.org/pub/parrot/releases/${_rel}/$pkgver/parrot-$pkgver.tar.gz)
-md5sums=('fc613c41771baf79307c519072302299')
+source=("ftp://ftp.parrot.org/pub/parrot/releases/$_rel/$pkgver/parrot-$pkgver.tar.gz")
+md5sums=('23c37c82aeac2d5bf9fd00a7873dab0d')
build() {
- cd $srcdir/$pkgname-$pkgver
+ cd "$srcdir/$pkgname-$pkgver"
sed -i 's#auto::sha1##' lib/Parrot/Configure/Step/List.pm
sed -i 's#auto::git_describe##' lib/Parrot/Configure/Step/List.pm
@@ -27,18 +27,26 @@ build() {
[ $NOEXTRACT -eq 1 ] || perl Configure.pl --prefix=/usr --parrot_is_shared
find -type f -name Makefile | while read F; do
- grep "$srcdir" $F && sed -i "s#-Wl,-rpath=$srcdir/parrot-$pkgver/blib/lib##" $F || true
- grep "$srcdir" $F && sed -i "s#-rpath=$srcdir/parrot-$pkgver/blib/lib##" $F || true
+ grep "$srcdir" $F && sed -i \
+ "s#-Wl,-rpath=$srcdir/parrot-$pkgver/blib/lib##" $F || true
+ grep "$srcdir" $F && sed -i \
+ "s#-rpath=$srcdir/parrot-$pkgver/blib/lib##" $F || true
done
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
OLD_LIB_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$srcdir/parrot-$pkgver/blib/lib
make -j1 all parrot_utils docs html RPATH_BLIB=
export LD_LIBRARY_PATH=`pwd`/blib/lib
- make -j1 DESTDIR=$pkgdir install-dev
+ make -j1 DESTDIR="$pkgdir" install-dev
sed -i "s#$srcdir#/usr/src#" $pkgdir/usr/lib/parrot/$pkgver/tools/lib/Parrot/Config/Generated.pm
export LD_LIBRARY_PATH=$OLD_LIB_PATH
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/pigeonhole/PKGBUILD b/community/pigeonhole/PKGBUILD
index 645b706a2..d2c4f2468 100644
--- a/community/pigeonhole/PKGBUILD
+++ b/community/pigeonhole/PKGBUILD
@@ -4,12 +4,12 @@
# This must be built against the version of dovecot being used,
# else mail delivery will fail.
# Specify the version of dovecot to be used here:
-_dcpkgver=2.1.2
+_dcpkgver=2.1.3
# Make sure to bump pkgrel if changing this.
pkgname=pigeonhole
pkgver=0.3.0
-pkgrel=3
+pkgrel=4
pkgdesc="Fully rewritten Sieve implementation for Dovecot v2.1"
arch=('i686' 'x86_64')
url="http://pigeonhole.dovecot.org/"
diff --git a/community/solfege/PKGBUILD b/community/solfege/PKGBUILD
index 4ae1a450f..894a4a211 100644
--- a/community/solfege/PKGBUILD
+++ b/community/solfege/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 57439 2011-10-27 19:55:33Z schiv $
+# $Id: PKGBUILD 68019 2012-03-17 01:01:55Z giovanni $
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: sickhate <sickhate@tux-linux.net>
@@ -7,7 +7,7 @@
# bring in pyalsa, csound, mma
pkgname=solfege
pkgver=3.20.4
-pkgrel=1
+pkgrel=2
pkgdesc="Music education and ear training software"
arch=('i686' 'x86_64')
url="http://www.solfege.org/"
diff --git a/community/sqlite2/PKGBUILD b/community/sqlite2/PKGBUILD
index 0f8ff8f22..c6d6c27ef 100644
--- a/community/sqlite2/PKGBUILD
+++ b/community/sqlite2/PKGBUILD
@@ -1,15 +1,16 @@
-# $Id: PKGBUILD 20695 2010-07-10 22:08:38Z lcarlier $
+# $Id: PKGBUILD 68015 2012-03-17 00:56:03Z giovanni $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Judd <jvinet@zeroflux.org>
pkgname=sqlite2
pkgver=2.8.17
-pkgrel=4
+pkgrel=5
pkgdesc="A C library that implements an SQL database engine"
arch=('i686' 'x86_64')
url="http://www.sqlite.org/"
depends=('readline>=6.0.00')
-source=(http://www.sqlite.org/sqlite-$pkgver.tar.gz 'LICENSE')
+source=("http://www.sqlite.org/sqlite-$pkgver.tar.gz"
+ 'LICENSE')
license=('custom')
options=('!libtool')
md5sums=('838dbac20b56d2c4292e98848505a05b'
diff --git a/community/tightvnc/PKGBUILD b/community/tightvnc/PKGBUILD
index 356e6006f..910446431 100644
--- a/community/tightvnc/PKGBUILD
+++ b/community/tightvnc/PKGBUILD
@@ -1,42 +1,48 @@
-# $Id: PKGBUILD 67142 2012-03-04 23:56:49Z pschmitz $
-# Maintainer: Paul Mattal <paul@archlinux.org>
+# $Id: PKGBUILD 67960 2012-03-16 12:47:31Z arodseth $
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Paul Mattal <paul@archlinux.org>
+
pkgname=tightvnc
pkgver=1.3.10
-pkgrel=6
+pkgrel=7
pkgdesc="VNC Unix server && viewer"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.tightvnc.com"
-depends=('libjpeg' 'zlib' 'libxaw' 'libxp' 'xorg-xauth')
-makedepends=('imake')
+depends=('libjpeg' 'zlib' 'libxaw' 'libxp' 'xorg-xauth' 'perl')
+makedepends=('imake' 'setconf')
conflicts=('vnc')
options=('!makeflags')
source=("http://downloads.sf.net/sourceforge/vnc-tight/$pkgname-${pkgver}_unixsrc.tar.bz2"
- 'tightvnc-fontpath-xcolors.patch')
-md5sums=('397b35faad32d5246b6d44b142f8304f'
- '21aa7f3376ec3c608ff22d199a19c601')
+ 'http://people.csail.mit.edu/jaffer/Color/rgb.txt')
+sha256sums=('f48c70fea08d03744ae18df6b1499976362f16934eda3275cead87baad585c0d'
+ 'af6c056a95ae725f98534db22b9a4916d17f2356fdca84a4a038211a82fa8a73')
build() {
cd $srcdir/vnc_unixsrc
- patch -Np1 -i ../tightvnc-fontpath-xcolors.patch
- sed -i 's|/usr/local/|/usr/share/|' vncserver
+ setconf tightvncserver.conf '$colorPath' \"/usr/share/tightvnc\"\;
+ setconf vncserver '$colorPath' \"/usr/share/tightvnc\"\;
+ setconf vncserver '$vncClasses' \"/usr/share/tightvnc\"\;
+ setconf vncserver '$fontPath' \"/usr/share/fonts/misc/,/usr/share/fonts/75dpi/,/usr/share/fonts/100dpi/,/usr/share/fonts/Type1/\"\;
xmkmf
make World
cd Xvnc
./configure
- sed 's|PROTO_DEFINES =|PROTO_DEFINES = -D_XOPEN_SOURCE=500L|' \
- -i programs/Xserver/os/Makefile lib/font/fc/Makefile
+ setconf programs/Xserver/os/Makefile PROTO_DEFINES "-D_XOPEN_SOURCE=500L"
+ setconf lib/font/fc/Makefile PROTO_DEFINES "-D_XOPEN_SOURCE=500L"
make
}
package() {
- cd $srcdir/vnc_unixsrc
- mkdir -p $pkgdir/usr/bin $pkgdir/usr/share/man/man1
- ./vncinstall $pkgdir/usr/bin $pkgdir/usr/share/man
+ cd "$srcdir/vnc_unixsrc"
- # install java classes
- mkdir -p $pkgdir/usr/share/vnc/classes
- install -Dm644 $srcdir/vnc_unixsrc/classes/* \
- $pkgdir/usr/share/vnc/classes
+ mkdir -p "$pkgdir/usr/bin" "$pkgdir/usr/share/man/man1"
+ ./vncinstall "$pkgdir/usr/bin" "$pkgdir/usr/share/man"
+ mkdir -p "$pkgdir/usr/share/$pkgname"
+ install -Dm644 "$srcdir/vnc_unixsrc/classes/"* \
+ "$pkgdir/usr/share/$pkgname"
+ install -Dm644 "$srcdir/rgb.txt" "$pkgdir/usr/share/$pkgname/rgb.txt"
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/xmms-pulse/PKGBUILD b/community/xmms-pulse/PKGBUILD
index 7d54aae91..019e8a140 100644
--- a/community/xmms-pulse/PKGBUILD
+++ b/community/xmms-pulse/PKGBUILD
@@ -1,11 +1,12 @@
-# $Id: PKGBUILD 17281 2010-05-22 17:51:17Z heftig $
+# $Id: PKGBUILD 68002 2012-03-17 00:12:40Z giovanni $
+# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>
-# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=xmms-pulse
pkgver=0.9.4
-pkgrel=2
+pkgrel=3
pkgdesc="An XMMS output plugin for the PulseAudio sound server"
arch=('i686' 'x86_64')
url="http://0pointer.de/lennart/projects/xmms-pulse"
@@ -13,16 +14,19 @@ license=('GPL')
depends=('xmms' 'pulseaudio')
groups=('xmms-plugins' 'xmms-io-plugins')
options=('!libtool')
-source=(http://0pointer.de/lennart/projects/xmms-pulse/${pkgname}-${pkgver}.tar.gz)
+source=("http://0pointer.de/lennart/projects/xmms-pulse/${pkgname}-${pkgver}.tar.gz")
md5sums=('c879939a6242f07b69298b30bcdeb6c5')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
- ./configure --prefix=/usr --disable-lynx
- make || return 1
+
+ ./configure --prefix=/usr \
+ --disable-lynx
+ make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
+
make DESTDIR=${pkgdir} install
}
diff --git a/community/xmms2/PKGBUILD b/community/xmms2/PKGBUILD
index 6a6c649de..13b6c006f 100644
--- a/community/xmms2/PKGBUILD
+++ b/community/xmms2/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 64615 2012-02-17 03:15:27Z tdziedzic $
+# $Id: PKGBUILD 67933 2012-03-16 10:22:42Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=xmms2
pkgver=0.8DrO_o
-pkgrel=4
+pkgrel=5
pkgdesc="complete rewrite of the popular music player"
arch=('i686' 'x86_64')
url="http://xmms2.org/"
@@ -60,7 +60,7 @@ build() {
sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' waf
./waf configure --prefix=/usr \
- --with-optionals=python,launcher,xmmsclient++,xmmsclient++-glib,perl,ruby,nycli \
+ --with-optionals=python,launcher,xmmsclient++,xmmsclient++-glib,perl,ruby,nycli,pixmaps \
--with-ruby-archdir=`ruby -e 'puts RbConfig::CONFIG["vendorarchdir"]'` \
--with-ruby-libdir=`ruby -e 'puts RbConfig::CONFIG["vendorlibdir"]'`
./waf build
diff --git a/community/xnee/PKGBUILD b/community/xnee/PKGBUILD
index 092a0c83a..cbb49288a 100644
--- a/community/xnee/PKGBUILD
+++ b/community/xnee/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 55315 2011-09-09 20:38:51Z jlichtblau $
+# $Id: PKGBUILD 67919 2012-03-16 09:51:24Z giovanni $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
pkgname=xnee
-pkgver=3.10
+pkgver=3.12
pkgrel=1
pkgdesc="A program to record, distribute, and replay X (X11) protocol data"
arch=('i686' 'x86_64')
@@ -12,9 +12,8 @@ license=('GPL3')
depends=('gtk2' 'libgnomeui' 'libxtst')
makedepends=('texinfo')
options=('!libtool' '!emptydirs')
-changelog=$pkgname.changelog
source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz)
-sha256sums=('6260e02f4938d18a548e6a6716ae48e34f1bf33c7a832d5eda35d4191fb86b56')
+sha256sums=('bc7ea43e62f4aed6148d1439b0061da613c364e9f981d44d8e52506023b07d83')
build() {
cd ${srcdir}/$pkgname-$pkgver
diff --git a/community/xtmsplit/PKGBUILD b/community/xtmsplit/PKGBUILD
index 46bc8b101..c1d0c5a70 100644
--- a/community/xtmsplit/PKGBUILD
+++ b/community/xtmsplit/PKGBUILD
@@ -1,9 +1,10 @@
-# $Id: PKGBUILD 21560 2010-07-16 16:18:53Z lcarlier $
+# $Id: PKGBUILD 67921 2012-03-16 09:56:53Z giovanni $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
pkgname=xtmsplit
pkgver=0.2
-pkgrel=2
+pkgrel=3
pkgdesc="Xtremsplit-compliant file splitter/merger"
arch=('i686' 'x86_64')
url="http://www.software.caelistis.be/"
@@ -16,11 +17,11 @@ build() {
cd ${srcdir}/$pkgname
./configure --prefix=/usr
+ make
}
package() {
cd ${srcdir}/$pkgname
- make
make DESTDIR="$pkgdir" install
}
diff --git a/core/e2fsprogs/PKGBUILD b/core/e2fsprogs/PKGBUILD
index bd9f609fa..9233159be 100644
--- a/core/e2fsprogs/PKGBUILD
+++ b/core/e2fsprogs/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 147737 2012-01-27 16:09:24Z dan $
+# $Id: PKGBUILD 153601 2012-03-16 15:10:42Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=e2fsprogs
-pkgver=1.42
+pkgver=1.42.1
pkgrel=1
pkgdesc="Ext2/3/4 filesystem utilities"
arch=('i686' 'x86_64')
@@ -16,8 +16,9 @@ source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pk
'MIT-LICENSE')
backup=('etc/mke2fs.conf')
install=${pkgname}.install
-sha1sums=('e69bc63bc319e4d1e4242cc278bfd442a60646e6'
+sha1sums=('c25c73de98737b5f6fb9debec36bfb6416b0ac07'
'f4a0d5b0cdb980e3fedd6f5e7dde0b0ffb7bbdfb')
+
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/core/krb5/PKGBUILD b/core/krb5/PKGBUILD
index e93b19963..0868fcdd9 100644
--- a/core/krb5/PKGBUILD
+++ b/core/krb5/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 144896 2011-12-09 11:55:57Z stephane $
+# $Id: PKGBUILD 153617 2012-03-16 17:46:18Z stephane $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
pkgname=krb5
-pkgver=1.9.2
-pkgrel=2
+pkgver=1.10.1
+pkgrel=1
pkgdesc="The Kerberos network authentication system"
arch=('i686' 'x86_64')
url="http://web.mit.edu/kerberos/"
@@ -14,40 +14,20 @@ provides=('heimdal')
replaces=('heimdal')
conflicts=('heimdal')
backup=('etc/krb5.conf' 'var/lib/krb5kdc/kdc.conf')
-source=(http://web.mit.edu/kerberos/dist/${pkgname}/1.9/${pkgname}-${pkgver}-signed.tar
+source=(http://web.mit.edu/kerberos/dist/${pkgname}/1.10/${pkgname}-${pkgver}-signed.tar
krb5-kadmind
krb5-kdc
- krb5-kpropd
- krb5-1.9.1-config-script.patch
- krb5-1.9.1-2011-007.patch)
-sha1sums=('aa06f778ee1f9791cd4c5cf4c9e9465769ffec92'
+ krb5-kpropd)
+sha1sums=('f9f3b77173f68b268b43e4f9c29bf7c9f3fd1f0e'
'2aa229369079ed1bbb201a1ef72c47bf143f4dbe'
'77d2312ecd8bf12a6e72cc8fd871a8ac93b23393'
- '7f402078fa65bb9ff1beb6cbbbb017450df78560'
- '7342410760cf44bfa01bb99bb4c49e12496cb46f'
- 'ec917dd1d1c96fa331f512331d5aa37c2e9b9df7')
+ '7f402078fa65bb9ff1beb6cbbbb017450df78560')
options=('!emptydirs')
build() {
tar zxvf ${pkgname}-${pkgver}.tar.gz
cd "${srcdir}/${pkgname}-${pkgver}/src"
- # - Make krb5-config suppress CFLAGS output when called with --libs
- # cf https://bugzilla.redhat.com/show_bug.cgi?id=544391
- #
- # - Omit extra libraries because their interfaces are not exposed to applications
- # by libkrb5, unless do_deps is set to 1, which indicates that the caller
- # wants the whole list.
- #
- # Patch from upstream :
- # http://anonsvn.mit.edu/viewvc/krb5/trunk/src/krb5-config.in?r1=23662&r2=25236
- patch -Np2 -i ${srcdir}/krb5-1.9.1-config-script.patch
-
- # Apply upstream patch to fix a null pointer dereference when processing TGS requests
- # CVE-2011-1530
- # see http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2011-007.txt
- patch -Np2 -i ${srcdir}/krb5-1.9.1-2011-007.patch
-
# FS#25384
sed -i "/KRB5ROOT=/s/\/local//" util/ac_check_krb5.m4
@@ -62,7 +42,8 @@ build() {
--disable-rpath \
--without-tcl \
--enable-dns-for-realm \
- --with-ldap
+ --with-ldap \
+ --without-system-verto
make
}
diff --git a/core/pcmciautils/PKGBUILD b/core/pcmciautils/PKGBUILD
index fee30155d..59959a831 100644
--- a/core/pcmciautils/PKGBUILD
+++ b/core/pcmciautils/PKGBUILD
@@ -1,8 +1,9 @@
-# $Id: PKGBUILD 134400 2011-08-03 16:55:02Z tomegun $
-# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# $Id: PKGBUILD 153635 2012-03-16 22:34:37Z tomegun $
+# Maintainer: Tom Gundersen <teg@jklm.no>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=pcmciautils
pkgver=018
-pkgrel=1
+pkgrel=2
pkgdesc="Utilities for inserting and removing PCMCIA cards"
arch=(i686 x86_64)
url="http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html"
@@ -11,7 +12,8 @@ groups=('base')
# sysfsutils will not be required in the next release
depends=('udev' 'sysfsutils')
conflicts=('pcmcia-cs')
-source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmciautils-${pkgver}.tar.bz2)
+# source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/${pkgname}-${pkgver}.tar.bz2) broken due to breakin
+source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.xz)
options=(!makeflags)
build() {
@@ -24,4 +26,4 @@ package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
}
-md5sums=('5d85669b3440baa4532363da6caaf1b4')
+md5sums=('964c802994677a71b38ec56554aa229f')
diff --git a/core/udev/0001-reinstate-TIMEOUT-handling.patch b/core/udev/0001-reinstate-TIMEOUT-handling.patch
new file mode 100644
index 000000000..9b251b283
--- /dev/null
+++ b/core/udev/0001-reinstate-TIMEOUT-handling.patch
@@ -0,0 +1,126 @@
+From 86617453cd78bf88d347f0e75a5be8b5ebac6c2e Mon Sep 17 00:00:00 2001
+From: Tom Gundersen <teg@jklm.no>
+Date: Thu, 15 Mar 2012 02:12:43 +0100
+Subject: [PATCH] reinstate TIMEOUT= handling
+
+This reverts 43d5c5f03645c4b842659f9b5bd0ae465e885e92 and
+57c6f8ae5f52a6e8ffc66a54966346f733dded39.
+
+Signed-off-by: Tom Gundersen <teg@jklm.no>
+---
+ src/libudev-device.c | 19 +++++++++++++++++++
+ src/libudev-private.h | 1 +
+ src/udevd.c | 13 ++++++++++---
+ 3 files changed, 30 insertions(+), 3 deletions(-)
+
+diff --git a/src/libudev-device.c b/src/libudev-device.c
+index 10f28b8..639c367 100644
+--- a/src/libudev-device.c
++++ b/src/libudev-device.c
+@@ -68,6 +68,7 @@ struct udev_device {
+ struct udev_list tags_list;
+ unsigned long long int seqnum;
+ unsigned long long int usec_initialized;
++ int timeout;
+ int devlink_priority;
+ int refcount;
+ dev_t devnum;
+@@ -160,6 +161,21 @@ static int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum)
+ return 0;
+ }
+
++int udev_device_get_timeout(struct udev_device *udev_device)
++{
++ return udev_device->timeout;
++}
++
++static int udev_device_set_timeout(struct udev_device *udev_device, int timeout)
++{
++ char num[32];
++
++ udev_device->timeout = timeout;
++ snprintf(num, sizeof(num), "%u", timeout);
++ udev_device_add_property(udev_device, "TIMEOUT", num);
++ return 0;
++}
++
+ const char *udev_device_get_devpath_old(struct udev_device *udev_device)
+ {
+ return udev_device->devpath_old;
+@@ -414,6 +430,8 @@ void udev_device_add_property_from_string_parse(struct udev_device *udev_device,
+ udev_device_set_devpath_old(udev_device, &property[12]);
+ } else if (strncmp(property, "SEQNUM=", 7) == 0) {
+ udev_device_set_seqnum(udev_device, strtoull(&property[7], NULL, 10));
++ } else if (strncmp(property, "TIMEOUT=", 8) == 0) {
++ udev_device_set_timeout(udev_device, strtoull(&property[8], NULL, 10));
+ } else if (strncmp(property, "IFINDEX=", 8) == 0) {
+ udev_device_set_ifindex(udev_device, strtoull(&property[8], NULL, 10));
+ } else if (strncmp(property, "DEVMODE=", 8) == 0) {
+@@ -599,6 +617,7 @@ struct udev_device *udev_device_new(struct udev *udev)
+ udev_list_init(udev, &udev_device->sysattr_value_list, true);
+ udev_list_init(udev, &udev_device->sysattr_list, false);
+ udev_list_init(udev, &udev_device->tags_list, true);
++ udev_device->timeout = -1;
+ udev_device->watch_handle = -1;
+ /* copy global properties */
+ udev_list_entry_foreach(list_entry, udev_get_properties_list_entry(udev))
+diff --git a/src/libudev-private.h b/src/libudev-private.h
+index 5f5c64a..ec63b67 100644
+--- a/src/libudev-private.h
++++ b/src/libudev-private.h
+@@ -87,6 +87,7 @@ const char *udev_device_get_id_filename(struct udev_device *udev_device);
+ void udev_device_set_is_initialized(struct udev_device *udev_device);
+ int udev_device_add_tag(struct udev_device *udev_device, const char *tag);
+ void udev_device_cleanup_tags_list(struct udev_device *udev_device);
++int udev_device_get_timeout(struct udev_device *udev_device);
+ unsigned long long udev_device_get_usec_initialized(struct udev_device *udev_device);
+ void udev_device_set_usec_initialized(struct udev_device *udev_device, unsigned long long usec_initialized);
+ int udev_device_get_devlink_priority(struct udev_device *udev_device);
+diff --git a/src/udevd.c b/src/udevd.c
+index 1702217..88e9272 100644
+--- a/src/udevd.c
++++ b/src/udevd.c
+@@ -401,7 +401,7 @@ out:
+ }
+ }
+
+-static void event_run(struct event *event)
++static void event_run(struct event *event, bool force)
+ {
+ struct udev_list_node *loop;
+
+@@ -427,7 +427,7 @@ static void event_run(struct event *event)
+ return;
+ }
+
+- if (children >= children_max) {
++ if (!force && children >= children_max) {
+ if (children_max > 1)
+ info(event->udev, "maximum number (%i) of children reached\n", children);
+ return;
+@@ -461,6 +461,13 @@ static int event_queue_insert(struct udev_device *dev)
+
+ event->state = EVENT_QUEUED;
+ udev_list_node_append(&event->node, &event_list);
++
++ /* run all events with a timeout set immediately */
++ if (udev_device_get_timeout(dev) > 0) {
++ event_run(event, true);
++ return 0;
++ }
++
+ return 0;
+ }
+
+@@ -577,7 +584,7 @@ static void event_queue_start(struct udev *udev)
+ continue;
+ }
+
+- event_run(event);
++ event_run(event, false);
+ }
+ }
+
+--
+1.7.9.4
+
diff --git a/core/udev/PKGBUILD b/core/udev/PKGBUILD
index bc45f9f4e..114f524b9 100644
--- a/core/udev/PKGBUILD
+++ b/core/udev/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 153480 2012-03-14 23:26:14Z tomegun $
+# $Id: PKGBUILD 153633 2012-03-16 22:34:33Z tomegun $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
@@ -6,14 +6,15 @@
pkgname=udev
pkgver=181
-pkgrel=4
+pkgrel=5
pkgdesc="The userspace dev tools (udev)"
-depends=('util-linux' 'libusb-compat' 'glib2' 'kmod' 'pciutils' 'usbutils' 'pciutils' 'acl')
+depends=('util-linux' 'libusb-compat' 'glib2' 'kmod' 'pciutils' 'usbutils' 'acl')
install=udev.install
arch=(i686 x86_64)
license=('GPL')
makedepends=('gobject-introspection' 'gperf' 'libxslt' 'usbutils' 'kmod')
source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.xz
+ 0001-reinstate-TIMEOUT-handling.patch
initcpio-hooks-udev
initcpio-install-udev)
url="http://git.kernel.org/?p=linux/hotplug/udev.git;a=summary"
@@ -24,6 +25,8 @@ options=(!makeflags !libtool)
build() {
cd $srcdir/$pkgname-$pkgver
+ patch -p1 -i ../0001-reinstate-TIMEOUT-handling.patch
+
./configure --prefix=/usr \
--with-rootprefix= \
--sysconfdir=/etc \
@@ -39,6 +42,10 @@ package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=${pkgdir} install
+ # install the mkinitpcio hook
+ install -D -m644 ../initcpio-hooks-udev ${pkgdir}/usr/lib/initcpio/hooks/udev
+ install -D -m644 ../initcpio-install-udev ${pkgdir}/usr/lib/initcpio/install/udev
+
# udevd moved, symlink to make life easy for restarting udevd manually
ln -s ../../lib/udev/udevd ${pkgdir}/usr/bin/udevd
@@ -52,11 +59,8 @@ package() {
s#GROUP="tape"#GROUP="storage"#g;
s#GROUP="cdrom"#GROUP="optical"#g' $i
done
-
- # install the mkinitpcio hook
- install -D -m644 ../initcpio-hooks-udev ${pkgdir}/lib/initcpio/hooks/udev
- install -D -m644 ../initcpio-install-udev ${pkgdir}/lib/initcpio/install/udev
}
md5sums=('0d7af750702620a871b9f9b98d8ad859'
+ 'f758b3e62ab77a1a6b7be12bb900cb2d'
'a4dd853050bf2e0ae6b2e3d2c75499c2'
'ee0bfe91a20fff12cc25ab1d1e024853')
diff --git a/core/util-linux/PKGBUILD b/core/util-linux/PKGBUILD
index d0d499374..69bc92981 100644
--- a/core/util-linux/PKGBUILD
+++ b/core/util-linux/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 153482 2012-03-14 23:26:17Z tomegun $
+# $Id: PKGBUILD 153637 2012-03-16 22:34:40Z tomegun $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=util-linux
pkgver=2.21
-pkgrel=5
+pkgrel=6
pkgdesc="Miscellaneous system utilities for Linux"
url="http://www.kernel.org/pub/linux/utils/util-linux/"
arch=('i686' 'x86_64')
@@ -30,7 +30,8 @@ build() {
--libdir=/usr/lib \
--enable-write \
--enable-raw \
- --disable-wall
+ --disable-wall \
+ --enable-libmount-mount
make
}
diff --git a/extra/bftpd/PKGBUILD b/extra/bftpd/PKGBUILD
index 4ceec50e9..da44fbf68 100644
--- a/extra/bftpd/PKGBUILD
+++ b/extra/bftpd/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 135462 2011-08-13 23:06:44Z thomas $
-# Maintainer: Thomas Baechler <thomas@archlinux.org>
+# $Id: PKGBUILD 153626 2012-03-16 18:21:58Z thomas $
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
pkgname=bftpd
-pkgver=3.6
+pkgver=3.7
pkgrel=1
pkgdesc="Small, easy-to-configure FTP server"
arch=(i686 x86_64)
@@ -19,7 +19,7 @@ source=(http://downloads.sourceforge.net/sourceforge/bftpd/bftpd-$pkgver.tar.gz
bftpd.logrotate
bftpd.pam
bftpd.xinetd)
-md5sums=('7c45b158646e3b266530bf46778fc2d0'
+md5sums=('6614e25ef1864ad80d92724d03832407'
'56a1bf7738a6db2b2cff89e611f4f11a'
'853680dad0df39d0b4d2fb43d4be430a'
'96f82c38f3f540b53f3e5144900acf17'
@@ -29,25 +29,31 @@ build() {
cd "${srcdir}"/$pkgname
# The bftpd author keeps screwing up the release tarballs
rm -f config.{cache,status}
- ./configure --prefix=/usr --enable-pam --mandir=/usr/share/man
+ ./configure --prefix=/usr \
+ --enable-pam \
+ --mandir=/usr/share/man \
+ --sysconfdir=/etc
make
}
package() {
cd "${srcdir}"/$pkgname
install -d -m755 "${pkgdir}"/usr/{sbin,share/man/man8}
- install -d -m755 "${pkgdir}"/var/log
install -D -m644 "${srcdir}"/bftpd.logrotate "${pkgdir}"/etc/logrotate.d/bftpd
install -D -m755 "${srcdir}"/bftpd.rc "${pkgdir}"/etc/rc.d/bftpd
make DESTDIR="${pkgdir}" install
# Remove log file and /var/run from the package
- rm -f "${pkgdir}"/var/log/bftpd.log
- rmdir "${pkgdir}"/var/{run/bftpd,run,log,}
+ # This guy keeps messing up his Makefile, /usr/var, wtf?
+ rm -f "${pkgdir}"/usr/var/log/bftpd.log
+ rmdir "${pkgdir}"/usr/var/{run/bftpd,run,log,}
# Install PAM file
mkdir -p "${pkgdir}"/etc/pam.d
cp "${srcdir}"/bftpd.pam "${pkgdir}"/etc/pam.d/bftpd
# Install xinetd file
install -D -m644 "${srcdir}"/bftpd.xinetd "${pkgdir}"/etc/xinetd.d/bftpd
+ # Did I mention this guy keeps messing up his Makefiles?
+ mv "${pkgdir}"/usr/etc/bftpd.conf "${pkgdir}"/etc/
+ rmdir "${pkgdir}"/usr/etc
# Fix default in config file
sed 's|#ROOTDIR="/path/for/anonymous/user"|# bftpd interprets ROOTDIR="%h" (the default), as ROOTDIR="/" for the anonymous user, override it\n ROOTDIR="/srv/ftp"|' -i "${pkgdir}"/etc/bftpd.conf
}
diff --git a/extra/clamav/PKGBUILD b/extra/clamav/PKGBUILD
index c6f92be84..e5dbf286e 100644
--- a/extra/clamav/PKGBUILD
+++ b/extra/clamav/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 145066 2011-12-16 09:17:40Z bisson $
+# $Id: PKGBUILD 153568 2012-03-16 04:06:01Z bisson $
# Contributor: Dale Blount <dale@archlinux.org>
# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
pkgname=clamav
-pkgver=0.97.3
-pkgrel=2
+pkgver=0.97.4
+pkgrel=1
pkgdesc='Anti-virus toolkit for Unix'
url='http://www.clamav.net/'
license=('GPL')
@@ -13,12 +13,12 @@ options=('!libtool')
arch=('i686' 'x86_64')
depends=('bzip2' 'libltdl')
backup=('etc/clamav/clamd.conf' 'etc/clamav/freshclam.conf' 'etc/conf.d/clamav')
-source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
'rc.d'
'conf.d'
'logrotate'
'config.patch')
-sha1sums=('263c7b8b7dc1536652ab64e32263d1c60e138655'
+sha1sums=('56f90cf8a73acba8f97beca86b42c65c3923935d'
'50cfe02c97e4297a0efd25b23142408380305d30'
'cb116cdab49a810381a515cbcfb6a6c148547f07'
'be3310d2b41a68ce06e33c84ab68ffe59fdce104'
@@ -28,7 +28,9 @@ install=install
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+
patch -p1 -i ../config.patch
+
./configure \
--prefix=/usr \
--sysconfdir=/etc/clamav \
diff --git a/extra/dovecot/PKGBUILD b/extra/dovecot/PKGBUILD
index ae1d51f17..f8a3f715c 100644
--- a/extra/dovecot/PKGBUILD
+++ b/extra/dovecot/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 153549 2012-03-15 21:48:10Z andyrtr $
+# $Id: PKGBUILD 153623 2012-03-16 18:05:31Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Paul Mattal <paul@mattal.com>
# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
# Contributor: GARETTE Emmanuel <gnunux at laposte dot net>
pkgname=dovecot
-pkgver=2.1.2
+pkgver=2.1.3
pkgrel=1
pkgdesc="An IMAP and POP3 server written with security primarily in mind"
arch=('i686' 'x86_64')
@@ -20,8 +20,8 @@ provides=('imap-server' 'pop3-server')
options=('!libtool')
install=$pkgname.install
source=(http://dovecot.org/releases/2.1/${pkgname}-${pkgver}.tar.gz{,.sig} dovecot.sh)
-md5sums=('6ab61b962ff7e732ea9faa0fa41a28cb'
- 'fb097826d991cd70894a914d01b0e2a1'
+md5sums=('a0e25243862c61de6274cf7d682a76ec'
+ '85c2737b822e095b1120e322f13ce3ad'
'587159e84e2da6f83d70b3c706ba87cc')
build() {
diff --git a/extra/fwbuilder/PKGBUILD b/extra/fwbuilder/PKGBUILD
index 63370145d..725cc0c95 100644
--- a/extra/fwbuilder/PKGBUILD
+++ b/extra/fwbuilder/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 139474 2011-10-02 02:49:30Z eric $
+# $Id: PKGBUILD 153570 2012-03-16 04:12:42Z eric $
# Maintainer: Kevin Piche <kevin@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=fwbuilder
-pkgver=5.0.0.3568
-pkgrel=2
+pkgver=5.0.1.3592
+pkgrel=1
pkgdesc="Object-oriented GUI and set of compilers for various firewall platforms"
url="http://www.fwbuilder.org/"
arch=('i686' 'x86_64')
@@ -12,8 +12,8 @@ license=('GPL')
depends=('libxslt' 'net-snmp' 'qt')
conflicts=('libfwbuilder')
install=fwbuilder.install
-source=("http://sourceforge.net/projects/fwbuilder/files/Current_Packages/5.0.0/fwbuilder-${pkgver}.tar.gz")
-md5sums=('0324edab10329dde029953d646aa8dad')
+source=("http://sourceforge.net/projects/fwbuilder/files/Current_Packages/${pkgver%.*}/fwbuilder-${pkgver}.tar.gz")
+md5sums=('50b567a9752e9dd4f4cd0d988d74d879')
build() {
cd "${srcdir}/fwbuilder-${pkgver}"
diff --git a/extra/iptraf-ng/PKGBUILD b/extra/iptraf-ng/PKGBUILD
index 1b3e5a30a..3d0dfddf0 100644
--- a/extra/iptraf-ng/PKGBUILD
+++ b/extra/iptraf-ng/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 152688 2012-03-08 20:30:23Z foutrelis $
+# $Id: PKGBUILD 153597 2012-03-16 13:00:51Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: sh0 <mee@sh0.org>
pkgname=iptraf-ng
pkgver=1.1.1
-pkgrel=1
+pkgrel=2
pkgdesc="A console-based network monitoring utility (a fork of original iptraf)"
url="https://fedorahosted.org/iptraf-ng/"
arch=('i686' 'x86_64')
@@ -27,5 +27,4 @@ build() {
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR=$pkgdir install
- install -dm755 "$pkgdir/var/lib/iptraf"
}
diff --git a/extra/jhead/PKGBUILD b/extra/jhead/PKGBUILD
index 16d1650c4..66f7f2f95 100644
--- a/extra/jhead/PKGBUILD
+++ b/extra/jhead/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 144342 2011-12-04 21:25:01Z eric $
+# $Id: PKGBUILD 153645 2012-03-17 03:19:37Z eric $
# Maintainer: François Charette <francois ατ archlinux δοτ org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
pkgname=jhead
-pkgver=2.93
+pkgver=2.95
pkgrel=1
pkgdesc="EXIF JPEG info parser and thumbnail remover"
url="http://www.sentex.net/~mwandel/jhead/"
@@ -13,7 +13,7 @@ depends=('glibc')
optdepends=('libjpeg: to up-right images according to rotation tag')
source=(http://www.sentex.net/~mwandel/${pkgname}/${pkgname}-${pkgver}.tar.gz
LICENSE)
-md5sums=('23ac51b4aea2df663d684744e282eb7d'
+md5sums=('49599697ffc1830648b057916165a192'
'1f0db611d2642a981719f45252762a45')
build() {
diff --git a/extra/kdeadmin/PKGBUILD b/extra/kdeadmin/PKGBUILD
index a8cdfe6c8..84a60878e 100644
--- a/extra/kdeadmin/PKGBUILD
+++ b/extra/kdeadmin/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 153114 2012-03-12 09:14:51Z andrea $
+# $Id: PKGBUILD 153588 2012-03-16 10:27:43Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
@@ -8,12 +8,12 @@ pkgname=('kdeadmin-kcron'
'kdeadmin-kuser'
'kdeadmin-system-config-printer-kde')
pkgver=4.8.1
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL' 'LGPL' 'FDL')
groups=('kde' 'kdeadmin')
-makedepends=('cmake' 'automoc4' 'kdebindings-python' 'system-config-printer-common')
+makedepends=('cmake' 'automoc4' 'kdebindings-python2' 'system-config-printer-common')
source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.xz"
'syslog-path.patch')
sha1sums=('0ee44575bfb45159ced6d4d046b07323ebab00e7'
@@ -67,15 +67,14 @@ package_kdeadmin-kuser() {
package_kdeadmin-system-config-printer-kde() {
pkgdesc='Configure local and remote Printers'
- depends=('kdebindings-python' 'system-config-printer-common' 'python2-pyqt'
- 'cups' 'python2-gobject2')
+ depends=('kdebindings-python2' 'system-config-printer-common' 'cups' 'python2-gobject2')
url="http://kde.org/applications/system/printerapplet/"
cd $srcdir/build/system-config-printer-kde
make DESTDIR=$pkgdir install
- # Use the python2 executable
- sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
- "${pkgdir}"/usr/share/apps/system-config-printer-kde/{system-config-printer-kde,authconn}.py
- sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' \
- "${pkgdir}"/usr/share/apps/system-config-printer-kde/pysmb.py
+ # Use the python2 executable
+ sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
+ "${pkgdir}"/usr/share/apps/system-config-printer-kde/{system-config-printer-kde,authconn}.py
+ sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' \
+ "${pkgdir}"/usr/share/apps/system-config-printer-kde/pysmb.py
}
diff --git a/extra/kdebindings-python/PKGBUILD b/extra/kdebindings-python/PKGBUILD
index 5389b88a7..9e352d5fe 100644
--- a/extra/kdebindings-python/PKGBUILD
+++ b/extra/kdebindings-python/PKGBUILD
@@ -1,33 +1,67 @@
-# $Id: PKGBUILD 153078 2012-03-12 09:04:41Z andrea $
+# $Id: PKGBUILD 153599 2012-03-16 14:50:09Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
-pkgname=kdebindings-python
+pkgbase=kdebindings-python
+pkgname=('kdebindings-python'
+ 'kdebindings-python2')
pkgver=4.8.1
-pkgrel=1
-pkgdesc="KDE bindings for Python"
-url="http://kde.org/"
+pkgrel=3
+url='http://kde.org/'
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL')
groups=('kdebindings')
-depends=('kdepim-runtime' 'python2-pyqt' 'qscintilla')
-makedepends=('cmake' 'automoc4' 'boost')
+makedepends=('cmake' 'automoc4' 'boost' 'kdepim-runtime' 'python2-pyqt' 'qscintilla')
source=("http://download.kde.org/stable/${pkgver}/src/pykde4-${pkgver}.tar.xz")
sha1sums=('b9ef35269d2e08578ba20d01822dbdbed72bffb8')
build() {
+ export PYTHONDONTWRITEBYTECODE="TRUE"
+
cd "${srcdir}"
mkdir build
cd build
cmake ../pykde4-${pkgver} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_LIBRARY=/usr/lib/libpython3.2mu.so.1.0
+ make
+ cd ..
+
+ mkdir build-python2
+ cd build-python2
+ cmake ../pykde4-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
-DPYTHON_EXECUTABLE=/usr/bin/python2
make
}
-package() {
+package_kdebindings-python() {
+ pkgdesc="A set of Python 3.x bindings for KDE"
+ depends=('kdepim-runtime' 'pyqt' 'qscintilla')
+
cd "${srcdir}"/build
make DESTDIR="${pkgdir}" install
+}
+
+package_kdebindings-python2() {
+ pkgdesc="A set of Python 2.x bindings for KDE"
+ depends=('kdepim-runtime' 'python2-pyqt' 'qscintilla')
+ conflicts=('kdebindings-python<4.8.1-2')
+
+ cd "${srcdir}"/build-python2
+ make DESTDIR="${pkgdir}" install
+
+ # Fix conflicts
+ rm "${pkgdir}"/usr/bin/pykdeuic4
+ ln -sf /usr/lib/python2.7/site-packages/PyQt4/uic/pykdeuic4.py \
+ "${pkgdir}"/usr/bin/python2-pykdeuic4
+
+ mv "${pkgdir}"/usr/share/apps/pykde4/examples \
+ "${pkgdir}"/usr/share/apps/pykde4/python2-examples
+
+ mv "${pkgdir}"/usr/share/sip/PyKDE4 \
+ "${pkgdir}"/usr/share/sip/python2-PyKDE4
# Use the python2 executable
find "${pkgdir}" -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
diff --git a/extra/kdegames/PKGBUILD b/extra/kdegames/PKGBUILD
index d28f5d297..efc11f64a 100644
--- a/extra/kdegames/PKGBUILD
+++ b/extra/kdegames/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 153166 2012-03-12 09:29:12Z andrea $
+# $Id: PKGBUILD 153590 2012-03-16 10:44:31Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
@@ -44,12 +44,12 @@ pkgname=('kdegames-bomber'
'kdegames-lskat'
'kdegames-palapeli')
pkgver=4.8.1
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL' 'LGPL' 'FDL')
groups=('kde' 'kdegames')
-makedepends=('cmake' 'automoc4' 'ggz-client-libs' 'twisted' 'kdebindings-python'
+makedepends=('cmake' 'automoc4' 'ggz-client-libs' 'twisted' 'kdebindings-python2'
'openal')
source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.xz")
sha1sums=('bcf764fd1f2f8083c388c17f26b83eeac568b1d5')
@@ -101,7 +101,7 @@ package_kdegames-granatier() {
package_kdegames-kajongg() {
pkgdesc='The ancient Chinese board game for 4 players'
- depends=('kdegames-libkdegames' 'kdegames-libkmahjongg' 'kdebindings-python' 'twisted')
+ depends=('kdegames-libkdegames' 'kdegames-libkmahjongg' 'kdebindings-python2' 'twisted')
url="http://www.kde.org/applications/games/kajongg/"
install='kdegames.install'
cd $srcdir/build/kajongg
diff --git a/extra/kdesdk/PKGBUILD b/extra/kdesdk/PKGBUILD
index f207de92e..e83f481c2 100644
--- a/extra/kdesdk/PKGBUILD
+++ b/extra/kdesdk/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 153200 2012-03-12 09:39:38Z andrea $
+# $Id: PKGBUILD 153595 2012-03-16 11:45:06Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
@@ -23,7 +23,7 @@ pkgname=('kdesdk-cervisia'
'kdesdk-strigi-analyzer'
'kdesdk-umbrello')
pkgver=4.8.1
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL' 'LGPL' 'FDL')
@@ -183,7 +183,7 @@ package_kdesdk-kuiviewer() {
package_kdesdk-lokalize() {
pkgdesc='Computer-Aided Translation System'
- depends=('kdebase-runtime' 'kdebindings-python')
+ depends=('kdebase-runtime' 'kdebindings-python2')
url="http://kde.org/applications/development/lokalize/"
optdepends=('translate-toolkit: enable extra python script')
install='kdesdk-lokalize.install'
diff --git a/extra/kshutdown/PKGBUILD b/extra/kshutdown/PKGBUILD
index 9f17d4da3..9f4da82e0 100644
--- a/extra/kshutdown/PKGBUILD
+++ b/extra/kshutdown/PKGBUILD
@@ -1,24 +1,21 @@
-# $Id: PKGBUILD 151542 2012-02-27 16:09:41Z giovanni $
+# $Id: PKGBUILD 153572 2012-03-16 04:44:09Z eric $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
pkgname=kshutdown
-pkgver=3.0beta2
+pkgver=3.0beta3
pkgrel=1
pkgdesc="Shutdown Utility for KDE"
arch=(i686 x86_64)
url="http://kshutdown.sourceforge.net/"
license=('GPL')
depends=('kdebase-workspace')
-makedepends=('pkgconfig' 'cmake' 'automoc4')
+makedepends=('pkg-config' 'cmake' 'automoc4')
install='kshutdown.install'
-source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-source-${pkgver}.zip"
- 'kshutdown_3.0beta2-mga-fix_requestshutdown_call.patch')
-md5sums=('1621e19cc74c9578b6cfc3e32166f853'
- 'c03185629d063c8ebbf59a423cf78980')
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-source-${pkgver}.zip")
+md5sums=('2b1ee9aa2300989650cd808c3860cd0a')
build() {
cd "${srcdir}"
- patch -Np0 -i "${srcdir}/kshutdown_3.0beta2-mga-fix_requestshutdown_call.patch"
mkdir build
cd build
cmake ../${pkgname}-${pkgver} \
diff --git a/extra/libmtp/PKGBUILD b/extra/libmtp/PKGBUILD
index 811b29c8f..5631f21e2 100644
--- a/extra/libmtp/PKGBUILD
+++ b/extra/libmtp/PKGBUILD
@@ -1,18 +1,18 @@
-# $Id: PKGBUILD 145614 2011-12-24 03:54:58Z dreisner $
+# $Id: PKGBUILD 153576 2012-03-16 05:45:45Z eric $
# Contributor: damir <damir@archlinux.org>
# Contributor: Kevin Edmonds <edmondskevin@hotmail.com>
pkgname=libmtp
-pkgver=1.1.1
+pkgver=1.1.2
pkgrel=1
-pkgdesc="library implementation of the Media Transfer Protocol"
+pkgdesc="Library implementation of the Media Transfer Protocol"
arch=("i686" "x86_64")
url="http://libmtp.sourceforge.net"
license=('LGPL')
-depends=('libusb-compat')
+depends=('libusb')
options=('!libtool')
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz")
-md5sums=('073e1c2a00ba377f68dce47727e185ae')
+md5sums=('6dc708757e3fd3ccce7445b4f2171263')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/libreoffice/PKGBUILD b/extra/libreoffice/PKGBUILD
index bf7c8472b..c9f0c41f5 100644
--- a/extra/libreoffice/PKGBUILD
+++ b/extra/libreoffice/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 148834 2012-02-05 11:52:15Z ibiru $
+# $Id: PKGBUILD 153604 2012-03-16 15:27:04Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
pkgbase="libreoffice"
@@ -14,58 +14,39 @@ pkgname=('libreoffice-common'
'libreoffice-sdk-doc'
'libreoffice-writer'
'libreoffice-en-US'
- #'libreoffice-extension-barcode' #
- 'libreoffice-extension-diagram'
- 'libreoffice-extension-google-docs'
- 'libreoffice-extension-hunart'
- #'libreoffice-extension-lightproof' # no source integration
- #'libreoffice-extension-mysql-connector' # missing libmysqlcppconn-dev configure: error: mysql_driver.h not found. install MySQL C++ Connectivity
- 'libreoffice-extension-nlpsolver'
- 'libreoffice-extension-ct2n'
- 'libreoffice-extension-numbertext'
- 'libreoffice-extension-oooblogger'
+ 'libreoffice-postgresql-connector'
'libreoffice-extension-pdfimport'
'libreoffice-extension-presenter-screen'
'libreoffice-extension-presentation-minimizer'
- 'libreoffice-extension-report-builder'
- 'libreoffice-extension-scripting-beanshell'
- 'libreoffice-extension-scripting-javascript'
- 'libreoffice-extension-scripting-python'
- 'libreoffice-extension-typo'
- 'libreoffice-extension-validator'
- 'libreoffice-extension-watch-window'
- 'libreoffice-extension-wiki-publisher')
-_LOver=3.4.5.2
-pkgver=3.4.5
-pkgrel=2
+ 'libreoffice-extension-report-builder')
+_LOver=3.5.1.2
+pkgver=3.5.1
+pkgrel=1
arch=('i686' 'x86_64')
-#_LO_tree="3.4"
-_OFFICEUPD="340"
license=('LGPL3')
url="http://www.libreoffice.org/"
makedepends=( # makedepends
- 'sane' 'perl-archive-zip' 'zip' 'unzip' 'xulrunner' 'unixodbc>=2.3.1' 'hsqldb-java' 'boost'
- 'apache-ant' 'gperf' 'poppler>=0.18.0' 'kdelibs' 'gconf' 'cppunit' #'libmysqlclient'
- 'beanshell' 'vigra' 'libldap' 'lucene' 'libmythes' 'junit' 'libwpg' 'imagemagick'
- 'mesa' 'gstreamer0.10-base' 'java-environment'
+ 'sane' 'perl-archive-zip' 'zip' 'unzip' 'unixodbc' 'hsqldb-java' 'boost'
+ 'apache-ant' 'gperf' 'poppler>=0.18.0' 'kdelibs' 'gconf' 'cppunit'
+ 'beanshell' 'vigra' 'lucene' 'junit' 'libmythes' 'libwpg' 'imagemagick'
+ 'mesa' 'gstreamer0.10-base' 'java-environment' 'postgresql-libs'
#'saxon' - currently broken
- # the depends from libreoffice main pkg
+ # the runtime dependencies
"curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.2' 'libwps' 'libxaw' "neon>=0.28.6"
- 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' "icu>=4.6" 'libxslt'
+ 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' "icu>=4.6" 'libxslt' 'librsvg'
'redland' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'libtextcat' 'graphite'
- 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'gtk2' 'orbit2' 'translate-toolkit' # keep gtk2 for install script
- 'ttf-dejavu') # to satisfy regression tests
+ 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'gtk2' 'orbit2' 'translate-toolkit' 'xdg-utils'
+ 'ttf-dejavu') # to satisfy regression tests
# http://download.documentfoundation.org/mirrors/all.html
# http://wiki.documentfoundation.org/Mirrors
_mirror="http://download.documentfoundation.org/libreoffice/src/${pkgver}"
#_mirror="http://dev-builds.libreoffice.org/pre-releases/src"
-#_mirror="http://dev-builds.libreoffice.org/pre-releases-3-4/src"
-_additional_source_url="http://hg.services.openoffice.org/binaries"
_additional_source_url="http://dev-www.libreoffice.org/src"
-source=(${_mirror}/${pkgbase}-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}.tar.bz2 #,translations
- ${_additional_source_url}/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
+source=(${_mirror}/${pkgbase}-{core,help,translations}-${_LOver}.tar.xz
+ ${_additional_source_url}/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+ ${_additional_source_url}/d28864eb2b59bb57b034c0d4662a3cee-libvisio-0.0.15.tar.bz2
${_additional_source_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
${_additional_source_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
${_additional_source_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
@@ -88,31 +69,23 @@ source=(${_mirror}/${pkgbase}-{artwork,base,bootstrap,calc,components,extensions
${_additional_source_url}/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
${_additional_source_url}/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
${_additional_source_url}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
- ${_additional_source_url}/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
- http://download.go-oo.org/src/0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2
+ ${_additional_source_url}/0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2
+ ${_additional_source_url}/e1c178b18f130b40494561f02bc1a948-libexttextcat-3.2.0.tar.bz2
+ ${_additional_source_url}/7c2549f6b0a8bb604e6c4c729ffdcfe6-libcmis-0.1.0.tar.gz
http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll
- http://download.go-oo.org/src/90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2
- http://download.go-oo.org/src/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt
- http://ooo.itc.hu/oxygenoffice/download/libreoffice/b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt
- buildfix_boost.diff
- buildfix_ct2n.diff
- vbahelper.visibility.patch
- scp2-more-reasonable-file-access-rights.diff)
-noextract=(185d60944ea767075d27247c3162b3bc-unowinreg.dll
- f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
+ gmake_install.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=1048d8fa4abd3e55a45dfb6884db808da1d72c9e
+ smp_buildfix.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=cf23f57ae6bb7af689a45e0a850c3c2f67a8f810
+ buildfix_kde4fpicker.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=ee67c55260ec7723c39606955ccdbd3e2934935a)
+noextract=(d28864eb2b59bb57b034c0d4662a3cee-libvisio-0.0.15.tar.bz2
+ 18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+ 185d60944ea767075d27247c3162b3bc-unowinreg.dll
0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2
ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
+ e1c178b18f130b40494561f02bc1a948-libexttextcat-3.2.0.tar.bz2
+ 7c2549f6b0a8bb604e6c4c729ffdcfe6-libcmis-0.1.0.tar.gz
35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz
a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
@@ -130,39 +103,12 @@ noextract=(185d60944ea767075d27247c3162b3bc-unowinreg.dll
3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
- ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
- 18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
- 7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt
- 41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt
- 451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
- bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt
- 23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt
- b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt
- b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt
- 9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt
- dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt
- b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt
- 90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2)
-md5sums=('a75d7d4ebefb4c9a4bb256acf866fa81'
- 'c1e2dabdf4cfcd5957779014a7f9787e'
- '79c9c7fc208e7f56af09f284f261a7da'
- 'c83a8a374d3d5cc83c6ac3b5ff613e46'
- 'fa64799ebad8cbd2c160ac2f87bd5599'
- 'b24fba57aa4185934e86a0a8db4a3433'
- '4f98020088ab9b597fc21b617121bd47'
- '3c3be7c5f923339c90b0d1d6ecad0243'
- '3a0bb4bb096b7488533ed2ee466a2bc9'
- 'f2b180aa1eff3884b4ca81c048f1e327'
- 'a9af488ef92ad4442eafba874249c529'
- 'db6a67c96a9090bc5e21b64e202a984e'
- 'e00187ae0840e1f6a00fa3290cacf0d1'
- '20fbf6cffd2b06e90a52105b75a57828'
- '4af055f590732ec19a2534b2278ac49c'
- 'c84693796d2b1d9c8269425b1fa53aef'
- 'd4926dc27b6884656feec6753f4fdf22'
- '770678ca19cca0f7985c1c82b2dccf48'
- '97a1e3de430b124faf35bf334248ad53'
- 'f02578f5218f217a9f20e9c30e119c6a'
+ ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip)
+md5sums=('1edf0d39a7a921f6415f6a6ec7b314b3'
+ '607b544cd7b38f9e6db6fe7da25007a7'
+ 'a3fa7818bfab14a6cccec645193e9982'
+ '18f577b374d60b3c760a3a3350407632'
+ 'd28864eb2b59bb57b034c0d4662a3cee'
'1f24ab1d39f4a51faf22244c94a6203f'
'35c94d2df8893241173de1d16b6034c0'
'798b2ffdc8bcfe7bca2cf92b62caf685'
@@ -185,53 +131,37 @@ md5sums=('a75d7d4ebefb4c9a4bb256acf866fa81'
'ace6ab49184e329db254e454a010f56d'
'db60e4fde8dd6d6807523deb71ee34dc'
'ba2930200c9f019c2d93a8c88c651a0f'
- '18f577b374d60b3c760a3a3350407632'
'0ff7d225d087793c8c2c680d77aac3e7'
+ 'e1c178b18f130b40494561f02bc1a948'
+ '7c2549f6b0a8bb604e6c4c729ffdcfe6'
'185d60944ea767075d27247c3162b3bc'
- '90401bca927835b6fbae4a707ed187c8'
- '451ccf439a36a568653b024534669971'
- '7e7efc5d4a03126bb9ae3ae9aa2c4e87'
- '41c9b65ad60af4b3255bbecdfef11736'
- 'bbdd5639ada63e3130761daaecae1a10'
- '23bd75552206dfcd8fd4e29137dcac84'
- 'b8cbca7b3363e6ca2d02bc0ba2b63904'
- 'b632bdd25649cc4067bcb410bae23d2b'
- '9d60b6cfa3ef1926848710bbcd11115b'
- 'dbaafd21de055e582d92d7d32fe9da13'
- 'b7b2d0e04e142f26dd96119c80757d1f'
- 'bc228237108cab7745897a9f466b6d39'
- 'eee273f501ff45dc5f1365e78c6d57c0'
- '43b145db28e6c0d73578ae6fd35e510d'
- '37638431e7e40baf2e47966ebb9bc0e9')
+ '60ce5dc9bd098f95c2e621a930c98dd9'
+ '661a52a02a31b3afbe4b3b3146061afd'
+ '15fe8b5d79fbdc0b6bc2b454086671e7')
build() {
unset J2REDIR; unset J2SDKDIR; unset JAVA_HOME; unset CLASSPATH; unset EXTRAOPTS
[ -z "${JAVA_HOME}" ] && . /etc/profile.d/jdk.sh || . /etc/profile.d/openjdk6.sh
- [ -z "${MOZ_PLUGIN_PATH}" ] && . /etc/profile.d/mozilla-common.sh
[ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
- # move all LibO sources into one build directory
- mkdir ${srcdir}/build && cd ${srcdir}/build
- for i in libreoffice-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}; do #,translations
- mv ${srcdir}/$i/* .
- done
-# mv ${srcdir}/libreoffice-bootstrap-${_LOver}/* .
-# ./bin/unpack-sources ${srcdir}/build
+ cd ${srcdir}/libreoffice-core-$_LOver
# move external sources into place
- mkdir ${srcdir}/ext_sources && cd ${srcdir}/ext_sources
+ mkdir ${srcdir}/ext_sources && pushd ${srcdir}/ext_sources
for source in "${noextract[@]}"; do
ln -s ${srcdir}/$source .
done
-
- cd ${srcdir}/build
+ popd
+
+ ln -s ../libreoffice-help-$_LOver/helpcontent2 .
+ ln -s ../libreoffice-translations-$_LOver/translations .
# buildfixes & bugfixes
- #patch -Np1 -i ${srcdir}/buildfix_boost.diff
- patch -Np1 -i ${srcdir}/buildfix_ct2n.diff
- patch -Np0 -i ${srcdir}/vbahelper.visibility.patch
- patch -Np0 -i ${srcdir}/scp2-more-reasonable-file-access-rights.diff
+ # one late fix to solve make distro-pack-install issue
+ patch -Np1 -i ${srcdir}/gmake_install.diff
+ patch -Np1 -i ${srcdir}/smp_buildfix.diff
+ patch -Np1 -i ${srcdir}/buildfix_kde4fpicker.diff
# unset C(XX)FLAGS
# http://www.openoffice.org/issues/show_bug.cgi?id=103205
@@ -249,31 +179,22 @@ build() {
# python2 fix
export PYTHON=python2
- # http://wiki.documentfoundation.org/Development/How_to_build/Configure_options
-
-# if [ "$CARCH" = "x86_64" ]; then
-# EXTRAOPTS="--without-stlport"
-# else
-# EXTRAOPTS="--with-stlport" # --without-system-boost"
-# # # avoid problems with ixion for now
-# sed -i '/fields-table-formula.diff/d' patches/dev300/apply || return 1
-# fi
-
- # needed for 0003-distro-install-fix-en-US-only-installation.patch
- autoconf -f
+# autoconf -f
# non-SMP test build
# export MAKEFLAGS="-j1"
- ./configure --with-build-version="${_LOver} ArchLinux build-${pkgrel}" --with-vendor="ArchLinux" \
+ #./configure --with-build-version="${_LOver} ArchLinux build-${pkgrel}" --with-vendor="ArchLinux" \
+# touch autogen.lastrun
+ ./autogen.sh --with-build-version="${_LOver} ArchLinux build-${pkgrel}" --with-vendor="ArchLinux" \
--with-unix-wrapper="libreoffice" \
--enable-split-app-modules \
--with-max-jobs=${MAKEFLAGS/-j/} --with-num-cpus=${MAKEFLAGS/-j/} \
--with-external-tar="${srcdir}/ext_sources" \
+ --disable-fetch-external \
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
- --with-install-dirname="${pkgbase}" --libdir=/usr/lib --mandir=/usr/share/man \
+ --libdir=/usr/lib --mandir=/usr/share/man \
--disable-verbose \
--with-lang="" \
- --enable-cairo\
--enable-crashdump \
--enable-dbus \
--enable-evolution2\
@@ -281,66 +202,59 @@ build() {
--disable-gnome-vfs\
--disable-kde\
--enable-kde4\
- --enable-ldap \
+ --enable-gtk3 \
--enable-lockdown\
+ --enable-mergelibs \
--enable-opengl \
--enable-odk\
- --enable-ext-barcode \
- --enable-ext-diagram \
- --enable-ext-google-docs \
- --enable-ext-hunart \
- --disable-ext-lightproof \
--disable-ext-mysql-connector \
--with-system-mysql \
- --enable-ext-nlpsolver \
- --enable-ext-ct2n \
- --enable-ext-numbertext \
- --enable-ext-oooblogger \
- --enable-ext-pdfimport \
- --enable-ext-presenter-console \
- --enable-ext-presenter-minimizer \
- --enable-ext-report-builder \
- --enable-ext-scripting-beanshell \
- --enable-ext-scripting-javascript \
- --enable-ext-scripting-python \
- --enable-ext-typo \
- --enable-ext-validator \
- --enable-ext-watch-window \
- --enable-ext-wiki-publisher \
+ --enable-librsvg=system \
--without-fonts\
--without-afms\
--without-ppds\
--without-system-libwps\
--without-system-mdds\
--without-myspell-dicts \
+ --without-system-libvisio \
+ --without-system-libcmis \
+ --without-system-sampleicc \
+ --without-system-libexttextcat \
--with-system-dicts \
--with-external-dict-dir=/usr/share/hunspell \
--with-external-hyph-dir=/usr/share/hyphen \
--with-external-thes-dir=/usr/share/mythes \
+ --with-system-beanshell \
--with-system-cppunit\
--with-system-graphite\
--with-system-libwpg \
--with-system-libwps \
--with-system-redland\
--without-system-saxon\
- --with-system-libtextcat \
- --with-external-libtextcat-data \
- --with-openldap\
+ --disable-mozilla \
+ --without-system-mozilla \
+ --without-system-mozilla-headers \
--with-ant-home="/usr/share/java/apache-ant"\
- --without-system-boost\
+ --with-system-boost\
--with-system-cairo\
--with-system-libs\
- --with-system-mozilla\
--with-system-mythes\
- --with-system-xrender-headers\
--with-system-headers\
+ --with-system-hsqldb \
--with-alloc=system\
--with-system-lucene\
--with-lucene-core-jar=/usr/share/java/lucene-core.jar\
--with-lucene-analyzers-jar=/usr/share/java/lucene-analyzers.jar\
--with-java-target-version=1.5 \
- $EXTRAOPTS || return 1
+ $EXTRAOPTS
+
+# --disable-ext-lightproof \
+
+#--with-install-dirname="${pkgbase}"
+# --enable-cairo\
+# --with-system-libtextcat \
+# --with-external-libtextcat-data \
#--enable-split-opt-features Split file lists for some optional features, .e.g. pyuno, testtool
#--with-servlet-api-jar=JARFILE
@@ -350,10 +264,7 @@ build() {
touch src.downloaded
#./download
- unset MAKEFLAGS
- ./bootstrap
make
-
# fake installation to create split file lists
mkdir $srcdir/fakeinstall
make DESTDIR=${srcdir}/fakeinstall distro-pack-install
@@ -368,11 +279,9 @@ package_libreoffice-common() {
pkgdesc="common files for LibreOffice - a productivity suite that is compatible with other major office suites"
install=${pkgbase}.install
- depends=('libreoffice-langpack' "curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libxaw' "neon>=0.28.6"
- 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'libxslt' "icu>=4.6"
- 'redland' 'hyphen' 'gcc-libs' 'sh' 'libtextcat' 'graphite'
- 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'gtk2' 'orbit2') # keep gtk2 for install script
- #'java-runtime'
+ depends=('libreoffice-langpack' "hunspell>=1.2.8" "python2>=2.7" "neon>=0.28.6"
+ 'nspr' "icu>=4.6" 'libsm' 'redland' 'hyphen' 'graphite'
+ 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'xdg-utils' 'orbit2')
#'saxon'
optdepends=('libreoffice-langpack: additional language support'
'java-runtime: adds java support'
@@ -382,12 +291,10 @@ package_libreoffice-common() {
'pstoedit: translates PostScript and PDF graphics into other vector formats'
'poppler: for shipped pdfimport extension'
'libmythes: for use in thesaurus'
- 'hsqldb-java: default database format for OpenOffice.org'
'beanshell: interactive java -- good for prototyping /macros'
'vigra: C++ computer vision library, usable in Basebmp'
'libmspack: library for Microsoft compression formats for use in FontOOo'
'libwpg: library for importing and converting Corel WordPerfect(tm) Graphics images'
- 'libldap: to get profiles via ldap'
'lucene: full-text search engine library for Java needed in the help section'
'sane: for scanner access'
'unixodbc: adds ODBC database support'
@@ -401,11 +308,11 @@ package_libreoffice-common() {
replaces=('go-openoffice' 'openoffice-base' 'libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/common_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/common_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/common_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/common_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -413,18 +320,14 @@ package_libreoffice-common() {
mv ${srcdir}/fakeinstall${file} ${pkgdir}$file
done
- # # remove version in menu entry and make it visible
-# sed -i -e "/NoDisplay=true/d" ${pkgdir}/usr/share/applications/libreoffice-qstart.desktop
-# echo "Icon=startcenter" >> ${pkgdir}/usr/share/applications/libreoffice-qstart.desktop
-
# put configuration files into place
install -dm755 ${pkgdir}/etc/libreoffice
install -m644 ${pkgdir}/usr/lib/libreoffice/program/{bootstraprc,sofficerc} ${pkgdir}/etc/libreoffice/
- install -m644 ${pkgdir}/usr/lib/libreoffice/basis3.4/share/psprint/psprint.conf ${pkgdir}/etc/libreoffice/
+ install -m644 ${pkgdir}/usr/lib/libreoffice/share/psprint/psprint.conf ${pkgdir}/etc/libreoffice/
# install dummy links to make them found by LibO
cd ${pkgdir}/usr/lib/libreoffice/program/
ln -vsf /etc/libreoffice/{bootstraprc,sofficerc} .
- cd ${pkgdir}/usr/lib/libreoffice/basis3.4/share/psprint/
+ cd ${pkgdir}/usr/lib/libreoffice/share/psprint/
ln -vsf /etc/libreoffice/psprint.conf .
#fix http://bugs.archlinux.org/task/17656
@@ -436,18 +339,18 @@ package_libreoffice-common() {
package_libreoffice-base() {
pkgdesc="GUI Spreadsheet Applicationdatabase front-end for LibreOffice. Allows creation and management of databases through a GUI."
- depends=('libreoffice-common')
- optdepends=()
+ depends=('libreoffice-common' 'hsqldb-java')
+ optdepends=('libreoffice-postgresql-connector')
backup=()
groups=('libreoffice')
replaces=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/base_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/base_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/base_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/base_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -456,6 +359,35 @@ package_libreoffice-base() {
done
}
+package_libreoffice-postgresql-connector() {
+ pkgdesc="A PostgreSQL connector for the database front-end for LibreOffice"
+ depends=('libreoffice-base' 'postgresql-libs')
+ groups=('libreoffice')
+ replaces=('libreoffice')
+
+ # no file-list so far
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/program/services
+ install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc.uno.so ${pkgdir}/usr/lib/libreoffice/program
+ install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc-impl.uno.so ${pkgdir}/usr/lib/libreoffice/program
+ install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc.ini ${pkgdir}/usr/lib/libreoffice/program
+ install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/services/postgresql-sdbc.rdb ${pkgdir}/usr/lib/libreoffice/program/services
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/registry
+ install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/share/registry/postgresqlsdbc.xcd ${pkgdir}/usr/lib/libreoffice/share/registry
+
+# # create directories from *list.txt file
+# for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
+# install -dm755 ${pkgdir}/${directory/\%dir/}
+# done
+# # install files into the pkg from fakeinstall dir
+# for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
+# dirname=`dirname $file`
+# # check if directory has been already been created - some are missing like manpages
+# [ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
+# # mv file from fakeinstall to pkgdir
+# mv ${srcdir}/fakeinstall${file} ${pkgdir}$file
+# done
+}
+
package_libreoffice-calc() {
pkgdesc="Spreadsheet application for LibreOffice."
depends=('libreoffice-common' 'lpsolve' )
@@ -465,11 +397,11 @@ package_libreoffice-calc() {
replaces=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/calc_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/calc_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/calc_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/calc_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -487,11 +419,11 @@ package_libreoffice-draw() {
replaces=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/draw_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/draw_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/draw_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/draw_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -502,17 +434,17 @@ package_libreoffice-draw() {
package_libreoffice-gnome() {
pkgdesc="Plug-in for LibreOffice that enables integration into the Gnome and other gtk desktop environment."
- depends=('libreoffice-common' 'dbus-glib')
+ depends=('libreoffice-common' 'gtk2' 'gtk3') #'dbus-glib'
optdepends=()
backup=()
groups=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/gnome_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/gnome_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/gnome_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/gnome_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -530,11 +462,11 @@ package_libreoffice-impress() {
replaces=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/impress_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/impress_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/impress_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/impress_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -551,11 +483,11 @@ package_libreoffice-kde4() {
groups=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/kde4_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/kde4_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/kde4_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/kde4_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -573,11 +505,11 @@ package_libreoffice-math() {
replaces=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/math_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/math_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/math_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/math_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -594,11 +526,11 @@ package_libreoffice-sdk() {
groups=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/sdk_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/sdk_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/sdk_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/sdk_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -608,9 +540,9 @@ package_libreoffice-sdk() {
# fix ArchLinux LibreOffice installation paths
sed -i -e "s,@OO_SDK_NAME@,libreoffice-sdk," \
- -e "s,@OO_SDK_HOME@,/usr/lib/libreoffice/basis3.4/sdk," \
+ -e "s,@OO_SDK_HOME@,/usr/lib/libreoffice/sdk," \
-e "s,@OFFICE_HOME@,/usr/lib/libreoffice," \
- -e "s,@OFFICE_BASE_HOME@,/usr/lib/libreoffice/basis3.4," \
+ -e "s,@OFFICE_BASE_HOME@,/usr/lib/libreoffice," \
-e "s,@OO_SDK_URE_HOME@,/usr/lib/libreoffice/ure," \
-e "s,@OO_SDK_MAKE_HOME@,/usr/bin," \
-e "s,@OO_SDK_ZIP_HOME@,/usr/bin," \
@@ -618,7 +550,7 @@ package_libreoffice-sdk() {
-e "s,@OO_SDK_CC_55_OR_HIGHER@,," \
-e "s,@OO_SDK_JAVA_HOME@,\$J2SDKDIR," \
-e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \
- -e "s,@SDK_AUTO_DEPLOYMENT@,NO," ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk/setsdkenv_unix.{csh,sh}.in
+ -e "s,@SDK_AUTO_DEPLOYMENT@,NO," ${pkgdir}/usr/lib/libreoffice/sdk/setsdkenv_unix.{csh,sh}.in
}
package_libreoffice-sdk-doc() {
@@ -629,11 +561,11 @@ package_libreoffice-sdk-doc() {
groups=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/sdk_doc_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/sdk_doc_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/sdk_doc_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/sdk_doc_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -642,7 +574,7 @@ package_libreoffice-sdk-doc() {
done
#fix permissions
- find ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk/examples -type f -exec chmod -x {} \;
+ find ${pkgdir}/usr/lib/libreoffice/sdk/examples -type f -exec chmod -x {} \;
}
package_libreoffice-writer() {
@@ -654,11 +586,11 @@ package_libreoffice-writer() {
replaces=('libreoffice')
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/writer_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/writer_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/writer_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/writer_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -675,11 +607,11 @@ package_libreoffice-en-US() {
conflicts=(openoffice-en-US)
# create directories from *list.txt file
- for directory in `grep ^%dir ${srcdir}/build/file-lists/lang_en_US_list.txt`; do
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/lang_en_US_list.txt`; do
install -dm755 ${pkgdir}/${directory/\%dir/}
done
# install files into the pkg from fakeinstall dir
- for file in `grep -v ^%dir $srcdir/build/file-lists/lang_en_US_list.txt`; do
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/lang_en_US_list.txt`; do
dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
[ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
@@ -688,117 +620,6 @@ package_libreoffice-en-US() {
done
}
-package_libreoffice-extension-barcode() {
-
- pkgdesc="This extension generates UPC-A, EAN-13, ISBN and JAN barcodes in Draw "
- #arch=('any')
- depends=('libreoffice-common')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/Barcode
- chmod o-w -R ${pkgdir}/usr/lib/libreoffice/share/extensions/Barcode
-}
-
-package_libreoffice-extension-diagram() {
-
- pkgdesc="An OOo Draw and Impress extension that creates your favorite diagrams with a few clicks"
- #arch=('any')
- depends=('libreoffice-common' 'java-environment')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/diagram
-}
-
-package_libreoffice-extension-google-docs() {
-
- pkgdesc="Google Documents extension for LibreOffice"
- #arch=('any')
- depends=('libreoffice-common' 'java-environment')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/google-docs
-}
-
-package_libreoffice-extension-hunart() {
-
- pkgdesc="Hungarian cross-reference toolbar extension"
- #arch=('any')
- depends=('libreoffice-common')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/hunart
-}
-
-#package_libreoffice-extension-lightproof() {
-
-# pkgdesc="Lightproof extension for LibreOffice"
- #arch=('any')
-# depends=('libreoffice-common')
-# groups=('libreoffice-extensions')
-
-# install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip -q ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/Lightproof.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/lightproof
-#}
-
-#package_libreoffice-extension-mysql-connector() {
-
-# pkgdesc="MySQL Connector extension for LibreOffice"
- #arch=('any')
-# depends=('libreoffice-common')
-# groups=('libreoffice-extensions')
-
-# install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip -q ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/Mysql-connector.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/mysql-connector
-#}
-
-package_libreoffice-extension-nlpsolver() {
-
- pkgdesc="This extension integrates into Calc and offers new Solver engines to use for optimizing nonlinear programming models"
- #arch=('any')
- depends=('libreoffice-common' 'java-environment')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/NLPSolver.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/nlpsolver
-}
-
-package_libreoffice-extension-ct2n() {
-
- pkgdesc="This extension enables you to convert text-cells in Calc with numbers and dates, to real numbers and dates."
- #arch=('any')
- depends=('libreoffice-common')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/ConvertTextToNumber.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/ct2n
-}
-
-package_libreoffice-extension-numbertext() {
-
- pkgdesc="NUMBERTEXT/MONEYTEXT extensions"
- #arch=('any')
- depends=('libreoffice-common')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/numbertext
-}
-
-package_libreoffice-extension-oooblogger() {
-
- pkgdesc="An extensions for blogging"
- #arch=('any')
- depends=('libreoffice-common' 'coreutils' 'python')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/oooblogger
-}
-
package_libreoffice-extension-pdfimport() {
pkgdesc="This extension allows you to import and modify PDF documents"
@@ -806,7 +627,7 @@ package_libreoffice-extension-pdfimport() {
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/pdfimport/pdfimport.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/pdfimport
+ unzip -q ${srcdir}/libreoffice-core-$_LOver/solver/unxlng*/bin/pdfimport/pdfimport.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/pdfimport
}
package_libreoffice-extension-presenter-screen() {
@@ -816,7 +637,7 @@ package_libreoffice-extension-presenter-screen() {
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/presenter-screen.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presenter-screen
+ unzip -q ${srcdir}/libreoffice-core-$_LOver/solver/unxlng*/bin/presenter-screen.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presenter-screen
}
package_libreoffice-extension-presentation-minimizer() {
@@ -826,7 +647,7 @@ package_libreoffice-extension-presentation-minimizer() {
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/presentation-minimizer.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presentation-minimizer
+ unzip -q ${srcdir}/libreoffice-core-$_LOver/solver/unxlng*/bin/presentation-minimizer.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presentation-minimizer
}
package_libreoffice-extension-report-builder() {
@@ -837,81 +658,5 @@ package_libreoffice-extension-report-builder() {
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/report-builder.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/report-builder
-}
-
-package_libreoffice-extension-scripting-beanshell() {
-
- pkgdesc="LibreOffice extension - Enables support for scripts in BeanShell"
- depends=('libreoffice-common' 'java-environment')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-beanshell.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-beanshell
-}
-
-package_libreoffice-extension-scripting-javascript() {
-
- pkgdesc="LibreOffice extension - Enables support for scripts in JavaScript"
- depends=('libreoffice-common' 'java-environment')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-javascript.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-javascript
-}
-
-package_libreoffice-extension-scripting-python() {
-
- pkgdesc="LibreOffice extension - Enables support for scripts in Python"
- depends=('libreoffice-common' 'python')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-python.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-python
-}
-
-package_libreoffice-extension-typo() {
-
- pkgdesc="Typography toolbar extension"
- #arch=('any')
- depends=('libreoffice-common')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/typo
- find ${pkgdir} -type d -exec chmod 755 {} \;
- #chmod o+r -R ${pkgdir}/usr/lib/libreoffice/share/extensions/typo
-}
-
-package_libreoffice-extension-validator() {
-
- pkgdesc="Validator extension for LibreOffice"
- #arch=('any')
- depends=('libreoffice-common' 'java-environment')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/validator
-}
-
-package_libreoffice-extension-wiki-publisher() {
-
- pkgdesc="This extension enables you to create Wiki articles on MediaWiki servers without having to know the syntax of the MediaWiki markup language"
- #arch=('any')
- depends=('libreoffice-common' 'java-environment')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/wiki-publisher.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/wiki-publisher
-}
-
-package_libreoffice-extension-watch-window() {
-
- pkgdesc="A OOo Calc extension to add a Watch Window, which keeps the value of the monitored cell on the screen."
- #arch=('any')
- depends=('libreoffice-common' 'java-environment')
- groups=('libreoffice-extensions')
-
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
- unzip -q ${srcdir}/23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/watch-window
+ unzip -q ${srcdir}/libreoffice-core-$_LOver/solver/unxlng*/bin/report-builder.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/report-builder
}
diff --git a/extra/libreoffice/libreoffice.install b/extra/libreoffice/libreoffice.install
index cb0d393dd..e66b66f3d 100644
--- a/extra/libreoffice/libreoffice.install
+++ b/extra/libreoffice/libreoffice.install
@@ -1,7 +1,6 @@
post_install() {
-gtk-update-icon-cache -f -q /usr/share/icons/hicolor
-#xdg-icon-resource forceupdate --theme hicolor
+xdg-icon-resource forceupdate --theme hicolor
update-desktop-database -q
update-mime-database usr/share/mime > /dev/null 2>&1
@@ -25,8 +24,7 @@ echo " * make sure you have installed some ttf font (ttf-dejavu recommended)"
post_upgrade() {
# post_install $1
-gtk-update-icon-cache -f -q /usr/share/icons/hicolor
-#xdg-icon-resource forceupdate --theme hicolor
+xdg-icon-resource forceupdate --theme hicolor
update-desktop-database -q
update-mime-database usr/share/mime > /dev/null 2>&1
if [ "`vercmp $2 3.4.2rc1`" -lt 0 ]; then
@@ -44,7 +42,6 @@ update-mime-database usr/share/mime > /dev/null 2>&1
post_remove() {
update-desktop-database -q
-gtk-update-icon-cache -f -q /usr/share/icons/hicolor
-#xdg-icon-resource forceupdate --theme hicolor
+xdg-icon-resource forceupdate --theme hicolor
update-mime-database usr/share/mime > /dev/null 2>&1
}
diff --git a/extra/libx11/PKGBUILD b/extra/libx11/PKGBUILD
index fc3fd1d0b..67228de92 100644
--- a/extra/libx11/PKGBUILD
+++ b/extra/libx11/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 153292 2012-03-12 20:52:22Z andyrtr $
+# $Id: PKGBUILD 153607 2012-03-16 17:04:23Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=libx11
-pkgver=1.4.99.1
+pkgver=1.4.99.901
pkgrel=1
pkgdesc="X11 client-side library"
arch=(i686 x86_64)
@@ -14,7 +14,7 @@ license=('custom')
source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.bz2
xorg.sh
xorg.csh)
-sha1sums=('317e0112926926a52c13f56f71c1ec9e4540cf4d '
+sha1sums=('af10b064c1c64ee9e7daae0a7f1f9719eb7e965a'
'4b756387426afb2a5bb7a155631ec42348abf5c1'
'45b0b310776cf5d9a94b4a18a5c63ddad9de6ba8')
diff --git a/extra/libxt/PKGBUILD b/extra/libxt/PKGBUILD
index 21c48820f..8fd5b915a 100644
--- a/extra/libxt/PKGBUILD
+++ b/extra/libxt/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 153273 2012-03-12 20:17:00Z andyrtr $
+# $Id: PKGBUILD 153609 2012-03-16 17:09:01Z andyrtr $
#Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=libxt
-pkgver=1.1.2
-pkgrel=2
+pkgver=1.1.3
+pkgrel=1
pkgdesc="X11 toolkit intrinsics library"
arch=('i686' 'x86_64')
url="http://xorg.freedesktop.org/"
@@ -11,15 +11,11 @@ license=('custom')
depends=('libsm' 'libx11')
makedepends=('xorg-util-macros')
options=('!libtool')
-source=("${url}/releases/individual/lib/libXt-${pkgver}.tar.bz2"
- Revert_treat_unexpected_returned_events_from_poll_as_errors.diff)
-sha1sums=('9e84b807419d78bda4acbd7aea05aed2ab0556cf'
- 'bebadf4b90f6a49530b5600a12a9385253e0daa6')
+source=("${url}/releases/individual/lib/libXt-${pkgver}.tar.bz2")
+sha1sums=('2cef068bc4d7170e31b89b5c06aeaf4451a7699a')
build() {
cd "${srcdir}/libXt-${pkgver}"
- # revert broken commit, see https://bugs.archlinux.org/task/28844 + https://bugs.archlinux.org/task/28875 + https://bugs.freedesktop.org/show_bug.cgi?id=47203
- patch -Np1 -R -i ${srcdir}/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff
./configure --prefix=/usr --sysconfdir=/etc --disable-static
make
}
diff --git a/extra/samba/PKGBUILD b/extra/samba/PKGBUILD
index f6bf687d5..b3093389f 100644
--- a/extra/samba/PKGBUILD
+++ b/extra/samba/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 151755 2012-03-02 08:43:36Z tpowa $
+# $Id: PKGBUILD 153619 2012-03-16 17:50:36Z stephane $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgbase=samba
@@ -8,7 +8,7 @@ pkgver=3.6.3
# to append 'a','b',etc to their subsequent releases, which pamcan
# misconstrues as alpha, beta, etc. Bad samba!
_realver=3.6.3
-pkgrel=2
+pkgrel=4
arch=(i686 x86_64)
url="http://www.samba.org"
license=('GPL3')
diff --git a/extra/systemd/0001-util-never-follow-symlinks-in-rm_rf_children.patch b/extra/systemd/0001-util-never-follow-symlinks-in-rm_rf_children.patch
new file mode 100644
index 000000000..7ac9251b3
--- /dev/null
+++ b/extra/systemd/0001-util-never-follow-symlinks-in-rm_rf_children.patch
@@ -0,0 +1,32 @@
+From 5ebff5337594d690b322078c512eb222d34aaa82 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Fri, 2 Mar 2012 10:39:10 +0100
+Subject: [PATCH] util: never follow symlinks in rm_rf_children()
+
+The function checks if the entry is a directory before recursing, but
+there is a window between the check and the open, during which the
+directory could be replaced with a symlink.
+
+CVE-2012-1174
+https://bugzilla.redhat.com/show_bug.cgi?id=803358
+---
+ src/util.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/util.c b/src/util.c
+index 20cbc2b..dfc1dc6 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -3593,7 +3593,8 @@ static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
+ if (is_dir) {
+ int subdir_fd;
+
+- if ((subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)) < 0) {
++ subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW);
++ if (subdir_fd < 0) {
+ if (ret == 0 && errno != ENOENT)
+ ret = -errno;
+ continue;
+--
+1.7.9.4
+
diff --git a/extra/systemd/PKGBUILD b/extra/systemd/PKGBUILD
index 9e77b3e95..d1f60b49c 100644
--- a/extra/systemd/PKGBUILD
+++ b/extra/systemd/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 153036 2012-03-11 15:14:05Z heftig $
+# $Id: PKGBUILD 153641 2012-03-17 02:44:42Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
pkgbase=systemd
pkgname=('systemd' 'libsystemd')
-pkgver=43
-pkgrel=4
+pkgver=44
+pkgrel=1
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
license=('GPL2')
@@ -12,17 +12,17 @@ makedepends=('acl' 'cryptsetup' 'dbus-core' 'docbook-xsl' 'gperf' 'intltool'
'kmod' 'libcap' 'libxslt' 'linux-api-headers' 'pam' 'udev' 'xz')
options=('!libtool')
source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
- "os-release" "cpp-compat.patch")
-md5sums=('446cc6db7625617af67e2d8e5f503a49'
+ "os-release"
+ 0001-util-never-follow-symlinks-in-rm_rf_children.patch)
+md5sums=('11f44ff74c87850064e4351518bcff17'
'752636def0db3c03f121f8b4f44a63cd'
- '414968aa314ced0b0ab4b2207e46aa69')
+ 'b5863d6d4b47e2b5bda8eb57bde0d327')
build() {
cd "$pkgname-$pkgver"
-
- # Fix C++ compile error when including sd-login.h
- # http://comments.gmane.org/gmane.comp.sysutils.systemd.devel/4514
- patch -p1 -i ../cpp-compat.patch
+
+ # https://bugzilla.redhat.com/show_bug.cgi?id=803358
+ patch -Np1 <"$srcdir/0001-util-never-follow-symlinks-in-rm_rf_children.patch"
./configure --sysconfdir=/etc \
--libexecdir=/usr/lib \
diff --git a/extra/xf86-input-mouse/PKGBUILD b/extra/xf86-input-mouse/PKGBUILD
index f7f68e5f9..4fd8b64d8 100644
--- a/extra/xf86-input-mouse/PKGBUILD
+++ b/extra/xf86-input-mouse/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 153309 2012-03-12 20:52:47Z andyrtr $
+# $Id: PKGBUILD 153613 2012-03-16 17:12:24Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-input-mouse
-pkgver=1.7.1
-pkgrel=3
+pkgver=1.7.2
+pkgrel=1
pkgdesc="X.org mouse input driver"
arch=(i686 x86_64)
license=('custom')
@@ -14,7 +14,7 @@ conflicts=('xorg-server<1.11.99.902')
options=('!libtool')
groups=('xorg-drivers' 'xorg')
source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('11a6402e82d65bda5fb559c5e9bc72f3fd7af2ed')
+sha1sums=('0da6390c6f3d7d636110a52f08193739929ae4ae')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/xf86-input-synaptics/PKGBUILD b/extra/xf86-input-synaptics/PKGBUILD
index 28e169f2c..2e1710d8c 100644
--- a/extra/xf86-input-synaptics/PKGBUILD
+++ b/extra/xf86-input-synaptics/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 153467 2012-03-14 18:01:52Z andyrtr $
+# $Id: PKGBUILD 153621 2012-03-16 17:56:02Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>
@@ -6,7 +6,7 @@
pkgname=xf86-input-synaptics
pkgver=1.5.99.901
-pkgrel=1
+pkgrel=2
pkgdesc="Synaptics driver for notebook touchpads"
arch=('i686' 'x86_64')
license=('custom')
@@ -21,12 +21,15 @@ groups=('xorg-drivers' 'xorg')
options=(!libtool)
backup=('etc/X11/xorg.conf.d/10-synaptics.conf')
source=(http://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
- 10-synaptics.conf)
+ 10-synaptics.conf
+ synaptics-Fix-inverted-circular-scrolling-direction.patch)
sha1sums=('8836b1c2bf443b2c11f38457e203c5309698d9d0'
- '68e1f4ef5e1038231d210eb422fa4d18c5922f0f')
+ '68e1f4ef5e1038231d210eb422fa4d18c5922f0f'
+ '2e35cde5db6c435f612a5c6802f33aca8ba1b6bb')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i ${srcdir}/synaptics-Fix-inverted-circular-scrolling-direction.patch
./configure --prefix=/usr
make
}
diff --git a/extra/xf86-input-synaptics/synaptics-Fix-inverted-circular-scrolling-direction.patch b/extra/xf86-input-synaptics/synaptics-Fix-inverted-circular-scrolling-direction.patch
new file mode 100644
index 000000000..fee383855
--- /dev/null
+++ b/extra/xf86-input-synaptics/synaptics-Fix-inverted-circular-scrolling-direction.patch
@@ -0,0 +1,40 @@
+From patchwork Wed Mar 14 03:27:29 2012
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+Subject: [synaptics] Fix inverted circular scrolling direction
+Date: Wed, 14 Mar 2012 03:27:29 -0000
+From: Peter Hutterer <peter.hutterer@who-t.net>
+X-Patchwork-Id: 9512
+Message-Id: <20120314032729.GA16614@yabbi.bne.redhat.com>
+To: "X.Org Devel List" <xorg-devel@lists.freedesktop.org>
+Cc: Thomas =?iso-8859-1?Q?B=E4chler?= <thomas@archlinux.org>
+
+Introduced in 26831a6eeac6762ad4d99532f62ebbab0827de10.
+In said commit, the old-style button events were changed to delta
+accumulation. Alas, for circular scrolling, a positive delta is up whereas
+for everything else a positive delta is down.
+
+Reported-by: Thomas Bächler <thomas@archlinux.org>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+---
+src/synaptics.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/synaptics.c b/src/synaptics.c
+index fa46f0d..c9609cd 100644
+--- a/src/synaptics.c
++++ b/src/synaptics.c
+@@ -2554,9 +2554,9 @@ HandleScrolling(SynapticsPrivate *priv, struct SynapticsHwState *hw,
+ double diff = diffa(priv->scroll.last_a, angle(priv, hw->x, hw->y));
+ if (delta >= 0.005 && diff != 0.0) {
+ if (priv->circ_scroll_vert)
+- priv->scroll.delta_y += diff / delta * para->scroll_dist_vert;
++ priv->scroll.delta_y -= diff / delta * para->scroll_dist_vert;
+ else
+- priv->scroll.delta_x += diff / delta * para->scroll_dist_horiz;;
++ priv->scroll.delta_x -= diff / delta * para->scroll_dist_horiz;;
+ priv->scroll.last_a = angle(priv, hw->x, hw->y);
+ DBG(priv, 10, "circ scoll delta: %.2f diff %.2f angle %.2f\n", delta, diff, priv->scroll.last_a);
+ }
diff --git a/extra/zziplib/PKGBUILD b/extra/zziplib/PKGBUILD
index 4783fc5ee..1dfd249fd 100644
--- a/extra/zziplib/PKGBUILD
+++ b/extra/zziplib/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 126501 2011-06-05 18:50:29Z remy $
+# $Id: PKGBUILD 153578 2012-03-16 06:20:51Z eric $
# Maintainer: Rémy Oudompheng <remy@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>
pkgname=zziplib
-pkgver=0.13.60
+pkgver=0.13.62
pkgrel=1
pkgdesc="A lightweight library that offers the ability to easily extract data from files archived in a single zip file"
arch=('i686' 'x86_64')
@@ -13,15 +13,12 @@ license=('LGPL' 'MPL')
depends=('zlib')
makedepends=('python2')
options=('!libtool')
-source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2
- zziplib-0.13.60-ldflags.patch)
-md5sums=('54a6aa53262483a4d54f7c59f0a7258b'
- 'e585052f884525a338ca341b5d2957dc')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('5fe874946390f939ee8f4abe9624b96c')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
export PYTHON=/usr/bin/python2
- patch -p1 -i ../zziplib-0.13.60-ldflags.patch
./configure --prefix=/usr
make
}
diff --git a/multilib/lib32-libx11/PKGBUILD b/multilib/lib32-libx11/PKGBUILD
index 0a2692ee1..bc64fee44 100644
--- a/multilib/lib32-libx11/PKGBUILD
+++ b/multilib/lib32-libx11/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 67505 2012-03-12 21:21:46Z lcarlier $
+# $Id: PKGBUILD 67988 2012-03-16 17:41:53Z lcarlier $
# Maintainer: Jan de Groot <jgc@archlinux.org>
_pkgbasename=libx11
pkgname=lib32-$_pkgbasename
-pkgver=1.4.99.1
+pkgver=1.4.99.901
pkgrel=1
pkgdesc="X11 client-side library (32-bit)"
arch=(x86_64)
@@ -13,7 +13,7 @@ makedepends=('xorg-util-macros' 'xextproto' 'xtrans' 'inputproto' 'gcc-multilib'
options=('!libtool')
license=('custom:XFREE86')
source=(${url}/releases/individual/lib/libX11-${pkgver}.tar.bz2)
-sha1sums=('317e0112926926a52c13f56f71c1ec9e4540cf4d')
+sha1sums=('af10b064c1c64ee9e7daae0a7f1f9719eb7e965a')
build() {
export CC="gcc -m32"
diff --git a/testing/psmisc/PKGBUILD b/testing/psmisc/PKGBUILD
new file mode 100644
index 000000000..911e2c403
--- /dev/null
+++ b/testing/psmisc/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 153643 2012-03-17 02:47:43Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=psmisc
+pkgver=22.16
+pkgrel=1
+pkgdesc="Miscellaneous procfs tools"
+arch=('i686' 'x86_64')
+url="http://psmisc.sourceforge.net/index.html"
+license=('GPL')
+groups=('base')
+depends=('ncurses')
+source=(http://downloads.sourceforge.net/psmisc/${pkgname}-${pkgver}.tar.gz)
+sha1sums=('27f1c8deab06e79101af1914ff81a9d561f2fcfe')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/xf86-video-mga/PKGBUILD b/testing/xf86-video-mga/PKGBUILD
index 0514fff2c..59d9bcd29 100644
--- a/testing/xf86-video-mga/PKGBUILD
+++ b/testing/xf86-video-mga/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 150049 2012-02-12 09:45:15Z andyrtr $
+# $Id: PKGBUILD 153627 2012-03-16 18:24:30Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-mga
pkgver=1.4.13
-pkgrel=5
+pkgrel=6
pkgdesc="X.org mga video driver"
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
@@ -16,12 +16,12 @@ groups=('xorg-drivers' 'xorg')
source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
git-fixes.patch)
sha1sums=('55aa185cf381def4b5905c8b93694b8dfbd5c378'
- '74782a39533ef475bd02b8b4645775879494e568')
+ 'f2f07d2ab7c4fccd127fc890e074049962819ccf')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np1 -i "${srcdir}/git-fixes.patch"
- ./configure --prefix=/usr #--enable-dri
+ ./configure --prefix=/usr --disable-dri
make
}
diff --git a/testing/xf86-video-mga/git-fixes.patch b/testing/xf86-video-mga/git-fixes.patch
index 3534342e6..70650b0d1 100644
--- a/testing/xf86-video-mga/git-fixes.patch
+++ b/testing/xf86-video-mga/git-fixes.patch
@@ -1,23 +1,50 @@
-diff --git a/man/Makefile.am b/man/Makefile.am
-index b3688ce..1ea26b3 100644
---- a/man/Makefile.am
-+++ b/man/Makefile.am
-@@ -1,5 +1,5 @@
- #
--# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-+# Copyright (c) 2005, Oracle and/or its affiliates. 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"),
-@@ -19,7 +19,7 @@
- # 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.
--#
-+#
-
- drivermandir = $(DRIVER_MAN_DIR)
+From 951474c7fcd1b28d3178a6644d58958cb3bdf5a8 Mon Sep 17 00:00:00 2001
+From: Yannick Heneault <yheneaul@matrox.com>
+Date: Wed, 25 Aug 2010 15:16:27 +0000
+Subject: modified G200SE conditionnal statement about revision register for products compatibility.
+
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index 5a1e9b4..83649ee 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -1081,7 +1081,7 @@ MGACountRam(ScrnInfoPtr pScrn)
+ if (pMga->is_G200SE)
+ pMga->reg_1e24 = INREG(0x1e24); /* stash the model for later */
+- if (pMga->reg_1e24 == 0x01) {
++ if (pMga->reg_1e24 >= 0x01) {
+ MGAUnmapMem(pScrn);
+ ProbeSize = 16384;
+ ProbeSizeOffset = 0x10000;
+@@ -3253,7 +3253,7 @@ MGA_HAL(
+ MGA_NOT_HAL(
+ if (pMga->is_G200SE) {
+ OUTREG8(0x1FDE, 0x06);
+- if (pMga->reg_1e24 == 0x01)
++ if (pMga->reg_1e24 >= 0x01)
+ OUTREG8(0x1FDF, 0x03);
+ else
+ OUTREG8(0x1FDF, 0x14);
+@@ -4326,7 +4326,7 @@ MGAValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+ return MODE_VIRTUAL_X;
+ if (mode->VDisplay > 1200)
+ return MODE_VIRTUAL_Y;
+- if (pMga->reg_1e24 == 0x01 &&
++ if (pMga->reg_1e24 >= 0x01 &&
+ xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 244)
+ return MODE_BANDWIDTH;
+ } else if (pMga->is_G200WB){
+--
+cgit v0.9.0.2-2-gbebe
+From 0bd44fad450843b7f1c35c70ab356a2b250d107d Mon Sep 17 00:00:00 2001
+From: Jesse Adkins <jesserayadkins@gmail.com>
+Date: Tue, 28 Sep 2010 20:29:51 +0000
+Subject: Purge cvs tags.
+
+Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+---
diff --git a/man/mga.man b/man/mga.man
index 3a7a9f8..e1e674f 100644
--- a/man/mga.man
@@ -40,7 +67,7 @@ index 6dcd1e9..57e9b92 100644
#ifndef _BINDING
#define _BINDING
diff --git a/src/mga.h b/src/mga.h
-index 2cb3d88..c520e86 100644
+index 2cb3d88..7725b56 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -1,4 +1,3 @@
@@ -48,7 +75,196 @@ index 2cb3d88..c520e86 100644
/*
* MGA Millennium (MGA2064W) functions
*
-@@ -137,6 +136,10 @@ void MGAdbg_outreg32(ScrnInfoPtr, int,int, char*);
+diff --git a/src/mga_common.h b/src/mga_common.h
+index 90f6b37..81be2bc 100644
+--- a/src/mga_common.h
++++ b/src/mga_common.h
+@@ -25,8 +25,6 @@
+ * Converted to common header format:
+ * Jens Owen <jens@tungstengraphics.com>
+ *
+- * $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_common.h,v 1.2 2002/12/16 16:19:18 dawes Exp $
+- *
+ */
+
+ #ifndef _MGA_COMMON_H_
+diff --git a/src/mga_dri.h b/src/mga_dri.h
+index f1afb5d..1984b9c 100644
+--- a/src/mga_dri.h
++++ b/src/mga_dri.h
+@@ -1,5 +1,3 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h,v 1.6 2001/04/10 16:08:01 dawes Exp $ */
+-
+ /*
+ * Copyright 2000 VA Linux Systems Inc., Fremont, California.
+ * All Rights Reserved.
+diff --git a/src/mga_dripriv.h b/src/mga_dripriv.h
+index 3ddd133..feca134 100644
+--- a/src/mga_dripriv.h
++++ b/src/mga_dripriv.h
+@@ -1,5 +1,3 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dripriv.h,v 1.4 2001/04/10 16:08:01 dawes Exp $ */
+-
+ /*
+ * Copyright 2000 VA Linux Systems Inc., Fremont, California.
+ * All Rights Reserved.
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index 83649ee..72e7acc 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -1,4 +1,3 @@
+-/* $XConsortium: mga_driver.c /main/12 1996/10/28 05:13:26 kaleb $ */
+ /*
+ * MGA Millennium (MGA2064W) with Ti3026 RAMDAC driver v.1.1
+ *
+diff --git a/src/mga_macros.h b/src/mga_macros.h
+index 69dc8e3..bffd063 100644
+--- a/src/mga_macros.h
++++ b/src/mga_macros.h
+@@ -1,5 +1,3 @@
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h,v 1.21 2001/09/26 12:59:17 alanh Exp $ */
+-
+ #ifndef _MGA_MACROS_H_
+ #define _MGA_MACROS_H_
+
+diff --git a/src/mga_reg.h b/src/mga_reg.h
+index 6251976..ffe4723 100644
+--- a/src/mga_reg.h
++++ b/src/mga_reg.h
+@@ -1,11 +1,3 @@
+-/* $XConsortium: mgareg.h /main/2 1996/10/25 10:33:21 kaleb $ */
+-
+-
+-
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_reg.h,v 1.18 2001/09/26 12:59:18 alanh Exp $ */
+-
+-
+-
+ /*
+ * MGA Millennium (MGA2064W) functions
+ * MGA Mystique (MGA1064SG) functions
+diff --git a/src/mga_sarea.h b/src/mga_sarea.h
+index c5ffbbc..16fc9ce 100644
+--- a/src/mga_sarea.h
++++ b/src/mga_sarea.h
+@@ -1,5 +1,3 @@
+-/* $XFree86$ */
+-
+ /*
+ * Copyright 2000 Gareth Hughes
+ * All Rights Reserved.
+diff --git a/src/mgareg_flags.h b/src/mgareg_flags.h
+index 69050fc..548af86 100644
+--- a/src/mgareg_flags.h
++++ b/src/mgareg_flags.h
+@@ -19,7 +19,6 @@
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mgareg_flags.h,v 1.2 2003/01/12 03:55:47 tsi Exp $ */
+
+ #ifndef _MGAREGS_H_
+ #define _MGAREGS_H_
+diff --git a/util/stormdwg.c b/util/stormdwg.c
+index 99f76cc..b43cc32 100644
+--- a/util/stormdwg.c
++++ b/util/stormdwg.c
+@@ -1,8 +1,3 @@
+-/* $XConsortium: dwg.c /main/2 1996/10/28 06:57:55 kaleb $ */
+-
+-
+-
+-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/util/stormdwg.c,v 1.1 1997/04/12 14:11:29 hohndel Exp $ */
+
+ #include <stdio.h>
+ #include <stdlib.h>
+--
+cgit v0.9.0.2-2-gbebe
+From 636c3c88e7e9cb30010fe1731cd7356849f3f172 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Thu, 14 Oct 2010 18:36:06 +0000
+Subject: Don't allow the config file to override BIOS location
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index 72e7acc..37bf847 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -1779,23 +1779,16 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ #ifndef XSERVER_LIBPCIACCESS
+ /*
+ * Find the BIOS base. Get it from the PCI config if possible. Otherwise
+- * use the VGA default. Allow the config file to override this.
++ * use the VGA default.
+ */
+
+- pMga->BiosFrom = X_NONE;
+- if (pMga->device->BiosBase != 0) {
+- /* XXX This isn't used */
+- pMga->BiosAddress = pMga->device->BiosBase;
+- pMga->BiosFrom = X_CONFIG;
+- } else {
+- /* details: rombase sdk pp 4-15 */
+- if (pMga->PciInfo->biosBase != 0) {
+- pMga->BiosAddress = pMga->PciInfo->biosBase & 0xffff0000;
+- pMga->BiosFrom = X_PROBED;
+- } else if (pMga->Primary) {
+- pMga->BiosAddress = 0xc0000;
+- pMga->BiosFrom = X_DEFAULT;
+- }
++ /* details: rombase sdk pp 4-15 */
++ if (pMga->PciInfo->biosBase != 0) {
++ pMga->BiosAddress = pMga->PciInfo->biosBase & 0xffff0000;
++ pMga->BiosFrom = X_PROBED;
++ } else if (pMga->Primary) {
++ pMga->BiosAddress = 0xc0000;
++ pMga->BiosFrom = X_DEFAULT;
+ }
+ if (pMga->BiosAddress) {
+ xf86DrvMsg(pScrn->scrnIndex, pMga->BiosFrom, "BIOS at 0x%lX\n",
+--
+cgit v0.9.0.2-2-gbebe
+From f7a2ef60e18e2cc464f69c1cad4681096c645651 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat, 30 Oct 2010 16:38:31 +0000
+Subject: Sun's copyrights now belong to Oracle
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+---
+diff --git a/man/Makefile.am b/man/Makefile.am
+index b3688ce..1ea26b3 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -1,5 +1,5 @@
+ #
+-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
++# Copyright (c) 2005, Oracle and/or its affiliates. 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"),
+@@ -19,7 +19,7 @@
+ # 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.
+-#
++#
+
+ drivermandir = $(DRIVER_MAN_DIR)
+
+--
+cgit v0.9.0.2-2-gbebe
+From 5f1b04e86e79938c8158055a777280a649f95510 Mon Sep 17 00:00:00 2001
+From: Yannick Heneault <yheneaul@matrox.com>
+Date: Fri, 17 Dec 2010 14:00:46 +0000
+Subject: added support for G200ER.
+
+---
+diff --git a/src/mga.h b/src/mga.h
+index 7725b56..c520e86 100644
+--- a/src/mga.h
++++ b/src/mga.h
+@@ -136,6 +136,10 @@ void MGAdbg_outreg32(ScrnInfoPtr, int,int, char*);
#define PCI_CHIP_MGAG200_EH_PCI 0x0533
#endif
@@ -59,7 +275,7 @@ index 2cb3d88..c520e86 100644
/*
* Read/write to the DAC via MMIO
*/
-@@ -200,7 +203,9 @@ void MGAdbg_outreg32(ScrnInfoPtr, int,int, char*);
+@@ -199,7 +203,9 @@ void MGAdbg_outreg32(ScrnInfoPtr, int,int, char*);
typedef struct {
unsigned char ExtVga[6];
unsigned char DacClk[6];
@@ -70,7 +286,7 @@ index 2cb3d88..c520e86 100644
unsigned long crtc2[0x58];
unsigned char dac2[0x21];
CARD32 Option;
-@@ -479,6 +484,7 @@ typedef struct {
+@@ -478,6 +484,7 @@ typedef struct {
int is_G200WB:1;
int is_G200EV:1;
int is_G200EH:1;
@@ -78,19 +294,6 @@ index 2cb3d88..c520e86 100644
int KVM;
-diff --git a/src/mga_common.h b/src/mga_common.h
-index 90f6b37..81be2bc 100644
---- a/src/mga_common.h
-+++ b/src/mga_common.h
-@@ -25,8 +25,6 @@
- * Converted to common header format:
- * Jens Owen <jens@tungstengraphics.com>
- *
-- * $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_common.h,v 1.2 2002/12/16 16:19:18 dawes Exp $
-- *
- */
-
- #ifndef _MGA_COMMON_H_
diff --git a/src/mga_dacG.c b/src/mga_dacG.c
index df00765..fca1031 100644
--- a/src/mga_dacG.c
@@ -356,48 +559,11 @@ index df00765..fca1031 100644
pMga->ddc1Read = MGAG_ddc1Read;
/* vgaHWddc1SetSpeed will only work if the card is in VGA mode */
pMga->DDC1SetSpeed = vgaHWddc1SetSpeedWeak();
-diff --git a/src/mga_dri.c b/src/mga_dri.c
-index 3fda623..14f342f 100644
---- a/src/mga_dri.c
-+++ b/src/mga_dri.c
-@@ -32,7 +32,6 @@
-
- #include "xf86.h"
- #include "xf86_OSproc.h"
--#include "xf86Priv.h"
-
- #include "xf86PciInfo.h"
- #include "xf86Pci.h"
-diff --git a/src/mga_dri.h b/src/mga_dri.h
-index f1afb5d..1984b9c 100644
---- a/src/mga_dri.h
-+++ b/src/mga_dri.h
-@@ -1,5 +1,3 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h,v 1.6 2001/04/10 16:08:01 dawes Exp $ */
--
- /*
- * Copyright 2000 VA Linux Systems Inc., Fremont, California.
- * All Rights Reserved.
-diff --git a/src/mga_dripriv.h b/src/mga_dripriv.h
-index 3ddd133..feca134 100644
---- a/src/mga_dripriv.h
-+++ b/src/mga_dripriv.h
-@@ -1,5 +1,3 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dripriv.h,v 1.4 2001/04/10 16:08:01 dawes Exp $ */
--
- /*
- * Copyright 2000 VA Linux Systems Inc., Fremont, California.
- * All Rights Reserved.
diff --git a/src/mga_driver.c b/src/mga_driver.c
-index 5a1e9b4..b140013 100644
+index 37bf847..7232c73 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
-@@ -1,4 +1,3 @@
--/* $XConsortium: mga_driver.c /main/12 1996/10/28 05:13:26 kaleb $ */
- /*
- * MGA Millennium (MGA2064W) with Ti3026 RAMDAC driver v.1.1
- *
-@@ -404,6 +403,21 @@ static const struct mga_device_attributes attribs[] = {
+@@ -403,6 +403,21 @@ static const struct mga_device_attributes attribs[] = {
8192, 0x4000, /* Memory probe size & offset values */
},
@@ -419,7 +585,7 @@ index 5a1e9b4..b140013 100644
};
#ifdef XSERVER_LIBPCIACCESS
-@@ -433,6 +447,8 @@ static const struct pci_id_match mga_device_match[] = {
+@@ -432,6 +447,8 @@ static const struct pci_id_match mga_device_match[] = {
MGA_DEVICE_MATCH( PCI_CHIP_MGAG200_EH_PCI, 14 ),
@@ -428,7 +594,7 @@ index 5a1e9b4..b140013 100644
{ 0, 0, 0 },
};
#endif
-@@ -450,6 +466,7 @@ static SymTabRec MGAChipsets[] = {
+@@ -449,6 +466,7 @@ static SymTabRec MGAChipsets[] = {
{ PCI_CHIP_MGAG200_SE_A_PCI, "mgag200 SE A PCI" },
{ PCI_CHIP_MGAG200_SE_B_PCI, "mgag200 SE B PCI" },
{ PCI_CHIP_MGAG200_EV_PCI, "mgag200 EV Maxim" },
@@ -436,7 +602,7 @@ index 5a1e9b4..b140013 100644
{ PCI_CHIP_MGAG200_WINBOND_PCI, "mgag200 eW Nuvoton" },
{ PCI_CHIP_MGAG200_EH_PCI, "mgag200eH" },
{ PCI_CHIP_MGAG400, "mgag400" },
-@@ -472,6 +489,8 @@ static PciChipsets MGAPciChipsets[] = {
+@@ -471,6 +489,8 @@ static PciChipsets MGAPciChipsets[] = {
RES_SHARED_VGA },
{ PCI_CHIP_MGAG200_EV_PCI, PCI_CHIP_MGAG200_EV_PCI,
RES_SHARED_VGA },
@@ -445,7 +611,7 @@ index 5a1e9b4..b140013 100644
{ PCI_CHIP_MGAG200_WINBOND_PCI, PCI_CHIP_MGAG200_WINBOND_PCI,
RES_SHARED_VGA },
{ PCI_CHIP_MGAG200_EH_PCI, PCI_CHIP_MGAG200_EH_PCI,
-@@ -913,6 +932,11 @@ MGAProbe(DriverPtr drv, int flags)
+@@ -912,6 +932,11 @@ MGAProbe(DriverPtr drv, int flags)
case PCI_CHIP_MGAG200_EH_PCI:
attrib_no = 14;
break;
@@ -457,16 +623,7 @@ index 5a1e9b4..b140013 100644
default:
return FALSE;
-@@ -1081,7 +1105,7 @@ MGACountRam(ScrnInfoPtr pScrn)
-
- if (pMga->is_G200SE)
- pMga->reg_1e24 = INREG(0x1e24); /* stash the model for later */
-- if (pMga->reg_1e24 == 0x01) {
-+ if (pMga->reg_1e24 >= 0x01) {
- MGAUnmapMem(pScrn);
- ProbeSize = 16384;
- ProbeSizeOffset = 0x10000;
-@@ -1286,6 +1310,11 @@ MGAdoDDC(ScrnInfoPtr pScrn)
+@@ -1285,6 +1310,11 @@ MGAdoDDC(ScrnInfoPtr pScrn)
MGASave(pScrn);
/* It is now safe to talk to the card */
@@ -478,7 +635,7 @@ index 5a1e9b4..b140013 100644
/* Initialize I2C buses - used by DDC if available */
if (pMga->i2cInit) {
-@@ -1327,6 +1356,12 @@ MGAdoDDC(ScrnInfoPtr pScrn)
+@@ -1326,6 +1356,12 @@ MGAdoDDC(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "end of monitor info\n");
}
@@ -491,7 +648,7 @@ index 5a1e9b4..b140013 100644
/* Restore previous state and unmap MGA memory and MMIO areas */
MGARestore(pScrn);
MGAUnmapMem(pScrn);
-@@ -1620,6 +1655,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+@@ -1619,6 +1655,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
pMga->is_G200EV = (pMga->Chipset == PCI_CHIP_MGAG200_EV_PCI);
pMga->is_G200WB = (pMga->Chipset == PCI_CHIP_MGAG200_WINBOND_PCI);
pMga->is_G200EH = (pMga->Chipset == PCI_CHIP_MGAG200_EH_PCI);
@@ -499,32 +656,30 @@ index 5a1e9b4..b140013 100644
#ifdef USEMGAHAL
if (pMga->chip_attribs->HAL_chipset) {
-@@ -1780,15 +1816,9 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
- #ifndef XSERVER_LIBPCIACCESS
- /*
- * Find the BIOS base. Get it from the PCI config if possible. Otherwise
-- * use the VGA default. Allow the config file to override this.
-+ * use the VGA default.
+@@ -1782,14 +1819,14 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ * use the VGA default.
*/
-- pMga->BiosFrom = X_NONE;
-- if (pMga->device->BiosBase != 0) {
-- /* XXX This isn't used */
-- pMga->BiosAddress = pMga->device->BiosBase;
-- pMga->BiosFrom = X_CONFIG;
-- } else {
- /* details: rombase sdk pp 4-15 */
- if (pMga->PciInfo->biosBase != 0) {
- pMga->BiosAddress = pMga->PciInfo->biosBase & 0xffff0000;
-@@ -1797,7 +1827,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
- pMga->BiosAddress = 0xc0000;
- pMga->BiosFrom = X_DEFAULT;
- }
+- /* details: rombase sdk pp 4-15 */
+- if (pMga->PciInfo->biosBase != 0) {
+- pMga->BiosAddress = pMga->PciInfo->biosBase & 0xffff0000;
+- pMga->BiosFrom = X_PROBED;
+- } else if (pMga->Primary) {
+- pMga->BiosAddress = 0xc0000;
+- pMga->BiosFrom = X_DEFAULT;
- }
++ /* details: rombase sdk pp 4-15 */
++ if (pMga->PciInfo->biosBase != 0) {
++ pMga->BiosAddress = pMga->PciInfo->biosBase & 0xffff0000;
++ pMga->BiosFrom = X_PROBED;
++ } else if (pMga->Primary) {
++ pMga->BiosAddress = 0xc0000;
++ pMga->BiosFrom = X_DEFAULT;
++ }
if (pMga->BiosAddress) {
xf86DrvMsg(pScrn->scrnIndex, pMga->BiosFrom, "BIOS at 0x%lX\n",
(unsigned long)pMga->BiosAddress);
-@@ -2142,6 +2171,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+@@ -2134,6 +2171,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_MGAG200_WINBOND_PCI:
case PCI_CHIP_MGAG200_EV_PCI:
case PCI_CHIP_MGAG200_EH_PCI:
@@ -532,7 +687,7 @@ index 5a1e9b4..b140013 100644
case PCI_CHIP_MGAG400:
case PCI_CHIP_MGAG550:
MGAGSetupFuncs(pScrn);
-@@ -2255,6 +2285,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+@@ -2247,6 +2285,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_MGAG200_WINBOND_PCI:
case PCI_CHIP_MGAG200_EV_PCI:
case PCI_CHIP_MGAG200_EH_PCI:
@@ -540,7 +695,7 @@ index 5a1e9b4..b140013 100644
pMga->SrcOrg = 0;
pMga->DstOrg = 0;
break;
-@@ -2432,16 +2463,17 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+@@ -2424,16 +2463,17 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
maxPitch = 2048;
break;
case PCI_CHIP_MGAG200_SE_A_PCI:
@@ -561,7 +716,113 @@ index 5a1e9b4..b140013 100644
case PCI_CHIP_MGAG400:
case PCI_CHIP_MGAG550:
maxPitch = 4096;
-@@ -3250,15 +3282,71 @@ MGA_HAL(
+@@ -4332,10 +4372,13 @@ MGAValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+ return MODE_BANDWIDTH;
+ } else if (pMga->is_G200EV
+ && (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 327)) {
+- return MODE_BANDWIDTH;
++ return MODE_BANDWIDTH;
+ } else if (pMga->is_G200EH
+ && (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 375)) {
+ return MODE_BANDWIDTH;
++ } else if (pMga->is_G200ER
++ && (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 550)) {
++ return MODE_BANDWIDTH;
+ }
+
+ lace = 1 + ((mode->Flags & V_INTERLACE) != 0);
+diff --git a/src/mga_merge.c b/src/mga_merge.c
+index 753f752..1fd0572 100644
+--- a/src/mga_merge.c
++++ b/src/mga_merge.c
+@@ -363,6 +363,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ case PCI_CHIP_MGAG200_WINBOND_PCI:
+ case PCI_CHIP_MGAG200_EV_PCI:
+ case PCI_CHIP_MGAG200_EH_PCI:
++ case PCI_CHIP_MGAG200_ER_PCI:
+ case PCI_CHIP_MGAG400:
+ case PCI_CHIP_MGAG550:
+ MGAGSetupFuncs(pScrn);
+@@ -518,6 +519,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ case PCI_CHIP_MGAG200_WINBOND_PCI:
+ case PCI_CHIP_MGAG200_EV_PCI:
+ case PCI_CHIP_MGAG200_EH_PCI:
++ case PCI_CHIP_MGAG200_ER_PCI:
+ case PCI_CHIP_MGAG400:
+ case PCI_CHIP_MGAG550:
+ maxPitch = 4096;
+diff --git a/src/mga_reg.h b/src/mga_reg.h
+index ffe4723..5a37db6 100644
+--- a/src/mga_reg.h
++++ b/src/mga_reg.h
+@@ -369,6 +369,7 @@
+ #define MGA1064_MISC_CTL_VGA8 ( 0x01 << 3 )
+ #define MGA1064_MISC_CTL_DAC_RAM_CS ( 0x01 << 4 )
+
++#define MGA1064_GEN_IO_CTL2 0x29
+ #define MGA1064_GEN_IO_CTL 0x2a
+ #define MGA1064_GEN_IO_DATA 0x2b
+ #define MGA1064_SYS_PLL_M 0x2c
+@@ -429,6 +430,10 @@
+ #define MGA1064_EH_PIX_PLLC_N 0xb7
+ #define MGA1064_EH_PIX_PLLC_P 0xb8
+
++/* Modified PLL for G200 Maxim (G200ER) */
++#define MGA1064_ER_PIX_PLLC_M 0xb7
++#define MGA1064_ER_PIX_PLLC_N 0xb6
++#define MGA1064_ER_PIX_PLLC_P 0xb8
+
+ #define MGA1064_DISP_CTL 0x8a
+ #define MGA1064_DISP_CTL_DAC1OUTSEL_MASK 0x01
+diff --git a/src/mga_storm.c b/src/mga_storm.c
+index 87473c8..db7fae7 100644
+--- a/src/mga_storm.c
++++ b/src/mga_storm.c
+@@ -1131,6 +1131,7 @@ void MGAStormEngineInit( ScrnInfoPtr pScrn )
+ case PCI_CHIP_MGAG200_WINBOND_PCI:
+ case PCI_CHIP_MGAG200_EV_PCI:
+ case PCI_CHIP_MGAG200_EH_PCI:
++ case PCI_CHIP_MGAG200_ER_PCI:
+ pMga->SrcOrg = 0;
+ OUTREG(MGAREG_SRCORG, pMga->realSrcOrg);
+ OUTREG(MGAREG_DSTORG, pMga->DstOrg);
+--
+cgit v0.9.0.2-2-gbebe
+From 43280e6521815582f219d42821d896093c9c0d5f Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 22 Jun 2011 21:02:29 +0000
+Subject: Don't include xf86Priv.h
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+diff --git a/src/mga_dri.c b/src/mga_dri.c
+index 3fda623..14f342f 100644
+--- a/src/mga_dri.c
++++ b/src/mga_dri.c
+@@ -32,7 +32,6 @@
+
+ #include "xf86.h"
+ #include "xf86_OSproc.h"
+-#include "xf86Priv.h"
+
+ #include "xf86PciInfo.h"
+ #include "xf86Pci.h"
+--
+cgit v0.9.0.2-2-gbebe
+From c083bf0a66bef9a4345847f39be5fb895c211f79 Mon Sep 17 00:00:00 2001
+From: Christian Toutant <ctoutant@matrox.com>
+Date: Wed, 03 Aug 2011 13:45:13 +0000
+Subject: Added support for G200SE Pilot3
+
+Optimize use of bandwidth and increase maximum resolution to 1920x1200
+
+Signed-off-by: Christian Toutant <ctoutant@matrox.com>
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index 7232c73..b140013 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -3282,15 +3282,71 @@ MGA_HAL(
outb(0xfac, 0x02);
}
@@ -606,7 +867,7 @@ index 5a1e9b4..b140013 100644
+ else ucHiPriLvl = 5;
+
OUTREG8(0x1FDE, 0x06);
-- if (pMga->reg_1e24 == 0x01)
+- if (pMga->reg_1e24 >= 0x01)
- OUTREG8(0x1FDF, 0x03);
- else
- OUTREG8(0x1FDF, 0x14);
@@ -640,7 +901,7 @@ index 5a1e9b4..b140013 100644
pMga->CurrentLayout.mode = mode;
-@@ -4322,13 +4410,23 @@ MGAValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+@@ -4354,13 +4410,23 @@ MGAValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
MGAPtr pMga = MGAPTR(pScrn);
if (pMga->Chipset == PCI_CHIP_MGAG200_SE_A_PCI) {
@@ -648,7 +909,7 @@ index 5a1e9b4..b140013 100644
- return MODE_VIRTUAL_X;
- if (mode->VDisplay > 1200)
- return MODE_VIRTUAL_Y;
-- if (pMga->reg_1e24 == 0x01 &&
+- if (pMga->reg_1e24 >= 0x01 &&
- xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 244)
- return MODE_BANDWIDTH;
+ if (pMga->reg_1e24 == 0x01) {
@@ -671,130 +932,4261 @@ index 5a1e9b4..b140013 100644
} else if (pMga->is_G200WB){
if (mode->Flags & V_DBLSCAN)
return MODE_NO_DBLESCAN;
-@@ -4340,10 +4438,13 @@ MGAValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
- return MODE_BANDWIDTH;
- } else if (pMga->is_G200EV
- && (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 327)) {
-- return MODE_BANDWIDTH;
-+ return MODE_BANDWIDTH;
- } else if (pMga->is_G200EH
- && (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 375)) {
- return MODE_BANDWIDTH;
-+ } else if (pMga->is_G200ER
-+ && (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 550)) {
-+ return MODE_BANDWIDTH;
+--
+cgit v0.9.0.2-2-gbebe
+From 01ca2186ea028b2549de509b51726aa08519fce0 Mon Sep 17 00:00:00 2001
+From: Christian Toutant <ctoutant@matrox.com>
+Date: Tue, 20 Sep 2011 17:07:16 +0000
+Subject: Reset tagfifo for renesas.
+
+For renesas, we need to reset tagfifo after a mode switch.
+
+Signed-off-by: Christian Toutant <ctoutant@matrox.com>
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index b140013..58a1390 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -3282,6 +3282,28 @@ MGA_HAL(
+ outb(0xfac, 0x02);
}
- lace = 1 + ((mode->Flags & V_INTERLACE) != 0);
-diff --git a/src/mga_macros.h b/src/mga_macros.h
-index 69dc8e3..bffd063 100644
---- a/src/mga_macros.h
-+++ b/src/mga_macros.h
-@@ -1,5 +1,3 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h,v 1.21 2001/09/26 12:59:17 alanh Exp $ */
++ /* Reset tagfifo*/
++ if (pMga->is_G200ER)
++ {
++ CARD32 ulMemCtl = INREG(MGAREG_MEMCTL);
++ CARD8 ucSeq1;
++
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reset tagfifo\n");
++ /* Screen off */
++ OUTREG8(MGAREG_SEQ_INDEX, 0x01); /* Select SEQ1 */
++ ucSeq1 = INREG8(MGAREG_SEQ_DATA) | 0x20;
++ OUTREG8(MGAREG_SEQ_DATA, ucSeq1);
++
++ /* Reset tagfifo */
++ OUTREG(MGAREG_MEMCTL, ulMemCtl | 0x002000000);
++ usleep(1000); /* wait 1ms */
++ OUTREG(MGAREG_MEMCTL, ulMemCtl & ~0x002000000);
++
++ /* Screen on */
++ OUTREG8(MGAREG_SEQ_DATA, ucSeq1 & ~0x20);
++
++ }
++
+ /*
+ This function optimize the Priority Request control
+ Higher HiPriLvl will reduce drawing performance
+diff --git a/src/mga_reg.h b/src/mga_reg.h
+index 5a37db6..ae0fe8c 100644
+--- a/src/mga_reg.h
++++ b/src/mga_reg.h
+@@ -119,6 +119,9 @@
+ #define MGAREG_WACCEPTSEQ 0x1dd4
+ #define MGAREG_WMISC 0x1e70
+
++
++#define MGAREG_MEMCTL 0x2E08
++
+ /* OPMODE register additives */
+
+ #define MGAOPM_DMA_GENERAL (0x00 << 2)
+--
+cgit v0.9.0.2-2-gbebe
+From ae90c47503bc1015a50e7ea6d22ec10e5e0d4113 Mon Sep 17 00:00:00 2001
+From: Jamey Sharp <jamey@minilop.net>
+Date: Tue, 13 Sep 2011 21:01:57 +0000
+Subject: Nothing uses clientlx.c, so delete it.
+
+Adam Jackson wrote:
+
+ Hey, so, remember back in the dark ages when dualhead was this
+ insanely wild differentiating feature? Matrox thought it was so
+ special, in fact, that they hid most of the implementation of it
+ (and a bunch of other stuff) in a binary-only blob called the
+ HALlib. As you'd expect it was pretty much a cut-and-paste of
+ the relevant Windows code, and then some open glue to keep it
+ working; clientlx.c is that glue.
+
+ I guess the theory was that if you don't tell people which
+ registers to duplicate to implement a second pipe in their own
+ hardware, they won't figure it out? A pretty eyeroll-worthy
+ idea even at the time, and definitely not something we should be
+ condoning anymore.
+
+ Kill it with fire ...
+
+Signed-off-by: Jamey Sharp <jamey@minilop.net>
+Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+---
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 17211bb..44417de 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -32,7 +32,6 @@ mga_drv_la_LIBADD = $(noinst_LTLIBRARIES)
+ mga_drv_la_SOURCES = \
+ binding.h \
+ client.h \
+- clientlx.c \
+ mga_arc.c \
+ mga_bios.c \
+ mga_common.h \
+diff --git a/src/binding.h b/src/binding.h
+index 57e9b92..616aed7 100644
+--- a/src/binding.h
++++ b/src/binding.h
+@@ -37,37 +37,6 @@ typedef char CHAR;
+ typedef unsigned char UCHAR;
+ typedef unsigned char FAR*LPUCHAR;
+
+-typedef struct TAGCLIENTTABLE{
+- ULONG (DECL *ClientReadConfigSpaceByte )(LPVOID , ULONG, LPVOID );
+- ULONG (DECL *ClientReadConfigSpaceDword )(LPVOID , ULONG, LPVOID );
+- ULONG (DECL *ClientWriteConfigSpaceByte )(LPVOID , ULONG, UCHAR);
+- ULONG (DECL *ClientWriteConfigSpaceDword )(LPVOID , ULONG, ULONG);
+- ULONG (DECL *ClientOpenRegisterBase )(LPVOID , ULONG, ULONG);
+- ULONG (DECL *ClientCloseRegisterBase )(LPVOID );
+- ULONG (DECL *ClientReadRegisterByte )(LPVOID , ULONG, LPVOID );
+- ULONG (DECL *ClientReadRegisterDword )(LPVOID , ULONG, LPVOID );
+- ULONG (DECL *ClientWriteRegisterByte )(LPVOID , ULONG, UCHAR);
+- ULONG (DECL *ClientWriteRegisterDword )(LPVOID , ULONG, ULONG);
+- ULONG (DECL *ClientOpenMemoryBase )(LPVOID , ULONG, ULONG);
+- ULONG (DECL *ClientCloseMemoryBase )(LPVOID );
+- ULONG (DECL *ClientReadMemoryByte )(LPVOID , ULONG, LPVOID );
+- ULONG (DECL *ClientReadMemoryDword )(LPVOID , ULONG, LPVOID );
+- ULONG (DECL *ClientWriteMemoryByte )(LPVOID , ULONG, UCHAR);
+- ULONG (DECL *ClientWriteMemoryDword )(LPVOID , ULONG, ULONG);
+- ULONG (DECL *ClientOpenSystemDevice )(LPVOID , ULONG, ULONG);
+- ULONG (DECL *ClientCloseSystemDevice )(LPVOID );
+- ULONG (DECL *ClientReadSystemDeviceByte )(LPVOID , ULONG, LPVOID );
+- ULONG (DECL *ClientReadSystemDeviceDword )(LPVOID , ULONG, LPVOID );
+- ULONG (DECL *ClientWriteSystemDeviceByte )(LPVOID , ULONG, UCHAR);
+- ULONG (DECL *ClientWriteSystemDeviceDword )(LPVOID , ULONG, ULONG);
+- ULONG (DECL *ClientWait )(LPVOID , ULONG);
+- ULONG (DECL *ClientGetBiosInfo ) (LPVOID, LPVOID, LPVOID);
+- ULONG (DECL *ClientReadDDCEdid ) (LPVOID, LPVOID, ULONG);
+-#ifdef DEBUG
+- ULONG (DECL *ClientDebug ) (LPVOID, ULONG, LPVOID, ULONG, LPVOID);
+-#endif
+-} CLIENTTABLE, FAR *LPCLIENTTABLE;
-
- #ifndef _MGA_MACROS_H_
- #define _MGA_MACROS_H_
+ #endif /* _INTERNALBINDING */
-diff --git a/src/mga_merge.c b/src/mga_merge.c
-index 753f752..1fd0572 100644
---- a/src/mga_merge.c
-+++ b/src/mga_merge.c
-@@ -363,6 +363,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
- case PCI_CHIP_MGAG200_WINBOND_PCI:
- case PCI_CHIP_MGAG200_EV_PCI:
- case PCI_CHIP_MGAG200_EH_PCI:
-+ case PCI_CHIP_MGAG200_ER_PCI:
- case PCI_CHIP_MGAG400:
- case PCI_CHIP_MGAG550:
- MGAGSetupFuncs(pScrn);
-@@ -518,6 +519,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
- case PCI_CHIP_MGAG200_WINBOND_PCI:
- case PCI_CHIP_MGAG200_EV_PCI:
- case PCI_CHIP_MGAG200_EH_PCI:
-+ case PCI_CHIP_MGAG200_ER_PCI:
+ /***************************************************************************************************
+diff --git a/src/client.h b/src/client.h
+index 8348b64..59aca5d 100644
+--- a/src/client.h
++++ b/src/client.h
+@@ -17,46 +17,6 @@ typedef struct TAGCLIENTDATA
+ pointer pMga;
+ } CLIENTDATA, *LPCLIENTDATA;
+
+-extern ULONG DECL ClientReadConfigSpaceByte(LPBOARDHANDLE, ULONG, LPUCHAR);
+-extern ULONG DECL ClientReadConfigSpaceDword(LPBOARDHANDLE , ULONG, LPULONG );
+-extern ULONG DECL ClientWriteConfigSpaceByte (LPBOARDHANDLE , ULONG, UCHAR);
+-extern ULONG DECL ClientWriteConfigSpaceDword(LPBOARDHANDLE , ULONG, ULONG);
+-extern ULONG DECL ClientOpenRegisterBase(LPBOARDHANDLE , ULONG, ULONG);
+-extern ULONG DECL ClientCloseRegisterBase (LPBOARDHANDLE );
+-extern ULONG DECL ClientReadRegisterByte(LPBOARDHANDLE , ULONG, LPUCHAR );
+-extern ULONG DECL ClientReadRegisterDword(LPBOARDHANDLE , ULONG, LPULONG );
+-extern ULONG DECL ClientWriteRegisterByte (LPBOARDHANDLE , ULONG, UCHAR);
+-extern ULONG DECL ClientWriteRegisterDword(LPBOARDHANDLE , ULONG, ULONG);
+-extern ULONG DECL ClientOpenMemoryBase(LPBOARDHANDLE , ULONG, ULONG);
+-extern ULONG DECL ClientCloseMemoryBase(LPBOARDHANDLE );
+-extern ULONG DECL ClientReadMemoryByte(LPBOARDHANDLE , ULONG, LPUCHAR );
+-extern ULONG DECL ClientReadMemoryDword (LPBOARDHANDLE , ULONG, LPULONG );
+-extern ULONG DECL ClientWriteMemoryByte(LPBOARDHANDLE , ULONG, UCHAR);
+-extern ULONG DECL ClientWriteMemoryDword (LPBOARDHANDLE , ULONG, ULONG);
+-extern ULONG DECL ClientOpenSystemDevice (LPBOARDHANDLE , ULONG, ULONG);
+-extern ULONG DECL ClientCloseSystemDevice (LPBOARDHANDLE );
+-extern ULONG DECL ClientReadSystemDeviceByte(LPBOARDHANDLE , ULONG, LPUCHAR );
+-extern ULONG DECL ClientReadSystemDeviceDword(LPBOARDHANDLE , ULONG, LPULONG );
+-extern ULONG DECL ClientWriteSystemDeviceByte(LPBOARDHANDLE , ULONG, UCHAR);
+-extern ULONG DECL ClientWriteSystemDeviceDword (LPBOARDHANDLE , ULONG, ULONG);
+-extern ULONG DECL ClientWait (LPBOARDHANDLE , ULONG);
+-extern ULONG DECL ClientLocateFirstTwisterOfQuad(ULONG);
+-extern ULONG DECL ClientSearchDevNode(ULONG, UCHAR, UCHAR);
+-extern ULONG DECL ClientGetBiosInfo(LPBOARDHANDLE, LPUCHAR, LPULONG );
+-extern ULONG DECL ClientDebug (LPBOARDHANDLE , ULONG, LPUCHAR, ULONG, LPVOID);
+-extern ULONG DECL ClientCallBiosInt10(LPBOARDHANDLE, LPBIOSREGS);
+-extern ULONG DECL ClientReadDDCEdid(LPBOARDHANDLE, LPUCHAR, ULONG);
+-extern ULONG DECL ClientCustomCall(LPBOARDHANDLE, ULONG, LPVOID, LPVOID);
+-extern ULONG DECL ClientApplyEpromPatch(LPBOARDHANDLE);
+-extern ULONG DECL ClientDetectHostInterface(LPBOARDHANDLE, LPULONG);
+-extern ULONG DECL ClientHSLPatchFunction(LPBOARDHANDLE, ULONG, ULONG, LPUCHAR);
+-extern ULONG DECL InitClientFunctions(LPBOARDHANDLE, ULONG);
+-extern ULONG DECL ClientInitTimeBase(LPBOARDHANDLE);
+-extern ULONG DECL ClientOpenDMABase(LPBOARDHANDLE, ULONG, ULONG);
+-extern ULONG DECL ClientReadDMAByte(LPBOARDHANDLE, ULONG, LPUCHAR);
+-extern ULONG DECL ClientReadBIOS(LPBOARDHANDLE, ULONG, ULONG, ULONG, ULONG, LPUCHAR);
+-extern ULONG DECL ClientWriteBIOS(LPBOARDHANDLE, ULONG, ULONG, ULONG, ULONG);
+-
+ #if defined(__cplusplus)
+ }
+ #endif
+diff --git a/src/clientlx.c b/src/clientlx.c
+deleted file mode 100644
+index 9c6ab50..0000000
+--- a/src/clientlx.c
++++ b/dev/null
+@@ -1,848 +0,0 @@
+-/******************************************************************************\
+-
+- clientlx.c
+-
+- Copyright © 1997, Matrox Graphics Inc.
+-
+- All Rights Reserved.
+-
+-\******************************************************************************/
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif
+-
+-#include "xf86_OSproc.h"
+-#include "xf86Pci.h"
+-#include "client.h"
+-#include "mga.h"
+-
+-CLIENTTABLE ClientFunctions = {
+- (ULONG (DECL *)(LPVOID,ULONG,LPVOID)) ClientReadConfigSpaceByte,
+- (ULONG (DECL *)(LPVOID,ULONG,LPVOID)) ClientReadConfigSpaceDword,
+- (ULONG (DECL *)(LPVOID,ULONG,UCHAR)) ClientWriteConfigSpaceByte,
+- (ULONG (DECL *)(LPVOID,ULONG,ULONG)) ClientWriteConfigSpaceDword,
+- (ULONG (DECL *)(LPVOID,ULONG,ULONG)) ClientOpenRegisterBase,
+- (ULONG (DECL *)(LPVOID)) ClientCloseRegisterBase,
+- (ULONG (DECL *)(LPVOID,ULONG,LPVOID)) ClientReadRegisterByte,
+- (ULONG (DECL *)(LPVOID,ULONG,LPVOID)) ClientReadRegisterDword,
+- (ULONG (DECL *)(LPVOID,ULONG,UCHAR)) ClientWriteRegisterByte,
+- (ULONG (DECL *)(LPVOID,ULONG,ULONG)) ClientWriteRegisterDword,
+- (ULONG (DECL *)(LPVOID,ULONG,ULONG)) ClientOpenMemoryBase,
+- (ULONG (DECL *)(LPVOID)) ClientCloseMemoryBase,
+- (ULONG (DECL *)(LPVOID,ULONG,LPVOID)) ClientReadMemoryByte,
+- (ULONG (DECL *)(LPVOID,ULONG,LPVOID)) ClientReadMemoryDword,
+- (ULONG (DECL *)(LPVOID,ULONG,UCHAR)) ClientWriteMemoryByte,
+- (ULONG (DECL *)(LPVOID,ULONG,ULONG)) ClientWriteMemoryDword,
+- (ULONG (DECL *)(LPVOID,ULONG,ULONG)) ClientOpenSystemDevice,
+- (ULONG (DECL *)(LPVOID)) ClientCloseSystemDevice,
+- (ULONG (DECL *)(LPVOID,ULONG,LPVOID)) ClientReadSystemDeviceByte,
+- (ULONG (DECL *)(LPVOID,ULONG,LPVOID)) ClientReadSystemDeviceDword,
+- (ULONG (DECL *)(LPVOID,ULONG,UCHAR)) ClientWriteSystemDeviceByte,
+- (ULONG (DECL *)(LPVOID,ULONG,ULONG)) ClientWriteSystemDeviceDword,
+- (ULONG (DECL *)(LPVOID,ULONG)) ClientWait,
+- (ULONG (DECL *)(LPVOID,LPVOID,LPVOID)) ClientGetBiosInfo,
+- (ULONG (DECL *)(LPVOID,LPVOID,ULONG)) ClientReadDDCEdid
+-};
+-
+-/******************************************************************************\
+-
+- Function : ClientReadConfigSpaceByte
+-
+- Description : Read a Byte from the configuration space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specifib board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- UCHAR *pucByte | pointer to a byte that will receive
+- the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientReadConfigSpaceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- UCHAR *pucByte)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+- MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
+-
+- ASSERT_HANDLER(pBoard);
+-
+-#ifdef XSERVER_LIBPCIACCESS
+- pci_device_cfg_read_u8(pMga->PciInfo, pucByte, ulOffset);
+-#else
+- *pucByte = pciReadByte(pMga->PciTag,ulOffset);
+-#endif
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientReadConfigSpaceDword
+-
+- Description : Read a Dword from the configuration space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG *pulDword | Dword to receive the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientReadConfigSpaceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- ULONG *pulDword)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+- MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
+-
+- ASSERT_HANDLER(pBoard);
+-
+-#ifdef XSERVER_LIBPCIACCESS
+- pci_device_cfg_read_u32(pMga->PciInfo, (uint32_t *) pulDword, ulOffset);
+-#else
+- *pulDword = pciReadLong(pMga->PciTag,ulOffset);
+-#endif
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWriteConfigSpaceByte
+-
+- Description : Write a Byte from the configuration space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- UCHAR ucByte | Byte to receive the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWriteConfigSpaceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- UCHAR ucByte)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+- MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
+-
+- ASSERT_HANDLER(pBoard);
+-
+-#ifdef XSERVER_LIBPCIACCESS
+- pci_device_cfg_write_u8(pMga->PciInfo, ucByte, ulOffset);
+-#else
+- pciWriteByte(pMga->PciTag,ulOffset, ucByte);
+-#endif
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWriteConfigSpaceDword
+-
+- Description : Write a Dword from the configuration space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG ulDword | Dword containing the data to be written
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWriteConfigSpaceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- ULONG ulDword)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+- MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
+-
+- ASSERT_HANDLER(pBoard);
+-
+-#ifdef XSERVER_LIBPCIACCESS
+- pci_device_cfg_write_u32(pMga->PciInfo, (uint32_t) ulDword, ulOffset);
+-#else
+- pciWriteLong(pMga->PciTag,ulOffset, ulDword);
+-#endif
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientOpenRegisterBase
+-
+- Description : Map the register base for future call to ClientReadRegisterX
+- and ClientWriteRegisterX.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulAddress | Physical address of the Register aperture
+- ULONG ulSize | Size in Byte of the Register Aperture
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientOpenRegisterBase(LPBOARDHANDLE pBoard, ULONG ulAddress, ULONG ulSize)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+- MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
+-
+- ASSERT_HANDLER(pBoard);
+-
+- pClientStruct->ulRegisterBase = (ULONG) pMga->IOBase;
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientCloseRegisterBase
+-
+- Description : Unmap the register base address and free resources needed
+- to address it.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientCloseRegisterBase(LPBOARDHANDLE pBoard)
+-{
+- ASSERT_HANDLER(pBoard);
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientReadRegisterByte
+-
+- Description : Read a byte from the Register space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure.
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- UCHAR *pucByte | pointer to the byte that will receive
+- the data.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientReadRegisterByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- UCHAR *pucByte)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+-
+- ASSERT_HANDLER(pBoard);
+-
+- *pucByte = *((UCHAR *)(pClientStruct->ulRegisterBase + ulOffset));
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientReadRegisterDword
+-
+- Description : Read a Dword from the Register space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG *pulDword | pointer to the dword that will receive
+- the data.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientReadRegisterDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- ULONG *pulDword)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+-
+- ASSERT_HANDLER(pBoard);
+-
+- *pulDword = *((ULONG *)(pClientStruct->ulRegisterBase + ulOffset));
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWriteRegisterByte
+-
+- Description : Write a Byte from the Register space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- UCHAR ucByte | CHAR to receive the data.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWriteRegisterByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- UCHAR ucByte)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+-
+- ASSERT_HANDLER(pBoard);
+-
+- *((UCHAR *)(pClientStruct->ulRegisterBase + ulOffset)) = ucByte;
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWriteRegisterSpaceDword
+-
+- Description : Write a Dword from the Register space.
+-
+- I/O Desc. : LPBOARDHANDLE *| pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG ulDword | Dword to receive the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWriteRegisterDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- ULONG ulDword)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+-
+- ASSERT_HANDLER(pBoard);
+-
+- *((ULONG *)(pClientStruct->ulRegisterBase + ulOffset)) = ulDword;
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientOpenMemoryBase
+-
+- Description : Map the Memory base for future call to ClientReadMemoryX
+- and ClientWriteMemoryX.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulAddress | Physical address of the Register aperture
+- ULONG ulSize | Size in Byte of the Register Aperture
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientOpenMemoryBase(LPBOARDHANDLE pBoard, ULONG ulAddress, ULONG ulSize)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+- MGAPtr pMga = (MGAPtr) pClientStruct->pMga;
+-
+- ASSERT_HANDLER(pBoard);
+-
+- pClientStruct->ulFrameBufferBase = (ULONG) pMga->FbBase;
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientCloseMemoryBase
+-
+- Description : Unmap the Frame Buffer aperture and free resources
+- needed to address it.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientCloseMemoryBase(LPBOARDHANDLE pBoard)
+-{
+- ASSERT_HANDLER(pBoard);
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientReadMemoryByte
+-
+- Description : Read a Byte from the Frame Buffer space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- UCHAR *ucByte | CHAR to receive the data
+-
+- Return Val : ULONG
+-\******************************************************************************/
+-ULONG ClientReadMemoryByte(LPBOARDHANDLE pBoard, ULONG ulOffset, UCHAR *pucByte)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+-
+- ASSERT_HANDLER(pBoard);
+-
+- *pucByte = *((UCHAR *)(pClientStruct->ulFrameBufferBase + ulOffset));
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientReadMemoryDword
+-
+- Description : Read a Dword from the Frame Buffer Space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG *uDword | Dword to receive the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientReadMemoryDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- ULONG *pulDword)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+-
+- ASSERT_HANDLER(pBoard);
+-
+- *pulDword = *((ULONG *)(pClientStruct->ulFrameBufferBase + ulOffset));
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWriteMemoryByte
+-
+- Description : Write a Byte from the Frame Buffer space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- UCHAR ucByte | CHAR to receive the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWriteMemoryByte(LPBOARDHANDLE pBoard, ULONG ulOffset, UCHAR ucByte)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+-
+- ASSERT_HANDLER(pBoard);
+-
+- *((UCHAR *)(pClientStruct->ulFrameBufferBase + ulOffset)) = ucByte;
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWriteMemoryDword
+-
+- Description : Write a Dword from the Frame Buffer space.
+-
+- I/O desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG ulDword | Dword to receive the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWriteMemoryDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- ULONG ulDword)
+-{
+- LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
+-
+- ASSERT_HANDLER(pBoard);
+-
+- *((ULONG *)(pClientStruct->ulFrameBufferBase + ulOffset)) = ulDword;
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientOpenSystemDevice
+-
+- Description : Map a System device aperture for future call to
+- ClientReadSystemDeviceX and ClientWriteSystemDeviceX.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulAddress | Physical address of the Register aperture
+- ULONG ulSize | Size in Byte of the Register Aperture
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientOpenSystemDevice(LPBOARDHANDLE pBoard, ULONG ulAddress,
+- ULONG ulSize)
+-{
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientCloseSystemDevice
+-
+- Description : Unmap the System Device aperture address and free
+- resources needed to address it.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientCloseSystemDevice (LPBOARDHANDLE pBoard)
+-{
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientReadSystemDeviceByte
+-
+- Description : Read a Byte from the device Space.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG pucByte | Byte to read the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientReadSystemDeviceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- UCHAR *pucByte)
+-{
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientReadSystemDeviceDword
+-
+- Description : Read a Dword from the Frame Buffer Space
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG ulDword | Dword to Read the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientReadSystemDeviceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- ULONG *pulDword)
+-{
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWriteSystemByte
+-
+- Description : Write a Byte from the System Device Aperture
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- UCHAR ucByte | Byte to receive the data
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWriteSystemDeviceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- UCHAR ucByte)
+-{
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWriteSystemDword
+-
+- Description : Write a Dword from the System Device Aperture.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulOffset | Offset of the Byte to be read.
+- ULONG uDword | Dword to receive the data
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWriteSystemDeviceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
+- ULONG ulDword)
+-{
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientWait
+-
+- Description : Wait for ulDelayus micro-seconds.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- ULONG ulDelayus | Delay in uSec
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientWait (LPBOARDHANDLE pBoard, ULONG ulDelayus)
+-{
+- int i;
+- ULONG ulTmp;
+-
+- ASSERT_HANDLER(pBoard);
+-
+- for(i = 0; i < ulDelayus * 3; i++)
+- {
+- ClientReadRegisterDword(pBoard,0x1e14,&ulTmp);
+- }
+-
+- return 0;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientGetBiosInfo
+-
+- Description : This function will be call if no PINS can be found
+- in physical EEPROM.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- LPUCHAR | Buffer where we copy bios pins.
+- ULONG | Bios version
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientGetBiosInfo(LPBOARDHANDLE pBoard, LPUCHAR pucPins,LPULONG pulBIOSVersion)
+-{
+- Bool bNotFound = TRUE;
+- UCHAR ucBIOS[32768];
+- UCHAR ucTmpByte;
+- UCHAR ucCheckSum;
+- UCHAR ucPinsIndex;
+- UCHAR ucPinsSize;
+- ULONG ulTmpDword;
+- ULONG ulPinsOffset = 0;
+- ULONG ulPCIINFOffset;
+-
+- ASSERT_HANDLER(pBoard);
+-
+- xf86ReadBIOS(0xc0000,0,ucBIOS,32768);
+-
+- if(ucBIOS[0] == 0x55)
+- {
+- if(ucBIOS[1] == 0xaa)
+- {
+- while((ulPinsOffset < 0x10000) && bNotFound)
+- {
+- ulTmpDword = *(ULONG *)(ucBIOS + ulPinsOffset);
+- ucPinsSize = (UCHAR) (ulTmpDword >> 16);
+- if(((ulTmpDword & 0x0000ffff) == 0x0000412e)
+- && ucPinsSize <= 128)
+- {
+- ucCheckSum = 0;
+- for(ucPinsIndex = 0;ucPinsIndex < ucPinsSize; ucPinsIndex++)
+- {
+- pucPins[ucPinsIndex] = ucBIOS[ulPinsOffset +
+- ucPinsIndex];
+- ucCheckSum += pucPins[ucPinsIndex];
+- }
+- if(ucCheckSum == 0)
+- {
+- bNotFound = FALSE;
+- }
+- }
+- ulPinsOffset++;
+- }
+-
+- if(bNotFound)
+- {
+- return 1;
+- }
+-
+- ulPCIINFOffset = *(ULONG *)(ucBIOS + 0x18);
+- ulPCIINFOffset &= 0x0000ffff;
+- ulTmpDword = *(ULONG *)(ucBIOS + ulPCIINFOffset);
+-
+- if(ulTmpDword == 0x52494350) /* "PCIR" */
+- {
+- ulPCIINFOffset += 0x12;
+- ulTmpDword = *(ULONG *)(ucBIOS + ulPCIINFOffset);
+- *pulBIOSVersion = ((ULONG) ((ulTmpDword & 0xf0) >> 4) << 16) |
+- ((ulTmpDword &0xf) << 12) | ((ulTmpDword >> 8)
+- & 0xff);
+- }
+- else
+- {
+- return 1;
+- }
+- }
+- else
+- {
+- return 1;
+- }
+- }
+- else
+- {
+- return 1;
+- }
+-
+- if(!*pulBIOSVersion)
+- {
+- ucTmpByte = ucBIOS[5];
+- *pulBIOSVersion = ((ULONG) (ucTmpByte >> 4) << 16) | ((ULONG)
+- (ucTmpByte & 0x0f) << 12);
+- }
+-
+- return 0;
+-}
+-
+-/******************************************************************************\
+-
+- Function : ClientCallBiosInt10
+-
+- Description : Call the BIOS Int10h with specified parameters.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- LPBIOSREGS pBiosRegs | Pointor to the Bios register
+- structure.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientCallBiosInt10(LPBOARDHANDLE pBoard, LPBIOSREGS pBiosRegs)
+-{
+- ASSERT_HANDLER(pBoard);
+-
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientReadDDCEdid
+-
+- Description : Not implemented.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- LPBIOSREGS pBiosRegs | Pointor to the Bios register
+- structure.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientReadDDCEdid(LPBOARDHANDLE pBoard, LPUCHAR pEdid,
+- ULONG ulMonitorIndex)
+-{
+- ASSERT_HANDLER(pBoard);
+-
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientCustomCall
+-
+- Description : Not implemented.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- LPBIOSREGS pBiosRegs | Pointor to the Bios register
+- structure.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientCustomCall(LPBOARDHANDLE pBoard, ULONG ulServiceNumber,
+- LPVOID pInData, LPVOID pOutData)
+-{
+- ASSERT_HANDLER(pBoard);
+-
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientApplyEpromPatch
+-
+- Description : Not implemented.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- LPBIOSREGS pBiosRegs | Pointor to the Bios register
+- structure.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientApplyEpromPatch(LPBOARDHANDLE pBoard)
+-{
+- ASSERT_HANDLER(pBoard);
+-
+- return 1;
+-}
+-
+-
+-/******************************************************************************\
+-
+- Function : ClientDetectHostInterface
+-
+- Description : Not implemented.
+-
+- I/O Desc. : LPBOARDHANDLE pBoard | Handle to the board structure
+- containing all the information about a specific board.
+- LPBIOSREGS pBiosRegs | Pointor to the Bios register
+- structure.
+-
+- Return Val : ULONG
+-
+-\******************************************************************************/
+-ULONG ClientDetectHostInterface(LPBOARDHANDLE pBoard, LPULONG pulData)
+-{
+- ASSERT_HANDLER(pBoard);
+-
+- return 1;
+-}
+-
+--
+cgit v0.9.0.2-2-gbebe
+From 94bbeb132c7eda912d1b402a1a91ca7cbbf5e6a1 Mon Sep 17 00:00:00 2001
+From: Jamey Sharp <jamey@minilop.net>
+Date: Thu, 15 Sep 2011 15:29:11 +0000
+Subject: Delete support for MGA's proprietary HAL: unifdef USEMGAHAL.
+
+This patch produced with:
+ for f in `git grep -Fwl USEMGAHAL`; do
+ unifdef -B -UUSEMGAHAL $f | sponge $f
+ done
+
+Adam Jackson wrote:
+
+ Hey, so, remember back in the dark ages when dualhead was this
+ insanely wild differentiating feature? Matrox thought it was so
+ special, in fact, that they hid most of the implementation of it
+ (and a bunch of other stuff) in a binary-only blob called the
+ HALlib. As you'd expect it was pretty much a cut-and-paste of
+ the relevant Windows code, and then some open glue to keep it
+ working; clientlx.c is that glue.
+
+ I guess the theory was that if you don't tell people which
+ registers to duplicate to implement a second pipe in their own
+ hardware, they won't figure it out? A pretty eyeroll-worthy
+ idea even at the time, and definitely not something we should be
+ condoning anymore.
+
+ Kill it with fire, but while you're at it, untangle the hideous
+ mess of MGA_HAL() macros too.
+
+Signed-off-by: Jamey Sharp <jamey@minilop.net>
+Cc: Adam Jackson <ajax@redhat.com>
+---
+diff --git a/src/mga.h b/src/mga.h
+index c520e86..fced6aa 100644
+--- a/src/mga.h
++++ b/src/mga.h
+@@ -42,10 +42,6 @@
+ #include "mga_dri.h"
+ #endif
+
+-#ifdef USEMGAHAL
+-#include "client.h"
+-#endif
+-
+ typedef enum {
+ OPTION_SW_CURSOR,
+ OPTION_HW_CURSOR,
+@@ -329,11 +325,6 @@ typedef enum {
+
+ typedef struct {
+ int lastInstance;
+-#ifdef USEMGAHAL
+- LPCLIENTDATA pClientStruct;
+- LPBOARDHANDLE pBoard;
+- LPMGAHWINFO pMgaHwInfo;
+-#endif
+ int refCount;
+ CARD32 masterFbAddress;
+ long masterFbMapSize;
+@@ -459,12 +450,6 @@ struct mga_device_attributes {
+ };
+
+ typedef struct {
+-#ifdef USEMGAHAL
+- LPCLIENTDATA pClientStruct;
+- LPBOARDHANDLE pBoard;
+- LPMGAMODEINFO pMgaModeInfo;
+- LPMGAHWINFO pMgaHwInfo;
+-#endif
+ EntityInfoPtr pEnt;
+ struct mga_bios_values bios;
+ CARD8 BiosOutputMode;
+@@ -650,9 +635,6 @@ typedef struct {
+ MGAPaletteInfo palinfo[256]; /* G400 hardware bug workaround */
+ FBLinearPtr LinearScratch;
+ Bool softbooted;
+-#ifdef USEMGAHAL
+- Bool HALLoaded;
+-#endif
+ OptionInfoPtr Options;
+
+ /* Exa */
+@@ -810,26 +792,6 @@ void MGAG200SESaveMode(ScrnInfoPtr, vgaRegPtr);
+ void MGAG200SERestoreMode(ScrnInfoPtr, vgaRegPtr);
+ void MGAG200SEHWProtect(ScrnInfoPtr, Bool);
+
+-#ifdef USEMGAHAL
+-/************ ESC Call Definition ***************/
+-typedef struct {
+- char *function;
+- void (*funcptr)(ScrnInfoPtr pScrn, unsigned long *param, char *out, DisplayModePtr pMode);
+-} MGAEscFuncRec, *MGAEscFuncPtr;
+-
+-typedef struct {
+- char function[32];
+- unsigned long parameters[32];
+-} EscCmdStruct;
+-
+-extern LPMGAMODEINFO pMgaModeInfo[2];
+-extern MGAMODEINFO TmpMgaModeInfo[2];
+-
+-extern void MGAExecuteEscCmd(ScrnInfoPtr pScrn, char *cmdline , char *sResult, DisplayModePtr pMode);
+-void MGAFillDisplayModeStruct(DisplayModePtr pMode, LPMGAMODEINFO pModeInfo);
+-/************************************************/
+-#endif
+-
+ static __inline__ void
+ MGA_MARK_SYNC(MGAPtr pMga, ScrnInfoPtr pScrn)
+ {
+diff --git a/src/mga_dacG.c b/src/mga_dacG.c
+index fca1031..b489dea 100644
+--- a/src/mga_dacG.c
++++ b/src/mga_dacG.c
+@@ -1001,9 +1001,6 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ break;
case PCI_CHIP_MGAG400:
case PCI_CHIP_MGAG550:
- maxPitch = 4096;
-diff --git a/src/mga_reg.h b/src/mga_reg.h
-index 6251976..5a37db6 100644
---- a/src/mga_reg.h
-+++ b/src/mga_reg.h
-@@ -1,11 +1,3 @@
--/* $XConsortium: mgareg.h /main/2 1996/10/25 10:33:21 kaleb $ */
+-#ifdef USEMGAHAL
+- MGA_HAL(break;);
+-#endif
+ if (MGAISGx50(pMga))
+ break;
+
+@@ -1046,9 +1043,6 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ break;
+ case PCI_CHIP_MGAG200_SE_A_PCI:
+ case PCI_CHIP_MGAG200_SE_B_PCI:
+-#ifdef USEMGAHAL
+- MGA_HAL(break;);
+-#endif
+ pReg->DacRegs[ MGA1064_VREF_CTL ] = 0x03;
+ pReg->DacRegs[MGA1064_PIX_CLK_CTL] =
+ MGA1064_PIX_CLK_CTL_SEL_PLL;
+@@ -1097,9 +1091,6 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ case PCI_CHIP_MGAG200:
+ case PCI_CHIP_MGAG200_PCI:
+ default:
+-#ifdef USEMGAHAL
+- MGA_HAL(break;);
+-#endif
+ if(pMga->OverclockMem) {
+ /* 143 Mhz */
+ pReg->DacRegs[ MGA1064_SYS_PLL_M ] = 0x06;
+@@ -1496,21 +1487,6 @@ MGA_NOT_HAL(
+ MGAG200EHPIXPLLSET(pScrn, mgaReg);
+ }
+ ); /* MGA_NOT_HAL */
+-#ifdef USEMGAHAL
+- /*
+- * Work around another bug in HALlib: it doesn't restore the
+- * DAC width register correctly. MATROX: hint, hint.
+- */
+- MGA_HAL(
+- outMGAdac(MGA1064_MUL_CTL,mgaReg->DacRegs[0]);
+- outMGAdac(MGA1064_MISC_CTL,mgaReg->DacRegs[1]);
+- if (!MGAISGx50(pMga)) {
+- outMGAdac(MGA1064_PIX_PLLC_M,mgaReg->DacRegs[2]);
+- outMGAdac(MGA1064_PIX_PLLC_N,mgaReg->DacRegs[3]);
+- outMGAdac(MGA1064_PIX_PLLC_P,mgaReg->DacRegs[4]);
+- }
+- );
+-#endif
+ /* restore CRTCEXT regs */
+ for (i = 0; i < 6; i++)
+ OUTREG16(MGAREG_CRTCEXT_INDEX, (mgaReg->ExtVga[i] << 8) | i);
+@@ -1650,24 +1626,6 @@ MGAGSave(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg,
+ * DAC width register correctly.
+ */
+
+-#ifdef USEMGAHAL
+- /*
+- * Work around another bug in HALlib: it doesn't restore the
+- * DAC width register correctly (s.o.). MATROX: hint, hint.
+- */
+- MGA_HAL(
+- if (mgaReg->DacRegs == NULL) {
+- mgaReg->DacRegs = xnfcalloc(MGAISGx50(pMga) ? 2 : 5, 1);
+- }
+- mgaReg->DacRegs[0] = inMGAdac(MGA1064_MUL_CTL);
+- mgaReg->DacRegs[1] = inMGAdac(MGA1064_MISC_CTL);
+- if (!MGAISGx50(pMga)) {
+- mgaReg->DacRegs[2] = inMGAdac(MGA1064_PIX_PLLC_M);
+- mgaReg->DacRegs[3] = inMGAdac(MGA1064_PIX_PLLC_N);
+- mgaReg->DacRegs[4] = inMGAdac(MGA1064_PIX_PLLC_P);
+- }
+- );
+-#endif
+ MGA_NOT_HAL(
+ /*
+ * The port I/O code necessary to read in the extended registers.
+@@ -1793,12 +1751,6 @@ MGAGSetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
+ x += 64;
+ y += 64;
+
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- x += pMga->HALGranularityOffX;
+- y += pMga->HALGranularityOffY;
+- );
+-#endif
+ /* cursor update must never occurs during a retrace period (pp 4-160) */
+ while( INREG( MGAREG_Status ) & 0x08 );
+
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index 58a1390..d770031 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -1509,10 +1509,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ int flags24;
+ MGAEntPtr pMgaEnt = NULL;
+ Bool Default;
+-#ifdef USEMGAHAL
+- ULONG status;
+- CARD8 MiscCtlReg;
+-#endif
+
+ /*
+ * Note: This function is only called once at server startup, and
+@@ -1657,37 +1653,9 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ pMga->is_G200EH = (pMga->Chipset == PCI_CHIP_MGAG200_EH_PCI);
+ pMga->is_G200ER = (pMga->Chipset == PCI_CHIP_MGAG200_ER_PCI);
+
+-#ifdef USEMGAHAL
+- if (pMga->chip_attribs->HAL_chipset) {
+- Bool loadHal = TRUE;
+-
+- from = X_DEFAULT;
+- if (xf86FindOption(pMga->device->options, "NoHal")) {
+- loadHal = !xf86SetBoolOption(pMga->device->options,
+- "NoHal", !loadHal);
+- from = X_CONFIG;
+- } else if (xf86FindOption(pMga->device->options, "Hal")) {
+- loadHal = xf86SetBoolOption(pMga->device->options,
+- "Hal", loadHal);
+- from = X_CONFIG;
+- }
+- if (loadHal && xf86LoadSubModule(pScrn, "mga_hal")) {
+- xf86DrvMsg(pScrn->scrnIndex, from,"Matrox HAL module used\n");
+- pMga->HALLoaded = TRUE;
+- } else {
+- xf86DrvMsg(pScrn->scrnIndex, from, "Matrox HAL module not loaded "
+- "- using builtin mode setup instead\n");
+- pMga->HALLoaded = FALSE;
+- }
+- }
+-#endif
-
+ pMga->DualHeadEnabled = FALSE;
+ if (xf86IsEntityShared(pScrn->entityList[0])) {/* dual-head mode requested*/
+ if (
+-#ifdef USEMGAHAL
+- pMga->HALLoaded ||
+-#endif
+ !MGA_DH_NEEDS_HAL(pMga)) {
+ pMga->DualHeadEnabled = TRUE;
+ } else if (xf86IsPrimInitDone(pScrn->entityList[0])) {
+@@ -2088,30 +2056,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "\"Merged Framebuffer\" mode only supported on G450 and G550 boards.\n");
+ } else {
+-#ifdef USEMGAHAL
+- if(pMga->HALLoaded)
+- {
+- pMga->MergedFB = TRUE;
+- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+- "Using \"Merged Framebuffer\" mode.\n");
+- /*
+- * a few options that won't work well together
+- */
+- if(pMga->HWCursor) /*Should we give the choice? */
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- " -- Hardware Cursor disabled.\n");
+- pMga->HWCursor = FALSE;
+- if(pMga->ShadowFB)
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- " -- Shadow Framebuffer disabled.\n");
+- pMga->ShadowFB = FALSE;
+- if(pMga->FBDev)
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- " -- Framebuffer device disabled.\n");
+- pMga->FBDev = FALSE;
+- } /* MGA_HAL */
+- else
+-#endif
+ {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "HALLib not loaded! NOT using \"Merged Framebuffer\" mode.\n");
+@@ -2404,10 +2348,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ clockRanges->clockIndex = -1; /* programmable */
+ clockRanges->interlaceAllowed = TRUE;
+ clockRanges->doubleScanAllowed = TRUE;
+-#ifdef USEMGAHAL
+- MGA_HAL(clockRanges->interlaceAllowed = FALSE);
+- MGA_HAL(clockRanges->doubleScanAllowed = FALSE);
+-#endif
+ if (pMga->SecondCrtc == TRUE)
+ clockRanges->interlaceAllowed = FALSE;
+
+@@ -2513,80 +2453,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ MGAFreeRec(pScrn);
+ return FALSE;
+ }
+-#ifdef USEMGAHAL
+- MGA_HAL(
-
+- if(pMga->SecondCrtc == FALSE) {
+-
+- pMga->pBoard = xalloc(sizeof(CLIENTDATA) + MGAGetBOARDHANDLESize());
+- pMga->pClientStruct = xalloc(sizeof(CLIENTDATA));
+- pMga->pClientStruct->pMga = (MGAPtr) pMga;
-
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_reg.h,v 1.18 2001/09/26 12:59:18 alanh Exp $ */
+- MGAMapMem(pScrn);
+- /*
+- * For some reason the MGAOPM_DMA_BLIT bit needs to be set
+- * on G200 before opening the HALlib. I don't know why.
+- * MATROX: hint, hint.
+- */
+- /*if (pMga->Chipset == PCI_CHIP_MGAG200 ||
+- pMga->Chipset == PCI_CHIP_MGAG200_PCI) */{
+- CARD32 opmode;
+- opmode = INREG(MGAREG_OPMODE);
+- OUTREG(MGAREG_OPMODE, MGAOPM_DMA_BLIT | opmode);
+- }
+- /* wrapping OpenLibrary to fix broken registers. MATROX: hint, hint. */
+- MiscCtlReg = inMGAdac(MGA1064_MISC_CTL);
+- MGAOpenLibrary(pMga->pBoard,pMga->pClientStruct,sizeof(CLIENTDATA));
+- outMGAdac(MGA1064_MISC_CTL,MiscCtlReg);
+- MGAUnmapMem(pScrn);
+- pMga->pMgaHwInfo = xalloc(sizeof(MGAHWINFO));
+- MGAGetHardwareInfo(pMga->pBoard,pMga->pMgaHwInfo);
-
+- /* copy the board handles */
+- if (pMga->DualHeadEnabled) {
+- pMgaEnt->pClientStruct = pMga->pClientStruct;
+- pMgaEnt->pBoard = pMga->pBoard;
+- pMgaEnt->pMgaHwInfo = pMga->pMgaHwInfo;
+- }
-
+- } else { /* Second CRTC && entity is shared */
+- pMga->pBoard = pMgaEnt->pBoard;
+- pMga->pClientStruct = pMgaEnt->pClientStruct;
+- pMga->pMgaHwInfo = pMgaEnt->pMgaHwInfo;
-
- /*
- * MGA Millennium (MGA2064W) functions
- * MGA Mystique (MGA1064SG) functions
-@@ -377,6 +369,7 @@
- #define MGA1064_MISC_CTL_VGA8 ( 0x01 << 3 )
- #define MGA1064_MISC_CTL_DAC_RAM_CS ( 0x01 << 4 )
+- }
+-
+- MGAFillModeInfoStruct(pScrn,NULL);
+- /* Fields usually handled by MGAFillModeInfoStruct, but are unavailable
+- * because no mode is given
+- */
+- pMga->pMgaModeInfo->ulDispWidth = pScrn->virtualX;
+- pMga->pMgaModeInfo->ulDispHeight = pScrn->virtualY;
+-
+-
+- if (ISDIGITAL1(pMga))
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+- "Digital screen detected on first head.\n");
+- if (ISTV1(pMga))
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+- "TV detected on first head.\n");
+- if (ISDIGITAL2(pMga))
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+- "Digital screen detected on second head.\n");
+- if (ISTV2(pMga))
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+- "TV detected on second head.\n");
+-
+-
+- if((status = MGAValidateMode(pMga->pBoard,pMga->pMgaModeInfo)) != 0) {
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- "MGAValidateMode from HALlib found the mode to be invalid.\n"
+- "\tError: 0x%lx\n", status);
+- return FALSE;
+- }
+- pScrn->displayWidth = pMga->pMgaModeInfo->ulFBPitch;
+- ); /* MGA_HAL */
+-#endif
-+#define MGA1064_GEN_IO_CTL2 0x29
- #define MGA1064_GEN_IO_CTL 0x2a
- #define MGA1064_GEN_IO_DATA 0x2b
- #define MGA1064_SYS_PLL_M 0x2c
-@@ -437,6 +430,10 @@
- #define MGA1064_EH_PIX_PLLC_N 0xb7
- #define MGA1064_EH_PIX_PLLC_P 0xb8
+ /* If the Device section explicitly set HasSDRAM, don't bother checking.
+ */
+@@ -2620,9 +2486,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ * driver and if the driver doesn't provide code to set them. They
+ * are not pre-initialised at all.
+ */
+-#ifdef USEMGAHAL
+- MGA_HAL(xf86SetCrtcForModes(pScrn, 0));
+-#endif
+ MGA_NOT_HAL(xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V));
-+/* Modified PLL for G200 Maxim (G200ER) */
-+#define MGA1064_ER_PIX_PLLC_M 0xb7
-+#define MGA1064_ER_PIX_PLLC_N 0xb6
-+#define MGA1064_ER_PIX_PLLC_P 0xb8
+ /* Set the current mode to the first in the list */
+@@ -2790,46 +2653,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ };
- #define MGA1064_DISP_CTL 0x8a
- #define MGA1064_DISP_CTL_DAC1OUTSEL_MASK 0x01
-diff --git a/src/mga_sarea.h b/src/mga_sarea.h
-index c5ffbbc..16fc9ce 100644
---- a/src/mga_sarea.h
-+++ b/src/mga_sarea.h
-@@ -1,5 +1,3 @@
--/* $XFree86$ */
+
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- /* Close the library after preinit */
+- /* This needs to only happen after this board has completed preinit
+- * both times
+- */
+-
+- if(pMga->DualHeadEnabled) {
+- /* Entity is shared make sure refcount == 2 */
+- /* If ref count is 2 then reset it to 0 */
+- if(pMgaEnt->refCount == 2) {
+- /* Both boards have done there initialization */
+- MGACloseLibrary(pMga->pBoard);
+-
+- if (pMga->pBoard)
+- xfree(pMga->pBoard);
+- if (pMga->pClientStruct)
+- xfree(pMga->pClientStruct);
+- if (pMga->pMgaModeInfo)
+- xfree(pMga->pMgaModeInfo);
+- if (pMga->pMgaHwInfo)
+- xfree(pMga->pMgaHwInfo);
+- pMgaEnt->refCount = 0;
+- }
+- } else {
+- MGACloseLibrary(pMga->pBoard);
+-
+- if (pMga->pBoard)
+- xfree(pMga->pBoard);
+- if (pMga->pClientStruct)
+- xfree(pMga->pClientStruct);
+- if (pMga->pMgaModeInfo)
+- xfree(pMga->pMgaModeInfo);
+- if (pMga->pMgaHwInfo)
+- xfree(pMga->pMgaHwInfo);
+- }
+-
+- ); /* MGA_HAL */
+-#endif
+-
+ xf86SetPrimInitDone(pScrn->entityList[0]);
+
+ return TRUE;
+@@ -2995,9 +2818,6 @@ MGASave(ScrnInfoPtr pScrn)
+ MGARegPtr mgaReg = &pMga->SavedReg;
+
+ if(pMga->SecondCrtc == TRUE) return;
+-#ifdef USEMGAHAL
+- MGA_HAL(if (pMga->pBoard != NULL) MGASaveVgaState(pMga->pBoard));
+-#endif
+
+ /* I need to save the registers for the second head also */
+ /* Save the register for 0x80 to 0xa0 */
+@@ -3007,135 +2827,6 @@ MGASave(ScrnInfoPtr pScrn)
+ (*pMga->Save)(pScrn, vgaReg, mgaReg, pMga->Primary);
+ }
+
+-#ifdef USEMGAHAL
+-/* Convert DisplayModeRec parameters in MGAMODEINFO parameters.
+-* mode parameter optionnal. */
+-void
+-MGAFillModeInfoStruct(ScrnInfoPtr pScrn, DisplayModePtr mode)
+-{
+- const char *s;
+- MGAPtr pMga = MGAPTR(pScrn);
+-
+- Bool digital1 = FALSE;
+- Bool digital2 = FALSE;
+- Bool tv1 = FALSE;
+- Bool tv2 = FALSE;
+- Bool swap_head
+- = xf86ReturnOptValBool(pMga->Options, OPTION_SWAPPED_HEAD, FALSE);
+-
+- if(pMga->MergedFB && mode && mode->Private && (mode->PrivSize == 0)) {
+- mode = pMga->SecondCrtc ?
+- ((MergedDisplayModePtr)mode->Private)->Monitor2
+- : ((MergedDisplayModePtr)mode->Private)->Monitor1;
+- }
+-
+-
+- if (pMga->pMgaHwInfo)
+- {
+- digital1 = ISDIGITAL1(pMga);
+- digital2 = ISDIGITAL2(pMga);
+- tv1 = ISTV1(pMga);
+- tv2 = ISTV2(pMga);
+- }
+-
+- /*FIXME: causes segfault elsewhere if not commented*/
+- /*if(!pMga->pMgaModeInfo)*/ pMga->pMgaModeInfo = xalloc(sizeof(MGAMODEINFO));
+- pMga->pMgaModeInfo->flOutput = 0;
+- pMga->pMgaModeInfo->ulDeskWidth = pScrn->virtualX;
+- pMga->pMgaModeInfo->ulDeskHeight = pScrn->virtualY;
+- pMga->pMgaModeInfo->ulFBPitch = 0;
+- pMga->pMgaModeInfo->ulBpp = pScrn->bitsPerPixel;
+- pMga->pMgaModeInfo->ulZoom = 1;
+- pMga->pMgaModeInfo->flSignalMode = 0x10;
+-
+- /* Set TV standard */
+- if ((s = xf86GetOptValString(pMga->Options, OPTION_TVSTANDARD))) {
+- if (!xf86NameCmp(s, "PAL")) {
+- pMga->pMgaModeInfo->flSignalMode = 0x00;
+- pMga->pMgaModeInfo->ulRefreshRate = 50;
+- pMga->pMgaModeInfo->ulTVStandard = TV_PAL;
+- } else {
+- pMga->pMgaModeInfo->ulRefreshRate = 60;
+- pMga->pMgaModeInfo->ulTVStandard = TV_NTSC;
+- }
+- } else {
+- pMga->pMgaModeInfo->ulRefreshRate = 0;
+- pMga->pMgaModeInfo->ulTVStandard = TV_NTSC;
+- }
+-
+- /* Set Cable Type */
+- if ((s = xf86GetOptValString(pMga->Options, OPTION_CABLETYPE))) {
+- if (!xf86NameCmp(s, "SCART_RGB")) {
+- pMga->pMgaModeInfo->ulCableType = TV_SCART_RGB;
+- } else if (!xf86NameCmp(s, "SCART_COMPOSITE")) {
+- pMga->pMgaModeInfo->ulCableType = TV_SCART_COMPOSITE;
+- } else if (!xf86NameCmp(s, "SCART_TYPE2")) {
+- pMga->pMgaModeInfo->ulCableType = TV_SCART_TYPE2;
+- } else {
+- pMga->pMgaModeInfo->ulCableType = TV_YC_COMPOSITE;
+- }
+- } else {
+- pMga->pMgaModeInfo->ulCableType = TV_YC_COMPOSITE;
+- }
+-
+- if(mode) {
+- pMga->pMgaModeInfo->ulHorizRate = 0;
+- pMga->pMgaModeInfo->ulDispWidth = mode->HDisplay;
+- pMga->pMgaModeInfo->ulDispHeight = mode->VDisplay;
+- pMga->pMgaModeInfo->ulPixClock = mode->Clock;
+- pMga->pMgaModeInfo->ulHFPorch = mode->HSyncStart - mode->HDisplay;
+- pMga->pMgaModeInfo->ulHSync = mode->HSyncEnd - mode->HSyncStart;
+- pMga->pMgaModeInfo->ulHBPorch = mode->HTotal - mode->HSyncEnd;
+- pMga->pMgaModeInfo->ulVFPorch = mode->VSyncStart - mode->VDisplay;
+- pMga->pMgaModeInfo->ulVSync = mode->VSyncEnd - mode->VSyncStart;
+- pMga->pMgaModeInfo->ulVBPorch = mode->VTotal - mode->VSyncEnd;
+- }
+- /* Use DstOrg directly */
+- /* This is an offset in pixels not memory */
+- pMga->pMgaModeInfo->ulDstOrg = pMga->DstOrg / (pScrn->bitsPerPixel / 8);
+- pMga->pMgaModeInfo->ulDisplayOrg = pMga->DstOrg / (pScrn->bitsPerPixel / 8);
+- pMga->pMgaModeInfo->ulPanXGran = 0;
+- pMga->pMgaModeInfo->ulPanYGran = 0;
+-
+- if(pMga->SecondCrtc == TRUE) {
+- pMga->pMgaModeInfo->flOutput = MGAMODEINFO_SECOND_CRTC |
+- MGAMODEINFO_FORCE_PITCH |
+- MGAMODEINFO_FORCE_DISPLAYORG;
+- if (digital2) {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_DIGITAL2;
+- } else if (tv2) {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_TV;
+- } else {
+- if (!swap_head) {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_ANALOG2;
+- } else {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_ANALOG1;
+- }
+- }
+- } else {
+- pMga->pMgaModeInfo->flOutput = MGAMODEINFO_FORCE_PITCH;
+- if (digital1) {
+- if ((pMga->Chipset == PCI_CHIP_MGAG200) ||
+- (pMga->Chipset == PCI_CHIP_MGAG200_PCI)) {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_FLATPANEL1;
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_DIGITAL2;
+- } else {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_DIGITAL1;
+- }
+- } else if (tv1) {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_TV;
+- } else {
+- if (!swap_head) {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_ANALOG1;
+- } else {
+- pMga->pMgaModeInfo->flOutput |= MGAMODEINFO_ANALOG2;
+- }
+- }
+- }
+- pMga->pMgaModeInfo->ulFBPitch = pScrn->displayWidth;
+-}
+-#endif
-
/*
- * Copyright 2000 Gareth Hughes
- * All Rights Reserved.
+ * Initialise a new mode. This is currently still using the old
+ * "initialise struct, restore/write struct to HW" model. That could
+@@ -3150,9 +2841,6 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ MGAPtr pMga = MGAPTR(pScrn);
+ MGARegPtr mgaReg;
+
+-#ifdef USEMGAHAL
+- ULONG status;
+-#endif
+ vgaHWUnlock(hwp);
+
+ /* if(pMga->MergedFB && mode && mode->Private && (mode->PrivSize == 0)) {
+@@ -3175,56 +2863,6 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ }
+ vgaReg = &hwp->ModeReg;
+ mgaReg = &pMga->ModeReg;
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- MGAFillModeInfoStruct(pScrn,mode);
+-
+- /* Validate the parameters */
+- if ((status = MGAValidateMode(pMga->pBoard, pMga->pMgaModeInfo)) != 0) {
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- "MGAValidateMode from HALlib found the mode to be invalid.\n"
+- "\tError: %lx\n", status);
+- return FALSE;
+- }
+-
+- /*
+- * Find mode for second head.
+- */
+- if(pMga->MergedFB) {
+-
+- MGAFillModeInfoStruct(pMga->pScrn2,mode);
+- /* Validates the Video parameters */
+- if ((status = MGAValidateVideoParameters(pMga->pBoard, MGAPTR(pMga->pScrn2)->pMgaModeInfo))
+- != 0) {
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- "MGAValidateVideoParameters from HALlib found the mode to be invalid.\n\tError: %lx\n", status);
+- return FALSE;
+- }
+- }
+- ); /*MGA_HAL */
+-
+-#endif
+-
+-#ifdef USEMGAHAL
+-MGA_HAL(
+-
+- /*************************** ESC *****************************/
+- TmpMgaModeInfo[0] = *pMga->pMgaModeInfo;
+-
+- if(pMga->SecondCrtc == TRUE)
+- pMgaModeInfo[1] = pMga->pMgaModeInfo;
+- else
+- pMgaModeInfo[0] = pMga->pMgaModeInfo;
+-
+- TmpMgaModeInfo[0].ulDispWidth = 0;
+-
+- if(!pMga->MergedFB) /* FIXME: Must deal with this once PowerDesk & MergedFB
+- compatibility will exist */
+- MGAFillDisplayModeStruct(mode, pMga->pMgaModeInfo);
+- /*************************************************************/
+-
+-); /* MGA_HAL */
+-#endif
+
+ #ifdef XF86DRI
+ if (pMga->directRenderingEnabled) {
+@@ -3232,38 +2870,6 @@ MGA_HAL(
+ }
+ #endif
+
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- /* Initialize the board */
+- if(MGASetMode(pMga->pBoard,pMga->pMgaModeInfo) != 0) {
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- "MGASetMode returned an error."
+- " Make sure to validate the mode before.\n");
+- return FALSE;
+- }
+- if(pMga->MergedFB
+- && MGASetMode(pMga->pBoard,MGAPTR(pMga->pScrn2)->pMgaModeInfo) != 0) {
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- "MGASetMode returned an error."
+- " Make sure to validate the mode before.\n");
+- }
+-
+- ); /* MGA_HAL */
+-
+- /* getting around bugs in the HAL lib. MATROX: hint, hint. */
+- MGA_HAL(
+- if (pMga->chip_attribs->hwcursor_1064) {
+- if(pMga->SecondCrtc == FALSE && pMga->HWCursor == TRUE) {
+- outMGAdac(MGA1064_CURSOR_BASE_ADR_LOW,
+- pMga->FbCursorOffset >> 10);
+- outMGAdac(MGA1064_CURSOR_BASE_ADR_HI,
+- pMga->FbCursorOffset >> 18);
+- outMGAdac(MGA1064_CURSOR_CTL, 0x00);
+- }
+- }
+- ); /* MGA_HAL */
+-#endif
+-
+ MGA_NOT_HAL((*pMga->Restore)(pScrn, vgaReg, mgaReg, FALSE));
+
+ MGAStormSync(pScrn);
+@@ -3472,14 +3078,6 @@ MGARestore(ScrnInfoPtr pScrn)
+ vgaHWProtect(pScrn, TRUE);
+ }
+ if (pMga->Primary) {
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- if(pMga->pBoard != NULL) {
+- MGASetVgaMode(pMga->pBoard);
+- MGARestoreVgaState(pMga->pBoard);
+- }
+- ); /* MGA_HAL */
+-#endif
+ (*pMga->Restore)(pScrn, vgaReg, mgaReg, TRUE);
+ } else {
+ vgaHWRestore(pScrn, vgaReg, VGA_SR_MODE);
+@@ -3588,81 +3186,12 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ pPriv = xf86GetEntityPrivate(pScrn->entityList[0], MGAEntityIndex);
+ pMgaEnt = pPriv->ptr;
+ pMgaEnt->refCount++;
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- if(pMgaEnt->refCount == 1) {
+- CARD8 MiscCtlReg;
+- pMga->pBoard = xalloc(sizeof(CLIENTDATA) + MGAGetBOARDHANDLESize());
+- pMga->pClientStruct = xalloc(sizeof(CLIENTDATA));
+- pMga->pClientStruct->pMga = (MGAPtr) pMga;
+-
+- /* wrapping OpenLibrary to fix broken registers. MATROX: hint,hint.*/
+- MiscCtlReg = inMGAdac(MGA1064_MISC_CTL);
+- MGAOpenLibrary(pMga->pBoard,pMga->pClientStruct,sizeof(CLIENTDATA));
+- outMGAdac(MGA1064_MISC_CTL,MiscCtlReg);
+- pMga->pMgaHwInfo = xalloc(sizeof(MGAHWINFO));
+- MGAGetHardwareInfo(pMga->pBoard,pMga->pMgaHwInfo);
+-
+- /* Detecting for type of display */
+- if (pMga->pMgaHwInfo->ulCapsSecondOutput & MGAHWINFOCAPS_OUTPUT_TV) {
+- xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "TV detected\n");
+- }
+- if (pMga->pMgaHwInfo->ulCapsFirstOutput &
+- MGAHWINFOCAPS_OUTPUT_DIGITAL) {
+- xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
+- "Digital Screen detected\n");
+- }
+- if (pMga->pMgaHwInfo->ulCapsSecondOutput &
+- MGAHWINFOCAPS_OUTPUT_DIGITAL) {
+- xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
+- "Digital Screen detected\n");
+- }
+-
+- /* Now copy these to the entitystructure */
+- pMgaEnt->pClientStruct = pMga->pClientStruct;
+- pMgaEnt->pBoard = pMga->pBoard;
+- pMgaEnt->pMgaHwInfo = pMga->pMgaHwInfo;
+- } else { /* Ref count is 2 */
+- pMga->pClientStruct = pMgaEnt->pClientStruct;
+- pMga->pBoard = pMgaEnt->pBoard;
+- pMga->pMgaHwInfo = pMgaEnt->pMgaHwInfo;
+- }
+- ); /* MGA_HAL */
+-#endif
+ } else {
+-#ifdef USEMGAHAL
+- CARD8 MiscCtlReg;
+-
+- MGA_HAL(
+- pMga->pBoard = xalloc(sizeof(CLIENTDATA) + MGAGetBOARDHANDLESize());
+- pMga->pClientStruct = xalloc(sizeof(CLIENTDATA));
+- pMga->pClientStruct->pMga = (MGAPtr) pMga;
+-
+- MiscCtlReg = inMGAdac(MGA1064_MISC_CTL);
+- /* wrapping OpenLibrary to fix broken registers. MATROX: hint,hint.*/
+- MGAOpenLibrary(pMga->pBoard,pMga->pClientStruct,sizeof(CLIENTDATA));
+- outMGAdac(MGA1064_MISC_CTL,MiscCtlReg);
+- pMga->pMgaHwInfo = xalloc(sizeof(MGAHWINFO));
+- MGAGetHardwareInfo(pMga->pBoard,pMga->pMgaHwInfo);
+- ); /* MGA_HAL */
+-#endif
+ }
+ if (pMga->is_G200SE) {
+ pScrn->videoRam = VRTemp;
+ pMga->FbMapSize = FBTemp;
+ }
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- /* There is a problem in the HALlib: set soft reset bit */
+- /* MATROX: hint, hint. */
+- if (!pMga->Primary && !pMga->FBDev &&
+- (SUBSYS_ID(pMga->PciInfo) == PCI_CARD_MILL_G200_SG)) {
+- OUTREG(MGAREG_Reset, 1);
+- usleep(200);
+- OUTREG(MGAREG_Reset, 0);
+- }
+- ); /* MGA_HAL */
+-#endif
+
+ /* Initialise the MMIO vgahw functions */
+ vgaHWSetMmioFuncs(hwp, pMga->IOBase, PORT_OFFSET);
+@@ -3969,66 +3498,8 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ Bool
+ MGASwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+ {
+-#ifdef USEMGAHAL
+- char sCmdIn[256];
+- char sCmdOut[256];
+- FILE* fdIn;
+-# ifdef MATROX_WRITEBACK
+- FILE* fdOut;
+-# endif
+-#endif
+
+ if (mode->Flags & 0x80000000) {
+-#ifdef USEMGAHAL
+-
+-# ifdef MATROX_WRITEBACK
+-# define MWB(x) { x; }
+-# define MWB_COND(x) x
+-# else
+-# define MWB(x)
+-# define MWB_COND(x) 1
+-# endif
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+-
+- MGA_HAL(
+- fdIn = fopen("/tmp/mgaDriverIn", "rt");
+- MWB(fdOut = fopen("/tmp/mgaDriverOut", "wt"))
+-
+- if(fdIn && MWB_COND(fdOut))
+- {
+-
+- fgets(sCmdIn, 255, fdIn);
+-
+- if(sCmdIn)
+- {
+-
+- MGAExecuteEscCmd(xf86Screens[scrnIndex], sCmdIn, sCmdOut, mode);
+-
+- /* Remove file and close file descriptor */
+- remove("/tmp/mgaDriverIn");
+- fclose(fdIn);
+- MWB(
+- /* Write output data to output file for
+- calling application */
+- fputs(sCmdOut, fdOut);
+- fclose(fdOut);
+- )
+- mode->Flags &= 0x7FFFFFFF;
+- return TRUE;
+- }
+- else
+- {
+- mode->Flags &= 0x7FFFFFFF;
+- return FALSE;
+- }
+- }
+- else
+- {
+- mode->Flags &= 0x7FFFFFFF;
+- return FALSE;
+- }
+- )
+-#endif
+ return FALSE;
+ } else
+ return MGAModeInit(xf86Screens[scrnIndex], mode);
+@@ -4040,28 +3511,6 @@ MGASwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+ void
+ MGAAdjustGranularity(ScrnInfoPtr pScrn, int* x, int* y)
+ {
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- MGAPtr pMga = MGAPTR(pScrn);
+- MGAPtr pMga2;
+- int xg = 1;
+- int yg = 1;
+- if(pMga->pMgaModeInfo && pMga->pMgaModeInfo->ulPanXGran && pMga->pMgaModeInfo->ulPanYGran) {
+- xg = pMga->pMgaModeInfo->ulPanXGran;
+- yg = pMga->pMgaModeInfo->ulPanYGran;
+- }
+- if(pMga->pScrn2 && (pMga2 = MGAPTR(pMga->pScrn2)) ) {
+-
+- if(pMga2->pMgaModeInfo && pMga2->pMgaModeInfo->ulPanXGran && pMga2->pMgaModeInfo->ulPanYGran) {
+- xg = max(xg,pMga2->pMgaModeInfo->ulPanXGran);
+- yg = max(yg,pMga2->pMgaModeInfo->ulPanYGran);
+- }
+- }
+- xg=16; /*ncoder: temporary */
+- *x -= *x % xg;
+- *y -= *y % yg;
+- );
+-#endif
+ }
+
+
+@@ -4087,16 +3536,6 @@ MGAAdjustFrame(int scrnIndex, int x, int y, int flags)
+ /* wanted to improve panning granularity problems without risking
+ * compatibility issues. Existing code looked hardware dependent.
+ */
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- pMga->HALGranularityOffX = x;
+- pMga->HALGranularityOffY = y;
+- MGAAdjustGranularity(pScrn,&x,&y);
+- pMga->HALGranularityOffX = pMga->HALGranularityOffX - x;
+- pMga->HALGranularityOffY = pMga->HALGranularityOffY - y;
+- HALSetDisplayStart(pMga->pBoard,x,y,0);
+- );
+-#endif
+ MGA_NOT_HAL(
+ if(pMga->ShowCache && y && pScrn->vtSema)
+ y += pScrn->virtualY - 1;
+@@ -4139,12 +3578,6 @@ MGAAdjustFrameCrtc2(int scrnIndex, int x, int y, int flags)
+ pScrn = xf86Screens[scrnIndex];
+ pMga = MGAPTR(pScrn);
+ pLayout = &pMga->CurrentLayout;
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- MGAAdjustGranularity(pScrn,&x,&y);
+- HALSetDisplayStart(pMga->pBoard,x,y,1);
+- );
+-#endif
+ MGA_NOT_HAL(
+ if(pMga->ShowCache && y && pScrn->vtSema)
+ y += pScrn->virtualY - 1;
+@@ -4258,9 +3691,6 @@ MGALeaveVT(int scrnIndex, int flags)
+ DRILock(pScreen, 0);
+ }
+ #endif
+-#ifdef USEMGAHAL
+- MGA_HAL( RESTORE_TEXTMODE_ON_DVI(pMga); );
+-#endif
+ }
+
+
+@@ -4280,9 +3710,6 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
+ MGAPtr pMga = MGAPTR(pScrn);
+ MGAEntPtr pMgaEnt = NULL;
+
+-#ifdef USEMGAHAL
+- MGA_HAL( RESTORE_TEXTMODE_ON_DVI(pMga); );
+-#endif
+ if (pMga->MergedFB)
+ MGACloseScreenMerged(scrnIndex, pScreen);
+
+@@ -4311,37 +3738,6 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
+ pMgaEnt->refCount--;
+ }
+
+-#ifdef USEMGAHAL
+- MGA_HAL(
+- if(pMga->DualHeadEnabled) {
+- if(pMgaEnt->refCount == 0) {
+- /* Both boards have closed there screen */
+- MGACloseLibrary(pMga->pBoard);
+-
+- if (pMga->pBoard)
+- xfree(pMga->pBoard);
+- if (pMga->pClientStruct)
+- xfree(pMga->pClientStruct);
+- if (pMga->pMgaModeInfo)
+- xfree(pMga->pMgaModeInfo);
+- if (pMga->pMgaHwInfo)
+- xfree(pMga->pMgaHwInfo);
+- }
+- } else {
+- MGACloseLibrary(pMga->pBoard);
+-
+- if (pMga->pBoard)
+- xfree(pMga->pBoard);
+- if (pMga->pClientStruct)
+- xfree(pMga->pClientStruct);
+- if (pMga->pMgaModeInfo)
+- xfree(pMga->pMgaModeInfo);
+- if (pMga->pMgaHwInfo)
+- xfree(pMga->pMgaHwInfo);
+- }
+- ); /* MGA_HAL */
+-#endif
+-
+ #ifdef USE_XAA
+ if (pMga->AccelInfoRec)
+ XAADestroyInfoRec(pMga->AccelInfoRec);
+diff --git a/src/mga_esc.c b/src/mga_esc.c
+index e811712..41b734a 100644
+--- a/src/mga_esc.c
++++ b/src/mga_esc.c
+@@ -10,782 +10,4 @@
+ #include "config.h"
+ #endif
+
+-#ifdef USEMGAHAL
+-
+-/* All drivers should typically include these */
+-#include "xf86.h"
+-#include "xf86_OSproc.h"
+-
+-/* All drivers need this */
+-
+-#include "compiler.h"
+-
+-/* Drivers for PCI hardware need this */
+-#include "xf86PciInfo.h"
+-
+-/* Drivers that need to access the PCI config space directly need this */
+-#include "xf86Pci.h"
+-
+-/* All drivers initialising the SW cursor need this */
+-#include "mipointer.h"
+-
+-/* All drivers implementing backing store need this */
+-#include "mibstore.h"
+-
+-#include "micmap.h"
+-
+-#include "xf86DDC.h"
+-#include "vbe.h"
+-
+-#include "fb.h"
+-#include "dixstruct.h"
+-
+-#include "mga_reg.h"
+-#include "mga.h"
+-#include "mga_macros.h"
+-
+-/* ESC */
+-LPMGAMODEINFO pMgaModeInfo[2] = {NULL};
+-MGAMODEINFO TmpMgaModeInfo[2] = {{0}};
+-
+-/* ESC Implementation */
+-static void EscHLeft(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscHRight(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscVUp(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscVDown(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscHLarger(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscHSmaller(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscVTaller(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscVSmaller(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscRefresh(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscRestoreVidParm(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscRead(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscWrite(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscHal(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscTest(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-static void EscMerged(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode);
+-
+-static LPMGAMODEINFO GetModeInfoPtr(ULONG ulScreen);
+-static void GetVideoParameterStr(LPMGAMODEINFO pModeInfo, char *sResult);
+-static Bool convertNumber(unsigned long *pulNumber, char *sNumber);
+-
+-
+-static MGAEscFuncRec FunctionTable[] = {
+- {"hal", EscHal},
+- {"test", EscTest},
+- {"read", EscRead},
+- {"write", EscWrite},
+- {"left", EscHLeft},
+- {"right", EscHRight},
+- {"down", EscVDown},
+- {"up", EscVUp},
+- {"h+", EscHLarger},
+- {"h-", EscHSmaller},
+- {"v+", EscVTaller},
+- {"v-", EscVSmaller},
+- {"refresh", EscRefresh},
+- {"undo", EscRestoreVidParm},
+- {"merged", EscMerged},
+- {NULL,NULL}
+-};
+-
+-
+-void MGAFillDisplayModeStruct(DisplayModePtr pMode, LPMGAMODEINFO pModeInfo)
+-{
+- pMode->Clock = pModeInfo->ulPixClock;
+-
+- pMode->HDisplay = pModeInfo->ulDispWidth;
+- pMode->HSyncStart = pModeInfo->ulDispWidth
+- + pModeInfo->ulHFPorch;
+- pMode->HSyncEnd = pModeInfo->ulDispWidth
+- + pModeInfo->ulHFPorch
+- + pModeInfo->ulHSync;
+- pMode->HTotal = pModeInfo->ulDispWidth
+- + pModeInfo->ulHFPorch
+- + pModeInfo->ulHSync
+- + pModeInfo->ulHBPorch;
+-
+- pMode->VDisplay = pModeInfo->ulDispHeight;
+- pMode->VSyncStart = pModeInfo->ulDispHeight
+- + pModeInfo->ulVFPorch;
+- pMode->VSyncEnd = pModeInfo->ulDispHeight
+- + pModeInfo->ulVFPorch
+- + pModeInfo->ulVSync;
+- pMode->VTotal = pModeInfo->ulDispHeight
+- + pModeInfo->ulVFPorch
+- + pModeInfo->ulVSync
+- + pModeInfo->ulVBPorch;
+-
+- pMode->VRefresh = pModeInfo->ulRefreshRate;
+-}
+-
+-static LPMGAMODEINFO GetModeInfoPtr(ULONG ulScreen)
+-{
+-
+- if ( !TmpMgaModeInfo[ulScreen].ulDispWidth )
+- {
+- TmpMgaModeInfo[ulScreen] = *pMgaModeInfo[ulScreen];
+- }
+-
+- return &TmpMgaModeInfo[ulScreen];
+-}
+-
+-
+-static void GetVideoParameterStr(LPMGAMODEINFO pModeInfo, char *sResult)
+-{
+- sprintf(sResult, "%d %d %d %d %d %d %d %d %d %d %d",
+- pModeInfo->ulDispWidth,
+- pModeInfo->ulDispHeight,
+- pModeInfo->ulBpp,
+- pModeInfo->ulPixClock,
+- pModeInfo->ulHFPorch,
+- pModeInfo->ulHSync,
+- pModeInfo->ulHBPorch,
+- pModeInfo->ulVFPorch,
+- pModeInfo->ulVSync,
+- pModeInfo->ulVBPorch,
+- pModeInfo->flSignalMode);
+-}
+-
+-
+-static float GetVRefresh(LPMGAMODEINFO pModeInfo)
+-{
+- ULONG ulHTotal;
+- ULONG ulVTotal;
+-
+- ulHTotal =
+- pModeInfo->ulDispWidth +
+- pModeInfo->ulHFPorch +
+- pModeInfo->ulHSync +
+- pModeInfo->ulHBPorch;
+-
+- ulVTotal =
+- pModeInfo->ulDispHeight +
+- pModeInfo->ulVFPorch +
+- pModeInfo->ulVSync +
+- pModeInfo->ulVBPorch;
+-
+- return ((float)pModeInfo->ulPixClock * 1000.0) / (ulHTotal * ulVTotal);
+-}
+-
+-static void EscHal(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMGA = MGAPTR(pScrn);
+-
+- if(pMGA->HALLoaded)
+- strcpy(sResult, "YES");
+- else
+- strcpy(sResult, "NO");
+-
+-}
+-
+-static void EscTest(ScrnInfoPtr pScrn, unsigned long *param, char
+-*sResult, DisplayModePtr pMode)
+-{
+- strcpy(sResult, "YES");
+-}
+-
+-static void EscMerged(ScrnInfoPtr pScrn, unsigned long *param, char
+-*sResult, DisplayModePtr pMode)
+-{
+- strcpy(sResult, "YES");
+-}
+-
+-static void EscRead(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- ULONG ulSource, ulAddr, ulData;
+- UCHAR ucIndex;
+-
+- if ( (param[0] & 0xffff) < 2 )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+-
+- ulSource = param[1] >> 16;
+- ulAddr = param[1] & 0xffff;
+-
+-
+- switch( ulSource )
+- {
+- case 0:
+- ulData = INREG(ulAddr);
+- sprintf(sResult, "MGA[%04X] = 0x%08X", ulAddr, ulData);
+- break;
+- case 1:
+- ucIndex = INREG8(0x3c00);
+- OUTREG8(0x3c00, (UCHAR)ulAddr);
+- ulData = (ULONG)INREG8(0x3c0a);
+- OUTREG8(0x3c00, ucIndex);
+- sprintf(sResult, "DAC[%02X] = 0x%02X", ulAddr, ulData);
+- break;
+- case 2:
+- ucIndex = INREG8(0x1fd4);
+- OUTREG8(0x1fd4, (UCHAR)ulAddr);
+- ulData = (ULONG)INREG8(0x1fd5);
+- OUTREG8(0x1fd4, ucIndex);
+- sprintf(sResult, "CRTC[%02X] = 0x%02X", ulAddr, ulData);
+- break;
+- case 3:
+- ucIndex = INREG8(0x1fde);
+- OUTREG8(0x1fde, (UCHAR)ulAddr);
+- ulData = (ULONG)INREG8(0x1fdf);
+- OUTREG8(0x1fde, ucIndex);
+- sprintf(sResult, "CRTCEXT[%02X] = 0x%02X", ulAddr, ulData);
+- break;
+- default:
+- strcpy(sResult, "ERROR# 2");
+- break;
+- }
+-}
+-
+-static void EscWrite(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- ULONG ulSource, ulAddr, ulData;
+- UCHAR ucIndex;
+-
+- if ( (param[0] & 0xffff) < 3 )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- ulSource = param[1] >> 16;
+- ulAddr = param[1] & 0xffff;
+- ulData = param[2];
+-
+-
+- switch( ulSource )
+- {
+- case 0:
+- OUTREG(ulAddr, ulData);
+- strcpy(sResult, "OK");
+- break;
+- case 1:
+- ucIndex = INREG8(0x3c00);
+- OUTREG8(0x3c00, (UCHAR)ulAddr);
+- OUTREG8(0x3c0a, (UCHAR)ulData);
+- OUTREG8(0x3c00, ucIndex);
+- strcpy(sResult, "OK");
+- break;
+- case 2:
+- ucIndex = INREG8(0x1fd4);
+- OUTREG8(0x1fd4, (UCHAR)ulAddr);
+- OUTREG8(0x1fd5, (UCHAR)ulData);
+- OUTREG8(0x1fd4, ucIndex);
+- strcpy(sResult, "OK");
+- break;
+- case 3:
+- ucIndex = INREG8(0x1fde);
+- OUTREG8(0x1fde, (UCHAR)ulAddr);
+- OUTREG8(0x1fdf, (UCHAR)ulData);
+- OUTREG8(0x1fde, ucIndex);
+- strcpy(sResult, "OK");
+- break;
+- default:
+- strcpy(sResult, "ERROR# 2");
+- break;
+- }
+-}
+-
+-static void EscHLeft(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+-
+- if (pModeInfo->ulHBPorch > (8 * param[1]) )
+- {
+- pModeInfo->ulHBPorch -=8 * param[1];
+- pModeInfo->ulHFPorch +=8 * param[1];
+- MGASetMode(pMga->pBoard, pModeInfo);
+- }
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-
+-static void EscHRight(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- if (pModeInfo->ulHFPorch > (8 * param[1]) )
+- {
+- pModeInfo->ulHFPorch -=8 * param[1];
+- pModeInfo->ulHBPorch +=8 * param[1];
+- MGASetMode(pMga->pBoard, pModeInfo);
+- }
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-
+-
+-static void EscVUp(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- if (pModeInfo->ulVBPorch > (param[1]) )
+- {
+- pModeInfo->ulVBPorch -= param[1];
+- pModeInfo->ulVFPorch += param[1];
+- MGASetMode(pMga->pBoard, pModeInfo);
+- }
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-
+-static void EscVDown(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- if (pModeInfo->ulVFPorch >= (param[1]) )
+- {
+- pModeInfo->ulVFPorch -= param[1];
+- pModeInfo->ulVBPorch += param[1];
+- MGASetMode(pMga->pBoard, pModeInfo);
+- }
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-
+-static void EscHLarger(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+- float fRefresh, fPixelClock;
+- ULONG ulStep;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- if ((param[0] & 0xffff) > 1)
+- {
+-
+- ulStep = param[1] * 8;
+- }
+- else
+- {
+-
+- ulStep = 8;
+- }
+-
+- fRefresh = GetVRefresh(pModeInfo);
+- fPixelClock = (float)pModeInfo->ulPixClock;
+- if (pModeInfo->ulHBPorch >= ulStep )
+- {
+- pModeInfo->ulHBPorch -= ulStep;
+- }
+- else
+- {
+- pModeInfo->ulHBPorch = 0;
+- }
+- pModeInfo->ulPixClock = (ULONG)( (fRefresh * fPixelClock) / GetVRefresh(pModeInfo));
+- MGASetMode(pMga->pBoard, pModeInfo);
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-
+-static void EscHSmaller(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+- float fRefresh, fPixelClock;
+- ULONG ulStep;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- if ((param[0] & 0xffff) > 1)
+- {
+-
+- ulStep = param[1] * 8;
+- }
+- else
+- {
+-
+- ulStep = 8;
+- }
+-
+-
+- fRefresh = GetVRefresh(pModeInfo);
+- fPixelClock = (float)pModeInfo->ulPixClock;
+- pModeInfo->ulHBPorch += ulStep;
+- pModeInfo->ulPixClock = (ULONG)( (fRefresh * fPixelClock) / GetVRefresh(pModeInfo));
+-
+- MGASetMode(pMga->pBoard, pModeInfo);
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-static void EscVTaller(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+- float fRefresh, fPixelClock;
+- ULONG ulStep;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- if ((param[0] & 0xffff) > 1)
+- {
+-
+- ulStep = param[1];
+- }
+- else
+- {
+-
+- ulStep = 1;
+- }
+-
+- fRefresh = GetVRefresh(pModeInfo);
+- fPixelClock = (float)pModeInfo->ulPixClock;
+-
+- if (pModeInfo->ulVBPorch >= ulStep )
+- {
+- pModeInfo->ulVBPorch -= ulStep;
+- }
+- else
+- {
+- pModeInfo->ulVBPorch = 0;
+- }
+-
+- pModeInfo->ulPixClock = (ULONG)( (fRefresh * fPixelClock) / GetVRefresh(pModeInfo));
+- MGASetMode(pMga->pBoard, pModeInfo);
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-static void EscVSmaller(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+- float fRefresh, fPixelClock;
+- ULONG ulStep;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- if ((param[0] & 0xffff) > 1)
+- {
+-
+- ulStep = param[1];
+- }
+- else
+- {
+-
+- ulStep = 1;
+- }
+-
+-
+- fRefresh = GetVRefresh(pModeInfo);
+- fPixelClock = (float)pModeInfo->ulPixClock;
+- pModeInfo->ulVFPorch += ulStep;
+- pModeInfo->ulPixClock = (ULONG)( (fRefresh * fPixelClock) / GetVRefresh(pModeInfo));
+- MGASetMode(pMga->pBoard, pModeInfo);
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-
+-static void EscRefresh(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+- LPMGAMODEINFO pModeInfo;
+- float fRefresh, fPixelClock;
+-
+- pModeInfo = GetModeInfoPtr(param[0] >> 16);
+-
+- if ( !pMgaModeInfo )
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- if ((param[0] & 0xffff) < 2)
+- {
+- strcpy(sResult, "#error 1");
+- return;
+- }
+-
+- fRefresh = GetVRefresh(pModeInfo);
+-
+- fPixelClock = (float)pModeInfo->ulPixClock;
+- pModeInfo->ulPixClock = (ULONG)( ((float)param[1] * fPixelClock) / fRefresh);
+-
+- pModeInfo->ulRefreshRate = param[1];
+-
+- MGASetMode(pMga->pBoard, pModeInfo);
+-
+- MGAFillDisplayModeStruct(pMode, pModeInfo);
+-
+- GetVideoParameterStr(pModeInfo, sResult);
+-}
+-
+-static void EscRestoreVidParm(ScrnInfoPtr pScrn, unsigned long *param, char *sResult, DisplayModePtr pMode)
+-{
+- MGAPtr pMga = MGAPTR(pScrn);
+-
+- TmpMgaModeInfo[param[0] >> 16].ulDispWidth = 0;
+- MGASetMode(pMga->pBoard, pMgaModeInfo[param[0] >> 16]);
+-
+- MGAFillDisplayModeStruct(pMode, pMgaModeInfo[param[0] >> 16]);
+-
+- GetVideoParameterStr(pMgaModeInfo[param[0] >> 16], sResult);
+-}
+-
+-static Bool convertNumber(unsigned long *pulNumber, char *sNumber)
+-{
+- unsigned long i, ulDigit, shiftHex;
+- Bool bResult = TRUE;
+-
+- if (sNumber == NULL)
+- {
+- return FALSE;
+- }
+-
+-
+- /* Convert number */
+- if ( (sNumber[0] == '0') && (sNumber[1] == 'x') )
+- {
+- shiftHex = 0;
+- *pulNumber = 0;
+-
+- for (i = strlen(sNumber) - 1; i > 1; i--)
+- {
+- if (shiftHex > 28)
+- {
+- bResult = FALSE;
+- break;
+- }
+-
+- if ( !isxdigit(sNumber[i]) )
+- {
+- bResult = FALSE;
+- break;
+- }
+-
+- ulDigit = toupper(sNumber[i]) - '0';
+- if (ulDigit > 9)
+- {
+- ulDigit -= 7;
+- }
+- *pulNumber += ulDigit << shiftHex;
+- shiftHex += 4;
+- }
+- }
+- else
+- {
+- for (i = 0; i < strlen(sNumber); i++)
+- {
+- if ( !isdigit(sNumber[i]) )
+- {
+- bResult = FALSE;
+- break;
+- }
+- }
+- *pulNumber = atoi(sNumber);
+- }
+-
+- return bResult;
+-}
+-
+-static Bool GetEscCommand(char *cmdline, EscCmdStruct *escCmd)
+-{
+- unsigned long i, paramIndex, ulHI;
+- Bool bResult;
+- char *pParameter, *function;
+-
+- bResult = TRUE; /* success */
+-
+- function = strtok(cmdline, " \t\n,");
+-
+-
+- escCmd->parameters[0] = 0;
+- if (function)
+- {
+- /* Find Screen */
+- if (function[1] == ':' )
+- {
+- escCmd->parameters[0] = (unsigned long)(function[0] - '0') << 16;
+- strncpy(escCmd->function, function+2, 32);
+- }
+- else
+- {
+- strncpy(escCmd->function, function, 32);
+- }
+-
+- }
+- else
+- {
+- strcpy(escCmd->function, "#ERROR -1");
+- escCmd->parameters[0] = 0;
+- return FALSE;
+- }
+-
+- paramIndex = 1;
+- while ( (pParameter = strtok(NULL, " \t\n,")) != NULL )
+- {
+- if (paramIndex > 31)
+- {
+- /* 32 parameters supported */
+- break;
+- }
+-
+- i = 0;
+- while(pParameter[i] && pParameter[i] != ':')
+- {
+- i++;
+- }
+-
+- if ( pParameter[i] )
+- {
+- pParameter[i] = '\0';
+- bResult = convertNumber(&escCmd->parameters[paramIndex], &pParameter[i+1]);
+- bResult |= convertNumber(&ulHI, pParameter);
+- escCmd->parameters[paramIndex] &= 0xffff;
+- escCmd->parameters[paramIndex] += ulHI << 16;
+- pParameter[i] = ':';
+- }
+- else
+- {
+- bResult = convertNumber(&escCmd->parameters[paramIndex], pParameter);
+- }
+-
+-
+- if (!bResult)
+- {
+- break;
+- }
+- paramIndex++;
+- }
+-
+- escCmd->parameters[0] += paramIndex;
+- return bResult;
+-
+-}
+-
+-void MGAExecuteEscCmd(ScrnInfoPtr pScrn, char *cmdline , char *sResult, DisplayModePtr pMode)
+-{
+- int i = 0;
+- int ulScreen = 0;
+- MGAPtr pMga = MGAPTR(pScrn);
+- EscCmdStruct EscCmd;
+-
+- if (pMga->SecondCrtc)
+- {
+- ulScreen = 1;
+- }
+- else
+- {
+- ulScreen = 0;
+- }
+-
+-
+- if (FunctionTable[0].function && GetEscCommand(cmdline, &EscCmd) )
+- {
+- i = 0;
+-
+- while ( FunctionTable[i].function && strcmp(FunctionTable[i].function, EscCmd.function) )
+- {
+- i++;
+- }
+-
+- if (FunctionTable[i].function)
+- {
+- EscCmd.parameters[0] &= 0xffff;
+- EscCmd.parameters[0] |= ulScreen << 16;
+-
+- FunctionTable[i].funcptr(pScrn, EscCmd.parameters, sResult, pMode);
+- }
+- else
+- {
+- strcpy(sResult, "error# -1");
+- }
+- }
+- else
+- {
+- strcpy(sResult, "error# -1");
+- }
+-}
+-#else
+ int mga_foo;
+-#endif
+diff --git a/src/mga_macros.h b/src/mga_macros.h
+index bffd063..130651d 100644
+--- a/src/mga_macros.h
++++ b/src/mga_macros.h
+@@ -74,18 +74,7 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \
+ #define CHECK_DMA_QUIESCENT(pMGA, pScrn)
+ #endif
+
+-#ifdef USEMGAHAL
+-#define MGA_HAL(x) { \
+- MGAPtr pMga = MGAPTR(pScrn); \
+- if (pMga->HALLoaded && pMga->chip_attribs->HAL_chipset) { x; } \
+-}
+-#define MGA_NOT_HAL(x) { \
+- MGAPtr pMga = MGAPTR(pScrn); \
+- if (!pMga->HALLoaded || !pMga->chip_attribs->HAL_chipset) { x; } \
+-}
+-#else
+ #define MGA_NOT_HAL(x) { x; }
+-#endif
+
+ #define MGAISGx50(x) ((x)->is_Gx50)
+
+diff --git a/src/mga_merge.c b/src/mga_merge.c
+index 1fd0572..2affe3b 100644
+--- a/src/mga_merge.c
++++ b/src/mga_merge.c
+@@ -236,9 +236,6 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ int i;
+ char* s;
+ ClockRangePtr clockRanges;
+-#ifdef USEMGAHAL
+- ULONG status;
+-#endif
+ MgaScrn2Rel Monitor2Pos;
+
+ xf86DrvMsg(pScrn1->scrnIndex, X_INFO, "==== Start of second screen initialization ====\n");
+@@ -252,9 +249,6 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ }
+
+ pMga = MGAPTR(pScrn);
+-#ifdef USEMGAHAL
+- pMga->pMgaModeInfo = NULL; /*will be allocated later if NULL*/
+-#endif
+ pMga1 = MGAPTR(pScrn1);
+ pMga1->pScrn2 = pScrn;
+
+@@ -456,10 +450,6 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ clockRanges->clockIndex = -1; /* programmable */
+ clockRanges->interlaceAllowed = TRUE;
+ clockRanges->doubleScanAllowed = TRUE;
+-#ifdef USEMGAHAL
+- MGA_HAL(clockRanges->interlaceAllowed = FALSE);
+- MGA_HAL(clockRanges->doubleScanAllowed = FALSE);
+-#endif
+ clockRanges->interlaceAllowed = FALSE; /*no interlace on CRTC2 */
+
+ clockRanges->ClockMulFactor = 1;
+@@ -562,30 +552,6 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ MGAFreeRec(pScrn);
+ return FALSE;
+ }
+-#ifdef USEMGAHAL
+- MGA_HAL(
+-
+- pMga->pBoard = pMga1->pBoard;
+- pMga->pClientStruct = pMga1->pClientStruct;
+- pMga->pMgaHwInfo = pMga1->pMgaHwInfo;
+-
+-
+- MGAFillModeInfoStruct(pScrn,NULL);
+- /* Fields usually handled by MGAFillModeInfoStruct, but are unavailable
+- * because no mode is given
+- */
+- pMga->pMgaModeInfo->ulDispWidth = pScrn->virtualX;
+- pMga->pMgaModeInfo->ulDispHeight = pScrn->virtualY;
+-
+- if((status = MGAValidateMode(pMga->pBoard,pMga->pMgaModeInfo)) != 0) {
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+- "MGAValidateMode from HALlib found the mode to be invalid.\n"
+- "\tError: 0x%lx\n", status);
+- return FALSE;
+- }
+- pScrn->displayWidth = pMga->pMgaModeInfo->ulFBPitch;
+- ); /* MGA_HAL */
+-#endif
+
+ /*
+ * Set the CRTC parameters for all of the modes based on the type
+@@ -595,9 +561,6 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ * driver and if the driver doesn't provide code to set them. They
+ * are not pre-initialised at all.
+ */
+-#ifdef USEMGAHAL
+- MGA_HAL(xf86SetCrtcForModes(pScrn, 0));
+-#endif
+ MGA_NOT_HAL(xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V));
+
+ /* Set the current mode to the first in the list */
+--
+cgit v0.9.0.2-2-gbebe
+From ee09a9a340f8946f2d4a71a431b64189dbb5c256 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 27 Sep 2011 02:22:09 +0000
+Subject: Remove xalloc/xcalloc/xrealloc/xfree
+
+Reviewed-by: Jamey Sharp <jamey@minilop.net>
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+diff --git a/src/mga_dga.c b/src/mga_dga.c
+index d43b96d..224e4ba 100644
+--- a/src/mga_dga.c
++++ b/src/mga_dga.c
+@@ -111,7 +111,7 @@ SECOND_PASS:
+ if(secondPitch)
+ pitch = secondPitch;
+
+- if(!(newmodes = xrealloc(modes, (*num + 1) * sizeof(DGAModeRec))))
++ if(!(newmodes = realloc(modes, (*num + 1) * sizeof(DGAModeRec))))
+ break;
+
+ modes = newmodes;
+diff --git a/src/mga_dri.c b/src/mga_dri.c
+index 14f342f..957c6df 100644
+--- a/src/mga_dri.c
++++ b/src/mga_dri.c
+@@ -91,24 +91,24 @@ static Bool MGAInitVisualConfigs( ScreenPtr pScreen )
+ case 16:
+ numConfigs = 8;
+
+- pConfigs = (__GLXvisualConfig*)xcalloc( sizeof(__GLXvisualConfig),
++ pConfigs = (__GLXvisualConfig*)calloc( sizeof(__GLXvisualConfig),
+ numConfigs );
+ if ( !pConfigs ) {
+ return FALSE;
+ }
+
+- pMGAConfigs = (MGAConfigPrivPtr)xcalloc( sizeof(MGAConfigPrivRec),
++ pMGAConfigs = (MGAConfigPrivPtr)calloc( sizeof(MGAConfigPrivRec),
+ numConfigs );
+ if ( !pMGAConfigs ) {
+- xfree( pConfigs );
++ free(pConfigs);
+ return FALSE;
+ }
+
+- pMGAConfigPtrs = (MGAConfigPrivPtr*)xcalloc( sizeof(MGAConfigPrivPtr),
++ pMGAConfigPtrs = (MGAConfigPrivPtr*)calloc( sizeof(MGAConfigPrivPtr),
+ numConfigs );
+ if ( !pMGAConfigPtrs ) {
+- xfree( pConfigs );
+- xfree( pMGAConfigs );
++ free(pConfigs);
++ free(pMGAConfigs);
+ return FALSE;
+ }
+
+@@ -182,24 +182,24 @@ static Bool MGAInitVisualConfigs( ScreenPtr pScreen )
+ case 32:
+ numConfigs = 8;
+
+- pConfigs = (__GLXvisualConfig*)xcalloc( sizeof(__GLXvisualConfig),
++ pConfigs = (__GLXvisualConfig*)calloc( sizeof(__GLXvisualConfig),
+ numConfigs );
+ if ( !pConfigs ) {
+ return FALSE;
+ }
+
+- pMGAConfigs = (MGAConfigPrivPtr)xcalloc( sizeof(MGAConfigPrivRec),
++ pMGAConfigs = (MGAConfigPrivPtr)calloc( sizeof(MGAConfigPrivRec),
+ numConfigs );
+ if ( !pMGAConfigs ) {
+- xfree( pConfigs );
++ free(pConfigs);
+ return FALSE;
+ }
+
+- pMGAConfigPtrs = (MGAConfigPrivPtr*)xcalloc( sizeof(MGAConfigPrivPtr),
++ pMGAConfigPtrs = (MGAConfigPrivPtr*)calloc( sizeof(MGAConfigPrivPtr),
+ numConfigs );
+ if ( !pMGAConfigPtrs ) {
+- xfree( pConfigs );
+- xfree( pMGAConfigs );
++ free(pConfigs);
++ free(pMGAConfigs);
+ return FALSE;
+ }
+
+@@ -973,11 +973,11 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
+
+ if (nbox>1) {
+ /* Keep ordering in each band, reverse order of bands */
+- pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox);
++ pboxNew1 = (BoxPtr)malloc(sizeof(BoxRec)*nbox);
+ if (!pboxNew1) return;
+- pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox);
++ pptNew1 = (DDXPointPtr)malloc(sizeof(DDXPointRec)*nbox);
+ if (!pptNew1) {
+- xfree(pboxNew1);
++ free(pboxNew1);
+ return;
+ }
+ pboxBase = pboxNext = pbox+nbox-1;
+@@ -1008,14 +1008,14 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
+
+ if (nbox > 1) {
+ /*reverse orderof rects in each band */
+- pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox);
+- pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox);
++ pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec)*nbox);
++ pptNew2 = (DDXPointPtr)malloc(sizeof(DDXPointRec)*nbox);
+ if (!pboxNew2 || !pptNew2) {
+- if (pptNew2) xfree(pptNew2);
+- if (pboxNew2) xfree(pboxNew2);
++ if (pptNew2) free(pptNew2);
++ if (pboxNew2) free(pboxNew2);
+ if (pboxNew1) {
+- xfree(pptNew1);
+- xfree(pboxNew1);
++ free(pptNew1);
++ free(pboxNew1);
+ }
+ return;
+ }
+@@ -1066,12 +1066,12 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
+ MGASelectBuffer(pScrn, MGA_FRONT);
+
+ if (pboxNew2) {
+- xfree(pptNew2);
+- xfree(pboxNew2);
++ free(pptNew2);
++ free(pboxNew2);
+ }
+ if (pboxNew1) {
+- xfree(pptNew1);
+- xfree(pboxNew1);
++ free(pptNew1);
++ free(pboxNew1);
+ }
+
+ pMga->AccelInfoRec->NeedToSync = TRUE;
+@@ -1150,7 +1150,7 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
+ if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
+ pDRIInfo->busIdString = DRICreatePCIBusID(pMga->PciInfo);
+ } else {
+- pDRIInfo->busIdString = xalloc(64);
++ pDRIInfo->busIdString = malloc(64);
+ sprintf( pDRIInfo->busIdString, "PCI:%d:%d:%d",
+ #ifdef XSERVER_LIBPCIACCESS
+ ((pMga->PciInfo->domain << 8) | pMga->PciInfo->bus),
+@@ -1198,7 +1198,7 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
+
+ pDRIInfo->SAREASize = SAREA_MAX;
+
+- pMGADRI = (MGADRIPtr)xcalloc( sizeof(MGADRIRec), 1 );
++ pMGADRI = (MGADRIPtr)calloc( sizeof(MGADRIRec), 1 );
+ if ( !pMGADRI ) {
+ DRIDestroyInfoRec( pMga->pDRIInfo );
+ pMga->pDRIInfo = 0;
+@@ -1208,9 +1208,9 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
+ }
+
+ pMGADRIServer = (MGADRIServerPrivatePtr)
+- xcalloc( sizeof(MGADRIServerPrivateRec), 1 );
++ calloc( sizeof(MGADRIServerPrivateRec), 1 );
+ if ( !pMGADRIServer ) {
+- xfree( pMGADRI );
++ free( pMGADRI );
+ DRIDestroyInfoRec( pMga->pDRIInfo );
+ pMga->pDRIInfo = 0;
+ xf86DrvMsg( pScrn->scrnIndex, X_ERROR,
+@@ -1249,9 +1249,9 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
+ pDRIInfo->bufferRequests = DRI_ALL_WINDOWS;
+
+ if ( !DRIScreenInit( pScreen, pDRIInfo, &pMga->drmFD ) ) {
+- xfree( pMGADRIServer );
++ free( pMGADRIServer );
+ pMga->DRIServerInfo = 0;
+- xfree( pDRIInfo->devPrivate );
++ free( pDRIInfo->devPrivate );
+ pDRIInfo->devPrivate = 0;
+ DRIDestroyInfoRec( pMga->pDRIInfo );
+ pMga->pDRIInfo = 0;
+@@ -1495,20 +1495,20 @@ void MGADRICloseScreen( ScreenPtr pScreen )
+
+ if ( pMga->pDRIInfo ) {
+ if ( pMga->pDRIInfo->devPrivate ) {
+- xfree( pMga->pDRIInfo->devPrivate );
++ free( pMga->pDRIInfo->devPrivate );
+ pMga->pDRIInfo->devPrivate = 0;
+ }
+ DRIDestroyInfoRec( pMga->pDRIInfo );
+ pMga->pDRIInfo = 0;
+ }
+ if ( pMga->DRIServerInfo ) {
+- xfree( pMga->DRIServerInfo );
++ free(pMga->DRIServerInfo);
+ pMga->DRIServerInfo = 0;
+ }
+ if ( pMga->pVisualConfigs ) {
+- xfree( pMga->pVisualConfigs );
++ free(pMga->pVisualConfigs);
+ }
+ if ( pMga->pVisualConfigsPriv ) {
+- xfree( pMga->pVisualConfigsPriv );
++ free( pMga->pVisualConfigsPriv );
+ }
+ }
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index d770031..d4ae346 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -646,7 +646,7 @@ MGAFreeRec(ScrnInfoPtr pScrn)
+ {
+ if (pScrn->driverPrivate == NULL)
+ return;
+- xfree(pScrn->driverPrivate);
++ free(pScrn->driverPrivate);
+ pScrn->driverPrivate = NULL;
+ }
+
+@@ -813,7 +813,7 @@ MGAProbe(DriverPtr drv, int flags)
+ MGAChipsets, MGAPciChipsets, devSections,
+ numDevSections, drv, &usedChips);
+ /* Free it since we don't need that list after this */
+- xfree(devSections);
++ free(devSections);
+ if (numUsed <= 0)
+ return FALSE;
+
+@@ -971,7 +971,7 @@ MGAProbe(DriverPtr drv, int flags)
+ }
+ }
+ }
+- xfree(usedChips);
++ free(usedChips);
+
+ return foundScreen;
+ }
+@@ -1715,7 +1715,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ #endif
+ }
+
+- if (!(pMga->Options = xalloc(sizeof(MGAOptions))))
++ if (!(pMga->Options = malloc(sizeof(MGAOptions))))
+ return FALSE;
+ memcpy(pMga->Options, MGAOptions, sizeof(MGAOptions));
+
+@@ -2384,7 +2384,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ switch(pMga->Chipset) {
+ case PCI_CHIP_MGA2064:
+ if (!pMga->NoAccel) {
+- linePitches = xalloc(sizeof(Pitches1));
++ linePitches = malloc(sizeof(Pitches1));
+ memcpy(linePitches, Pitches1, sizeof(Pitches1));
+ minPitch = maxPitch = 0;
+ }
+@@ -2393,7 +2393,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ case PCI_CHIP_MGA2164_AGP:
+ case PCI_CHIP_MGA1064:
+ if (!pMga->NoAccel) {
+- linePitches = xalloc(sizeof(Pitches2));
++ linePitches = malloc(sizeof(Pitches2));
+ memcpy(linePitches, Pitches2, sizeof(Pitches2));
+ minPitch = maxPitch = 0;
+ }
+@@ -2431,7 +2431,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ LOOKUP_BEST_REFRESH);
+
+ if (linePitches)
+- xfree(linePitches);
++ free(linePitches);
+ }
+
+ if (i < 1 && pMga->FBDev) {
+@@ -3294,7 +3294,7 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+
+ if(pMga->ShadowFB) {
+ pMga->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
+- pMga->ShadowPtr = xalloc(pMga->ShadowPitch * height);
++ pMga->ShadowPtr = malloc(pMga->ShadowPitch * height);
+ displayWidth = pMga->ShadowPitch / (pScrn->bitsPerPixel >> 3);
+ FBStart = pMga->ShadowPtr;
+ } else {
+@@ -3745,21 +3745,21 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
+ #ifdef USE_EXA
+ if (pMga->ExaDriver) {
+ exaDriverFini(pScreen);
+- xfree(pMga->ExaDriver);
++ free(pMga->ExaDriver);
+ }
+ #endif
+ if (pMga->CursorInfoRec)
+ xf86DestroyCursorInfoRec(pMga->CursorInfoRec);
+ if (pMga->ShadowPtr)
+- xfree(pMga->ShadowPtr);
++ free(pMga->ShadowPtr);
+ if (pMga->DGAModes)
+- xfree(pMga->DGAModes);
++ free(pMga->DGAModes);
+ if (pMga->adaptor)
+- xfree(pMga->adaptor);
++ free(pMga->adaptor);
+ if (pMga->portPrivate)
+- xfree(pMga->portPrivate);
++ free(pMga->portPrivate);
+ if (pMga->ScratchBuffer)
+- xfree(pMga->ScratchBuffer);
++ free(pMga->ScratchBuffer);
+
+ pScrn->vtSema = FALSE;
+
+diff --git a/src/mga_merge.c b/src/mga_merge.c
+index 2affe3b..e3216c9 100644
+--- a/src/mga_merge.c
++++ b/src/mga_merge.c
+@@ -70,9 +70,9 @@ CopyModeNLink(ScrnInfoPtr pScrn, DisplayModePtr dest, DisplayModePtr i, DisplayM
+ DisplayModePtr mode;
+ int dx = 0,dy = 0;
+ /* start with first node */
+- mode = xalloc(sizeof(DisplayModeRec));
++ mode = malloc(sizeof(DisplayModeRec));
+ memcpy(mode,i, sizeof(DisplayModeRec));
+- mode->Private = xalloc(sizeof(MergedDisplayModeRec));
++ mode->Private = malloc(sizeof(MergedDisplayModeRec));
+ ((MergedDisplayModePtr)mode->Private)->Monitor1 = i;
+ ((MergedDisplayModePtr)mode->Private)->Monitor2 = j;
+ ((MergedDisplayModePtr)mode->Private)->Monitor2Pos = srel;
+@@ -239,7 +239,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ MgaScrn2Rel Monitor2Pos;
+
+ xf86DrvMsg(pScrn1->scrnIndex, X_INFO, "==== Start of second screen initialization ====\n");
+- pScrn = xalloc(sizeof(ScrnInfoRec));
++ pScrn = malloc(sizeof(ScrnInfoRec));
+ memcpy(pScrn,pScrn1,sizeof(ScrnInfoRec));
+
+ pScrn->driverPrivate = NULL;
+@@ -270,7 +270,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+
+ /* Set pScrn->monitor */
+ {
+- pScrn->monitor = xalloc(sizeof(MonRec));
++ pScrn->monitor = malloc(sizeof(MonRec));
+ /* copy everything we don't care about */
+ memcpy(pScrn->monitor,pScrn1->monitor,sizeof(MonRec));
+ pScrn->monitor->DDC = NULL; /*FIXME:have to try this */
+@@ -484,7 +484,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ switch(pMga->Chipset) {
+ case PCI_CHIP_MGA2064:
+ if (!pMga->NoAccel) {
+- linePitches = xalloc(sizeof(Pitches1));
++ linePitches = malloc(sizeof(Pitches1));
+ memcpy(linePitches, Pitches1, sizeof(Pitches1));
+ minPitch = maxPitch = 0;
+ }
+@@ -493,7 +493,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ case PCI_CHIP_MGA2164_AGP:
+ case PCI_CHIP_MGA1064:
+ if (!pMga->NoAccel) {
+- linePitches = xalloc(sizeof(Pitches2));
++ linePitches = malloc(sizeof(Pitches2));
+ memcpy(linePitches, Pitches2, sizeof(Pitches2));
+ minPitch = maxPitch = 0;
+ }
+@@ -529,7 +529,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ LOOKUP_BEST_REFRESH);
+
+ if (linePitches)
+- xfree(linePitches);
++ free(linePitches);
+ }
+
+
+@@ -881,10 +881,10 @@ MGACloseScreenMerged(int scrnIndex, ScreenPtr pScreen) {
+ ScrnInfoPtr pScrn2 = pMga->pScrn2;
+
+ if(pScrn2) {
+- xfree(pScrn2->monitor);
++ free(pScrn2->monitor);
+ pScrn2->monitor = NULL;
+
+- xfree(pScrn2);
++ free(pScrn2);
+ pMga->pScrn2 = NULL;
+ }
+
+@@ -893,8 +893,8 @@ MGACloseScreenMerged(int scrnIndex, ScreenPtr pScreen) {
+ do {
+ DisplayModePtr p = pScrn1->currentMode->next;
+ if(pScrn1->currentMode->Private)
+- xfree(pScrn1->currentMode->Private);
+- xfree(pScrn1->currentMode);
++ free(pScrn1->currentMode->Private);
++ free(pScrn1->currentMode);
+ pScrn1->currentMode = p;
+ }while( pScrn1->currentMode != pScrn1->modes);
+ }
diff --git a/src/mga_storm.c b/src/mga_storm.c
-index 87473c8..db7fae7 100644
+index db7fae7..f0e6194 100644
--- a/src/mga_storm.c
+++ b/src/mga_storm.c
-@@ -1131,6 +1131,7 @@ void MGAStormEngineInit( ScrnInfoPtr pScrn )
- case PCI_CHIP_MGAG200_WINBOND_PCI:
- case PCI_CHIP_MGAG200_EV_PCI:
- case PCI_CHIP_MGAG200_EH_PCI:
-+ case PCI_CHIP_MGAG200_ER_PCI:
- pMga->SrcOrg = 0;
- OUTREG(MGAREG_SRCORG, pMga->realSrcOrg);
- OUTREG(MGAREG_DSTORG, pMga->DstOrg);
-diff --git a/src/mgareg_flags.h b/src/mgareg_flags.h
-index 69050fc..548af86 100644
---- a/src/mgareg_flags.h
-+++ b/src/mgareg_flags.h
-@@ -19,7 +19,6 @@
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mgareg_flags.h,v 1.2 2003/01/12 03:55:47 tsi Exp $ */
+@@ -583,7 +583,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
+ BoxRec AvailFBArea;
+ int i;
- #ifndef _MGAREGS_H_
- #define _MGAREGS_H_
-diff --git a/util/stormdwg.c b/util/stormdwg.c
-index 99f76cc..b43cc32 100644
---- a/util/stormdwg.c
-+++ b/util/stormdwg.c
-@@ -1,8 +1,3 @@
--/* $XConsortium: dwg.c /main/2 1996/10/28 06:57:55 kaleb $ */
+- pMga->ScratchBuffer = xalloc(((pScrn->displayWidth * pMga->CurrentLayout.bitsPerPixel) + 127) >> 3);
++ pMga->ScratchBuffer = malloc(((pScrn->displayWidth * pMga->CurrentLayout.bitsPerPixel) + 127) >> 3);
+ if(!pMga->ScratchBuffer) return FALSE;
+
+ pMga->AccelInfoRec = infoPtr = XAACreateInfoRec();
+diff --git a/src/mga_vga.c b/src/mga_vga.c
+index 9f00b3d..0ac8bf7 100644
+--- a/src/mga_vga.c
++++ b/src/mga_vga.c
+@@ -197,17 +197,17 @@ MGAG200SESaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save)
+ hwp->writeSeq(hwp, 0x04, 0x06); /* enable plane graphics */
+ hwp->writeGr(hwp, 0x05, 0x00); /* write mode 0, read mode 0 */
+ hwp->writeGr(hwp, 0x06, 0x05); /* set graphics */
+- if (hwp->FontInfo1 || (hwp->FontInfo1 = xalloc(FONT_AMOUNT))) {
++ if (hwp->FontInfo1 || (hwp->FontInfo1 = malloc(FONT_AMOUNT))) {
+ hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */
+ hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */
+ slowbcopy_frombus(hwp->Base, hwp->FontInfo1, FONT_AMOUNT);
+ }
+- if (hwp->FontInfo2 || (hwp->FontInfo2 = xalloc(FONT_AMOUNT))) {
++ if (hwp->FontInfo2 || (hwp->FontInfo2 = malloc(FONT_AMOUNT))) {
+ hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */
+ hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */
+ slowbcopy_frombus(hwp->Base, hwp->FontInfo2, FONT_AMOUNT);
+ }
+- if (hwp->TextInfo || (hwp->TextInfo = xalloc(2 * TEXT_AMOUNT))) {
++ if (hwp->TextInfo || (hwp->TextInfo = malloc(2 * TEXT_AMOUNT))) {
+ hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */
+ hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */
+ slowbcopy_frombus(hwp->Base, hwp->TextInfo, TEXT_AMOUNT);
+diff --git a/src/mga_video.c b/src/mga_video.c
+index a69c973..beb5a3c 100644
+--- a/src/mga_video.c
++++ b/src/mga_video.c
+@@ -131,8 +131,8 @@ void MGAInitVideo(ScreenPtr pScreen)
+ num_adaptors = 1;
+ adaptors = &newAdaptor;
+ } else {
+- newAdaptors = /* need to free this someplace */
+- xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
++ /* need to free this someplace */
++ newAdaptors = malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
+ if(newAdaptors) {
+ memcpy(newAdaptors, adaptors, num_adaptors *
+ sizeof(XF86VideoAdaptorPtr));
+@@ -147,7 +147,7 @@ void MGAInitVideo(ScreenPtr pScreen)
+ xf86XVScreenInit(pScreen, adaptors, num_adaptors);
+
+ if(newAdaptors)
+- xfree(newAdaptors);
++ free(newAdaptors);
+ }
+
+ /* client libraries expect an encoding */
+@@ -231,10 +231,10 @@ MGAAllocAdaptor(ScrnInfoPtr pScrn, Bool doublebuffer)
+ if(!(adapt = xf86XVAllocateVideoAdaptorRec(pScrn)))
+ return NULL;
+
+- if(!(pPriv = xcalloc(1, sizeof(MGAPortPrivRec) +
++ if(!(pPriv = calloc(1, sizeof(MGAPortPrivRec) +
+ (sizeof(DevUnion) * MGA_MAX_PORTS))))
+ {
+- xfree(adapt);
++ free(adapt);
+ return NULL;
+ }
+
+@@ -1082,18 +1082,18 @@ MGAAllocateSurface(
+ surface->width = w;
+ surface->height = h;
+
+- if(!(surface->pitches = xalloc(sizeof(int)))) {
++ if(!(surface->pitches = malloc(sizeof(int)))) {
+ MGAFreeMemory(pScrn, surface_memory);
+ return BadAlloc;
+ }
+- if(!(surface->offsets = xalloc(sizeof(int)))) {
+- xfree(surface->pitches);
++ if(!(surface->offsets = malloc(sizeof(int)))) {
++ free(surface->pitches);
+ MGAFreeMemory(pScrn, surface_memory);
+ return BadAlloc;
+ }
+- if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
+- xfree(surface->pitches);
+- xfree(surface->offsets);
++ if(!(pPriv = malloc(sizeof(OffscreenPrivRec)))) {
++ free(surface->pitches);
++ free(surface->offsets);
+ MGAFreeMemory(pScrn, surface_memory);
+ return BadAlloc;
+ }
+@@ -1137,9 +1137,9 @@ MGAFreeSurface(
+ if(pPriv->isOn)
+ MGAStopSurface(surface);
+ MGAFreeMemory(pScrn, pPriv->surface_memory);
+- xfree(surface->pitches);
+- xfree(surface->offsets);
+- xfree(surface->devPrivate.ptr);
++ free(surface->pitches);
++ free(surface->offsets);
++ free(surface->devPrivate.ptr);
+
+ return Success;
+ }
+@@ -1231,7 +1231,7 @@ MGAInitOffscreenImages(ScreenPtr pScreen)
+ XF86OffscreenImagePtr offscreenImages;
+
+ /* need to free this someplace */
+- if(!(offscreenImages = xalloc(num * sizeof(XF86OffscreenImageRec))))
++ if(!(offscreenImages = malloc(num * sizeof(XF86OffscreenImageRec))))
+ return;
+
+ offscreenImages[0].image = &Images[0];
+--
+cgit v0.9.0.2-2-gbebe
+From 1036e32e006d496023553ea566cb13ae93933719 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 27 Sep 2011 02:35:48 +0000
+Subject: Remove if(E != NULL) checks around free(E)
+
+Reviewed-by: Jamey Sharp <jamey@minilop.net>
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+diff --git a/src/mga_dri.c b/src/mga_dri.c
+index 957c6df..1454994 100644
+--- a/src/mga_dri.c
++++ b/src/mga_dri.c
+@@ -1011,8 +1011,8 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
+ pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec)*nbox);
+ pptNew2 = (DDXPointPtr)malloc(sizeof(DDXPointRec)*nbox);
+ if (!pboxNew2 || !pptNew2) {
+- if (pptNew2) free(pptNew2);
+- if (pboxNew2) free(pboxNew2);
++ free(pptNew2);
++ free(pboxNew2);
+ if (pboxNew1) {
+ free(pptNew1);
+ free(pboxNew1);
+@@ -1494,21 +1494,13 @@ void MGADRICloseScreen( ScreenPtr pScreen )
+ DRICloseScreen( pScreen );
+
+ if ( pMga->pDRIInfo ) {
+- if ( pMga->pDRIInfo->devPrivate ) {
+- free( pMga->pDRIInfo->devPrivate );
+- pMga->pDRIInfo->devPrivate = 0;
+- }
++ free(pMga->pDRIInfo->devPrivate);
++ pMga->pDRIInfo->devPrivate = 0;
+ DRIDestroyInfoRec( pMga->pDRIInfo );
+ pMga->pDRIInfo = 0;
+ }
+- if ( pMga->DRIServerInfo ) {
+- free(pMga->DRIServerInfo);
+- pMga->DRIServerInfo = 0;
+- }
+- if ( pMga->pVisualConfigs ) {
+- free(pMga->pVisualConfigs);
+- }
+- if ( pMga->pVisualConfigsPriv ) {
+- free( pMga->pVisualConfigsPriv );
+- }
++ free(pMga->DRIServerInfo);
++ pMga->DRIServerInfo = 0;
++ free(pMga->pVisualConfigs);
++ free(pMga->pVisualConfigsPriv);
+ }
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index d4ae346..dcbfabf 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -644,8 +644,6 @@ MGAGetRec(ScrnInfoPtr pScrn)
+ void
+ MGAFreeRec(ScrnInfoPtr pScrn)
+ {
+- if (pScrn->driverPrivate == NULL)
+- return;
+ free(pScrn->driverPrivate);
+ pScrn->driverPrivate = NULL;
+ }
+@@ -2430,8 +2428,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ pMga->FbMapSize,
+ LOOKUP_BEST_REFRESH);
+
+- if (linePitches)
+- free(linePitches);
++ free(linePitches);
+ }
+
+ if (i < 1 && pMga->FBDev) {
+@@ -3750,16 +3747,11 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
+ #endif
+ if (pMga->CursorInfoRec)
+ xf86DestroyCursorInfoRec(pMga->CursorInfoRec);
+- if (pMga->ShadowPtr)
+- free(pMga->ShadowPtr);
+- if (pMga->DGAModes)
+- free(pMga->DGAModes);
+- if (pMga->adaptor)
+- free(pMga->adaptor);
+- if (pMga->portPrivate)
+- free(pMga->portPrivate);
+- if (pMga->ScratchBuffer)
+- free(pMga->ScratchBuffer);
++ free(pMga->ShadowPtr);
++ free(pMga->DGAModes);
++ free(pMga->adaptor);
++ free(pMga->portPrivate);
++ free(pMga->ScratchBuffer);
+
+ pScrn->vtSema = FALSE;
+
+diff --git a/src/mga_merge.c b/src/mga_merge.c
+index e3216c9..c1cf2eb 100644
+--- a/src/mga_merge.c
++++ b/src/mga_merge.c
+@@ -528,8 +528,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ pMga->FbMapSize,
+ LOOKUP_BEST_REFRESH);
+
+- if (linePitches)
+- free(linePitches);
++ free(linePitches);
+ }
+
+
+@@ -892,8 +891,7 @@ MGACloseScreenMerged(int scrnIndex, ScreenPtr pScreen) {
+ pScrn1->currentMode = pScrn1->modes;
+ do {
+ DisplayModePtr p = pScrn1->currentMode->next;
+- if(pScrn1->currentMode->Private)
+- free(pScrn1->currentMode->Private);
++ free(pScrn1->currentMode->Private);
+ free(pScrn1->currentMode);
+ pScrn1->currentMode = p;
+ }while( pScrn1->currentMode != pScrn1->modes);
+diff --git a/src/mga_video.c b/src/mga_video.c
+index beb5a3c..784e7b1 100644
+--- a/src/mga_video.c
++++ b/src/mga_video.c
+@@ -146,8 +146,7 @@ void MGAInitVideo(ScreenPtr pScreen)
+ if(num_adaptors)
+ xf86XVScreenInit(pScreen, adaptors, num_adaptors);
+
+- if(newAdaptors)
+- free(newAdaptors);
++ free(newAdaptors);
+ }
+
+ /* client libraries expect an encoding */
+--
+cgit v0.9.0.2-2-gbebe
+From 560967b4ffdb103f95121c43708dd5fc680a5045 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 27 Sep 2011 02:37:04 +0000
+Subject: Fix printf format specifier warning
+
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+diff --git a/src/mga_exa.c b/src/mga_exa.c
+index f292327..e5eaa92 100644
+--- a/src/mga_exa.c
++++ b/src/mga_exa.c
+@@ -865,7 +865,7 @@ mgaExaInit(ScreenPtr pScreen)
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "X %d Y %d bpp %d\n",
+ pScrn->virtualX, pScrn->virtualY, pScrn->bitsPerPixel);
+- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Start at %p, size %x, osb %x\n",
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Start at %p, size %lx, osb %lx\n",
+ pExa->memoryBase, pExa->memorySize, pExa->offScreenBase);
+
+ /* In PW24 mode, we need to align to "3 64-bytes" */
+--
+cgit v0.9.0.2-2-gbebe
+From 07792ef41f33aa5419168263637e34ee614f26e2 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 27 Sep 2011 02:38:17 +0000
+Subject: Remove calls to xf86IsPc98()
+
+Reviewed-by: Jamey Sharp <jamey@minilop.net>
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index dcbfabf..4af36ca 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -2164,7 +2164,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ /*
+ * Reset card if it isn't primary one
+ */
+- if ( (!pMga->Primary && !pMga->FBDev) || xf86IsPc98() )
++ if ( (!pMga->Primary && !pMga->FBDev) )
+ MGASoftReset(pScrn);
+
+ if (pScrn->videoRam == 0) {
+@@ -2878,13 +2878,6 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ vgaHWProtect(pScrn, FALSE);
+ }
+
+- if (xf86IsPc98()) {
+- if (pMga->Chipset == PCI_CHIP_MGA2064)
+- outb(0xfac, 0x01);
+- else
+- outb(0xfac, 0x02);
+- }
-
+ /* Reset tagfifo*/
+ if (pMga->is_G200ER)
+ {
+@@ -3680,8 +3673,6 @@ MGALeaveVT(int scrnIndex, int flags)
+ MGARestore(pScrn);
+ vgaHWLock(hwp);
+
+- if (xf86IsPc98())
+- outb(0xfac, 0x00);
+ #ifdef XF86DRI
+ if (pMga->directRenderingEnabled) {
+ pScreen = screenInfo.screens[scrnIndex];
+@@ -3755,9 +3746,6 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
+
+ pScrn->vtSema = FALSE;
+
+- if (xf86IsPc98())
+- outb(0xfac, 0x00);
-
+ xf86ClearPrimInitDone(pScrn->entityList[0]);
+
+ if(pMga->BlockHandler)
+diff --git a/src/mga_merge.c b/src/mga_merge.c
+index c1cf2eb..aec3443 100644
+--- a/src/mga_merge.c
++++ b/src/mga_merge.c
+@@ -385,7 +385,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ /*
+ * Reset card if it isn't primary one
+ */
+- if ( (!pMga->Primary && !pMga->FBDev) || xf86IsPc98() )
++ if ( (!pMga->Primary && !pMga->FBDev) )
+ MGASoftReset(pScrn);
+
+
+--
+cgit v0.9.0.2-2-gbebe
+From f9acf37be49844bea8165be9786afe37fd999229 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sat, 29 Oct 2011 23:31:08 +0000
+Subject: Include <unistd.h> for usleep
+
+Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+diff --git a/src/mga_vga.c b/src/mga_vga.c
+index 0ac8bf7..8f52951 100644
+--- a/src/mga_vga.c
++++ b/src/mga_vga.c
+@@ -2,6 +2,8 @@
+ #include "config.h"
+ #endif
+
++#include <unistd.h>
++
+ #include "misc.h"
+ #include "xf86.h"
+ #include "xf86_OSproc.h"
+--
+cgit v0.9.0.2-2-gbebe
+From d9cf07a4f424b2beb844ea1b3ec5d468e79a747c Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sat, 29 Oct 2011 23:34:41 +0000
+Subject: Include "xf86Modes.h" for xf86ModeBandwidth
+
+Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index 4af36ca..d9f6ea4 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -52,6 +52,10 @@
+ #include "xf86.h"
+ #include "xf86_OSproc.h"
+
++#ifdef HAVE_XF86MODEBANDWIDTH
++#include "xf86Modes.h"
++#endif
++
+ #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
+ #include "xf86Resources.h"
+ #include "xf86RAC.h"
+--
+cgit v0.9.0.2-2-gbebe
+From 644ba5d11049e63ea61b5cc4fb889b0f840965ff Mon Sep 17 00:00:00 2001
+From: Christian Toutant <ctoutant@matrox.com>
+Date: Wed, 07 Dec 2011 20:42:39 +0000
+Subject: Add support for Video Memory greater then 8M
+
+Expand memory mapping of framebuffer from 8 to 16MB
+
+Fix segfault on redhat distibution
+
+Signed-off-by: Christian Toutant <ctoutant@matrox.com>
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index d9f6ea4..ae36378 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -2707,9 +2707,18 @@ MGAMapMem(ScrnInfoPtr pScrn)
+ if (pMga->IOBase == NULL)
+ return FALSE;
+
+- pMga->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
+- pMga->PciTag, pMga->FbAddress,
+- pMga->FbMapSize);
++ if (pMga->is_G200ER)
++ {
++ pMga->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
++ pMga->PciTag, pMga->FbAddress,
++ pMga->FbMapSize);
++ }
++ else
++ {
++ pMga->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
++ pMga->PciTag, pMga->FbAddress,
++ pMga->FbMapSize);
++ }
+ if (pMga->FbBase == NULL)
+ return FALSE;
+ #endif
+@@ -3139,11 +3148,19 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ pMga = MGAPTR(pScrn);
+ MGAdac = &pMga->Dac;
+
+- if (pMga->is_G200SE) {
+- VRTemp = pScrn->videoRam;
+- FBTemp = pMga->FbMapSize;
+- pScrn->videoRam = 8192;
+- pMga->FbMapSize = pScrn->videoRam * 1024;
++ if (pMga->is_G200SE)
++ {
++ VRTemp = pScrn->videoRam;
++ FBTemp = pMga->FbMapSize;
++ if (pMga->reg_1e24 >= 0x01)
++ {
++ pScrn->videoRam = 16384;
++ }
++ else
++ {
++ pScrn->videoRam = 8192;
++ }
++ pMga->FbMapSize = pScrn->videoRam * 1024;
+ }
+
+
+@@ -3701,10 +3718,26 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+ MGAPtr pMga = MGAPTR(pScrn);
+ MGAEntPtr pMgaEnt = NULL;
++ CARD32 VRTemp, FBTemp;
+
+ if (pMga->MergedFB)
+ MGACloseScreenMerged(scrnIndex, pScreen);
+
++ if (pMga->is_G200SE)
++ {
++ VRTemp = pScrn->videoRam;
++ FBTemp = pMga->FbMapSize;
++ if (pMga->reg_1e24 >= 0x01)
++ {
++ pScrn->videoRam = 16384;
++ }
++ else
++ {
++ pScrn->videoRam = 8192;
++ }
++ pMga->FbMapSize = pScrn->videoRam * 1024;
++ }
++
+ if (pScrn->vtSema) {
+ if (pMga->FBDev) {
+ fbdevHWRestore(pScrn);
+@@ -3716,6 +3749,13 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
+ vgaHWUnmapMem(pScrn);
+ }
+ }
++
++ if (pMga->is_G200SE)
++ {
++ pScrn->videoRam = VRTemp;
++ pMga->FbMapSize = FBTemp;
++ }
++
+ #ifdef XF86DRI
+ if (pMga->directRenderingEnabled) {
+ MGADRICloseScreen(pScreen);
+--
+cgit v0.9.0.2-2-gbebe
+From cc9d2e808de20723c9035952242d966455d583b7 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu, 29 Dec 2011 03:44:40 +0000
+Subject: Check MGAAllocAdaptor() for memory allocation failure
+
+If it couldn't allocate memory, don't attempt to write a bunch of values
+to the NULL pointer before returning it, but just pass the NULL along
+right away.
+
+Resolves parfait warnings of the form:
+
+Error: Null pointer dereference (CWE 476)
+ Write to null pointer 'adapt'
+ at line 322 of src/mga_video.c in function 'MGASetupImageVideoTexture'.
+ Function 'MGAAllocAdaptor' may return constant 'NULL' at line 237, called at line 320.
+ Null pointer introduced at line 237 in function 'MGAAllocAdaptor'.
+
+repeated for every line writing to the adapt pointer in each function.
+
+[ This bug was found by the Parfait 0.4.2 bug checking tool.
+ For more information see http://labs.oracle.com/projects/parfait/ ]
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+---
+diff --git a/src/mga_video.c b/src/mga_video.c
+index 784e7b1..abce31f 100644
+--- a/src/mga_video.c
++++ b/src/mga_video.c
+@@ -269,6 +269,8 @@ MGASetupImageVideoOverlay(ScreenPtr pScreen)
+ XF86VideoAdaptorPtr adapt;
+
+ adapt = MGAAllocAdaptor(pScrn, TRUE);
++ if (adapt == NULL)
++ return NULL;
+
+ adapt->type = XvWindowMask | XvInputMask | XvImageMask;
+ adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT;
+@@ -316,6 +318,8 @@ MGASetupImageVideoTexture(ScreenPtr pScreen)
+ MGAPtr pMga = MGAPTR(pScrn);
+
+ adapt = MGAAllocAdaptor(pScrn, FALSE);
++ if (adapt == NULL)
++ return NULL;
+
+ adapt->type = XvWindowMask | XvInputMask | XvImageMask;
+ adapt->flags = 0;
+@@ -1298,6 +1302,8 @@ MGASetupImageVideoILOAD(ScreenPtr pScreen)
+ MGAPtr pMga = MGAPTR(pScrn);
+
+ adapt = MGAAllocAdaptor(pScrn, FALSE);
++ if (adapt == NULL)
++ return NULL;
+
+ adapt->type = XvWindowMask | XvInputMask | XvImageMask;
+ adapt->flags = 0;
+--
+cgit v0.9.0.2-2-gbebe
+From 9223c44a731f48c66c226eb88dcb6f9d574cb599 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@debian.org>
+Date: Tue, 03 Jan 2012 22:35:18 +0000
+Subject: When we can't load the xaa or exa modules, use shadowfb instead
+
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index ae36378..00469e7 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -2101,6 +2101,31 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ }
+ }
+
++ /* Load XAA if needed */
++ if (!pMga->NoAccel) {
++#ifdef USE_EXA
++ if (pMga->Exa) {
++ if (!xf86LoadSubModule(pScrn, "exa")) {
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++ "Falling back to shadowfb\n");
++ pMga->ShadowFB = TRUE;
++ pMga->NoAccel = TRUE;
++ }
++ } else {
++#endif
++#ifdef USE_XAA
++ if (!xf86LoadSubModule(pScrn, "xaa")) {
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
++ "Falling back to shadowfb\n");
++ pMga->ShadowFB = TRUE;
++ pMga->NoAccel = TRUE;
++ }
++#endif
++#ifdef USE_EXA
++ }
++#endif
++ }
++
+ switch (pMga->Chipset) {
+ case PCI_CHIP_MGA2064:
+ case PCI_CHIP_MGA2164:
+@@ -2596,27 +2621,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ return FALSE;
+ }
+
+- /* Load XAA if needed */
+- if (!pMga->NoAccel) {
+-#ifdef USE_EXA
+- if (pMga->Exa) {
+- if (!xf86LoadSubModule(pScrn, "exa")) {
+- MGAFreeRec(pScrn);
+- return FALSE;
+- }
+- } else {
+-#endif
+-#ifdef USE_XAA
+- if (!xf86LoadSubModule(pScrn, "xaa")) {
+- MGAFreeRec(pScrn);
+- return FALSE;
+- }
+-#endif
+-#ifdef USE_EXA
+- }
+-#endif
+- }
-
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/util/stormdwg.c,v 1.1 1997/04/12 14:11:29 hohndel Exp $ */
+ /* Load ramdac if needed */
+ if (pMga->HWCursor) {
+ if (!xf86LoadSubModule(pScrn, "ramdac")) {
+--
+cgit v0.9.0.2-2-gbebe
+From 4c4beaf628c9c5dd531605e40696ed31db0e97b8 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 04 Jan 2012 05:15:07 +0000
+Subject: Untangle XF86DRI from the driver-specific DRI define
+
+XF86DRI is defined by xorg-server.h, so --disable-dri in the driver
+itself does exactly nothing other than not fill in the CFLAGS
+and thus stop the driver from compiling.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+diff --git a/configure.ac b/configure.ac
+index 540c390..840ff3c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -100,8 +100,8 @@ AC_MSG_RESULT([$DRI])
+ AM_CONDITIONAL(DRI, test "x$DRI" = xyes)
+ if test "x$DRI" = xyes; then
+ PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
+- AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
+- AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
++ AC_DEFINE(MGADRI,1,[Enable DRI driver support])
++ AC_DEFINE(MGADRI_DEVEL,1,[Enable developmental DRI driver support])
+ fi
- #include <stdio.h>
- #include <stdlib.h>
+ save_CFLAGS="$CFLAGS"
+diff --git a/src/mga.h b/src/mga.h
+index fced6aa..77406f1 100644
+--- a/src/mga.h
++++ b/src/mga.h
+@@ -28,7 +28,11 @@
+ #include "xf86DDC.h"
+ #include "xf86xv.h"
+
+-#ifdef XF86DRI
++#ifndef XF86DRI
++#undef MGADRI
++#endif
++
++#ifdef MGADRI
+ #include "xf86drm.h"
+
+ #define _XF86DRI_SERVER_
+@@ -589,7 +593,7 @@ typedef struct {
+ int expandRemaining;
+ int expandHeight;
+ int expandY;
+-#ifdef XF86DRI
++#ifdef MGADRI
+ Bool directRenderingEnabled;
+ DRIInfoPtr pDRIInfo;
+ int drmFD;
+@@ -743,7 +747,7 @@ void MGAPointerMoved(int index, int x, int y);
+ void MGAInitVideo(ScreenPtr pScreen);
+ void MGAResetVideo(ScrnInfoPtr pScrn);
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+
+ #define MGA_FRONT 0x1
+ #define MGA_BACK 0x2
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index 00469e7..af005f1 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -101,7 +101,7 @@
+ #include "shadowfb.h"
+ #include "fbdevhw.h"
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ #include "dri.h"
+ #endif
+
+@@ -1532,7 +1532,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+
+ pMga = MGAPTR(pScrn);
+ /* Set here until dri is enabled */
+-#ifdef XF86DRI
++#ifdef MGADRI
+ pMga->haveQuiescense = 1;
+ #endif
+ /* Get the entity, and make sure it is PCI. */
+@@ -1706,13 +1706,13 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ }
+
+ if (pMga->DualHeadEnabled) {
+-#ifdef XF86DRI
++#ifdef MGADRI
+ pMga->GetQuiescence = MGAGetQuiescenceShared;
+ #endif
+ } else { /* single-head mode */
+ pMga->SecondCrtc = FALSE;
+ pMga->HWCursor = TRUE;
+-#ifdef XF86DRI
++#ifdef MGADRI
+ pMga->GetQuiescence = MGAGetQuiescence;
+ #endif
+ }
+@@ -1942,7 +1942,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ if (pScrn->depth == 8)
+ pScrn->rgbBits = 8;
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ from = X_DEFAULT;
+ pMga->agpMode = MGA_DEFAULT_AGP_MODE;
+
+@@ -2637,7 +2637,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+ }
+ }
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ /* Load the dri module if requested. */
+ if (xf86ReturnOptValBool(pMga->Options, OPTION_DRI, FALSE)) {
+ xf86LoadSubModule(pScrn, "dri");
+@@ -2878,7 +2878,7 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ vgaReg = &hwp->ModeReg;
+ mgaReg = &pMga->ModeReg;
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ if (pMga->directRenderingEnabled) {
+ DRILock(screenInfo.screens[pScrn->scrnIndex], 0);
+ }
+@@ -2989,7 +2989,7 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ pMga->M1currentMode = (DisplayModePtr)mode->Private;
+ }
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ if (pMga->directRenderingEnabled)
+ DRIUnlock(screenInfo.screens[pScrn->scrnIndex]);
+ #endif
+@@ -3138,7 +3138,7 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ MGAEntPtr pMgaEnt = NULL;
+ int f;
+ CARD32 VRTemp, FBTemp;
+-#ifdef XF86DRI
++#ifdef MGADRI
+ MessageType driFrom = X_DEFAULT;
+ #endif
+ DPMSSetProcPtr mga_dpms_set_proc = NULL;
+@@ -3317,7 +3317,7 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ FBStart = pMga->FbStart;
+ }
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ /*
+ * Setup DRI after visuals have been established.
+ *
+@@ -3473,7 +3473,7 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+
+ MGAInitVideo(pScreen);
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ if (pMga->directRenderingEnabled) {
+ /* Now that mi, drm and others have done their thing,
+ * complete the DRI setup.
+@@ -3625,7 +3625,7 @@ MGAEnterVT(int scrnIndex, int flags)
+
+ pMga = MGAPTR(pScrn);
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ if (pMga->directRenderingEnabled) {
+ if (pMga->irq) {
+ /* Need to make sure interrupts are enabled */
+@@ -3651,7 +3651,7 @@ static Bool
+ MGAEnterVTFBDev(int scrnIndex, int flags)
+ {
+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+-#ifdef XF86DRI
++#ifdef MGADRI
+ ScreenPtr pScreen;
+ MGAPtr pMga;
+
+@@ -3690,7 +3690,7 @@ MGALeaveVT(int scrnIndex, int flags)
+ {
+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+-#ifdef XF86DRI
++#ifdef MGADRI
+ MGAPtr pMga = MGAPTR(pScrn);
+ ScreenPtr pScreen;
+ #endif
+@@ -3698,7 +3698,7 @@ MGALeaveVT(int scrnIndex, int flags)
+ MGARestore(pScrn);
+ vgaHWLock(hwp);
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ if (pMga->directRenderingEnabled) {
+ pScreen = screenInfo.screens[scrnIndex];
+ DRILock(pScreen, 0);
+@@ -3760,7 +3760,7 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
+ pMga->FbMapSize = FBTemp;
+ }
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ if (pMga->directRenderingEnabled) {
+ MGADRICloseScreen(pScreen);
+ pMga->directRenderingEnabled=FALSE;
+diff --git a/src/mga_exa.c b/src/mga_exa.c
+index e5eaa92..ced6452 100644
+--- a/src/mga_exa.c
++++ b/src/mga_exa.c
+@@ -41,7 +41,7 @@
+ #include "mga_macros.h"
+
+ #include "exa.h"
+-#ifdef XF86DRI
++#ifdef MGADRI
+ #include "mga_dri.h"
+ #endif
+
+@@ -763,7 +763,7 @@ mgaWaitMarker(ScreenPtr pScreen, int marker)
+ while (INREG (MGAREG_Status) & 0x10000);
+ }
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ static void
+ init_dri(ScrnInfoPtr pScrn)
+ {
+@@ -837,7 +837,7 @@ init_dri(ScrnInfoPtr pScrn)
+ MGA_BUFFER_ALIGN) & ~MGA_BUFFER_ALIGN;
+ dri->backPitch = widthBytes;
+ }
+-#endif /* XF86DRI */
++#endif /* MGADRI */
+
+ Bool
+ mgaExaInit(ScreenPtr pScreen)
+@@ -898,7 +898,7 @@ mgaExaInit(ScreenPtr pScreen)
+ pExa->UploadToScreen = mgaUploadToScreen;
+ pExa->DownloadFromScreen = mgaDownloadFromScreen;
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ if (pMga->directRenderingEnabled)
+ init_dri(pScrn);
+ #endif
+diff --git a/src/mga_macros.h b/src/mga_macros.h
+index 130651d..d3b0d0e 100644
+--- a/src/mga_macros.h
++++ b/src/mga_macros.h
+@@ -17,7 +17,7 @@
+
+ #define RGBEQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff))
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ #define MGA_SYNC_XTAG 0x275f4200
+
+ #define MGABUSYWAIT() do { \
+@@ -64,7 +64,7 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \
+ WAITFIFO(1); \
+ OUTREG(MGAREG_CXBNDRY, 0xFFFF0000); }
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ #define CHECK_DMA_QUIESCENT(pMGA, pScrn) { \
+ if (!pMGA->haveQuiescense) { \
+ pMGA->GetQuiescence( pScrn ); \
+diff --git a/src/mga_merge.c b/src/mga_merge.c
+index aec3443..f355f76 100644
+--- a/src/mga_merge.c
++++ b/src/mga_merge.c
+@@ -316,7 +316,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, int flags)
+ pMga->Chipset = pMga1->Chipset;
+ pMga->ChipRev = pMga1->ChipRev;
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ pMga->agpMode = pMga1->agpMode;
+ #endif
+
+diff --git a/src/mga_storm.c b/src/mga_storm.c
+index f0e6194..7ac3ae0 100644
+--- a/src/mga_storm.c
++++ b/src/mga_storm.c
+@@ -24,7 +24,7 @@
+ #include "miline.h"
+ #include "servermd.h"
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ #include "GL/glxtokens.h"
+ #endif
+
+@@ -32,7 +32,7 @@
+ #include "mga_reg.h"
+ #include "mga_macros.h"
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ #include "mga_dri.h"
+ #endif
+
+@@ -797,7 +797,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
+ break;
+ }
+
+-#ifdef XF86DRI
++#ifdef MGADRI
+ if ( pMga->directRenderingEnabled ) {
+ MGADRIServerPrivatePtr pMGADRIServer = pMga->DRIServerInfo;
+ BoxRec MemBox;
+@@ -899,7 +899,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
+ pMGADRIServer->textureOffset );
+ }
+ else
+-#endif /* defined(XF86DRI) */
++#endif /* defined(MGADRI) */
+ {
+ AvailFBArea.x1 = 0;
+ AvailFBArea.x2 = pScrn->displayWidth;
+--
+cgit v0.9.0.2-2-gbebe