--- /dev/null
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lisp/cl-clx/cl-clx-0.6.ebuild,v 1.1 2004/12/14 21:46:53 mkennedy Exp $
+
+inherit common-lisp eutils
+
+DESCRIPTION="Portable CLX"
+HOMEPAGE="http://ftp.linux.org.uk/pub/lisp/sbcl/ http://www.cliki.net/CLX"
+SRC_URI="http://ftp.linux.org.uk/pub/lisp/sbcl/clx_${PV}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+IUSE=""
+
+DEPEND="dev-lisp/common-lisp-controller"
+
+CLPACKAGE=clx
+
+S=${WORKDIR}/clx_${PV}
+
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${PV}-gentoo.patch || die
+}
+
+src_install() {
+ for i in . demo test debug; do
+ insinto /usr/share/common-lisp/source/clx/${i}
+ doins ${S}/${i}/*.lisp
+ done
+ insinto /usr/share/common-lisp/source/clx
+ doins clx.asd
+ common-lisp-system-symlink
+ dodoc CHANGES NEWS README*
+}
--- /dev/null
+diff -ur clx_0.6.orig/clx.asd clx_0.6/clx.asd
+--- clx_0.6.orig/clx.asd 2004-11-16 07:08:26.000000000 -0600
++++ clx_0.6/clx.asd 2004-12-14 14:28:38.710914897 -0600
+@@ -35,7 +35,7 @@
+ (defclass legacy-file (static-file) ())
+
+ (defsystem CLX
+- :depends-on (sb-bsd-sockets)
++ :depends-on (#+sbcl sb-bsd-sockets)
+ :version "0.6"
+ :serial t
+ :default-component-class clx-source-file
+@@ -89,23 +89,6 @@
+ ((:file "image")
+ ;; KLUDGE: again, this depends on "zoid"
+ (:file "trapezoid")))
+- (:static-file "NEWS")
+- (:static-file "CHANGES")
+- (:static-file "README")
+- (:static-file "README-R5")
+- (:legacy-file "exclMakefile")
+- (:legacy-file "exclREADME")
+- (:legacy-file "exclcmac" :pathname "exclcmac.lisp")
+- (:legacy-file "excldepc" :pathname "excldep.c")
+- (:legacy-file "excldep" :pathname "excldep.lisp")
+- (:legacy-file "sockcl" :pathname "sockcl.lisp")
+- (:legacy-file "socket" :pathname "socket.c")
+- (:legacy-file "defsystem" :pathname "defsystem.lisp")
+- (:legacy-file "provide" :pathname "provide.lisp")
+- (:legacy-file "cmudep" :pathname "cmudep.lisp")
+- (:module manual
+- ;; TODO: teach asdf how to process texinfo files
+- :components ((:static-file "clx.texinfo")))
+ (:module debug
+ :default-component-class legacy-file
+ :components
+diff -ur clx_0.6.orig/depdefs.lisp clx_0.6/depdefs.lisp
+--- clx_0.6.orig/depdefs.lisp 2003-06-05 15:18:22.000000000 -0500
++++ clx_0.6/depdefs.lisp 2004-12-14 14:28:38.712914713 -0600
+@@ -400,10 +400,10 @@
+ (eval-when (:compile-toplevel :load-toplevel :execute)
+ ;; FIXME: maybe we should reevaluate this?
+ (defvar *def-clx-class-use-defclass*
+- #+Genera t
++ #+(or Genera sbcl) t
+ #+(and cmu pcl) '(XLIB:DRAWABLE XLIB:WINDOW XLIB:PIXMAP)
+ #+(and cmu (not pcl)) nil
+- #-(or Genera cmu) nil
++ #-(or Genera cmu sbcl) nil
+ "Controls whether DEF-CLX-CLASS uses DEFCLASS.
+
+ If it is a list, it is interpreted by DEF-CLX-CLASS to be a list of
+diff -ur clx_0.6.orig/dependent.lisp clx_0.6/dependent.lisp
+--- clx_0.6.orig/dependent.lisp 2004-06-11 07:18:17.000000000 -0500
++++ clx_0.6/dependent.lisp 2004-12-14 14:51:54.396309754 -0600
+@@ -3092,7 +3092,7 @@
+ (defmacro with-underlying-simple-vector
+ ((variable element-type pixarray) &body body)
+ (declare (ignore element-type))
+- `(#+cmu kernel::with-array-data #+sbcl sb-kernel:with-array-data
++ `(#+cmu lisp::with-array-data #+sbcl sb-kernel:with-array-data
+ ((,variable ,pixarray) (start) (end))
+ (declare (ignore start end))
+ ,@body))
+@@ -3505,11 +3505,11 @@
+ height width)
+ (declare (type array-index source-width sx sy dest-width dx dy height width))
+ #.(declare-buffun)
+- (kernel::with-array-data ((sdata source)
++ (lisp::with-array-data ((sdata source)
+ (sstart)
+ (send))
+ (declare (ignore send))
+- (kernel::with-array-data ((ddata dest)
++ (lisp::with-array-data ((ddata dest)
+ (dstart)
+ (dend))
+ (declare (ignore dend))
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+<longdescription>
+CLX is an X11 client library for Common Lisp. The code was originally
+taken from a CMUCL distribution, was modified somewhat in order to
+make it compile and run under SBCL and other implementation, then a
+selection of patches were added from other CLXes around the net. Main
+features:
+
+ - SHAPE extension
+ - XFREE86-VIDMODE extension
+ - experimental RENDER extension
+ - X Authority support that works with SSH forwarding
+
+CLX is to Common Lisp, what xlib is to C.
+</longdescription>
+</pkgmetadata>