summaryrefslogtreecommitdiff
blob: 961a089f0d4e0c469618961239d9d302d3a798af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit common-lisp-common-3

MY_PV=${PV##*_pre}

DESCRIPTION="OpenMCL is a Common Lisp implementation, derived from Digitool's MCL product"
HOMEPAGE="http://openmcl.clozure.com/"
SRC_URI="amd64? ( ftp://clozure.com/pub/testing/${PN}-linuxx8664-snapshot-${MY_PV}.tar.gz )
		 ppc?   ( ftp://clozure.com/pub/testing/${PN}-linuxppc-snapshot-${MY_PV}.tar.gz )"
LICENSE="LLGPL-2.1"
SLOT="0"
KEYWORDS="-* ~amd64 ~ppc ~ppc64"
IUSE=""

DEPEND=""

PROVIDE="virtual/commonlisp"

S=${WORKDIR}/ccl

src_compile() {
	if use amd64; then
		 echo "(ccl:rebuild-ccl :full t)" | ./lx86cl64 -b -Q
	fi
	if use ppc; then
		echo "(ccl:rebuild-ccl :full t)" | ./ppccl -b -Q
	fi
	if use ppc64; then
		echo "(ccl:rebuild-ccl :full t)" | ./ppccl64 -b -Q
	fi

	# remove non-owner write permissions on the full-image
	chmod go-w * # LX86CL64
}

src_install() {
	local INSTALL_DIR="/var/${PF}"

	sed "s,/usr/local/src,${INSTALL_DIR}," -i scripts/openmcl*

	( use amd64 || use ppc64 ) && newbin scripts/openmcl64 openmcl
	use ppc && dobin scripts/openmcl

	rm -r "${S}"/scripts/
	dodir /var/"${PF}" && cp -R "${S}" "${D}/${INSTALL_DIR}"
}

pkg_postinst() {
	standard-impl-postinst openmcl || die
}

pkg_postrm() {
	standard-impl-postrm openmcl /usr/bin/openmcl
	if [ ! -x /usr/bin/openmcl ]; then
		rm -rf /usr/lib/openmcl/ || die
	fi
}