summaryrefslogtreecommitdiff
path: root/dev-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lisp')
-rw-r--r--dev-lisp/Manifest.gzbin3379 -> 3380 bytes
-rw-r--r--dev-lisp/ecls/Manifest2
-rw-r--r--dev-lisp/ecls/ecls-21.2.1.ebuild87
-rw-r--r--dev-lisp/sbcl/Manifest4
-rw-r--r--dev-lisp/sbcl/files/concurrency-test-1.5.3.patch17
-rw-r--r--dev-lisp/sbcl/sbcl-2.1.1.ebuild245
6 files changed, 337 insertions, 18 deletions
diff --git a/dev-lisp/Manifest.gz b/dev-lisp/Manifest.gz
index ad532428083e..a59d5b4091c0 100644
--- a/dev-lisp/Manifest.gz
+++ b/dev-lisp/Manifest.gz
Binary files differ
diff --git a/dev-lisp/ecls/Manifest b/dev-lisp/ecls/Manifest
index 8581ffdcecda..4e8dffc3e105 100644
--- a/dev-lisp/ecls/Manifest
+++ b/dev-lisp/ecls/Manifest
@@ -3,6 +3,8 @@ AUX ecls-16.1.3-build.patch 341 BLAKE2B 6a3b588010b66b6e060dfa29642bacea08e77e64
AUX ecls-16.1.3-headers-gentoo.patch 446 BLAKE2B db2adc332867435e799e2779fbad5ebb175b247db5de7ab436da6631d31dc8d6059736dbb41be6fd91b0fd8116ee84e361772ae5da29c1448627bbeb07212646 SHA512 a58b39deb9f8577da66216fd6902803019751171e4415149a89bdb72f13a006e5f6d9bede2312521162a0895340c1a1ce756b09bc0a18dccceca3e4c0950a7cb
DIST ecl-16.1.3.tgz 7459212 BLAKE2B 4f9d6ad2bd92ede4b5b20857b95a48bad5002049e83611865d9cf13e7131adfaad147a31f22f9a3f6a2c06e46db1996aa98135c28b97bf5ef16e17b5eba0dc4b SHA512 5d743f422f6bc24671abf4c739cde8273d08f056906a1ef8aed5145c703b6d52c7fa4b5e0be8c125f32240c20ce053007786bb3ae81cc34d47791f6fae0819c1
DIST ecl-20.4.24.tgz 7815444 BLAKE2B 11b908b028beaaf9243dc0f2ceaa178918ae4763a907af4424ba21e6bdf3474aaa36c96e9a3ef1ce780e50649c2453b52b7c46b5e9dc1453281dc522417ad78c SHA512 4c127e0d6a99e38f3a926135ae92d92899058c5a5e99b90f28d4a47b58d94ee89a958cfb4bfd2b9e6ad7b3c57867cd13119b2a4dd6bb1aa3bb5ec42a96bfa788
+DIST ecl-21.2.1.tgz 7875088 BLAKE2B b8c05fab8ce5892ad9df830e3ad230e1c646bd30bc35243703ace18f1bf963057b132d980c74b364ff30a5b776a8f161e71bfd69d7908970811ab3dddbab1aac SHA512 0849bebe1a8073ea8027cfb172c1d7781d43adb6a8b80585bd08d5674b80422d1648b6fbf718cc17a51c5de6c696514523b4d13a82e8113bf9365c95d3c28648
EBUILD ecls-16.1.3.ebuild 2358 BLAKE2B ea2aeb0477a427e45e7f282a2da31f43c45b9b64189ec5d7bfeb5e7297a39307dcb162e594cca93c2aea53809452fe1f57609bcd6c446325781bb9a9bb388ae2 SHA512 5fc28521dd43df3560398c9782274b6fbe5421b96e1138173f8b033c5047dd24b5aeb61151423619a5369f88418f3b21bd9bc79b73554b8f99ae58d33756c4dd
EBUILD ecls-20.4.24.ebuild 2389 BLAKE2B 4e3347c4d9aaafdf7a3f7f1454bbb18b3fa04762f23e909684fe39dddb18df05e92d79326918f2ddfbb0dbc8dcdb94530b0195cbcf86d5232b534ed5b70a5618 SHA512 9114c138fb74a15f80ca25230b68290f057e1aed205bf3ed5ba7d7109c15ab4a6c7e4db951d1e122dc2cbffac869294ceb557ef0150d7f6630c2cbefdf42d302
+EBUILD ecls-21.2.1.ebuild 2077 BLAKE2B fa3478a440ad84b17ab3b7af216a5290fd74037ab48cdd53d5f36b495783a01cc48c8d232133e08a8b70d6ae13c3af872154072b71b6bd83929fd30bb5a976d8 SHA512 620cc9adc7863188418e7ee0bef019660ffed1edce295ad41d9afa50822787339c2b048a776231117ff14830979c7dd43abb4e83540ed1e7e11252b8f8e0c40a
MISC metadata.xml 901 BLAKE2B 96892af45b0d5c6b7c0e0ee20010ce7ac068a25d024d31f2dae1acd730aaa62f7589f322d7ad0ade27a03cdae7eeef5297adcd9fb821ca67d4e1ba88de1c2a17 SHA512 15403f25533646601eb454946599d1d97353038286df0d075f923b598fe44047e525745a33f7e3dbc15fee717d6311abbe546371ecbc4c9df347771dd5c007e9
diff --git a/dev-lisp/ecls/ecls-21.2.1.ebuild b/dev-lisp/ecls/ecls-21.2.1.ebuild
new file mode 100644
index 000000000000..976df8f85654
--- /dev/null
+++ b/dev-lisp/ecls/ecls-21.2.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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="https://common-lisp.net/project/ecl/"
+SRC_URI="https://common-lisp.net/project/ecl/static/files/release/${MY_P}.tgz"
+
+LICENSE="BSD-2 LGPL-2.1+"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux"
+IUSE="cxx debug emacs gengc precisegc cpu_flags_x86_sse +threads +unicode +libatomic X"
+
+CDEPEND="dev-libs/gmp:0
+ dev-libs/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? ( >=app-editors/emacs-23.1:* >=app-eselect/eselect-emacs-1.12 )"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-16.1.3-headers-gentoo.patch"
+ "${FILESDIR}/${PN}-16.1.3-build.patch"
+)
+
+src_prepare() {
+ default
+ 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_with cxx) \
+ $(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)
+}
+
+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
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc README.md CHANGELOG
+ 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/sbcl/Manifest b/dev-lisp/sbcl/Manifest
index fe002825aa37..3bcebdca476a 100644
--- a/dev-lisp/sbcl/Manifest
+++ b/dev-lisp/sbcl/Manifest
@@ -2,7 +2,6 @@ AUX bsd-sockets-test-1.2.11.patch 14240 BLAKE2B c9b9989c6dc484ba72877e5cfd4b69de
AUX bsd-sockets-test-2.0.5.patch 16171 BLAKE2B 6b78dbd0eb2cad0503234f3b51c4e1c614ab7e89a477c6fecce8f86130c4b703fe0419bb5a4735e54a490b3a249ccc649311e9c44dffa81789a9a70e35f4a2c6 SHA512 5d84f006db1e2672f530a8d2626c5c52f8c93afcd8e7a54898e8b3ca733d8479c0a1974be8091e011acd93de00e8dc6f491fea65aafd0c18626a68c1080ec692
AUX concurrency-test-1.2.6.patch 1069 BLAKE2B a802300284267942da91ba205ce1a002da3731a7220b0b10fa77b8c347636ee2c2660b590bb18af565a083fb2235b9d3eafd66ba8796d6b7357d032403fb6115 SHA512 6969cec62ee9ee0ecb2aff34c854f51fd93b52f768ed1e1bf7cb3686c370c6e6b1d0691159b5d404f8d5e12e90a1447e6098ed83b0bb1ff4dc7f454f7052ec53
AUX concurrency-test-1.3.15.patch 967 BLAKE2B 220bdd3ac1c40d2921440fb1ea67ec99f7766b6c33d014be57201502ed122c8cf12875be0ccd5c74fa14d0280a5ece8f63100971eca2f9ffb7a35dac1b7f17b2 SHA512 628429eacd8c513190229260fcfc8ce403072fb7b4bade10c3b65e30a3fc60f1057b018b7043590a205626f3e2f05b244ffd48afa864911d350d37aa84eb1a98
-AUX concurrency-test-1.5.3.patch 944 BLAKE2B 834a87327b4f414ed71b059416b7a76b6657a7696c4dd5daa9d2f72009e0593d9e77914240e02a79e2ff2fc2d5763f3fab1f80ba9e5bc98447a88e7497ec8a9c SHA512 f1ce896ce87878b054b5ea6a73b0980ddb2ab67cfaad5dd44e1c6fa8b6b67fe9cd4d165271540a136276ba5f327de8f9a1a30d7321406a06b5fc64b85bba21d2
AUX concurrency-test-2.0.1.patch 587 BLAKE2B 3c7f73f7efe711f400f830cbd53b6448aeba41e14f4b229b0260d62c494ffdf9ef9687d916aa108035b53065598a8a51c92e086509b2cdabb2f6b2a7acb0b718 SHA512 c1223eda1a6e9e40196bc133a6270c9803195257d39637d4622026503774847eb184879025d9029617e8b36074d81c47820c4474ceabcb45b7734deddeeae8ce
AUX etags-2.1.0.patch 347 BLAKE2B 00e55c6b2279bfe8171de31a92a8c2afd4bc13eb2364aadb4f7850bc6078fabdefa21bd238c1d2b9914818b0fff81ad26ed0f1878cbec3f2b2e3fc13518cf908 SHA512 724e97da71176769a78e1eae017d6d9efcf3add4707947d9d2700837b596b7b4f675bfc40e2be35d8be61cb67ac273fdf810ce5b1489202fbdc9be6125fa3a0f
AUX gentoo-fix_install_man.patch 399 BLAKE2B f0f04de59f5ddd69a54fcfa5feb4c8038e7e37c923d8ca93d061b642cd01a39b9d1a0f54b00a8a1fbc654788d0224b4949bf225e97048fc73fa2196969ae3496 SHA512 bc5118ddf2fd851dcabf773cc7443fa0d3f5a5b83715173110f9164c631faaf8c2d6b247f7ac205da23bb388ff459eba228deeaa2a45202870b7f97376564030
@@ -38,9 +37,12 @@ DIST sbcl-2.0.11-source.tar.bz2 6532079 BLAKE2B 8015262c407f731ef4bec8d002d37f0a
DIST sbcl-2.0.11-x86-64-linux-binary.tar.bz2 10154687 BLAKE2B 60d246c066e6fb95e1de8117da02bd52eb5464877a5f0642bdf211d5da5787f0e67d950269f6a629dcae7f9129eea5dbaa78d8d4b00e51fac1e85f02b4899cae SHA512 122411215d75ef31d6f537660b29c7e69fc47f2eaf4339009ee53ea71a119715b0da17e3eb7a3bc3e997fe147e2eb163a7f838a18ff5edbc266ac4f0dea4f877
DIST sbcl-2.1.0-source.tar.bz2 6534157 BLAKE2B 575638084c208104bc782e7f6419b92e89d6b9e4e31cc668f21cb5be6a234a1f97726ea7f3e54903e229df94d89a10c60e887c19aa00c1bcc57e62229f75b764 SHA512 57283540ffa43184f7f805dc9654292ac9e93ba735772e00c6b0e695c61041647106a0a167836e571a3d97af2952cf26ca523fb7bf1dc0f9c62345d76a0ccec3
DIST sbcl-2.1.0-x86-64-linux-binary.tar.bz2 10121503 BLAKE2B 4ee74c18316e863ed030dcbf88f9c0997e362f158eae1be856cea2b7001e9cff213a09179c0c1c925db5de991902a19d838adc9bf5683552310a57a3debf465f SHA512 dea33b800223505b6912c78d4233b82ab544100a64506e827ff78ccef1776dace2af14856d5e37c33659928afa823c4500ada34cd3759c46e72dc91cfa23f40d
+DIST sbcl-2.1.1-source.tar.bz2 6543910 BLAKE2B a567e30ea03d2a19f85afeda385d1d8af84e87b1f0afe436c47865e8d67d3a7d3008e7353d7bef0b139ffaba6278ceb985178361ba50f82db2683637f1e2a834 SHA512 4346318bcbd28916d107d004f7da62cd4a23545432369819f1d5c25d512d89343318f4acb857f6dd59bda59b58e88979663e882455f941e81edd9002b58f68e4
+DIST sbcl-2.1.1-x86-64-linux-binary.tar.bz2 10116591 BLAKE2B f9e4d2772b23cf03af6f7e8a44192bc48269990c4c7f4a89885497044855f8b637346704aafef54998942184bd58eeb1775cb2e8ef147b4d470cbbc7d44b8773 SHA512 0bf5e8e50e172debba70216e207a8b7d0caf53ccc8d2e682f52622740dfda2320d7c69fa5f966e5c4a5838252447f3704d6b31d0dfaf0b95503ec38c5d18afca
EBUILD sbcl-1.3.11.ebuild 8275 BLAKE2B 3a54bd91f515f85f3c36eafc776fdd199001b0e576187a573c714902b1b79fae0eb552d6e7020506cba1714aed1c568b3df3a7ef43a65ac347db24ebaadc729e SHA512 4f0109295a7a17c7068636c07638da7f464032ff81221dab41e073e7dc6e8ab86268964e23b6ed97d500e0f999f3c1222b1ff836e4a3d3e045bedf25dbad26f4
EBUILD sbcl-1.4.9.ebuild 8559 BLAKE2B 513825109663297611a5ada0a96a5f8c02d3e32d9d18721c74b1adf3a224afa1224ac7abfef4a9fbef2728a9cbe184022483ab64ce06595a55283b7b6d218d7e SHA512 5d21f6d8f3f19430cc4ffef49cf57ea6b48035e88234e2a0c69fb4e80c2607405d7c7cb4685c720736ebb39d70e6139e004334dd81e25ab5b82bbc11c00d1d2d
EBUILD sbcl-2.0.10.ebuild 8501 BLAKE2B 8f059823a9bfcbb369fae7c319331f9d986dae249d093bca964871d90a84d7b375177186a7894e8395e3f9a744912f61eef26eaaf2bdd9be6fbca1905ee1d7b6 SHA512 9db0cbd59f3156154d927384df32875925887520072a355e909f943549194faa2204a15aabbd72c25ae24ee5ab2c11d4ca6b122a87c63a5645107a15225d97f0
EBUILD sbcl-2.0.11.ebuild 8501 BLAKE2B 78edc8b39a8ee1dbbd0864c0aa93e745bd9b1e66ec5bca5be97435223f1a669c4e2e4abd31b5b10905d9eaf9f26ebc87596e1d2b9ec25c5779ea47a912fbd9b5 SHA512 77e4034387813a089fce1724888d06e6716fe77beaf5f6a30ea1d333744d423c4d10f18dce7f32440f21be94091eefe65f2d405375bfcb271929735b3aa25cec
EBUILD sbcl-2.1.0.ebuild 8555 BLAKE2B d201561605da86ee73782d4460d82f3562f0f117f0d53414378c8abe58c4bd7cfd5bf7441e8059d6a4d3dfd1113cb81fa922c6fc83a371fe3959d27cc6fe7032 SHA512 cbcb9938c643b1c0d6be07cb2d8959a5e1669ce6255ae78cd649f8ee45ca97b55f62963bc641b82322ed9666f52d18653f010e7b9dedb80060a6992d0876aacc
+EBUILD sbcl-2.1.1.ebuild 8555 BLAKE2B a007118cefb8fb856a957b6e0fd830047fa40df42332ad0c505f02612209b2ec5fa067dcb6031b95f58c749121e0c1fc60a05a4d8544d89ea43e15c47dfa8717 SHA512 6f2dd56047a26298300e94a7fd2f32e0a1ed1d6a50de596035b37bda6e90ab35eb3bc67af1e34ca13fe5a11c70be4586e428e5031dbf3c05aaa22468786ce9cc
MISC metadata.xml 1312 BLAKE2B a03042bd9d39465fe7ae45d6b749571fc4d22cf9d7f81d3cd498b155729576ec1f2ddec03c2c662ecb23abfd19a627ba2cbe9798960009e998a8823902062118 SHA512 3c4463de4a8871ab56fe74c286977fda3037e953d5fa26162d07976efa00b0d99bc98295435a7c5233c43b27369e31eb5d1c0b4c66600477a307aa1a7a322e1c
diff --git a/dev-lisp/sbcl/files/concurrency-test-1.5.3.patch b/dev-lisp/sbcl/files/concurrency-test-1.5.3.patch
deleted file mode 100644
index 8c2e89fccfc8..000000000000
--- a/dev-lisp/sbcl/files/concurrency-test-1.5.3.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -r -U2 sbcl-1.5.3.orig/contrib/sb-concurrency/tests/test-frlock.lisp sbcl-1.5.3/contrib/sb-concurrency/tests/test-frlock.lisp
---- sbcl-1.5.3.orig/contrib/sb-concurrency/tests/test-frlock.lisp 2019-05-27 22:03:04.000000000 +0200
-+++ sbcl-1.5.3/contrib/sb-concurrency/tests/test-frlock.lisp 2019-06-01 11:41:21.260384857 +0200
-@@ -26,5 +26,5 @@
- (read-count 1000000)
- (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))
-@@ -89,5 +89,5 @@
- (deftest* (frlock.1)
- (handler-case
-- (sb-ext:with-timeout 20
-+ (sb-ext:with-timeout 240
- (test-frlocks #+win32 :outer-write-pause #+win32 t ))
- (sb-ext:timeout (c)
diff --git a/dev-lisp/sbcl/sbcl-2.1.1.ebuild b/dev-lisp/sbcl/sbcl-2.1.1.ebuild
new file mode 100644
index 000000000000..3fde7e242828
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-2.1.1.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib eutils flag-o-matic pax-utils toolchain-funcs
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.4.3
+BV_AMD64=2.1.1
+BV_PPC=1.2.7
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+BV_ARM=1.4.11
+BV_ARM64=1.4.2
+BV_X64_MACOS=1.2.11
+BV_PPC_MACOS=1.0.47
+BV_X86_SOLARIS=1.2.7
+BV_X64_SOLARIS=1.2.7
+BV_SPARC_SOLARIS=1.0.23
+
+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 )
+ arm64? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM64}-arm64-linux-binary.tar.bz2 )
+ x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
+ ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-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 )
+ sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
+IUSE="debug doc source +threads +unicode pax_kernel zlib"
+
+CDEPEND=">=dev-lisp/asdf-3.3:="
+DEPEND="${CDEPEND}
+ doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
+ pax_kernel? ( 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() {
+ # bug #468482
+ eapply "${FILESDIR}"/concurrency-test-2.0.1.patch
+ # bugs #486552, #527666, #517004
+ eapply "${FILESDIR}"/bsd-sockets-test-2.0.5.patch
+ # bugs #560276, #561018
+ eapply "${FILESDIR}"/sb-posix-test-1.2.15.patch
+ # bug #767742
+ eapply "${FILESDIR}"/etags-2.1.0.patch
+
+ eapply "${FILESDIR}"/verbose-build-2.0.3.patch
+
+ eapply_user
+
+ # Make sure the *FLAGS variables are sane.
+ # sbcl needs symbols in resulting binaries, so building with the -s linker flag will fail.
+ strip-unsupported-flags
+ filter-flags -fomit-frame-pointer -Wl,-s
+ filter-ldflags -s
+
+ # original bugs #526194, #620532
+ # this broke no-pie default builds, c.f. bug #632670
+ # Pass CFLAGS down by appending our value, to let users override
+ # the default values.
+ # Keep passing LDFLAGS down via the LINKFLAGS variable.
+ sed -e "s@\(CFLAGS += -g .*\)\$@\1 ${CFLAGS}@" \
+ -e "s@LINKFLAGS += -g\$@LINKFLAGS += ${LDFLAGS}@" \
+ -i src/runtime/GNUmakefile || die
+
+ sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
+ -i make-config.sh || die
+
+ # Use installed ASDF version
+ cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+ # Avoid installation of ASDF info page. See bug #605752
+ sed '/INFOFILES/s/asdf.info//' -i doc/manual/Makefile || 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
+
+ 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 '/^[ \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
+ dodoc -r doc/internals/sbcl-internals
+
+ doinfo doc/manual/*.info*
+ doinfo doc/internals/sbcl-internals.info
+
+ docinto internals-notes
+ dodoc doc/internals-notes/*
+ else
+ rm -Rv "${ED}/usr/share/doc/${PF}" || die
+ fi
+
+ # 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}"
+}