1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib toolchain-funcs
12 DESCRIPTION="Common Lisp implementation, derived from Digitool's MCL product"
13 HOMEPAGE="http://ccl.clozure.com/"
15 x86? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxx86.tar.gz )
16 amd64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxx86.tar.gz )
17 doc? ( http://ccl.clozure.com/docs/ccl.html )"
18 # ppc? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )
19 # ppc64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )"
23 # KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
24 KEYWORDS="~amd64 ~x86"
27 RDEPEND=">=dev-lisp/asdf-2.33-r3:="
31 S="${WORKDIR}"/${MY_PN}
36 CCL_RUNTIME=lx86cl; CCL_HEADERS=x86-headers; CCL_KERNEL=linuxx8632
38 CCL_RUNTIME=lx86cl64; CCL_HEADERS=x86-headers64; CCL_KERNEL=linuxx8664
40 CCL_RUNTIME=ppccl; CCL_HEADERS=headers; CCL_KERNEL=linuxppc
42 CCL_RUNTIME=ppccl64; CCL_HEADERS=headers64; CCL_KERNEL=linuxppc64
48 epatch "${FILESDIR}"/ccl-format.patch
49 cp /usr/share/common-lisp/source/asdf/build/asdf.lisp tools/ || die
53 emake -C lisp-kernel/${CCL_KERNEL} clean
54 emake -C lisp-kernel/${CCL_KERNEL} all CC="$(tc-getCC)"
56 unset CCL_DEFAULT_DIRECTORY
57 ./${CCL_RUNTIME} -n -b -Q -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)' || die "Compilation failed"
59 # remove non-owner write permissions on the full-image
60 chmod go-w ${CCL_RUNTIME}{,.image} || die
66 local install_dir=/usr/$(get_libdir)/${PN}
68 exeinto ${install_dir}
72 cp ${CCL_RUNTIME}.image "${D}"/${install_dir} || die
73 # install optional libraries
74 dodir ${install_dir}/tools
75 cp tools/*fsl "${D}"/${install_dir}/tools || die
77 # until we figure out which source files are necessary for runtime
78 # optional features and which aren't, we install all sources
79 find . -type f -name '*fsl' -delete || die
80 rm -f lisp-kernel/${CCL_KERNEL}/*.o || die
81 cp -a compiler level-0 level-1 lib library \
82 lisp-kernel scripts tools xdump contrib \
83 "${D}"/${install_dir} || die
84 cp -a ${CCL_HEADERS} "${D}"/${install_dir} || die
86 make_wrapper ccl "${install_dir}/${CCL_RUNTIME}"
88 echo "CCL_DEFAULT_DIRECTORY=${install_dir}" > "${ENVD}"
91 dodoc doc/release-notes.txt
92 use doc && dodoc "${DISTDIR}"/ccl.html
93 use doc && dodoc -r examples