summaryrefslogtreecommitdiff
path: root/dev-lisp/cmucl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-lisp/cmucl
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-lisp/cmucl')
-rw-r--r--dev-lisp/cmucl/Manifest16
-rw-r--r--dev-lisp/cmucl/cmucl-20e.ebuild97
-rw-r--r--dev-lisp/cmucl/cmucl-21a.ebuild92
-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/21a-build.patch22
-rw-r--r--dev-lisp/cmucl/files/21a-customize-lisp-implementation-version.patch16
-rw-r--r--dev-lisp/cmucl/files/21a-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.xml39
11 files changed, 599 insertions, 0 deletions
diff --git a/dev-lisp/cmucl/Manifest b/dev-lisp/cmucl/Manifest
new file mode 100644
index 000000000000..d113e293958c
--- /dev/null
+++ b/dev-lisp/cmucl/Manifest
@@ -0,0 +1,16 @@
+AUX 20e-customize-lisp-implementation-version.patch 683 SHA256 81c421f80c06c567d2ae0812c8e0e66ad86631662adfd8891ae36152328eae63 SHA512 77acf6d31d8a932075b61e90b42b2c74648ad29ef3cf2f98e69a44f957672a935ea88a541815c19bf71ba5e64c587d27878288038178a7ad3d96144a26b1bb2b WHIRLPOOL 54cbca06348c4a0b4d8efe7b502e3834102640aa3cf9a0817a39a2d9dfac5e1234ff22260c9cd29864acd1a7bdf156b64f9feb2e87fad9205ce7164c697e5ab9
+AUX 20e-execstack-fixes.patch 3990 SHA256 f507d48eef3ae55e9f38ef96964d2179a3a328837420e866be4509c5fdde9131 SHA512 bb32dfffa6b737af8be924f194112863b64010b00b30caf92c023a16ac1d2884f51ee724b57cdeb2786f10aad6bd0054a835c94f03b911eca4648c2e5927ce3b WHIRLPOOL aaf48fbbb369e7742e06a3bfb79d887e916e892d66a185edbffc23774d1e8c0f73d76fe784d2f36080e7e6fe9d5cd8fdd8c5b6c22b0143db6a10da2a642724f0
+AUX 21a-build.patch 733 SHA256 8419730a89d53667c5af920f976a3ef6187879d0c342c005fb10142abf1ff011 SHA512 ca84e1e54ddbd0aa9e5e68da02be3d97c0746477f1dc3680503879cbfd3b875b23c2b96b77cf07c786de22f6a05d83afc7b267a1f30cfea4320f1c29c40bb1ef WHIRLPOOL 22935f7a0426dc5baa1add17e6834b126a657636e544292ec6e8040ab5b0a176522d4315fd32ba82c73270b47a2d013b266fa008a93a328c16b54ec157697a8b
+AUX 21a-customize-lisp-implementation-version.patch 683 SHA256 81c421f80c06c567d2ae0812c8e0e66ad86631662adfd8891ae36152328eae63 SHA512 77acf6d31d8a932075b61e90b42b2c74648ad29ef3cf2f98e69a44f957672a935ea88a541815c19bf71ba5e64c587d27878288038178a7ad3d96144a26b1bb2b WHIRLPOOL 54cbca06348c4a0b4d8efe7b502e3834102640aa3cf9a0817a39a2d9dfac5e1234ff22260c9cd29864acd1a7bdf156b64f9feb2e87fad9205ce7164c697e5ab9
+AUX 21a-execstack-fixes.patch 3990 SHA256 f507d48eef3ae55e9f38ef96964d2179a3a328837420e866be4509c5fdde9131 SHA512 bb32dfffa6b737af8be924f194112863b64010b00b30caf92c023a16ac1d2884f51ee724b57cdeb2786f10aad6bd0054a835c94f03b911eca4648c2e5927ce3b WHIRLPOOL aaf48fbbb369e7742e06a3bfb79d887e916e892d66a185edbffc23774d1e8c0f73d76fe784d2f36080e7e6fe9d5cd8fdd8c5b6c22b0143db6a10da2a642724f0
+AUX cmuclrc 305 SHA256 4f1f050f8dcbf261c9ee33075d5546a43fd14f7f0cd0ad486b175081bd4b27d2 SHA512 36ae348795f27a7aae2e1cf10376606b9a6898b4c4f0e6da692b3e60bed21e2825ac766a51fb648f1365b238046efd155e80d70421ff65ecffe5b68342895740 WHIRLPOOL ffeea73a1a69dfd43a3d4cc86e8e6b63f447fec0c6fd6f6f80ae2b6feee2bb1683b67f18b7364a311bfbac9056c73cf3813e455a1eb459884bda0794daff57be
+AUX site-init.lisp.in 1839 SHA256 6164e40b50a0a0e7175089f0b55d549b8f24ef602c1c0c41f9433f5c61c512e7 SHA512 374e5acf970b1bd26d2318b678cba509296f2356a4672648f8522387c216288e8f43b514004b0d0c98da5d03a5db10435d5f42f57db88c916691eb4ae93f126a WHIRLPOOL 4c4fb508d7546dea9d75dcff3239c56f8c3b3ed249f3f7fd71f9a2a60dbafc57f0b172d2cd2c6efdca5441e8c30ee3f49c829b3db64bf9ab9db5d4526726f8cc
+DIST cmucl-20e-x86-linux.tar.bz2 18861880 SHA256 94dc1c0ddcaa915f83cdc23462a4cc3c4af98d64fe42e79d7c5232225b149480 SHA512 1eee852b2a11733d0fac2c046137ccd099370bf208be71becc03710e832510b288768f557e326b1ce95cba16490413142e607fd71346e20e5f8592b51d86b0fe WHIRLPOOL 765476aeb037b782380b33fb8e7ae137bb38544547b427c54c23661122552108e8940413c55003c31ba05b4729bb18f99f5b462742cbd9c1c7426f0c04e26863
+DIST cmucl-21a-x86-linux.tar.bz2 10870693 SHA256 02d00c025723e7a2fa7a44e43d3f27ec39c9b871ea0332e472a439ada2620d71 SHA512 7f7d327e47b01dcee1cbb05aae826ef7c64d4d192d7d32d1aba51c8839a06d65942fff5d4c7dbccc955e1e233d2065d83d078266327caee07201e9dce59c39ee WHIRLPOOL 50e64b6d03464c9fc7015d3d6829949ab4bc41f69b890a82f36096f89d63da989197deaa7164c687d781b70ca2a7b23e3e23f9605bdb986f5a94553e9aa664c0
+DIST cmucl-src-20e.tar.bz2 6147575 SHA256 b18fd27b67321a0c00f2019bbb18557f239062ba947080149ed42e30f72ae7cd SHA512 d04f6ac7335572198d37d5df00934edfc82495294446cc5420dada4f2df44009f0983b438d6f10ce5bb02e46fd89df985da5eee3e91a6a75d98e9f86240c0dcc WHIRLPOOL babb020bacf474e1cea4bc865ba7352686ff5d92d01dd4d44d121b101ac328da6cd3e63798a2086ce29ba260fdbefc26f5f7d496ecb0af9566cb1cbdbb3846bf
+DIST cmucl-src-21a.tar.bz2 8195492 SHA256 41604a4f828a134dbf8a58623f45bd81b76ae05fc5c4cea5ccb74edfdc9e3167 SHA512 74b077732030dbc3681aadcf9c802fd5b399362c9653b972063e49eb0a2ad528d02d6dde74107210c94c94dc7e9664472c2d072a6ae6f75e7e8c4cf847987e3b WHIRLPOOL 8799e9a2171ef1a9eebce4deaed8aaaa3e2b5e0970ca158020792cc5d864f71525c175b2e9530f8faeee8d1c49a14b04803ed1aa83dc1247c2005a80f5fc972e
+EBUILD cmucl-20e.ebuild 2752 SHA256 7c67b0ce565598c3e7022716e20e4dc8140dc8e9e761c0635f58594f42ca7cc5 SHA512 0034c000d0001a3820efa94613c7f4eb2be373a251b0c4de1b1d9e8f4a469f407af9ad6b65fc39cba7b3332b7492b8dc46dee9d74ad59d0b9d930fd9e0dedcf1 WHIRLPOOL d26c7699c0ee7c47b1e7f3e770b3588832dd374ee08cc9d2b19c790663e0d5bbbda377c364e1bcf054c6e3d10e291f11ecf2accd2e1bb2bf22936c53fa057f6a
+EBUILD cmucl-21a.ebuild 2619 SHA256 db854d781fcb8307218818abfe8a3c80a6d42e95d15915b4c4071e26c4a781b1 SHA512 aca74badee7e617d1a0571bbfd45fea92896579eb956c022d985de3c93e1deecef4d5fe798fefc801dd49fef7a917b913f11caaeba9d886562780b0324381978 WHIRLPOOL 34ea7d86e08e6ad355330f0bd3bf8985512563f4e29bf95f83ea2a167f3013db456c505c7ef765ac0338f5cbd3de3d3797de1758a08deabeac7167f6d17b4d02
+MISC ChangeLog 3210 SHA256 cfd180b3a8c09af353ef732012cc82853cefd7b4ab1927f2860c1e41b07f5cb2 SHA512 b4081d3230b6929b55b5b9f7f5f62b6f3fd6797fc93e383044b4c80761cd464b701415083ca97cdd4f04c983723a14e1fc00155124d2028cb981c02938282d5a WHIRLPOOL 7348174d72b3d45d9fac92bd7e622b1a2cf52de7f51c4eaa92f2fd1a96674f8215b8bf8d35f8a833bf2185de8ead88aeff0a1cd2b2ee0d9ec2617a47cb0d439e
+MISC ChangeLog-2015 9649 SHA256 e2f6854b56e0105ae2568af26afad66e24da17f63b9f8ce32afe7d48492f5f65 SHA512 7d6110ec6df9946b48555c9f4d278b74134385cfd73fbdfec6cf2aa3382d23d1a8e25ba4372740c5ac84f9497d5399eac28684ebd376ef1d86a4b65bb319c098 WHIRLPOOL dfbcbebc84b730499fe427060339298ff2b72362ac700e5419c6ba777cf9c412a1fac655299e4b6a13d3a5aefad9224ba2cdcf269925412375b0d0eb3f40837a
+MISC metadata.xml 1389 SHA256 39e867e3024a9e39c8c402164513d4cd2096a20f38f973a48d420ca1765f89f5 SHA512 5c6ded0a26b6f1a5705d122f0c2e463f61aa673c5a302cd4676418e12216ca0f3cde81b3ebc0848d879caeae87ca786e01c2f2d61b6f89fedd564d2c739a5fb0 WHIRLPOOL cfffa4f45238d699db3ab3f7932fd7653bf2d9d3004ed00ed49db6b71b3355ae83afb412bc2daef15da06ead2232a4a63e6bb1314d2167f2777395de267639d3
diff --git a/dev-lisp/cmucl/cmucl-20e.ebuild b/dev-lisp/cmucl/cmucl-20e.ebuild
new file mode 100644
index 000000000000..9e122b9a2c9f
--- /dev/null
+++ b/dev-lisp/cmucl/cmucl-20e.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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/cmucl-21a.ebuild b/dev-lisp/cmucl/cmucl-21a.ebuild
new file mode 100644
index 000000000000..f3f9b830b735
--- /dev/null
+++ b/dev-lisp/cmucl/cmucl-21a.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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"
+
+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
+ epatch "${FILESDIR}"/${MY_PV}-build.patch
+
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp src/contrib/asdf/ || die
+}
+
+src_compile() {
+ local cmuopts buildimage
+
+ if use X; then
+ cmuopts=""
+ else
+ cmuopts="-u"
+ fi
+
+ buildimage="bin/lisp -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/21a-build.patch b/dev-lisp/cmucl/files/21a-build.patch
new file mode 100644
index 000000000000..464234109b32
--- /dev/null
+++ b/dev-lisp/cmucl/files/21a-build.patch
@@ -0,0 +1,22 @@
+diff -r -U2 21a.orig/bin/build.sh 21a/bin/build.sh
+--- 21a.orig/bin/build.sh 2015-05-19 07:42:40.000000000 +0600
++++ 21a/bin/build.sh 2016-04-03 20:54:08.597016537 +0600
+@@ -40,5 +40,5 @@
+ ENABLE4="yes"
+
+-version=20f
++version=21a
+ SRCDIR=src
+ BINDIR=bin
+@@ -145,10 +145,9 @@
+ $TOOLDIR/load-world.sh $TARGET "$VERSION" || { echo "Failed: $TOOLDIR/load-world.sh"; exit 1; }
+
+- $TARGET/lisp/lisp -batch -noinit -nositeinit $FPU_MODE < /dev/null || { echo "Failed: $TARGET/lisp/lisp -batch -noinit $FPU_MODE"; exit 1; }
++ $TARGET/lisp/lisp -batch -noinit -nositeinit < /dev/null || { echo "Failed: $TARGET/lisp/lisp -batch -noinit"; exit 1; }
+ return 0;
+ fi
+ }
+
+-FPU_MODE=
+ BUILDWORLD="$TOOLDIR/build-world.sh"
+ BUILD_POT="yes"
diff --git a/dev-lisp/cmucl/files/21a-customize-lisp-implementation-version.patch b/dev-lisp/cmucl/files/21a-customize-lisp-implementation-version.patch
new file mode 100644
index 000000000000..8fc9278af87d
--- /dev/null
+++ b/dev-lisp/cmucl/files/21a-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/21a-execstack-fixes.patch b/dev-lisp/cmucl/files/21a-execstack-fixes.patch
new file mode 100644
index 000000000000..034848d64a26
--- /dev/null
+++ b/dev-lisp/cmucl/files/21a-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..005eddefa58d
--- /dev/null
+++ b/dev-lisp/cmucl/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>grozin@gentoo.org</email>
+<name>Andrey Grozin</name>
+</maintainer>
+<maintainer type="project">
+<email>common-lisp@gentoo.org</email>
+<name>Gentoo Common Lisp Project</name>
+</maintainer>
+<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>