summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-lisp
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-lisp')
-rw-r--r--dev-lisp/abcl/Manifest2
-rw-r--r--dev-lisp/abcl/abcl-0.0.9-r1.ebuild79
-rw-r--r--dev-lisp/abcl/abcl-0.20.0.ebuild35
-rw-r--r--dev-lisp/abcl/metadata.xml15
-rw-r--r--dev-lisp/asdf-binary-locations/Manifest1
-rw-r--r--dev-lisp/asdf-binary-locations/asdf-binary-locations-20061018.ebuild27
-rw-r--r--dev-lisp/asdf-binary-locations/metadata.xml5
-rw-r--r--dev-lisp/asdf/Manifest6
-rw-r--r--dev-lisp/asdf/asdf-1.86-r1.ebuild42
-rw-r--r--dev-lisp/asdf/asdf-1.89.ebuild41
-rw-r--r--dev-lisp/asdf/asdf-3.0.3.ebuild50
-rw-r--r--dev-lisp/asdf/asdf-3.1.4.ebuild50
-rw-r--r--dev-lisp/asdf/files/gentoo-init.lisp12
-rw-r--r--dev-lisp/asdf/files/source-registry.conf5
-rw-r--r--dev-lisp/asdf/metadata.xml5
-rw-r--r--dev-lisp/cl-clx/Manifest3
-rw-r--r--dev-lisp/cl-clx/cl-clx-0.7.1.ebuild34
-rw-r--r--dev-lisp/cl-clx/cl-clx-0.7.2.ebuild34
-rw-r--r--dev-lisp/cl-clx/cl-clx-0.7.3.ebuild41
-rw-r--r--dev-lisp/cl-clx/files/0.6.1-gentoo.patch108
-rw-r--r--dev-lisp/cl-clx/metadata.xml19
-rw-r--r--dev-lisp/cl-ppcre/Manifest7
-rw-r--r--dev-lisp/cl-ppcre/cl-ppcre-1.2.10.ebuild25
-rw-r--r--dev-lisp/cl-ppcre/cl-ppcre-1.2.11.ebuild25
-rw-r--r--dev-lisp/cl-ppcre/cl-ppcre-1.2.12.ebuild25
-rw-r--r--dev-lisp/cl-ppcre/cl-ppcre-1.2.13.ebuild25
-rw-r--r--dev-lisp/cl-ppcre/cl-ppcre-1.2.14.ebuild25
-rw-r--r--dev-lisp/cl-ppcre/cl-ppcre-1.2.15.ebuild25
-rw-r--r--dev-lisp/cl-ppcre/cl-ppcre-1.2.16.ebuild25
-rw-r--r--dev-lisp/cl-ppcre/metadata.xml17
-rw-r--r--dev-lisp/clisp/Manifest2
-rw-r--r--dev-lisp/clisp/clisp-2.48-r1.ebuild166
-rw-r--r--dev-lisp/clisp/clisp-2.48-r2.ebuild165
-rw-r--r--dev-lisp/clisp/clisp-2.49-r8.ebuild145
-rw-r--r--dev-lisp/clisp/files/clisp-2.48-bits_ipctypes_to_sys_ipc.patch21
-rw-r--r--dev-lisp/clisp/files/clisp-2.49-bits_ipctypes_to_sys_ipc.patch21
-rw-r--r--dev-lisp/clisp/files/clisp-2.49-get_hostname.patch56
-rw-r--r--dev-lisp/clisp/files/clisp-2.49-tinfo.patch15
-rw-r--r--dev-lisp/clisp/metadata.xml28
-rw-r--r--dev-lisp/clozurecl/Manifest2
-rw-r--r--dev-lisp/clozurecl/clozurecl-1.10.ebuild92
-rw-r--r--dev-lisp/clozurecl/clozurecl-1.9_p1-r1.ebuild92
-rw-r--r--dev-lisp/clozurecl/metadata.xml8
-rw-r--r--dev-lisp/clx/Manifest1
-rw-r--r--dev-lisp/clx/clx-0.7.4.ebuild46
-rw-r--r--dev-lisp/clx/clx-9999.ebuild17
-rw-r--r--dev-lisp/clx/files/gentoo-fix-asd.patch303
-rw-r--r--dev-lisp/clx/files/gentoo-fix-dep-openmcl.patch21
-rw-r--r--dev-lisp/clx/files/gentoo-fix-dynamic-extent-sbcl-1.0.45.patch13
-rw-r--r--dev-lisp/clx/files/gentoo-fix-obsolete-eval-when.patch12
-rw-r--r--dev-lisp/clx/files/gentoo-fix-unused-vars.patch69
-rw-r--r--dev-lisp/clx/metadata.xml25
-rw-r--r--dev-lisp/cmucl/Manifest2
-rw-r--r--dev-lisp/cmucl/cmucl-20e.ebuild98
-rw-r--r--dev-lisp/cmucl/files/20e-customize-lisp-implementation-version.patch16
-rw-r--r--dev-lisp/cmucl/files/20e-execstack-fixes.patch118
-rw-r--r--dev-lisp/cmucl/files/cmuclrc9
-rw-r--r--dev-lisp/cmucl/files/site-init.lisp.in56
-rw-r--r--dev-lisp/cmucl/metadata.xml36
-rw-r--r--dev-lisp/common-lisp-controller/Manifest2
-rw-r--r--dev-lisp/common-lisp-controller/common-lisp-controller-4.27.ebuild93
-rw-r--r--dev-lisp/common-lisp-controller/common-lisp-controller-5.13-r1.ebuild97
-rw-r--r--dev-lisp/common-lisp-controller/files/4.27/lisp-config.lisp3
-rw-r--r--dev-lisp/common-lisp-controller/files/5.13/lisp-config.lisp3
-rw-r--r--dev-lisp/common-lisp-controller/files/README.Gentoo27
-rw-r--r--dev-lisp/common-lisp-controller/metadata.xml11
-rw-r--r--dev-lisp/ecls/Manifest8
-rw-r--r--dev-lisp/ecls/ecls-10.4.1.ebuild68
-rw-r--r--dev-lisp/ecls/ecls-11.1.1-r1.ebuild82
-rw-r--r--dev-lisp/ecls/ecls-12.12.1-r5.ebuild87
-rw-r--r--dev-lisp/ecls/ecls-12.12.1.ebuild79
-rw-r--r--dev-lisp/ecls/ecls-12.2.1.ebuild79
-rw-r--r--dev-lisp/ecls/ecls-12.7.1.ebuild79
-rw-r--r--dev-lisp/ecls/ecls-13.5.1-r1.ebuild90
-rw-r--r--dev-lisp/ecls/ecls-13.5.1.ebuild85
-rw-r--r--dev-lisp/ecls/ecls-15.3.7.ebuild91
-rw-r--r--dev-lisp/ecls/ecls-9.12.3.ebuild65
-rw-r--r--dev-lisp/ecls/files/10.4.1-headers-gentoo.patch17
-rw-r--r--dev-lisp/ecls/files/11.1.1-cmploc.patch35
-rw-r--r--dev-lisp/ecls/files/11.1.1-headers-gentoo.patch17
-rw-r--r--dev-lisp/ecls/files/12.12.1-asdf.patch12
-rw-r--r--dev-lisp/ecls/files/12.12.1-headers-gentoo.patch17
-rw-r--r--dev-lisp/ecls/files/12.2.1-headers-gentoo.patch17
-rw-r--r--dev-lisp/ecls/files/12.7.1-headers-gentoo.patch17
-rw-r--r--dev-lisp/ecls/files/13.5.1-gc74.patch57
-rw-r--r--dev-lisp/ecls/files/13.5.1-headers-gentoo.patch13
-rw-r--r--dev-lisp/ecls/files/15.3.7-headers-gentoo.patch13
-rw-r--r--dev-lisp/ecls/files/9.12.3-headers-gentoo.patch17
-rw-r--r--dev-lisp/ecls/files/README.Gentoo15
-rw-r--r--dev-lisp/ecls/metadata.xml19
-rw-r--r--dev-lisp/gcl/Manifest6
-rw-r--r--dev-lisp/gcl/files/64gcl-gentoo.el5
-rw-r--r--dev-lisp/gcl/files/bootstrap-gcl7
-rw-r--r--dev-lisp/gcl/files/gcl-gmp-6.patch8
-rw-r--r--dev-lisp/gcl/files/gcl-readline-6.3.patch18
-rw-r--r--dev-lisp/gcl/files/gcl-tcl-8.6.patch103
-rw-r--r--dev-lisp/gcl/gcl-2.6.10.ebuild153
-rw-r--r--dev-lisp/gcl/gcl-2.6.11.ebuild148
-rw-r--r--dev-lisp/gcl/gcl-2.6.12.ebuild146
-rw-r--r--dev-lisp/gcl/metadata.xml14
-rw-r--r--dev-lisp/gentoo-init/files/gentoo-init-1.lisp11
-rw-r--r--dev-lisp/gentoo-init/files/gentoo-init.lisp7
-rw-r--r--dev-lisp/gentoo-init/files/source-registry.conf5
-rw-r--r--dev-lisp/gentoo-init/gentoo-init-0.1.ebuild24
-rw-r--r--dev-lisp/gentoo-init/gentoo-init-1.0.ebuild23
-rw-r--r--dev-lisp/gentoo-init/metadata.xml5
-rw-r--r--dev-lisp/hyperspec/Manifest1
-rw-r--r--dev-lisp/hyperspec/hyperspec-7.0-r1.ebuild36
-rw-r--r--dev-lisp/hyperspec/hyperspec-7.0.ebuild40
-rw-r--r--dev-lisp/hyperspec/metadata.xml5
-rw-r--r--dev-lisp/metadata.xml40
-rw-r--r--dev-lisp/sbcl/Manifest34
-rw-r--r--dev-lisp/sbcl/files/bsd-sockets-test-1.2.11.patch350
-rw-r--r--dev-lisp/sbcl/files/bsd-sockets-test-1.2.6.patch157
-rw-r--r--dev-lisp/sbcl/files/bsd-sockets-test-1.2.7.patch184
-rw-r--r--dev-lisp/sbcl/files/bsd-sockets-test-1.2.9.patch346
-rw-r--r--dev-lisp/sbcl/files/bsd-sockets-test-1.2.patch24
-rw-r--r--dev-lisp/sbcl/files/bsd-sockets-test.patch22
-rw-r--r--dev-lisp/sbcl/files/concurrency-test-1.2.6.patch24
-rw-r--r--dev-lisp/sbcl/files/concurrency-test.patch16
-rw-r--r--dev-lisp/sbcl/files/gentoo-fix_install_man.patch12
-rw-r--r--dev-lisp/sbcl/files/gentoo-fix_linux-os-c.patch14
-rw-r--r--dev-lisp/sbcl/files/gentoo-fix_nopie_for_hardened_toolchain.patch24
-rw-r--r--dev-lisp/sbcl/files/gentoo_fix_waitpid_c.patch11
-rw-r--r--dev-lisp/sbcl/files/sbcl-1.0.55-newglibc.patch43
-rw-r--r--dev-lisp/sbcl/files/sbcl-1.0.55_no_doc_install.patch61
-rw-r--r--dev-lisp/sbcl/files/sbcl-1.0.6-solaris.patch13
-rw-r--r--dev-lisp/sbcl/files/sbcl-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch22
-rw-r--r--dev-lisp/sbcl/files/sbcl-1.2.11-solaris.patch12
-rw-r--r--dev-lisp/sbcl/files/sbcl-1.2.13-verbose-build.patch25
-rw-r--r--dev-lisp/sbcl/files/sbcl-1.2.7-verbose-build.patch28
-rw-r--r--dev-lisp/sbcl/metadata.xml38
-rw-r--r--dev-lisp/sbcl/sbcl-1.0.55-r1.ebuild203
-rw-r--r--dev-lisp/sbcl/sbcl-1.1.18.ebuild212
-rw-r--r--dev-lisp/sbcl/sbcl-1.2.10.ebuild236
-rw-r--r--dev-lisp/sbcl/sbcl-1.2.11.ebuild236
-rw-r--r--dev-lisp/sbcl/sbcl-1.2.13.ebuild236
-rw-r--r--dev-lisp/sbcl/sbcl-1.2.2.ebuild212
-rw-r--r--dev-lisp/sbcl/sbcl-1.2.4.ebuild212
-rw-r--r--dev-lisp/sbcl/sbcl-1.2.6.ebuild211
-rw-r--r--dev-lisp/sbcl/sbcl-1.2.7.ebuild233
-rw-r--r--dev-lisp/sbcl/sbcl-1.2.9.ebuild236
-rw-r--r--dev-lisp/uiop/Manifest2
-rw-r--r--dev-lisp/uiop/metadata.xml5
-rw-r--r--dev-lisp/uiop/uiop-3.0.3.ebuild27
-rw-r--r--dev-lisp/uiop/uiop-3.1.4.ebuild27
146 files changed, 8336 insertions, 0 deletions
diff --git a/dev-lisp/abcl/Manifest b/dev-lisp/abcl/Manifest
new file mode 100644
index 000000000000..c5acfb12b355
--- /dev/null
+++ b/dev-lisp/abcl/Manifest
@@ -0,0 +1,2 @@
+DIST abcl-0.0.9.tar.gz 592410 SHA256 ee634443a4a77b2bb9324fa4ff900b15aea5081042fde039045b535d28a8049b SHA512 d822f099ab73f1f62f14bfa3991b88573587d90a8c31e97933549bd19fabaa4d9337963ba33f6ef59f65c259f374bbabb5263c2c3fda3d99a19a645756f80a1c WHIRLPOOL dc405429363bb5a06cc49ad2368451048c83a2eb481e8e8b3d0e9659754d4fdaf5d1a98ba93f9aff647c0e82dff71c41f3e3d75023ab6b02c6142f7062163e82
+DIST abcl-src-0.20.0.tar.gz 735614 SHA256 050e9f6eac7714a39fadafcf5a98893a7926322505c564b1d355748e47c06b48 SHA512 73b033883149b1083a03d87ed5c41b5b6e790cb02978a82f1b57274e6744b66c7b05c5a708077f354ee46ce0780327dfc728bbd9cd9c4f87bd69b730ead8e81b WHIRLPOOL a160ff7d436354fd66bfb467a57ffe3b41c6c08a6a1d02b775979d5955470eac15512737d32003b8d6c73428c655f1f33750a65f5288ecdf06bbfe21e52e9fe0
diff --git a/dev-lisp/abcl/abcl-0.0.9-r1.ebuild b/dev-lisp/abcl/abcl-0.0.9-r1.ebuild
new file mode 100644
index 000000000000..8e660c63529f
--- /dev/null
+++ b/dev-lisp/abcl/abcl-0.0.9-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils java-pkg-2
+
+DESCRIPTION="ABCL is an implementation of ANSI Common Lisp that runs in a Java VM"
+HOMEPAGE="http://armedbear.org/abcl.html"
+SRC_URI="http://armedbear.org/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="jad clisp cmucl"
+
+RDEPEND=">=virtual/jre-1.4
+ jad? ( dev-java/jad-bin )"
+
+DEPEND=">=virtual/jdk-1.4
+ dev-lang/python
+ !cmucl? ( !clisp? ( dev-lisp/sbcl ) )
+ cmucl? ( dev-lisp/cmucl )
+ clisp? ( dev-lisp/clisp )"
+
+src_unpack() {
+ unpack ${A}
+ cat > "${S}/customizations.lisp" <<EOF
+(in-package #:build-abcl)
+(setf
+*javac-options* "-g $(java-pkg_javac-args)"
+*jikes-options* "+D -g $(java-pkg_javac-args)"
+*jdk* "${JAVA_HOME}/"
+*java-compiler* "${JAVAC}"
+*jar* "jar")
+EOF
+ einfo "Building with the following customizations.lisp:"
+ cat "${S}/customizations.lisp"
+ cat >"${S}/build.lisp" <<'EOF'
+(progn (load "build-abcl") (funcall (intern "BUILD-ABCL" "BUILD-ABCL") :clean t :full t) #+sbcl (sb-ext:quit) #+clisp (ext:quit) #+cmu (extensions:quit))
+EOF
+}
+
+getutfvars() {
+python << EOF
+import os
+for key,value in os.environ.iteritems():
+ try:
+ value.encode()
+ except UnicodeDecodeError:
+ print key
+EOF
+}
+
+src_compile() {
+ local lisp_compiler lisp_compiler_args
+ if use clisp; then
+ lisp_compiler="clisp"
+ lisp_compiler_args="-ansi build.lisp"
+ elif use cmucl; then
+ lisp_compiler="lisp"
+ lisp_compiler_args="-noinit -nositeinit -batch -load build.lisp"
+ else
+ lisp_compiler="sbcl"
+ lisp_compiler_args="--sysinit /dev/null --userinit /dev/null --disable-debugger --load build.lisp"
+ fi
+
+ einfo "Filtering non ASCII environment variables"
+ for var in $(getutfvars); do
+ einfo " ${var}"
+ unset ${var}
+ done
+ $lisp_compiler $lisp_compiler_args || die
+}
+
+src_install() {
+ java-pkg_dolauncher ${PN} --java_args "-Xmx256M -Xrs" --main org.armedbear.lisp.Main
+ java-pkg_doso src/org/armedbear/lisp/libabcl.so
+ java-pkg_dojar abcl.jar
+ dodoc README || die
+}
diff --git a/dev-lisp/abcl/abcl-0.20.0.ebuild b/dev-lisp/abcl/abcl-0.20.0.ebuild
new file mode 100644
index 000000000000..7b6405ce75aa
--- /dev/null
+++ b/dev-lisp/abcl/abcl-0.20.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit java-pkg-2 java-ant-2
+
+MY_P=${PN}-src-${PV}
+
+DESCRIPTION="Armed Bear Common Lisp is a Common Lisp implementation for the JVM"
+HOMEPAGE="http://common-lisp.net/project/armedbear/"
+SRC_URI="http://common-lisp.net/project/armedbear/releases/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="jad"
+
+DEPEND=">=virtual/jdk-1.5"
+RDEPEND=">=virtual/jre-1.5
+ jad? ( dev-java/jad-bin )"
+
+S="${WORKDIR}"/${MY_P}
+
+src_compile() {
+ eant abcl.compile || die "Can't compile ABCL"
+ eant abcl.jar || die "Can't make ABCL jar archive"
+}
+
+src_install() {
+ java-pkg_dojar dist/abcl.jar
+ java-pkg_dolauncher ${PN} --java_args "-server -Xrs" --main org.armedbear.lisp.Main
+ dodoc README || die "Can't install README"
+}
diff --git a/dev-lisp/abcl/metadata.xml b/dev-lisp/abcl/metadata.xml
new file mode 100644
index 000000000000..b89ccb622774
--- /dev/null
+++ b/dev-lisp/abcl/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>common-lisp</herd>
+ <herd>java</herd>
+ <longdescription>
+ Armed Bear Common Lisp (ABCL) is an implementation of ANSI Common
+ Lisp that runs in a Java virtual machine.
+ </longdescription>
+ <use>
+ <flag name='clisp'>Build Armed Bear Common Lisp using GNU CLISP</flag>
+ <flag name='cmucl'>Build Armed Bear Common Lisp using CMU Common Lisp</flag>
+ <flag name='jad'>Enable support for disassembling compiled code using JAD</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lisp/asdf-binary-locations/Manifest b/dev-lisp/asdf-binary-locations/Manifest
new file mode 100644
index 000000000000..3005a626988d
--- /dev/null
+++ b/dev-lisp/asdf-binary-locations/Manifest
@@ -0,0 +1 @@
+DIST asdf-binary-locations_20061018.tar.gz 7504 SHA256 1ffc3473792cf383e7860551eaacb67fcf5a5421d371be2605ed3258f0f55f45 SHA512 3ce92f85763f65331debabd2fd6e2874e331552fda8a6657630b5696bacdb7282f00a5d98ecf2768087a7502a883582abc468de38a6d7aeef8ae0f03423653e0 WHIRLPOOL a9a7c61a267ad91ec4dec1dee7b5999c1e1b33685d244832595b4e4ee258e68882e0c9662139e7a3fdcbc9cedc568bf62eeb9f8ec94db3e7de4afc570e7827ec
diff --git a/dev-lisp/asdf-binary-locations/asdf-binary-locations-20061018.ebuild b/dev-lisp/asdf-binary-locations/asdf-binary-locations-20061018.ebuild
new file mode 100644
index 000000000000..13f125862b04
--- /dev/null
+++ b/dev-lisp/asdf-binary-locations/asdf-binary-locations-20061018.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+inherit common-lisp
+
+DESCRIPTION="An ASDF-Extension to specify where your Common Lisp binaries (FASL files) should go"
+HOMEPAGE="http://common-lisp.net/project/cl-containers/asdf-binary-locations/"
+SRC_URI="http://common-lisp.net/project/portage-overlay/distfiles/${PN}_${PV}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE=""
+
+DEPEND="dev-lisp/asdf"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+CLPACKAGE=${PN}
+
+src_install() {
+ insinto $CLSOURCEROOT/$CLPACKAGE/dev
+ doins dev/*.lisp
+ common-lisp-install *.asd
+ common-lisp-system-symlink
+}
diff --git a/dev-lisp/asdf-binary-locations/metadata.xml b/dev-lisp/asdf-binary-locations/metadata.xml
new file mode 100644
index 000000000000..f418045b09c8
--- /dev/null
+++ b/dev-lisp/asdf-binary-locations/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+</pkgmetadata>
diff --git a/dev-lisp/asdf/Manifest b/dev-lisp/asdf/Manifest
new file mode 100644
index 000000000000..ee3b64c82cd1
--- /dev/null
+++ b/dev-lisp/asdf/Manifest
@@ -0,0 +1,6 @@
+DIST asdf-3.0.3.tar.gz 427575 SHA256 05f11d83d33f1080f683701ad0e139011051f9c3190c3b1f22bc63208d8d5f47 SHA512 d9d8d466c7b6aa6beb1c22da4fd10499fa784c39ab138bea7ecb8cdccf769766572ebe91c89db2d5c53e493096248f82a224be95c1fcac8b7beebe1b57f34883 WHIRLPOOL 3503250361350b59d095b743dcc627e9ec1e3ec469066287b80d97924d54ea254fed94f77596ed71b4c9974e4c9b97de8b6a35b3c6529f559d6ba392b695ccf4
+DIST asdf-3.1.4.tar.gz 831537 SHA256 bc8bfaf36335e5f01fd08159c1ded5a96088fbea002b466bdf95c129c413cc43 SHA512 c48eb0928d3b98154d63e8ce797baeb4ad51ab685594b80f2ec4db9747b41c619ec17856d2483590ca8bd0b8c9db160837e7e49e72396c3a16db338ea985282c WHIRLPOOL 71babc996c326b6fb0118752a0f60601f9cefb28d254fd48c838abae14e7bc02f8831a5e96e9521b95f52b9bc1bb632fb5d93abed11dea480ba9f007e7cfdbf1
+DIST cl-asdf_1.86-1.diff.gz 4888 SHA256 ac7c526a4471353cff3fc2ae750693cf5a9a35c6dca1e52d04e9fd17d76082c8 SHA512 9aa905a14e814a9c7e8077d09aca238d735511ae67f0197fffc84100f5500950081bc00f5be7c6838e3a58d9e4c2f5b6fce9e41d84c7e39fb4fb2e04a1482abf WHIRLPOOL 86a88af4124e9e822c899f23400d054fd915365a825017fdf1ad0b6a26e121cbfe80639f65b018dbc7012173a40c88a31b287c96919184e050feb809ba86bd12
+DIST cl-asdf_1.86.orig.tar.gz 53686 SHA256 cfee04493fe4b8a70a42e3ed79d927c3551878c8685ba7c8cf557341453421ce SHA512 a62ff032b41d60b3afbd1f1ef85ea52d669a6fdd87371b19364dec98e99a01e134242bd0b0d6e8731c8d89feab78b809b740a533a46ff21a3969ef0f7dd1e65c WHIRLPOOL c1943361d8e396d9ec602428b91622a023f7743553c4a8d8316ac6b472e11ef1bc3ad3e65644e2d492932c8eb7d02bf596f465e48b6e6714ee4af957459754d2
+DIST cl-asdf_1.89-1.diff.gz 395 SHA256 1ad2de4d9bb494f58e69f327d02cd86100967371c93727393b99b3b6fd20d567 SHA512 0d5ac51e69914b58497815971f1736712bd65988944fff5966f854c2dd22d1969d9237c996bfd44a6195d2765db9af07c3055c9bf126ba25059eccdbf8da20b4 WHIRLPOOL 20bc02a86d3645bedf1952ef70193f3b52250dcab5720e21940f0721e2c8be330f8452d4f77c82cc7bb105afb935c3b255e435b5d99ac40965c49621082c0f4b
+DIST cl-asdf_1.89.orig.tar.gz 60134 SHA256 617853e512a0e6bdfa269811c3b9866af3878d40c7e4e8bab4ebf5374bd5a0ec SHA512 eb20877bb6acb6cab5874229290605aaef19d2501d8011473b66d0c9609d0b4d12f2951c39e4a3d2d07a3f0a7862c7e6beb6073514bb8b36189049bb96ba0e9a WHIRLPOOL 23636e9db0d351f88cec352a2c85489f41c5dc1085af75d2a3f4b460c462ff1115a0fb0408dcb21e2dc66d2ac773053c3586067aeaeca19615a2b22fcc3b384b
diff --git a/dev-lisp/asdf/asdf-1.86-r1.ebuild b/dev-lisp/asdf/asdf-1.86-r1.ebuild
new file mode 100644
index 000000000000..82202d3ba74c
--- /dev/null
+++ b/dev-lisp/asdf/asdf-1.86-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+DEB_PV="1"
+MY_PN="cl-${PN}"
+MY_P="${MY_PN}-${PV}"
+
+inherit eutils
+
+DESCRIPTION="ASDF is Another System Definition Facility for Common Lisp"
+HOMEPAGE="http://packages.debian.org/unstable/devel/cl-asdf"
+SRC_URI="mirror://gentoo/${MY_PN}_${PV}.orig.tar.gz
+ mirror://gentoo/${MY_PN}_${PV}-${DEB_PV}.diff.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc ppc64 s390 sparc x86"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+EPATCH_SOURCE="${WORKDIR}"
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch ${MY_PN}_${PV}-${DEB_PV}.diff || die
+}
+
+src_install() {
+ insinto /usr/share/common-lisp/source/asdf
+ doins asdf.lisp wild-modules.lisp asdf-install.lisp
+
+ dodoc README
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins test/*
+ fi
+}
diff --git a/dev-lisp/asdf/asdf-1.89.ebuild b/dev-lisp/asdf/asdf-1.89.ebuild
new file mode 100644
index 000000000000..08d7b2b0fd0c
--- /dev/null
+++ b/dev-lisp/asdf/asdf-1.89.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+DEB_PV="1"
+MY_PN="cl-${PN}"
+MY_P="${MY_PN}-${PV}"
+
+inherit eutils
+
+DESCRIPTION="ASDF is Another System Definition Facility for Common Lisp"
+HOMEPAGE="http://packages.debian.org/unstable/devel/cl-asdf"
+SRC_URI="mirror://gentoo/${MY_PN}_${PV}.orig.tar.gz
+ mirror://gentoo/${MY_PN}_${PV}-${DEB_PV}.diff.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+EPATCH_SOURCE="${WORKDIR}"
+S="${WORKDIR}"/${MY_P}.orig
+
+src_prepare() {
+ epatch ${MY_PN}_${PV}-${DEB_PV}.diff || die
+}
+
+src_install() {
+ insinto /usr/share/common-lisp/source/asdf
+ doins asdf.lisp wild-modules.lisp asdf-install.lisp
+ dodoc README
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins test/*
+ fi
+}
diff --git a/dev-lisp/asdf/asdf-3.0.3.ebuild b/dev-lisp/asdf/asdf-3.0.3.ebuild
new file mode 100644
index 000000000000..d272c7122277
--- /dev/null
+++ b/dev-lisp/asdf/asdf-3.0.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils prefix
+
+DESCRIPTION="ASDF is Another System Definition Facility for Common Lisp"
+HOMEPAGE="http://common-lisp.net/project/asdf/"
+SRC_URI="http://common-lisp.net/project/${PN}/archives/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="doc test"
+
+SLOT="0/${PVR}"
+
+DEPEND="!dev-lisp/cl-${PN}
+ !dev-lisp/asdf-binary-locations
+ !dev-lisp/gentoo-init
+ !<dev-lisp/asdf-2.33-r3
+ doc? ( virtual/texi2dvi )
+ test? ( dev-lisp/sbcl )"
+RDEPEND=""
+PDEPEND="~dev-lisp/uiop-${PV}"
+
+S="${WORKDIR}"
+
+src_compile() {
+ make
+ use doc && make doc
+}
+
+src_install() {
+ insinto /usr/share/common-lisp/source/${PN}
+ doins -r build version.lisp-expr
+ dodoc README TODO
+ dohtml doc/*.{html,css,ico,png}
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins doc/${PN}.pdf
+ fi
+
+ insinto /etc/common-lisp
+ cd "${T}"
+ cp "${FILESDIR}"/gentoo-init.lisp "${FILESDIR}"/source-registry.conf .
+ eprefixify gentoo-init.lisp source-registry.conf
+ doins gentoo-init.lisp source-registry.conf
+}
diff --git a/dev-lisp/asdf/asdf-3.1.4.ebuild b/dev-lisp/asdf/asdf-3.1.4.ebuild
new file mode 100644
index 000000000000..297a8dc91cb7
--- /dev/null
+++ b/dev-lisp/asdf/asdf-3.1.4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils prefix
+
+DESCRIPTION="ASDF is Another System Definition Facility for Common Lisp"
+HOMEPAGE="http://common-lisp.net/project/asdf/"
+SRC_URI="http://common-lisp.net/project/${PN}/archives/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="doc"
+
+SLOT="0/${PVR}"
+
+DEPEND="!dev-lisp/cl-${PN}
+ !dev-lisp/asdf-binary-locations
+ !dev-lisp/gentoo-init
+ !<dev-lisp/asdf-2.33-r3
+ doc? ( virtual/texi2dvi )"
+RDEPEND=""
+PDEPEND="~dev-lisp/uiop-${PV}"
+
+S="${WORKDIR}"
+
+src_compile() {
+ make
+ use doc && make doc
+}
+
+src_install() {
+ insinto /usr/share/common-lisp/source/${PN}
+ doins -r build version.lisp-expr
+ dodoc README.md TODO
+ dohtml doc/*.{html,css,ico,png}
+ if use doc; then
+ dohtml -r doc/${PN}
+ insinto /usr/share/doc/${PF}
+ doins doc/${PN}.pdf
+ fi
+
+ insinto /etc/common-lisp
+ cd "${T}"
+ cp "${FILESDIR}"/gentoo-init.lisp "${FILESDIR}"/source-registry.conf .
+ eprefixify gentoo-init.lisp source-registry.conf
+ doins gentoo-init.lisp source-registry.conf
+}
diff --git a/dev-lisp/asdf/files/gentoo-init.lisp b/dev-lisp/asdf/files/gentoo-init.lisp
new file mode 100644
index 000000000000..1a855466a23a
--- /dev/null
+++ b/dev-lisp/asdf/files/gentoo-init.lisp
@@ -0,0 +1,12 @@
+(in-package #:cl-user)
+
+#-(or cmu ccl ecl sbcl)
+(let ((*compile-print* nil)
+ (*compile-verbose* nil)
+ #+cmu (ext:*gc-verbose* nil))
+ (handler-bind ((warning #'muffle-warning))
+ (load #p"@GENTOO_PORTAGE_EPREFIX@/usr/share/common-lisp/source/asdf/build/asdf.lisp"
+ :print nil :verbose nil)))
+
+#+(or cmu ccl ecl sbcl)
+(require :asdf)
diff --git a/dev-lisp/asdf/files/source-registry.conf b/dev-lisp/asdf/files/source-registry.conf
new file mode 100644
index 000000000000..d8cfd7146df9
--- /dev/null
+++ b/dev-lisp/asdf/files/source-registry.conf
@@ -0,0 +1,5 @@
+;; -*- Mode: Lisp; -*-
+
+(:source-registry
+ (:directory "@GENTOO_PORTAGE_EPREFIX@/usr/share/common-lisp/systems")
+ :inherit-configuration)
diff --git a/dev-lisp/asdf/metadata.xml b/dev-lisp/asdf/metadata.xml
new file mode 100644
index 000000000000..f418045b09c8
--- /dev/null
+++ b/dev-lisp/asdf/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+</pkgmetadata>
diff --git a/dev-lisp/cl-clx/Manifest b/dev-lisp/cl-clx/Manifest
new file mode 100644
index 000000000000..d6ffd10df415
--- /dev/null
+++ b/dev-lisp/cl-clx/Manifest
@@ -0,0 +1,3 @@
+DIST clx_0.7.1.tar.gz 406363 SHA256 7c6bce234794664def6ad1350b00de470301c975782c0aa73d9a1f1f1288b731 SHA512 bf9dafdf26a6d7a5ffae9b59deed7f2779f472afce4904cbecc812dfb769277daf983aac099911b0ae74fee709cb87d8182137a0e6f93235056a30c56854a137 WHIRLPOOL 803819402f7bc47495eae7d46c00c78353b9d88a04f71e039abf5faa3d8fc18287303f79226626a711a7cb73675fa88e8ed1f256fdff28bd8b5d9d7c29cbff95
+DIST clx_0.7.2.tar.gz 419578 SHA256 d30bd23cb51000c237ef6bb4036d1134507b80b6ce8268a3ae808554ad52b095 SHA512 4c48780294a2e0d43d384450129be801897838142b2762098e71fe950350a41ccbcd8ebe6433d666605e20e5de7acac9681af8630b50c4e67cf24691a90f9859 WHIRLPOOL f876c64c94745fb4dcfd620af16791b5446f3beed6b1c2e677c17d94d88997d2b6f0b20bbf058616da3256757987afe8e4314546e6b6c34cde0acff7d1649745
+DIST clx_0.7.3.tar.gz 438168 SHA256 1f0f79cec7c7c314a4612256b33b8af507493ae4f7e3882b6c7bf5fb8e6f0c7b SHA512 b60e6cb0393e658d1a42957e2ba36bbaee5357979247ec2aaa25c105b2f83962c48594de5df5a7269c6289ff383697c9180ae243031757891b0233c2c2df5a6e WHIRLPOOL 036235e8dc80b3a4e97da3cc36008d9dff79b5dd74fe2797d2dfe33b5c53cea82a616007cc29e4194177713f75e611a9d581e46bc0092db83336d1ba1984e259
diff --git a/dev-lisp/cl-clx/cl-clx-0.7.1.ebuild b/dev-lisp/cl-clx/cl-clx-0.7.1.ebuild
new file mode 100644
index 000000000000..0216f25dbfc3
--- /dev/null
+++ b/dev-lisp/cl-clx/cl-clx-0.7.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE=""
+
+DEPEND="dev-lisp/common-lisp-controller"
+
+CLPACKAGE=clx
+
+S=${WORKDIR}/clx_${PV}
+
+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 NEWS CHANGES README README-R5 \
+ excl* sock*
+ insinto /usr/share/common-lisp/source/manual
+ doins manual/clx.texinfo
+ common-lisp-system-symlink
+ dodoc CHANGES NEWS README*
+}
diff --git a/dev-lisp/cl-clx/cl-clx-0.7.2.ebuild b/dev-lisp/cl-clx/cl-clx-0.7.2.ebuild
new file mode 100644
index 000000000000..955f421c212f
--- /dev/null
+++ b/dev-lisp/cl-clx/cl-clx-0.7.2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="dev-lisp/common-lisp-controller"
+
+CLPACKAGE=clx
+
+S=${WORKDIR}/clx_${PV}
+
+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 NEWS CHANGES README README-R5 \
+ excl* sock*
+ insinto /usr/share/common-lisp/source/manual
+ doins manual/clx.texinfo
+ common-lisp-system-symlink
+ dodoc CHANGES NEWS README*
+}
diff --git a/dev-lisp/cl-clx/cl-clx-0.7.3.ebuild b/dev-lisp/cl-clx/cl-clx-0.7.3.ebuild
new file mode 100644
index 000000000000..a43f826a32af
--- /dev/null
+++ b/dev-lisp/cl-clx/cl-clx-0.7.3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit common-lisp eutils
+
+DESCRIPTION="CLX is the Common Lisp interface to the X11 protocol primarily for SBCL"
+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="HPND"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE=""
+
+DEPEND="dev-lisp/common-lisp-controller
+ virtual/commonlisp
+ sys-apps/texinfo"
+
+CLPACKAGE=clx
+
+S=${WORKDIR}/clx_${PV}
+
+src_compile() {
+ makeinfo manual/clx.texinfo || 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 NEWS CHANGES README README-R5 \
+ excl* sock*
+ insinto /usr/share/common-lisp/source/manual
+ doins manual/clx.texinfo # part of system definition
+ common-lisp-system-symlink
+ dodoc CHANGES NEWS README*
+ doinfo clx.info*
+}
diff --git a/dev-lisp/cl-clx/files/0.6.1-gentoo.patch b/dev-lisp/cl-clx/files/0.6.1-gentoo.patch
new file mode 100644
index 000000000000..4f3a63ee31c3
--- /dev/null
+++ b/dev-lisp/cl-clx/files/0.6.1-gentoo.patch
@@ -0,0 +1,108 @@
+diff -ur clx_0.6.1.orig/clx.asd clx_0.6.1/clx.asd
+--- clx_0.6.1.orig/clx.asd 2005-03-29 08:42:20.000000000 -0600
++++ clx_0.6.1/clx.asd 2005-03-30 23:55:19.000000000 -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.1"
+ :serial t
+ :default-component-class clx-source-file
+Only in clx_0.6.1: clx.asd.~1.23.~
+diff -ur clx_0.6.1.orig/depdefs.lisp clx_0.6.1/depdefs.lisp
+--- clx_0.6.1.orig/depdefs.lisp 2003-06-05 15:18:22.000000000 -0500
++++ clx_0.6.1/depdefs.lisp 2005-03-31 00:15:05.000000000 -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
+Only in clx_0.6.1: depdefs.lisp.~1.4.~
+diff -ur clx_0.6.1.orig/dependent.lisp clx_0.6.1/dependent.lisp
+--- clx_0.6.1.orig/dependent.lisp 2004-06-11 07:18:17.000000000 -0500
++++ clx_0.6.1/dependent.lisp 2005-03-31 00:20:25.000000000 -0600
+@@ -1511,11 +1511,16 @@
+ (cdr (host-address host)))
+ :foreign-port (+ *x-tcp-port* display)))
+
+-#+(or sbcl ecl)
++#+(or sbcl ecl cmu)
+ (defconstant +X-unix-socket-path+
+ "/tmp/.X11-unix/X"
+ "The location of the X socket")
+
++#+(or sbcl ecl CMU)
++(defconstant +X-tcp-port+
++ 6000
++ "The TCP port number for X")
++
+ #+sbcl
+ (defun open-x-stream (host display protocol)
+ (declare (ignore protocol)
+@@ -1528,11 +1533,22 @@
+ (let ((host (car (host-ent-addresses (get-host-by-name host)))))
+ (when host
+ (let ((s (make-instance 'inet-socket :type :stream :protocol :tcp)))
+- (socket-connect s host (+ 6000 display))
++ (socket-connect s host (+ +X-tcp-port+ display))
+ s))))
+ :element-type '(unsigned-byte 8)
+ :input t :output t :buffering :none))
+
++#+CMU
++(defun open-x-stream (host display protocol)
++ (declare (ignore protocol)
++ (type (integer 0) display))
++ (system:make-fd-stream
++ (if (or (string= host "") (string= host "unix"))
++ (ext:connect-to-unix-socket (format nil "~A~D" +X-unix-socket-path+ display))
++ (ext:connect-to-inet-socket host (+ +X-tcp-port+ display)))
++ :input t :output t :element-type '(unsigned-byte 8)))
++
++
+ #+ecl
+ (defun open-x-stream (host display protocol)
+ (declare (ignore protocol)
+@@ -1541,7 +1557,7 @@
+ (if (or (string= host "") (string= host "unix")) ; AF_UNIX doamin socket
+ (sys::open-unix-socket-stream
+ (format nil "~A~D" +X-unix-socket-path+ display))
+- (si::open-client-stream host (+ 6000 display)))))
++ (si::open-client-stream host (+ +X-tcp-port+ display)))))
+
+ ;;; BUFFER-READ-DEFAULT - read data from the X stream
+
+@@ -3092,7 +3108,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 +3521,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))
+Only in clx_0.6.1: dependent.lisp.~1.19.~
diff --git a/dev-lisp/cl-clx/metadata.xml b/dev-lisp/cl-clx/metadata.xml
new file mode 100644
index 000000000000..60e063702b53
--- /dev/null
+++ b/dev-lisp/cl-clx/metadata.xml
@@ -0,0 +1,19 @@
+<?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>
diff --git a/dev-lisp/cl-ppcre/Manifest b/dev-lisp/cl-ppcre/Manifest
new file mode 100644
index 000000000000..eb0fcec766c4
--- /dev/null
+++ b/dev-lisp/cl-ppcre/Manifest
@@ -0,0 +1,7 @@
+DIST cl-ppcre_1.2.10.orig.tar.gz 166264 SHA256 08e160776b63a5f01dec5ed54e77a949f895cf4dc82f750f0be0a0bc0a9e320e SHA512 8406f7525852cd12f879dcfe5b12f5afac1e8f9fdd8979ca4a888c5c7dffda9a306333e166706103c21359dad733d59f4c08c9bd96855b2a320c63d5c65df404 WHIRLPOOL add9e1cf190d7e972c268b12b1e0151cdd7991dd3a409c71aa1d770f55c7735839a99c1f4c836d6456bdc1a24829f154ed891190aec9722ff50d971ac55cbf65
+DIST cl-ppcre_1.2.11.orig.tar.gz 166306 SHA256 d2150b624894848b83110771978b0335d7b51bd55b0da26407bfefb2c9317be3 SHA512 b738e6299c6eb10bfec02d54c4223af093365f1a890f8337069cd84acb745cf6fe022e9d228722630d9c966fef45ad5578323f11d116dc1055a4f38d9d32798b WHIRLPOOL b61f193729f452013ae289858e8174b580ca0096925fa4563ca437dc26c81726ad18fbe23b7497f992d43b7bc0a1594166d0f8409e1cdbbf0f62426d6c94a3e5
+DIST cl-ppcre_1.2.12.orig.tar.gz 166425 SHA256 3c790d617b3427b96fea67c928d1b07f3f08cc3da98cf6f8f41d0c5d5e684a8d SHA512 df2967e4f2c13d3ff49f362b5b2771a372c611eb1cfd3a59b72968984eb488a52b2bc0200d5bf9da224374099655c9907c6425dfd1dd052cdfdd5b8c0aa5140e WHIRLPOOL f5cd96e487c7496878fd76e34570c00332c79cb698f633ace9f6ebe8f29a3329875c29aa7512c2044cadda54a2b9ea5751331ae85e478b17f91c703d2c866b8b
+DIST cl-ppcre_1.2.13.orig.tar.gz 166573 SHA256 b60e317e8f6bba23026a9653a8ba2749d5f447f337038ef4a206afa9f7275956 SHA512 830a2f10bc17bf69d65136511fc2370fb36928e37c09f4105d02df55a742250dfb8ee96403431492966f0a741726cffd463e23fc96eea154eb560a4651cc7d10 WHIRLPOOL 69255e4f770a239693ff4ae79aeda2f4cb03a8a64883cf8b89bd2333f28fb7df9862bcd689c95f86079e648efb39673b4bba52ec96b20b2219d69034948431bc
+DIST cl-ppcre_1.2.14.orig.tar.gz 167789 SHA256 8dc66d59fb7a2111544d1688fccd4b0e33820ce501fa3410a3c0c61158d1816e SHA512 5cc78d53d46fe4598b3f95a4ff857fca8c2c5cf792d25417963e4f7f0fadeca852553c005dfc85945c27267ee10d75a8c314fd2eddf2627b66985e1b744f5262 WHIRLPOOL 88c262179a2211a5db61402c194568768d98750384566620ae2f29be6432e1e857c78252cb9552706d0ae3db2bfa79dbd02aa103930caf40e8370515b74be888
+DIST cl-ppcre_1.2.15.orig.tar.gz 167881 SHA256 9a10c4760686e91ca6372f81dcef36cb21c0710ae8fcecf0b00c5f0819822dd1 SHA512 9e6b595844eded339d7f97d6a2a57dbfd4dd529d21944072408c17c1a9e2cfaa8fb6fbc50dcafd319e9584e95c1e0910cbad86fa199fc836e3ad56f1338e9752 WHIRLPOOL 82017d6752ef0c3367fa23875d692d32c54354ff47e5ed2981bdb49e20cd443c856cd93e5b7f9ed71f56bcabffab1f71a8fc605e7bb5f66afc9c66bf1a496183
+DIST cl-ppcre_1.2.16.orig.tar.gz 168039 SHA256 fc9f0a72d1efb59dd91f79ab449ca6eec16bdf8a4b46903d24a10ee93be96e8f SHA512 b25b0bd526b8e41d6c96c59d5991a21538d10bbb935452de2bc16a461af5e838da54cfccb79183b4693e64b26d083a703189e44b72c1a0b9ef46dfecd32dacfa WHIRLPOOL 56de74b73a2c5aee9d7c7c4ae00d9072fc320e87ca64ec3cf2a590a4dc263e91a07d619cebaabb3c1ffb2cd9fd5eb48d96a3c618782e8adac9c82b20728d36fc
diff --git a/dev-lisp/cl-ppcre/cl-ppcre-1.2.10.ebuild b/dev-lisp/cl-ppcre/cl-ppcre-1.2.10.ebuild
new file mode 100644
index 000000000000..518a5a882ecc
--- /dev/null
+++ b/dev-lisp/cl-ppcre/cl-ppcre-1.2.10.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit common-lisp
+
+DESCRIPTION="CL-PPCRE is a portable regular expression library for Common Lisp"
+HOMEPAGE="http://weitz.de/cl-ppcre/
+ http://www.cliki.net/cl-ppcre"
+SRC_URI="mirror://gentoo/${PN}_${PV}.orig.tar.gz"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE=""
+DEPEND="dev-lisp/common-lisp-controller
+ virtual/commonlisp"
+SLOT="0"
+
+CLPACKAGE=cl-ppcre
+
+src_install() {
+ common-lisp-install *.lisp *.asd
+ common-lisp-system-symlink
+ dodoc CHANGELOG README doc/benchmarks.2002-12-22.txt
+ dohtml doc/index.html
+}
diff --git a/dev-lisp/cl-ppcre/cl-ppcre-1.2.11.ebuild b/dev-lisp/cl-ppcre/cl-ppcre-1.2.11.ebuild
new file mode 100644
index 000000000000..518a5a882ecc
--- /dev/null
+++ b/dev-lisp/cl-ppcre/cl-ppcre-1.2.11.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit common-lisp
+
+DESCRIPTION="CL-PPCRE is a portable regular expression library for Common Lisp"
+HOMEPAGE="http://weitz.de/cl-ppcre/
+ http://www.cliki.net/cl-ppcre"
+SRC_URI="mirror://gentoo/${PN}_${PV}.orig.tar.gz"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE=""
+DEPEND="dev-lisp/common-lisp-controller
+ virtual/commonlisp"
+SLOT="0"
+
+CLPACKAGE=cl-ppcre
+
+src_install() {
+ common-lisp-install *.lisp *.asd
+ common-lisp-system-symlink
+ dodoc CHANGELOG README doc/benchmarks.2002-12-22.txt
+ dohtml doc/index.html
+}
diff --git a/dev-lisp/cl-ppcre/cl-ppcre-1.2.12.ebuild b/dev-lisp/cl-ppcre/cl-ppcre-1.2.12.ebuild
new file mode 100644
index 000000000000..518a5a882ecc
--- /dev/null
+++ b/dev-lisp/cl-ppcre/cl-ppcre-1.2.12.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit common-lisp
+
+DESCRIPTION="CL-PPCRE is a portable regular expression library for Common Lisp"
+HOMEPAGE="http://weitz.de/cl-ppcre/
+ http://www.cliki.net/cl-ppcre"
+SRC_URI="mirror://gentoo/${PN}_${PV}.orig.tar.gz"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE=""
+DEPEND="dev-lisp/common-lisp-controller
+ virtual/commonlisp"
+SLOT="0"
+
+CLPACKAGE=cl-ppcre
+
+src_install() {
+ common-lisp-install *.lisp *.asd
+ common-lisp-system-symlink
+ dodoc CHANGELOG README doc/benchmarks.2002-12-22.txt
+ dohtml doc/index.html
+}
diff --git a/dev-lisp/cl-ppcre/cl-ppcre-1.2.13.ebuild b/dev-lisp/cl-ppcre/cl-ppcre-1.2.13.ebuild
new file mode 100644
index 000000000000..f568d02aba70
--- /dev/null
+++ b/dev-lisp/cl-ppcre/cl-ppcre-1.2.13.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit common-lisp
+
+DESCRIPTION="CL-PPCRE is a portable regular expression library for Common Lisp"
+HOMEPAGE="http://weitz.de/cl-ppcre/
+ http://www.cliki.net/cl-ppcre"
+SRC_URI="mirror://gentoo/${PN}_${PV}.orig.tar.gz"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+DEPEND="dev-lisp/common-lisp-controller
+ virtual/commonlisp"
+SLOT="0"
+
+CLPACKAGE=cl-ppcre
+
+src_install() {
+ common-lisp-install *.lisp *.asd
+ common-lisp-system-symlink
+ dodoc CHANGELOG README doc/benchmarks.2002-12-22.txt
+ dohtml doc/index.html
+}
diff --git a/dev-lisp/cl-ppcre/cl-ppcre-1.2.14.ebuild b/dev-lisp/cl-ppcre/cl-ppcre-1.2.14.ebuild
new file mode 100644
index 000000000000..f568d02aba70
--- /dev/null
+++ b/dev-lisp/cl-ppcre/cl-ppcre-1.2.14.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit common-lisp
+
+DESCRIPTION="CL-PPCRE is a portable regular expression library for Common Lisp"
+HOMEPAGE="http://weitz.de/cl-ppcre/
+ http://www.cliki.net/cl-ppcre"
+SRC_URI="mirror://gentoo/${PN}_${PV}.orig.tar.gz"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+DEPEND="dev-lisp/common-lisp-controller
+ virtual/commonlisp"
+SLOT="0"
+
+CLPACKAGE=cl-ppcre
+
+src_install() {
+ common-lisp-install *.lisp *.asd
+ common-lisp-system-symlink
+ dodoc CHANGELOG README doc/benchmarks.2002-12-22.txt
+ dohtml doc/index.html
+}
diff --git a/dev-lisp/cl-ppcre/cl-ppcre-1.2.15.ebuild b/dev-lisp/cl-ppcre/cl-ppcre-1.2.15.ebuild
new file mode 100644
index 000000000000..f568d02aba70
--- /dev/null
+++ b/dev-lisp/cl-ppcre/cl-ppcre-1.2.15.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit common-lisp
+
+DESCRIPTION="CL-PPCRE is a portable regular expression library for Common Lisp"
+HOMEPAGE="http://weitz.de/cl-ppcre/
+ http://www.cliki.net/cl-ppcre"
+SRC_URI="mirror://gentoo/${PN}_${PV}.orig.tar.gz"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+DEPEND="dev-lisp/common-lisp-controller
+ virtual/commonlisp"
+SLOT="0"
+
+CLPACKAGE=cl-ppcre
+
+src_install() {
+ common-lisp-install *.lisp *.asd
+ common-lisp-system-symlink
+ dodoc CHANGELOG README doc/benchmarks.2002-12-22.txt
+ dohtml doc/index.html
+}
diff --git a/dev-lisp/cl-ppcre/cl-ppcre-1.2.16.ebuild b/dev-lisp/cl-ppcre/cl-ppcre-1.2.16.ebuild
new file mode 100644
index 000000000000..b75bf40845bb
--- /dev/null
+++ b/dev-lisp/cl-ppcre/cl-ppcre-1.2.16.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit common-lisp
+
+DESCRIPTION="CL-PPCRE is a portable regular expression library for Common Lisp"
+HOMEPAGE="http://weitz.de/cl-ppcre/
+ http://www.cliki.net/cl-ppcre"
+SRC_URI="mirror://gentoo/${PN}_${PV}.orig.tar.gz"
+LICENSE="BSD"
+KEYWORDS="amd64 ~ppc ~sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE=""
+DEPEND="dev-lisp/common-lisp-controller
+ virtual/commonlisp"
+SLOT="0"
+
+CLPACKAGE=cl-ppcre
+
+src_install() {
+ common-lisp-install *.lisp *.asd
+ common-lisp-system-symlink
+ dodoc CHANGELOG README doc/benchmarks.2002-12-22.txt
+ dohtml doc/index.html
+}
diff --git a/dev-lisp/cl-ppcre/metadata.xml b/dev-lisp/cl-ppcre/metadata.xml
new file mode 100644
index 000000000000..fdb08d91fa3a
--- /dev/null
+++ b/dev-lisp/cl-ppcre/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+<longdescription>
+CL-PPCRE is a portable regular expression library for Common Lisp
+which has the following features:
+
+ * compatible with Perl
+ * fast (outperforms Perl)
+ * portable (ANSI Common Lisp)
+ * thread-safe
+ * includes convenience features
+ * well-documented.
+
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lisp/clisp/Manifest b/dev-lisp/clisp/Manifest
new file mode 100644
index 000000000000..455ce517c3cf
--- /dev/null
+++ b/dev-lisp/clisp/Manifest
@@ -0,0 +1,2 @@
+DIST clisp-2.48.tar.bz2 7885098 SHA256 05b83f560859a23679ccfc073a128a5377fe9489d734431a3dc32ef88f0c3dc2 SHA512 3288b6a2973c924006b14bbed1e8e3e688276a187ac2a6c7851dc7ae699e7832d30e5e7eecdabc76c08c7e8e8ce1b562eb97a44570d3035e558ea2310de2b719 WHIRLPOOL 6be21d4e3e88a1abf4536e1dfc01f99b714b0543494e214647c6d292a5ce355119a415ecfeae32823670bd8ddb918621531b2c8b43edcbbb33313312acfa28ab
+DIST clisp-2.49.tar.bz2 8091011 SHA256 8132ff353afaa70e6b19367a25ae3d5a43627279c25647c220641fed00f8e890 SHA512 eef66fc85199a2c283b616db61bf67ff103eeb0f19fa907da48994dc790b6f5f8d0c74fb3bd723c6b827c0ff3cfd89fa6ba67934fc669ed5d5249044b5140d81 WHIRLPOOL fe14d3cd09ad5768c72470b71068331623239a9d5c7247267be25bc4fc97d91ca6c53dd0a495b3d2a8c45faeaa01060aa135a19fea5f76d2968ffc505f5b6416
diff --git a/dev-lisp/clisp/clisp-2.48-r1.ebuild b/dev-lisp/clisp/clisp-2.48-r1.ebuild
new file mode 100644
index 000000000000..47e641c8baa8
--- /dev/null
+++ b/dev-lisp/clisp/clisp-2.48-r1.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit flag-o-matic eutils toolchain-funcs multilib
+
+DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp"
+HOMEPAGE="http://clisp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="alpha amd64 ia64 ppc -sparc x86"
+IUSE="berkdb hyperspec X new-clx dbus fastcgi gdbm gtk pari +pcre postgres +readline svm -threads +unicode +zlib"
+
+RDEPEND="virtual/libiconv
+ >=dev-libs/libsigsegv-2.4
+ >=dev-libs/ffcall-1.10
+ dbus? ( sys-apps/dbus )
+ fastcgi? ( dev-libs/fcgi )
+ gdbm? ( sys-libs/gdbm )
+ gtk? ( >=x11-libs/gtk+-2.10:2 >=gnome-base/libglade-2.6:2.0 )
+ pari? ( >=sci-mathematics/pari-2.3.0 )
+ postgres? ( >=dev-db/postgresql-8.0 )
+ readline? ( >=sys-libs/readline-5.0 )
+ pcre? ( dev-libs/libpcre )
+ svm? ( sci-libs/libsvm )
+ zlib? ( sys-libs/zlib )
+ X? ( new-clx? ( x11-libs/libXpm ) )
+ hyperspec? ( dev-lisp/hyperspec )
+ berkdb? ( sys-libs/db:4.5 )"
+
+DEPEND="${RDEPEND}
+ X? ( new-clx? ( x11-misc/imake x11-proto/xextproto ) )"
+
+PDEPEND="dev-lisp/gentoo-init"
+
+enable_modules() {
+ [[ $# = 0 ]] && die "${FUNCNAME[0]} must receive at least one argument"
+ for m in "$@" ; do
+ einfo "enabling module $m"
+ myconf+=" --with-module=${m}"
+ done
+}
+
+BUILDDIR="builddir"
+
+# modules not enabled:
+# * berkdb: must figure out a way to make the configure script pick up the
+# currect version of the library and headers
+# * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs
+# * matlab, netica: not in portage
+# * oracle: can't install oracle-instantclient
+
+src_prepare() {
+ # More than -O1 breaks alpha/ia64
+ if use alpha || use ia64; then
+ sed -i -e 's/-O2//g' src/makemake.in || die
+ fi
+}
+
+src_configure() {
+ # We need this to build on alpha/ia64
+ if use alpha || use ia64; then
+ replace-flags -O? -O1
+ append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
+ fi
+
+ # QA issue with lisp.run
+ append-flags -Wa,--noexecstack
+
+ # built-in features
+ local myconf="--with-ffcall --without-dynamic-modules"
+# There's a problem with jit_allocai function
+# if use jit; then
+# myconf+=" --with-jitc=lightning"
+# fi
+ if use threads; then
+ myconf+=" --with-threads=POSIX_THREADS"
+ fi
+
+ # default modules
+ enable_modules wildcard rawsock
+ # optional modules
+ use elibc_glibc && enable_modules bindings/glibc
+ if use X; then
+ if use new-clx; then
+ enable_modules clx/new-clx
+ else
+ enable_modules clx/mit-clx
+ fi
+ fi
+ if use postgres; then
+ enable_modules postgresql
+ append-flags -I$(pg_config --includedir)
+ fi
+ if use berkdb; then
+ enable_modules berkeley-db
+ append-flags -I/usr/include/db4.5
+ fi
+ use dbus && enable_modules dbus
+ use fastcgi && enable_modules fastcgi
+ use gdbm && enable_modules gdbm
+ use gtk && enable_modules gtk2
+ use pari && enable_modules pari
+ use pcre && enable_modules pcre
+ use svm && enable_modules libsvm
+ use zlib && enable_modules zlib
+
+ if use hyperspec; then
+ CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
+ else
+ CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
+ fi
+
+ # configure chokes on --sysconfdir option
+ local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \
+ $(use_with readline) $(use_with unicode) \
+ ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
+ einfo "${configure}"
+ ${configure} || die "./configure failed"
+
+ sed -i 's,"vi","nano",g' "${BUILDDIR}"/config.lisp || die
+
+ IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
+ sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
+ "${BUILDDIR}"/config.lisp || die
+}
+
+src_compile() {
+ export VARTEXFONTS="${T}"/fonts
+ cd "${BUILDDIR}"
+ # parallel build fails
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ pushd "${BUILDDIR}"
+ make DESTDIR="${D}" prefix=/usr install-bin || die
+ doman clisp.1 || die
+ dodoc SUMMARY README* NEWS MAGIC.add ANNOUNCE || die
+ fperms a+x /usr/$(get_libdir)/clisp-${PV/_*/}/clisp-link || die
+ # stripping them removes common symbols (defined but uninitialised variables)
+ # which are then needed to build modules...
+ export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
+ popd
+ dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png || die
+ dodoc doc/{CLOS-guide,LISP-tutorial}.txt || die
+}
+
+pkg_postinst() {
+ if use threads || use jit; then
+ while read line; do elog ${line}; done <<EOF
+
+Upstream considers threads to be of Alpha quality, therefore
+it is likely that you will encounter bugs in using them. If you do,
+please report bugs upstream:
+
+Mailing list: https://lists.sourceforge.net/lists/listinfo/clisp-devel
+Bug tracker: http://sourceforge.net/tracker/?atid=101355&group_id=1355
+
+EOF
+ fi
+}
diff --git a/dev-lisp/clisp/clisp-2.48-r2.ebuild b/dev-lisp/clisp/clisp-2.48-r2.ebuild
new file mode 100644
index 000000000000..ec41e9f34138
--- /dev/null
+++ b/dev-lisp/clisp/clisp-2.48-r2.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit flag-o-matic eutils toolchain-funcs multilib
+
+DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp"
+HOMEPAGE="http://clisp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="~alpha amd64 ~ia64 ~ppc -sparc x86"
+IUSE="berkdb hyperspec X new-clx dbus fastcgi gdbm gtk pari +pcre postgres +readline svm -threads +unicode +zlib"
+
+RDEPEND="virtual/libiconv
+ >=dev-libs/libsigsegv-2.4
+ >=dev-libs/ffcall-1.10
+ dbus? ( sys-apps/dbus )
+ fastcgi? ( dev-libs/fcgi )
+ gdbm? ( sys-libs/gdbm )
+ gtk? ( >=x11-libs/gtk+-2.10:2 >=gnome-base/libglade-2.6:2.0 )
+ pari? ( >=sci-mathematics/pari-2.3.0 )
+ postgres? ( >=dev-db/postgresql-8.0 )
+ readline? ( >=sys-libs/readline-5.0 )
+ pcre? ( dev-libs/libpcre )
+ svm? ( sci-libs/libsvm )
+ zlib? ( sys-libs/zlib )
+ X? ( new-clx? ( x11-libs/libXpm ) )
+ hyperspec? ( dev-lisp/hyperspec )
+ berkdb? ( sys-libs/db:4.7 )"
+
+DEPEND="${RDEPEND}
+ X? ( new-clx? ( x11-misc/imake x11-proto/xextproto ) )"
+
+PDEPEND="dev-lisp/gentoo-init"
+
+enable_modules() {
+ [[ $# = 0 ]] && die "${FUNCNAME[0]} must receive at least one argument"
+ for m in "$@" ; do
+ einfo "enabling module $m"
+ myconf+=" --with-module=${m}"
+ done
+}
+
+BUILDDIR="builddir"
+
+# modules not enabled:
+# * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs
+# * matlab, netica: not in portage
+# * oracle: can't install oracle-instantclient
+
+src_prepare() {
+ # More than -O1 breaks alpha/ia64
+ if use alpha || use ia64; then
+ sed -i -e 's/-O2//g' src/makemake.in || die
+ fi
+ epatch "${FILESDIR}/${P}-bits_ipctypes_to_sys_ipc.patch"
+}
+
+src_configure() {
+ # We need this to build on alpha/ia64
+ if use alpha || use ia64; then
+ replace-flags -O? -O1
+ append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
+ fi
+
+ # QA issue with lisp.run
+ append-flags -Wa,--noexecstack
+
+ # built-in features
+ local myconf="--with-ffcall --without-dynamic-modules"
+# There's a problem with jit_allocai function
+# if use jit; then
+# myconf+=" --with-jitc=lightning"
+# fi
+ if use threads; then
+ myconf+=" --with-threads=POSIX_THREADS"
+ fi
+
+ # default modules
+ enable_modules wildcard rawsock
+ # optional modules
+ use elibc_glibc && enable_modules bindings/glibc
+ if use X; then
+ if use new-clx; then
+ enable_modules clx/new-clx
+ else
+ enable_modules clx/mit-clx
+ fi
+ fi
+ if use postgres; then
+ enable_modules postgresql
+ append-flags -I$(pg_config --includedir)
+ fi
+ if use berkdb; then
+ enable_modules berkeley-db
+ append-flags -I/usr/include/db4.7
+ fi
+ use dbus && enable_modules dbus
+ use fastcgi && enable_modules fastcgi
+ use gdbm && enable_modules gdbm
+ use gtk && enable_modules gtk2
+ use pari && enable_modules pari
+ use pcre && enable_modules pcre
+ use svm && enable_modules libsvm
+ use zlib && enable_modules zlib
+
+ if use hyperspec; then
+ CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
+ else
+ CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
+ fi
+
+ # configure chokes on --sysconfdir option
+ local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \
+ $(use_with readline) $(use_with unicode) \
+ ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
+ einfo "${configure}"
+ ${configure} || die "./configure failed"
+
+ sed -i 's,"vi","nano",g' "${BUILDDIR}"/config.lisp || die
+
+ IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
+ sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
+ "${BUILDDIR}"/config.lisp || die
+}
+
+src_compile() {
+ export VARTEXFONTS="${T}"/fonts
+ cd "${BUILDDIR}"
+ # parallel build fails
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ pushd "${BUILDDIR}"
+ make DESTDIR="${D}" prefix=/usr install-bin || die
+ doman clisp.1 || die
+ dodoc SUMMARY README* NEWS MAGIC.add ANNOUNCE || die
+ fperms a+x /usr/$(get_libdir)/clisp-${PV/_*/}/clisp-link || die
+ # stripping them removes common symbols (defined but uninitialised variables)
+ # which are then needed to build modules...
+ export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
+ popd
+ dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png || die
+ dodoc doc/{CLOS-guide,LISP-tutorial}.txt || die
+}
+
+pkg_postinst() {
+ if use threads || use jit; then
+ while read line; do elog ${line}; done <<EOF
+
+Upstream considers threads to be of Alpha quality, therefore
+it is likely that you will encounter bugs in using them. If you do,
+please report bugs upstream:
+
+Mailing list: https://lists.sourceforge.net/lists/listinfo/clisp-devel
+Bug tracker: http://sourceforge.net/tracker/?atid=101355&group_id=1355
+
+EOF
+ fi
+}
diff --git a/dev-lisp/clisp/clisp-2.49-r8.ebuild b/dev-lisp/clisp/clisp-2.49-r8.ebuild
new file mode 100644
index 000000000000..68873116840e
--- /dev/null
+++ b/dev-lisp/clisp/clisp-2.49-r8.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp"
+HOMEPAGE="http://clisp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/clisp/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="2/${PV}"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE="hyperspec X berkdb dbus fastcgi gdbm gtk pari +pcre postgres +readline svm -threads +unicode +zlib"
+# "jit" disabled ATM
+
+RDEPEND=">=dev-lisp/asdf-2.33-r3
+ virtual/libiconv
+ >=dev-libs/libsigsegv-2.4
+ >=dev-libs/ffcall-1.10
+ dbus? ( sys-apps/dbus )
+ fastcgi? ( dev-libs/fcgi )
+ gdbm? ( sys-libs/gdbm )
+ gtk? ( >=x11-libs/gtk+-2.10 >=gnome-base/libglade-2.6 )
+ pari? ( <sci-mathematics/pari-2.5.0 )
+ postgres? ( >=dev-db/postgresql-8.0 )
+ readline? ( >=sys-libs/readline-5.0 )
+ pcre? ( dev-libs/libpcre )
+ svm? ( sci-libs/libsvm )
+ zlib? ( sys-libs/zlib )
+ X? ( x11-libs/libXpm )
+ hyperspec? ( dev-lisp/hyperspec )
+ berkdb? ( sys-libs/db:4.8 )"
+# jit? ( >=dev-libs/lightning-1.2 )
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake x11-proto/xextproto )"
+
+enable_modules() {
+ [[ $# = 0 ]] && die "${FUNCNAME[0]} must receive at least one argument"
+ for m in "$@" ; do
+ einfo "enabling module $m"
+ myconf+=" --with-module=${m}"
+ done
+}
+
+BUILDDIR="builddir"
+
+# modules not enabled:
+# * berkdb: must figure out a way to make the configure script pick up the
+# currect version of the library and headers
+# * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs
+# * matlab, netica: not in portage
+# * oracle: can't install oracle-instantclient
+
+src_prepare() {
+ # More than -O1 breaks alpha/ia64
+ if use alpha || use ia64; then
+ sed -i -e 's/-O2//g' src/makemake.in || die
+ fi
+ epatch "${FILESDIR}"/${P}-bits_ipctypes_to_sys_ipc.patch
+ epatch "${FILESDIR}"/${P}-get_hostname.patch
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+}
+
+src_configure() {
+ # We need this to build on alpha/ia64
+ if use alpha || use ia64; then
+ replace-flags -O? -O1
+ append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
+ fi
+
+ # QA issue with lisp.run
+ append-flags -Wa,--noexecstack
+
+ # built-in features
+ local myconf="--with-ffcall --without-dynamic-modules"
+# There's a problem with jit_allocai function
+# if use jit; then
+# myconf+=" --with-jitc=lightning"
+# fi
+ if use threads; then
+ myconf+=" --with-threads=POSIX_THREADS"
+ fi
+
+ # default modules
+ enable_modules wildcard rawsock
+ # optional modules
+ use elibc_glibc && enable_modules bindings/glibc
+ use X && enable_modules clx/new-clx
+ if use postgres; then
+ enable_modules postgresql
+ append-cppflags -I$(pg_config --includedir)
+ fi
+ if use berkdb; then
+ enable_modules berkeley-db
+ append-cppflags -I/usr/include/db4.8
+ fi
+ use dbus && enable_modules dbus
+ use fastcgi && enable_modules fastcgi
+ use gdbm && enable_modules gdbm
+ use gtk && enable_modules gtk2
+ use pari && enable_modules pari
+ use pcre && enable_modules pcre
+ use svm && enable_modules libsvm
+ use zlib && enable_modules zlib
+
+ if use hyperspec; then
+ CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
+ else
+ CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
+ fi
+
+ # configure chokes on --sysconfdir option
+ local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \
+ $(use_with readline) $(use_with unicode) \
+ ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
+ einfo "${configure}"
+ ${configure} || die "./configure failed"
+
+ IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
+ sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
+ "${BUILDDIR}"/config.lisp || die "Cannot fix link to implementation notes"
+}
+
+src_compile() {
+ export VARTEXFONTS="${T}"/fonts
+ cd "${BUILDDIR}"
+ # parallel build fails
+ emake -j1
+}
+
+src_install() {
+ pushd "${BUILDDIR}"
+ make DESTDIR="${D}" prefix=/usr install-bin || die "Installation failed"
+ doman clisp.1
+ dodoc ../SUMMARY README* ../src/NEWS ../unix/MAGIC.add ../ANNOUNCE
+ # stripping them removes common symbols (defined but uninitialised variables)
+ # which are then needed to build modules...
+ export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
+ popd
+ dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png
+ dodoc doc/{CLOS-guide,LISP-tutorial}.txt
+}
diff --git a/dev-lisp/clisp/files/clisp-2.48-bits_ipctypes_to_sys_ipc.patch b/dev-lisp/clisp/files/clisp-2.48-bits_ipctypes_to_sys_ipc.patch
new file mode 100644
index 000000000000..4711a86decbe
--- /dev/null
+++ b/dev-lisp/clisp/files/clisp-2.48-bits_ipctypes_to_sys_ipc.patch
@@ -0,0 +1,21 @@
+diff -ru a/modules/bindings/glibc/linux.lisp b/modules/bindings/glibc/linux.lisp
+--- a/modules/bindings/glibc/linux.lisp 2008-10-10 16:15:49.000000000 +0300
++++ b/modules/bindings/glibc/linux.lisp 2013-04-22 11:12:59.148502615 +0300
+@@ -67,7 +67,7 @@
+ (def-c-type __daddr_t) ; int
+ (def-c-type __caddr_t) ; c-pointer
+ (def-c-type __time_t) ; long
+-(def-c-type __swblk_t) ; long
++;(def-c-type __swblk_t) ; long
+
+ (def-c-type __fd_mask ulong)
+ (eval-when (load compile eval)
+@@ -86,7 +86,7 @@
+
+ (def-c-type __key_t) ; int
+
+-(c-lines "#include <bits/ipctypes.h>~%")
++(c-lines "#include <sys/ipc.h>~%")
+ (def-c-type __ipc_pid_t) ; ushort
+
+ ; --------------------------- <sys/types.h> -----------------------------------
diff --git a/dev-lisp/clisp/files/clisp-2.49-bits_ipctypes_to_sys_ipc.patch b/dev-lisp/clisp/files/clisp-2.49-bits_ipctypes_to_sys_ipc.patch
new file mode 100644
index 000000000000..8037157c9512
--- /dev/null
+++ b/dev-lisp/clisp/files/clisp-2.49-bits_ipctypes_to_sys_ipc.patch
@@ -0,0 +1,21 @@
+diff -ru a/modules/bindings/glibc/linux.lisp b/modules/bindings/glibc/linux.lisp
+--- a/modules/bindings/glibc/linux.lisp 2008-10-08 19:36:19.000000000 +0300
++++ b/modules/bindings/glibc/linux.lisp 2013-04-08 00:05:06.028305248 +0300
+@@ -67,7 +67,7 @@
+ (def-c-type __daddr_t) ; int
+ (def-c-type __caddr_t) ; c-pointer
+ (def-c-type __time_t) ; long
+-(def-c-type __swblk_t) ; long
++;(def-c-type __swblk_t) ; long
+
+ (def-c-type __fd_mask ulong)
+ (eval-when (load compile eval)
+@@ -86,7 +86,7 @@
+
+ (def-c-type __key_t) ; int
+
+-(c-lines "#include <bits/ipctypes.h>~%")
++(c-lines "#include <sys/ipc.h>~%")
+ (def-c-type __ipc_pid_t) ; ushort
+
+ ; --------------------------- <sys/types.h> -----------------------------------
diff --git a/dev-lisp/clisp/files/clisp-2.49-get_hostname.patch b/dev-lisp/clisp/files/clisp-2.49-get_hostname.patch
new file mode 100644
index 000000000000..5db3a71efbc3
--- /dev/null
+++ b/dev-lisp/clisp/files/clisp-2.49-get_hostname.patch
@@ -0,0 +1,56 @@
+diff -r -U1 clisp-2.49.orig/src/socket.d clisp-2.49/src/socket.d
+--- clisp-2.49.orig/src/socket.d 2009-10-08 21:45:13.000000000 +0700
++++ clisp-2.49/src/socket.d 2013-04-20 16:24:11.133895050 +0700
+@@ -59,5 +59,5 @@
+ Fetches the machine's host name.
+- get_hostname(host =);
+- The name is allocated on the stack, with dynamic extent.
+- < const char* host: The host name.
++ get_hostname(hostname);
++ where hostname is an array of MAXHOTNAMELEN+1 characters.
++ < const char host[]: The host name.
+ (Note: In some cases we could get away with less system calls by simply
+@@ -69,10 +69,8 @@
+ /* present on all supported unix systems and on woe32 */
+- #define get_hostname(host_assignment) \
+- do { var char hostname[MAXHOSTNAMELEN+1]; \
+- begin_system_call(); \
+- if ( gethostname(&hostname[0],MAXHOSTNAMELEN) <0) { SOCK_error(); } \
+- end_system_call(); \
+- hostname[MAXHOSTNAMELEN] = '\0'; \
+- host_assignment &hostname[0]; \
+- } while(0)
++static void get_hostname (char *hostname) {
++ begin_system_call();
++ if (gethostname(hostname,MAXHOSTNAMELEN) < 0) { ANSIC_error(); }
++ end_system_call();
++ hostname[MAXHOSTNAMELEN] = '\0';
++}
+ #else
+@@ -209,4 +207,4 @@
+ (apply #'string-concat hostname " [" (inet-ntop address) "]"))) */
+- var const char* host;
+- get_hostname(host =);
++ var char host[MAXHOSTNAMELEN+1];
++ get_hostname(host);
+ result = asciz_to_string(host,O(misc_encoding)); /* hostname as result */
+@@ -391,4 +389,4 @@
+ if (eq(arg,S(Kdefault))) {
+- var char* host;
+- get_hostname(host =);
++ var char host[MAXHOSTNAMELEN+1];
++ get_hostname(host);
+ begin_system_call();
+@@ -726,3 +724,4 @@
+ if (host[0] == '\0') {
+- get_hostname(host =);
++ var char host[MAXHOSTNAMELEN+1];
++ get_hostname(host);
+ fd = with_host_port(host,port,&connect_to_x_via_ip,NULL);
+@@ -800,4 +799,4 @@
+ if (resolve_p) { /* Fill in hd->truename. */
+- var const char* host;
+- get_hostname(host =); /* was: host = "localhost"; */
++ var char host[MAXHOSTNAMELEN+1];
++ get_hostname(host);
+ ASSERT(strlen(host) <= MAXHOSTNAMELEN);
diff --git a/dev-lisp/clisp/files/clisp-2.49-tinfo.patch b/dev-lisp/clisp/files/clisp-2.49-tinfo.patch
new file mode 100644
index 000000000000..72f40d585b5b
--- /dev/null
+++ b/dev-lisp/clisp/files/clisp-2.49-tinfo.patch
@@ -0,0 +1,15 @@
+clisp does not need a full blown ncurses, but it does require a termcap or tinfo
+I would have changed this in src/m4/termcap.m4 but configure.in fails terribly - JeR
+
+
+--- a/src/configure
++++ b/src/configure
+@@ -28613,7 +28613,7 @@
+ return 0;
+ }
+ _ACEOF
+-for ac_lib in '' ncurses termcap; do
++for ac_lib in '' tinfo ncurses termcap; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
diff --git a/dev-lisp/clisp/metadata.xml b/dev-lisp/clisp/metadata.xml
new file mode 100644
index 000000000000..271466f882bb
--- /dev/null
+++ b/dev-lisp/clisp/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>common-lisp</herd>
+ <longdescription>
+CLISP is a Common Lisp implementation. It mostly supports the Lisp
+described in the ANSI Common Lisp standard. It includes an
+interpreter, a compiler, almost all of CLOS, a foreign language
+interface and a socket interface. An X11 interface is available
+through CLX and Garnet. Command line editing is provided by readline.
+CLISP runs on microcomputers (OS/2, Windows 95/98/NT/2000/XP, Amiga
+500-4000, Acorn RISC PC) as well as on Unix workstations (GNU/Linux,
+BSD, SVR4, Sun4, DEC Alpha OSF, HP-UX, NeXTstep, SGI, AIX, Sun3 and
+others) and needs only 2 MB of RAM. The user interface comes in
+German, English, French, Spanish, Dutch and Russian, and can be
+changed at run time.
+</longdescription>
+ <use>
+ <flag name="hyperspec">Use local hyperspec instead of online version</flag>
+ <flag name="new-clx">Build CLISP with support for the NEW-CLX module which is a
+C binding to the Xorg libraries</flag>
+ <flag name="pari">Build CLISP with support for the PARI Computer Algebra System</flag>
+ <flag name="svm">Build CLISP with support for the Support Vector Machine module</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">clisp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lisp/clozurecl/Manifest b/dev-lisp/clozurecl/Manifest
new file mode 100644
index 000000000000..eff33f09149a
--- /dev/null
+++ b/dev-lisp/clozurecl/Manifest
@@ -0,0 +1,2 @@
+DIST ccl-1.10-linuxx86.tar.gz 43796090 SHA256 8ca272656214837b57746b9b84395987bc524329b38a1f42a605f45bf0282657 SHA512 10504e2569a99ba8b6fc4ac745312435c6be646c86ec3916a3750f823f79b3b8ec87fe53ba2410151feeaaed0609e1760ee3d37a77f01d815d1ec13c2394258e WHIRLPOOL 75c7516eba92ad0fc603301e958dc5ba8271b0819ab46af7f61e97edeb405098c4d84a8f8e8ed73ee85462b6ab7c4805bbcbf0a0f354fb62f077cf8cf10bffa4
+DIST ccl-1.9_p1-linuxx86.tar.bz2 36344874 SHA256 ba3ef9718646cb56785bda634093876442287bb445a9b5b95e6478104d63d988 SHA512 b09a1f4f2e0a59bd95df09e431e95f619bc80459f5a1a799fc47fae575ccd3e0c266df98a0d7fc2b4878381e02e50e68dd3406a51c569bb056dd0e1fb973a989 WHIRLPOOL 9730171d8e4acdd1f54b81f4cc5984414c485672200c66e5f98cf7fe202a7c6f5b2835c2c75c06254960fdc7b0477854fabdd57d8b011abe8629bcd390e0f134
diff --git a/dev-lisp/clozurecl/clozurecl-1.10.ebuild b/dev-lisp/clozurecl/clozurecl-1.10.ebuild
new file mode 100644
index 000000000000..64008f077d41
--- /dev/null
+++ b/dev-lisp/clozurecl/clozurecl-1.10.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+MY_PN=ccl
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Common Lisp implementation, derived from Digitool's MCL product"
+HOMEPAGE="http://ccl.clozure.com/"
+SRC_URI="
+ x86? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxx86.tar.gz )
+ amd64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxx86.tar.gz )"
+ # ppc? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )
+ # ppc64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )"
+
+LICENSE="LLGPL-2.1"
+SLOT="0"
+# KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND=">=dev-lisp/asdf-2.33-r3:="
+DEPEND="${RDEPEND}
+ !dev-lisp/openmcl"
+
+S="${WORKDIR}"/${MY_PN}
+
+ENVD="${T}"/50ccl
+
+src_configure() {
+ if use x86; then
+ CCL_RUNTIME=lx86cl; CCL_HEADERS=x86-headers; CCL_KERNEL=linuxx8632
+ elif use amd64; then
+ CCL_RUNTIME=lx86cl64; CCL_HEADERS=x86-headers64; CCL_KERNEL=linuxx8664
+ elif use ppc; then
+ CCL_RUNTIME=ppccl; CCL_HEADERS=headers; CCL_KERNEL=linuxppc
+ elif use ppc64; then
+ CCL_RUNTIME=ppccl64; CCL_HEADERS=headers64; CCL_KERNEL=linuxppc64
+ fi
+}
+
+src_prepare() {
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp tools/ || die
+}
+
+src_compile() {
+ emake -C lisp-kernel/${CCL_KERNEL} clean
+ emake -C lisp-kernel/${CCL_KERNEL} all CC="$(tc-getCC)"
+
+ unset CCL_DEFAULT_DIRECTORY
+ ./${CCL_RUNTIME} -n -b -Q -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)' || die "Compilation failed"
+
+ # remove non-owner write permissions on the full-image
+ chmod go-w ${CCL_RUNTIME}{,.image} || die
+
+ esvn_clean
+}
+
+src_install() {
+ local install_dir=/usr/$(get_libdir)/${PN}
+
+ exeinto ${install_dir}
+ # install executable
+ doexe ${CCL_RUNTIME}
+ # install core image
+ cp ${CCL_RUNTIME}.image "${D}"/${install_dir} || die
+ # install optional libraries
+ dodir ${install_dir}/tools
+ cp tools/*fsl "${D}"/${install_dir}/tools || die
+
+ # until we figure out which source files are necessary for runtime
+ # optional features and which aren't, we install all sources
+ find . -type f -name '*fsl' -delete || die
+ rm -f lisp-kernel/${CCL_KERNEL}/*.o || die
+ cp -a compiler level-0 level-1 lib library \
+ lisp-kernel scripts tools xdump contrib \
+ "${D}"/${install_dir} || die
+ cp -a ${CCL_HEADERS} "${D}"/${install_dir} || die
+
+ make_wrapper ccl "${install_dir}/${CCL_RUNTIME}"
+
+ echo "CCL_DEFAULT_DIRECTORY=${install_dir}" > "${ENVD}"
+ doenvd "${ENVD}"
+
+ dodoc doc/release-notes.txt
+ dohtml doc/ccl-documentation.html
+ use doc && dohtml -r examples
+}
diff --git a/dev-lisp/clozurecl/clozurecl-1.9_p1-r1.ebuild b/dev-lisp/clozurecl/clozurecl-1.9_p1-r1.ebuild
new file mode 100644
index 000000000000..6b855f26932d
--- /dev/null
+++ b/dev-lisp/clozurecl/clozurecl-1.9_p1-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+MY_PN=ccl
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Common Lisp implementation, derived from Digitool's MCL product"
+HOMEPAGE="http://ccl.clozure.com/"
+SRC_URI="
+ x86? ( http://dev.gentoo.org/~grozin/${MY_P}-linuxx86.tar.bz2 )
+ amd64? ( http://dev.gentoo.org/~grozin/${MY_P}-linuxx86.tar.bz2 )"
+ # ppc? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )
+ # ppc64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )"
+
+LICENSE="LLGPL-2.1"
+SLOT="0"
+# KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND=">=dev-lisp/asdf-2.33-r3:="
+DEPEND="${RDEPEND}
+ !dev-lisp/openmcl"
+
+S="${WORKDIR}"/${MY_PN}
+
+ENVD="${T}"/50ccl
+
+src_configure() {
+ if use x86; then
+ CCL_RUNTIME=lx86cl; CCL_HEADERS=x86-headers; CCL_KERNEL=linuxx8632
+ elif use amd64; then
+ CCL_RUNTIME=lx86cl64; CCL_HEADERS=x86-headers64; CCL_KERNEL=linuxx8664
+ elif use ppc; then
+ CCL_RUNTIME=ppccl; CCL_HEADERS=headers; CCL_KERNEL=linuxppc
+ elif use ppc64; then
+ CCL_RUNTIME=ppccl64; CCL_HEADERS=headers64; CCL_KERNEL=linuxppc64
+ fi
+}
+
+src_prepare() {
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp tools/ || die
+}
+
+src_compile() {
+ emake -C lisp-kernel/${CCL_KERNEL} clean
+ emake -C lisp-kernel/${CCL_KERNEL} all CC="$(tc-getCC)"
+
+ unset CCL_DEFAULT_DIRECTORY
+ ./${CCL_RUNTIME} -n -b -Q -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)' || die "Compilation failed"
+
+ # remove non-owner write permissions on the full-image
+ chmod go-w ${CCL_RUNTIME}{,.image} || die
+
+ esvn_clean
+}
+
+src_install() {
+ local install_dir=/usr/$(get_libdir)/${PN}
+
+ exeinto ${install_dir}
+ # install executable
+ doexe ${CCL_RUNTIME}
+ # install core image
+ cp ${CCL_RUNTIME}.image "${D}"/${install_dir} || die
+ # install optional libraries
+ dodir ${install_dir}/tools
+ cp tools/*fsl "${D}"/${install_dir}/tools || die
+
+ # until we figure out which source files are necessary for runtime
+ # optional features and which aren't, we install all sources
+ find . -type f -name '*fsl' -delete || die
+ rm -f lisp-kernel/${CCL_KERNEL}/*.o || die
+ cp -a compiler level-0 level-1 lib library \
+ lisp-kernel scripts tools xdump contrib \
+ "${D}"/${install_dir} || die
+ cp -a ${CCL_HEADERS} "${D}"/${install_dir} || die
+
+ make_wrapper ccl "${install_dir}/${CCL_RUNTIME}"
+
+ echo "CCL_DEFAULT_DIRECTORY=${install_dir}" > "${ENVD}"
+ doenvd "${ENVD}"
+
+ dodoc doc/release-notes.txt
+ dohtml doc/ccl-documentation.html
+ use doc && dohtml -r examples
+}
diff --git a/dev-lisp/clozurecl/metadata.xml b/dev-lisp/clozurecl/metadata.xml
new file mode 100644
index 000000000000..7fb197497d83
--- /dev/null
+++ b/dev-lisp/clozurecl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+<longdescription>
+Clozure Common Lisp (formerly OpenMCL) is a Common Lisp implementation.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lisp/clx/Manifest b/dev-lisp/clx/Manifest
new file mode 100644
index 000000000000..c0443c539f8f
--- /dev/null
+++ b/dev-lisp/clx/Manifest
@@ -0,0 +1 @@
+DIST clx-0.7.4.tgz 444490 SHA256 4a80f80255ace26eb8df214957dda3d7b7e51955537405ec893a34b18e569028 SHA512 07f93735bee25c8a6d8cccaa0755efa0b750954cbeab70d9db69bf51f1cf4eb7918c0225b9ae2834b11ebb261a857eea0f60b70e4044ccbe96ecb32c3ac31278 WHIRLPOOL af49b2dca591fd234c8b790867286383fc4fd32091415cc6c78b904bd7a3bff2e65c923553fe0bad41d83eb91fc74d801925ea9613c31c2f24a484ba0bb699ae
diff --git a/dev-lisp/clx/clx-0.7.4.ebuild b/dev-lisp/clx/clx-0.7.4.ebuild
new file mode 100644
index 000000000000..e30c37d325e6
--- /dev/null
+++ b/dev-lisp/clx/clx-0.7.4.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit common-lisp-3 eutils
+
+DESCRIPTION="CLX is the Common Lisp interface to the X11 protocol primarily for SBCL."
+HOMEPAGE="http://www.cliki.net/CLX"
+SRC_URI="http://common-lisp.net/~abridgewater/dist/${PN}/${P}.tgz"
+
+LICENSE="CLX"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="doc"
+
+DEPEND="sys-apps/texinfo
+ doc? ( virtual/texi2dvi )"
+RDEPEND="!dev-lisp/cl-${PN}"
+
+src_prepare() {
+ rm -v {exclcmac,sockcl,defsystem,provide,cmudep}.lisp || die
+ epatch "${FILESDIR}"/gentoo-fix-asd.patch
+ epatch "${FILESDIR}"/gentoo-fix-dep-openmcl.patch
+ epatch "${FILESDIR}"/gentoo-fix-unused-vars.patch
+ epatch "${FILESDIR}"/gentoo-fix-obsolete-eval-when.patch
+ epatch "${FILESDIR}"/gentoo-fix-dynamic-extent-sbcl-1.0.45.patch
+}
+
+src_compile() {
+ cd manual || die
+ makeinfo ${PN}.texinfo -o ${PN}.info || die "Cannot compile info docs"
+ if use doc ; then
+ VARTEXFONTS="${T}"/fonts \
+ texi2pdf ${PN}.texinfo -o ${PN}.pdf || die "Cannot build PDF docs"
+ fi
+}
+
+src_install() {
+ common-lisp-install-sources *.lisp debug demo test
+ common-lisp-install-asdf
+ dodoc NEWS CHANGES README*
+ doinfo manual/${PN}.info
+ use doc && dodoc manual/${PN}.pdf
+}
diff --git a/dev-lisp/clx/clx-9999.ebuild b/dev-lisp/clx/clx-9999.ebuild
new file mode 100644
index 000000000000..bf616dd9c08f
--- /dev/null
+++ b/dev-lisp/clx/clx-9999.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit common-lisp-3 git-2
+
+DESCRIPTION="A fork of crhodes' fork of danb's fork of the CLX library, an X11 client for Common Lisp"
+HOMEPAGE="https://github.com/sharplispers/clx http://www.cliki.net/CLX"
+EGIT_REPO_URI="git://github.com/sharplispers/clx.git"
+
+LICENSE="CLX"
+SLOT="0"
+IUSE=""
+
+RDEPEND="!dev-lisp/cl-${PN}"
diff --git a/dev-lisp/clx/files/gentoo-fix-asd.patch b/dev-lisp/clx/files/gentoo-fix-asd.patch
new file mode 100644
index 000000000000..62ad58748170
--- /dev/null
+++ b/dev-lisp/clx/files/gentoo-fix-asd.patch
@@ -0,0 +1,303 @@
+diff -ur clx-0.7.4.orig/clx.asd clx-0.7.4/clx.asd
+--- clx-0.7.4.orig/clx.asd 2009-11-28 16:43:30.000000000 +0100
++++ clx-0.7.4/clx.asd 2009-11-29 22:29:11.000000000 +0100
+@@ -21,116 +21,80 @@
+ ;;; or implied warranty.
+
+ (defpackage :clx-system (:use :cl :asdf))
+-(in-package :clx-system)
++(in-package :clx-system)
+
+ (pushnew :clx-ansi-common-lisp *features*)
+
+ (defclass clx-source-file (cl-source-file) ())
+ (defclass xrender-source-file (clx-source-file) ())
+
+-;;; CL-SOURCE-FILE, not CLX-SOURCE-FILE, so that we're not accused of
+-;;; cheating by rebinding *DERIVE-FUNCTION-TYPES* :-)
+-(defclass example-source-file (cl-source-file) ())
+-
+-(defclass legacy-file (static-file) ())
+-
+-(defsystem CLX
+- :depends-on (#+sbcl sb-bsd-sockets)
+- :version "0.7.2"
+- :serial t
+- :default-component-class clx-source-file
++(defsystem clx
++ :depends-on (#+sbcl :sb-bsd-sockets)
++ :version "0.7.4"
++ :serial t
++ :default-component-class clx-source-file
++ :components
++ ((:file "package")
++ (:file "depdefs")
++ (:file "clx")
++ #-(or openmcl allegro) (:file "dependent")
++ #+openmcl (:file "dep-openmcl")
++ #+allegro (:file "dep-allegro")
++ (:file "macros")
++ (:file "bufmac")
++ (:file "buffer")
++ (:file "display")
++ (:file "gcontext")
++ (:file "input")
++ (:file "requests")
++ (:file "fonts")
++ (:file "graphics")
++ (:file "text")
++ (:file "attributes")
++ (:file "translate")
++ (:file "keysyms")
++ (:file "manager")
++ (:file "image")
++ (:file "resource")
++ #+allegro
++ (:file "excldep" :pathname "excldep.lisp")
++ (:module extensions
++ :pathname #.(make-pathname :directory '(:relative))
+ :components
+- ((:file "package")
+- (:file "depdefs")
+- (:file "clx")
+- #-(or openmcl allegro) (:file "dependent")
+- #+openmcl (:file "dep-openmcl")
+- #+allegro (:file "dep-allegro")
+- (:file "macros")
+- (:file "bufmac")
+- (:file "buffer")
+- (:file "display")
+- (:file "gcontext")
+- (:file "input")
+- (:file "requests")
+- (:file "fonts")
+- (:file "graphics")
+- (:file "text")
+- (:file "attributes")
+- (:file "translate")
+- (:file "keysyms")
+- (:file "manager")
+- (:file "image")
+- (:file "resource")
+- #+allegro
+- (:file "excldep" :pathname "excldep.lisp")
+- (:module extensions
+- :pathname #.(make-pathname :directory '(:relative))
+- :components
+- ((:file "shape")
+- (:file "big-requests")
+- (:file "xvidmode")
+- (:xrender-source-file "xrender")
+- (:file "glx")
+- (:file "gl" :depends-on ("glx"))
+- (:file "dpms")
+- (:file "xtest")
+- (:file "screensaver")
+- (:file "xinerama")))
+- (:module demo
+- :default-component-class example-source-file
+- :components
+- ((:file "bezier")
+- ;; KLUDGE: this requires "bezier" for proper operation,
+- ;; but we don't declare that dependency here, because
+- ;; asdf doesn't load example files anyway.
+- (:file "beziertest")
+- (:file "clclock")
+- (:file "clipboard")
+- (:file "clx-demos")
+- (:file "gl-test")
+- ;; FIXME: compiling this generates 30-odd spurious code
+- ;; deletion notes. Find out why, and either fix or
+- ;; workaround the problem.
+- (:file "mandel")
+- (:file "menu")
+- (:file "zoid")))
+- (:module test
+- :default-component-class example-source-file
+- :components
+- ((: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 "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
+- ((:file "debug" :pathname "debug.lisp")
+- (:file "describe" :pathname "describe.lisp")
+- (:file "event-test" :pathname "event-test.lisp")
+- (:file "keytrans" :pathname "keytrans.lisp")
+- (:file "trace" :pathname "trace.lisp")
+- (:file "util" :pathname "util.lisp")))))
+-
+-(defmethod perform ((o load-op) (f example-source-file))
+- ;; do nothing. We want to compile them when CLX is compiled, but
+- ;; not load them when CLX is loaded.
+- t)
++ ((:file "shape")
++ (:file "big-requests")
++ (:file "xvidmode")
++ (:xrender-source-file "xrender")
++ (:file "glx")
++ (:file "gl" :depends-on ("glx"))
++ (:file "dpms")
++ (:file "xtest")
++ (:file "screensaver")
++ (:file "xinerama")))))
++
++(defsystem clx-test
++ :depends-on (:clx)
++ :serial t
++ :components
++ ((:file "image")
++ (:file "trapezoid")))
++
++(defsystem clx-demo
++ :depends-on (:clx)
++ :serial t
++ :components
++ ((:file "bezier")
++ (:file "beziertest")
++ (:file "clclock")
++ (:file "clipboard")
++ (:file "clx-demos")
++ (:file "gl-test")
++ ;; FIXME: compiling this generates 30-odd spurious code
++ ;; deletion notes. Find out why, and either fix or
++ ;; workaround the problem.
++ (:file "mandel")
++ (:file "menu")
++ (:file "zoid")))
+
+ #+sbcl
+ (defmethod perform :around ((o compile-op) (f xrender-source-file))
+@@ -146,35 +110,35 @@
+ ;; without STYLE-WARNINGs. Since it currently does, let's enforce
+ ;; it here so that we can catch regressions easily.
+ (let ((on-warnings (operation-on-warnings o))
+- (on-failure (operation-on-failure o)))
++ (on-failure (operation-on-failure o)))
+ (unwind-protect
+- (progn
+- (setf (operation-on-warnings o) :error
+- (operation-on-failure o) :error)
+- ;; a variety of accessors, such as AREF-CARD32, are not
+- ;; declared INLINE. Without this (non-ANSI)
+- ;; static-type-inference behaviour, SBCL emits an extra 100
+- ;; optimization notes (roughly one fifth of all of the
+- ;; notes emitted). Since the internals are unlikely to
+- ;; change much, and certainly the internals should stay in
+- ;; sync, enabling this extension is a win. (Note that the
+- ;; use of this does not imply that applications using CLX
+- ;; calls that expand into calls to these accessors will be
+- ;; optimized in the same way).
+- (let ((sb-ext:*derive-function-types* t)
++ (progn
++ (setf (operation-on-warnings o) :error
++ (operation-on-failure o) :error)
++ ;; a variety of accessors, such as AREF-CARD32, are not
++ ;; declared INLINE. Without this (non-ANSI)
++ ;; static-type-inference behaviour, SBCL emits an extra 100
++ ;; optimization notes (roughly one fifth of all of the
++ ;; notes emitted). Since the internals are unlikely to
++ ;; change much, and certainly the internals should stay in
++ ;; sync, enabling this extension is a win. (Note that the
++ ;; use of this does not imply that applications using CLX
++ ;; calls that expand into calls to these accessors will be
++ ;; optimized in the same way).
++ (let ((sb-ext:*derive-function-types* t)
+ (sadx (find-symbol "STACK-ALLOCATE-DYNAMIC-EXTENT" :sb-c))
+ (sadx-var (find-symbol "*STACK-ALLOCATE-DYNAMIC-EXTENT*" :sb-ext)))
+- ;; deeply unportable stuff, this. I will be shot. We
+- ;; want to enable the dynamic-extent declarations in CLX.
+- (when (and sadx (sb-c::policy-quality-name-p sadx))
+- ;; no way of setting it back short of yet more yukky stuff
+- (proclaim `(optimize (,sadx 3))))
++ ;; deeply unportable stuff, this. I will be shot. We
++ ;; want to enable the dynamic-extent declarations in CLX.
++ (when (and sadx (sb-c::policy-quality-name-p sadx))
++ ;; no way of setting it back short of yet more yukky stuff
++ (proclaim `(optimize (,sadx 3))))
+ (if sadx-var
+ (progv (list sadx-var) (list t)
+ (call-next-method))
+ (call-next-method))))
+ (setf (operation-on-warnings o) on-warnings
+- (operation-on-failure o) on-failure))))
++ (operation-on-failure o) on-failure))))
+
+ #+sbcl
+ (defmethod perform :around (o (f clx-source-file))
+@@ -186,31 +150,31 @@
+ ;; structured data is sufficiently equal.
+ (handler-bind
+ ((sb-ext:defconstant-uneql
+- (lambda (c)
+- ;; KLUDGE: this really means "don't warn me about
+- ;; efficiency of generic array access, please"
+- (declare (optimize (sb-ext:inhibit-warnings 3)))
+- (let ((old (sb-ext:defconstant-uneql-old-value c))
+- (new (sb-ext:defconstant-uneql-new-value c)))
+- (typecase old
+- (list (when (equal old new) (abort c)))
+- (string (when (and (typep new 'string)
+- (string= old new))
+- (abort c)))
+- (simple-vector
+- (when (and (typep new 'simple-vector)
+- (= (length old) (length new))
+- (every #'eql old new))
+- (abort c)))
+- (array
+- (when (and (typep new 'array)
+- (equal (array-dimensions old)
+- (array-dimensions new))
+- (equal (array-element-type old)
+- (array-element-type new))
+- (dotimes (i (array-total-size old) t)
+- (unless (eql (row-major-aref old i)
+- (row-major-aref new i))
+- (return nil))))
+- (abort c))))))))
++ (lambda (c)
++ ;; KLUDGE: this really means "don't warn me about
++ ;; efficiency of generic array access, please"
++ (declare (optimize (sb-ext:inhibit-warnings 3)))
++ (let ((old (sb-ext:defconstant-uneql-old-value c))
++ (new (sb-ext:defconstant-uneql-new-value c)))
++ (typecase old
++ (list (when (equal old new) (abort c)))
++ (string (when (and (typep new 'string)
++ (string= old new))
++ (abort c)))
++ (simple-vector
++ (when (and (typep new 'simple-vector)
++ (= (length old) (length new))
++ (every #'eql old new))
++ (abort c)))
++ (array
++ (when (and (typep new 'array)
++ (equal (array-dimensions old)
++ (array-dimensions new))
++ (equal (array-element-type old)
++ (array-element-type new))
++ (dotimes (i (array-total-size old) t)
++ (unless (eql (row-major-aref old i)
++ (row-major-aref new i))
++ (return nil))))
++ (abort c))))))))
+ (call-next-method)))
diff --git a/dev-lisp/clx/files/gentoo-fix-dep-openmcl.patch b/dev-lisp/clx/files/gentoo-fix-dep-openmcl.patch
new file mode 100644
index 000000000000..1ec3eca0897c
--- /dev/null
+++ b/dev-lisp/clx/files/gentoo-fix-dep-openmcl.patch
@@ -0,0 +1,21 @@
+diff -ur clx-0.7.4.orig/dep-openmcl.lisp clx-0.7.4/dep-openmcl.lisp
+--- clx-0.7.4.orig/dep-openmcl.lisp 2009-11-28 16:43:30.000000000 +0100
++++ clx-0.7.4/dep-openmcl.lisp 2009-11-29 22:39:36.000000000 +0100
+@@ -492,7 +492,7 @@
+ ;;; value changes.
+
+ (defun process-block (whostate predicate &rest predicate-args)
+- (declare (dynamic-extern predicate-args))
++ (declare (dynamic-extent predicate-args))
+ (apply #'ccl:process-wait whostate predicate predicate-args))
+
+ ;;; PROCESS-WAKEUP: Check some other process' wait function.
+@@ -1113,7 +1113,7 @@
+ unit byte-lsb-first-p bit-lsb-first-p)
+ (declare (ignore bbuf boffset pixarray x y width height
+ padded-bytes-per-line bits-per-pixel unit
+- byte-lsb-first-p bit-lsp-first-p))
++ byte-lsb-first-p bit-lsb-first-p))
+ nil)
+
+ ;;; FAST-COPY-PIXARRAY - copy part of a pixarray into another
diff --git a/dev-lisp/clx/files/gentoo-fix-dynamic-extent-sbcl-1.0.45.patch b/dev-lisp/clx/files/gentoo-fix-dynamic-extent-sbcl-1.0.45.patch
new file mode 100644
index 000000000000..961d1bedaa67
--- /dev/null
+++ b/dev-lisp/clx/files/gentoo-fix-dynamic-extent-sbcl-1.0.45.patch
@@ -0,0 +1,13 @@
+diff -ur clx-0.7.4.orig/requests.lisp clx-0.7.4/requests.lisp
+--- clx-0.7.4.orig/requests.lisp 2009-11-28 16:43:30.000000000 +0100
++++ clx-0.7.4/requests.lisp 2010-12-16 23:37:07.122629835 +0100
+@@ -466,8 +466,7 @@
+ (type event-key event-key)
+ (type (or null event-mask) event-mask)
+ (type generalized-boolean propagate-p)
+- (type (or null display) display)
+- (dynamic-extent args))
++ (type (or null display) display))
+ (unless event-mask (setq event-mask 0))
+ (unless display (setq display (window-display window)))
+ (let ((internal-event-code (get-event-code event-key))
diff --git a/dev-lisp/clx/files/gentoo-fix-obsolete-eval-when.patch b/dev-lisp/clx/files/gentoo-fix-obsolete-eval-when.patch
new file mode 100644
index 000000000000..e1df016b4a56
--- /dev/null
+++ b/dev-lisp/clx/files/gentoo-fix-obsolete-eval-when.patch
@@ -0,0 +1,12 @@
+diff -ur clx-0.7.4.orig/depdefs.lisp clx-0.7.4/depdefs.lisp
+--- clx-0.7.4.orig/depdefs.lisp 2009-11-28 16:43:30.000000000 +0100
++++ clx-0.7.4/depdefs.lisp 2009-11-29 22:56:38.000000000 +0100
+@@ -142,7 +142,7 @@
+ ;;; overlapping array and image code.
+
+ #+(or lispm vax little-endian Minima)
+-(eval-when (eval compile load)
++(eval-when (:compile-toplevel :load-toplevel :execute)
+ (pushnew :clx-little-endian *features*))
+
+ #+lcl3.0
diff --git a/dev-lisp/clx/files/gentoo-fix-unused-vars.patch b/dev-lisp/clx/files/gentoo-fix-unused-vars.patch
new file mode 100644
index 000000000000..96dc255ffbf4
--- /dev/null
+++ b/dev-lisp/clx/files/gentoo-fix-unused-vars.patch
@@ -0,0 +1,69 @@
+diff -ur clx-0.7.4.orig/gl.lisp clx-0.7.4/gl.lisp
+--- clx-0.7.4.orig/gl.lisp 2009-11-28 16:43:30.000000000 +0100
++++ clx-0.7.4/gl.lisp 2009-11-29 22:46:37.000000000 +0100
+@@ -2274,7 +2274,7 @@
+ (let ((constant 0)
+ (calculated ()))
+ (loop
+- for (name type length length-var) in argspecs
++ for (nil type length length-var) in argspecs
+ do (let ((byte-width (byte-width type)))
+ (typecase length
+ (number (incf constant (* byte-width length)))
+@@ -2287,7 +2287,7 @@
+
+ (defun composite-args (argspecs)
+ (loop
+- for (name type length length-var) in argspecs
++ for (nil nil length length-var) in argspecs
+ when (consp length)
+ collect (list length-var length)))
+
+diff -ur clx-0.7.4.orig/xrender.lisp clx-0.7.4/xrender.lisp
+--- clx-0.7.4.orig/xrender.lisp 2009-11-28 16:43:30.000000000 +0100
++++ clx-0.7.4/xrender.lisp 2009-11-29 22:50:42.000000000 +0100
+@@ -408,7 +408,7 @@
+
+ (macrolet ((foo (&rest specs)
+ `(progn
+- ,@(loop for (type slot default) in specs
++ ,@(loop for (nil slot nil) in specs
+ for index from 0
+ collect
+ `(progn
+@@ -426,7 +426,7 @@
+ (data +X-RenderChangePicture+)
+ (picture picture)
+ (mask
+- ,@(loop for (type slot default) in specs
++ ,@(loop for (type slot nil) in specs
+ for index from 0
+ collect
+ `(,type (and
+@@ -454,7 +454,7 @@
+ (drawable
+ &key format
+ (picture (make-picture :display (drawable-display drawable)))
+- ,@(loop for (type slot default-value) in specs
++ ,@(loop for (nil slot nil) in specs
+ collect (cond ((eql slot 'clip-mask)
+ `(clip-mask :none))
+ (t
+@@ -475,7 +475,7 @@
+ (drawable drawable)
+ (picture-format format)
+ (mask
+- ,@(loop for (type slot default) in specs
++ ,@(loop for (type slot nil) in specs
+ collect
+ (cond ((eql slot 'clip-mask)
+ (list type `(and
+@@ -487,7 +487,7 @@
+ (%render-change-picture-clip-rectangles picture clip-mask))
+ (setf (picture-format picture) format)
+ (setf (picture-%server-values picture)
+- (vector ,@(loop for (type slot default) in specs
++ (vector ,@(loop for (nil slot default) in specs
+ collect
+ `(or ,slot ,default))))
+ (setf (picture-%values picture) (copy-seq (picture-%server-values picture)))
diff --git a/dev-lisp/clx/metadata.xml b/dev-lisp/clx/metadata.xml
new file mode 100644
index 000000000000..25b18190878c
--- /dev/null
+++ b/dev-lisp/clx/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>nimiux@gentoo.org</email>
+ <name>Chema Alonso</name>
+ <description>Maintainer</description>
+ </maintainer>
+ <longdescription lang="en">
+ CLX provides an implementation of the X Window System protocol to
+ Lisp graphics library[ies] and applications. It is the Common Lisp
+ equivalent of Xlib.
+ </longdescription>
+ <longdescription lang="es">
+ CLX ofrece una implementación del protocolo del sistema X Window
+ a las librerías y aplicaciones gráficas escritas en Lisp. Es el
+ equivamente en Common Lisp a Xlib.
+ </longdescription>
+ <use>
+ <flag name="doc">Builds documentation</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">sharplispers/clx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lisp/cmucl/Manifest b/dev-lisp/cmucl/Manifest
new file mode 100644
index 000000000000..35610f61eac3
--- /dev/null
+++ b/dev-lisp/cmucl/Manifest
@@ -0,0 +1,2 @@
+DIST cmucl-20e-x86-linux.tar.bz2 18861880 SHA256 94dc1c0ddcaa915f83cdc23462a4cc3c4af98d64fe42e79d7c5232225b149480 SHA512 1eee852b2a11733d0fac2c046137ccd099370bf208be71becc03710e832510b288768f557e326b1ce95cba16490413142e607fd71346e20e5f8592b51d86b0fe WHIRLPOOL 765476aeb037b782380b33fb8e7ae137bb38544547b427c54c23661122552108e8940413c55003c31ba05b4729bb18f99f5b462742cbd9c1c7426f0c04e26863
+DIST cmucl-src-20e.tar.bz2 6147575 SHA256 b18fd27b67321a0c00f2019bbb18557f239062ba947080149ed42e30f72ae7cd SHA512 d04f6ac7335572198d37d5df00934edfc82495294446cc5420dada4f2df44009f0983b438d6f10ce5bb02e46fd89df985da5eee3e91a6a75d98e9f86240c0dcc WHIRLPOOL babb020bacf474e1cea4bc865ba7352686ff5d92d01dd4d44d121b101ac328da6cd3e63798a2086ce29ba260fdbefc26f5f7d496ecb0af9566cb1cbdbb3846bf
diff --git a/dev-lisp/cmucl/cmucl-20e.ebuild b/dev-lisp/cmucl/cmucl-20e.ebuild
new file mode 100644
index 000000000000..6151ad6009bd
--- /dev/null
+++ b/dev-lisp/cmucl/cmucl-20e.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs multilib
+
+MY_PV=${PV:0:3}
+
+DESCRIPTION="CMU Common Lisp is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://www.cons.org/cmucl/"
+SRC_URI="http://common-lisp.net/project/cmucl/downloads/release/${MY_PV}/cmucl-src-${MY_PV}.tar.bz2
+ http://common-lisp.net/project/cmucl/downloads/release/${MY_PV}/cmucl-${MY_PV}-x86-linux.tar.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="X source cpu_flags_x86_sse2"
+
+CDEPEND=">=dev-lisp/asdf-2.33-r3:=
+ x11-libs/motif:0"
+DEPEND="${CDEPEND}
+ sys-devel/bc"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}"
+
+TARGET=linux-4
+
+src_prepare() {
+ epatch "${FILESDIR}"/${MY_PV}-execstack-fixes.patch
+ epatch "${FILESDIR}"/${MY_PV}-customize-lisp-implementation-version.patch
+
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp src/contrib/asdf/ || die
+}
+
+src_compile() {
+ local cmufpu cmuopts
+
+ if use cpu_flags_x86_sse2; then
+ cmufpu=sse2
+ else
+ cmufpu=x87
+ fi
+
+ if use X; then
+ cmuopts="-f ${cmufpu}"
+ else
+ cmuopts="-u -f ${cmufpu}"
+ fi
+
+ local buildimage="bin/lisp -core lib/cmucl/lib/lisp-${cmufpu}.core -noinit -nositeinit -batch"
+
+ env CC="$(tc-getCC)" bin/build.sh -v "-gentoo-${PR}" -C "" -o "${buildimage}" ${cmuopts} || die "Cannot build the compiler"
+
+ # Compile up the asdf and defsystem modules
+ ${TARGET}/lisp/lisp -noinit -nositeinit -batch << EOF || die
+(in-package :cl-user)
+(setf (ext:search-list "target:")
+ '("$TARGET/" "src/"))
+(setf (ext:search-list "modules:")
+ '("target:contrib/"))
+
+(compile-file "modules:asdf/asdf")
+(compile-file "modules:defsystem/defsystem")
+EOF
+}
+
+src_install() {
+ env MANDIR=share/man/man1 DOCDIR=share/doc/${PF} \
+ bin/make-dist.sh -S -g -G root -O root ${TARGET} ${MY_PV} x86 linux \
+ || die "Cannot build installation archive"
+ # Necessary otherwise tar will fail
+ dodir /usr
+ pushd "${D}"/usr > /dev/null
+ tar xzpf "${WORKDIR}"/cmucl-${MY_PV}-x86-linux.tar.gz \
+ || die "Cannot install main system"
+ if use X ; then
+ tar xzpf "${WORKDIR}"/cmucl-${MY_PV}-x86-linux.extra.tar.gz \
+ || die "Cannot install extra files"
+ fi
+ if use source; then
+ # Necessary otherwise tar will fail
+ dodir /usr/share/common-lisp/source/${PN}
+ cd "${D}"/usr/share/common-lisp/source/${PN}
+ tar --strip-components 1 -xzpf "${WORKDIR}"/cmucl-src-${MY_PV}.tar.gz \
+ || die "Cannot install sources"
+ fi
+ popd > /dev/null
+
+ # Install site config file
+ sed "s,@PF@,${PF},g ; s,@VERSION@,$(date +%F),g" \
+ < "${FILESDIR}"/site-init.lisp.in \
+ > "${D}"/usr/$(get_libdir)/cmucl/site-init.lisp \
+ || die "Cannot fix site-init.lisp"
+ insinto /etc/common-lisp
+ doins "${FILESDIR}"/cmuclrc || die "Failed to install cmuclrc"
+}
diff --git a/dev-lisp/cmucl/files/20e-customize-lisp-implementation-version.patch b/dev-lisp/cmucl/files/20e-customize-lisp-implementation-version.patch
new file mode 100644
index 000000000000..8fc9278af87d
--- /dev/null
+++ b/dev-lisp/cmucl/files/20e-customize-lisp-implementation-version.patch
@@ -0,0 +1,16 @@
+diff -ur cmucl.orig/src/code/misc.lisp cmucl/src/code/misc.lisp
+--- cmucl.orig/src/code/misc.lisp 2011-10-25 05:31:39.000000000 +0200
++++ cmucl/src/code/misc.lisp 2012-01-31 21:46:49.441273068 +0100
+@@ -187,8 +187,10 @@
+
+ (defun lisp-implementation-version ()
+ "Returns a string describing the implementation version."
+- (format nil "~A (~X~A)" *lisp-implementation-version* c:byte-fasl-file-version
+- #+unicode _" Unicode" #-unicode ""))
++ (format nil "~X~A~A"
++ c:byte-fasl-file-version
++ #+unicode "-unicode" #-unicode ""
++ *lisp-implementation-version*))
+
+ (defun machine-instance ()
+ "Returns a string giving the name of the local machine."
diff --git a/dev-lisp/cmucl/files/20e-execstack-fixes.patch b/dev-lisp/cmucl/files/20e-execstack-fixes.patch
new file mode 100644
index 000000000000..034848d64a26
--- /dev/null
+++ b/dev-lisp/cmucl/files/20e-execstack-fixes.patch
@@ -0,0 +1,118 @@
+diff -Naur work.old/src/lisp/alpha-assem.S work/src/lisp/alpha-assem.S
+--- work.old/src/lisp/alpha-assem.S 2003-03-06 11:13:09.000000000 -0300
++++ work/src/lisp/alpha-assem.S 2010-05-10 00:06:34.000000000 -0300
+@@ -297,3 +297,7 @@
+ function_end_breakpoint_end:
+
+
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff -Naur work.old/src/lisp/amd64-assem.S work/src/lisp/amd64-assem.S
+--- work.old/src/lisp/amd64-assem.S 2004-07-27 19:03:53.000000000 -0300
++++ work/src/lisp/amd64-assem.S 2010-05-10 00:06:34.000000000 -0300
+@@ -1051,3 +1051,7 @@
+ .end
+
+ #endif /* LINKAGE_TABLE */
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff -Naur work.old/src/lisp/backtrace.c work/src/lisp/backtrace.c
+--- work.old/src/lisp/backtrace.c 2009-06-11 13:04:01.000000000 -0300
++++ work/src/lisp/backtrace.c 2010-05-10 00:06:22.000000000 -0300
+@@ -3,6 +3,8 @@
+ * Simple backtrace facility. More or less from Rob's lisp version.
+ */
+
++#include "os-common.h"
++
+ #include <stdio.h>
+ #include <signal.h>
+ #include "lisp.h"
+diff -Naur work.old/src/lisp/hppa-assem.S work/src/lisp/hppa-assem.S
+--- work.old/src/lisp/hppa-assem.S 2002-08-23 14:05:35.000000000 -0300
++++ work/src/lisp/hppa-assem.S 2010-05-10 00:06:34.000000000 -0300
+@@ -460,3 +460,7 @@
+
+ .export function_end_breakpoint_end
+ function_end_breakpoint_end
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff -Naur work.old/src/lisp/linux-stubs.S work/src/lisp/linux-stubs.S
+--- work.old/src/lisp/linux-stubs.S 2005-08-17 00:40:16.000000000 -0300
++++ work/src/lisp/linux-stubs.S 2010-05-10 00:06:34.000000000 -0300
+@@ -995,3 +995,7 @@
+ /* doe(yperr_string) */
+ /* doe(ypprot_err) */
+ #endif /* defined(LINKAGE_TABLE) && !defined(__FreeBSD__) */
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff -Naur work.old/src/lisp/lisp.c work/src/lisp/lisp.c
+--- work.old/src/lisp/lisp.c 2009-07-13 16:41:54.000000000 -0300
++++ work/src/lisp/lisp.c 2010-05-10 00:05:55.000000000 -0300
+@@ -5,6 +5,9 @@
+ *
+ */
+
++#include "os-common.h"
++#include <time.h>
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <limits.h>
+diff -Naur work.old/src/lisp/mips-assem.S work/src/lisp/mips-assem.S
+--- work.old/src/lisp/mips-assem.S 2002-08-23 14:01:02.000000000 -0300
++++ work/src/lisp/mips-assem.S 2010-05-10 00:06:34.000000000 -0300
+@@ -402,3 +402,7 @@
+ move v0, a1
+ j _restore_state
+ .end save_state
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff -Naur work.old/src/lisp/os-common.h work/src/lisp/os-common.h
+--- work.old/src/lisp/os-common.h 1969-12-31 21:00:00.000000000 -0300
++++ work/src/lisp/os-common.h 2010-05-10 00:06:22.000000000 -0300
+@@ -0,0 +1 @@
++char* convert_lisp_string(char *c_string, void *lisp_string, int len);
+diff -Naur work.old/src/lisp/ppc-assem.S work/src/lisp/ppc-assem.S
+--- work.old/src/lisp/ppc-assem.S 2006-02-25 01:35:58.000000000 -0300
++++ work/src/lisp/ppc-assem.S 2010-05-10 00:06:34.000000000 -0300
+@@ -721,3 +721,7 @@
+ SET_SIZE(fpu_restore)
+
+ #endif
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff -Naur work.old/src/lisp/sparc-assem.S work/src/lisp/sparc-assem.S
+--- work.old/src/lisp/sparc-assem.S 2003-10-23 23:57:00.000000000 -0300
++++ work/src/lisp/sparc-assem.S 2010-05-10 00:06:34.000000000 -0300
+@@ -837,3 +837,7 @@
+ * End:
+ */
+
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+diff -Naur work.old/src/lisp/x86-assem.S work/src/lisp/x86-assem.S
+--- work.old/src/lisp/x86-assem.S 2008-12-24 02:36:40.000000000 -0200
++++ work/src/lisp/x86-assem.S 2010-05-10 00:06:34.000000000 -0300
+@@ -798,3 +798,7 @@
+ ENDFUNC(undefined_foreign_symbol_trap)
+
+ #endif /* LINKAGE_TABLE */
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/dev-lisp/cmucl/files/cmuclrc b/dev-lisp/cmucl/files/cmuclrc
new file mode 100644
index 000000000000..e663e92af87a
--- /dev/null
+++ b/dev-lisp/cmucl/files/cmuclrc
@@ -0,0 +1,9 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
+;;;
+
+(in-package :common-lisp-user)
+
+(if (probe-file "/etc/gentoo-init.lisp")
+ (load "/etc/gentoo-init.lisp")
+ (format t "~%;;; Warning: There is no /etc/gentoo-init.lisp file ~
+\(which should be provided by dev-lisp/gentoo-init"))
diff --git a/dev-lisp/cmucl/files/site-init.lisp.in b/dev-lisp/cmucl/files/site-init.lisp.in
new file mode 100644
index 000000000000..1b232166c889
--- /dev/null
+++ b/dev-lisp/cmucl/files/site-init.lisp.in
@@ -0,0 +1,56 @@
+;;; -*- Mode: Lisp; Package: System -*-
+;;;
+;;; **********************************************************************
+;;; This code was written as part of the CMU Common Lisp project at
+;;; Carnegie Mellon University, and has been placed in the public domain.
+;;;
+
+;;; Heavy modifications by Peter Van Eynde
+
+;;; More modifications for Gentoo by Matthew Kennedy
+;;; <mkennedy@gentoo.org>
+
+(in-package "SYSTEM")
+
+(if (probe-file "/etc/cmuclrc")
+ (load "/etc/cmuclrc")
+ (format t "~%;;; Warning: There is no /etc/cmuclrc file (which should have been created during emerge"))
+
+;;; If you have sources installed on your system, un-comment the following form
+;;; and change it to point to the source location. This will allow the Hemlock
+;;; "Edit Definition" command and the debugger to find sources for functions in
+;;; the core.
+(when (probe-file #p"/usr/share/common-lisp/source/cmucl/")
+ (setf (ext:search-list "target:")
+ '(
+ "/usr/share/common-lisp/source/cmucl/" ; object dir
+ )))
+
+;;; (setf (ext:search-list "library:") '("/usr/lib/cmucl/lib/"))
+;;; for safety...
+
+;;; Put your site name here...
+(setq *short-site-name* "Unknown")
+(setq *long-site-name* "Site name not initialized")
+
+(in-package :common-lisp-user)
+
+;;; newbie functions, delete if you don't like them
+
+(defun help ()
+ (format t "~
+Welcome to the Gentoo GNU/Linux port of CMUCL.
+
+The CMUCL REPL does not have GNU Readline-like support, however
+you may wish to install rlwap (see: app-misc/rlwrap) to achieve
+the same effect.
+
+If you think you found a bug, please use http://bugs.gentoo.org/
+
+Read the documentation in /usr/share/doc/@PF@.
+
+\(quit) exit Lisp
+\(describe 'foo) gives information about foo
+\(inspect '*foo*) interactively inspects *foo*
+\(apropos \"foo\") briefly describe all symbols which match \"foo\"
+"))
diff --git a/dev-lisp/cmucl/metadata.xml b/dev-lisp/cmucl/metadata.xml
new file mode 100644
index 000000000000..805c75982ffa
--- /dev/null
+++ b/dev-lisp/cmucl/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>grozin@gentoo.org</email>
+<name>Andrey Grozin</name>
+</maintainer>
+<herd>common-lisp</herd>
+<longdescription>
+CMUCL is a free implementation of the Common Lisp programming language
+which runs on most major Unix platforms. It mainly conforms to the
+ANSI Common Lisp standard. Here is a summary of its main features:
+
+ * a sophisticated native-code compiler which is capable of powerful
+ type inferences, and generates code competitive in speed with C
+ compilers.
+
+ * generational garbage collection and multiprocessing capability on
+ the x86 ports.
+
+ * a foreign function interface which allows interfacing with C code
+ and system libraries, including shared libraries on most platforms,
+ and direct access to Unix system calls.
+
+ * support for interprocess communication and remote procedure calls.
+
+ * an implementation of CLOS, the Common Lisp Object System, which
+ includes multimethods and a metaobject protocol.
+
+ * a graphical source-level debugger using a Motif interface, and a
+ code profiler.
+</longdescription>
+<use>
+<flag name='source'>Include source code for CMUCL in installation</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lisp/common-lisp-controller/Manifest b/dev-lisp/common-lisp-controller/Manifest
new file mode 100644
index 000000000000..001aef39dae2
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/Manifest
@@ -0,0 +1,2 @@
+DIST common-lisp-controller_4.27.tar.gz 27636 SHA256 e4576c018e136ae34dfaf163cd20c3fc000b4a7ac716a53bde6268700a515082 SHA512 afba310bf525fb40f98a6bd67747647d105080667a3ebef883e19ffc60186bdfc7b937c2efe7535e3daa08503d8079d69453264fe8124f1b9a4a55e6303fe1b3 WHIRLPOOL d30ec6261cadd4235bebbc9d87493cb7a8ffb76027f3913f07af2ee0a047881b253e6816ad1309ff407462d37e4b804ba5470cee1888339e10668b18d0a79204
+DIST common-lisp-controller_5.13.tar.gz 30846 SHA256 ec2e9c6fa566b2d5f18d2823e48e54834392ca8c76e677047f03d5d940e40249 SHA512 11a6e2b7a3ca6846c8b88ee3808ae4e01c269dce8eb4293e57bf061a6c74786fe8bdff0f11c3db5c8ac60e3ba7a1e74222f9ab1418da114b6ece2fa6f23464e2 WHIRLPOOL 2211168a7cf0198cec689caf3fd07dc2a1d536bbb1005287abae9e8d1e135754a38980aef220696e175805aa64a8d5dd8b8a874c7bd9b76029bac62cf175357e
diff --git a/dev-lisp/common-lisp-controller/common-lisp-controller-4.27.ebuild b/dev-lisp/common-lisp-controller/common-lisp-controller-4.27.ebuild
new file mode 100644
index 000000000000..fe890f28949b
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/common-lisp-controller-4.27.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Common Lisp Controller"
+HOMEPAGE="http://packages.debian.org/unstable/devel/common-lisp-controller"
+SRC_URI="mirror://gentoo/common-lisp-controller_${PV}.tar.gz"
+
+LICENSE="LLGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+DEPEND="|| ( >=sys-apps/coreutils-8.15 app-misc/realpath )
+ >=dev-lisp/asdf-1.84
+ dev-lang/perl"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}/man"
+ ln -s clc-{,un}register-user-package.1
+ for i in unregister-common-lisp-implementation {,un}register-common-lisp-source; do
+ ln -s register-common-lisp-implementation.8 ${i}.8
+ done
+}
+
+src_install() {
+ dobin clc-register-user-package
+ dobin clc-unregister-user-package
+ dosbin register-common-lisp-implementation
+ dosbin register-common-lisp-source
+ dosbin unregister-common-lisp-implementation
+ dosbin unregister-common-lisp-source
+ insinto /usr/share/common-lisp/source/common-lisp-controller
+ doins common-lisp-controller.lisp
+ doins post-sysdef-install.lisp
+ doman man/*.[18]
+ insinto /etc
+ doins "${FILESDIR}/${PV}/lisp-config.lisp"
+ dodoc "${FILESDIR}/README.Gentoo"
+ dodoc DESIGN.txt
+}
+
+pkg_postinst() {
+ test -d /var/cache/common-lisp-controller \
+ || mkdir /var/cache/common-lisp-controller
+ chmod 1777 /var/cache/common-lisp-controller
+
+ # This code from ${S}/debian/postinst
+
+ for compiler in /usr/lib/common-lisp/bin/*.sh
+ do
+ if [ -f "${compiler}" -a -r "${compiler}" -a -x "${compiler}" ] ; then
+ i=${compiler##*/}
+ i=${i%.sh}
+ einfo ">>> Recompiling Common Lisp Controller for $i"
+ bash "$compiler" install-clc || true
+ einfo ">>> Done rebuilding"
+ fi
+ done
+
+ # This code from ${S}/debian/preinst
+
+ # cleanup fasl files:
+ ( find /usr/share/common-lisp/source/defsystem \
+ /usr/share/common-lisp/source/asdf \
+ /usr/share/common-lisp/source/common-lisp-controller -type f -not -name "*.lisp" -print0 \
+ | xargs --null rm --force 2> /dev/null ) &>/dev/null
+
+ # remove old autobuild files:
+# find /etc/common-lisp -name autobuild -print0 \
+# | xargs -0 rm 2> /dev/null || true
+# find /etc/common-lisp -type d -depth -print0 \
+# | xargs rmdir 2> /dev/null || true
+
+ # remove old fals files:
+ test -d /usr/lib/common-lisp-controller \
+ && rmdir --ignore-fail-on-non-empty /usr/lib/common-lisp-controller
+ for compiler in /usr/lib/common-lisp/bin/*.sh ; do
+ if [ -f "$compiler" -a -r "$compiler" ] ; then
+ i=${compiler##*/}
+ i=${i%.sh}
+ if [ -d "/usr/lib/common-lisp/${i}" ] ; then
+ rm -rf "/usr/lib/common-lisp/${i}"
+ fi
+ fi
+ done
+}
diff --git a/dev-lisp/common-lisp-controller/common-lisp-controller-5.13-r1.ebuild b/dev-lisp/common-lisp-controller/common-lisp-controller-5.13-r1.ebuild
new file mode 100644
index 000000000000..a4dfe46ee55c
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/common-lisp-controller-5.13-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+inherit eutils
+
+DESCRIPTION="Common Lisp Controller"
+HOMEPAGE="http://packages.debian.org/unstable/devel/common-lisp-controller"
+SRC_URI="mirror://gentoo/common-lisp-controller_${PV}.tar.gz"
+
+LICENSE="LLGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+DEPEND="|| ( >=sys-apps/coreutils-8.15 app-misc/realpath )
+ >=dev-lisp/asdf-1.84
+ dev-lang/perl"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}/man"
+ ln -s clc-{,un}register-user-package.1
+ for i in unregister-common-lisp-implementation {,un}register-common-lisp-source; do
+ ln -s register-common-lisp-implementation.8 ${i}.8
+ done
+}
+
+src_install() {
+ dobin clc-register-user-package
+ dobin clc-unregister-user-package
+ dosbin register-common-lisp-implementation
+ dosbin register-common-lisp-source
+ dosbin unregister-common-lisp-implementation
+ dosbin unregister-common-lisp-source
+
+ dosbin clc-update-customized-images
+ keepdir /etc/common-lisp/images
+
+ insinto /usr/share/common-lisp/source/common-lisp-controller
+ doins common-lisp-controller.lisp post-sysdef-install.lisp
+ doman man/*.[138]
+ insinto /etc
+ doins "${FILESDIR}/${PV}/lisp-config.lisp"
+ dodoc "${FILESDIR}/README.Gentoo"
+ dodoc DESIGN.txt debian/changelog
+}
+
+pkg_postinst() {
+ test -d /var/cache/common-lisp-controller \
+ || mkdir /var/cache/common-lisp-controller
+ chmod 1777 /var/cache/common-lisp-controller
+
+ # This code from ${S}/debian/postinst
+
+ for compiler in /usr/lib/common-lisp/bin/*.sh
+ do
+ if [ -f "${compiler}" -a -r "${compiler}" -a -x "${compiler}" ] ; then
+ i=${compiler##*/}
+ i=${i%.sh}
+ einfo ">>> Recompiling Common Lisp Controller for $i"
+ bash "$compiler" install-clc || true
+ einfo ">>> Done rebuilding"
+ fi
+ done
+
+ # This code from ${S}/debian/preinst
+
+ # cleanup fasl files:
+ ( find /usr/share/common-lisp/source/defsystem \
+ /usr/share/common-lisp/source/asdf \
+ /usr/share/common-lisp/source/common-lisp-controller -type f -not -name "*.lisp" -print0 \
+ | xargs --null rm --force 2> /dev/null ) &>/dev/null
+
+ # remove old autobuild files:
+# find /etc/common-lisp -name autobuild -print0 \
+# | xargs -0 rm 2> /dev/null || true
+# find /etc/common-lisp -type d -depth -print0 \
+# | xargs rmdir 2> /dev/null || true
+
+ # remove old fals files:
+ test -d /usr/lib/common-lisp-controller \
+ && rmdir --ignore-fail-on-non-empty /usr/lib/common-lisp-controller
+ for compiler in /usr/lib/common-lisp/bin/*.sh ; do
+ if [ -f "$compiler" -a -r "$compiler" ] ; then
+ i=${compiler##*/}
+ i=${i%.sh}
+ if [ -d "/usr/lib/common-lisp/${i}" ] ; then
+ rm -rf "/usr/lib/common-lisp/${i}"
+ fi
+ fi
+ done
+}
diff --git a/dev-lisp/common-lisp-controller/files/4.27/lisp-config.lisp b/dev-lisp/common-lisp-controller/files/4.27/lisp-config.lisp
new file mode 100644
index 000000000000..a6d36ce22005
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/4.27/lisp-config.lisp
@@ -0,0 +1,3 @@
+
+(in-package common-lisp-user)
+
diff --git a/dev-lisp/common-lisp-controller/files/5.13/lisp-config.lisp b/dev-lisp/common-lisp-controller/files/5.13/lisp-config.lisp
new file mode 100644
index 000000000000..a6d36ce22005
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/5.13/lisp-config.lisp
@@ -0,0 +1,3 @@
+
+(in-package common-lisp-user)
+
diff --git a/dev-lisp/common-lisp-controller/files/README.Gentoo b/dev-lisp/common-lisp-controller/files/README.Gentoo
new file mode 100644
index 000000000000..adaa56315a4f
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/files/README.Gentoo
@@ -0,0 +1,27 @@
+ -*-outline-*-
+
+* Common Lisp Controller 4.x and 5.x
+
+With version 4.x and 5.x of the Debian Common Lisp Controller, the
+design of the controller was simplified so that source was compiled
+into /var/cache/, per user, on demand (ie. when you evaluate (require
+:foo) at the REPL).
+
+* Common Lisp Controller 3.x
+
+** IMPORTANT
+
+The Common Lisp Controller (CLC) in Gentoo GNU/Linux is a modified
+version of the original CLC sources from the Debian Project. Do not
+send bug reports to the Debian Project -- always send bug reports to
+http://bugs.gentoo.org.
+
+** NOTES
+
+If you are used to the CLC in Debian, please note that the Gentoo CLC
+does not require an Internet super-server such as inetd or xinetd in
+order to function. The original CLC implementation's clc-send-command
+has been replaced with a shell script which implements the same
+interface, but bypasses clc-build-daemon entirely.
+
+-- Matthew Kennedy <mkennedy@gentoo.org>
diff --git a/dev-lisp/common-lisp-controller/metadata.xml b/dev-lisp/common-lisp-controller/metadata.xml
new file mode 100644
index 000000000000..c3581b8c864c
--- /dev/null
+++ b/dev-lisp/common-lisp-controller/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+<longdescription>
+The Common Lisp Controller was originally used in the Debian project. The Common
+Lisp Contoller lets you install and manage common lisp sources and compilers.
+It creates a user-specific cache of compiled objects. When a library or an
+implementation is upgraded all compiled objects in the cache are flushed.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lisp/ecls/Manifest b/dev-lisp/ecls/Manifest
new file mode 100644
index 000000000000..4928afbf2724
--- /dev/null
+++ b/dev-lisp/ecls/Manifest
@@ -0,0 +1,8 @@
+DIST ecl-10.4.1.tar.gz 5835953 SHA256 505dcfe8f26aca352271225ad5a7f117b9bef0f6e7f7a7abaf7b7f11f7c63c6c SHA512 4e3d378d9e40c56f75e12923e223ee37ed8c12268926032665d11239a8373b58a806a765f60543305cfae09f42a2ce8726c944cdeaa1a9f170a80df488404244 WHIRLPOOL daa638689e308c335fa8fbf2c273f06a954b20c24e3e60ffa8e948e84956f69e4c5d59140ebcb98d92bd6a5cc6c381607be2259b96531d3bc33f1ca0bfa1caad
+DIST ecl-11.1.1.tar.gz 5898523 SHA256 28acce874e264a9e7182a2424bb7a1a3f7d834a8f2e1346ec0ef7156d4ed3b07 SHA512 a813d1514fcb0c1fba2090dc5232ab1261f293db050f54909dd74084cd757144d5e3a24677bbbcfcc74457247a1797059dc09ead8a14b8c23395c03c93e9d0dc WHIRLPOOL 42df041d01a1aeaddb235604e962b5aa55752ed60998bf9a40a4c001bf3281384e787c5a6cd513af3ca863f5b29885b1441640d0b17da5465142a4fda45fa2c3
+DIST ecl-12.12.1.tgz 9006697 SHA256 54e77ce8157752eab49f8640f7d0077522d493a4d4def463af26d292e46bc297 SHA512 9ac5d61e37cf18a56b2fb572b830955ededbe72d5d9a4e32ed631cd8cb5d27804ff5c0216a41f10ac988320b0584bcc4f9b4fb23732c541ee29f422c5726b23a WHIRLPOOL 8c2b1bd61caa27442bf337ab64788806e7e20150a902fe6c6d6cc593a3350d67252f8d450e6fd1ee99456a6238891c4b383044a6e79a77fad174d5db5a668aeb
+DIST ecl-12.2.1.tgz 8974948 SHA256 dbb3f83c27f3d2565ca22c1c6b4ab497bbfdd0d0a7b09dee76338f378621f091 SHA512 bf9bff5bfa02c638549ab7dab28d6778c6f676c0ea3ea8b8c11f85a4e9f3cf9fae23c7ec505024b3925ae0c905fccc132729964992c6d9b1524d9dd3b92bdf1f WHIRLPOOL cc8af8a2f92b66acb8578e76b7c982a57567591967c2e2fafbe681fdb8e78725072ec83d240addc255ff29979e6a6d23d077095f094288316f5dd16325d8ffbe
+DIST ecl-12.7.1.tar.gz 9009087 SHA256 5709bfb92eff00ddc4bcd59375835e9421dae2d258466af75e7e8d2748e01c4d SHA512 1f4312a9b64e55b01df62b492c1d23bdb231abd28c357d18bd813481e0943a852fdaa79bc89c45d1d1da9c0e8a4e5b43c5525488280156d76cc42e0fe9e0c5fe WHIRLPOOL eb915ce3f014ac7583b4c678f9009acfab73a7ad15abe49542fe49718049804e3bc7270e3b8e8e45687738ebc1119d1a224c1b454e8feac1fc1687b2a2bf4320
+DIST ecl-13.5.1.tgz 9401163 SHA256 f91c57ce065fe9748bc8104e191e4b2dcfe854d634315fe7800dd0a613472ca2 SHA512 a09f8b824aa78e461d700eefb1a8b68b876e15d49124a397e0b5b58ad73b80f818133a7b8e48ddb83505eea2f9c5fb024de8701b527524004e336e456eb07c84 WHIRLPOOL def6de6444430e45bfff29c0716a23869e3455ba9b1cd9bfc1f02ef5c79c83df5b2280b8bada28acb1e742cdbe5c819970273386333d7c7c7c4fb48464dc6a2b
+DIST ecl-15.3.7.tgz 8755180 SHA256 2dc6ffbbf1e0a7b1323d49a991ba1f005127ca3e153651d91ba9e65bdaec948f SHA512 50a28ed551e507bee526ae44a12da2524c1feedf07cf8ca99650e37ecd7b99c4e2f2758c077979b174d303ffdcd9325637b708a29d14d8c3851c7e65d4ea026c WHIRLPOOL 57b0382b0e3dc7cd601b835a371c9ec6658911b1471cb5bfeee6144d22500e8ca55268f2a001c49d446e9be1a3771ca12348f2565f68ec83f1660c4295545a06
+DIST ecl-9.12.3.tgz 5758828 SHA256 f4f2e9d584130db9bb61bd09a676ad67c5d0f1ca8096ed781b50a2ae99c5e682 SHA512 8171d28945e5c06f55f6bc5bcf41b5370ee4d5723b3957d2c841aee1e100f3c2ca497f0651f777acd39ceaefeec2737ec254165280446fe51a4ef5cf81ef64b0 WHIRLPOOL 6ff09c048eb639b424a6b32cac88877d11d150f06a1bb482061dc8561c304afc3dbede3610a523a450a1792fd768e713c36dba04ca16501f090a803d7326dd87
diff --git a/dev-lisp/ecls/ecls-10.4.1.ebuild b/dev-lisp/ecls/ecls-10.4.1.ebuild
new file mode 100644
index 000000000000..3fbef05e4108
--- /dev/null
+++ b/dev-lisp/ecls/ecls-10.4.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit eutils multilib
+
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://common-lisp.net/project/ecl/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug gengc precisegc threads +unicode X"
+
+RDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]"
+DEPEND="${RDEPEND}
+ app-text/texi2html"
+PDEPEND="dev-lisp/gentoo-init"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup() {
+ if use gengc || use precisegc; then
+ ewarn "USE flags gengc and precisegc are experimental"
+ ewarn "Don't use them if you want a stable ecl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ #parallel fails
+ emake -j1 || die "Compilation failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd
+}
diff --git a/dev-lisp/ecls/ecls-11.1.1-r1.ebuild b/dev-lisp/ecls/ecls-11.1.1-r1.ebuild
new file mode 100644
index 000000000000..2b194af7ec15
--- /dev/null
+++ b/dev-lisp/ecls/ecls-11.1.1-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit eutils multilib
+
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://common-lisp.net/project/ecl/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug emacs gengc precisegc threads +unicode X"
+
+RDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]"
+DEPEND="${RDEPEND}
+ app-text/texi2html
+ emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
+PDEPEND="dev-lisp/gentoo-init"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup() {
+ if use gengc || use precisegc; then
+ ewarn "USE flags gengc and precisegc are experimental"
+ ewarn "Don't use them if you want a stable ecl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+
+ # bug #357315
+ epatch "${FILESDIR}"/${PV}-cmploc.patch
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ if use emacs; then
+ local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+ [[ -n ${ETAGS} ]] || die "No etags implementation found"
+ pushd build || die
+ emake ETAGS=${ETAGS} TAGS || die
+ popd
+ else
+ touch build/TAGS
+ fi
+
+ #parallel fails
+ emake -j1 || die "Compilation failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd
+}
diff --git a/dev-lisp/ecls/ecls-12.12.1-r5.ebuild b/dev-lisp/ecls/ecls-12.12.1-r5.ebuild
new file mode 100644
index 000000000000..b40cc6aaa52e
--- /dev/null
+++ b/dev-lisp/ecls/ecls-12.12.1-r5.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib
+
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://ecls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+RESTRICT="mirror"
+
+LICENSE="BSD LGPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug emacs gengc precisegc cpu_flags_x86_sse +threads +unicode X"
+
+CDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]
+ >=dev-lisp/asdf-2.33-r3:="
+DEPEND="${CDEPEND}
+ app-text/texi2html
+ emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup () {
+ if use gengc || use precisegc ; then
+ ewarn "You have enabled the generational garbage collector or"
+ ewarn "the precise collection routines. These features are not very stable"
+ ewarn "at the moment and may cause crashes."
+ ewarn "Don't enable them unless you know what you're doing."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+ epatch "${FILESDIR}"/${PV}-asdf.patch
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble \
+ --with-dffi \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_with cpu_flags_x86_sse sse) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ if use emacs; then
+ local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+ [[ -n ${ETAGS} ]] || die "No etags implementation found"
+ pushd build > /dev/null || die
+ emake ETAGS=${ETAGS} TAGS
+ popd > /dev/null
+ else
+ touch build/TAGS
+ fi
+
+ #parallel make fails
+ emake -j1 || die "Compilation failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd
+}
diff --git a/dev-lisp/ecls/ecls-12.12.1.ebuild b/dev-lisp/ecls/ecls-12.12.1.ebuild
new file mode 100644
index 000000000000..ddf9460cd8f4
--- /dev/null
+++ b/dev-lisp/ecls/ecls-12.12.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://ecls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug emacs gengc precisegc threads +unicode X"
+
+RDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]"
+DEPEND="${RDEPEND}
+ app-text/texi2html
+ emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
+PDEPEND="dev-lisp/gentoo-init"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup() {
+ if use gengc || use precisegc; then
+ ewarn "USE flags gengc and precisegc are experimental"
+ ewarn "Don't use them if you want a stable ecl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ if use emacs; then
+ local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+ [[ -n ${ETAGS} ]] || die "No etags implementation found"
+ pushd build > /dev/null || die
+ emake ETAGS=${ETAGS} TAGS
+ popd > /dev/null
+ else
+ touch build/TAGS
+ fi
+
+ #parallel fails
+ emake -j1
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc > /dev/null
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd > /dev/null
+}
diff --git a/dev-lisp/ecls/ecls-12.2.1.ebuild b/dev-lisp/ecls/ecls-12.2.1.ebuild
new file mode 100644
index 000000000000..8714deebf27a
--- /dev/null
+++ b/dev-lisp/ecls/ecls-12.2.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils multilib
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://common-lisp.net/project/ecl/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug emacs gengc precisegc threads +unicode X"
+
+RDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]"
+DEPEND="${RDEPEND}
+ app-text/texi2html
+ emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
+PDEPEND="dev-lisp/gentoo-init"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup() {
+ if use gengc || use precisegc; then
+ ewarn "USE flags gengc and precisegc are experimental"
+ ewarn "Don't use them if you want a stable ecl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ if use emacs; then
+ local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+ [[ -n ${ETAGS} ]] || die "No etags implementation found"
+ pushd build || die
+ emake ETAGS=${ETAGS} TAGS || die
+ popd
+ else
+ touch build/TAGS
+ fi
+
+ #parallel fails
+ emake -j1 || die "Compilation failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd
+}
diff --git a/dev-lisp/ecls/ecls-12.7.1.ebuild b/dev-lisp/ecls/ecls-12.7.1.ebuild
new file mode 100644
index 000000000000..488ea43c023a
--- /dev/null
+++ b/dev-lisp/ecls/ecls-12.7.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://ecls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug emacs gengc precisegc threads +unicode X"
+
+RDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]"
+DEPEND="${RDEPEND}
+ app-text/texi2html
+ emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
+PDEPEND="dev-lisp/gentoo-init"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup() {
+ if use gengc || use precisegc; then
+ ewarn "USE flags gengc and precisegc are experimental"
+ ewarn "Don't use them if you want a stable ecl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ if use emacs; then
+ local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+ [[ -n ${ETAGS} ]] || die "No etags implementation found"
+ pushd build > /dev/null || die
+ emake ETAGS=${ETAGS} TAGS
+ popd > /dev/null
+ else
+ touch build/TAGS
+ fi
+
+ #parallel fails
+ emake -j1
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc > /dev/null
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd > /dev/null
+}
diff --git a/dev-lisp/ecls/ecls-13.5.1-r1.ebuild b/dev-lisp/ecls/ecls-13.5.1-r1.ebuild
new file mode 100644
index 000000000000..a4bf82553220
--- /dev/null
+++ b/dev-lisp/ecls/ecls-13.5.1-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib
+
+# test phase only works if ecls already installed #516876
+RESTRICT="test"
+
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://ecls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0/${PV}"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE="debug emacs gengc precisegc cpu_flags_x86_sse +threads +unicode X"
+
+CDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]
+ >=dev-lisp/asdf-2.33-r3:="
+DEPEND="${CDEPEND}
+ app-text/texi2html
+ emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup () {
+ if use gengc || use precisegc ; then
+ ewarn "You have enabled the generational garbage collector or"
+ ewarn "the precise collection routines. These features are not very stable"
+ ewarn "at the moment and may cause crashes."
+ ewarn "Don't enable them unless you know what you're doing."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+ # bug #496780
+ epatch "${FILESDIR}"/${PV}-gc74.patch
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble \
+ --with-dffi \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_with cpu_flags_x86_sse sse) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ if use emacs; then
+ local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+ [[ -n ${ETAGS} ]] || die "No etags implementation found"
+ pushd build > /dev/null || die
+ emake ETAGS=${ETAGS} TAGS
+ popd > /dev/null
+ else
+ touch build/TAGS
+ fi
+
+ #parallel make fails
+ emake -j1 || die "Compilation failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd
+}
diff --git a/dev-lisp/ecls/ecls-13.5.1.ebuild b/dev-lisp/ecls/ecls-13.5.1.ebuild
new file mode 100644
index 000000000000..dc9f9d99e980
--- /dev/null
+++ b/dev-lisp/ecls/ecls-13.5.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib
+
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://ecls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug emacs gengc precisegc cpu_flags_x86_sse +threads +unicode X"
+
+CDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]
+ >=dev-lisp/asdf-2.33-r3:="
+DEPEND="${CDEPEND}
+ app-text/texi2html
+ emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup () {
+ if use gengc || use precisegc ; then
+ ewarn "You have enabled the generational garbage collector or"
+ ewarn "the precise collection routines. These features are not very stable"
+ ewarn "at the moment and may cause crashes."
+ ewarn "Don't enable them unless you know what you're doing."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble \
+ --with-dffi \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_with cpu_flags_x86_sse sse) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ if use emacs; then
+ local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+ [[ -n ${ETAGS} ]] || die "No etags implementation found"
+ pushd build > /dev/null || die
+ emake ETAGS=${ETAGS} TAGS
+ popd > /dev/null
+ else
+ touch build/TAGS
+ fi
+
+ #parallel make fails
+ emake -j1 || die "Compilation failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd
+}
diff --git a/dev-lisp/ecls/ecls-15.3.7.ebuild b/dev-lisp/ecls/ecls-15.3.7.ebuild
new file mode 100644
index 000000000000..785e8438321d
--- /dev/null
+++ b/dev-lisp/ecls/ecls-15.3.7.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib
+
+# test phase only works if ecls already installed #516876
+RESTRICT="test"
+
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://ecls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug emacs gengc precisegc cpu_flags_x86_sse +threads +unicode +libatomic X"
+
+CDEPEND="dev-libs/gmp:0
+ virtual/libffi
+ libatomic? ( dev-libs/libatomic_ops )
+ >=dev-libs/boehm-gc-7.1[threads?]
+ >=dev-lisp/asdf-2.33-r3:="
+DEPEND="${CDEPEND}
+ app-text/texi2html
+ emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup () {
+ if use gengc || use precisegc ; then
+ ewarn "You have enabled the generational garbage collector or"
+ ewarn "the precise collection routines. These features are not very stable"
+ ewarn "at the moment and may cause crashes."
+ ewarn "Don't enable them unless you know what you're doing."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-longdouble=yes \
+ --with-dffi \
+ $(use_enable gengc) \
+ $(use_enable precisegc) \
+ $(use_with debug debug-cflags) \
+ $(use_enable libatomic libatomic system) \
+ $(use_with cpu_flags_x86_sse sse) \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with unicode unicode-names) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ if use emacs; then
+ local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+ [[ -n ${ETAGS} ]] || die "No etags implementation found"
+ pushd build > /dev/null || die
+ emake ETAGS=${ETAGS} TAGS
+ popd > /dev/null
+ else
+ touch build/TAGS
+ fi
+
+ #parallel make fails
+ emake -j1 || die "Compilation failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ popd
+}
diff --git a/dev-lisp/ecls/ecls-9.12.3.ebuild b/dev-lisp/ecls/ecls-9.12.3.ebuild
new file mode 100644
index 000000000000..68acd4848303
--- /dev/null
+++ b/dev-lisp/ecls/ecls-9.12.3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils multilib
+
+MY_P=ecl-${PV}
+
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="http://common-lisp.net/project/ecl/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE="X doc +threads +unicode"
+
+RDEPEND="dev-libs/gmp
+ virtual/libffi
+ >=dev-libs/boehm-gc-7.1[threads?]"
+DEPEND="${RDEPEND}"
+PDEPEND="dev-lisp/gentoo-init"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
+}
+
+src_configure() {
+ econf \
+ --with-system-gmp \
+ --enable-boehm=system \
+ --enable-gengc \
+ --enable-longdouble \
+ $(use_enable threads) \
+ $(use_with threads __thread) \
+ $(use_enable unicode) \
+ $(use_with X x) \
+ $(use_with X clx)
+}
+
+src_compile() {
+ #parallel fails
+ emake -j1 || die "emake failed"
+ if use doc; then
+ pushd build/doc
+ emake || die "emake doc failed"
+ popd
+ fi
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ANNOUNCEMENT Copyright
+ dodoc "${FILESDIR}"/README.Gentoo
+ pushd build/doc
+ newman ecl.man ecl.1
+ newman ecl-config.man ecl-config.1
+ if use doc; then
+ doinfo *.info || die "doinfo failed"
+ fi
+ popd
+}
diff --git a/dev-lisp/ecls/files/10.4.1-headers-gentoo.patch b/dev-lisp/ecls/files/10.4.1-headers-gentoo.patch
new file mode 100644
index 000000000000..635fc5d4afde
--- /dev/null
+++ b/dev-lisp/ecls/files/10.4.1-headers-gentoo.patch
@@ -0,0 +1,17 @@
+diff -Naur ecl-8.12.0.orig/src/h/object.h ecl-8.12.0/src/h/object.h
+--- ecl.orig/src/h/object.h 2008-12-17 16:41:53.000000000 +0100
++++ ecl/src/h/object.h 2008-12-17 19:35:05.000000000 +0100
+@@ -23,8 +23,13 @@
+ Integer and boolean types (see config.h)
+ */
+
++#ifndef TRUE
+ #define TRUE 1 /* boolean true value */
++#endif
++
++#ifndef FALSE
+ #define FALSE 0 /* boolean false value */
++#endif
+
+ #if !defined(__cplusplus) && !defined(bool)
+ typedef int bool;
diff --git a/dev-lisp/ecls/files/11.1.1-cmploc.patch b/dev-lisp/ecls/files/11.1.1-cmploc.patch
new file mode 100644
index 000000000000..0f15bc6e14e2
--- /dev/null
+++ b/dev-lisp/ecls/files/11.1.1-cmploc.patch
@@ -0,0 +1,35 @@
+diff --git a/src/cmp/cmploc.lsp b/src/cmp/cmploc.lsp
+index ca6a93d..87e6232 100644
+--- src/cmp/cmploc.lsp
++++ src/cmp/cmploc.lsp
+@@ -98,7 +98,7 @@
+ (and (eq (car loc) 'C-INLINE)
+ (eq (sixth loc) 'VALUES)))))
+
+-(defun loc-immediate-value-p (loc &aux head)
++(defun loc-immediate-value-p (loc)
+ (cond ((eq loc t)
+ (values t t))
+ ((eq loc nil)
+@@ -112,9 +112,9 @@
+ (values t value))))
+ ((atom loc)
+ (values nil nil))
+-
+- ((member head '(fixnum-value character-value long-float-value
+- double-float-value single-float-value))
++ ((member (first loc)
++ '(fixnum-value character-value long-float-value
++ double-float-value single-float-value))
+ (values t (second loc)))
+ (t
+ (values nil nil))))
+@@ -123,7 +123,7 @@
+ (baboon :format-control "Unknown location found in ~A~%~S"
+ :format-arguments (list where loc)))
+
+-(defun wt-loc (loc &aux fd)
++(defun wt-loc (loc)
+ (cond ((consp loc)
+ (let ((fd (gethash (car loc) *wt-loc-dispatch-table*)))
+ (if fd
diff --git a/dev-lisp/ecls/files/11.1.1-headers-gentoo.patch b/dev-lisp/ecls/files/11.1.1-headers-gentoo.patch
new file mode 100644
index 000000000000..635fc5d4afde
--- /dev/null
+++ b/dev-lisp/ecls/files/11.1.1-headers-gentoo.patch
@@ -0,0 +1,17 @@
+diff -Naur ecl-8.12.0.orig/src/h/object.h ecl-8.12.0/src/h/object.h
+--- ecl.orig/src/h/object.h 2008-12-17 16:41:53.000000000 +0100
++++ ecl/src/h/object.h 2008-12-17 19:35:05.000000000 +0100
+@@ -23,8 +23,13 @@
+ Integer and boolean types (see config.h)
+ */
+
++#ifndef TRUE
+ #define TRUE 1 /* boolean true value */
++#endif
++
++#ifndef FALSE
+ #define FALSE 0 /* boolean false value */
++#endif
+
+ #if !defined(__cplusplus) && !defined(bool)
+ typedef int bool;
diff --git a/dev-lisp/ecls/files/12.12.1-asdf.patch b/dev-lisp/ecls/files/12.12.1-asdf.patch
new file mode 100644
index 000000000000..344555ccfb44
--- /dev/null
+++ b/dev-lisp/ecls/files/12.12.1-asdf.patch
@@ -0,0 +1,12 @@
+--- src/compile.lsp.in.orig 2013-05-23 22:24:01.858778565 +1200
++++ src/compile.lsp.in 2013-05-23 22:24:20.478785499 +1200
+@@ -205,8 +205,7 @@
+ ;;;
+ #+WANTS-ASDF
+ (build-module "asdf"
+- '("ext:asdf;asdf.lisp"
+- "ext:asdf;asdf-bundle.lisp")
++ '("ext:asdf;asdf.lisp")
+ :dir "build:ext;"
+ :prefix "EXT"
+ :builtin #+:BUILTIN-ASDF t #-:BUILTIN-ASDF nil)
diff --git a/dev-lisp/ecls/files/12.12.1-headers-gentoo.patch b/dev-lisp/ecls/files/12.12.1-headers-gentoo.patch
new file mode 100644
index 000000000000..635fc5d4afde
--- /dev/null
+++ b/dev-lisp/ecls/files/12.12.1-headers-gentoo.patch
@@ -0,0 +1,17 @@
+diff -Naur ecl-8.12.0.orig/src/h/object.h ecl-8.12.0/src/h/object.h
+--- ecl.orig/src/h/object.h 2008-12-17 16:41:53.000000000 +0100
++++ ecl/src/h/object.h 2008-12-17 19:35:05.000000000 +0100
+@@ -23,8 +23,13 @@
+ Integer and boolean types (see config.h)
+ */
+
++#ifndef TRUE
+ #define TRUE 1 /* boolean true value */
++#endif
++
++#ifndef FALSE
+ #define FALSE 0 /* boolean false value */
++#endif
+
+ #if !defined(__cplusplus) && !defined(bool)
+ typedef int bool;
diff --git a/dev-lisp/ecls/files/12.2.1-headers-gentoo.patch b/dev-lisp/ecls/files/12.2.1-headers-gentoo.patch
new file mode 100644
index 000000000000..635fc5d4afde
--- /dev/null
+++ b/dev-lisp/ecls/files/12.2.1-headers-gentoo.patch
@@ -0,0 +1,17 @@
+diff -Naur ecl-8.12.0.orig/src/h/object.h ecl-8.12.0/src/h/object.h
+--- ecl.orig/src/h/object.h 2008-12-17 16:41:53.000000000 +0100
++++ ecl/src/h/object.h 2008-12-17 19:35:05.000000000 +0100
+@@ -23,8 +23,13 @@
+ Integer and boolean types (see config.h)
+ */
+
++#ifndef TRUE
+ #define TRUE 1 /* boolean true value */
++#endif
++
++#ifndef FALSE
+ #define FALSE 0 /* boolean false value */
++#endif
+
+ #if !defined(__cplusplus) && !defined(bool)
+ typedef int bool;
diff --git a/dev-lisp/ecls/files/12.7.1-headers-gentoo.patch b/dev-lisp/ecls/files/12.7.1-headers-gentoo.patch
new file mode 100644
index 000000000000..635fc5d4afde
--- /dev/null
+++ b/dev-lisp/ecls/files/12.7.1-headers-gentoo.patch
@@ -0,0 +1,17 @@
+diff -Naur ecl-8.12.0.orig/src/h/object.h ecl-8.12.0/src/h/object.h
+--- ecl.orig/src/h/object.h 2008-12-17 16:41:53.000000000 +0100
++++ ecl/src/h/object.h 2008-12-17 19:35:05.000000000 +0100
+@@ -23,8 +23,13 @@
+ Integer and boolean types (see config.h)
+ */
+
++#ifndef TRUE
+ #define TRUE 1 /* boolean true value */
++#endif
++
++#ifndef FALSE
+ #define FALSE 0 /* boolean false value */
++#endif
+
+ #if !defined(__cplusplus) && !defined(bool)
+ typedef int bool;
diff --git a/dev-lisp/ecls/files/13.5.1-gc74.patch b/dev-lisp/ecls/files/13.5.1-gc74.patch
new file mode 100644
index 000000000000..a1069b214b4b
--- /dev/null
+++ b/dev-lisp/ecls/files/13.5.1-gc74.patch
@@ -0,0 +1,57 @@
+diff -r -U1 ecl-13.5.1.orig/src/aclocal.m4 ecl-13.5.1/src/aclocal.m4
+--- ecl-13.5.1.orig/src/aclocal.m4 2013-05-28 03:37:36.000000000 +0700
++++ ecl-13.5.1/src/aclocal.m4 2014-01-12 00:34:36.663129950 +0700
+@@ -942,2 +942,6 @@
+ fi
++ if test "${system_boehm}" = "yes"; then
++ AC_CHECK_LIB( [gc], [GC_set_start_callback],
++ [AC_DEFINE(HAVE_GC_SET_START_CALLBACK)], [] )
++ fi
+ AC_MSG_CHECKING( [whether we can use the existing Boehm-Weiser library] )
+diff -r -U1 ecl-13.5.1.orig/src/c/alloc_2.d ecl-13.5.1/src/c/alloc_2.d
+--- ecl-13.5.1.orig/src/c/alloc_2.d 2013-05-28 03:37:36.000000000 +0700
++++ ecl-13.5.1/src/c/alloc_2.d 2014-01-12 00:43:44.177106924 +0700
+@@ -33,2 +33,9 @@
+
++static void (*GC_old_start_callback)(void) = NULL;
++#ifdef HAVE_GC_START_CALLBACK
++extern void GC_set_start_callback(void *);
++extern void *GC_get_start_callback(void *);
++#else
++extern void *GC_start_call_back(void);
++#endif
+ static void gather_statistics();
+@@ -752,3 +759,2 @@
+ extern void (*GC_push_other_roots)();
+-extern void (*GC_start_call_back)();
+ static void (*old_GC_push_other_roots)();
+@@ -1092,3 +1098,9 @@
+ GC_push_other_roots = stacks_scanner;
++#ifdef HAVE_GC_SET_START_CALLBACK
++ GC_old_start_callback = GC_get_start_callback();
++ GC_set_start_callback(gather_statistics);
++#else
++ GC_old_start_callback = GC_start_call_back;
+ GC_start_call_back = (void (*)())gather_statistics;
++#endif
+ GC_java_finalization = 1;
+@@ -1200,3 +1212,3 @@
+ */
+-#if 1 /*GBC_BOEHM == 0*/
++#if GBC_BOEHM == 0
+ extern int GC_print_stats;
+@@ -1279,2 +1291,4 @@
+ }
++ if (GC_old_start_callback)
++ GC_old_start_callback();
+ }
+Только в ecl-13.5.1/src/c: alloc_2.d.orig
+diff -r -U1 ecl-13.5.1.orig/src/h/config.h.in ecl-13.5.1/src/h/config.h.in
+--- ecl-13.5.1.orig/src/h/config.h.in 2013-05-28 03:37:36.000000000 +0700
++++ ecl-13.5.1/src/h/config.h.in 2014-01-12 00:34:36.663129950 +0700
+@@ -310,2 +310,5 @@
+
++/* GC_set_start_callback */
++#define HAVE_GC_SET_START_CALLBACK
++
+ /*
diff --git a/dev-lisp/ecls/files/13.5.1-headers-gentoo.patch b/dev-lisp/ecls/files/13.5.1-headers-gentoo.patch
new file mode 100644
index 000000000000..958b948bac41
--- /dev/null
+++ b/dev-lisp/ecls/files/13.5.1-headers-gentoo.patch
@@ -0,0 +1,13 @@
+diff -r -U1 ecl-13.5.1.orig/src/h/object.h ecl-13.5.1/src/h/object.h
+--- ecl-13.5.1.orig/src/h/object.h 2013-05-28 03:37:36.000000000 +0700
++++ ecl-13.5.1/src/h/object.h 2013-05-29 19:23:34.000000000 +0700
+@@ -25,4 +25,9 @@
+
++#ifndef TRUE
+ #define TRUE 1 /* boolean true value */
++#endif
++
++#ifndef FALSE
+ #define FALSE 0 /* boolean false value */
++#endif
+
diff --git a/dev-lisp/ecls/files/15.3.7-headers-gentoo.patch b/dev-lisp/ecls/files/15.3.7-headers-gentoo.patch
new file mode 100644
index 000000000000..958b948bac41
--- /dev/null
+++ b/dev-lisp/ecls/files/15.3.7-headers-gentoo.patch
@@ -0,0 +1,13 @@
+diff -r -U1 ecl-13.5.1.orig/src/h/object.h ecl-13.5.1/src/h/object.h
+--- ecl-13.5.1.orig/src/h/object.h 2013-05-28 03:37:36.000000000 +0700
++++ ecl-13.5.1/src/h/object.h 2013-05-29 19:23:34.000000000 +0700
+@@ -25,4 +25,9 @@
+
++#ifndef TRUE
+ #define TRUE 1 /* boolean true value */
++#endif
++
++#ifndef FALSE
+ #define FALSE 0 /* boolean false value */
++#endif
+
diff --git a/dev-lisp/ecls/files/9.12.3-headers-gentoo.patch b/dev-lisp/ecls/files/9.12.3-headers-gentoo.patch
new file mode 100644
index 000000000000..635fc5d4afde
--- /dev/null
+++ b/dev-lisp/ecls/files/9.12.3-headers-gentoo.patch
@@ -0,0 +1,17 @@
+diff -Naur ecl-8.12.0.orig/src/h/object.h ecl-8.12.0/src/h/object.h
+--- ecl.orig/src/h/object.h 2008-12-17 16:41:53.000000000 +0100
++++ ecl/src/h/object.h 2008-12-17 19:35:05.000000000 +0100
+@@ -23,8 +23,13 @@
+ Integer and boolean types (see config.h)
+ */
+
++#ifndef TRUE
+ #define TRUE 1 /* boolean true value */
++#endif
++
++#ifndef FALSE
+ #define FALSE 0 /* boolean false value */
++#endif
+
+ #if !defined(__cplusplus) && !defined(bool)
+ typedef int bool;
diff --git a/dev-lisp/ecls/files/README.Gentoo b/dev-lisp/ecls/files/README.Gentoo
new file mode 100644
index 000000000000..65031ab4021a
--- /dev/null
+++ b/dev-lisp/ecls/files/README.Gentoo
@@ -0,0 +1,15 @@
+-*- outline -*- $Id$
+
+Gentoo GNU/Linux specific notes for ECL
+---------------------------------------
+
+This is the README.Gentoo file from /usr/share/doc/@PF@/ directory.
+
+ * The Gentoo port includes a patch to ECL's installed header file (ech.h) so
+ that TRUE and FALSE are not redefined if they're already included from
+ elsewhere. This makes it easier to use ECL with other software which defines
+ those C preprocesser symbols (eg. glib-2.0).
+
+If you encounter any problems or have suggestions, use http://bugs.gentoo.org.
+Please don't bother the upstream authors unless you are absolutely certain it is
+not Gentoo-related.
diff --git a/dev-lisp/ecls/metadata.xml b/dev-lisp/ecls/metadata.xml
new file mode 100644
index 000000000000..8fafd6521aef
--- /dev/null
+++ b/dev-lisp/ecls/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>common-lisp</herd>
+ <longdescription>
+ECL (Embeddable Common Lisp) is an implementation of the Common Lisp language as
+described in the X3J13 Ansi specification, featuring CLOS (Common Lisp Object
+System), conditions, loops, etc, plus a translator to C, which can produce
+standalone executables.
+</longdescription>
+ <use>
+ <flag name="gengc">Use generational garbage collection (experimental)</flag>
+ <flag name="precisegc">Use type information during garbage collection (experimental)</flag>
+ <flag name="libatomic">Use <pkg>dev-libs/libatomic_ops</pkg> library</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ecls</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lisp/gcl/Manifest b/dev-lisp/gcl/Manifest
new file mode 100644
index 000000000000..35f2d5d2ab78
--- /dev/null
+++ b/dev-lisp/gcl/Manifest
@@ -0,0 +1,6 @@
+DIST gcl-2.6.10-fedora.tar.bz2 695718 SHA256 629da9f8288585d088017140da96de09d82a12ed0cf2f139f4fe9d9b5957ad96 SHA512 3e0ffaec859783443a8941a29302c7a17c9538ef2177d449ad34e24292c174de7bb8760a6d327e08f012773032f0d0a5230b79c7e4b4f5bad8354bf10a28af4c WHIRLPOOL 35dd9239ac27f99b98e8b1eb822f39e18b0ea1edcb991ff7b1b441408475148ac684a96ae2df6ea83e979297269c10520fdbdbf4f5b4377a26e7b071d6c26fd1
+DIST gcl-2.6.10.tar.gz 5490689 SHA256 79a1fb2f92b5e86f24988448db3e34116ab6ef7c93ad839848edd01ad06651ef SHA512 bbaacce712f15130550bcdf7e53edf4df9ab955e84ec701087034115df1c1e657d956853d5db85d7e88709981f9b7fd4c9df7acf6c8588a8ccf5f05e4e666aed WHIRLPOOL 8253507a02bd3adcf313e359fb346b19a2cc207c5a137b461addc117f00516cdd6ca28e0a7b5c0f3a48b72ba8f0bf2a3d6098297875db3281c0ef53ece474dfa
+DIST gcl-2.6.11-fedora.tar.bz2 680715 SHA256 cda649cf9049838bb8c69a02ab867b71c4944dad73c8cd5ca873e72c5efd2421 SHA512 a38e92571c0558aebe1f36613afb6da29338b9c1b779df2db6b6e5ad5b79758523a2036dc4d29d192a19a1a71103c42022f165e1a138e469338afcc117599eb9 WHIRLPOOL 01437336dfa1d92517a5de46cf6948e040b6b0a8eca309241e7f061cf62417ae26d4e8fa783b3eae56436187c3dab39463fbec968a543e53bff310e6b70c2213
+DIST gcl-2.6.11.tar.gz 7047082 SHA256 44058f029a631e8ebae38c6c5a25e2f986b5bfdd8e6283b32d7e56723efafb9c SHA512 0cec0e0e138ec13bccd5e52b2f803ccc6be5afc3c284c26550abb4392488fd8cf0085d5c3a99d9a6aba24dc2f7160341c98741003d8d09728e99da1cd909b325 WHIRLPOOL 610c8fb062381f66badc5e1982b502b891467041c21d695c228f1ff028e5570f96fd57cf620f92466bce3369263a493b8e3bf855cd76d389a6a617f65f6e4e59
+DIST gcl-2.6.12-fedora.tar.bz2 680471 SHA256 81108db301666552c2172a21b9b2f6e0d0c0594e79f8c2b0bf05d72152e6e53c SHA512 7640f8370754c889e2db9d047c4476195f949f4d97eafc7ef81761c1a548e24125d6d93381227b55f1840c3d127770995e88bf66f83c6952e121f5fa004e7f1a WHIRLPOOL bdaa561d275b3cc966f891653e61aa35a971b3de572bf7f9864cf4af0deda6d713f91f883cc445976c02e2fce0dd849c013d275a409082bedd82a8fc796833e1
+DIST gcl-2.6.12.tar.gz 7031837 SHA256 8eb8491bccafc49683599e92a30ba36db0825dd4bb138a104cb662b9b0d090e8 SHA512 e82b5bdded6f846de4ea35a83bc8294043ba6d4fe03ff421f8753e78add1e5e87124782f672cd38ad89bbec1ca7c5ff69fe2621be1552b209516b58b6c97fd20 WHIRLPOOL 30ef1bb4593ce2542352dd312bbe5427fb0ddabcc9734998976bcd556971c727275d7ebb1774d06f7ffb46da058a06b971b159cc431b763ae1a4ee9d38bc0a45
diff --git a/dev-lisp/gcl/files/64gcl-gentoo.el b/dev-lisp/gcl/files/64gcl-gentoo.el
new file mode 100644
index 000000000000..7b7cee00bac8
--- /dev/null
+++ b/dev-lisp/gcl/files/64gcl-gentoo.el
@@ -0,0 +1,5 @@
+;; site-init for dev-lisp/gcl
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'run "gcl" "Run GCL." t)
+(autoload 'gcl-mode "gcl" "GCL mode." t)
+(autoload 'dbl "dbl" "GCL debugger." t)
diff --git a/dev-lisp/gcl/files/bootstrap-gcl b/dev-lisp/gcl/files/bootstrap-gcl
new file mode 100644
index 000000000000..cf964c4b5bea
--- /dev/null
+++ b/dev-lisp/gcl/files/bootstrap-gcl
@@ -0,0 +1,7 @@
+(compiler::emit-fn t)
+(compiler::link nil "bootstrapped_ansi_gcl"
+ (format nil "(progn (let ((*load-path* (cons ~S *load-path*))
+ (si::*load-types* ~S)) (compiler::emit-fn t)) (when (fboundp (quote
+ si::sgc-on)) (si::sgc-on t)) (setq compiler::*default-system-p* t))"
+ si::*system-directory* (quote (list ".lsp")))
+ "-lutil")
diff --git a/dev-lisp/gcl/files/gcl-gmp-6.patch b/dev-lisp/gcl/files/gcl-gmp-6.patch
new file mode 100644
index 000000000000..f66638478af1
--- /dev/null
+++ b/dev-lisp/gcl/files/gcl-gmp-6.patch
@@ -0,0 +1,8 @@
+diff -r -U1 gcl.orig/configure gcl/configure
+--- gcl.orig/configure 2013-11-11 21:55:48.000000000 +0700
++++ gcl/configure 2014-03-30 17:25:04.874994142 +0700
+@@ -5027,3 +5027,3 @@
+ int main() {
+- #if __GNU_MP_VERSION == 4 || __GNU_MP_VERSION == 5
++ #if __GNU_MP_VERSION == 4 || __GNU_MP_VERSION == 5 || __GNU_MP_VERSION == 6
+ return 0;
diff --git a/dev-lisp/gcl/files/gcl-readline-6.3.patch b/dev-lisp/gcl/files/gcl-readline-6.3.patch
new file mode 100644
index 000000000000..063c772f1051
--- /dev/null
+++ b/dev-lisp/gcl/files/gcl-readline-6.3.patch
@@ -0,0 +1,18 @@
+diff -r -U1 gcl.orig/o/gcl_readline.d gcl/o/gcl_readline.d
+--- gcl.orig/o/gcl_readline.d 2013-11-11 21:55:48.000000000 +0700
++++ gcl/o/gcl_readline.d 2014-03-30 18:29:42.131967005 +0700
+@@ -53,2 +53,9 @@
+
++/* Deprecated CPPFunction disappeared in libreadline-6.3 */
++#if defined(_RL_FUNCTION_TYPEDEF)
++#define RL_COMPLETION_FUNC_T rl_completion_func_t
++#else
++#define RL_COMPLETION_FUNC_T CPPFunction
++#endif
++
+ int readline_on = 0; /* On (1) or off (0) */
+@@ -471,3 +478,3 @@
+ #ifdef RL_COMPLETION
+- rl_attempted_completion_function = (CPPFunction *)rl_completion;
++ rl_attempted_completion_function = (RL_COMPLETION_FUNC_T *)rl_completion;
+ #endif
diff --git a/dev-lisp/gcl/files/gcl-tcl-8.6.patch b/dev-lisp/gcl/files/gcl-tcl-8.6.patch
new file mode 100644
index 000000000000..cfbf82e32899
--- /dev/null
+++ b/dev-lisp/gcl/files/gcl-tcl-8.6.patch
@@ -0,0 +1,103 @@
+diff --git a/gcl/gcl-tk/tkMain.c b/gcl/gcl-tk/tkMain.c
+index 74475cc..21c6c59 100755
+--- a/gcl/gcl-tk/tkMain.c
++++ b/gcl/gcl-tk/tkMain.c
+@@ -42,6 +42,11 @@
+ #if (TK_MINOR_VERSION==0 && TK_MAJOR_VERSION==4)
+ #define TkCreateMainWindow Tk_CreateMainWindow
+ #endif
++#if TCL_MAJOR_VERSION >= 8
++#define INTERP_RESULT(interp) Tcl_GetStringResult(interp)
++#else
++#define INTERP_RESULT(interp) (interp)->result
++#endif
+
+
+ /*-------------------------------------------------------------------*/
+@@ -276,7 +281,7 @@ TkX_Wish (argc, argv)
+
+ if (Tk_ParseArgv(interp, (Tk_Window) NULL, &argc, (void *)argv, argTable, 0)
+ != TCL_OK) {
+- fprintf(stderr, "%s\n", interp->result);
++ fprintf(stderr, "%s\n", INTERP_RESULT(interp));
+ exit(1);
+ }
+ if (name == NULL) {
+@@ -309,7 +314,7 @@ TkX_Wish (argc, argv)
+
+ /* mainWindow = TkCreateMainWindow(interp, display, name/\* , "Tk" *\/); */
+ /* if (mainWindow == NULL) { */
+-/* fprintf(stderr, "%s\n", interp->result); */
++/* fprintf(stderr, "%s\n", INTERP_RESULT(interp)); */
+ /* exit(1); */
+ /* } */
+ /* #ifndef __MINGW32__ */
+@@ -362,7 +367,7 @@ TkX_Wish (argc, argv)
+ Tcl_FindExecutable ( argv[0] );
+ #else
+ if (Tcl_AppInit(interp) != TCL_OK) {
+- fprintf(stderr, "Tcl_AppInit failed: %s\n", interp->result);
++ fprintf(stderr, "Tcl_AppInit failed: %s\n", INTERP_RESULT(interp));
+ }
+ #endif
+ /*
+@@ -372,7 +377,7 @@ TkX_Wish (argc, argv)
+ if (geometry != NULL) {
+ code = Tcl_VarEval(interp, "wm geometry . ", geometry, (char *) NULL);
+ if (code != TCL_OK) {
+- fprintf(stderr, "%s\n", interp->result);
++ fprintf(stderr, "%s\n", INTERP_RESULT(interp));
+ }
+ }
+
+@@ -402,13 +407,13 @@ TkX_Wish (argc, argv)
+
+ fullName = Tcl_TildeSubst(interp, tcl_RcFileName, &buffer);
+ if (fullName == NULL) {
+- fprintf(stderr, "%s\n", interp->result);
++ fprintf(stderr, "%s\n", INTERP_RESULT(interp));
+ } else {
+ f = fopen(fullName, "r");
+ if (f != NULL) {
+ code = Tcl_EvalFile(interp, fullName);
+ if (code != TCL_OK) {
+- fprintf(stderr, "%s\n", interp->result);
++ fprintf(stderr, "%s\n", INTERP_RESULT(interp));
+ }
+ fclose(f);
+ }
+@@ -443,7 +448,7 @@ TkX_Wish (argc, argv)
+ error:
+ msg = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
+ if (msg == NULL) {
+- msg = interp->result;
++ msg = INTERP_RESULT(interp);
+ }
+ dfprintf(stderr, "%s\n", msg);
+ Tcl_Eval(interp, errorExitCmd);
+@@ -566,13 +571,13 @@ StdinProc(clientData, mask)
+ || code)
+ {
+ char buf[4];
+- char *p = buf;
++ char *p = buf, *string;
+ /*header */
+ *p++ = (code ? '1' : '0');
+ bcopy(msg->msg_id,p,3);
+ /* end header */
+- if(sock_write_str2(dsfd, m_reply, buf, 4 ,
+- interp->result, strlen(interp->result))
++ string = INTERP_RESULT(interp);
++ if(sock_write_str2(dsfd, m_reply, buf, 4, string, strlen(string))
+ < 0)
+ { /* what do we want to do if the write failed */}
+
+@@ -752,7 +757,7 @@ guiBindCallback(char *szNameCmdProc, char *szTclObject, char *szModifier,char* a
+ code = Tcl_Eval(interp, szCmd);
+ if (code != TCL_OK)
+ {
+- dfprintf(stderr, "TCL Error int bind : %s\n", interp->result);
++ dfprintf(stderr, "TCL Error int bind : %s\n", INTERP_RESULT(interp));
+
+ }
+ return code;
diff --git a/dev-lisp/gcl/gcl-2.6.10.ebuild b/dev-lisp/gcl/gcl-2.6.10.ebuild
new file mode 100644
index 000000000000..f8bd0d4a68f0
--- /dev/null
+++ b/dev-lisp/gcl/gcl-2.6.10.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit elisp-common eutils flag-o-matic
+
+DESCRIPTION="GNU Common Lisp"
+HOMEPAGE="http://www.gnu.org/software/gcl/gcl.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz http://dev.gentoo.org/~grozin/${P}-fedora.tar.bz2"
+
+LICENSE="LGPL-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="+ansi athena emacs +readline tk X"
+
+# See bug #205803
+RESTRICT="strip"
+
+RDEPEND="emacs? ( virtual/emacs )
+ readline? ( sys-libs/readline )
+ athena? ( x11-libs/libXaw )
+ >=dev-libs/gmp-4.1
+ tk? ( dev-lang/tk )
+ X? ( x11-libs/libXt x11-libs/libXext x11-libs/libXmu x11-libs/libXaw )
+ virtual/latex-base"
+DEPEND="${RDEPEND}
+ virtual/texi2dvi
+ >=app-text/texi2html-1.64
+ >=sys-devel/autoconf-2.52"
+
+S="${WORKDIR}"/${PN}
+
+src_prepare() {
+ mv "${WORKDIR}"/fedora/info/* info/
+ cp -p /usr/share/texmf-dist/tex/texinfo/texinfo.tex info/
+ find . -type f -perm /0111 | xargs chmod a-x
+ chmod a+x add-defs add-defs1 config.guess config.sub configure install.sh
+ chmod a+x bin/info bin/info1 gcl-tk/gcltksrv.in gcl-tk/ngcltksrv mp/gcclab
+ chmod a+x o/egrep-def utils/replace xbin/*
+
+ # fedora patches
+ epatch "${WORKDIR}"/fedora/fd-leak.patch
+ epatch "${WORKDIR}"/fedora/latex.patch
+ epatch "${WORKDIR}"/fedora/texinfo.patch
+ epatch "${WORKDIR}"/fedora/elisp.patch
+ epatch "${WORKDIR}"/fedora/rename.patch
+ epatch "${WORKDIR}"/fedora/getcwd.patch
+ epatch "${WORKDIR}"/fedora/infrastructure.patch
+ epatch "${WORKDIR}"/fedora/extension.patch
+ epatch "${WORKDIR}"/fedora/unrandomize.patch
+ epatch "${WORKDIR}"/fedora/asm-signal-h.patch
+ epatch "${WORKDIR}"/fedora/plt.patch
+ epatch "${WORKDIR}"/fedora/ellipsis.patch
+ epatch "${WORKDIR}"/fedora/man.patch
+ epatch "${WORKDIR}"/fedora/reloc-type.patch
+ epatch "${WORKDIR}"/fedora/largefile.patch
+
+ epatch "${FILESDIR}"/${PN}-tcl-8.6.patch
+ epatch "${FILESDIR}"/${PN}-gmp-6.patch
+ epatch "${FILESDIR}"/${PN}-readline-6.3.patch
+
+ sed -e 's|"-fomit-frame-pointer"|""|' -i configure
+ sed -e 's|@EXT@||g' debian/in.gcl.1 > gcl.1
+}
+
+src_configure() {
+ strip-flags
+ filter-flags -fstack-protector -fstack-protector-all
+
+ local tcl=""
+ if use tk; then
+ tcl="--enable-tclconfig=/usr/lib --enable-tkconfig=/usr/lib"
+ fi
+
+ econf --enable-dynsysgmp \
+ --disable-xdr \
+ --enable-emacsdir=/usr/share/emacs/site-lisp/gcl \
+ --enable-infodir=/usr/share/info \
+ $(use_enable readline) \
+ $(use_enable ansi) \
+ $(use_enable athena xgcl) \
+ $(use_with X x) \
+ ${tcl}
+}
+
+src_compile() {
+ emake -j1
+ emake -C info gcl.info
+ if use athena; then
+ pushd xgcl-2 > /dev/null
+ pdflatex dwdoc.tex
+ popd > /dev/null
+ fi
+}
+
+src_test() {
+ local make_ansi_tests_clean="rm -f test.out *.fasl *.o *.so *~ *.fn *.x86f *.fasl *.ufsl"
+ if use ansi; then
+ cd ansi-tests
+
+ ( make clean && make test-unixport ) \
+ || die "make ansi-tests failed!"
+
+ cat "${FILESDIR}/bootstrap-gcl" \
+ | ../unixport/saved_ansi_gcl
+
+ cat "${FILESDIR}/bootstrap-gcl" \
+ |sed s/bootstrapped_ansi_gcl/bootstrapped_r_ansi_gcl/g \
+ | ./bootstrapped_ansi_gcl
+
+ ( ${make_ansi_tests_clean} && \
+ echo "(load \"gclload.lsp\")" \
+ | ./bootstrapped_r_ansi_gcl ) \
+ || die "Phase 2, bootstraped compiler failed in tests"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ mv "${D}"usr/share/doc/*.dvi .
+ rm -rf "${D}"usr/share/doc
+ rm -rf "${D}"usr/share/emacs
+ rm -rf "${D}"usr/lib/gcl-*/info
+
+ rm doc/makefile elisp/add-defaults.el
+ dodoc readme* RELEASE* ChangeLog* doc/*
+ doman gcl.1
+ doinfo info/*.info*
+ dohtml -r info/gcl-si info/gcl-tk
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
+ elisp-install ${PN} elisp/*.el
+ fi
+
+ insinto /usr/share/doc/${PF}
+ doins *.dvi
+ if use athena; then
+ pushd xgcl-2 > /dev/null
+ insinto /usr/share/doc/${PF}
+ doins *.pdf
+ popd > /dev/null
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lisp/gcl/gcl-2.6.11.ebuild b/dev-lisp/gcl/gcl-2.6.11.ebuild
new file mode 100644
index 000000000000..fc6ba096d84b
--- /dev/null
+++ b/dev-lisp/gcl/gcl-2.6.11.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit elisp-common eutils flag-o-matic
+
+DESCRIPTION="GNU Common Lisp"
+HOMEPAGE="http://www.gnu.org/software/gcl/gcl.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz http://dev.gentoo.org/~grozin/${P}-fedora.tar.bz2"
+
+LICENSE="LGPL-2 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+ansi athena emacs +readline tk X"
+
+# See bug #205803
+RESTRICT="strip"
+
+RDEPEND="emacs? ( virtual/emacs )
+ readline? ( sys-libs/readline )
+ athena? ( x11-libs/libXaw )
+ >=dev-libs/gmp-4.1
+ tk? ( dev-lang/tk )
+ X? ( x11-libs/libXt x11-libs/libXext x11-libs/libXmu x11-libs/libXaw )
+ virtual/latex-base"
+DEPEND="${RDEPEND}
+ virtual/texi2dvi
+ >=app-text/texi2html-1.64
+ >=sys-devel/autoconf-2.52"
+
+S="${WORKDIR}"/${PN}
+
+src_prepare() {
+ mv "${WORKDIR}"/fedora/info/* info/
+ cp -p /usr/share/texmf-dist/tex/texinfo/texinfo.tex info/
+ find . -type f -perm /0111 | xargs chmod a-x
+ chmod a+x add-defs add-defs1 config.guess config.sub configure install.sh
+ chmod a+x bin/info bin/info1 gcl-tk/gcltksrv.in gcl-tk/ngcltksrv mp/gcclab
+ chmod a+x o/egrep-def utils/replace xbin/*
+
+ # fedora patches
+ epatch "${WORKDIR}"/fedora/fd-leak.patch
+ epatch "${WORKDIR}"/fedora/latex.patch
+ epatch "${WORKDIR}"/fedora/texinfo.patch
+ epatch "${WORKDIR}"/fedora/elisp.patch
+ epatch "${WORKDIR}"/fedora/selinux.patch
+ epatch "${WORKDIR}"/fedora/rename.patch
+ epatch "${WORKDIR}"/fedora/getcwd.patch
+ epatch "${WORKDIR}"/fedora/plt.patch
+ epatch "${WORKDIR}"/fedora/ellipsis.patch
+ epatch "${WORKDIR}"/fedora/reloc-type.patch
+ epatch "${WORKDIR}"/fedora/infrastructure.patch
+ epatch "${WORKDIR}"/fedora/extension.patch
+ epatch "${WORKDIR}"/fedora/unrandomize.patch
+ epatch "${WORKDIR}"/fedora/asm-signal-h.patch
+ epatch "${WORKDIR}"/fedora/largefile.patch
+ epatch "${WORKDIR}"/fedora/arm.patch
+
+ sed -e 's|"-fomit-frame-pointer"|""|' -i configure
+ sed -e 's|@EXT@||g' debian/in.gcl.1 > gcl.1
+}
+
+src_configure() {
+ strip-flags
+ filter-flags -fstack-protector -fstack-protector-all
+
+ local tcl=""
+ if use tk; then
+ tcl="--enable-tclconfig=/usr/lib --enable-tkconfig=/usr/lib"
+ fi
+
+ econf --enable-dynsysgmp \
+ --disable-xdr \
+ --enable-emacsdir=/usr/share/emacs/site-lisp/gcl \
+ --enable-infodir=/usr/share/info \
+ $(use_enable readline) \
+ $(use_enable ansi) \
+ $(use_enable athena xgcl) \
+ $(use_with X x) \
+ ${tcl}
+}
+
+src_compile() {
+ emake -j1
+ emake -C info gcl.info
+ if use athena; then
+ pushd xgcl-2 > /dev/null
+ pdflatex dwdoc.tex
+ popd > /dev/null
+ fi
+}
+
+src_test() {
+ local make_ansi_tests_clean="rm -f test.out *.fasl *.o *.so *~ *.fn *.x86f *.fasl *.ufsl"
+ if use ansi; then
+ cd ansi-tests
+
+ ( make clean && make test-unixport ) \
+ || die "make ansi-tests failed!"
+
+ cat "${FILESDIR}/bootstrap-gcl" \
+ | ../unixport/saved_ansi_gcl
+
+ cat "${FILESDIR}/bootstrap-gcl" \
+ |sed s/bootstrapped_ansi_gcl/bootstrapped_r_ansi_gcl/g \
+ | ./bootstrapped_ansi_gcl
+
+ ( ${make_ansi_tests_clean} && \
+ echo "(load \"gclload.lsp\")" \
+ | ./bootstrapped_r_ansi_gcl ) \
+ || die "Phase 2, bootstraped compiler failed in tests"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -rf "${D}"usr/share/doc
+ rm -rf "${D}"usr/share/emacs
+
+ rm elisp/add-defaults.el
+ dodoc readme* RELEASE* ChangeLog* doc/*
+ doman gcl.1
+ doinfo info/*.info*
+ dohtml -r info/gcl-si info/gcl-tk
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
+ elisp-install ${PN} elisp/*.el
+ fi
+
+ insinto /usr/share/doc/${PF}
+ doins info/*.pdf
+ if use athena; then
+ pushd xgcl-2 > /dev/null
+ insinto /usr/share/doc/${PF}
+ doins *.pdf
+ popd > /dev/null
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lisp/gcl/gcl-2.6.12.ebuild b/dev-lisp/gcl/gcl-2.6.12.ebuild
new file mode 100644
index 000000000000..2420fd3a8ac5
--- /dev/null
+++ b/dev-lisp/gcl/gcl-2.6.12.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit elisp-common eutils flag-o-matic
+
+DESCRIPTION="GNU Common Lisp"
+HOMEPAGE="http://www.gnu.org/software/gcl/gcl.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz http://dev.gentoo.org/~grozin/${P}-fedora.tar.bz2"
+
+LICENSE="LGPL-2 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+ansi athena emacs +readline tk X"
+
+# See bug #205803
+RESTRICT="strip"
+
+RDEPEND="emacs? ( virtual/emacs )
+ readline? ( sys-libs/readline )
+ athena? ( x11-libs/libXaw )
+ >=dev-libs/gmp-4.1
+ tk? ( dev-lang/tk )
+ X? ( x11-libs/libXt x11-libs/libXext x11-libs/libXmu x11-libs/libXaw )
+ virtual/latex-base"
+DEPEND="${RDEPEND}
+ virtual/texi2dvi
+ >=app-text/texi2html-1.64
+ >=sys-devel/autoconf-2.52"
+
+S="${WORKDIR}"/${PN}
+
+src_prepare() {
+ mv "${WORKDIR}"/fedora/info/* info/
+ cp -p /usr/share/texmf-dist/tex/texinfo/texinfo.tex info/
+ find . -type f -perm /0111 | xargs chmod a-x
+ chmod a+x add-defs add-defs1 config.guess config.sub configure install.sh
+ chmod a+x bin/info bin/info1 gcl-tk/gcltksrv.in gcl-tk/ngcltksrv mp/gcclab
+ chmod a+x o/egrep-def utils/replace xbin/*
+
+ # fedora patches
+ epatch "${WORKDIR}"/fedora/fd-leak.patch
+ epatch "${WORKDIR}"/fedora/latex.patch
+ epatch "${WORKDIR}"/fedora/texinfo.patch
+ epatch "${WORKDIR}"/fedora/elisp.patch
+ epatch "${WORKDIR}"/fedora/selinux.patch
+ epatch "${WORKDIR}"/fedora/rename.patch
+ epatch "${WORKDIR}"/fedora/getcwd.patch
+ epatch "${WORKDIR}"/fedora/plt.patch
+ epatch "${WORKDIR}"/fedora/ellipsis.patch
+ epatch "${WORKDIR}"/fedora/infrastructure.patch
+ epatch "${WORKDIR}"/fedora/extension.patch
+ epatch "${WORKDIR}"/fedora/unrandomize.patch
+ epatch "${WORKDIR}"/fedora/asm-signal-h.patch
+ epatch "${WORKDIR}"/fedora/largefile.patch
+ epatch "${WORKDIR}"/fedora/arm.patch
+
+ sed -e 's|"-fomit-frame-pointer"|""|' -i configure
+}
+
+src_configure() {
+ strip-flags
+ filter-flags -fstack-protector -fstack-protector-all
+
+ local tcl=""
+ if use tk; then
+ tcl="--enable-tclconfig=/usr/lib --enable-tkconfig=/usr/lib"
+ fi
+
+ econf --enable-dynsysgmp \
+ --disable-xdr \
+ --enable-emacsdir=/usr/share/emacs/site-lisp/gcl \
+ --enable-infodir=/usr/share/info \
+ $(use_enable readline) \
+ $(use_enable ansi) \
+ $(use_enable athena xgcl) \
+ $(use_with X x) \
+ ${tcl}
+}
+
+src_compile() {
+ emake -j1
+ emake -C info gcl.info
+ if use athena; then
+ pushd xgcl-2 > /dev/null
+ pdflatex dwdoc.tex
+ popd > /dev/null
+ fi
+}
+
+src_test() {
+ local make_ansi_tests_clean="rm -f test.out *.fasl *.o *.so *~ *.fn *.x86f *.fasl *.ufsl"
+ if use ansi; then
+ cd ansi-tests
+
+ ( make clean && make test-unixport ) \
+ || die "make ansi-tests failed!"
+
+ cat "${FILESDIR}/bootstrap-gcl" \
+ | ../unixport/saved_ansi_gcl
+
+ cat "${FILESDIR}/bootstrap-gcl" \
+ |sed s/bootstrapped_ansi_gcl/bootstrapped_r_ansi_gcl/g \
+ | ./bootstrapped_ansi_gcl
+
+ ( ${make_ansi_tests_clean} && \
+ echo "(load \"gclload.lsp\")" \
+ | ./bootstrapped_r_ansi_gcl ) \
+ || die "Phase 2, bootstraped compiler failed in tests"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -rf "${D}"usr/share/doc
+ rm -rf "${D}"usr/share/emacs
+
+ rm elisp/add-defaults.el
+ dodoc readme* RELEASE* ChangeLog* doc/*
+ doman man/man1/gcl.1
+ doinfo info/*.info*
+ dohtml -r info/gcl-si info/gcl-tk
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
+ elisp-install ${PN} elisp/*.el
+ fi
+
+ insinto /usr/share/doc/${PF}
+ doins info/*.pdf
+ if use athena; then
+ pushd xgcl-2 > /dev/null
+ insinto /usr/share/doc/${PF}
+ doins *.pdf
+ popd > /dev/null
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lisp/gcl/metadata.xml b/dev-lisp/gcl/metadata.xml
new file mode 100644
index 000000000000..3e77021af943
--- /dev/null
+++ b/dev-lisp/gcl/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>common-lisp</herd>
+ <longdescription>
+ GCL is the official Common Lisp for the GNU project. Its design
+ makes use of the system's C compiler to compile to native object
+ code, providing for both good performance and facile portability.
+ </longdescription>
+ <use>
+ <flag name='ansi'>Build a GCL with ANSI support (else build a traditional CLtL1 image)</flag>
+ <flag name='athena'>Build xgcl - an interface to <pkg>x11-libs/libXaw</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lisp/gentoo-init/files/gentoo-init-1.lisp b/dev-lisp/gentoo-init/files/gentoo-init-1.lisp
new file mode 100644
index 000000000000..263aedd10c29
--- /dev/null
+++ b/dev-lisp/gentoo-init/files/gentoo-init-1.lisp
@@ -0,0 +1,11 @@
+(in-package #:cl-user)
+
+(let ((*compile-print* nil)
+ (*compile-verbose* nil)
+ #+cmu (ext:*gc-verbose* nil))
+ (handler-bind ((warning #'muffle-warning))
+ (load #p"/usr/share/common-lisp/source/asdf/asdf.lisp"
+ :print nil :verbose nil)
+ #+ecl
+ (load #p"/usr/share/common-lisp/source/asdf/asdf-ecl.lisp"
+ :print nil :verbose nil)))
diff --git a/dev-lisp/gentoo-init/files/gentoo-init.lisp b/dev-lisp/gentoo-init/files/gentoo-init.lisp
new file mode 100644
index 000000000000..e09dcb0ae43f
--- /dev/null
+++ b/dev-lisp/gentoo-init/files/gentoo-init.lisp
@@ -0,0 +1,7 @@
+(in-package #:cl-user)
+#+(or sbcl ecl) (require :asdf)
+#-(or sbcl ecl) (load #p"/usr/share/common-lisp/source/asdf/asdf.lisp")
+(push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*)
+(asdf:oos 'asdf:load-op :asdf-binary-locations)
+(setf asdf:*centralize-lisp-binaries* t)
+(setf asdf:*source-to-target-mappings* '((#p"/usr/lib/sbcl/" nil) (#p"/usr/lib64/sbcl/" nil)))
diff --git a/dev-lisp/gentoo-init/files/source-registry.conf b/dev-lisp/gentoo-init/files/source-registry.conf
new file mode 100644
index 000000000000..45e1fdfc5aa0
--- /dev/null
+++ b/dev-lisp/gentoo-init/files/source-registry.conf
@@ -0,0 +1,5 @@
+;; -*- Mode: Lisp; -*-
+
+(:source-registry
+ (:directory "/usr/share/common-lisp/systems")
+ :inherit-configuration)
diff --git a/dev-lisp/gentoo-init/gentoo-init-0.1.ebuild b/dev-lisp/gentoo-init/gentoo-init-0.1.ebuild
new file mode 100644
index 000000000000..3513f2199d66
--- /dev/null
+++ b/dev-lisp/gentoo-init/gentoo-init-0.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+DESCRIPTION="Simple ASDF-BINARY-LOCATIONS configuration for Gentoo Common Lisp ports"
+HOMEPAGE="http://www.gentoo.org/proj/en/lisp/common-lisp/guide.xml"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
+IUSE=""
+
+S=${WORKDIR}
+
+DEPEND="dev-lisp/asdf-binary-locations"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ insinto /etc
+ doins "${FILESDIR}"/gentoo-init.lisp
+}
diff --git a/dev-lisp/gentoo-init/gentoo-init-1.0.ebuild b/dev-lisp/gentoo-init/gentoo-init-1.0.ebuild
new file mode 100644
index 000000000000..af00628c15da
--- /dev/null
+++ b/dev-lisp/gentoo-init/gentoo-init-1.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Simple ASDF2 configuration for Gentoo Common Lisp ports"
+HOMEPAGE="http://www.gentoo.org/proj/en/lisp/common-lisp/guide.xml"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE=""
+
+RDEPEND=">=dev-lisp/asdf-2.0"
+
+S="${WORKDIR}"
+
+src_install() {
+ insinto /etc/common-lisp
+ newins "${FILESDIR}"/gentoo-init-1.lisp gentoo-init.lisp
+ doins "${FILESDIR}"/source-registry.conf
+}
diff --git a/dev-lisp/gentoo-init/metadata.xml b/dev-lisp/gentoo-init/metadata.xml
new file mode 100644
index 000000000000..f418045b09c8
--- /dev/null
+++ b/dev-lisp/gentoo-init/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+</pkgmetadata>
diff --git a/dev-lisp/hyperspec/Manifest b/dev-lisp/hyperspec/Manifest
new file mode 100644
index 000000000000..3d91f6795d81
--- /dev/null
+++ b/dev-lisp/hyperspec/Manifest
@@ -0,0 +1 @@
+DIST HyperSpec-7-0.tar.gz 2032830 RMD160 f6908e28635a45e8736293be11dbc1e478631674 SHA1 7c89db8a930b7bd1fd204a458a5dd05d7d46ab81 SHA256 1ac1666a9dc697dbd8881262cad4371bcd2e9843108b643e2ea93472ba85d7c3
diff --git a/dev-lisp/hyperspec/hyperspec-7.0-r1.ebuild b/dev-lisp/hyperspec/hyperspec-7.0-r1.ebuild
new file mode 100644
index 000000000000..b87f5c8dcebf
--- /dev/null
+++ b/dev-lisp/hyperspec/hyperspec-7.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_PV=${PV/./-}
+MY_P=HyperSpec-${MY_PV}
+
+DESCRIPTION="Common Lisp ANSI-standard Hyperspec"
+HOMEPAGE="http://www.lispworks.com/reference/HyperSpec/"
+SRC_URI="ftp://ftp.lispworks.com/pub/software_tools/reference/${MY_P}.tar.gz"
+LICENSE="HyperSpec"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86 ~x86-fbsd"
+IUSE=""
+DEPEND=""
+
+RESTRICT="mirror fetch"
+
+S=${WORKDIR}/
+
+pkg_nofetch() {
+ while read line; do elog "${line}"; done <<EOF
+
+The HyperSpec cannot be redistributed. Download the ${MY_P}.tar.gz
+file from http://www.lispworks.com/documentation/HyperSpec/ and move it to
+/usr/portage/distfiles before rerunning emerge. The legal conditions are
+described at http://www.lispworks.com/reference/HyperSpec/Front/Help.htm#Legal
+
+EOF
+}
+
+src_install() {
+ dodir /usr/share/doc/${P}
+ cp -r HyperSpec* ${D}/usr/share/doc/${P}
+ dosym /usr/share/doc/${P} /usr/share/doc/hyperspec
+}
diff --git a/dev-lisp/hyperspec/hyperspec-7.0.ebuild b/dev-lisp/hyperspec/hyperspec-7.0.ebuild
new file mode 100644
index 000000000000..1102360d763e
--- /dev/null
+++ b/dev-lisp/hyperspec/hyperspec-7.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_PV=${PV/./-}
+
+DESCRIPTION="Common Lisp ANSI-standard Hyperspec"
+HOMEPAGE="http://www.lispworks.com/reference/HyperSpec/"
+SRC_URI=""
+LICENSE="HyperSpec"
+SLOT="0"
+KEYWORDS="x86 amd64 sparc ppc"
+IUSE=""
+DEPEND=""
+
+# URL: ftp://ftp.lispworks.com/pub/software_tools/reference/HyperSpec-7-0.tar.gz
+
+S=${WORKDIR}/
+
+src_unpack() {
+ if [ ! -f ${DISTDIR}/HyperSpec-${MY_PV}.tar.gz ]; then
+ while read line; do elog "${line}"; done <<EOF
+
+The HyperSpec cannot be redistributed. Download the HyperSpec-${PV//./-}.tar.gz
+file from http://www.lispworks.com/documentation/HyperSpec/ and move it to
+/usr/portage/distfiles before rerunning emerge. The legal conditions are
+described at http://www.lispworks.com/reference/HyperSpec/Front/Help.htm#Legal
+
+EOF
+ die
+ else
+ unpack HyperSpec-${MY_PV}.tar.gz
+ fi
+}
+
+src_install() {
+ dodir /usr/share/doc/${P}
+ cp -r HyperSpec* ${D}/usr/share/doc/${P}
+ dosym /usr/share/doc/${P} /usr/share/doc/hyperspec
+}
diff --git a/dev-lisp/hyperspec/metadata.xml b/dev-lisp/hyperspec/metadata.xml
new file mode 100644
index 000000000000..f418045b09c8
--- /dev/null
+++ b/dev-lisp/hyperspec/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+</pkgmetadata>
diff --git a/dev-lisp/metadata.xml b/dev-lisp/metadata.xml
new file mode 100644
index 000000000000..6258c8c7b1b4
--- /dev/null
+++ b/dev-lisp/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The dev-lisp category contains libraries and utilities relevant to the
+ Lisp programming language.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie dev-lisp enthält Bibliotheken und Werkzeuge für die
+ Programmiersprache Lisp.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría dev-lisp contiene librerias y utilidades referentes al
+ lenguaje de programación Lisp.
+ </longdescription>
+ <longdescription lang="ja">
+ dev-lisp カテゴリーにはLispプログラミング言語に関連したライブラリーと
+ ユーティリティが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De dev-lisp categorie bevat bibliotheken en hulpmiddelen voor het gebruik
+ van de programmeertaal Lisp.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm dev-lisp chứa các thư viện và tiện ích liên quan
+ đến ngôn ngữ lập trình Lisp.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria dev-lisp contiene librerie ed utilità per il linguaggio di programmazione Lisp.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria dev-lisp contém bibliotecas e utilitários referentes
+ à linguagem de programação Lisp.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria dev-lisp zawiera biblioteki i narzędzia związane z
+ językiem programowania Lisp.
+ </longdescription>
+</catmetadata>
+
diff --git a/dev-lisp/sbcl/Manifest b/dev-lisp/sbcl/Manifest
new file mode 100644
index 000000000000..acf62ba419f0
--- /dev/null
+++ b/dev-lisp/sbcl/Manifest
@@ -0,0 +1,34 @@
+DIST sbcl-1.0.23-sparc-solaris-binary.tar.bz2 34342 SHA256 13c2b44c82334d51d00f63b51a9966d073337cd806b5cff34e829063463793da SHA512 5aeaf08dc9f412df1c9a8e1ae6f8f0220f797f7506450bd12c9dfc8f2764ccc398ee782e1a1f2d9ff968ff17c0a7e89f03a1120ab3fb5f07c8e35a599d0b8140 WHIRLPOOL e0b1bcc9b910d6f05b73adf0ddb431ea026ddde6c8588801a03b02f832a260f808fbb3c3026ef7901a0f257c7f6dd9860cda30cbe44c7b4428ef8964ab106d02
+DIST sbcl-1.0.28-alpha-linux-binary.tar.bz2 7573824 SHA256 0bd8125e1375a75b9dda286439dcbe9861d6df5c6fc8475fd217b8b757edf9cc SHA512 85ceb4d3bf971777f5444a63cbabd88ccfaf16ed3b3c86cc5ea6cb3fd3189c4cd5a5ebbf785c97366afb7026604ffc34a1129936291deede5993056e158125ab WHIRLPOOL 839363a0d2fcc7cf383143fc130c40bf6f03468a89eb4b5eecb39339ba376a6b3a2096938934a91cf689310bff20807d2ac24b99c0d6e3673729b26d9edb83aa
+DIST sbcl-1.0.28-powerpc-linux-binary.tar.bz2 7621107 SHA256 b51fe8cd3a998d178fc1876d10016439cfa4ed3566d761c331cacab364acd591 SHA512 e3386d25ae44c03cac5ecf2a9ba95338348b51955dc731f0bb57a124e572601b84170b452ff0c3540af07278053f1e5d153a4f1a621b376ceb1861f84777bad3 WHIRLPOOL 1c16053a0c15b3bec892811185945df59765f4d220045e0f116234aa18f843c6a6b8ce472029603624e47751185822891ffaaeb96dfd87f714b8fddf74149f26
+DIST sbcl-1.0.28-sparc-linux-binary.tar.bz2 8032042 SHA256 a2e848ac11b0f16bb91866bd187949d908ad94fabb958a0b56320fc0e8b8923e SHA512 cea1ba06f85169fca9fe3026813c6e7e8e8209b874e048b7bd63cb3a1c5bd7c829e8dbb2c486977e190a0390d28e4845938a9e84378f4f2f16f72bf0b6f45c80 WHIRLPOOL e7f7e9bc7b43cab7b729792a22f0f41be12d8dd97a1c45fa039a49607865b977dd336fef8c7ccda087a9e9e32f92241c83e05da442e12cf883d3dfb3c2fda169
+DIST sbcl-1.0.37-x86-64-linux-binary.tar.bz2 8702821 SHA256 0757a1d49d5452c9bef8d1c270dd423aa1b752e6a7ce4a3ffb546253e1bf56f3 SHA512 2175c30ce46c0b7b8fb4b2ed7aaadfa7a127cd50f2343adf1e8e0bd8b16c30803be5171fa076ca3a477df03a698f6887287bcf5e3249ba7c9e07f86f57cf8540 WHIRLPOOL 65322b7c36cf7cc23a796f4a4fd0c9f460c60cc18a0f3f167c20e892177c342f6af6ecda94e30ea32858ec3f13f0d7cb0a86955615b3fc180c62310de8bf1884
+DIST sbcl-1.0.37-x86-linux-binary.tar.bz2 8815040 SHA256 3d04ffc7c71afe523858799386a3175467556648b27184e39f62df8f60cf7268 SHA512 6c630ed7f5a86f1ed928e59f5258b7b7be116c23f469c814a386fd82c4a554ab02ca6819098e5703063ac6f683538779b00c3bd6757338ce2b843062d873989f WHIRLPOOL 25e575652d1c87ad6ecb8a0934c5e9b0210e566e11f6c5df09bb4048c7567732b10350c1f91e0bcc1c85907d1e2ed877e7297b7ee838b941cefd6fb6fe5da781
+DIST sbcl-1.0.47-powerpc-darwin-binary.tar.bz2 8217590 SHA256 6971a64c0706894f217da676081874088f50f84daa66d89b653b065f83563f3b SHA512 8118de56e448bce7a72b832e661eb4e2687eed675f88f766f7043c843a432e35121d9e6f9da8d22ac690c54bda0d55ecb07728748ce2cdd57320f49b4b812b86 WHIRLPOOL f91c344a2b99a5a1c2dfe3af0172f548997b9aaf9ad5e865eb76c8311f6114275eda1e7e76af6efe5c1a346d1761f45e374f577313029fa9b83adfdec10c70ad
+DIST sbcl-1.0.55-source.tar.bz2 3611026 SHA256 e3216a7b9c302b6c1431d0f1ae444008de8ac465eb44f4ae841300d052d207ad SHA512 dbda1f1bcb28a4bea8bc3ab8c3d5c6c27754a1388087ae9db81b783444ac306d0c72dde3a096bc6dc716d1b174868f5e5f39402f69b0604fc8023b9227eea38b WHIRLPOOL ead2425660e1a8812f882bb4d359471f5f70295a0196e1df70ec5b6aa2bc2ccfb0f3c23d63aba19e149b808e4b4ced26b98428745033c8197255274094ccccea
+DIST sbcl-1.0.58-x86-linux-binary.tar.bz2 9313124 SHA256 a2195fce096fd7c64acef60ca496a29d703afc61eb39c366fdd9e56dc8982f84 SHA512 2776faa09f8a3d35ccb2745ec4a07e78bd714c47ae39032bbef3161d599d14fcc6313e65629df06b576cb973012b9c8356fac47bf7b886f9549d688fab3c4f98 WHIRLPOOL d98dda83b6ee02a777c787013ada2ca0a4548c75abe907a29215a48693bbbf787a6c6f83e07b2e8ab94afae261572dc0222570927357656d388329541301537c
+DIST sbcl-1.1.18-source.tar.bz2 4272315 SHA256 933238392a2a3533b4088b86c4fbd0704a5573c1c66987a603eec4afa782c7d0 SHA512 48501a670c7e1ea9ab5a03514e8b49b93d1dcbdb7712da8b38496a2d51a604fe30e2785a5e5e8aa40032ede5ee11a75f63ae1919ccd7316089a74486177ad417 WHIRLPOOL a7285ee77753bc1f14755425e232e6ffcff159be883bad779585cb247ff47b904b4fcab99e8fc2e33644764c602409c6e9bbd28588d3d639431650ea9d31c5f5
+DIST sbcl-1.1.18-x86-64-linux-binary.tar.bz2 9196684 SHA256 c945406f9421736982efc4eaaeb376b19331422f5b5a349382ed53c742d6cb0a SHA512 d63a33532ae6390c00d789c22c4a504b621e707b8aa5f72d12b497be8a590a75604a18f384fa2d27df3a4a0ef3ecd4c27e7bfc4f74fde3a014df1aad5dd8ff0c WHIRLPOOL 980726e0dd182c2b29c5ac4deab994d028e0003a3e2ac3e38a0c052f6607fc75f6b298fb60c99ff9f373c9ba1f243d6bd97de2cb765aad559867598affd510ab
+DIST sbcl-1.1.6-x86-darwin-binary.tar.bz2 9091955 SHA256 5801c60e2a875d263fccde446308b613c0253a84a61ab63569be62eb086718b3 SHA512 5b9d58ba1a7bcf3aa5011ac5ba1c8dba65e44b2c3f8a31b15db54de6b34ea0f7482c45f1cc4e1323e154ce79fbba030112df3795cb323bca46bac50f15d2a138 WHIRLPOOL 673e84bbf685e07568530ccb2c3822dbfffd6226d3de90bfef13078466ae245f63dd2fc4ac48b4d64ca1453cc831ad6913af21540bd3b35fe51700161ca26086
+DIST sbcl-1.1.8-x86-64-darwin-binary.tar.bz2 9045228 SHA256 729054dc27d6b53bd734eac4dffeaa9e231e97bdbe4927d7a68c8f0210cad700 SHA512 d29cf032dd52b014fcc5c48fc5dd0a1f8065838cd9078d129742302c64263b7d630232d1f9c051b56b8b2b34f1bef338aeaf81ff827799032e44ca6165483e34 WHIRLPOOL f44112707f000a46d26a6af65e651868639beddab4be9c84c8f2bc8488f198ab661cb6aa62f1d38fbcbe48f259c0c2e54d255ae45db22f648b56aaaa4f104984
+DIST sbcl-1.2.10-source.tar.bz2 5520417 SHA256 55243d5085278b7d0f80e5b91889f44ff66c195d801b3da26f1f4c696711f685 SHA512 3303297b6b5ad354d30019c6e20f0e79b0f50a3860b39990de5b36c93ca5b509680f8bbbf38be5d65490572ff523d422206f6fb2a06ea99a708e2d14de7fd27c WHIRLPOOL 6ed0e8a0cda5bfd96dc209a82886c8c45a5f54f65a3b66f50224693af9d5b4dbc30747835910115fb519554eb0fe4adf374ca6525fddd3a2ff63fb401c0c301b
+DIST sbcl-1.2.10-x86-64-linux-binary.tar.bz2 10079986 SHA256 78c7144a27569f42dad5c1481c694ada5ac8c415de84b1cb838a4ad4b9f5903d SHA512 b9e5598fe90f4b41606f23ee8233a9f53772fc303a96f054ca203076c5f84b06bb945f74d9e98963d970f83fabb0cc4002d47418eb881479f1a029cca1902b22 WHIRLPOOL 00b48d28a67e91cfba59072f91bf9750b7542f31a8982595e936b54a061f30501520a935685ef5d8ac88362260aa9271f35b9e426133e20976f8c851b22715e3
+DIST sbcl-1.2.11-source.tar.bz2 5535528 SHA256 88aa04dae72d011f5c22084a35201188d8a02f0cd82e5de542aa4ce6bfaa3e70 SHA512 e033b61bfd2bdad1d04b3dfb5a92577a30dc7c40c679de377abf034e17de7bab034c34819b80255d16ba11ee9ac7fc29495b38844db5c19ef146d18728968694 WHIRLPOOL 24abe33e72c9e072d66bd0e3a6f8df4485e3560636c711a3d77fa71fecadba3c6cfad758cf3aeea54b94efd8e645c91a3f8634395854fca6cafc28095f10196f
+DIST sbcl-1.2.11-x86-64-linux-binary.tar.bz2 10238022 SHA256 bb5b5315ad120a57041891988900f560fd0467a28e8dee939d5b1472c8ad111e SHA512 4bdc2dab4bca3d7656288e7d5b56a89bde5de61ff190186a6bf09e00f62bd1e72c62d433818b84478b2eabe0712dd652418affed8a0bd4afd99e376c750955f1 WHIRLPOOL 21d66afdbf2456e43fad7f6178e161a3f6f856eba4c0fe56b7bd33a09343e105f14eb28b49373c56197443b6de27391946eb93993773d903430c59742e8bb041
+DIST sbcl-1.2.13-source.tar.bz2 5567609 SHA256 e6d93a94cbf821b2c500a9440ca640588e9ac6914dba2f6b5445a5e14eeb1205 SHA512 f5f7bfb9e8c6a3dcf8c1bac62dba9ca1385b9689141c24951bec95ee5383f53e4279dd5c3fb382a79b06ef113d3d4aaa3b05fff69f8a819a0988ba03983c0c48 WHIRLPOOL 260de2f717544f4e9678b3e40bf59b16d83e3cdfad681c4a9e94fba9ec312a7647243a41076a9e64caa9ebfe33515561c854b939561019f14a3d07faf2425197
+DIST sbcl-1.2.13-x86-64-linux-binary.tar.bz2 10154344 SHA256 900e58adb9a449e3b5177207908a361de71be1e3aec712aff731ba9a9903f3ab SHA512 483aafc9b38cf317ea764d66e1faf70560cca4c04355ae0a0669692c985034335ec155fc9557acab8cc5f2ee668615985950b2fa96d0acc900b74aceeeafb64c WHIRLPOOL bc9218f7a32194a19b12cd218b2ebfb1dbce01717289241ba62a1b39a424fc2d0620c80b536d1c0a605322e99c52ae0f01d943bd93b7e4c1388ae9b7ab7464bc
+DIST sbcl-1.2.2-source.tar.bz2 4437174 SHA256 5b2c510cdd7300956428c3b9bad78bd730908f6841ff15097e078133e50a5322 SHA512 6270e561185d617f90bf1ae6ddb52c7aac723eaf1498d259a6e1bd299c49064dd2a0968e9a88f97a2f36972f67e88bb82dbf32c64932f2787a364b23d422147f WHIRLPOOL 9e9855c82eacb2a9bdc85ba979faf0a0d3437d8f53c39c93a13e6a27489aeeca9d9f6252a4320083bb4718b397f8325d92d186468d7e782b85d12332ae20e6b3
+DIST sbcl-1.2.2-x86-64-linux-binary.tar.bz2 9412798 SHA256 a20779fefd466ad985f530fbd3093b603779efa20f0d3045d75420b4e73d0723 SHA512 aca469a106a848920861f9254f264fe9ce6c025268f43d86a96f69d4f149b16666f33260b12407fcbcbec564126d2a17c4f1b152ce7676cff45ef0762413385b WHIRLPOOL b98aae862ce72fabf1acaefac6a7a76fbb64ed152f7113cc27f4b5be7540a96effb1c1ee65325294666d1fe24fac397b32b5f4987bc7dba88994cf892fc9b823
+DIST sbcl-1.2.4-source.tar.bz2 4486150 SHA256 f910059785ffcfa22eb40548e1355f0da979261fbee017baa9ef2c060d777232 SHA512 d524114bfc289e29a372b840dd4e6bbecb10f7f9e0be149b50c44a63aaa40473f62c34843472d36f98df9e63da30c163037302714020de63b2faf5d0c95f4d4c WHIRLPOOL da7ef6fdc413e30a6f594fa50b639fe00166b95adced6c605c9eb348a4444af8705ee6d553f5e5fca75a6f1ecbe477ffefae8cacb46a97526c16b7cb2b838daf
+DIST sbcl-1.2.4-x86-64-linux-binary.tar.bz2 9450469 SHA256 c9d1c5c309bfa1dc5440ac0c6ee358415b62f87cf092131df9e7c2f718bdb2c2 SHA512 cbcfd4e3872c07cfb1cde10fee6c548c5349f9b08dc765962ca52e32f426386fa2d7160be17c68b7bdad0a648ef4acee0bd098558d9506688d0023c8147eea79 WHIRLPOOL 12079b5f4293c21b46243ce7bd7cdeac1015da7b4a26a6f9536ef5727677ead8fcf621294a900e8548262bc186b33517a9abd8bd3646a74cd08c312f7f156e6c
+DIST sbcl-1.2.6-source.tar.bz2 5460124 SHA256 4108035eebdd7af3d4a21bd7cb87443b7e9a8eb31e7f855ca2d4b4be8320f389 SHA512 7d3b453f27be0f825b6fad3fd4f58afd587c14c8c8fd60551504776cb4d75706b925260499c41044da2d519baec31373abc14e0ea7a847bc7fc9a3cacca65d9e WHIRLPOOL d1e0ce7630a831d77d3ae2645a51ed86cc808c9d3f3a0c9af070139142190e60e04df84d178c92eef21238222ecc2abb149c6600b30927e5d5d4dbdbfd46864d
+DIST sbcl-1.2.6-x86-64-linux-binary.tar.bz2 10466349 SHA256 9c21e63cc2a023d9d785621d935f6f758dcd688d8f9f30a4753eb6a1a75e2fe2 SHA512 bb2f3f70ab4429dbc1339e17856a126d720e804eb0bd7aede9d1ebe28af5cbe2e29667d54c59101f711f4e7814cec8b0c39ef3756478a1456b1cf67763761635 WHIRLPOOL 0883c771684d92dc908edb4a60a1a9fc5de948e0fc16e019e41b454bd6d3a880dc8615f6be3beb44ed2c08d8543d7ca539d531377ecbce96194f98e39ce6c68b
+DIST sbcl-1.2.7-armhf-linux-binary.tar.bz2 9914851 SHA256 5e75a328882b739befcf5c38e8039b830668a8ca7bafe56a9e13ef23f39eb253 SHA512 2c82bdfe4f070a43964e694f81ccdbb84f8dd3bf77c807343daadff877b518fcd52e05513691543ca076c2b6de8bcf8b2e672b31f5ed3f545bedb02bbf7cd868 WHIRLPOOL 8e0eab53a9bfe10a1ccaa5c950e9fe045aeaa23f9f66ca98badd5a0fce3ad5828c0059904c73584dd4591fb3f9b2eefb5210a19f2de9fd8d699d48b0cee3bbef
+DIST sbcl-1.2.7-powerpc-linux-binary.tar.bz2 9884585 SHA256 d2f86db4f6fe2b6e6bbc6353ce28dead1b142ed36885080b97304db55aae2861 SHA512 7b9fef12d3d6397adec6a0c26d1431a18b8d91b5bf009034eb2501de9fd60dc04dd2e3cd2d9feb9204d4631360aea88ba07a9ad75dad0767b5dcc5e62e84e790 WHIRLPOOL 4b884ab946e8c54775970aa502054f42a92d01257449796c7d1a6bd1ff5835ddae1c94aa5d936a7a5b115183c6cee5251034646559e4435a6663896fa302c4be
+DIST sbcl-1.2.7-source.tar.bz2 5472699 SHA256 b27099d8c9fb5c63673e7dc4a83f82b4088dd0ed02e849a4d164aa1b12cc5283 SHA512 0d5655a5362250559a06590d6c8fac223b4461697ca826d96fa87bdf86c2d133c7ca4bde7de32a04259f061d1066d389dbb5b004d717d095e4c153ae8239b36f WHIRLPOOL 9699fe67d574a63bb6dca4c9c3321c2781a8acdfd4554676951d80f13a19ee40979d3a0df182ae452ce5476413a66d7870f0a99b3b4286e118be5cbec31b644a
+DIST sbcl-1.2.7-x86-64-linux-binary.tar.bz2 10528686 SHA256 92094d7a5ea19891a6245064b12d4e1125aa065634ad24b6607ab08c37e95b40 SHA512 5d925df9022584732793121a67b6d37bab4d35b999748fbd6fd8d9c8cd212b01569bf265bf1edca33ce37b400597da21e4c66685a3f93b29548d26108ff3b5df WHIRLPOOL aa631d6a06dc67031fcb60ccecec13859a2648f9d0bf39db5ea4de62129ed8dac9592ef32acd2934e3e26e2225c4d0befdf30e7733ae4a9200498926a7193a5f
+DIST sbcl-1.2.7-x86-64-solaris-binary.tar.bz2 10438955 SHA256 a0a13e83b35dbac36284459747a03c6db20cd089864e16a6380a12a6aa138115 SHA512 9566cebf8fc29ead1f919309e3f98aeb618e97b34c80f53d1f739f1a3f4ef4cbaebd1c67f0b32172a0cdf14dc405eb75d0e916dedf3b8a758cdec2368d25f5c1 WHIRLPOOL 4946b9a4463c92517233298f898510ca57b4127da93d7d42cf28005bbd96b8d1eba7472f73029f45d6c0e75f3de5b893a34f33feee92a60cef8ae4f2b4d4fa0e
+DIST sbcl-1.2.7-x86-linux-binary.tar.bz2 10516485 SHA256 724425fe0d28747c7d31c6655e39fa8c27f9ef4608c482ecc60089bcc85fc31d SHA512 ca09beeafeb40f21eb1a377f04a69d57feb5549fa63aadf2e39aa65f3875418bdab755e22b567b3f2c514fb94534b739a57606288912ffc5cddf370a400e9e5c WHIRLPOOL 41b3f5a9749c74f136b8bb4f519409902045cd9501b5b944e7bcbf9336dd6640388641d26f8c345d79a1028ae64bb04fb74228886f8c2ae0eb085a8586635e17
+DIST sbcl-1.2.7-x86-solaris-binary.tar.bz2 10351529 SHA256 a198df14f45cdf302017116744c8946a8b4143291efe1799553554133c22b46a SHA512 b30d40f0095bb43719ba2e1a619f53fe5f0bccaa08a35481bc5feeb0dd5b540018a9ec9f61799de89991a85750577922cb4e56db4d7dab8f07e18bbc643bdad1 WHIRLPOOL 05ad3606b23e6196d443328f367b7351612d0f4991d71a5a04f1f45b5bb604809d6ed11c8cf62bc639d6f9dd8e5704b52a050603d4745713c5818fcbd36852bf
+DIST sbcl-1.2.9-source.tar.bz2 5518280 SHA256 603e15bf15b0fb644362864d3866e96a4c3328d88de1a7da09b26b4b3d089a5f SHA512 1645e83b9625c50670d13b877601de49d4210abcb94cfffe7065906055e15be442581aa13e26fbd3e2e033230f2cd772731f9cd491118769c8ff950aa54a039c WHIRLPOOL 5491a28c6e0373108359c9ab936efe5a4b1cb3b83319821a88599798dfd8af9467e75dfb718f39860149078189d13e36b394c3e492a7760709a2916a680a26d3
+DIST sbcl-1.2.9-x86-64-linux-binary.tar.bz2 10172369 SHA256 67753b3f84ad70a1597fa178e32f2dfaa536a6d61f46d15ab2a1477cc7f7d3db SHA512 ffd3a39128d60d6b2fa16bf1b7f5947adc761714bd4a454fa1f22b49b28dbb14527380efd7ad1b2ac2ad7e56a17e60f6255f82816ead11071a2e6831893a14aa WHIRLPOOL 47b9246297d5a498e2b58651c1c20bad15ab05cb0e5a1947463448b1a99718e25915df420aa1a3999f929aed683376a5d2d1cc70c4c743df8749e5b09b0d992b
diff --git a/dev-lisp/sbcl/files/bsd-sockets-test-1.2.11.patch b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.11.patch
new file mode 100644
index 000000000000..88f6fa588cee
--- /dev/null
+++ b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.11.patch
@@ -0,0 +1,350 @@
+diff -r -U2 sbcl-1.2.11.orig/contrib/sb-bsd-sockets/tests.lisp sbcl-1.2.11/contrib/sb-bsd-sockets/tests.lisp
+--- sbcl-1.2.11.orig/contrib/sb-bsd-sockets/tests.lisp 2015-04-27 20:56:47.000000000 +0600
++++ sbcl-1.2.11/contrib/sb-bsd-sockets/tests.lisp 2015-04-28 22:27:32.588146072 +0600
+@@ -36,13 +36,13 @@
+ ;;; Apparently getprotobyname_r on FreeBSD says -1 and EINTR
+ ;;; for unknown protocols...
+-#-(and freebsd sb-thread)
+-#-(and dragonfly sb-thread)
+-(deftest get-protocol-by-name/error
+- (handler-case (get-protocol-by-name "nonexistent-protocol")
+- (unknown-protocol ()
+- t)
+- (:no-error ()
+- nil))
+- t)
++;#-(and freebsd sb-thread)
++;#-(and dragonfly sb-thread)
++;(deftest get-protocol-by-name/error
++; (handler-case (get-protocol-by-name "nonexistent-protocol")
++; (unknown-protocol ()
++; t)
++; (:no-error ()
++; nil))
++; t)
+
+ (deftest make-inet-socket.smoke
+@@ -92,19 +92,19 @@
+ t)
+
+-#-win32
+-(deftest make-inet6-socket.smoke
+- (handler-case
+- (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
+- (> (socket-file-descriptor s) 1))
+- (address-family-not-supported () t))
+- t)
+-
+-#-win32
+-(deftest make-inet6-socket.keyword
+- (handler-case
+- (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
+- (> (socket-file-descriptor s) 1))
+- (address-family-not-supported () t))
+- t)
++;#-win32
++;(deftest make-inet6-socket.smoke
++; (handler-case
++; (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
++; (> (socket-file-descriptor s) 1))
++; (address-family-not-supported () t))
++; t)
++
++;#-win32
++;(deftest make-inet6-socket.keyword
++; (handler-case
++; (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
++; (> (socket-file-descriptor s) 1))
++; (address-family-not-supported () t))
++; t)
+
+ (deftest* (non-block-socket)
+@@ -114,52 +114,52 @@
+ t)
+
+-(deftest inet-socket-bind
+- (let* ((tcp (get-protocol-by-name "tcp"))
+- (address (make-inet-address "127.0.0.1"))
+- (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
+- (s2 (make-instance 'inet-socket :type :stream :protocol tcp)))
+- (unwind-protect
+- ;; Given the functions we've got so far, if you can think of a
+- ;; better way to make sure the bind succeeded than trying it
+- ;; twice, let me know
+- (progn
+- (socket-bind s1 address 0)
+- (handler-case
+- (let ((port (nth-value 1 (socket-name s1))))
+- (socket-bind s2 address port)
+- nil)
+- (address-in-use-error () t)))
+- (socket-close s1)
+- (socket-close s2)))
+- t)
+-
+-#-win32
+-(deftest inet6-socket-bind
+- (handler-case
+- (let* ((tcp (get-protocol-by-name "tcp"))
+- (address (make-inet6-address "::1"))
+- (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
+- (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
+- (unwind-protect
+- ;; Given the functions we've got so far, if you can think of a
+- ;; better way to make sure the bind succeeded than trying it
+- ;; twice, let me know
+- (handler-case
+- (socket-bind s1 address 0)
+- (socket-error ()
+- ;; This may mean no IPv6 support, can't fail a test
+- ;; because of that (address-family-not-supported doesn't catch that)
+- t)
+- (:no-error (x)
+- (declare (ignore x))
+- (handler-case
+- (let ((port (nth-value 1 (socket-name s1))))
+- (socket-bind s2 address port)
+- nil)
+- (address-in-use-error () t))))
+- (socket-close s1)
+- (socket-close s2)))
+- (address-family-not-supported () t))
+- t)
++;(deftest inet-socket-bind
++; (let* ((tcp (get-protocol-by-name "tcp"))
++; (address (make-inet-address "127.0.0.1"))
++; (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
++; (s2 (make-instance 'inet-socket :type :stream :protocol tcp)))
++; (unwind-protect
++; ;; Given the functions we've got so far, if you can think of a
++; ;; better way to make sure the bind succeeded than trying it
++; ;; twice, let me know
++; (progn
++; (socket-bind s1 address 0)
++; (handler-case
++; (let ((port (nth-value 1 (socket-name s1))))
++; (socket-bind s2 address port)
++; nil)
++; (address-in-use-error () t)))
++; (socket-close s1)
++; (socket-close s2)))
++; t)
++
++;#-win32
++;(deftest inet6-socket-bind
++; (handler-case
++; (let* ((tcp (get-protocol-by-name "tcp"))
++; (address (make-inet6-address "::1"))
++; (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
++; (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
++; (unwind-protect
++; ;; Given the functions we've got so far, if you can think of a
++; ;; better way to make sure the bind succeeded than trying it
++; ;; twice, let me know
++; (handler-case
++; (socket-bind s1 address 0)
++; (socket-error ()
++; ;; This may mean no IPv6 support, can't fail a test
++; ;; because of that (address-family-not-supported doesn't catch that)
++; t)
++; (:no-error (x)
++; (declare (ignore x))
++; (handler-case
++; (let ((port (nth-value 1 (socket-name s1))))
++; (socket-bind s2 address port)
++; nil)
++; (address-in-use-error () t))))
++; (socket-close s1)
++; (socket-close s2)))
++; (address-family-not-supported () t))
++; t)
+
+ (deftest* (simple-sockopt-test)
+@@ -228,35 +228,35 @@
+ ;;; the message ended up
+
+-#-win32
+-(deftest simple-local-client
+- (progn
+- ;; SunOS (Solaris) and Darwin systems don't have a socket at
+- ;; /dev/log. We might also be building in a chroot or
+- ;; something, so don't fail this test just because the file is
+- ;; unavailable, or if it's a symlink to some weird character
+- ;; device.
+- (when (block nil
+- (handler-bind ((sb-posix:syscall-error
+- (lambda (e)
+- (declare (ignore e))
+- (return nil))))
+- (sb-posix:s-issock
+- (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
+- (let ((s (make-instance 'local-socket :type :datagram)))
+- (format t "Connecting ~A... " s)
+- (finish-output)
+- (handler-case
+- (socket-connect s "/dev/log")
+- (sb-bsd-sockets::socket-error ()
+- (setq s (make-instance 'local-socket :type :stream))
+- (format t "failed~%Retrying with ~A... " s)
+- (finish-output)
+- (socket-connect s "/dev/log")))
+- (format t "ok.~%")
+- (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
+- (format stream
+- "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
+- t)
+- t)
++;#-win32
++;(deftest simple-local-client
++; (progn
++; ;; SunOS (Solaris) and Darwin systems don't have a socket at
++; ;; /dev/log. We might also be building in a chroot or
++; ;; something, so don't fail this test just because the file is
++; ;; unavailable, or if it's a symlink to some weird character
++; ;; device.
++; (when (block nil
++; (handler-bind ((sb-posix:syscall-error
++; (lambda (e)
++; (declare (ignore e))
++; (return nil))))
++; (sb-posix:s-issock
++; (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
++; (let ((s (make-instance 'local-socket :type :datagram)))
++; (format t "Connecting ~A... " s)
++; (finish-output)
++; (handler-case
++; (socket-connect s "/dev/log")
++; (sb-bsd-sockets::socket-error ()
++; (setq s (make-instance 'local-socket :type :stream))
++; (format t "failed~%Retrying with ~A... " s)
++; (finish-output)
++; (socket-connect s "/dev/log")))
++; (format t "ok.~%")
++; (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
++; (format stream
++; "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
++; t)
++; t)
+
+
+@@ -373,58 +373,58 @@
+ len address port (subseq buf 0 (min 10 len)))))))
+
+-#+sb-thread
+-(deftest interrupt-io
+- (let (result)
+- (labels
+- ((client (port)
+- (setf result
+- (let ((s (make-instance 'inet-socket
+- :type :stream
+- :protocol :tcp)))
+- (socket-connect s #(127 0 0 1) port)
+- (let ((stream (socket-make-stream s
+- :input t
+- :output t
+- :buffering :none)))
+- (handler-case
+- (prog1
+- (catch 'stop
+- (progn
+- (read-char stream)
+- (sleep 0.1)
+- (sleep 0.1)
+- (sleep 0.1)))
+- (close stream))
+- (error (c)
+- c))))))
+- (server ()
+- (let ((s (make-instance 'inet-socket
+- :type :stream
+- :protocol :tcp)))
+- (setf (sockopt-reuse-address s) t)
+- (socket-bind s (make-inet-address "127.0.0.1") 0)
+- (socket-listen s 5)
+- (multiple-value-bind (* port)
+- (socket-name s)
+- (let* ((client (sb-thread:make-thread
+- (lambda () (client port))))
+- (r (socket-accept s))
+- (stream (socket-make-stream r
+- :input t
+- :output t
+- :buffering :none))
+- (ok :ok))
+- (socket-close s)
+- (sleep 5)
+- (sb-thread:interrupt-thread client
+- (lambda () (throw 'stop ok)))
+- (sleep 5)
+- (setf ok :not-ok)
+- (write-char #\x stream)
+- (close stream)
+- (socket-close r))))))
+- (server))
+- result)
+- :ok)
++;#+sb-thread
++;(deftest interrupt-io
++; (let (result)
++; (labels
++; ((client (port)
++; (setf result
++; (let ((s (make-instance 'inet-socket
++; :type :stream
++; :protocol :tcp)))
++; (socket-connect s #(127 0 0 1) port)
++; (let ((stream (socket-make-stream s
++; :input t
++; :output t
++; :buffering :none)))
++; (handler-case
++; (prog1
++; (catch 'stop
++; (progn
++; (read-char stream)
++; (sleep 0.1)
++; (sleep 0.1)
++; (sleep 0.1)))
++; (close stream))
++; (error (c)
++; c))))))
++; (server ()
++; (let ((s (make-instance 'inet-socket
++; :type :stream
++; :protocol :tcp)))
++; (setf (sockopt-reuse-address s) t)
++; (socket-bind s (make-inet-address "127.0.0.1") 0)
++; (socket-listen s 5)
++; (multiple-value-bind (* port)
++; (socket-name s)
++; (let* ((client (sb-thread:make-thread
++; (lambda () (client port))))
++; (r (socket-accept s))
++; (stream (socket-make-stream r
++; :input t
++; :output t
++; :buffering :none))
++; (ok :ok))
++; (socket-close s)
++; (sleep 5)
++; (sb-thread:interrupt-thread client
++; (lambda () (throw 'stop ok)))
++; (sleep 5)
++; (setf ok :not-ok)
++; (write-char #\x stream)
++; (close stream)
++; (socket-close r))))))
++; (server))
++; result)
++; :ok)
+
+ (defmacro with-client-and-server ((server-socket-var client-socket-var) &body body)
+@@ -485,4 +485,5 @@
+ client server (unsigned-byte 8) ,direction)))))
+
+- (define-shutdown-tests :output)
+- (define-shutdown-tests :io))
++; (define-shutdown-tests :output)
++; (define-shutdown-tests :io))
++)
diff --git a/dev-lisp/sbcl/files/bsd-sockets-test-1.2.6.patch b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.6.patch
new file mode 100644
index 000000000000..7852979384be
--- /dev/null
+++ b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.6.patch
@@ -0,0 +1,157 @@
+diff -r -U1 sbcl-1.2.6.orig/contrib/sb-bsd-sockets/tests.lisp sbcl-1.2.6/contrib/sb-bsd-sockets/tests.lisp
+--- sbcl-1.2.6.orig/contrib/sb-bsd-sockets/tests.lisp 2014-11-30 00:56:58.000000000 +0600
++++ sbcl-1.2.6/contrib/sb-bsd-sockets/tests.lisp 2014-12-20 20:02:26.863408300 +0600
+@@ -37,11 +37,11 @@
+ ;;; for unknown protocols...
+-#-(and freebsd sb-thread)
+-#-(and dragonfly sb-thread)
+-(deftest get-protocol-by-name/error
+- (handler-case (get-protocol-by-name "nonexistent-protocol")
+- (unknown-protocol ()
+- t)
+- (:no-error ()
+- nil))
+- t)
++;#-(and freebsd sb-thread)
++;#-(and dragonfly sb-thread)
++;(deftest get-protocol-by-name/error
++; (handler-case (get-protocol-by-name "nonexistent-protocol")
++; (unknown-protocol ()
++; t)
++; (:no-error ()
++; nil))
++; t)
+
+@@ -93,13 +93,13 @@
+
+-#-win32
+-(deftest make-inet6-socket.smoke
+- (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
+- (and (> (socket-file-descriptor s) 1) t))
+- t)
+-
+-#-win32
+-(deftest make-inet6-socket.keyword
+- (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
+- (and (> (socket-file-descriptor s) 1) t))
+- t)
++;#-win32
++;(deftest make-inet6-socket.smoke
++; (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
++; (and (> (socket-file-descriptor s) 1) t))
++; t)
++
++;#-win32
++;(deftest make-inet6-socket.keyword
++; (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
++; (and (> (socket-file-descriptor s) 1) t))
++; t)
+
+@@ -131,22 +131,22 @@
+
+-#-win32
+-(deftest inet6-socket-bind
+- (let* ((tcp (get-protocol-by-name "tcp"))
+- (address (make-inet6-address "::1"))
+- (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
+- (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
+- (unwind-protect
+- ;; Given the functions we've got so far, if you can think of a
+- ;; better way to make sure the bind succeeded than trying it
+- ;; twice, let me know
+- (progn
+- (socket-bind s1 address 0)
+- (handler-case
+- (let ((port (nth-value 1 (socket-name s1))))
+- (socket-bind s2 address port)
+- nil)
+- (address-in-use-error () t)))
+- (socket-close s1)
+- (socket-close s2)))
+- t)
++;#-win32
++;(deftest inet6-socket-bind
++; (let* ((tcp (get-protocol-by-name "tcp"))
++; (address (make-inet6-address "::1"))
++; (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
++; (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
++; (unwind-protect
++; ;; Given the functions we've got so far, if you can think of a
++; ;; better way to make sure the bind succeeded than trying it
++; ;; twice, let me know
++; (progn
++; (socket-bind s1 address 0)
++; (handler-case
++; (let ((port (nth-value 1 (socket-name s1))))
++; (socket-bind s2 address port)
++; nil)
++; (address-in-use-error () t)))
++; (socket-close s1)
++; (socket-close s2)))
++; t)
+
+@@ -217,33 +217,33 @@
+
+-#-win32
+-(deftest simple-local-client
+- (progn
+- ;; SunOS (Solaris) and Darwin systems don't have a socket at
+- ;; /dev/log. We might also be building in a chroot or
+- ;; something, so don't fail this test just because the file is
+- ;; unavailable, or if it's a symlink to some weird character
+- ;; device.
+- (when (block nil
+- (handler-bind ((sb-posix:syscall-error
+- (lambda (e)
+- (declare (ignore e))
+- (return nil))))
+- (sb-posix:s-issock
+- (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
+- (let ((s (make-instance 'local-socket :type :datagram)))
+- (format t "Connecting ~A... " s)
+- (finish-output)
+- (handler-case
+- (socket-connect s "/dev/log")
+- (sb-bsd-sockets::socket-error ()
+- (setq s (make-instance 'local-socket :type :stream))
+- (format t "failed~%Retrying with ~A... " s)
+- (finish-output)
+- (socket-connect s "/dev/log")))
+- (format t "ok.~%")
+- (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
+- (format stream
+- "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
+- t)
+- t)
++;#-win32
++;(deftest simple-local-client
++; (progn
++; ;; SunOS (Solaris) and Darwin systems don't have a socket at
++; ;; /dev/log. We might also be building in a chroot or
++; ;; something, so don't fail this test just because the file is
++; ;; unavailable, or if it's a symlink to some weird character
++; ;; device.
++; (when (block nil
++; (handler-bind ((sb-posix:syscall-error
++; (lambda (e)
++; (declare (ignore e))
++; (return nil))))
++; (sb-posix:s-issock
++; (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
++; (let ((s (make-instance 'local-socket :type :datagram)))
++; (format t "Connecting ~A... " s)
++; (finish-output)
++; (handler-case
++; (socket-connect s "/dev/log")
++; (sb-bsd-sockets::socket-error ()
++; (setq s (make-instance 'local-socket :type :stream))
++; (format t "failed~%Retrying with ~A... " s)
++; (finish-output)
++; (socket-connect s "/dev/log")))
++; (format t "ok.~%")
++; (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
++; (format stream
++; "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
++; t)
++; t)
+
diff --git a/dev-lisp/sbcl/files/bsd-sockets-test-1.2.7.patch b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.7.patch
new file mode 100644
index 000000000000..87e9bea5c2b1
--- /dev/null
+++ b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.7.patch
@@ -0,0 +1,184 @@
+--- sbcl-1.2.7-orig/contrib/sb-bsd-sockets/tests.lisp 2015-01-01 06:09:07.000000000 +1100
++++ sbcl-1.2.7/contrib/sb-bsd-sockets/tests.lisp 2015-01-07 20:38:50.654557033 +1100
+@@ -35,15 +35,15 @@
+ ;;; See https://bugs.launchpad.net/sbcl/+bug/659857
+ ;;; Apparently getprotobyname_r on FreeBSD says -1 and EINTR
+ ;;; for unknown protocols...
+-#-(and freebsd sb-thread)
+-#-(and dragonfly sb-thread)
+-(deftest get-protocol-by-name/error
+- (handler-case (get-protocol-by-name "nonexistent-protocol")
+- (unknown-protocol ()
+- t)
+- (:no-error ()
+- nil))
+- t)
++;#-(and freebsd sb-thread)
++;#-(and dragonfly sb-thread)
++;(deftest get-protocol-by-name/error
++; (handler-case (get-protocol-by-name "nonexistent-protocol")
++; (unknown-protocol ()
++; t)
++; (:no-error ()
++; nil))
++; t)
+
+ (deftest make-inet-socket.smoke
+ ;; make a socket
+@@ -91,17 +91,17 @@
+ (:no-error nil))
+ t)
+
+-#-win32
+-(deftest make-inet6-socket.smoke
+- (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
+- (and (> (socket-file-descriptor s) 1) t))
+- t)
+-
+-#-win32
+-(deftest make-inet6-socket.keyword
+- (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
+- (and (> (socket-file-descriptor s) 1) t))
+- t)
++;#-win32
++;(deftest make-inet6-socket.smoke
++; (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
++; (and (> (socket-file-descriptor s) 1) t))
++; t)
++
++;#-win32
++;(deftest make-inet6-socket.keyword
++; (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
++; (and (> (socket-file-descriptor s) 1) t))
++; t)
+
+ (deftest* (non-block-socket)
+ (let ((s (make-instance 'inet-socket :type :stream :protocol :tcp)))
+@@ -129,32 +129,32 @@
+ (socket-close s2)))
+ t)
+
+-#-win32
+-(deftest inet6-socket-bind
+- (let* ((tcp (get-protocol-by-name "tcp"))
+- (address (make-inet6-address "::1"))
+- (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
+- (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
+- (unwind-protect
+- ;; Given the functions we've got so far, if you can think of a
+- ;; better way to make sure the bind succeeded than trying it
+- ;; twice, let me know
+- (handler-case
+- (socket-bind s1 address 0)
+- (socket-error ()
+- ;; This may mean no IPv6 support, can't fail a test
+- ;; because of that
+- t)
+- (:no-error (x)
+- (declare (ignore x))
+- (handler-case
+- (let ((port (nth-value 1 (socket-name s1))))
+- (socket-bind s2 address port)
+- nil)
+- (address-in-use-error () t))))
+- (socket-close s1)
+- (socket-close s2)))
+- t)
++;#-win32
++;(deftest inet6-socket-bind
++; (let* ((tcp (get-protocol-by-name "tcp"))
++; (address (make-inet6-address "::1"))
++; (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
++; (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
++; (unwind-protect
++; ;; Given the functions we've got so far, if you can think of a
++; ;; better way to make sure the bind succeeded than trying it
++; ;; twice, let me know
++; (handler-case
++; (socket-bind s1 address 0)
++; (socket-error ()
++; ;; This may mean no IPv6 support, can't fail a test
++; ;; because of that
++; t)
++; (:no-error (x)
++; (declare (ignore x))
++; (handler-case
++; (let ((port (nth-value 1 (socket-name s1))))
++; (socket-bind s2 address port)
++; nil)
++; (address-in-use-error () t))))
++; (socket-close s1)
++; (socket-close s2)))
++; t)
+
+ (deftest* (simple-sockopt-test)
+ ;; test we can set SO_REUSEADDR on a socket and retrieve it, and in
+@@ -221,37 +221,37 @@
+ ;;; to look at /etc/syslog.conf or local equivalent to find out where
+ ;;; the message ended up
+
+-#-win32
+-(deftest simple-local-client
+- (progn
+- ;; SunOS (Solaris) and Darwin systems don't have a socket at
+- ;; /dev/log. We might also be building in a chroot or
+- ;; something, so don't fail this test just because the file is
+- ;; unavailable, or if it's a symlink to some weird character
+- ;; device.
+- (when (block nil
+- (handler-bind ((sb-posix:syscall-error
+- (lambda (e)
+- (declare (ignore e))
+- (return nil))))
+- (sb-posix:s-issock
+- (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
+- (let ((s (make-instance 'local-socket :type :datagram)))
+- (format t "Connecting ~A... " s)
+- (finish-output)
+- (handler-case
+- (socket-connect s "/dev/log")
+- (sb-bsd-sockets::socket-error ()
+- (setq s (make-instance 'local-socket :type :stream))
+- (format t "failed~%Retrying with ~A... " s)
+- (finish-output)
+- (socket-connect s "/dev/log")))
+- (format t "ok.~%")
+- (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
+- (format stream
+- "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
+- t)
+- t)
++;#-win32
++;(deftest simple-local-client
++; (progn
++; ;; SunOS (Solaris) and Darwin systems don't have a socket at
++; ;; /dev/log. We might also be building in a chroot or
++; ;; something, so don't fail this test just because the file is
++; ;; unavailable, or if it's a symlink to some weird character
++; ;; device.
++; (when (block nil
++; (handler-bind ((sb-posix:syscall-error
++; (lambda (e)
++; (declare (ignore e))
++; (return nil))))
++; (sb-posix:s-issock
++; (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
++; (let ((s (make-instance 'local-socket :type :datagram)))
++; (format t "Connecting ~A... " s)
++; (finish-output)
++; (handler-case
++; (socket-connect s "/dev/log")
++; (sb-bsd-sockets::socket-error ()
++; (setq s (make-instance 'local-socket :type :stream))
++; (format t "failed~%Retrying with ~A... " s)
++; (finish-output)
++; (socket-connect s "/dev/log")))
++; (format t "ok.~%")
++; (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
++; (format stream
++; "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
++; t)
++; t)
+
+
+ ;;; these require that the internet (or bits of it, at least) is available
diff --git a/dev-lisp/sbcl/files/bsd-sockets-test-1.2.9.patch b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.9.patch
new file mode 100644
index 000000000000..441b3f82d60a
--- /dev/null
+++ b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.9.patch
@@ -0,0 +1,346 @@
+diff --git sbcl-1.2.7/contrib/sb-bsd-sockets/tests.lisp sbcl-1.2.7/contrib/sb-bsd-sockets/tests.lisp
+--- sbcl-1.2.7/contrib/sb-bsd-sockets/tests.lisp
++++ sbcl-1.2.7/contrib/sb-bsd-sockets/tests.lisp
+@@ -35,15 +35,15 @@
+ ;;; See https://bugs.launchpad.net/sbcl/+bug/659857
+ ;;; Apparently getprotobyname_r on FreeBSD says -1 and EINTR
+ ;;; for unknown protocols...
+-#-(and freebsd sb-thread)
+-#-(and dragonfly sb-thread)
+-(deftest get-protocol-by-name/error
+- (handler-case (get-protocol-by-name "nonexistent-protocol")
+- (unknown-protocol ()
+- t)
+- (:no-error ()
+- nil))
+- t)
++;#-(and freebsd sb-thread)
++;#-(and dragonfly sb-thread)
++;(deftest get-protocol-by-name/error
++; (handler-case (get-protocol-by-name "nonexistent-protocol")
++; (unknown-protocol ()
++; t)
++; (:no-error ()
++; nil))
++; t)
+
+ (deftest make-inet-socket.smoke
+ ;; make a socket
+@@ -91,17 +91,17 @@
+ (:no-error nil))
+ t)
+
+-#-win32
+-(deftest make-inet6-socket.smoke
+- (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
+- (and (> (socket-file-descriptor s) 1) t))
+- t)
++;#-win32
++;(deftest make-inet6-socket.smoke
++; (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
++; (and (> (socket-file-descriptor s) 1) t))
++; t)
+
+-#-win32
+-(deftest make-inet6-socket.keyword
+- (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
+- (and (> (socket-file-descriptor s) 1) t))
+- t)
++;#-win32
++;(deftest make-inet6-socket.keyword
++; (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
++; (and (> (socket-file-descriptor s) 1) t))
++; t)
+
+ (deftest* (non-block-socket)
+ (let ((s (make-instance 'inet-socket :type :stream :protocol :tcp)))
+@@ -109,52 +109,52 @@
+ (non-blocking-mode s))
+ t)
+
+-(deftest inet-socket-bind
+- (let* ((tcp (get-protocol-by-name "tcp"))
+- (address (make-inet-address "127.0.0.1"))
+- (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
+- (s2 (make-instance 'inet-socket :type :stream :protocol tcp)))
+- (unwind-protect
+- ;; Given the functions we've got so far, if you can think of a
+- ;; better way to make sure the bind succeeded than trying it
+- ;; twice, let me know
+- (progn
+- (socket-bind s1 address 0)
+- (handler-case
+- (let ((port (nth-value 1 (socket-name s1))))
+- (socket-bind s2 address port)
+- nil)
+- (address-in-use-error () t)))
+- (socket-close s1)
+- (socket-close s2)))
+- t)
+-
+-#-win32
+-(deftest inet6-socket-bind
+- (let* ((tcp (get-protocol-by-name "tcp"))
+- (address (make-inet6-address "::1"))
+- (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
+- (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
+- (unwind-protect
+- ;; Given the functions we've got so far, if you can think of a
+- ;; better way to make sure the bind succeeded than trying it
+- ;; twice, let me know
+- (handler-case
+- (socket-bind s1 address 0)
+- (socket-error ()
+- ;; This may mean no IPv6 support, can't fail a test
+- ;; because of that
+- t)
+- (:no-error (x)
+- (declare (ignore x))
+- (handler-case
+- (let ((port (nth-value 1 (socket-name s1))))
+- (socket-bind s2 address port)
+- nil)
+- (address-in-use-error () t))))
+- (socket-close s1)
+- (socket-close s2)))
+- t)
++;(deftest inet-socket-bind
++; (let* ((tcp (get-protocol-by-name "tcp"))
++; (address (make-inet-address "127.0.0.1"))
++; (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
++; (s2 (make-instance 'inet-socket :type :stream :protocol tcp)))
++; (unwind-protect
++; ;; Given the functions we've got so far, if you can think of a
++; ;; better way to make sure the bind succeeded than trying it
++; ;; twice, let me know
++; (progn
++; (socket-bind s1 address 0)
++; (handler-case
++; (let ((port (nth-value 1 (socket-name s1))))
++; (socket-bind s2 address port)
++; nil)
++; (address-in-use-error () t)))
++; (socket-close s1)
++; (socket-close s2)))
++; t)
++
++;#-win32
++;(deftest inet6-socket-bind
++; (let* ((tcp (get-protocol-by-name "tcp"))
++; (address (make-inet6-address "::1"))
++; (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
++; (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
++; (unwind-protect
++; ;; Given the functions we've got so far, if you can think of a
++; ;; better way to make sure the bind succeeded than trying it
++; ;; twice, let me know
++; (handler-case
++; (socket-bind s1 address 0)
++; (socket-error ()
++; ;; This may mean no IPv6 support, can't fail a test
++; ;; because of that
++; t)
++; (:no-error (x)
++; (declare (ignore x))
++; (handler-case
++; (let ((port (nth-value 1 (socket-name s1))))
++; (socket-bind s2 address port)
++; nil)
++; (address-in-use-error () t))))
++; (socket-close s1)
++; (socket-close s2)))
++; t)
+
+ (deftest* (simple-sockopt-test)
+ ;; test we can set SO_REUSEADDR on a socket and retrieve it, and in
+@@ -221,37 +221,37 @@
+ ;;; to look at /etc/syslog.conf or local equivalent to find out where
+ ;;; the message ended up
+
+-#-win32
+-(deftest simple-local-client
+- (progn
+- ;; SunOS (Solaris) and Darwin systems don't have a socket at
+- ;; /dev/log. We might also be building in a chroot or
+- ;; something, so don't fail this test just because the file is
+- ;; unavailable, or if it's a symlink to some weird character
+- ;; device.
+- (when (block nil
+- (handler-bind ((sb-posix:syscall-error
+- (lambda (e)
+- (declare (ignore e))
+- (return nil))))
+- (sb-posix:s-issock
+- (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
+- (let ((s (make-instance 'local-socket :type :datagram)))
+- (format t "Connecting ~A... " s)
+- (finish-output)
+- (handler-case
+- (socket-connect s "/dev/log")
+- (sb-bsd-sockets::socket-error ()
+- (setq s (make-instance 'local-socket :type :stream))
+- (format t "failed~%Retrying with ~A... " s)
+- (finish-output)
+- (socket-connect s "/dev/log")))
+- (format t "ok.~%")
+- (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
+- (format stream
+- "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
+- t)
+- t)
++;#-win32
++;(deftest simple-local-client
++; (progn
++; ;; SunOS (Solaris) and Darwin systems don't have a socket at
++; ;; /dev/log. We might also be building in a chroot or
++; ;; something, so don't fail this test just because the file is
++; ;; unavailable, or if it's a symlink to some weird character
++; ;; device.
++; (when (block nil
++; (handler-bind ((sb-posix:syscall-error
++; (lambda (e)
++; (declare (ignore e))
++; (return nil))))
++; (sb-posix:s-issock
++; (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
++; (let ((s (make-instance 'local-socket :type :datagram)))
++; (format t "Connecting ~A... " s)
++; (finish-output)
++; (handler-case
++; (socket-connect s "/dev/log")
++; (sb-bsd-sockets::socket-error ()
++; (setq s (make-instance 'local-socket :type :stream))
++; (format t "failed~%Retrying with ~A... " s)
++; (finish-output)
++; (socket-connect s "/dev/log")))
++; (format t "ok.~%")
++; (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
++; (format stream
++; "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
++; t)
++; t)
+
+
+ ;;; these require that the internet (or bits of it, at least) is available
+@@ -367,59 +367,59 @@
+ len address port (subseq buf 0 (min 10 len)))))))
+
+ #+sb-thread
+-(deftest interrupt-io
+- (let (result)
+- (labels
+- ((client (port)
+- (setf result
+- (let ((s (make-instance 'inet-socket
+- :type :stream
+- :protocol :tcp)))
+- (socket-connect s #(127 0 0 1) port)
+- (let ((stream (socket-make-stream s
+- :input t
+- :output t
+- :buffering :none)))
+- (handler-case
+- (prog1
+- (catch 'stop
+- (progn
+- (read-char stream)
+- (sleep 0.1)
+- (sleep 0.1)
+- (sleep 0.1)))
+- (close stream))
+- (error (c)
+- c))))))
+- (server ()
+- (let ((s (make-instance 'inet-socket
+- :type :stream
+- :protocol :tcp)))
+- (setf (sockopt-reuse-address s) t)
+- (socket-bind s (make-inet-address "127.0.0.1") 0)
+- (socket-listen s 5)
+- (multiple-value-bind (* port)
+- (socket-name s)
+- (let* ((client (sb-thread:make-thread
+- (lambda () (client port))))
+- (r (socket-accept s))
+- (stream (socket-make-stream r
+- :input t
+- :output t
+- :buffering :none))
+- (ok :ok))
+- (socket-close s)
+- (sleep 5)
+- (sb-thread:interrupt-thread client
+- (lambda () (throw 'stop ok)))
+- (sleep 5)
+- (setf ok :not-ok)
+- (write-char #\x stream)
+- (close stream)
+- (socket-close r))))))
+- (server))
+- result)
+- :ok)
++;(deftest interrupt-io
++; (let (result)
++; (labels
++; ((client (port)
++; (setf result
++; (let ((s (make-instance 'inet-socket
++; :type :stream
++; :protocol :tcp)))
++; (socket-connect s #(127 0 0 1) port)
++; (let ((stream (socket-make-stream s
++; :input t
++; :output t
++; :buffering :none)))
++; (handler-case
++; (prog1
++; (catch 'stop
++; (progn
++; (read-char stream)
++; (sleep 0.1)
++; (sleep 0.1)
++; (sleep 0.1)))
++; (close stream))
++; (error (c)
++; c))))))
++; (server ()
++; (let ((s (make-instance 'inet-socket
++; :type :stream
++; :protocol :tcp)))
++; (setf (sockopt-reuse-address s) t)
++; (socket-bind s (make-inet-address "127.0.0.1") 0)
++; (socket-listen s 5)
++; (multiple-value-bind (* port)
++; (socket-name s)
++; (let* ((client (sb-thread:make-thread
++; (lambda () (client port))))
++; (r (socket-accept s))
++; (stream (socket-make-stream r
++; :input t
++; :output t
++; :buffering :none))
++; (ok :ok))
++; (socket-close s)
++; (sleep 5)
++; (sb-thread:interrupt-thread client
++; (lambda () (throw 'stop ok)))
++; (sleep 5)
++; (setf ok :not-ok)
++; (write-char #\x stream)
++; (close stream)
++; (socket-close r))))))
++; (server))
++; result)
++; :ok)
+
+ (defmacro with-client-and-server ((server-socket-var client-socket-var) &body body)
+ (let ((listen-socket (gensym "LISTEN-SOCKET")))
+@@ -478,5 +478,6 @@
+ (define-shutdown-test ,(make-name 'shutdown.client.ub8)
+ client server (unsigned-byte 8) ,direction)))))
+
+- (define-shutdown-tests :output)
+- (define-shutdown-tests :io))
++; (define-shutdown-tests :output)
++; (define-shutdown-tests :io))
++)
diff --git a/dev-lisp/sbcl/files/bsd-sockets-test-1.2.patch b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.patch
new file mode 100644
index 000000000000..7a7b12bdea14
--- /dev/null
+++ b/dev-lisp/sbcl/files/bsd-sockets-test-1.2.patch
@@ -0,0 +1,24 @@
+diff -r -U1 sbcl-1.2.2.orig/contrib/sb-bsd-sockets/tests.lisp sbcl-1.2.2/contrib/sb-bsd-sockets/tests.lisp
+--- sbcl-1.2.2.orig/contrib/sb-bsd-sockets/tests.lisp 2014-07-28 17:15:05.000000000 +0700
++++ sbcl-1.2.2/contrib/sb-bsd-sockets/tests.lisp 2014-08-01 19:48:30.011931081 +0700
+@@ -31,11 +31,11 @@
+ ;;; for unknown protocols...
+-#-(and freebsd sb-thread)
+-#-(and dragonfly sb-thread)
+-(deftest get-protocol-by-name/error
+- (handler-case (get-protocol-by-name "nonexistent-protocol")
+- (unknown-protocol ()
+- t)
+- (:no-error ()
+- nil))
+- t)
++;#-(and freebsd sb-thread)
++;#-(and dragonfly sb-thread)
++;(deftest get-protocol-by-name/error
++; (handler-case (get-protocol-by-name "nonexistent-protocol")
++; (unknown-protocol ()
++; t)
++; (:no-error ()
++; nil))
++; t)
+
diff --git a/dev-lisp/sbcl/files/bsd-sockets-test.patch b/dev-lisp/sbcl/files/bsd-sockets-test.patch
new file mode 100644
index 000000000000..d08fd8610b89
--- /dev/null
+++ b/dev-lisp/sbcl/files/bsd-sockets-test.patch
@@ -0,0 +1,22 @@
+diff -r -U1 sbcl-1.1.14.orig/contrib/sb-bsd-sockets/tests.lisp sbcl-1.1.14/contrib/sb-bsd-sockets/tests.lisp
+--- sbcl-1.1.14.orig/contrib/sb-bsd-sockets/tests.lisp 2013-11-30 21:28:17.000000000 +0700
++++ sbcl-1.1.14/contrib/sb-bsd-sockets/tests.lisp 2014-01-11 20:48:22.762700792 +0700
+@@ -31,10 +31,10 @@
+ ;;; for unknown protocols...
+-#-(and freebsd sb-thread)
+-(deftest get-protocol-by-name/error
+- (handler-case (get-protocol-by-name "nonexistent-protocol")
+- (unknown-protocol ()
+- t)
+- (:no-error ()
+- nil))
+- t)
++;#-(and freebsd sb-thread)
++;(deftest get-protocol-by-name/error
++; (handler-case (get-protocol-by-name "nonexistent-protocol")
++; (unknown-protocol ()
++; t)
++; (:no-error ()
++; nil))
++; t)
+
diff --git a/dev-lisp/sbcl/files/concurrency-test-1.2.6.patch b/dev-lisp/sbcl/files/concurrency-test-1.2.6.patch
new file mode 100644
index 000000000000..b85fc168ed0e
--- /dev/null
+++ b/dev-lisp/sbcl/files/concurrency-test-1.2.6.patch
@@ -0,0 +1,24 @@
+diff -Nuar a/contrib/sb-concurrency/tests/test-frlock.lisp b/contrib/sb-concurrency/tests/test-frlock.lisp
+--- a/contrib/sb-concurrency/tests/test-frlock.lisp 2014-11-29 19:56:58.000000000 +0100
++++ b/contrib/sb-concurrency/tests/test-frlock.lisp 2014-12-16 23:52:18.569947139 +0100
+@@ -22,9 +22,9 @@
+ #+openbsd 0.01
+ #-openbsd 0.0001)
+
+-(defun test-frlocks (&key (reader-count 100) (read-count 1000000)
++(defun test-frlocks (&key (reader-count 50) (read-count 500000)
+ (outer-read-pause 0) (inner-read-pause 0)
+- (writer-count 10) (write-count (/ 1 *minimum-sleep*))
++ (writer-count 10) (write-count 5000)
+ (outer-write-pause *minimum-sleep*) (inner-write-pause 0))
+ (let ((rw (make-frlock))
+ (a 0)
+@@ -87,7 +87,7 @@
+ #+sb-thread
+ (deftest* (frlock.1 :fails-on :win32)
+ (handler-case
+- (sb-ext:with-timeout 60 (test-frlocks))
++ (sb-ext:with-timeout 240 (test-frlocks))
+ (sb-ext:timeout (c)
+ (error "~A" c)))
+ nil
diff --git a/dev-lisp/sbcl/files/concurrency-test.patch b/dev-lisp/sbcl/files/concurrency-test.patch
new file mode 100644
index 000000000000..2c97488cc3d7
--- /dev/null
+++ b/dev-lisp/sbcl/files/concurrency-test.patch
@@ -0,0 +1,16 @@
+diff -r -U1 sbcl-1.1.12.orig/contrib/sb-concurrency/tests/test-frlock.lisp sbcl-1.1.12/contrib/sb-concurrency/tests/test-frlock.lisp
+--- sbcl-1.1.12.orig/contrib/sb-concurrency/tests/test-frlock.lisp 2013-09-30 20:15:42.000000000 +0700
++++ sbcl-1.1.12/contrib/sb-concurrency/tests/test-frlock.lisp 2013-10-14 20:43:05.586366791 +0700
+@@ -19,5 +19,5 @@
+
+-(defun test-frlocks (&key (reader-count 100) (read-count 1000000)
++(defun test-frlocks (&key (reader-count 50) (read-count 500000)
+ (outer-read-pause 0) (inner-read-pause 0)
+- (writer-count 10) (write-count 10000)
++ (writer-count 10) (write-count 5000)
+ (outer-write-pause 0.0001) (inner-write-pause 0))
+@@ -84,3 +84,3 @@
+ (handler-case
+- (sb-ext:with-timeout 60 (test-frlocks))
++ (sb-ext:with-timeout 240 (test-frlocks))
+ (sb-ext:timeout (c)
diff --git a/dev-lisp/sbcl/files/gentoo-fix_install_man.patch b/dev-lisp/sbcl/files/gentoo-fix_install_man.patch
new file mode 100644
index 000000000000..87a5f43c0c13
--- /dev/null
+++ b/dev-lisp/sbcl/files/gentoo-fix_install_man.patch
@@ -0,0 +1,12 @@
+diff --git a/install.sh b/install.sh
+index 1400791..ac149c1 100644
+--- a/install.sh
++++ b/install.sh
+@@ -106,6 +106,7 @@ echo "Documentation:"
+
+ # man
+ cp doc/sbcl.1 "$BUILD_ROOT$MAN_DIR"/man1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl.1"
++cp doc/sbcl-asdf-install.1 "$BUILD_ROOT$MAN_DIR"/man1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl-asdf-install.1"
+
+ # info
+ for info in doc/manual/*.info
diff --git a/dev-lisp/sbcl/files/gentoo-fix_linux-os-c.patch b/dev-lisp/sbcl/files/gentoo-fix_linux-os-c.patch
new file mode 100644
index 000000000000..b5c593051186
--- /dev/null
+++ b/dev-lisp/sbcl/files/gentoo-fix_linux-os-c.patch
@@ -0,0 +1,14 @@
+--- a/src/runtime/linux-os.c 2009-05-01 13:30:51.000000000 +0300
++++ b/src/runtime/linux-os.c 2010-03-24 02:30:48.000000000 +0200
+@@ -56,11 +56,7 @@
+ #include "cheneygc-internal.h"
+ #endif
+
+-#ifdef LISP_FEATURE_X86
+-/* Prototype for personality(2). Done inline here since the header file
+- * for this isn't available on old versions of glibc. */
+ int personality (unsigned long);
+-#endif
+
+ size_t os_vm_page_size;
+
diff --git a/dev-lisp/sbcl/files/gentoo-fix_nopie_for_hardened_toolchain.patch b/dev-lisp/sbcl/files/gentoo-fix_nopie_for_hardened_toolchain.patch
new file mode 100644
index 000000000000..d4f94ca2382f
--- /dev/null
+++ b/dev-lisp/sbcl/files/gentoo-fix_nopie_for_hardened_toolchain.patch
@@ -0,0 +1,24 @@
+diff -ur b/src/runtime/Config.x86-linux a/src/runtime/Config.x86-linux
+--- b/src/runtime/Config.x86-linux 2012-01-09 02:08:10.000000000 +0000
++++ a/src/runtime/Config.x86-linux 2012-02-02 14:32:56.000000000 +0000
+@@ -27,7 +27,7 @@
+ # (You *are* encouraged to design and implement a coherent stable
+ # interface, though.:-| As far as I (WHN 2002-05-19) know, no one is
+ # working on one and it would be a nice thing to have.)
+-LINKFLAGS += -Wl,--export-dynamic -m32
++LINKFLAGS += -Wl,--export-dynamic -m32 -nopie
+ OS_LIBS = -ldl
+
+ ifdef LISP_FEATURE_LARGEFILE
+diff -ur b/src/runtime/Config.x86_64-linux a/src/runtime/Config.x86_64-linux
+--- b/src/runtime/Config.x86_64-linux 2012-01-09 02:08:10.000000000 +0000
++++ a/src/runtime/Config.x86_64-linux 2012-02-02 14:32:44.000000000 +0000
+@@ -27,7 +27,7 @@
+ # (You *are* encouraged to design and implement a coherent stable
+ # interface, though.:-| As far as I (WHN 2002-05-19) know, no one is
+ # working on one and it would be a nice thing to have.)
+-LINKFLAGS += -Wl,--export-dynamic
++LINKFLAGS += -Wl,--export-dynamic -nopie
+ OS_LIBS = -ldl
+
+ ifdef LISP_FEATURE_LARGEFILE
diff --git a/dev-lisp/sbcl/files/gentoo_fix_waitpid_c.patch b/dev-lisp/sbcl/files/gentoo_fix_waitpid_c.patch
new file mode 100644
index 000000000000..33b89b224f29
--- /dev/null
+++ b/dev-lisp/sbcl/files/gentoo_fix_waitpid_c.patch
@@ -0,0 +1,11 @@
+diff -uNr sbcl-1.0.55.orig/src/runtime/run-program.c sbcl-1.0.55/src/runtime/run-program.c
+--- a/src/runtime/run-program.c 2012-03-26 06:01:42.000000000 -0400
++++ b/src/runtime/run-program.c 2012-03-26 06:02:07.000000000 -0400
+@@ -20,6 +20,7 @@
+ #include <stdlib.h>
+ #include <sys/file.h>
+ #include <sys/types.h>
++#include <sys/wait.h>
+ #include <signal.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
diff --git a/dev-lisp/sbcl/files/sbcl-1.0.55-newglibc.patch b/dev-lisp/sbcl/files/sbcl-1.0.55-newglibc.patch
new file mode 100644
index 000000000000..dbc94b06d4c9
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl-1.0.55-newglibc.patch
@@ -0,0 +1,43 @@
+Fixes for glibc 2.17.
+
+linux-os.c is just a missing header (for personality()).
+
+In x86-64-linux-os.c, __USE_GNU is a glibc-internal name that features.h
+defines; _GNU_SOURCE is what it should actually be using to get GNU extensions.
+
+diff -x config.log -x config.status -ru tmp/sbcl-1.1.2/src/runtime/linux-os.c work/sbcl-1.1.2/src/runtime/linux-os.c
+--- tmp/sbcl-1.1.2/src/runtime/linux-os.c 2012-12-01 11:32:38.000000000 +0000
++++ work/sbcl-1.1.2/src/runtime/linux-os.c 2012-12-31 01:20:37.619000000 +0000
+@@ -46,6 +46,7 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <linux/version.h>
++#include <sys/personality.h>
+
+ #include "validate.h"
+ #include "thread.h"
+diff -x config.log -x config.status -ru tmp/sbcl-1.1.2/src/runtime/x86-64-linux-os.c work/sbcl-1.1.2/src/runtime/x86-64-linux-os.c
+--- tmp/sbcl-1.1.2/src/runtime/x86-64-linux-os.c 2012-12-01 11:32:38.000000000 +0000
++++ work/sbcl-1.1.2/src/runtime/x86-64-linux-os.c 2012-12-31 01:20:25.450000000 +0000
+@@ -14,6 +14,9 @@
+ * files for more information.
+ */
+
++/* This is to get REG_RAX etc. from sys/ucontext.h. */
++#define _GNU_SOURCE
++
+ #include <stdio.h>
+ #include <stddef.h>
+ #include <sys/param.h>
+@@ -21,11 +24,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <errno.h>
+-
+-#define __USE_GNU
+ #include <sys/ucontext.h>
+-#undef __USE_GNU
+-
+
+ #include "./signal.h"
+ #include "os.h"
diff --git a/dev-lisp/sbcl/files/sbcl-1.0.55_no_doc_install.patch b/dev-lisp/sbcl/files/sbcl-1.0.55_no_doc_install.patch
new file mode 100644
index 000000000000..458c637124d7
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl-1.0.55_no_doc_install.patch
@@ -0,0 +1,61 @@
+#Patch by Jesus Rivero <neurogeek@gentoo.org>
+#Added: Mar 26, 2012
+#Gentoo Specific, not sent upstream
+
+diff -uNr a/install.sh b/install.sh
+--- a/install.sh 2012-03-26 07:17:28.000000000 -0400
++++ b/install.sh 2012-03-26 07:17:56.000000000 -0400
+@@ -101,52 +101,3 @@
+ # share/man/ manpages, should be the same as man/
+ # share/info/ info files
+ # share/doc/ misc documentation
+-
+-echo
+-echo "Documentation:"
+-
+-# man
+-cp doc/sbcl.1 "$BUILD_ROOT$MAN_DIR"/man1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl.1"
+-cp doc/sbcl-asdf-install.1 "$BUILD_ROOT$MAN_DIR"/man1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl-asdf-install.1"
+-
+-# info
+-for info in doc/manual/*.info
+-do
+- cp $info "$BUILD_ROOT$INFO_DIR"/ \
+- && BN=`basename $info` \
+- && DIRFAIL=`install-info --info-dir="$BUILD_ROOT$INFO_DIR" \
+- "$BUILD_ROOT$INFO_DIR"/$BN > /dev/null 2>&1 \
+- || echo "(could not add to system catalog)"` \
+- && echo " info $BUILD_ROOT$INFO_DIR/`basename $info` [$BUILD_ROOT$INFO_DIR/dir] $DIRFAIL"
+-done
+-
+-for info in doc/manual/*.info-*
+-do
+- cp $info "$BUILD_ROOT$INFO_DIR"/ \
+- && echo " info $BUILD_ROOT$INFO_DIR/`basename $info`"
+-done
+-
+-# pdf
+-for pdf in doc/manual/*.pdf
+-do
+- cp $pdf "$BUILD_ROOT$DOC_DIR"/ \
+- && echo " pdf $BUILD_ROOT$DOC_DIR/`basename $pdf`"
+-done
+-
+-# html
+-for html in doc/manual/sbcl doc/manual/asdf
+-do
+- test -d $html && cp -R -L $html "$BUILD_ROOT$DOC_DIR"/html \
+- && echo " html $BUILD_ROOT$DOC_DIR/html/`basename $html`/index.html"
+-done
+-
+-for html in doc/manual/sbcl.html doc/manual/asdf.html
+-do
+- cp $html "$BUILD_ROOT$DOC_DIR"/ \
+- && echo " html $BUILD_ROOT$DOC_DIR/`basename $html`"
+-done
+-
+-for f in BUGS CREDITS COPYING NEWS
+-do
+- cp $f "$BUILD_ROOT$DOC_DIR"/
+-done
+
diff --git a/dev-lisp/sbcl/files/sbcl-1.0.6-solaris.patch b/dev-lisp/sbcl/files/sbcl-1.0.6-solaris.patch
new file mode 100644
index 000000000000..c18ec1e5cc98
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl-1.0.6-solaris.patch
@@ -0,0 +1,13 @@
+--- src/runtime/Config.x86-sunos
++++ src/runtime/Config.x86-sunos
+@@ -2,8 +2,8 @@
+ CFLAGS = -g -O2 -Wall -D__EXTENSIONS__ -D_POSIX_C_SOURCE=199506L -DSVR4 -D_REENTRANT
+ ASFLAGS = -Wall
+ LD = ld
+-NM = nm -xgp
+-GREP = ggrep
++NM = nm -t x -p
++GREP = grep
+
+ ASSEM_SRC = x86-assem.S ldso-stubs.S
+ ARCH_SRC = x86-arch.c
diff --git a/dev-lisp/sbcl/files/sbcl-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch b/dev-lisp/sbcl/files/sbcl-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
new file mode 100644
index 000000000000..bf03ada518fe
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
@@ -0,0 +1,22 @@
+--- sbcl-1.1.17-orig/src/runtime/Config.x86-linux 2014-03-31 03:14:22.000000000 +1100
++++ sbcl-1.1.17/src/runtime/Config.x86-linux 2014-04-28 15:34:59.822482441 +1000
+@@ -27,7 +27,7 @@
+ # (You *are* encouraged to design and implement a coherent stable
+ # interface, though.:-| As far as I (WHN 2002-05-19) know, no one is
+ # working on one and it would be a nice thing to have.)
+-LINKFLAGS += -Wl,--export-dynamic -m32
++LINKFLAGS += -Wl,--export-dynamic -m32 -nopie
+ OS_LIBS = -ldl
+
+ ifdef LISP_FEATURE_LARGEFILE
+--- sbcl-1.1.17-orig/src/runtime/Config.x86-64-linux 2014-03-31 03:14:22.000000000 +1100
++++ sbcl-1.1.17/src/runtime/Config.x86-64-linux 2014-04-28 15:35:22.364623003 +1000
+@@ -27,7 +27,7 @@
+ # (You *are* encouraged to design and implement a coherent stable
+ # interface, though.:-| As far as I (WHN 2002-05-19) know, no one is
+ # working on one and it would be a nice thing to have.)
+-LINKFLAGS += -Wl,--export-dynamic
++LINKFLAGS += -Wl,--export-dynamic -nopie
+ OS_LIBS = -ldl
+
+ ifdef LISP_FEATURE_LARGEFILE
diff --git a/dev-lisp/sbcl/files/sbcl-1.2.11-solaris.patch b/dev-lisp/sbcl/files/sbcl-1.2.11-solaris.patch
new file mode 100644
index 000000000000..850fd5d9dba7
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl-1.2.11-solaris.patch
@@ -0,0 +1,12 @@
+diff -r -U2 sbcl-1.2.11.orig/src/runtime/Config.x86-sunos sbcl-1.2.11/src/runtime/Config.x86-sunos
+--- sbcl-1.2.11.orig/src/runtime/Config.x86-sunos 2015-04-27 20:56:50.000000000 +0600
++++ sbcl-1.2.11/src/runtime/Config.x86-sunos 2015-04-28 22:38:01.569103626 +0600
+@@ -12,6 +12,6 @@
+ CC=gcc
+ CFLAGS = -g -O2 -Wall -D__EXTENSIONS__ -D_POSIX_C_SOURCE=199506L -DSVR4 -D_REENTRANT -fno-omit-frame-pointer
+-NM = nm -xgp
+-GREP = ggrep
++NM = nm -t x -p
++GREP = grep
+
+ ASSEM_SRC = x86-assem.S ldso-stubs.S
diff --git a/dev-lisp/sbcl/files/sbcl-1.2.13-verbose-build.patch b/dev-lisp/sbcl/files/sbcl-1.2.13-verbose-build.patch
new file mode 100644
index 000000000000..ade4f0868c67
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl-1.2.13-verbose-build.patch
@@ -0,0 +1,25 @@
+diff -r -U2 sbcl-1.2.13.orig/make.sh sbcl-1.2.13/make.sh
+--- sbcl-1.2.13.orig/make.sh 2015-06-29 01:24:03.000000000 +0600
++++ sbcl-1.2.13/make.sh 2015-06-29 15:53:04.430927942 +0600
+@@ -25,5 +25,5 @@
+ # any --xc-host parameter should be suitable for the host machine
+ # instead of the target.
+-sh make-config.sh "$@" || exit $?
++sh -x make-config.sh "$@" || exit $?
+
+ . output/prefix.def
+@@ -70,9 +70,9 @@
+ # and the make-target-*.sh scripts will take care of transferring the
+ # necessary files.
+-time sh make-host-1.sh
+-time sh make-target-1.sh
+-time sh make-host-2.sh
+-time sh make-target-2.sh
+-time sh make-target-contrib.sh
++time sh -x make-host-1.sh
++time sh -x make-target-1.sh
++time sh -x make-host-2.sh
++time sh -x make-target-2.sh
++time sh -x make-target-contrib.sh
+
+ NCONTRIBS=`find contrib -name Makefile -print | wc -l`
diff --git a/dev-lisp/sbcl/files/sbcl-1.2.7-verbose-build.patch b/dev-lisp/sbcl/files/sbcl-1.2.7-verbose-build.patch
new file mode 100644
index 000000000000..60ead9f3e70a
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl-1.2.7-verbose-build.patch
@@ -0,0 +1,28 @@
+--- sbcl-1.2.7-orig/make.sh 2015-01-01 06:09:07.000000000 +1100
++++ sbcl-1.2.7/make.sh 2015-01-31 13:06:09.652480932 +1100
+@@ -24,7 +24,7 @@
+ # thing" when run on the target machine, with the minor caveat that
+ # any --xc-host parameter should be suitable for the host machine
+ # instead of the target.
+-sh make-config.sh "$@" || exit $?
++sh -x make-config.sh "$@" || exit $?
+
+ . output/prefix.def
+ . output/build-config
+@@ -64,11 +64,11 @@
+ # Or, if you can set up the files somewhere shared (with NFS, AFS, or
+ # whatever) between the host machine and the target machine, the basic
+ # procedure above should still work, but you can skip the "copy" steps.
+-time sh make-host-1.sh
+-time sh make-target-1.sh
+-time sh make-host-2.sh
+-time sh make-target-2.sh
+-time sh make-target-contrib.sh
++time sh -x make-host-1.sh
++time sh -x make-target-1.sh
++time sh -x make-host-2.sh
++time sh -x make-target-2.sh
++time sh -x make-target-contrib.sh
+
+ NCONTRIBS=`find contrib -name Makefile -print | wc -l`
+ NPASSED=`find obj/asdf-cache -name test-passed.test-report -print | wc -l`
diff --git a/dev-lisp/sbcl/metadata.xml b/dev-lisp/sbcl/metadata.xml
new file mode 100644
index 000000000000..04e46eae8af5
--- /dev/null
+++ b/dev-lisp/sbcl/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pchrist@gentoo.org</email>
+ <name>Panagiotis Christopoulos</name>
+ <description>primary-maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>sionescu+gentoo@cddr.org</email>
+ <name>Stelian Ionescu (fe[nl]ix)</name>
+ <description>second-maintainer</description>
+ </maintainer>
+ <herd>common-lisp</herd>
+ <herd>proxy-maintainers</herd>
+ <longdescription>Steel Bank Common Lisp is an open source Common
+ Lisp implementation. It provides an integrated native compiler,
+ interpreter, and debugger. SBCL is a fork off of the main branch
+ of CMUCL. SBCL is distinguished from CMUCL by a greater emphasis
+ on maintainability. In particular, the SBCL system can be built
+ directly from its source code, so that the output corresponds to
+ the source code in a controlled, verifiable way, and arbitrary
+ changes can be made to the system without causing bootstrapping
+ problems. SBCL also places less emphasis than CMU CL does on new
+ non-ANSI extensions, or on backward compatibility with old
+ non-ANSI features. Support for native threading on GNU/Linux is
+ available for the x86 and amd64 platforms using an NPTL enabled
+ GLIBC. SBCL 0.8.17 and later support Unicode.
+</longdescription>
+ <use>
+ <flag name="asdf">Include support for <pkg>dev-lisp/asdf in SBCL</pkg></flag>
+ <flag name="ldb">Include support for the SBCL low level debugger</flag>
+ <flag name="pax_kernel">Enable if the user plans to run the package under a pax enabled hardened kernel</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">sbcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lisp/sbcl/sbcl-1.0.55-r1.ebuild b/dev-lisp/sbcl/sbcl-1.0.55-r1.ebuild
new file mode 100644
index 000000000000..e179ed29b59e
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.0.55-r1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.0.37
+BV_AMD64=1.0.37
+BV_PPC=1.0.28
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="+asdf ldb source +threads +unicode debug doc pax_kernel"
+
+DEPEND="doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="asdf? ( >=dev-lisp/gentoo-init-0.1 )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ cat > "${CONFIG}" <<'EOF'
+(lambda (list)
+ (flet ((enable (x) (pushnew x list))
+ (disable (x) (setf list (remove x list))))
+EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "$(usep ldb)" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ cat >> "${CONFIG}" <<'EOF'
+ )
+ list)
+EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-linux sbcl-binary
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ epatch "${FILESDIR}"/gentoo-fix_linux-os-c.patch
+ epatch "${FILESDIR}"/gentoo_fix_waitpid_c.patch
+
+ if use !doc; then
+ epatch "${FILESDIR}"/${P}_no_doc_install.patch
+ fi
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #463882, patch from upstream https://bugs.launchpad.net/sbcl/+bug/1095036
+ epatch "${FILESDIR}"/${P}-newglibc.patch
+
+ # bug #526194
+ sed -e "s@CFLAGS =@CFLAGS = ${CFLAGS}@" \
+ -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh
+ sed "s,/lib,/$(get_libdir),g" -i install.sh
+ sed "s,/usr/local/lib,/usr/$(get_libdir),g" -i src/runtime/runtime.c # #define SBCL_HOME ...
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if use pax_kernel ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^echo \/\/doing warm init - compilation phase$/a\paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ cat > "${D}"/etc/sbclrc <<EOF
+;;; The following is required if you want source location functions to
+;;; work in SLIME, for example.
+
+(setf (logical-pathname-translations "SYS")
+ '(("SYS:SRC;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/src/**/*.*")
+ ("SYS:CONTRIB;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/**/*.*")))
+EOF
+ if use asdf; then
+ cat >> "${D}"/etc/sbclrc <<EOF
+
+;;; Setup ASDF2
+(load "/etc/gentoo-init.lisp")
+EOF
+ fi
+
+ unset SBCL_HOME
+ INSTALL_ROOT="${D}/usr" LIB_DIR="/usr/$(get_libdir)" DOC_DIR="${D}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # Install documentation
+ # rm empty directories lest paludis complain about this
+ find "${D}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${D}/usr/share/doc/${PF}"
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${D}/usr/$(get_libdir)/sbcl/"
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.1.18.ebuild b/dev-lisp/sbcl/sbcl-1.1.18.ebuild
new file mode 100644
index 000000000000..0b14a4900a21
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.1.18.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.0.58
+BV_AMD64=1.1.18
+BV_PPC=1.0.28
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND="=dev-lisp/asdf-3.0*:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.3 || ( <sys-libs/glibc-2.6[nptl] >=sys-libs/glibc-2.6 ) )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-linux sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ epatch "${FILESDIR}"/gentoo-fix_linux-os-c.patch
+ # bug #468482
+ epatch "${FILESDIR}"/concurrency-test.patch
+ # bug #486552
+ epatch "${FILESDIR}"/bsd-sockets-test.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =@CFLAGS = ${CFLAGS}@" \
+ -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^echo \/\/doing warm init - compilation phase$/a\paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${D}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${D}/usr" LIB_DIR="/usr/$(get_libdir)" DOC_DIR="${D}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # rm empty directories lest paludis complain about this
+ find "${D}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${D}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${D}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.2.10.ebuild b/dev-lisp/sbcl/sbcl-1.2.10.ebuild
new file mode 100644
index 000000000000..0eae4e2d66f5
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.2.10.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.2.7
+BV_AMD64=1.2.10
+BV_PPC=1.2.7
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+BV_ARM=1.2.7
+BV_PPC_MACOS=1.0.47
+BV_X86_MACOS=1.1.6
+BV_X64_MACOS=1.1.8
+BV_SPARC_SOLARIS=1.0.23
+BV_X86_SOLARIS=1.2.7
+BV_X64_SOLARIS=1.2.7
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
+ arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
+ ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
+ x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
+ x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
+ sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
+ x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
+ x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND=">=dev-lisp/asdf-3.1:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-* sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ # bug #468482
+ epatch "${FILESDIR}"/concurrency-test-1.2.6.patch
+ # bugs #486552, #527666, #517004
+ epatch "${FILESDIR}"/bsd-sockets-test-1.2.9.patch
+
+ epatch "${FILESDIR}"/${PN}-1.0.6-solaris.patch
+ epatch "${FILESDIR}"/${PN}-1.2.7-verbose-build.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =.*\$@CFLAGS = ${CFLAGS} -g -Wall -Wsign-compare@" \
+ -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
+ -i make-config.sh || die
+
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+ # change location of /etc/sbclrc ...
+ sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" PATH="${PATH}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # bug #517008
+ pax-mark -mr "${D}"/usr/bin/sbcl
+
+ # rm empty directories lest paludis complain about this
+ find "${ED}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${ED}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.2.11.ebuild b/dev-lisp/sbcl/sbcl-1.2.11.ebuild
new file mode 100644
index 000000000000..76ec4b262e59
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.2.11.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.2.7
+BV_AMD64=1.2.11
+BV_PPC=1.2.7
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+BV_ARM=1.2.7
+BV_PPC_MACOS=1.0.47
+BV_X86_MACOS=1.1.6
+BV_X64_MACOS=1.1.8
+BV_SPARC_SOLARIS=1.0.23
+BV_X86_SOLARIS=1.2.7
+BV_X64_SOLARIS=1.2.7
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
+ arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
+ ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
+ x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
+ x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
+ sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
+ x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
+ x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND=">=dev-lisp/asdf-3.1:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-* sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ # bug #468482
+ epatch "${FILESDIR}"/concurrency-test-1.2.6.patch
+ # bugs #486552, #527666, #517004
+ epatch "${FILESDIR}"/bsd-sockets-test-1.2.11.patch
+
+ epatch "${FILESDIR}"/${PN}-1.2.11-solaris.patch
+ epatch "${FILESDIR}"/${PN}-1.2.7-verbose-build.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =.*\$@CFLAGS = ${CFLAGS} -g -Wall -Wsign-compare@" \
+ -e "s@LINKFLAGS =.*\$@LINKFLAGS = ${LDFLAGS} -g@" \
+ -i src/runtime/GNUmakefile || die
+
+ sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
+ -i make-config.sh || die
+
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+ # change location of /etc/sbclrc ...
+ sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" PATH="${PATH}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # bug #517008
+ pax-mark -mr "${D}"/usr/bin/sbcl
+
+ # rm empty directories lest paludis complain about this
+ find "${ED}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${ED}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.2.13.ebuild b/dev-lisp/sbcl/sbcl-1.2.13.ebuild
new file mode 100644
index 000000000000..c1cd8c033b00
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.2.13.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.2.7
+BV_AMD64=1.2.13
+BV_PPC=1.2.7
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+BV_ARM=1.2.7
+BV_PPC_MACOS=1.0.47
+BV_X86_MACOS=1.1.6
+BV_X64_MACOS=1.1.8
+BV_SPARC_SOLARIS=1.0.23
+BV_X86_SOLARIS=1.2.7
+BV_X64_SOLARIS=1.2.7
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
+ arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
+ ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
+ x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
+ x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
+ sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
+ x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
+ x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND=">=dev-lisp/asdf-3.1:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-* sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ # bug #468482
+ epatch "${FILESDIR}"/concurrency-test-1.2.6.patch
+ # bugs #486552, #527666, #517004
+ epatch "${FILESDIR}"/bsd-sockets-test-1.2.11.patch
+
+ epatch "${FILESDIR}"/${PN}-1.2.11-solaris.patch
+ epatch "${FILESDIR}"/${PN}-1.2.13-verbose-build.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =.*\$@CFLAGS = ${CFLAGS} -g -Wall -Wsign-compare@" \
+ -e "s@LINKFLAGS =.*\$@LINKFLAGS = ${LDFLAGS} -g@" \
+ -i src/runtime/GNUmakefile || die
+
+ sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
+ -i make-config.sh || die
+
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+ # change location of /etc/sbclrc ...
+ sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" PATH="${PATH}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # bug #517008
+ pax-mark -mr "${D}"/usr/bin/sbcl
+
+ # rm empty directories lest paludis complain about this
+ find "${ED}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${ED}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.2.2.ebuild b/dev-lisp/sbcl/sbcl-1.2.2.ebuild
new file mode 100644
index 000000000000..66a59c36f232
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.2.2.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.0.58
+BV_AMD64=1.2.2
+BV_PPC=1.0.28
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND="=dev-lisp/asdf-3.0*:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.3 || ( <sys-libs/glibc-2.6[nptl] >=sys-libs/glibc-2.6 ) )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-linux sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ epatch "${FILESDIR}"/gentoo-fix_linux-os-c.patch
+ # bug #468482
+ epatch "${FILESDIR}"/concurrency-test.patch
+ # bug #486552
+ epatch "${FILESDIR}"/bsd-sockets-test-1.2.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =@CFLAGS = ${CFLAGS}@" \
+ -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${D}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${D}/usr" LIB_DIR="/usr/$(get_libdir)" DOC_DIR="${D}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # rm empty directories lest paludis complain about this
+ find "${D}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${D}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${D}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.2.4.ebuild b/dev-lisp/sbcl/sbcl-1.2.4.ebuild
new file mode 100644
index 000000000000..f498c332271a
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.2.4.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.0.58
+BV_AMD64=1.2.4
+BV_PPC=1.0.28
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND=">=dev-lisp/asdf-3.1:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.3 || ( <sys-libs/glibc-2.6[nptl] >=sys-libs/glibc-2.6 ) )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-linux sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ epatch "${FILESDIR}"/gentoo-fix_linux-os-c.patch
+ # bug #468482
+ epatch "${FILESDIR}"/concurrency-test.patch
+ # bug #486552
+ epatch "${FILESDIR}"/bsd-sockets-test-1.2.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =@CFLAGS = ${CFLAGS}@" \
+ -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${D}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${D}/usr" LIB_DIR="/usr/$(get_libdir)" DOC_DIR="${D}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # rm empty directories lest paludis complain about this
+ find "${D}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${D}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${D}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.2.6.ebuild b/dev-lisp/sbcl/sbcl-1.2.6.ebuild
new file mode 100644
index 000000000000..f11863fb4593
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.2.6.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.0.58
+BV_AMD64=1.2.6
+BV_PPC=1.0.28
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND=">=dev-lisp/asdf-3.1:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.6 )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-linux sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ # bug #468482
+ epatch "${FILESDIR}/concurrency-test-${PV}.patch"
+ # bugs #486552, #527666
+ epatch "${FILESDIR}"/bsd-sockets-test-${PV}.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =@CFLAGS = ${CFLAGS}@" \
+ -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${D}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${D}/usr" LIB_DIR="/usr/$(get_libdir)" DOC_DIR="${D}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # rm empty directories lest paludis complain about this
+ find "${D}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${D}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${D}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.2.7.ebuild b/dev-lisp/sbcl/sbcl-1.2.7.ebuild
new file mode 100644
index 000000000000..8c7c70271b30
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.2.7.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.2.7
+BV_AMD64=1.2.7
+BV_PPC=1.2.7
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+BV_ARM=1.2.7
+BV_PPC_MACOS=1.0.47
+BV_X86_MACOS=1.1.6
+BV_X64_MACOS=1.1.8
+BV_SPARC_SOLARIS=1.0.23
+BV_X86_SOLARIS=1.2.7
+BV_X64_SOLARIS=1.2.7
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
+ arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
+ ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
+ x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
+ x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
+ sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
+ x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
+ x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND=">=dev-lisp/asdf-3.1:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-* sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ # bug #468482
+ epatch "${FILESDIR}/concurrency-test-1.2.6.patch"
+ # bugs #486552, #527666
+ epatch "${FILESDIR}"/bsd-sockets-test-${PV}.patch
+
+ epatch "${FILESDIR}"/${PN}-1.0.6-solaris.patch
+ epatch "${FILESDIR}"/${PN}-1.2.7-verbose-build.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =@CFLAGS = ${CFLAGS}@" \
+ -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
+ -i make-config.sh || die
+
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+ # change location of /etc/sbclrc ...
+ sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" PATH="${PATH}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # rm empty directories lest paludis complain about this
+ find "${ED}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${ED}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/sbcl/sbcl-1.2.9.ebuild b/dev-lisp/sbcl/sbcl-1.2.9.ebuild
new file mode 100644
index 000000000000..48046f30011d
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.2.9.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib eutils flag-o-matic pax-utils
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.2.7
+BV_AMD64=1.2.9
+BV_PPC=1.2.7
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+BV_ARM=1.2.7
+BV_PPC_MACOS=1.0.47
+BV_X86_MACOS=1.1.6
+BV_X64_MACOS=1.1.8
+BV_SPARC_SOLARIS=1.0.23
+BV_X86_SOLARIS=1.2.7
+BV_X64_SOLARIS=1.2.7
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
+ arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
+ ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
+ x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
+ x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
+ sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
+ x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
+ x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND=">=dev-lisp/asdf-3.1:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+RDEPEND="${CDEPEND}
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl"
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+# Prevent ASDF from using the system libraries
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ sed 's/^X//' > "${CONFIG}" <<-'EOF'
+ (lambda (list)
+ X (flet ((enable (x) (pushnew x list))
+ X (disable (x) (setf list (remove x list))))
+ EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "true" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ sbcl_feature "$(usep zlib)" ":sb-core-compression"
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
+ sed 's/^X//' >> "${CONFIG}" <<-'EOF'
+ X )
+ X list)
+ EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-* sbcl-binary || die
+ cd "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch
+ # bug #468482
+ epatch "${FILESDIR}"/concurrency-test-1.2.6.patch
+ # bugs #486552, #527666, #517004
+ epatch "${FILESDIR}"/bsd-sockets-test-1.2.9.patch
+
+ epatch "${FILESDIR}"/${PN}-1.0.6-solaris.patch
+ epatch "${FILESDIR}"/${PN}-1.2.7-verbose-build.patch
+
+ # To make the hardened compiler NOT compile with -fPIE -pie
+ if gcc-specs-pie ; then
+ einfo "Disabling PIE..."
+ epatch "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch
+ fi
+
+ # bug #526194
+ sed -e "s@CFLAGS =@CFLAGS = ${CFLAGS}@" \
+ -e "s@LINKFLAGS =@LINKFLAGS = ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
+ -i make-config.sh || die
+
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ # Some shells(such as dash) don't have "time" as builtin
+ # and we don't want to DEPEND on sys-process/time
+ sed "s,^time ,," -i make.sh || die
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die
+ # #define SBCL_HOME ...
+ sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
+ # change location of /etc/sbclrc ...
+ sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer
+
+ if host-is-pax ; then
+ # To disable PaX on hardened systems
+ pax-mark -mr "${bindir}"/src/runtime/sbcl
+
+ # Hack to disable PaX on second GENESIS stage
+ sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
+ fi
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" PATH="${PATH}" \
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
+ GNUMAKE=make ./make.sh \
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" PATH="${PATH}" \
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
+ make -C doc/internals info html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+ ewarn "Unfortunately, it is known that some tests fail eg."
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's"
+ ewarn "development and not of Gentoo's side. Please, before filing"
+ ewarn "any bug(s) search for older submissions. Thank you."
+ time ( cd tests && sh run-tests.sh )
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
+ ;;; The following is required if you want source location functions to
+ ;;; work in SLIME, for example.
+ X
+ (setf (logical-pathname-translations "SYS")
+ X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
+ X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
+ X
+ ;;; Setup ASDF2
+ (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
+ EOF
+
+ # Install documentation
+ unset SBCL_HOME
+ INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
+ sh install.sh || die "install.sh failed"
+
+ # bug #517008
+ pax-mark -mr "${D}"/usr/bin/sbcl
+
+ # rm empty directories lest paludis complain about this
+ find "${ED}" -empty -type d -exec rmdir -v {} +
+
+ if use doc; then
+ dohtml -r doc/manual/
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ doinfo doc/internals/sbcl-internals.info
+ docinto internals-notes && dodoc doc/internals-notes/*
+ else
+ rm -Rv "${ED}/usr/share/doc/${PF}" || die
+ fi
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+}
diff --git a/dev-lisp/uiop/Manifest b/dev-lisp/uiop/Manifest
new file mode 100644
index 000000000000..818928d3f029
--- /dev/null
+++ b/dev-lisp/uiop/Manifest
@@ -0,0 +1,2 @@
+DIST asdf-3.0.3.tar.gz 427575 SHA256 05f11d83d33f1080f683701ad0e139011051f9c3190c3b1f22bc63208d8d5f47 SHA512 d9d8d466c7b6aa6beb1c22da4fd10499fa784c39ab138bea7ecb8cdccf769766572ebe91c89db2d5c53e493096248f82a224be95c1fcac8b7beebe1b57f34883 WHIRLPOOL 3503250361350b59d095b743dcc627e9ec1e3ec469066287b80d97924d54ea254fed94f77596ed71b4c9974e4c9b97de8b6a35b3c6529f559d6ba392b695ccf4
+DIST asdf-3.1.4.tar.gz 831537 SHA256 bc8bfaf36335e5f01fd08159c1ded5a96088fbea002b466bdf95c129c413cc43 SHA512 c48eb0928d3b98154d63e8ce797baeb4ad51ab685594b80f2ec4db9747b41c619ec17856d2483590ca8bd0b8c9db160837e7e49e72396c3a16db338ea985282c WHIRLPOOL 71babc996c326b6fb0118752a0f60601f9cefb28d254fd48c838abae14e7bc02f8831a5e96e9521b95f52b9bc1bb632fb5d93abed11dea480ba9f007e7cfdbf1
diff --git a/dev-lisp/uiop/metadata.xml b/dev-lisp/uiop/metadata.xml
new file mode 100644
index 000000000000..f418045b09c8
--- /dev/null
+++ b/dev-lisp/uiop/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>common-lisp</herd>
+</pkgmetadata>
diff --git a/dev-lisp/uiop/uiop-3.0.3.ebuild b/dev-lisp/uiop/uiop-3.0.3.ebuild
new file mode 100644
index 000000000000..c225ad8b3feb
--- /dev/null
+++ b/dev-lisp/uiop/uiop-3.0.3.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="UIOP is a portability layer spun off ASDF3"
+HOMEPAGE="http://common-lisp.net/project/asdf/"
+SRC_URI="http://common-lisp.net/project/asdf/archives/asdf-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE=""
+
+RDEPEND="~dev-lisp/asdf-${PV}"
+
+S="${WORKDIR}/${PN}"
+
+src_install() {
+ insinto /usr/share/common-lisp/source/${PN}
+ doins -r contrib *.lisp ../version.lisp-expr uiop.asd asdf-driver.asd
+ dodir /usr/share/common-lisp/systems
+ dosym /usr/share/common-lisp/source/${PN}/uiop.asd /usr/share/common-lisp/systems/uiop.asd
+ dosym /usr/share/common-lisp/source/${PN}/asdf-driver.asd /usr/share/common-lisp/systems/asdf-driver.asd
+}
diff --git a/dev-lisp/uiop/uiop-3.1.4.ebuild b/dev-lisp/uiop/uiop-3.1.4.ebuild
new file mode 100644
index 000000000000..75aa55744833
--- /dev/null
+++ b/dev-lisp/uiop/uiop-3.1.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="UIOP is a portability layer spun off ASDF3"
+HOMEPAGE="http://common-lisp.net/project/asdf/"
+SRC_URI="http://common-lisp.net/project/asdf/archives/asdf-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE=""
+
+RDEPEND="~dev-lisp/asdf-${PV}"
+
+S="${WORKDIR}/${PN}"
+
+src_install() {
+ insinto /usr/share/common-lisp/source/${PN}
+ doins -r contrib *.lisp ../version.lisp-expr uiop.asd asdf-driver.asd
+ dodir /usr/share/common-lisp/systems
+ dosym /usr/share/common-lisp/source/${PN}/uiop.asd /usr/share/common-lisp/systems/uiop.asd
+ dosym /usr/share/common-lisp/source/${PN}/asdf-driver.asd /usr/share/common-lisp/systems/asdf-driver.asd
+}