clozurecl-1.11-r1.ebuild 2.6 KB

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