clozurecl-1.10.ebuild 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib toolchain-funcs
  5. MY_PN=ccl
  6. MY_P=${MY_PN}-${PV}
  7. DESCRIPTION="Common Lisp implementation, derived from Digitool's MCL product"
  8. HOMEPAGE="http://ccl.clozure.com/"
  9. SRC_URI="
  10. x86? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxx86.tar.gz )
  11. amd64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxx86.tar.gz )"
  12. # ppc? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )
  13. # ppc64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )"
  14. LICENSE="LLGPL-2.1"
  15. SLOT="0"
  16. # KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
  17. KEYWORDS="~amd64 ~x86"
  18. IUSE="doc"
  19. RDEPEND=">=dev-lisp/asdf-2.33-r3:="
  20. DEPEND="${RDEPEND}
  21. !dev-lisp/openmcl"
  22. S="${WORKDIR}"/${MY_PN}
  23. ENVD="${T}"/50ccl
  24. src_configure() {
  25. if use x86; then
  26. CCL_RUNTIME=lx86cl; CCL_HEADERS=x86-headers; CCL_KERNEL=linuxx8632
  27. elif use amd64; then
  28. CCL_RUNTIME=lx86cl64; CCL_HEADERS=x86-headers64; CCL_KERNEL=linuxx8664
  29. elif use ppc; then
  30. CCL_RUNTIME=ppccl; CCL_HEADERS=headers; CCL_KERNEL=linuxppc
  31. elif use ppc64; then
  32. CCL_RUNTIME=ppccl64; CCL_HEADERS=headers64; CCL_KERNEL=linuxppc64
  33. fi
  34. }
  35. src_prepare() {
  36. cp /usr/share/common-lisp/source/asdf/build/asdf.lisp tools/ || die
  37. }
  38. src_compile() {
  39. emake -C lisp-kernel/${CCL_KERNEL} clean
  40. emake -C lisp-kernel/${CCL_KERNEL} all CC="$(tc-getCC)"
  41. unset CCL_DEFAULT_DIRECTORY
  42. ./${CCL_RUNTIME} -n -b -Q -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)' || die "Compilation failed"
  43. # remove non-owner write permissions on the full-image
  44. chmod go-w ${CCL_RUNTIME}{,.image} || die
  45. esvn_clean
  46. }
  47. src_install() {
  48. local install_dir=/usr/$(get_libdir)/${PN}
  49. exeinto ${install_dir}
  50. # install executable
  51. doexe ${CCL_RUNTIME}
  52. # install core image
  53. cp ${CCL_RUNTIME}.image "${D}"/${install_dir} || die
  54. # install optional libraries
  55. dodir ${install_dir}/tools
  56. cp tools/*fsl "${D}"/${install_dir}/tools || die
  57. # until we figure out which source files are necessary for runtime
  58. # optional features and which aren't, we install all sources
  59. find . -type f -name '*fsl' -delete || die
  60. rm -f lisp-kernel/${CCL_KERNEL}/*.o || die
  61. cp -a compiler level-0 level-1 lib library \
  62. lisp-kernel scripts tools xdump contrib \
  63. "${D}"/${install_dir} || die
  64. cp -a ${CCL_HEADERS} "${D}"/${install_dir} || die
  65. make_wrapper ccl "${install_dir}/${CCL_RUNTIME}"
  66. echo "CCL_DEFAULT_DIRECTORY=${install_dir}" > "${ENVD}"
  67. doenvd "${ENVD}"
  68. dodoc doc/release-notes.txt
  69. dohtml doc/ccl-documentation.html
  70. use doc && dohtml -r examples
  71. }