summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--community/allegro/PKGBUILD20
-rw-r--r--community/coq/PKGBUILD12
-rw-r--r--community/coq/camlp5-latest-fix.diff354
-rw-r--r--community/gnome-packagekit/PKGBUILD8
-rw-r--r--community/ircii-pana/PKGBUILD62
-rw-r--r--community/ircii-pana/bitchx-1.1-open_missing_mode.patch22
-rw-r--r--community/libmemcached/PKGBUILD8
-rw-r--r--community/linux-tools/PKGBUILD10
-rw-r--r--community/lrzip/PKGBUILD44
-rw-r--r--community/oolite/PKGBUILD7
-rw-r--r--community/spectrwm/PKGBUILD6
-rw-r--r--extra/gnome-desktop/PKGBUILD14
-rw-r--r--extra/libtasn1/PKGBUILD11
-rw-r--r--extra/nasm/PKGBUILD26
-rw-r--r--extra/vlc/PKGBUILD16
-rw-r--r--extra/xf86-video-mga/PKGBUILD8
-rw-r--r--extra/xf86-video-mga/git-fixes.patch4830
-rw-r--r--gnome-unstable/gdm/PKGBUILD65
-rw-r--r--gnome-unstable/gdm/fix_external_program_directories.patch34
-rwxr-xr-xgnome-unstable/gdm/gdm36
-rw-r--r--gnome-unstable/gdm/gdm-autologin.pam18
-rw-r--r--gnome-unstable/gdm/gdm-fingerprint.pam18
-rw-r--r--gnome-unstable/gdm/gdm-password.pam20
-rw-r--r--gnome-unstable/gdm/gdm-smartcard.pam18
-rw-r--r--gnome-unstable/gdm/gdm-vt-allocation-hack.patch118
-rw-r--r--gnome-unstable/gdm/gdm-welcome.pam12
-rw-r--r--gnome-unstable/gdm/gdm.install30
-rw-r--r--gnome-unstable/gdm/gdm.pam10
-rw-r--r--libre/linux-libre-lts/PKGBUILD18
-rw-r--r--libre/linux-libre-lts/config.i68610
-rw-r--r--libre/linux-libre-lts/config.x86_6410
-rw-r--r--libre/linux-libre-lts/ext4-options.patch30
-rw-r--r--libre/linux-libre-lts/linux-libre-lts.install2
-rw-r--r--libre/virtualbox-libre/PKGBUILD7
-rw-r--r--libre/virtualbox-modules/.directory2
-rw-r--r--libre/virtualbox-modules/LocalConfig.kmk2
-rw-r--r--libre/virtualbox-modules/PKGBUILD15
-rw-r--r--libre/virtualbox-modules/virtualbox-modules.install6
-rw-r--r--libre/virtualbox-modules/virtualbox-parabola-modules.install6
-rw-r--r--mozilla-testing/iceweasel-i18n/PKGBUILD170
-rw-r--r--mozilla-testing/iceweasel-libre/PKGBUILD10
-rw-r--r--mozilla-testing/iceweasel-libre/libre.patch43
-rw-r--r--testing/bootchart/PKGBUILD27
-rw-r--r--testing/bootchart/build.patch34
-rw-r--r--testing/openssh/sshd.close-sessions14
-rw-r--r--testing/wpa_actiond/PKGBUILD25
-rw-r--r--testing/xf86-video-neomagic/git-fixes.diff616
-rw-r--r--~fauno/localepurge/PKGBUILD39
-rw-r--r--~fauno/notmuch/PKGBUILD27
49 files changed, 6457 insertions, 493 deletions
diff --git a/community/allegro/PKGBUILD b/community/allegro/PKGBUILD
index 8e5a88a8b..7ab054c75 100644
--- a/community/allegro/PKGBUILD
+++ b/community/allegro/PKGBUILD
@@ -1,27 +1,31 @@
-# $Id: PKGBUILD 146876 2012-01-19 02:37:24Z eric $
-# Maintainer: Ionut Biru <ibiru@archlinux.org>
+# $Id: PKGBUILD 68209 2012-03-19 09:36:12Z arodseth $
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: arjan <arjan@archlinux.org>
pkgname=allegro
pkgver=5.0.6
-pkgrel=1
+pkgrel=2
pkgdesc="Portable library mainly aimed at video game and multimedia programming"
arch=('x86_64' 'i686')
url="http://alleg.sourceforge.net/"
license=('custom')
-depends=('jack' 'libxpm' 'libxxf86vm' 'libxxf86dga' 'libxcursor' 'libpng' 'libgl' 'libjpeg')
-makedepends=('cmake' 'mesa' 'freetype2')
+depends=('jack' 'libxpm' 'freetype2' 'libxxf86dga' 'libxcursor' 'libpng' 'libgl' 'libjpeg' 'physfs')
+makedepends=('cmake' 'mesa')
source=("http://downloads.sourceforge.net/alleg/$pkgname-$pkgver.tar.gz")
sha256sums=('d981a1cac937085e6636e597c492ddb743066516c1d215c2a39e4049bd70dc24')
build() {
+ cd "$srcdir"
+
mkdir build
cd build
cmake "../$pkgname-$pkgver" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DWANT_DOCS=OFF
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWANT_DOCS=OFF \
+ -DWANT_PHYSFS=ON
make
}
diff --git a/community/coq/PKGBUILD b/community/coq/PKGBUILD
index 798266553..3c8c707c3 100644
--- a/community/coq/PKGBUILD
+++ b/community/coq/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=coq
pkgver=8.3pl3
-pkgrel=2
+pkgrel=3
pkgdesc='Formal proof management system.'
arch=('i686' 'x86_64' 'mips64el')
url='http://coq.inria.fr/'
@@ -11,12 +11,18 @@ license=('GPL')
options=('!emptydirs')
depends=('gtk2' 'lablgtk2' 'ocaml')
makedepends=('camlp5-transitional' 'netpbm' 'hevea')
-source=("http://coq.inria.fr/distrib/V${pkgver}/files/coq-${pkgver}.tar.gz")
-md5sums=('37e9a52110a025128667c03fed75f9c2')
+source=("http://coq.inria.fr/distrib/V${pkgver}/files/coq-${pkgver}.tar.gz"
+ 'camlp5-latest-fix.diff')
+md5sums=('37e9a52110a025128667c03fed75f9c2'
+ '76c55f67f86a3f4b782bbba02ba8893f')
build() {
cd coq-${pkgver}
+ # fix compilation bug, remove next bump
+ # https://coq.inria.fr/bugs/show_bug.cgi?id=2728
+ patch -Np0 -i ${srcdir}/camlp5-latest-fix.diff
+
./configure \
-prefix '/usr' \
-mandir '/usr/share/man' \
diff --git a/community/coq/camlp5-latest-fix.diff b/community/coq/camlp5-latest-fix.diff
new file mode 100644
index 000000000..80af1c924
--- /dev/null
+++ b/community/coq/camlp5-latest-fix.diff
@@ -0,0 +1,354 @@
+Index: checker/checker.ml
+===================================================================
+--- checker/checker.ml (revision 15024)
++++ checker/checker.ml (revision 15025)
+@@ -274,7 +274,7 @@
+ (* let ctx = Check.get_env() in
+ hov 0
+ (str "Error:" ++ spc () ++ Himsg.explain_inductive_error ctx e)*)
+- | Stdpp.Exc_located (loc,exc) ->
++ | Compat.Exc_located (loc,exc) ->
+ hov 0 ((if loc = dummy_loc then (mt ())
+ else (str"At location " ++ print_loc loc ++ str":" ++ fnl ()))
+ ++ explain_exn exc)
+Index: lib/compat.ml4
+===================================================================
+--- lib/compat.ml4 (revision 15024)
++++ lib/compat.ml4 (revision 15025)
+@@ -15,6 +15,7 @@
+ IFDEF CAMLP5 THEN
+ module M = struct
+ type loc = Stdpp.location
++exception Exc_located = Ploc.Exc
+ let dummy_loc = Stdpp.dummy_loc
+ let make_loc = Stdpp.make_loc
+ let unloc loc = Stdpp.first_pos loc, Stdpp.last_pos loc
+@@ -26,6 +27,7 @@
+ end
+ ELSE IFDEF OCAML308 THEN
+ module M = struct
++exception Exc_located = Stdpp.Exc_located
+ type loc = Token.flocation
+ let dummy_loc = Token.dummy_loc
+ let make_loc loc = Token.make_loc loc
+@@ -45,6 +47,7 @@
+ end
+ ELSE
+ module M = struct
++exception Exc_located = Stdpp.Exc_located
+ type loc = int * int
+ let dummy_loc = (0,0)
+ let make_loc x = x
+@@ -59,6 +62,7 @@
+ END
+
+ type loc = M.loc
++exception Exc_located = M.Exc_located
+ let dummy_loc = M.dummy_loc
+ let make_loc = M.make_loc
+ let unloc = M.unloc
+Index: pretyping/pretype_errors.ml
+===================================================================
+--- pretyping/pretype_errors.ml (revision 15024)
++++ pretyping/pretype_errors.ml (revision 15025)
+@@ -45,7 +45,7 @@
+
+ let precatchable_exception = function
+ | Util.UserError _ | TypeError _ | PretypeError _
+- | Stdpp.Exc_located(_,(Util.UserError _ | TypeError _ |
++ | Compat.Exc_located(_,(Util.UserError _ | TypeError _ |
+ Nametab.GlobalizationError _ | PretypeError _)) -> true
+ | _ -> false
+
+Index: pretyping/cases.ml
+===================================================================
+--- pretyping/cases.ml (revision 15024)
++++ pretyping/cases.ml (revision 15025)
+@@ -100,7 +100,7 @@
+ | h::t ->
+ try f h
+ with UserError _ | TypeError _ | PretypeError _
+- | Stdpp.Exc_located (_,(UserError _ | TypeError _ | PretypeError _)) ->
++ | Compat.Exc_located (_,(UserError _ | TypeError _ | PretypeError _)) ->
+ list_try_compile f t
+
+ let force_name =
+Index: pretyping/typeclasses_errors.ml
+===================================================================
+--- pretyping/typeclasses_errors.ml (revision 15024)
++++ pretyping/typeclasses_errors.ml (revision 15025)
+@@ -47,7 +47,7 @@
+ raise (TypeClassError (env, UnsatisfiableConstraints (evd, None)))
+ | Some ev ->
+ let loc, kind = Evd.evar_source ev evd in
+- raise (Stdpp.Exc_located (loc, TypeClassError
++ raise (Compat.Exc_located (loc, TypeClassError
+ (env, UnsatisfiableConstraints (evd, Some (ev, kind)))))
+
+ let mismatched_ctx_inst env c n m = typeclass_error env (MismatchedContextInstance (c, n, m))
+@@ -55,5 +55,5 @@
+ let rec unsatisfiable_exception exn =
+ match exn with
+ | TypeClassError (_, UnsatisfiableConstraints _) -> true
+- | Stdpp.Exc_located(_, e) -> unsatisfiable_exception e
++ | Compat.Exc_located(_, e) -> unsatisfiable_exception e
+ | _ -> false
+Index: plugins/subtac/subtac_obligations.ml
+===================================================================
+--- plugins/subtac/subtac_obligations.ml (revision 15024)
++++ plugins/subtac/subtac_obligations.ml (revision 15025)
+@@ -485,8 +485,8 @@
+ true
+ else false
+ with
+- | Stdpp.Exc_located(_, Proof_type.LtacLocated (_, Refiner.FailError (_, s)))
+- | Stdpp.Exc_located(_, Refiner.FailError (_, s))
++ | Compat.Exc_located(_, Proof_type.LtacLocated (_, Refiner.FailError (_, s)))
++ | Compat.Exc_located(_, Refiner.FailError (_, s))
+ | Refiner.FailError (_, s) ->
+ user_err_loc (fst obl.obl_source, "solve_obligation", Lazy.force s)
+ | e -> false
+Index: toplevel/cerrors.ml
+===================================================================
+--- toplevel/cerrors.ml (revision 15024)
++++ toplevel/cerrors.ml (revision 15025)
+@@ -81,7 +81,7 @@
+ hov 0 (str "Syntax error: Undefined token.")
+ | Lexer.Error (Bad_token s) ->
+ hov 0 (str "Syntax error: Bad token" ++ spc () ++ str s ++ str ".")
+- | Stdpp.Exc_located (loc,exc) ->
++ | Compat.Exc_located (loc,exc) ->
+ hov 0 ((if loc = dummy_loc then (mt ())
+ else (str"At location " ++ print_loc loc ++ str":" ++ fnl ()))
+ ++ explain_exn_default_aux anomaly_string report_fn exc)
+@@ -156,8 +156,8 @@
+ | Proof_type.LtacLocated (s,exc) ->
+ EvaluatedError (hov 0 (Himsg.explain_ltac_call_trace s ++ fnl()),
+ Some (process_vernac_interp_error exc))
+- | Stdpp.Exc_located (loc,exc) ->
+- Stdpp.Exc_located (loc,process_vernac_interp_error exc)
++ | Compat.Exc_located (loc,exc) ->
++ Compat.Exc_located (loc,process_vernac_interp_error exc)
+ | exc ->
+ exc
+
+Index: toplevel/vernac.ml
+===================================================================
+--- toplevel/vernac.ml (revision 15024)
++++ toplevel/vernac.ml (revision 15025)
+@@ -41,14 +41,14 @@
+ match re with
+ | Error_in_file (_, (b,f,loc), e) when loc <> dummy_loc ->
+ ((b, f, loc), e)
+- | Stdpp.Exc_located (loc, e) when loc <> dummy_loc ->
++ | Compat.Exc_located (loc, e) when loc <> dummy_loc ->
+ ((false,file, loc), e)
+- | Stdpp.Exc_located (_, e) | e -> ((false,file,cmdloc), e)
++ | Compat.Exc_located (_, e) | e -> ((false,file,cmdloc), e)
+ in
+ raise (Error_in_file (file, inner, disable_drop inex))
+
+ let real_error = function
+- | Stdpp.Exc_located (_, e) -> e
++ | Compat.Exc_located (_, e) -> e
+ | Error_in_file (_, _, e) -> e
+ | e -> e
+
+Index: toplevel/toplevel.ml
+===================================================================
+--- toplevel/toplevel.ml (revision 15024)
++++ toplevel/toplevel.ml (revision 15025)
+@@ -274,7 +274,7 @@
+ let rec is_pervasive_exn = function
+ | Out_of_memory | Stack_overflow | Sys.Break -> true
+ | Error_in_file (_,_,e) -> is_pervasive_exn e
+- | Stdpp.Exc_located (_,e) -> is_pervasive_exn e
++ | Compat.Exc_located (_,e) -> is_pervasive_exn e
+ | DuringCommandInterp (_,e) -> is_pervasive_exn e
+ | _ -> false
+
+@@ -290,7 +290,7 @@
+ in
+ let (locstrm,exc) =
+ match exc with
+- | Stdpp.Exc_located (loc, ie) ->
++ | Compat.Exc_located (loc, ie) ->
+ if valid_buffer_loc top_buffer dloc loc then
+ (print_highlight_location top_buffer loc, ie)
+ else
+@@ -325,7 +325,7 @@
+ let rec discard_to_dot () =
+ try
+ Gram.Entry.parse parse_to_dot top_buffer.tokens
+- with Stdpp.Exc_located(_,(Token.Error _|Lexer.Error _)) ->
++ with Compat.Exc_located(_,(Token.Error _|Lexer.Error _)) ->
+ discard_to_dot()
+
+
+Index: tactics/extratactics.ml4
+===================================================================
+--- tactics/extratactics.ml4 (revision 15024)
++++ tactics/extratactics.ml4 (revision 15025)
+@@ -580,7 +580,7 @@
+ try
+ Pretyping.Default.understand sigma env t_hole
+ with
+- | Stdpp.Exc_located (loc,Pretype_errors.PretypeError (_, Pretype_errors.UnsolvableImplicit _)) ->
++ | Compat.Exc_located (loc,Pretype_errors.PretypeError (_, Pretype_errors.UnsolvableImplicit _)) ->
+ resolve_hole (subst_hole_with_term (fst (unloc loc)) c_raw t_hole)
+ in
+ let t_constr = resolve_hole (subst_var_with_hole occ id t_raw) in
+Index: tactics/class_tactics.ml4
+===================================================================
+--- tactics/class_tactics.ml4 (revision 15024)
++++ tactics/class_tactics.ml4 (revision 15025)
+@@ -219,7 +219,7 @@
+
+ let rec catchable = function
+ | Refiner.FailError _ -> true
+- | Stdpp.Exc_located (_, e) -> catchable e
++ | Compat.Exc_located (_, e) -> catchable e
+ | e -> Logic.catchable_exception e
+
+ let is_dep gl gls =
+Index: tactics/rewrite.ml4
+===================================================================
+--- tactics/rewrite.ml4 (revision 15024)
++++ tactics/rewrite.ml4 (revision 15025)
+@@ -1057,7 +1057,7 @@
+ else tclIDTAC
+ in tclTHENLIST [evartac; rewtac] gl
+ with
+- | Stdpp.Exc_located (_, TypeClassError (env, (UnsatisfiableConstraints _ as e)))
++ | Compat.Exc_located (_, TypeClassError (env, (UnsatisfiableConstraints _ as e)))
+ | TypeClassError (env, (UnsatisfiableConstraints _ as e)) ->
+ Refiner.tclFAIL_lazy 0
+ (lazy (str"setoid rewrite failed: unable to satisfy the rewriting constraints."
+Index: tactics/tacinterp.ml
+===================================================================
+--- tactics/tacinterp.ml (revision 15024)
++++ tactics/tacinterp.ml (revision 15025)
+@@ -93,15 +93,15 @@
+ let catch_error call_trace tac g =
+ if call_trace = [] then tac g else try tac g with
+ | LtacLocated _ as e -> raise e
+- | Stdpp.Exc_located (_,LtacLocated _) as e -> raise e
++ | Compat.Exc_located (_,LtacLocated _) as e -> raise e
+ | e ->
+ let (nrep,loc',c),tail = list_sep_last call_trace in
+- let loc,e' = match e with Stdpp.Exc_located(loc,e) -> loc,e | _ ->dloc,e in
++ let loc,e' = match e with Compat.Exc_located(loc,e) -> loc,e | _ ->dloc,e in
+ if tail = [] then
+ let loc = if loc = dloc then loc' else loc in
+- raise (Stdpp.Exc_located(loc,e'))
++ raise (Compat.Exc_located(loc,e'))
+ else
+- raise (Stdpp.Exc_located(loc',LtacLocated((nrep,c,tail,loc),e')))
++ raise (Compat.Exc_located(loc',LtacLocated((nrep,c,tail,loc),e')))
+
+ (* Signature for interpretation: val_interp and interpretation functions *)
+ type interp_sign =
+@@ -1979,14 +1979,14 @@
+ VRTactic (catch_error trace tac goal)
+ | a -> a)
+ with
+- | FailError (0,s) | Stdpp.Exc_located(_, FailError (0,s))
+- | Stdpp.Exc_located(_,LtacLocated (_,FailError (0,s))) ->
++ | FailError (0,s) | Compat.Exc_located(_, FailError (0,s))
++ | Compat.Exc_located(_,LtacLocated (_,FailError (0,s))) ->
+ raise (Eval_fail (Lazy.force s))
+ | FailError (lvl,s) -> raise (FailError (lvl - 1, s))
+- | Stdpp.Exc_located(s,FailError (lvl,s')) ->
+- raise (Stdpp.Exc_located(s,FailError (lvl - 1, s')))
+- | Stdpp.Exc_located(s,LtacLocated (s'',FailError (lvl,s'))) ->
+- raise (Stdpp.Exc_located(s,LtacLocated (s'',FailError (lvl - 1, s'))))
++ | Compat.Exc_located(s,FailError (lvl,s')) ->
++ raise (Compat.Exc_located(s,FailError (lvl - 1, s')))
++ | Compat.Exc_located(s,LtacLocated (s'',FailError (lvl,s'))) ->
++ raise (Compat.Exc_located(s,LtacLocated (s'',FailError (lvl - 1, s'))))
+
+ (* Interprets the clauses of a recursive LetIn *)
+ and interp_letrec ist gl llc u =
+Index: ide/coq.ml
+===================================================================
+--- ide/coq.ml (revision 15024)
++++ ide/coq.ml (revision 15025)
+@@ -112,7 +112,7 @@
+ | _ -> true
+
+ let user_error_loc l s =
+- raise (Stdpp.Exc_located (l, Util.UserError ("CoqIde", s)))
++ raise (Compat.Exc_located (l, Util.UserError ("CoqIde", s)))
+
+ type printing_state = {
+ mutable printing_implicit : bool;
+@@ -443,7 +443,7 @@
+ let rec is_pervasive_exn = function
+ | Out_of_memory | Stack_overflow | Sys.Break -> true
+ | Error_in_file (_,_,e) -> is_pervasive_exn e
+- | Stdpp.Exc_located (_,e) -> is_pervasive_exn e
++ | Compat.Exc_located (_,e) -> is_pervasive_exn e
+ | DuringCommandInterp (_,e) -> is_pervasive_exn e
+ | _ -> false
+
+@@ -456,7 +456,7 @@
+ in
+ let (loc,exc) =
+ match exc with
+- | Stdpp.Exc_located (loc, ie) -> (Some loc),ie
++ | Compat.Exc_located (loc, ie) -> (Some loc),ie
+ | Error_in_file (s, (_,fname, loc), ie) -> None, ie
+ | _ -> dloc,exc
+ in
+Index: parsing/ppvernac.ml
+===================================================================
+--- parsing/ppvernac.ml (revision 15024)
++++ parsing/ppvernac.ml (revision 15025)
+@@ -781,7 +781,7 @@
+ (if i = 1 then mt() else int i ++ str ": ") ++
+ pr_raw_tactic tac
+ ++ (try if deftac & Pfedit.get_end_tac() <> None then str ".." else mt ()
+- with UserError _|Stdpp.Exc_located _ -> mt())
++ with UserError _|Compat.Exc_located _ -> mt())
+
+ | VernacSolveExistential (i,c) ->
+ str"Existential " ++ int i ++ pr_lconstrarg c
+Index: proofs/refiner.ml
+===================================================================
+--- proofs/refiner.ml (revision 15024)
++++ proofs/refiner.ml (revision 15025)
+@@ -494,15 +494,15 @@
+ let catch_failerror e =
+ if catchable_exception e then check_for_interrupt ()
+ else match e with
+- | FailError (0,_) | Stdpp.Exc_located(_, FailError (0,_))
+- | Stdpp.Exc_located(_, LtacLocated (_,FailError (0,_))) ->
++ | FailError (0,_) | Compat.Exc_located(_, FailError (0,_))
++ | Compat.Exc_located(_, LtacLocated (_,FailError (0,_))) ->
+ check_for_interrupt ()
+ | FailError (lvl,s) -> raise (FailError (lvl - 1, s))
+- | Stdpp.Exc_located(s,FailError (lvl,s')) ->
+- raise (Stdpp.Exc_located(s,FailError (lvl - 1, s')))
+- | Stdpp.Exc_located(s,LtacLocated (s'',FailError (lvl,s'))) ->
++ | Compat.Exc_located(s,FailError (lvl,s')) ->
++ raise (Compat.Exc_located(s,FailError (lvl - 1, s')))
++ | Compat.Exc_located(s,LtacLocated (s'',FailError (lvl,s'))) ->
+ raise
+- (Stdpp.Exc_located(s,LtacLocated (s'',FailError (lvl - 1,s'))))
++ (Compat.Exc_located(s,LtacLocated (s'',FailError (lvl - 1,s'))))
+ | e -> raise e
+
+ (* ORELSE0 t1 t2 tries to apply t1 and if it fails, applies t2 *)
+Index: proofs/logic.ml
+===================================================================
+--- proofs/logic.ml (revision 15024)
++++ proofs/logic.ml (revision 15025)
+@@ -48,7 +48,7 @@
+ open Pretype_errors
+
+ let rec catchable_exception = function
+- | Stdpp.Exc_located(_,e) -> catchable_exception e
++ | Compat.Exc_located(_,e) -> catchable_exception e
+ | LtacLocated(_,e) -> catchable_exception e
+ | Util.UserError _ | TypeError _
+ | RefinerError _ | Indrec.RecursionSchemeError _
diff --git a/community/gnome-packagekit/PKGBUILD b/community/gnome-packagekit/PKGBUILD
index e24803a9c..0d2ffa8b7 100644
--- a/community/gnome-packagekit/PKGBUILD
+++ b/community/gnome-packagekit/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 58924 2011-11-20 11:38:58Z jconder $
+# $Id: PKGBUILD 68215 2012-03-19 12:02:37Z lfleischer $
# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
pkgname=gnome-packagekit
pkgver=3.2.1
-pkgrel=1
+pkgrel=2
pkgdesc='Collection of graphical tools for PackageKit to be used in the GNOME desktop'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.packagekit.org/'
@@ -23,8 +23,8 @@ build() {
cd "$srcdir/$pkgname-$pkgver"
patch -Np1 -i "$srcdir/arch.patch"
- sed -i 's@python@python2@' 'python/enum-convertor.py'
- sed -i 's@python @python2 @' 'python/packagekit/Makefile.in'
+ sed -i 's/python/python2/' python/enum-convertor.py
+ sed -i 's/python enum-convertor.py/python2 enum-convertor.py/' python/packagekit/Makefile.{am,in}
export PYTHON=/usr/bin/python2
./configure --prefix=/usr \
diff --git a/community/ircii-pana/PKGBUILD b/community/ircii-pana/PKGBUILD
index 8ff4655cf..e7325cac8 100644
--- a/community/ircii-pana/PKGBUILD
+++ b/community/ircii-pana/PKGBUILD
@@ -1,52 +1,60 @@
-# $Id: PKGBUILD 22406 2010-07-21 18:30:48Z jlichtblau $
+# $Id: PKGBUILD 68217 2012-03-19 12:39:02Z lfleischer $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Jaroslav Lichtblau <dragonlord@seznam.cz>
# inspired by Gentoo: http://kambing.ui.edu/gentoo-portage/net-irc/bitchx/files/
pkgname=ircii-pana
pkgver=1.1
-pkgrel=4
-pkgdesc="A console-based IRC client - AKA BitchX."
+pkgrel=5
+pkgdesc='A console-based IRC client - AKA BitchX.'
arch=('i686' 'x86_64' 'mips64el')
-url="http://www.bitchx.org"
+url='http://www.bitchx.org'
license=('GPL2')
depends=('ncurses')
makedepends=('patch')
-source=(http://downloads.sourceforge.net/bitchx/${pkgname}-${pkgver}-final.tar.gz \
- bitchx-${pkgver}-gcc43.diff \
- bitchx-${pkgver}-inline.diff \
- bitchx-${pkgver}-freenode.diff \
- bitchx-${pkgver}-latin1.diff \
- bitchx-${pkgver}-64bit.diff)
+source=("http://downloads.sourceforge.net/bitchx/${pkgname}-${pkgver}-final.tar.gz" \
+ "bitchx-${pkgver}-gcc43.diff" \
+ "bitchx-${pkgver}-inline.diff" \
+ "bitchx-${pkgver}-freenode.diff" \
+ "bitchx-${pkgver}-latin1.diff" \
+ "bitchx-${pkgver}-64bit.diff"
+ "bitchx-${pkgver}-open_missing_mode.patch")
md5sums=('611d2dda222f00c10140236f4c331572'
'e1efc5e52658e6651918e07a116bce18'
'4824ffd55d51099dd9ee035f4b78d6bf'
'741e91dd6267d3436c43756429342217'
'9316105f23a67a9bb7ecfc7485dcd098'
- 'c86f7758db7f438d726fd447dd4a83b0')
+ 'c86f7758db7f438d726fd447dd4a83b0'
+ 'a80f431488bf3e0e9f0d650d23a08aba')
build() {
- cd ${srcdir}/BitchX
+ cd "${srcdir}/BitchX"
- patch -Np1 -i ${srcdir}/bitchx-${pkgver}-gcc43.diff || return 1
- patch -Np1 -i ${srcdir}/bitchx-${pkgver}-inline.diff || return 1
- patch -Np1 -i ${srcdir}/bitchx-${pkgver}-freenode.diff || return 1
- patch -Np1 -i ${srcdir}/bitchx-${pkgver}-latin1.diff || return 1
+ patch -Np1 -i "${srcdir}/bitchx-${pkgver}-gcc43.diff"
+ patch -Np1 -i "${srcdir}/bitchx-${pkgver}-inline.diff"
+ patch -Np1 -i "${srcdir}/bitchx-${pkgver}-freenode.diff"
+ patch -Np1 -i "${srcdir}/bitchx-${pkgver}-latin1.diff"
- if [ "$CARCH" == "x86_64" ] ; then
- patch -Np1 -i ${srcdir}/bitchx-${pkgver}-64bit.diff || return 1
- fi
+ # add build fix (needed when building with "-D_FORTIFY_SOURCE=2")
+ patch -Np0 -i "${srcdir}/bitchx-${pkgver}-open_missing_mode.patch"
+
+ [ "$CARCH" == "x86_64" ] && patch -Np1 -i "${srcdir}/bitchx-${pkgver}-64bit.diff"
./configure --prefix=/usr
- make || return 1
- make prefix=${pkgdir}/usr install
+ make
+}
+
+package() {
+ cd "${srcdir}/BitchX"
+
+ make prefix="${pkgdir}/usr" install
-#we don't want to link to ${pkgdir}, correcting it then
- cd ${pkgdir}/usr/bin || return 1
- rm -f BitchX && ln -s BitchX-${pkgver}-final BitchX || return 1
+ # we don't want to link to ${pkgdir}, correcting it then
+ cd "${pkgdir}/usr/bin"
+ rm -f BitchX && ln -s "BitchX-${pkgver}-final" BitchX
-#correcting man page
- rm -rf ${pkgdir}/usr/man || return 1
- install -D -m644 ${srcdir}/BitchX/doc/BitchX.1 ${pkgdir}/usr/share/man/man1/BitchX.1 || return 1
+ # correcting man page
+ rm -rf "${pkgdir}/usr/man"
+ install -Dm644 "${srcdir}/BitchX/doc/BitchX.1" "${pkgdir}/usr/share/man/man1/BitchX.1"
}
diff --git a/community/ircii-pana/bitchx-1.1-open_missing_mode.patch b/community/ircii-pana/bitchx-1.1-open_missing_mode.patch
new file mode 100644
index 000000000..3ae432979
--- /dev/null
+++ b/community/ircii-pana/bitchx-1.1-open_missing_mode.patch
@@ -0,0 +1,22 @@
+--- source/commands2.c.orig 2012-03-19 13:10:06.802575691 +0100
++++ source/commands2.c 2012-03-19 13:10:26.401100927 +0100
+@@ -2575,7 +2575,7 @@ unsigned short port = 0;
+ {
+ char buf[BIG_BUFFER_SIZE+1];
+ sprintf(buf, socket_path, port);
+- if ((u = open(buf, O_CREAT|O_WRONLY)) != -1)
++ if ((u = open(buf, O_CREAT|O_WRONLY, 0644)) != -1)
+ {
+ chmod(buf, SOCKMODE);
+ chown(buf, getuid(), getgid());
+--- source/dcc.c.orig 2012-03-19 13:18:43.390562273 +0100
++++ source/dcc.c 2012-03-19 13:17:23.729859849 +0100
+@@ -2273,7 +2273,7 @@ char *nick;
+ tmp = m_strdup(new->filename);
+ if (!(fullname = expand_twiddle(tmp)))
+ malloc_strcpy(&fullname, tmp);
+- if ((new->file = open(fullname, O_WRONLY | O_CREAT | O_BINARY)) != -1)
++ if ((new->file = open(fullname, O_WRONLY | O_CREAT | O_BINARY, 0644)) != -1)
+ {
+ if ((new = dcc_create(nick, new->filename, passwd, 0, port? atol(port) : 0, DCC_REFILEREAD, (tdcc?DCC_TDCC:0) | DCC_TWOCLIENTS|DCC_OFFER, start_dcc_get)))
+ new->blocksize = blocksize;
diff --git a/community/libmemcached/PKGBUILD b/community/libmemcached/PKGBUILD
index 040b67f50..677f9247c 100644
--- a/community/libmemcached/PKGBUILD
+++ b/community/libmemcached/PKGBUILD
@@ -1,18 +1,18 @@
-# $Id: PKGBUILD 62973 2012-01-29 19:01:45Z foutrelis $
+# $Id: PKGBUILD 68226 2012-03-19 18:14:05Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
pkgname=libmemcached
-pkgver=1.0.4
+pkgver=1.0.5
pkgrel=1
pkgdesc="C and C++ client library to the memcached server"
arch=('i686' 'x86_64' 'mips64el')
url="http://libmemcached.org/"
license=('GPL')
-depends=('glibc' 'libsasl')
+depends=('glibc' 'libsasl' 'libevent')
makedepends=('perl')
options=('!libtool')
source=(http://launchpad.net/$pkgname/1.0/$pkgver/+download/$pkgname-$pkgver.tar.gz)
-sha256sums=('1dd0a9fb5823aa6f8337a3beaeb287bb92041005c136622b4d82622a9428e20c')
+sha256sums=('a1bae7f8ce0e36133bd36b0fc72ad37d985e4e476b0949efeadf7e94c2d00ea0')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/community/linux-tools/PKGBUILD b/community/linux-tools/PKGBUILD
index ff010adb3..bbf7b14d2 100644
--- a/community/linux-tools/PKGBUILD
+++ b/community/linux-tools/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 68094 2012-03-17 19:58:42Z seblu $
+# $Id: PKGBUILD 68213 2012-03-19 11:50:40Z seblu $
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
pkgbase=linux-tools
pkgname=('perf' 'cpupower')
-pkgver=3.2
-kernver=${pkgver}.11
+pkgver=3.3
+kernver=${pkgver}
[[ ${kernver##*rc} != $kernver ]] && testing='testing'
-pkgrel=4
+pkgrel=1
license=('GPL2')
arch=('i686' 'x86_64')
url='http://www.kernel.org'
@@ -18,7 +18,7 @@ source=("http://ftp.kernel.org/pub/linux/kernel/v3.0/$testing/linux-$kernver.tar
'cpupower.rc'
'cpupower.conf'
'cpupower.service')
-md5sums=('0e3d5a3dab51b3c36940461582bc06df'
+md5sums=('7133f5a2086a7d7ef97abac610c094f5'
'26af384ca282bc0dc38ff65acc7bb4b9'
'857ccdd0598511e3bf4b63522754dc48'
'20870541e88109d2f153be3c58a277f1')
diff --git a/community/lrzip/PKGBUILD b/community/lrzip/PKGBUILD
new file mode 100644
index 000000000..b6674b0e1
--- /dev/null
+++ b/community/lrzip/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 68229 2012-03-19 18:33:11Z arodseth $
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: graysky <graysky AT archlinux DOT us>
+# Contributor: kastor@fobos.org.ar
+
+pkgname=lrzip
+pkgver=0.612
+pkgrel=2
+pkgdesc="Multi-threaded compression using the rzip/lzma, lzo, and zpaq algorithms"
+url="http://lrzip.kolivas.org/"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('lzo2' 'bzip2' 'zlib' 'bash' 'gcc-libs')
+if [ "$CARCH" != "x86_64" ]
+then
+ depends+=('nasm')
+ _flag="--enable-asm"
+fi
+options=('!libtool')
+source=("http://ck.kolivas.org/apps/$pkgname/$pkgname-$pkgver.tar.bz2")
+sha256sums=('2c309fb40766207f1deeb09e2431ae34db7e6d7a22d713c25efcc84ed8c52e97')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ CFLAGS="$CFLAGS -fomit-frame-pointer"
+ CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
+ ./autogen.sh --prefix=/usr "$_flag"
+ make
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make -k check
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install-strip
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/oolite/PKGBUILD b/community/oolite/PKGBUILD
index 5035aa055..b8e6b46e6 100644
--- a/community/oolite/PKGBUILD
+++ b/community/oolite/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 66069 2012-02-22 19:31:51Z svenstaro $
+# $Id: PKGBUILD 68211 2012-03-19 11:26:32Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Lone_Wolf <lonewolf@xs4all.nl>
pkgname=oolite
pkgver=1.76
-pkgrel=2
+pkgrel=3
pkgdesc="A space-sim based on the classic Elite"
arch=('i686' 'x86_64' 'mips64el')
url="http://oolite-linux.berlios.de"
@@ -11,7 +11,8 @@ license=('GPL2')
depends=('gnustep-gui' 'sdl_mixer' 'mesa' 'espeak' 'nspr' 'python2' 'icu')
makedepends=('gcc-objc' 'gnustep-make' 'curl' 'zip')
options=(!makeflags)
-source=(oolite http://download2.berlios.de/oolite-linux/oolite-source-${pkgver}.tar.bz2)
+source=(oolite
+ http://downloads.sourceforge.net/oolite-linux.berlios/oolite-source-$pkgver.tar.bz2)
md5sums=('b182976fade9b64a3b3702e2a8c72bf0'
'd540486facd8275dc6bceebae8428dce')
diff --git a/community/spectrwm/PKGBUILD b/community/spectrwm/PKGBUILD
index 8a45faf45..b97b60386 100644
--- a/community/spectrwm/PKGBUILD
+++ b/community/spectrwm/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 66738 2012-02-27 21:56:37Z kkeen $
+# $Id: PKGBUILD 68224 2012-03-19 15:53:19Z kkeen $
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
pkgname=spectrwm
pkgver=1.0.0
-pkgrel=2
+pkgrel=3
pkgdesc="A minimalistic dynamic tiling window manager that tries to stay out of the way."
arch=('i686' 'x86_64')
url="http://www.spectrwm.org"
@@ -41,6 +41,8 @@ package() {
cd ..
install -Dm644 spectrwm.conf "$pkgdir/etc/spectrwm.conf"
install -Dm755 screenshot.sh "$pkgdir/usr/share/spectrwm/screenshot.sh"
+ mkdir -p "$pkgdir/etc/spectrwm"
+ cp spectrwm_*.conf "$pkgdir/etc/spectrwm/"
cd "$srcdir"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm755 baraction.sh "$pkgdir/usr/share/spectrwm/baraction.sh"
diff --git a/extra/gnome-desktop/PKGBUILD b/extra/gnome-desktop/PKGBUILD
index 1faf9806b..9de1b6492 100644
--- a/extra/gnome-desktop/PKGBUILD
+++ b/extra/gnome-desktop/PKGBUILD
@@ -1,23 +1,23 @@
-# $Id: PKGBUILD 140889 2011-10-20 05:42:36Z ibiru $
+# $Id: PKGBUILD 153780 2012-03-19 17:06:57Z ibiru $
# Maintainer: Jan de Groot <jan@archlinux.org>
pkgname=gnome-desktop
pkgver=3.2.1
pkgrel=1
+epoch=1
pkgdesc="Library with common API for various GNOME modules"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL' 'LGPL')
-depends=('gsettings-desktop-schemas' 'startup-notification' 'gtk3')
+depends=('gsettings-desktop-schemas' 'gtk3')
makedepends=('gnome-doc-utils' 'intltool' 'gobject-introspection')
url="http://www.gnome.org"
groups=('gnome')
options=('!libtool')
-source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz)
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
sha256sums=('4cb00d22360f9ae4bc3fb79efe7868fd54fcbfcd4f7050c71fc97699ec3a86a2')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
+ cd "$pkgname-$pkgver"
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --disable-static \
--with-gnome-distributor="Arch Linux" \
@@ -26,6 +26,6 @@ build() {
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
}
diff --git a/extra/libtasn1/PKGBUILD b/extra/libtasn1/PKGBUILD
index 2c168e6c1..097a7b584 100644
--- a/extra/libtasn1/PKGBUILD
+++ b/extra/libtasn1/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 151276 2012-02-25 10:48:25Z allan $
+# $Id: PKGBUILD 153833 2012-03-19 19:50:28Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=libtasn1
-pkgver=2.9
-pkgrel=2
+pkgver=2.12
+pkgrel=1
pkgdesc="The ASN.1 library used in GNUTLS"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL3' 'LGPL')
@@ -12,8 +12,9 @@ url="http://www.gnu.org/software/libtasn1/"
depends=('glibc' 'texinfo')
options=('!libtool')
install=libtasn1.install
-source=(ftp://ftp.gnu.org/gnu/libtasn1/${pkgname}-${pkgver}.tar.gz)
-md5sums=('f4f4035b84550100ffeb8ad4b261dea9')
+source=(ftp://ftp.gnu.org/gnu/libtasn1/${pkgname}-${pkgver}.tar.gz{,.sig})
+sha1sums=('b73539aee5444efb5e606b94bdf3ec5bfedb8620'
+ 'c260eae1003b4195b3a1065252b69e95ae482661')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/nasm/PKGBUILD b/extra/nasm/PKGBUILD
index 56dc69ac4..7e01e55f5 100644
--- a/extra/nasm/PKGBUILD
+++ b/extra/nasm/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 150735 2012-02-21 15:12:29Z stephane $
-# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# $Id: PKGBUILD 153792 2012-03-19 18:12:16Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Aaron Griffin <aaron@archlinux.org>
pkgbase=nasm
pkgname=('nasm' 'nasm-doc')
-pkgver=2.09.10
-pkgrel=2
+pkgver=2.10
+pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
url="http://www.nasm.us"
license=('BSD')
makedepends=('ghostscript')
source=(http://www.nasm.us/pub/nasm/releasebuilds/${pkgver}/${pkgbase}-${pkgver}.tar.bz2)
-md5sums=('15c79dcb5838870a0fac15feb5fade66')
-sha1sums=('ca57a7454b29e18c64018e49cdf5c832937497ab')
+sha1sums=('acdcae5366230e2e19b2ad36f952df0232c80950')
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
@@ -26,17 +26,17 @@ package_nasm() {
cd "${srcdir}/${pkgbase}-${pkgver}"
make INSTALLROOT="${pkgdir}" install install_rdf
- install -d "${pkgdir}/usr/share/info"
- install -m644 doc/info/* "${pkgdir}/usr/share/info/"
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/nasm/LICENSE"
+ install -d "${pkgdir}"/usr/share/info
+ install -m644 doc/info/* "${pkgdir}"/usr/share/info/
+ install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/nasm/LICENSE
}
package_nasm-doc() {
pkgdesc="An 80x86 assembler designed for portability and modularity (manuals)"
cd "${srcdir}/${pkgbase}-${pkgver}/doc"
- install -d "${pkgdir}/usr/share/doc/nasm/html"
- install -m644 html/* "${pkgdir}/usr/share/doc/nasm/html/"
- install -m644 nasmdoc.ps nasmdoc.pdf nasmdoc.txt "${pkgdir}/usr/share/doc/nasm/"
- install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/nasm-doc/LICENSE"
+ install -d "${pkgdir}"/usr/share/doc/nasm/html
+ install -m644 html/* "${pkgdir}"/usr/share/doc/nasm/html/
+ install -m644 nasmdoc.ps nasmdoc.pdf nasmdoc.txt "${pkgdir}"/usr/share/doc/nasm/
+ install -D -m644 ../LICENSE "${pkgdir}"/usr/share/licenses/nasm-doc/LICENSE
}
diff --git a/extra/vlc/PKGBUILD b/extra/vlc/PKGBUILD
index b18902e5b..807911691 100644
--- a/extra/vlc/PKGBUILD
+++ b/extra/vlc/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 151463 2012-02-26 12:17:02Z giovanni $
+# $Id: PKGBUILD 153753 2012-03-19 15:14:49Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
# Contributor: Martin Sandsmark <martin.sandsmark@kde.org>
pkgname=vlc
-pkgver=2.0.0
-pkgrel=8
+pkgver=2.0.1
+pkgrel=1
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.videolan.org/vlc/"
@@ -53,21 +53,15 @@ backup=('usr/share/vlc/lua/http/.hosts'
'usr/share/vlc/lua/http/dialogs/.hosts')
options=('!libtool' '!emptydirs')
install=vlc.install
-source=("http://download.videolan.org/pub/videolan/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz"
- 'access_smb_link_to_smbclient.patch')
-md5sums=('8806bff2ea9c76791123d444a92f708c'
- '5f510fdea99cdb7941423eb40045968a')
+source=("http://download.videolan.org/pub/videolan/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz")
+md5sums=('5ad114755670e4881a2b35354e2f79bc')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
sed -i -e 's:truetype/freefont:TTF:g' modules/text_renderer/freetype.c
- patch -Np1 -i "${srcdir}/access_smb_link_to_smbclient.patch"
- autoreconf -fi
-
[ "$CARCH" = "mips64el" ] && extraconf="--disable-lirc"
-
./configure --prefix=/usr \
--disable-rpath \
--enable-oss \
diff --git a/extra/xf86-video-mga/PKGBUILD b/extra/xf86-video-mga/PKGBUILD
index de2dec7d5..10b01e817 100644
--- a/extra/xf86-video-mga/PKGBUILD
+++ b/extra/xf86-video-mga/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 153346 2012-03-12 20:53:41Z andyrtr $
+# $Id: PKGBUILD 153814 2012-03-19 19:03:46Z 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/extra/xf86-video-mga/git-fixes.patch b/extra/xf86-video-mga/git-fixes.patch
index 3534342e6..70650b0d1 100644
--- a/extra/xf86-video-mga/git-fixes.patch
+++ b/extra/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
diff --git a/gnome-unstable/gdm/PKGBUILD b/gnome-unstable/gdm/PKGBUILD
new file mode 100644
index 000000000..e3e538560
--- /dev/null
+++ b/gnome-unstable/gdm/PKGBUILD
@@ -0,0 +1,65 @@
+# $Id: PKGBUILD 153851 2012-03-19 22:43:18Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gdm
+pkgver=3.3.92.1
+pkgrel=1
+pkgdesc="Gnome Display Manager (a reimplementation of xdm)"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnome.org"
+backup=('etc/pam.d/gdm-autologin' 'etc/pam.d/gdm-fingerprint' 'etc/pam.d/gdm' 'etc/pam.d/gdm-password'
+ 'etc/pam.d/gdm-smartcard' 'etc/pam.d/gdm-welcome' 'etc/gdm/custom.conf')
+groups=('gnome-extra')
+options=('!libtool')
+depends=('libcanberra' 'libxklavier' 'gnome-session' 'gnome-settings-daemon' 'metacity' 'upower' 'accountsservice' 'consolekit' 'xorg-xrdb' 'nss')
+makedepends=('intltool' 'gnome-doc-utils' 'xorg-server' 'gobject-introspection')
+optdepends=('gnome-shell: new login interface'
+ 'fprintd: fingerprint authentication')
+install=gdm.install
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*.*}/$pkgname-$pkgver.tar.xz
+ fix_external_program_directories.patch
+ gdm-vt-allocation-hack.patch
+ gdm
+ gdm-autologin.pam gdm-fingerprint.pam gdm.pam gdm-password.pam gdm-smartcard.pam gdm-welcome.pam)
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -Np1 -i "$srcdir/fix_external_program_directories.patch"
+ patch -Np1 -i "$srcdir/gdm-vt-allocation-hack.patch"
+
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/gdm \
+ --localstatedir=/var \
+ --with-at-spi-registryd-directory=/usr/lib/at-spi2-core \
+ --disable-scrollkeeper \
+ --disable-static \
+ --without-tcp-wrappers \
+ --disable-schemas-compile
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ for i in gdm-autologin.pam gdm-fingerprint.pam gdm.pam gdm-password.pam gdm-smartcard.pam gdm-welcome.pam;do
+ install -m644 "$srcdir/$i" "$pkgdir/etc/pam.d/${i%.pam}"
+ done
+
+ install -Dm755 "${srcdir}/gdm" "${pkgdir}/etc/rc.d/gdm"
+
+ chmod 1770 "$pkgdir/var/log/gdm"
+ chmod 700 "$pkgdir/var/lib/gdm/.config/dconf"
+ rm -rf "$pkgdir/var/run" "$pkgdir/var/gdm"
+}
+sha256sums=('957456fa8f3c5243c45d5f0be89931a515b79efd881a0423e8552a8f46c5379c'
+ 'f68600ccf80f475deb417d58ab3306c4a1ba4622688e2901996c8549c85a9ee6'
+ '3c8b588d4af08d94dc93bcd5e4c2a983c3f4fbbbe40833bceac2a1df4f1e8215'
+ '272c08d8e8b50bf424d0705ac864d4c18c47ec4f6893b1af732c2efbc86c9550'
+ 'b30dfa217718b43ff3aa4e8af08985963175b79ff30698ec54e8396d2905922d'
+ '5bc3ff3ea7b31219dfcb7d9fc0eb2819eca1c5573a0f426d288a17560a69633e'
+ 'f1dfa4d88288d4b0a631a68a51b46c2da537bee8fe5a99f9f288c8ff75a50b19'
+ '92aded0804bad8a609fd150448ad4a2edb8166c17cb4e2b581559e80603bbb6c'
+ 'df74b0dcfb17ea43cc1e268a27cd256c552672457db1af40b285452d16b3e2fd'
+ '39bf3824cc505043dc3136356da16dab9df9f369f1077435a324be2ac16cf834')
diff --git a/gnome-unstable/gdm/fix_external_program_directories.patch b/gnome-unstable/gdm/fix_external_program_directories.patch
new file mode 100644
index 000000000..b3a0f0cf6
--- /dev/null
+++ b/gnome-unstable/gdm/fix_external_program_directories.patch
@@ -0,0 +1,34 @@
+diff -Nur gdm-3.3.92.orig/daemon/gdm-server.c gdm-3.3.92/daemon/gdm-server.c
+--- gdm-3.3.92.orig/daemon/gdm-server.c 2012-03-19 22:30:05.311490006 +0000
++++ gdm-3.3.92/daemon/gdm-server.c 2012-03-19 22:30:17.004732251 +0000
+@@ -139,7 +139,7 @@
+ g_return_val_if_fail (GDM_IS_SERVER (server), NULL);
+
+ error = NULL;
+- command = g_strdup_printf (LIBEXECDIR "/ck-get-x11-display-device --display %s",
++ command = g_strdup_printf ("/usr/lib/ConsoleKit/ck-get-x11-display-device --display %s",
+ server->priv->display_name);
+
+ g_debug ("GdmServer: Running helper %s", command);
+diff -Nur gdm-3.3.92.orig/data/gdm-shell.session.in gdm-3.3.92/data/gdm-shell.session.in
+--- gdm-3.3.92.orig/data/gdm-shell.session.in 2012-03-19 22:30:05.311490006 +0000
++++ gdm-3.3.92/data/gdm-shell.session.in 2012-03-19 22:30:17.004732251 +0000
+@@ -1,5 +1,5 @@
+ [GNOME Session]
+ Name=Display Manager
+ RequiredComponents=gnome-shell;gnome-settings-daemon;
+-IsRunnableHelper=bash -c 'gnome-shell --help | grep -q gdm-mode && @libexecdir@/gnome-session-check-accelerated'
++IsRunnableHelper=bash -c 'gnome-shell --help | grep -q gdm-mode && /usr/lib/gnome-session/gnome-session-check-accelerated'
+ FallbackSession=gdm-fallback
+diff -Nur gdm-3.3.92.orig/gui/simple-chooser/gdm-chooser-session.c gdm-3.3.92/gui/simple-chooser/gdm-chooser-session.c
+--- gdm-3.3.92.orig/gui/simple-chooser/gdm-chooser-session.c 2012-03-19 22:30:05.304823391 +0000
++++ gdm-3.3.92/gui/simple-chooser/gdm-chooser-session.c 2012-03-19 22:30:17.004732251 +0000
+@@ -131,7 +131,7 @@
+ ret = FALSE;
+
+ error = NULL;
+- g_spawn_command_line_async (LIBEXECDIR "/gnome-settings-daemon", &error);
++ g_spawn_command_line_async ("/usr/lib/gnome-settings-daemon/gnome-settings-daemon", &error);
+ if (error != NULL) {
+ g_warning ("Error starting settings daemon: %s", error->message);
+ g_error_free (error);
diff --git a/gnome-unstable/gdm/gdm b/gnome-unstable/gdm/gdm
new file mode 100755
index 000000000..c3e635a6d
--- /dev/null
+++ b/gnome-unstable/gdm/gdm
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting GDM"
+ /usr/sbin/gdm &
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+
+ add_daemon gdm
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping GDM"
+ [ -f /var/run/gdm.pid ] && kill `cat /var/run/gdm.pid` &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon gdm
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/gnome-unstable/gdm/gdm-autologin.pam b/gnome-unstable/gdm/gdm-autologin.pam
new file mode 100644
index 000000000..c77c78917
--- /dev/null
+++ b/gnome-unstable/gdm/gdm-autologin.pam
@@ -0,0 +1,18 @@
+#%PAM-1.0
+auth requisite pam_nologin.so
+auth required pam_env.so
+
+auth requisite pam_permit.so
+
+auth sufficient pam_succeed_if.so uid >= 1000 quiet
+auth required pam_deny.so
+
+account required pam_unix.so
+
+password required pam_deny.so
+
+session required pam_loginuid.so
+-session optional pam_systemd.so
+session optional pam_keyinit.so revoke
+session required pam_limits.so
+session required pam_unix.so
diff --git a/gnome-unstable/gdm/gdm-fingerprint.pam b/gnome-unstable/gdm/gdm-fingerprint.pam
new file mode 100644
index 000000000..5b74bf6d6
--- /dev/null
+++ b/gnome-unstable/gdm/gdm-fingerprint.pam
@@ -0,0 +1,18 @@
+#%PAM-1.0
+auth requisite pam_nologin.so
+auth required pam_env.so
+
+auth requisite pam_fprintd.so
+
+auth sufficient pam_succeed_if.so uid >= 1000 quiet
+auth required pam_deny.so
+
+account required pam_unix.so
+
+password required pam_deny.so
+
+session required pam_loginuid.so
+-session optional pam_systemd.so
+session optional pam_keyinit.so revoke
+session required pam_limits.so
+session required pam_unix.so
diff --git a/gnome-unstable/gdm/gdm-password.pam b/gnome-unstable/gdm/gdm-password.pam
new file mode 100644
index 000000000..aa4d4dd47
--- /dev/null
+++ b/gnome-unstable/gdm/gdm-password.pam
@@ -0,0 +1,20 @@
+#%PAM-1.0
+auth requisite pam_nologin.so
+auth required pam_env.so
+
+auth requisite pam_unix.so nullok
+auth optional pam_gnome_keyring.so
+
+auth sufficient pam_succeed_if.so uid >= 1000 quiet
+auth required pam_deny.so
+
+account required pam_unix.so
+
+password required pam_unix.so
+
+session required pam_loginuid.so
+-session optional pam_systemd.so
+session optional pam_keyinit.so force revoke
+session required pam_limits.so
+session required pam_unix.so
+session optional pam_gnome_keyring.so auto_start
diff --git a/gnome-unstable/gdm/gdm-smartcard.pam b/gnome-unstable/gdm/gdm-smartcard.pam
new file mode 100644
index 000000000..baacb8bed
--- /dev/null
+++ b/gnome-unstable/gdm/gdm-smartcard.pam
@@ -0,0 +1,18 @@
+#%PAM-1.0
+auth requisite pam_nologin.so
+auth required pam_env.so
+
+auth requisite pam_pkcs11.so wait_for_card card_only
+
+auth sufficient pam_succeed_if.so uid >= 1000 quiet
+auth required pam_deny.so
+
+account required pam_unix.so
+
+password required pam_pkcs11.so
+
+session required pam_loginuid.so
+-session optional pam_systemd.so
+session optional pam_keyinit.so revoke
+session required pam_limits.so
+session required pam_unix.so
diff --git a/gnome-unstable/gdm/gdm-vt-allocation-hack.patch b/gnome-unstable/gdm/gdm-vt-allocation-hack.patch
new file mode 100644
index 000000000..56fa5a151
--- /dev/null
+++ b/gnome-unstable/gdm/gdm-vt-allocation-hack.patch
@@ -0,0 +1,118 @@
+diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
+index 39def47..03488fd 100644
+--- a/daemon/gdm-server.c
++++ b/daemon/gdm-server.c
+@@ -33,6 +33,8 @@
+ #include <grp.h>
+ #include <signal.h>
+ #include <sys/resource.h>
++#include <sys/ioctl.h>
++#include <sys/vt.h>
+
+ #include <glib.h>
+ #include <glib/gi18n.h>
+@@ -150,6 +152,92 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
+ return out;
+ }
+
++#ifndef O_NOCTTY
++# define O_NOCTTY 0
++#endif
++
++static int
++open_vt (int vtno)
++{
++ char *vtname;
++ int fd;
++
++ vtname = g_strdup_printf ("/dev/tty%d", vtno);
++
++ do {
++ errno = 0;
++ fd = open (vtname, O_RDWR | O_NOCTTY, 0);
++ } while (errno == EINTR);
++
++ g_free (vtname);
++ return fd;
++}
++
++static gint
++find_first_probably_free_vt (void)
++{
++ int fd, fdv;
++ int vtno;
++ unsigned short vtmask;
++ struct vt_stat vtstat;
++ guint v_state;
++
++ fdv = -1;
++
++ do {
++ errno = 0;
++ fd = open ("/dev/console", O_WRONLY | O_NOCTTY, 0);
++ } while (errno == EINTR);
++
++ if (fd >= 0) {
++ if (ioctl (fd, VT_GETSTATE, &vtstat) >= 0) {
++ v_state = vtstat.v_state;
++ } else {
++ close (fd);
++ v_state = 0;
++ fd = -1;
++ }
++ } else {
++ v_state = 0;
++ }
++
++ if (fd < 0) {
++ do {
++ errno = 0;
++ fd = open ("/dev/console", O_RDONLY | O_NOCTTY, 0);
++ } while (errno == EINTR);
++
++ if (fd >= 0) {
++ if (ioctl (fd, VT_GETSTATE, &vtstat) >= 0)
++ v_state = vtstat.v_state;
++ }
++ }
++
++ for (vtno = 7, vtmask = 1 << vtno; vtmask; vtno++, vtmask <<= 1) {
++ /* Is this console in use? */
++ if (v_state & vtmask)
++ continue;
++
++ /* No, try to open it */
++ fdv = open_vt (vtno);
++ if (fdv >= 0)
++ break;
++
++ /* If we're here, kernel indicated that the console was free,
++ * but we failed to open it. Just go on to higher VTs. */
++ }
++
++ if (fdv >= 0)
++ close (fdv);
++ else
++ vtno = -1;
++
++ if (fd >= 0)
++ close (fd);
++
++ return vtno;
++}
++
+ char *
+ gdm_server_get_display_device (GdmServer *server)
+ {
+@@ -310,6 +398,11 @@ gdm_server_resolve_command_line (GdmServer *server,
+
+ if (vtarg != NULL && ! gotvtarg) {
+ argv[len++] = g_strdup (vtarg);
++ } else if (!query_in_arglist && !gotvtarg) {
++ gint vtnum = find_first_probably_free_vt ();
++
++ if (vtnum > 0)
++ argv [len++] = g_strdup_printf ("vt%d", vtnum);
+ }
+
+ argv[len++] = NULL;
diff --git a/gnome-unstable/gdm/gdm-welcome.pam b/gnome-unstable/gdm/gdm-welcome.pam
new file mode 100644
index 000000000..cc3811c19
--- /dev/null
+++ b/gnome-unstable/gdm/gdm-welcome.pam
@@ -0,0 +1,12 @@
+#%PAM-1.0
+auth required pam_env.so
+auth required pam_permit.so
+
+account required pam_nologin.so
+account required pam_unix.so
+
+password required pam_deny.so
+
+session required pam_loginuid.so
+-session optional pam_systemd.so
+session optional pam_keyinit.so force revoke
diff --git a/gnome-unstable/gdm/gdm.install b/gnome-unstable/gdm/gdm.install
new file mode 100644
index 000000000..c48faf4ae
--- /dev/null
+++ b/gnome-unstable/gdm/gdm.install
@@ -0,0 +1,30 @@
+pkgname=gdm
+
+post_install() {
+ getent group gdm >/dev/null 2>&1 || groupadd -g 120 gdm
+ getent passwd gdm > /dev/null 2>&1 || usr/sbin/useradd -c 'Gnome Display Manager' -u 120 -g gdm -d /var/lib/gdm -s /sbin/nologin gdm
+ passwd -l gdm > /dev/null
+ chown -R gdm:gdm /var/lib/gdm > /dev/null
+
+ glib-compile-schemas /usr/share/glib-2.0/schemas
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+ dconf update
+}
+
+pre_upgrade() {
+ if [ -f /usr/share/gconf/schemas/${pkgname}.schemas ]; then
+ gconfpkg --uninstall ${pkgname}
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ glib-compile-schemas /usr/share/glib-2.0/schemas
+ dconf update
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+ getent passwd gdm >/dev/null 2>&1 && userdel gdm
+ getent group gdm >/dev/null 2>&1 && groupdel gdm
+}
diff --git a/gnome-unstable/gdm/gdm.pam b/gnome-unstable/gdm/gdm.pam
new file mode 100644
index 000000000..655299cb7
--- /dev/null
+++ b/gnome-unstable/gdm/gdm.pam
@@ -0,0 +1,10 @@
+#%PAM-1.0
+auth requisite pam_nologin.so
+auth required pam_env.so
+auth required pam_unix.so
+auth optional pam_gnome_keyring.so
+account required pam_unix.so
+session required pam_limits.so
+session required pam_unix.so
+session optional pam_gnome_keyring.so auto_start
+password required pam_unix.so
diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD
index 28cb4339d..2fd86a35a 100644
--- a/libre/linux-libre-lts/PKGBUILD
+++ b/libre/linux-libre-lts/PKGBUILD
@@ -9,7 +9,7 @@ pkgname=('linux-libre-lts' 'linux-libre-lts-headers') # Build stock -LIBRE kerne
# pkgname=linux-custom # Build kernel with a different name
_kernelname=-LIBRE-LTS
_basekernel=3.0
-_sublevel=24
+_sublevel=25
pkgver=${_basekernel}.${_sublevel}
_lxopkgver=${_basekernel}.24 # nearly always the same as pkgver
pkgrel=1
@@ -18,8 +18,8 @@ url="http://linux-libre.fsfla.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
options=('!strip')
-source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-libre/linux-${_basekernel}-libre.tar.xz"
- "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz"
+source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz"
+ "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz"
# the main kernel config files
'config.i686' 'config.x86_64'
# standard config files for mkinitcpio ramdisk
@@ -31,17 +31,17 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-li
'i915-fix-ghost-tv-output.patch'
'ext4-options.patch'
"http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/linux-patches-${_lxopkgver}-libre-lemote_0lxo_mipsel.tar.bz2")
-md5sums=('44e7bc20c235a193f9b6123a8d5e9509'
- '6e746bffa81b08f165d3a5328eac0454'
- '054af37f538b74a8090fc3e783a2edfa'
- 'e195768d5b8cbe788dbe615561d4314f'
+md5sums=('5f64180fe7df4e574dac5911b78f5067'
+ 'f7b2ffc8ddec5819f8bac7d6c2afc629'
+ '8870dc3eff3ada9abf727892a9503350'
+ '33e7aa6dd13f780b8b65653dfa81c57e'
'd2c0701480bce49fd4b40dc46b9863f1'
'2967cecc3af9f954ccc822fd63dca6ff'
'8267264d9a8966e57fdacd1fa1fc65c4'
'04b21c79df0a952c22d681dd4f4562df'
'9d3c56a4b999c8bfbd4018089a62f662'
'263725f20c0b9eb9c353040792d644e5'
- '74d2b710d6c97aee441d7566f8f68815'
+ 'f36222e7ce20c8e4dc27376f9be60f6c'
'0b11552c826f65b666dfb53f2c8c12bb')
if [ "$CARCH" != "mips64el" ]; then
# Don't use the Loongson-specific patches on non-mips64el arches.
@@ -53,7 +53,7 @@ build() {
cd "${srcdir}/linux-${_basekernel}"
if [ "${_basekernel}" != "${pkgver}" ]; then
- patch -Np1 -i "${srcdir}/patch-${_basekernel}-libre-${pkgver}-libre"
+ patch -Np1 -i "${srcdir}/patch-${_basekernel}-gnu-${pkgver}-gnu"
fi
# Add freedo as boot logo
diff --git a/libre/linux-libre-lts/config.i686 b/libre/linux-libre-lts/config.i686
index 820ee9b2b..f39e9c870 100644
--- a/libre/linux-libre-lts/config.i686
+++ b/libre/linux-libre-lts/config.i686
@@ -511,17 +511,17 @@ CONFIG_APM_DO_ENABLE=y
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
+CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
#
@@ -5455,7 +5455,7 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
CONFIG_SCHED_DEBUG=y
-# CONFIG_SCHEDSTATS is not set
+CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
diff --git a/libre/linux-libre-lts/config.x86_64 b/libre/linux-libre-lts/config.x86_64
index a8c0e10c0..6ec74a8a4 100644
--- a/libre/linux-libre-lts/config.x86_64
+++ b/libre/linux-libre-lts/config.x86_64
@@ -494,17 +494,17 @@ CONFIG_SFI=y
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
+CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
#
@@ -5197,7 +5197,7 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
CONFIG_SCHED_DEBUG=y
-# CONFIG_SCHEDSTATS is not set
+CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
diff --git a/libre/linux-libre-lts/ext4-options.patch b/libre/linux-libre-lts/ext4-options.patch
index 4aa23fdef..ef1b2417d 100644
--- a/libre/linux-libre-lts/ext4-options.patch
+++ b/libre/linux-libre-lts/ext4-options.patch
@@ -12,28 +12,28 @@ index 502c61f..30de9cd 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1333,6 +1333,7 @@ enum {
- Opt_inode_readahead_blks, Opt_journal_ioprio,
- Opt_dioread_nolock, Opt_dioread_lock,
- Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
+ Opt_inode_readahead_blks, Opt_journal_ioprio,
+ Opt_dioread_nolock, Opt_dioread_lock,
+ Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
+ Opt_nocheck, Opt_reservation, Opt_noreservation, Opt_journal_inum,
};
-
+
static const match_table_t tokens = {
@@ -1408,6 +1409,10 @@ static const match_table_t tokens = {
- {Opt_init_itable, "init_itable=%u"},
- {Opt_init_itable, "init_itable"},
- {Opt_noinit_itable, "noinit_itable"},
+ {Opt_init_itable, "init_itable=%u"},
+ {Opt_init_itable, "init_itable"},
+ {Opt_noinit_itable, "noinit_itable"},
+ {Opt_nocheck, "nocheck"},
+ {Opt_reservation, "reservation"},
+ {Opt_noreservation, "noreservation"},
+ {Opt_journal_inum, "journal=%u"},
- {Opt_err, NULL},
+ {Opt_err, NULL},
};
-
+
@@ -1904,6 +1909,16 @@ set_qf_format:
- case Opt_noinit_itable:
- clear_opt(sb, INIT_INODE_TABLE);
- break;
+ case Opt_noinit_itable:
+ clear_opt(sb, INIT_INODE_TABLE);
+ break;
+#ifdef CONFIG_EXT4_USE_FOR_EXT23
+ case Opt_nocheck:
+ case Opt_reservation:
@@ -44,6 +44,6 @@ index 502c61f..30de9cd 100644
+ "by ext4 module", p);
+ break;
+#endif
- default:
- ext4_msg(sb, KERN_ERR,
- "Unrecognized mount option \"%s\" " \ No newline at end of file
+ default:
+ ext4_msg(sb, KERN_ERR,
+ "Unrecognized mount option \"%s\" "
diff --git a/libre/linux-libre-lts/linux-libre-lts.install b/libre/linux-libre-lts/linux-libre-lts.install
index 642e9d52d..8468b0e12 100644
--- a/libre/linux-libre-lts/linux-libre-lts.install
+++ b/libre/linux-libre-lts/linux-libre-lts.install
@@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=-lts
-KERNEL_VERSION=3.0.24-1-LIBRE-LTS
+KERNEL_VERSION=3.0.25-1-LIBRE-LTS
post_install () {
# updating module dependencies
diff --git a/libre/virtualbox-libre/PKGBUILD b/libre/virtualbox-libre/PKGBUILD
index 73e443d6a..9384e9c1e 100644
--- a/libre/virtualbox-libre/PKGBUILD
+++ b/libre/virtualbox-libre/PKGBUILD
@@ -1,6 +1,7 @@
# $Id: PKGBUILD 63763 2012-02-05 12:13:00Z ibiru $
# Maintainer (Parabola): Nicolas Reynolds <fauno@kiwwwi.com.ar>
-# Contributor (Parabola): Jorge López <jorginho@adinet.com.uy>
+# Maintainer (Parabola): Jorge López <jorginho@adinet.com.uy>
+# Contributor (Parabola): André Silva <andre.paulista@adinet.com.uy>
# Changes:
# * Adapt to linux-libre
# * virtualbox-{archlinux,parabola}-*
@@ -11,7 +12,7 @@
pkgbase=virtualbox-libre
pkgname=('virtualbox-libre' 'virtualbox-parabola-additions' 'virtualbox-sdk' 'virtualbox-source')
pkgver=4.1.10
-pkgrel=1
+pkgrel=1.1
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL' 'custom')
@@ -36,7 +37,7 @@ md5sums=('263e495ef3a7ab75943af28d446ee702'
'3ac185709bfe688bb753c46e170d0546'
'c159d683ba1947290fc2ad2c64194150')
-_extramodules=extramodules-3.2-LIBRE
+_extramodules=extramodules-3.3-LIBRE
_kernver="$(cat /lib/modules/${_extramodules}/version)"
build() {
diff --git a/libre/virtualbox-modules/.directory b/libre/virtualbox-modules/.directory
new file mode 100644
index 000000000..7486c78f1
--- /dev/null
+++ b/libre/virtualbox-modules/.directory
@@ -0,0 +1,2 @@
+[Dolphin]
+Timestamp=2012,3,20,12,36,27
diff --git a/libre/virtualbox-modules/LocalConfig.kmk b/libre/virtualbox-modules/LocalConfig.kmk
index cd4e65e03..af79f90cd 100644
--- a/libre/virtualbox-modules/LocalConfig.kmk
+++ b/libre/virtualbox-modules/LocalConfig.kmk
@@ -14,6 +14,6 @@ VBOX_WITH_REGISTRATION_REQUEST =
VBOX_WITH_UPDATE_REQUEST =
VBOX_WITH_VNC := 1
VBOX_BLD_PYTHON = python2
-VBOX_JAVA_HOME = /usr/lib/jvm/java-7-openjdk
+VBOX_JAVA_HOME = /usr/lib/jvm/java-6-openjdk
VBOX_GCC_WERR =
VBOX_GCC_WARN =
diff --git a/libre/virtualbox-modules/PKGBUILD b/libre/virtualbox-modules/PKGBUILD
index 388eb8264..cd27b74a8 100644
--- a/libre/virtualbox-modules/PKGBUILD
+++ b/libre/virtualbox-modules/PKGBUILD
@@ -1,11 +1,12 @@
-# $Id: PKGBUILD 62846 2012-01-27 17:21:04Z ibiru $
+# $Id$
#Maintainer: Ionut Biru <ibiru@archlinux.org>
-#Contributor (Parabola): Jorge López <jorginho@adinet.com.uy>
+#Maintainer (Parabola): Jorge López <jorginho@adinet.com.uy>
+#Contributor (Parabola): André Silva <andre.paulista@adinet.com.uy>
pkgbase=virtualbox-modules
pkgname=('virtualbox-modules' 'virtualbox-parabola-modules')
pkgver=4.1.10
-pkgrel=2
+pkgrel=2.1
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
@@ -17,10 +18,10 @@ makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libpng' 'l
source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2
LocalConfig.kmk 60-vboxguest.rules)
md5sums=('263e495ef3a7ab75943af28d446ee702'
- '7e921d2ae193ec04b255daa0e338d3a4'
+ '4c88bd122677a35f68abd76eb01b378b'
'ed1341881437455d9735875ddf455fbe')
-_extramodules=extramodules-3.2-LIBRE
+_extramodules=extramodules-3.3-LIBRE
_kernver="$(cat /lib/modules/${_extramodules}/version || true)"
export KERN_DIR=/lib/modules/${_kernver}/build
@@ -55,7 +56,7 @@ package_virtualbox-parabola-modules(){
pkgdesc="Additions only for Parabola guests (kernel modules)"
license=('GPL')
install=virtualbox-parabola-modules.install
- depends=('linux-libre>=3.2' 'linux-libre<3.3')
+ depends=('linux-libre>=3.3' 'linux-libre<3.4')
replaces=('virtualbox-guest-modules' 'virtualbox-archlinux-modules')
conflicts=('virtualbox-guest-modules' 'virtualbox-archlinux-modules')
provides=("virtualbox-archlinux-modules=$pkgver")
@@ -81,7 +82,7 @@ package_virtualbox-modules(){
pkgdesc="Kernel modules for VirtualBox"
license=('GPL')
install=virtualbox-modules.install
- depends=('linux-libre>=3.2' 'linux-libre<3.3')
+ depends=('linux-libre>=3.3' 'linux-libre<3.4')
source "$srcdir/VirtualBox-${pkgver}/env.sh"
diff --git a/libre/virtualbox-modules/virtualbox-modules.install b/libre/virtualbox-modules/virtualbox-modules.install
index bc2adbe64..72be196c2 100644
--- a/libre/virtualbox-modules/virtualbox-modules.install
+++ b/libre/virtualbox-modules/virtualbox-modules.install
@@ -3,17 +3,17 @@ post_install() {
===> You must load vboxdrv module before starting VirtualBox:
===> # modprobe vboxdrv
EOF
- EXTRAMODULES='extramodules-3.2-LIBRE'
+ EXTRAMODULES='extramodules-3.3-LIBRE'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.2-LIBRE'
+ EXTRAMODULES='extramodules-3.3-LIBRE'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use the new version, reload all virtualbox modules manually.'
}
post_remove() {
- EXTRAMODULES='extramodules-3.2-LIBRE'
+ EXTRAMODULES='extramodules-3.3-LIBRE'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
diff --git a/libre/virtualbox-modules/virtualbox-parabola-modules.install b/libre/virtualbox-modules/virtualbox-parabola-modules.install
index b542db1ca..0cc4b44fd 100644
--- a/libre/virtualbox-modules/virtualbox-parabola-modules.install
+++ b/libre/virtualbox-modules/virtualbox-parabola-modules.install
@@ -2,16 +2,16 @@ post_install() {
cat << EOF
===> You may want to load vboxguest, vboxsf and vboxvideo
EOF
- EXTRAMODULES='extramodules-3.2-LIBRE'
+ EXTRAMODULES='extramodules-3.3-LIBRE'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.2-LIBRE'
+ EXTRAMODULES='extramodules-3.3-LIBRE'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove() {
- EXTRAMODULES='extramodules-3.2-LIBRE'
+ EXTRAMODULES='extramodules-3.3-LIBRE'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
diff --git a/mozilla-testing/iceweasel-i18n/PKGBUILD b/mozilla-testing/iceweasel-i18n/PKGBUILD
index 1194c170d..0743504ee 100644
--- a/mozilla-testing/iceweasel-i18n/PKGBUILD
+++ b/mozilla-testing/iceweasel-i18n/PKGBUILD
@@ -9,7 +9,7 @@
# - Run 'make'. It will take care of everything else for you.
_debname=iceweasel
-_debver=10.0
+_debver=11.0
_debrel=2
_debrepo=http://ftp.debian.org/debian/pool/main/
debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
@@ -56,87 +56,87 @@ package_iceweasel-i18n-$(echo $lang | tr A-Z a-z)() {
"
done
-md5sums=('793a94a6e885aaf4d8e6f19d0eeb521d'
- 'f7456e45c7f6ba5920d6a5ac7bc79e0f'
- 'cb61542372b3ffc673dc0d7bd2daeb64'
- 'd50d7eafe754a719ecfa34a633b8934a'
- '69269ecb9349e43f2394c80d79395252'
- '84697940978ce0cb435e3cef7c0a899b'
- '2c3322b32d77ba0558bfaa90895c5159'
- '9915009fecabb5e61bb607643d873725'
- '474241d6e43c553c497818b871793935'
- 'ebc92d813eefc7de71e1cce905c02905'
- 'a6d5d79e133740d4f3c718c834192497'
- '89e21920d652c3fc62778279ef7bd7e9'
- '512202725a96e551838b50126b61b399'
- 'd2585b6724f7ddbde640168955d5751a'
- 'a69d9d2a1507160b0a50bf19f9bc724e'
- 'b4fa0cd1d1f821be0a80df25c66ecb7f'
- '56c8ccddd4d7bb8d33f3ca4da5f11e7f'
- 'b57896dedb380d1c4c88016855d92def'
- 'b676f044077fb0ba0d1f906da959bb2d'
- 'fe121bd9cd1014ce665369a8f8514915'
- '6f089b06fee2fa96546cf588882d307b'
- 'b79affe803cf1d27194ebf34408de68b'
- '8bd6ba3e617dc567b91fa9e05f87fa63'
- 'ddba2e2e8784091fa251a256e0d979e3'
- 'cb5450a6b86215c50d34168fb8999546'
- '990dd3f87bb5872cb34d1f4aa596c1a7'
- '4702e63ee804e9df0de0ad3997a73fe0'
- '4e9e0dea57ddf7fd5a295798ebd4c8ff'
- '8d157f7d71deee985414da0b2a31deb1'
- 'afb03c513129c864762748ee7a43dfea'
- '21b94e104f358af6fff96eddb25c0be5'
- '8804dca0055bb40918bd2fa53cbf9f46'
- '65cf3f2b62e74e5263ddd3c0aeae6efc'
- '75b0601628af786086ade2d19f7a7dbd'
- 'b41e48029475606210ba2386a516eea5'
- '3a175250397bd9a12e111b0cae9b8bc9'
- '8816aded7a74fa44d07d7aba1cc5cd24'
- '781fc19740d15689c34124f6ce2d0c37'
- 'a1310e77625e8c0b2fa79482776ae0b7'
- '6eda69c80e7667f2f18e33542ae58ab9'
- '99d03faaeb4c14b4b8e24a70b51c88e6'
- '08a7afeefe6ce58e088ab630e5888de9'
- 'afbfd8430dd79e0c2d8a232601ef590f'
- '35a1d92021eb05e4aca0d16d4fbad6bb'
- 'ce6c430d1fbae0d01431055f62aa2e17'
- '015fce7a57e94736a0971893495c25a4'
- 'ba5f035417146bcb83d78288871974c8'
- 'b72a8bc535d8d8d75e2527fcc183c063'
- '29c04ac90494ad91dfb084ef665c647a'
- '10b5da824adf7c95868fb9bc8f0a1c13'
- '30f846e358a33c75f1fa34ae1c8f6152'
- 'b66f05ffe4f9ac891434758c65201692'
- '7b3e9c60508ebb5ad38288fd4d271564'
- '4a37b546faeba4db56c537859d246c9e'
- '32e372e04d47347ca7915388d0c28856'
- '5051b69589aefb0672afcfc53f13d5e6'
- '951d765d9bb5fde4de7e9a0a7b2d86fa'
- 'c7d4a0e0ea5de23101bec63cd0d16a79'
- 'c9b5782c573c45ba5966f6731ab74919'
- 'feb93641c8a5bdbc3d2c0a7a984301ec'
- '3ee2f65ce0a81280bca493046de34e36'
- '531aa070f985ad04f2956223baa3eadd'
- 'e1d5ba35f740cb3cc53ac7ddfeecc53d'
- '6d51c6c4196b8fd1a0ef28a26be9a7c8'
- 'cc9a129a663b3e557f4b7af3a362f849'
- '68647b56c8383a961d1a548755b8ed3e'
- '2ff3b25510bc7dae3ace16275149604e'
- 'd151521d572d4c34cdc0781f79397a28'
- 'b4cbf748b686fed239c54747cf980114'
- '144b7b1856cb5edbfe6bb1b46ed7ebce'
- '6ddd3e1752225b85481ea9a6a92bc771'
- 'b40300590d475e4732db173dcbacbacd'
- 'c52ae8f37f21cb7fe8af84fc3d11f5be'
- 'd565ad7989e912fcdc25ace8ebcc4d03'
- 'f839187be23fd08dfd92f49a0e84a280'
- '54a0a8e37c4f9b73635b1602f16d7deb'
- '7abfb562c214f69123988274ff3278a1'
- '2a0691d6282b55adb59fee29633598df'
- '15ff4db6870007e5eebb7de314ed95ca'
- '04ab9dbe13f6c09bfedeb248d77ad409'
- '2f60fa5185dd337f69d2db7d0b290e22'
- '0097341a10cb8cb47b37642b05effc04'
- '7c3f6bcad90774d5f55d429ef61ccdba'
- '4b2e077aa01023fde8a6611f89d69b5d')
+md5sums=('c11d65787c3f2848e0b582115e50c3ca'
+ 'f579bb571a43c33d6a13fd71f7853331'
+ '5ec94ba1055f11e8a33674a3ea623fca'
+ '7598e4409463c98c6f358a49c0e0e864'
+ 'f3a7156974b43a7829e68e82e6dd749a'
+ '2cd6d08c82a59cee5454d3da763d9808'
+ '3b5529e7d1a6c87e9a99b251bb008b9f'
+ 'f1eb67cbc423a49dd4b4f85e1f50034c'
+ '76c39cc1134b4074283fe080a1d0b29e'
+ '1b282bba90202701fa63fc21b44e78d5'
+ '77f818359b98fdd2a23b40989f9f56c6'
+ 'cbd8fb3d20a5269ac728c717ebd1d98c'
+ '83e2314c8b80d0fd551fa083d89cef70'
+ 'e68bed0670b4a82dbd66512e8ca130c7'
+ '48ea629311ec141de087474ad95fa122'
+ '9c1849045f0004e49c240061358b244f'
+ '72bce5d1aa3e6b21f6b7e7b6f2c8d4f2'
+ '224a5bb2ee4fdde8cc20e79a70e30eab'
+ 'e856bf522ad406c3b17e605a922a149f'
+ 'e522dd90baf0fdc61fbd45a496993fed'
+ 'adc195bb74d8d84f768ab0077c6c80b2'
+ 'a8012c48c890655c1ef1826f900f7cd3'
+ 'fad33e552bd6fb805a5c92325c649eff'
+ 'cad39ebafc45aad5d32f115fa1839ac0'
+ '238fa3a6a33cd30ad2712510cc578baa'
+ '5dadee4c8eca35353e811b93a6602860'
+ '67c7d7ab47d8cd636d6849f9fda68fe7'
+ 'b7cf88fe4b118aea853978c7ff43eb57'
+ 'c0aa19616cf37148a7f33789c9e88deb'
+ '806a1b78d92c1e6504051f2c6bf2cdcf'
+ '92ee27275709f2c81f229f40d032da23'
+ '6f7369cff0c0680f52394d9caee7b136'
+ '2adba18d2bd10051950f1b37325ddbce'
+ 'a2e1834d4b28fa8dea5b8d01adcedb7e'
+ '929bfa11831b267b419a1b09b4d614d4'
+ 'fe5ea0a2cc3ee9b45618517a2a6cd162'
+ '45cd4f3e44046bfdc78848d12a0983f9'
+ '7f7681277e566052e6831377b1bcd479'
+ 'f136cefdb1b7a8b9fc18cba540414fcc'
+ 'e714caf6fc74f9978ca5911310f33f10'
+ '7a745b384d1ee293decce327189d49e8'
+ '5b22c59215b6ce6d3fd588305a6429f6'
+ 'b6f1f722168a7e2dc70b02c199e96198'
+ 'e490e5a65c40cd60ba64e4511f1dcef1'
+ '640c52cb0b2e4f8ae0d7206fb3db3b33'
+ 'a42b31f567dcc8032360caa684df1c08'
+ 'd8da0314598179ac5c3479dd397d7827'
+ '7e065b66f0673c3801ee7f37ff33344d'
+ 'c8c5d1646483013fa249b3a839523e53'
+ 'abf1db7ea2e8014e135f324cf3efc141'
+ '8a352420c9580fe3c930a4b3c4d3530e'
+ '465ca43f628d0567b3de36626b54bf40'
+ '6cc860dae180ed5f80916759da290a9d'
+ 'b0d97a60501760c78f520ba4151427a7'
+ '829311af6d4d0d78378fdcfd2cfccc68'
+ 'b54daae60d32b270a44b891fdb61e3b5'
+ '39246a00ea31552326d0ea52f8eb1f05'
+ 'e49074be0a43ebc9810d89c24de75268'
+ '281f20486ae5b6caadfc5504e7f036ac'
+ '740c3a38b45788378c6c5db795d31ee1'
+ '296df42d755d93032b9a3dc619bc502d'
+ '74b59fa4676d2779f8e1081ac253b122'
+ 'a92960238a2c942c4b49b0f4187d0a71'
+ '230fbd4b3e6a65545b4a37ec1549d0e6'
+ 'e606f5a9db88334a6cb33086340f4ff7'
+ '0b52b803abe1acb1e137a57fe0497746'
+ '00ddf2c8c6adfcd51230dd469d01ec75'
+ '254303860ecc7c25157f08a4d55a4f68'
+ '70d037f9c5c8f25e2b335c7016f17b58'
+ 'b3da484dade70c544d4f0e6a829ef806'
+ '05347b208889b3e4aa86d9a6dccda71d'
+ 'a2212a06adac1aa6b74bc2f7e9de2af2'
+ '371d5e9b0a10feec5e05d3fdfd949bc6'
+ '63611b468b7d41a0470385e19a849a8d'
+ 'dc691a55cc7f95018e4178e6e794a1a4'
+ '90723a80c36b85006fa7514641cd2f2a'
+ '918683079f1d037d05a9a38b05d4ca51'
+ '77dda2b5fd59bcdb66918b4d13b486ae'
+ '33c2d8bff6cdf141614457c71fcf5d36'
+ '08990457e150c081e0f505515c15df09'
+ '379c5ede369994f016745e7dd83dfe54'
+ '15062007856eb66b04c26694a7f35727'
+ '569b1a54a9ca0b8149f151eb4cf57957'
+ '970928f01c78b094a2c054e58cd85bff')
diff --git a/mozilla-testing/iceweasel-libre/PKGBUILD b/mozilla-testing/iceweasel-libre/PKGBUILD
index c630fbb35..3ef4da470 100644
--- a/mozilla-testing/iceweasel-libre/PKGBUILD
+++ b/mozilla-testing/iceweasel-libre/PKGBUILD
@@ -12,7 +12,7 @@ _pgo=false
# We're getting this from Debian Sid
_debname=iceweasel
-_debver=10.0
+_debver=11.0
_debrel=2
_debrepo=http://ftp.debian.org/debian/pool/main/
debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
@@ -49,13 +49,13 @@ source=("${_debrepo}/`debfile ${_debname}`_${_debver}.orig.tar.bz2"
iceweasel-install-dir.patch
region.properties
vendor.js)
-md5sums=('bc86bf0d74649f9b3fcde6dfa914141e'
- '131782b1ca9d24f40dff8f456558988d'
- '659b08b8f14429dd1b7f9229b6fbd1b2'
+md5sums=('01d9d18909ca9fff2483d8fd779a0f89'
+ '59349da94b095fe0623d09ce75696766'
+ 'f407208a750cdc9bea3a6a3a3e42dd89'
'eab149c1994ab14392e55af3abb08e80'
'ac29b01c189f20abae2f3eef1618ffc0'
'a485a2b5dc544a8a2bd40c985d2e5813'
- '24fb7dba021ef94a351ebd3750cc0451'
+ 'addd3a3420cebeda152b447705b086e9'
'e529742c0a425648087bc3ce537fe4c5'
'f1c76e7e244257856a386ca2de69bdf0'
'0d053487907de4376d67d8f499c5502b')
diff --git a/mozilla-testing/iceweasel-libre/libre.patch b/mozilla-testing/iceweasel-libre/libre.patch
index 935df297b..c1bb0a8c7 100644
--- a/mozilla-testing/iceweasel-libre/libre.patch
+++ b/mozilla-testing/iceweasel-libre/libre.patch
@@ -1,19 +1,20 @@
diff -urN iceweasel-9.0.1.orig/browser/app/profile/firefox.js iceweasel-9.0.1/browser/app/profile/firefox.js
---- iceweasel-10.0.orig/browser/app/profile/firefox.js 2011-12-21 09:07:20.000000000 +0000
-+++ iceweasel-10.0/browser/app/profile/firefox.js 2011-12-21 12:54:53.816066166 +0000
-@@ -64,10 +64,11 @@
+--- mozilla-build/browser/app/profile/firefox.js.orig 2012-03-20 01:04:55.890545738 -0300
++++ mozilla-build/browser/app/profile/firefox.js 2012-03-20 01:05:03.330545430 -0300
+@@ -64,11 +64,11 @@
// Preferences for AMO integration
pref("extensions.getAddons.cache.enabled", true);
pref("extensions.getAddons.maxResults", 15);
--pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
+-pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=%OS%&appVersion=%VERSION%");
+-pref("extensions.getAddons.getWithPerformance.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/guid:%IDS%?src=firefox&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
-pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%");
-pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/firefox/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=firefox");
-pref("extensions.webservice.discoverURL", "https://services.addons.mozilla.org/%LOCALE%/firefox/discovery/pane/%VERSION%/%OS%");
-+pref("extensions.getAddons.get.url", "");
-+pref("extensions.getAddons.get.url", "http://www.gnu.org/s/gnuzilla/addons.html");
-+pref("extensions.getAddons.search.browseURL", "http://www.gnu.org/s/gnuzilla/addons.html");
-+pref("extensions.getAddons.search.url", "http://www.gnu.org/s/gnuzilla/addons.html");
-+pref("extensions.webservice.discoverURL", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.getAddons.get.url", "");
+++pref("extensions.getAddons.get.url", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.getAddons.search.browseURL", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.getAddons.search.url", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.webservice.discoverURL", "http://www.gnu.org/s/gnuzilla/addons.html");
// Blocklist preferences
pref("extensions.blocklist.enabled", true);
@@ -131,10 +132,10 @@ diff -urN iceweasel-9.0.1.orig/layout/ipc/test-ipcbrowser.xul iceweasel-9.0.1/la
+ <browser type="content" src="http://www.duckduckgo.com/" flex="1" id="content"
remote="true"/>
</window>
-diff -urN iceweasel-9.0.1.orig/mobile/app/mobile.js iceweasel-9.0.1/mobile/app/mobile.js
---- iceweasel-9.0.1.orig/mobile/app/mobile.js 2011-12-16 20:29:36.000000000 +0000
-+++ iceweasel-9.0.1/mobile/app/mobile.js 2011-12-21 10:04:04.976062646 +0000
-@@ -217,12 +217,13 @@
+diff -urN iceweasel-9.0.1.orig/mobile/xul/app/mobile.js iceweasel-9.0.1/mobile/xul/app/mobile.js
+--- mozilla-build/mobile/xul/app/mobile.js.orig 2012-03-20 01:02:30.300551777 -0300
++++ mozilla-build/mobile/xul/app/mobile.js 2012-03-20 01:02:40.820551342 -0300
+@@ -218,13 +218,12 @@
/* preferences for the Get Add-ons pane */
pref("extensions.getAddons.cache.enabled", true);
pref("extensions.getAddons.maxResults", 15);
@@ -143,14 +144,14 @@ diff -urN iceweasel-9.0.1.orig/mobile/app/mobile.js iceweasel-9.0.1/mobile/app/m
-pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/mobile/search?q=%TERMS%");
-pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%");
-pref("extensions.getAddons.browseAddons", "https://addons.mozilla.org/%LOCALE%/mobile/");
--pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/guid:%IDS%?src=mobile&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
-+
-+pref("extensions.getAddons.recommended.browseURL", "http://www.gnu.org/s/gnuzilla/addons.html");
-+pref("extensions.getAddons.recommended.url", "http://www.gnu.org/s/gnuzilla/addons.html");
-+pref("extensions.getAddons.search.browseURL", "http://www.gnu.org/s/gnuzilla/addons.html");
-+pref("extensions.getAddons.search.url", "http://www.gnu.org/s/gnuzilla/addons.html");
-+pref("extensions.getAddons.browseAddons", "http://www.gnu.org/s/gnuzilla/addons.html");
-+pref("extensions.getAddons.get.url", "http://www.gnu.org/s/gnuzilla/addons.html");
+-pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/guid:%IDS%?src=mobile&appOS=%OS%&appVersion=%VERSION%");
+-pref("extensions.getAddons.getWithPerformance.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/guid:%IDS%?src=mobile&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
+++pref("extensions.getAddons.recommended.browseURL", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.getAddons.recommended.url", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.getAddons.search.browseURL", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.getAddons.search.url", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.getAddons.browseAddons", "http://www.gnu.org/s/gnuzilla/addons.html");
+++pref("extensions.getAddons.get.url", "http://www.gnu.org/s/gnuzilla/addons.html");
/* preference for the locale picker */
pref("extensions.getLocales.get.url", "");
diff --git a/testing/bootchart/PKGBUILD b/testing/bootchart/PKGBUILD
new file mode 100644
index 000000000..d8f606056
--- /dev/null
+++ b/testing/bootchart/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 153849 2012-03-19 21:13:34Z tomegun $
+# Maintainer: Tom Gundersen <teg@jklm.no>
+pkgname="bootchart"
+pkgver=1.15
+pkgrel=1
+pkgdesc="a 'startup' graphing tool"
+url="https://meego.gitorious.org/meego-developer-tools/bootchart"
+license=('GPL2')
+arch=(i686 x86_64)
+depends=('glibc')
+source=("http://foo-projects.org/~sofar/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'build.patch')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -p1 -i ../build.patch
+
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
+md5sums=('e24cad9db140521fca5193a88589e669'
+ '5546709bc77b775290cb54a29affa6ec')
diff --git a/testing/bootchart/build.patch b/testing/bootchart/build.patch
new file mode 100644
index 000000000..82c6e1bfd
--- /dev/null
+++ b/testing/bootchart/build.patch
@@ -0,0 +1,34 @@
+From 4fe62e6b4c072676d246be02ba92a1df3a9d0feb Mon Sep 17 00:00:00 2001
+From: Tom Gundersen <teg@jklm.no>
+Date: Fri, 16 Mar 2012 01:34:10 +0100
+Subject: [PATCH] Makefile: move binary and avoid empty dirs
+
+Install to /usr/bin by default, and don't install an empty /etc.
+---
+ Makefile | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 566a848..c017509 100644
+--- a/Makefile
++++ b/Makefile
+@@ -6,12 +6,10 @@ CC := gcc
+ all: bootchartd
+
+ install: bootchartd
+- mkdir -p $(DESTDIR)/sbin
+- mkdir -p $(DESTDIR)/etc
+- mkdir -p $(DESTDIR)/usr/share/doc/bootchart/
+- install -m0755 bootchartd $(DESTDIR)/sbin/
+- install -m0644 bootchartd.conf.example $(DESTDIR)/usr/share/doc/bootchart/
+- install -m0644 README COPYING $(DESTDIR)/usr/share/doc/bootchart/
++ install -d $(DESTDIR)/usr/bin
++ install -d $(DESTDIR)/usr/share/doc/bootchart
++ install -m0755 bootchartd $(DESTDIR)/usr/bin/
++ install -m0644 README COPYING bootchartd.conf.example $(DESTDIR)/usr/share/doc/bootchart/
+
+ OBJS := log.o svg.o bootchart.o
+
+--
+1.7.9.4
+
diff --git a/testing/openssh/sshd.close-sessions b/testing/openssh/sshd.close-sessions
new file mode 100644
index 000000000..208583238
--- /dev/null
+++ b/testing/openssh/sshd.close-sessions
@@ -0,0 +1,14 @@
+# Close sshd sessions before shutting down the network; see FS#17389.
+
+sshd_close_sessions () {
+ /etc/rc.d/sshd stop
+ stat_busy "Stopping Secure Shell Sessions"
+ for i in $(pgrep sshd); do
+ if readlink -q /proc/$i/exe &>/dev/null | grep -q '^/usr/sbin/sshd'; then
+ kill $i &>/dev/null
+ fi
+ done
+ stat_done
+}
+
+add_hook shutdown_start sshd_close_sessions
diff --git a/testing/wpa_actiond/PKGBUILD b/testing/wpa_actiond/PKGBUILD
new file mode 100644
index 000000000..69f44daa1
--- /dev/null
+++ b/testing/wpa_actiond/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 153826 2012-03-19 19:35:14Z thomas $
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+pkgname=wpa_actiond
+pkgver=1.2
+pkgrel=1
+pkgdesc="Daemon that connects to wpa_supplicant and handles connect and disconnect events"
+arch=('i686' 'x86_64')
+url="http://projects.archlinux.org/wpa_actiond.git/"
+license=('GPL')
+depends=('glibc' 'wpa_supplicant')
+source=(ftp://ftp.archlinux.org/other/wpa_actiond/${pkgname}-${pkgver}.tar.xz)
+sha256sums=('578efa1141fbf1acb56efff8061f4ac7ab99f257f8a3e1588db51a8ce77ac2b5')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ install -D -m755 wpa_actiond "${pkgdir}/usr/sbin/wpa_actiond"
+}
+# vim:set ts=2 sw=2 et:
diff --git a/testing/xf86-video-neomagic/git-fixes.diff b/testing/xf86-video-neomagic/git-fixes.diff
new file mode 100644
index 000000000..dafba0b2f
--- /dev/null
+++ b/testing/xf86-video-neomagic/git-fixes.diff
@@ -0,0 +1,616 @@
+From eba90ed039416fa5db1800ce695d2a970f43b0e0 Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue, 20 Jul 2010 20:15:29 +0000
+Subject: config: upgrade to util-macros 1.8 for additional man page support
+
+Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+The value of MAN_SUBST is the same for all X.Org packages.
+---
+diff --git a/configure.ac b/configure.ac
+index 38cba3a..a80955b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -34,10 +34,10 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+ AM_MAINTAINER_MODE
+
+-# Require xorg-macros: XORG_DEFAULT_OPTIONS
++# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+ m4_ifndef([XORG_MACROS_VERSION],
+- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+-XORG_MACROS_VERSION(1.3)
++ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
++XORG_MACROS_VERSION(1.8)
+ XORG_DEFAULT_OPTIONS
+
+ # Checks for programs.
+diff --git a/man/Makefile.am b/man/Makefile.am
+index 8f2454b..b3688ce 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -31,25 +31,11 @@ EXTRA_DIST = @DRIVER_NAME@.man
+
+ CLEANFILES = $(driverman_DATA)
+
+-SED = sed
+-
+-# Strings to replace in man pages
+-XORGRELSTRING = @PACKAGE_STRING@
+- XORGMANNAME = X Version 11
+-
+-MAN_SUBSTS = \
+- -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+- -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+- -e 's|__xservername__|Xorg|g' \
+- -e 's|__xconfigfile__|xorg.conf|g' \
+- -e 's|__projectroot__|$(prefix)|g' \
+- -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
+- -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
+- -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
+- -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
+- -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
++
++# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
++
+
+ SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
+
+ .man.$(DRIVER_MAN_SUFFIX):
+- sed $(MAN_SUBSTS) < $< > $@
++ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+--
+cgit v0.9.0.2-2-gbebe
+From 9ad3e98825d45208ed2754f592527a05949f676d Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue, 20 Jul 2010 22:45:19 +0000
+Subject: config: update AC_PREREQ statement to 2.60
+
+Unrelated to the previous patches, the new value simply reflects
+the reality that the minimum level for autoconf to configure
+all x.org modules is 2.60 dated June 2006.
+
+ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/configure.ac b/configure.ac
+index a80955b..1c7ff1a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,7 +20,7 @@
+ #
+ # Process this file with autoconf to produce a configure script
+
+-AC_PREREQ(2.57)
++AC_PREREQ([2.60])
+ AC_INIT([xf86-video-neomagic],
+ 1.2.5,
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+--
+cgit v0.9.0.2-2-gbebe
+From 788fa461f40c320c3b9a67ab9bc914e987eefd42 Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue, 20 Jul 2010 23:41:31 +0000
+Subject: config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
+
+XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
+AC_PROG_C_C99. This sets gcc with -std=gnu99.
+If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
+
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/configure.ac b/configure.ac
+index 1c7ff1a..aa17100 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,7 +43,6 @@ XORG_DEFAULT_OPTIONS
+ # Checks for programs.
+ AC_DISABLE_STATIC
+ AC_PROG_LIBTOOL
+-AC_PROG_CC
+
+ AH_TOP([#include "xorg-server.h"])
+
+--
+cgit v0.9.0.2-2-gbebe
+From adb592292e40a5e5f032ca95f3371c6b77227c40 Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed, 21 Jul 2010 00:24:42 +0000
+Subject: config: remove unrequired AC_HEADER_STDC
+
+Autoconf says:
+"This macro is obsolescent, as current systems have conforming
+header files. New programs need not use this macro".
+
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/configure.ac b/configure.ac
+index aa17100..30c0e86 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -79,8 +79,6 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
+ [#include "xorg-server.h"])
+ CPPFLAGS="$SAVE_CPPFLAGS"
+
+-# Checks for header files.
+-AC_HEADER_STDC
+
+ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+ PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+--
+cgit v0.9.0.2-2-gbebe
+From 5759eca769091518fd54e0d70193edc3c099e9bb Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed, 21 Jul 2010 01:44:57 +0000
+Subject: config: remove unrequired AC_SUBST([XORG_CFLAGS])
+
+This macro is called by PKG_CHECK_MODULES
+
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/configure.ac b/configure.ac
+index 30c0e86..86f016f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -86,7 +86,6 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+ fi
+ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
+-AC_SUBST([XORG_CFLAGS])
+ AC_SUBST([moduledir])
+
+ DRIVER_NAME=neomagic
+--
+cgit v0.9.0.2-2-gbebe
+From bcfba240265ecd633fcba051591b6c50b9373a53 Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed, 21 Jul 2010 13:27:42 +0000
+Subject: config: complete AC_INIT m4 quoting
+
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/configure.ac b/configure.ac
+index 86f016f..46cb0cc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,9 +22,9 @@
+
+ AC_PREREQ([2.60])
+ AC_INIT([xf86-video-neomagic],
+- 1.2.5,
++ [1.2.5],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+- xf86-video-neomagic)
++ [xf86-video-neomagic])
+
+ AC_CONFIG_SRCDIR([Makefile.am])
+ AM_CONFIG_HEADER([config.h])
+--
+cgit v0.9.0.2-2-gbebe
+From 2f60a6e4c3be390d4cf0648bdffbdbff67def7ee Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed, 21 Jul 2010 18:05:22 +0000
+Subject: config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/configure.ac b/configure.ac
+index 46cb0cc..7261ed5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,7 @@ AC_INIT([xf86-video-neomagic],
+ [xf86-video-neomagic])
+
+ AC_CONFIG_SRCDIR([Makefile.am])
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_AUX_DIR(.)
+
+ AM_INIT_AUTOMAKE([foreign dist-bzip2])
+--
+cgit v0.9.0.2-2-gbebe
+From 8486ae164b462d50817b84340af13dccc26384ab Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed, 21 Jul 2010 18:37:41 +0000
+Subject: config: replace deprecated AC_HELP_STRING with AS_HELP_STRING
+
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/configure.ac b/configure.ac
+index 7261ed5..1d0a3d3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -47,7 +47,7 @@ AC_PROG_LIBTOOL
+ AH_TOP([#include "xorg-server.h"])
+
+ AC_ARG_WITH(xorg-module-dir,
+- AC_HELP_STRING([--with-xorg-module-dir=DIR],
++ AS_HELP_STRING([--with-xorg-module-dir=DIR],
+ [Default xorg module directory [[default=$libdir/xorg/modules]]]),
+ [moduledir="$withval"],
+ [moduledir="$libdir/xorg/modules"])
+--
+cgit v0.9.0.2-2-gbebe
+From 5e0d301758b15fc1916dd0318f2a5549e3482ccf Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed, 21 Jul 2010 20:07:00 +0000
+Subject: config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES
+
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/configure.ac b/configure.ac
+index 1d0a3d3..73dde93 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -91,8 +91,9 @@ AC_SUBST([moduledir])
+ DRIVER_NAME=neomagic
+ AC_SUBST([DRIVER_NAME])
+
+-AC_OUTPUT([
+- Makefile
+- src/Makefile
+- man/Makefile
++AC_CONFIG_FILES([
++ Makefile
++ src/Makefile
++ man/Makefile
+ ])
++AC_OUTPUT
+--
+cgit v0.9.0.2-2-gbebe
+From dd32df772bdf4462b816bfc2f98ccd18dbb4b930 Mon Sep 17 00:00:00 2001
+From: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed, 21 Jul 2010 20:49:04 +0000
+Subject: config: add comments for main statements
+
+---
+diff --git a/configure.ac b/configure.ac
+index 73dde93..befac41 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,18 +20,18 @@
+ #
+ # Process this file with autoconf to produce a configure script
+
++# Initialize Autoconf
+ AC_PREREQ([2.60])
+ AC_INIT([xf86-video-neomagic],
+ [1.2.5],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+ [xf86-video-neomagic])
+-
+ AC_CONFIG_SRCDIR([Makefile.am])
+ AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_AUX_DIR(.)
+
++# Initialize Automake
+ AM_INIT_AUTOMAKE([foreign dist-bzip2])
+-
+ AM_MAINTAINER_MODE
+
+ # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+@@ -40,12 +40,13 @@ m4_ifndef([XORG_MACROS_VERSION],
+ XORG_MACROS_VERSION(1.8)
+ XORG_DEFAULT_OPTIONS
+
+-# Checks for programs.
++# Initialize libtool
+ AC_DISABLE_STATIC
+ AC_PROG_LIBTOOL
+
+ AH_TOP([#include "xorg-server.h"])
+
++# Define a configure option for an alternate module directory
+ AC_ARG_WITH(xorg-module-dir,
+ AS_HELP_STRING([--with-xorg-module-dir=DIR],
+ [Default xorg module directory [[default=$libdir/xorg/modules]]]),
+@@ -53,14 +54,14 @@ AC_ARG_WITH(xorg-module-dir,
+ [moduledir="$libdir/xorg/modules"])
+
+
+-# Checks for extensions
++# Store the list of server defined optional extensions in REQUIRED_MODULES
+ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+ XORG_DRIVER_CHECK_EXT(XV, videoproto)
+ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
+ XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
+
+-# Checks for pkg-config packages
++# Obtain compiler/linker options for the driver dependencies
+ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
+
+ save_CFLAGS="$CFLAGS"
+--
+cgit v0.9.0.2-2-gbebe
+From a9d69f6d0ab4f66b954949cca016ee7b5b6f7adf 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/neomagic.man b/man/neomagic.man
+index 9daffe5..af8181c 100644
+--- a/man/neomagic.man
++++ b/man/neomagic.man
+@@ -1,4 +1,3 @@
+-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.man,v 1.5 2003/05/29 21:48:09 herrb Exp $
+ .\" shorthand for double quote that works everywhere.
+ .ds q \N'34'
+ .TH NEOMAGIC __drivermansuffix__ __vendorversion__
+--
+cgit v0.9.0.2-2-gbebe
+From c3cf7e328d7e9c276a3e237dbf9d1772b57a370e Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Tue, 11 Oct 2011 17:43:51 +0000
+Subject: Use malloc/calloc/realloc/free directly
+
+Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+diff --git a/src/neo_dga.c b/src/neo_dga.c
+index 4227da6..3e2a02e 100644
+--- a/src/neo_dga.c
++++ b/src/neo_dga.c
+@@ -86,10 +86,10 @@ NEODGAInit(ScreenPtr pScreen)
+
+ while(pMode) {
+
+- newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec));
++ newmodes = realloc(modes, (num + 1) * sizeof(DGAModeRec));
+
+ if(!newmodes) {
+- xfree(modes);
++ free(modes);
+ return FALSE;
+ }
+ modes = newmodes;
+diff --git a/src/neo_driver.c b/src/neo_driver.c
+index b12c125..c51dad4 100644
+--- a/src/neo_driver.c
++++ b/src/neo_driver.c
+@@ -475,7 +475,7 @@ NEOFreeRec(ScrnInfoPtr pScrn)
+ {
+ if (pScrn->driverPrivate == NULL)
+ return;
+- xfree(pScrn->driverPrivate);
++ free(pScrn->driverPrivate);
+ pScrn->driverPrivate = NULL;
+ }
+
+@@ -551,7 +551,7 @@ NEOProbe(DriverPtr drv, int flags)
+ foundScreen = TRUE;
+ }
+ }
+- xfree(usedChips);
++ free(usedChips);
+ }
+ }
+
+@@ -584,11 +584,11 @@ NEOProbe(DriverPtr drv, int flags)
+ foundScreen = TRUE;
+ }
+ }
+- xfree(usedChips);
++ free(usedChips);
+ }
+ #endif
+
+- xfree(devSections);
++ free(devSections);
+ return foundScreen;
+ }
+
+@@ -940,11 +940,11 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags)
+ xf86CollectOptions(pScrn, NULL);
+ /* Process the options */
+ if (nPtr->NeoChipset == NM2070) {
+- if (!(nPtr->Options = xalloc(sizeof(NEO_2070_Options))))
++ if (!(nPtr->Options = malloc(sizeof(NEO_2070_Options))))
+ return FALSE;
+ memcpy(nPtr->Options, NEO_2070_Options, sizeof(NEO_2070_Options));
+ } else {
+- if (!(nPtr->Options = xalloc(sizeof(NEOOptions))))
++ if (!(nPtr->Options = malloc(sizeof(NEOOptions))))
+ return FALSE;
+ memcpy(nPtr->Options, NEOOptions, sizeof(NEOOptions));
+ }
+@@ -1476,7 +1476,7 @@ NEOScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+
+ if(nPtr->shadowFB) {
+ nPtr->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
+- nPtr->ShadowPtr = xalloc(nPtr->ShadowPitch * height);
++ nPtr->ShadowPtr = malloc(nPtr->ShadowPitch * height);
+ displayWidth = nPtr->ShadowPitch / (pScrn->bitsPerPixel >> 3);
+ FBStart = nPtr->ShadowPtr;
+ } else {
+@@ -1789,7 +1789,7 @@ NEOCloseScreen(int scrnIndex, ScreenPtr pScreen)
+ if (nPtr->CursorInfo)
+ xf86DestroyCursorInfoRec(nPtr->CursorInfo);
+ if (nPtr->ShadowPtr)
+- xfree(nPtr->ShadowPtr);
++ free(nPtr->ShadowPtr);
+
+ pScrn->vtSema = FALSE;
+ pScreen->CloseScreen = nPtr->CloseScreen;
+@@ -2860,7 +2860,7 @@ neoModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ if (NeoNew->reg) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Non-NULL reg in NeoInit: reg=%p\n", (void *)NeoNew->reg);
+- xfree(NeoNew->reg);
++ free(NeoNew->reg);
+ NeoNew->reg = NULL;
+ }
+
+diff --git a/src/neo_video.c b/src/neo_video.c
+index a9e1e25..0edae30 100644
+--- a/src/neo_video.c
++++ b/src/neo_video.c
+@@ -99,7 +99,7 @@ NEOInitVideo(ScreenPtr pScreen)
+ numAdaptors = 1;
+ overlayAdaptors = &newAdaptor;
+ } else {
+- newAdaptors = xalloc((numAdaptors + 1)
++ newAdaptors = malloc((numAdaptors + 1)
+ * sizeof(XF86VideoAdaptorPtr*));
+ if (newAdaptors){
+ memcpy(newAdaptors, overlayAdaptors,
+@@ -114,7 +114,7 @@ NEOInitVideo(ScreenPtr pScreen)
+ xf86XVScreenInit(pScreen, overlayAdaptors, numAdaptors);
+
+ if (newAdaptors)
+- xfree(newAdaptors);
++ free(newAdaptors);
+ }
+
+ static XF86VideoEncodingRec NEOVideoEncodings[] =
+@@ -211,7 +211,7 @@ NEOSetupVideo(ScreenPtr pScreen)
+ #ifdef DEBUG
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"NEOSetupVideo\n");
+ #endif
+- if ((overlayAdaptor = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
++ if ((overlayAdaptor = calloc(1, sizeof(XF86VideoAdaptorRec) +
+ sizeof(DevUnion) +
+ sizeof(NEOPortRec))) == NULL){
+ return (NULL);
+@@ -918,7 +918,7 @@ NEOInitOffscreenImages(ScreenPtr pScreen)
+ #ifdef DEBUG
+ xf86DrvMsg(xf86Screens[pScreen->myNum]->scrnIndex,X_INFO,"NEOInitOffscreenImages\n");
+ #endif
+- if ((offscreenImages = xalloc(sizeof(XF86OffscreenImageRec))) == NULL){
++ if ((offscreenImages = malloc(sizeof(XF86OffscreenImageRec))) == NULL){
+ return;
+ }
+
+@@ -1017,19 +1017,19 @@ NEOAllocSurface(ScrnInfoPtr pScrn, int id,
+
+ surface->width = width;
+ surface->height = height;
+- if ((surface->pitches = xalloc(sizeof(int))) == NULL){
++ if ((surface->pitches = malloc(sizeof(int))) == NULL){
+ xf86FreeOffscreenLinear(linear);
+ return (BadAlloc);
+ }
+- if ((surface->offsets = xalloc(sizeof(int))) == NULL){
+- xfree(surface->pitches);
++ if ((surface->offsets = malloc(sizeof(int))) == NULL){
++ free(surface->pitches);
+ xf86FreeOffscreenLinear(linear);
+ return (BadAlloc);
+ }
+
+- if ((pPriv = xalloc(sizeof(NEOOffscreenRec))) == NULL){
+- xfree(surface->pitches);
+- xfree(surface->offsets);
++ if ((pPriv = malloc(sizeof(NEOOffscreenRec))) == NULL){
++ free(surface->pitches);
++ free(surface->offsets);
+ xf86FreeOffscreenLinear(linear);
+ return (BadAlloc);
+ }
+@@ -1057,9 +1057,9 @@ NEOFreeSurface(XF86SurfacePtr surface)
+ NEOStopSurface(surface);
+
+ xf86FreeOffscreenLinear(pPriv->linear);
+- xfree(surface->pitches);
+- xfree(surface->offsets);
+- xfree(surface->devPrivate.ptr);
++ free(surface->pitches);
++ free(surface->offsets);
++ free(surface->devPrivate.ptr);
+ return (Success);
+ }
+
+--
+cgit v0.9.0.2-2-gbebe
+From f2a771c6d2a2308245a0d46301e579b50fb2b6bd Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Tue, 11 Oct 2011 17:45:11 +0000
+Subject: Include <stdlib.h> for abs()
+
+Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+diff --git a/src/neo_driver.c b/src/neo_driver.c
+index c51dad4..f8bca2c 100644
+--- a/src/neo_driver.c
++++ b/src/neo_driver.c
+@@ -107,6 +107,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #include "scrnintstr.h"
+ #include "servermd.h"
+
++#include <stdlib.h>
+ #include <unistd.h>
+
+ /* Mandatory functions */
+--
+cgit v0.9.0.2-2-gbebe
+From 07845a120a674380b6b499961e6c81accfdd6a2e Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 19 Dec 2011 21:50:28 +0000
+Subject: Fall back to shadowfb when XAA is unavailable
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+diff --git a/src/neo_driver.c b/src/neo_driver.c
+index f8bca2c..a034f86 100644
+--- a/src/neo_driver.c
++++ b/src/neo_driver.c
+@@ -1089,6 +1089,18 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags)
+ if (nPtr->showcache)
+ xf86DrvMsg(pScrn->scrnIndex,X_CONFIG,
+ "Show chache for debugging\n");
++
++ if (!xf86LoadSubModule(pScrn, "xaa")) {
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadow\n");
++ nPtr->shadowFB = 1;
++ }
++
++ if (nPtr->shadowFB) {
++ if (!xf86LoadSubModule(pScrn, "shadow")) {
++ RETURN;
++ }
++ }
++
+ if (nPtr->shadowFB) {
+ nPtr->noAccel = TRUE;
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+@@ -1314,15 +1326,6 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags)
+ RETURN;
+ }
+
+- if (!xf86LoadSubModule(pScrn, "xaa"))
+- RETURN;
+-
+- if (nPtr->shadowFB) {
+- if (!xf86LoadSubModule(pScrn, "shadow")) {
+- RETURN;
+- }
+- }
+-
+ if (!nPtr->swCursor) {
+ if (!xf86LoadSubModule(pScrn, "ramdac"))
+ RETURN;
+--
+cgit v0.9.0.2-2-gbebe
+From 819c8f2119b8db10a6a9e4553cf88d66cff6eb8e Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 19 Dec 2011 21:51:31 +0000
+Subject: Fix for new vgahw ABI
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+diff --git a/src/neo_driver.c b/src/neo_driver.c
+index a034f86..509a77f 100644
+--- a/src/neo_driver.c
++++ b/src/neo_driver.c
+@@ -660,6 +660,7 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags)
+ if (!vgaHWGetHWRec(pScrn))
+ return FALSE;
+ hwp = VGAHWPTR(pScrn);
++ vgaHWSetStdFuncs(hwp);
+
+ /* Allocate the NeoRec driverPrivate */
+ if (!NEOGetRec(pScrn)) {
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/~fauno/localepurge/PKGBUILD b/~fauno/localepurge/PKGBUILD
new file mode 100644
index 000000000..61386db71
--- /dev/null
+++ b/~fauno/localepurge/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Francesco Groccia <frgroccia gmail.com>
+# Contributor: Dincer Celik <dincer@bornovali.com>
+
+pkgname=localepurge
+pkgver=0.6.2+nmu2
+pkgrel=3
+pkgdesc="Script to remove disk space wasted for unneeded localizations."
+arch=('any')
+url="http://packages.debian.org/source/sid/localepurge"
+license=('GPL')
+backup=('etc/locale.nopurge')
+source=("http://ftp.de.debian.org/debian/pool/main/l/localepurge/${pkgname}_${pkgver}.tar.gz"
+ "http://fgr.bitbucket.org/im/${pkgname}.patch"
+ "http://fgr.bitbucket.org/im/${pkgname}.8.patch"
+ "http://fgr.bitbucket.org/im/${pkgname}.config.patch"
+ "http://fgr.bitbucket.org/im/locale.nopurge")
+sha1sums=('a23f77bc770483b3d6f45d1d7caffad8c0891655'
+ '6e2165f3bb8cf2c463816849a973ea088398605f'
+ '3ac6c0a3e30395e6ca1c1fd8cc530fdd84e2c98e'
+ 'ec56640d9bf1a908bac4884aa7a2ecde0ee33c8a'
+ 'ab47efc3f07d7224382e95d3a5b25355058869b4')
+
+build()
+{
+ #cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -uN ${srcdir}/${pkgname}-${pkgver}/usr/sbin/localepurge < ${srcdir}/localepurge.patch
+ patch -uN ${srcdir}/${pkgname}-${pkgver}/debian/localepurge.8 < ${srcdir}/localepurge.8.patch
+ patch -uN ${srcdir}/${pkgname}-${pkgver}/debian/localepurge.config < ${srcdir}/localepurge.config.patch
+ install -D -m755 ${srcdir}/${pkgname}-${pkgver}/usr/sbin/localepurge ${pkgdir}/usr/sbin/localepurge
+ install -D -m644 ${srcdir}/${pkgname}-${pkgver}/debian/localepurge.8 ${pkgdir}/usr/share/man/man8/localepurge.8
+ install -D -m755 ${srcdir}/${pkgname}-${pkgver}/debian/localepurge.config ${pkgdir}/usr/sbin/localepurge.config
+ install -D -m644 locale.nopurge ${pkgdir}/etc/locale.nopurge
+ if [ ! -e /var/cache/localepurge/localelist ]; then
+ find /usr/share/locale -maxdepth 1 -type d -name "*" -printf "%f\n" | grep "^[a-z]" | cut -d" " -f1 | sort -u > ${srcdir}/localelist
+ else
+ cp /var/cache/localepurge/localelist ${srcdir}/localelist
+ fi
+ install -D -m644 ${srcdir}/localelist ${pkgdir}/var/cache/localepurge/localelist
+}
diff --git a/~fauno/notmuch/PKGBUILD b/~fauno/notmuch/PKGBUILD
index c4513a89e..bd2266fb7 100644
--- a/~fauno/notmuch/PKGBUILD
+++ b/~fauno/notmuch/PKGBUILD
@@ -3,27 +3,26 @@
# Maintainer: Richard Murri <admin@richardmurri.com>
pkgname=notmuch
-pkgver=0.11.1
-pkgrel=2
+pkgver=0.12
+pkgrel=1
pkgdesc="Notmuch is not much of an email program"
arch=(i686 x86_64 mips64el)
url="http://notmuchmail.org/"
license=('GPL3')
-depends=('xapian-core' 'gmime24' 'talloc')
-makedepends=('python2' 'emacs-nox' 'gnupg' 'ruby' 'pkgconfig' 'git')
+depends=('xapian-core' 'gmime' 'talloc')
+makedepends=('python2' 'emacs' 'gnupg' 'ruby' 'pkgconfig')
optdepends=('emacs: for using the emacs interface'
'vim: for using the vim interface'
'python2: for using the python bindings'
'ruby: for using the ruby bindings'
'gnupg: for email encryption')
-source=(
- # "https://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}-${pkgrel}-any.src.tar.xz"
- "http://notmuchmail.org/releases/${pkgname}-${pkgver}.tar.gz"
-)
-md5sums=('e78e0a2a99177f5b0edf472baa6f1128')
-# md5sums=('764abeb6e277c4c03bd64914c72d89a8')
+options=(!distcc !makeflags)
+
+source=("http://notmuchmail.org/releases/${pkgname}-${pkgver}.tar.gz")
+md5sums=('466974db1d8a215c6a2d7cca7c969b4f')
+
build() {
- cd "$srcdir/${pkgname}-${pkgver}"
+ cd "$srcdir/${pkgname}-"*
./configure --prefix=/usr --sysconfdir=/etc
make
@@ -34,12 +33,12 @@ build() {
}
check() {
- cd "$srcdir/${pkgname}-${pkgver}"
+ cd "$srcdir/${pkgname}-"*
make test
}
package(){
- cd "$srcdir/${pkgname}-${pkgver}"
+ cd "$srcdir/${pkgname}-"*
make DESTDIR="$pkgdir/" LIBDIR_IN_LDCONFIG=0 install
install -D notmuch $pkgdir/usr/sbin/notmuch
@@ -64,5 +63,3 @@ package(){
sed -i -e 's,/site_ruby,,g' Makefile
make prefix=${pkgdir}/usr install
}
-
-