summaryrefslogtreecommitdiff
blob: 52190c5ca3f28833f63419add374aa6b680204fd (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
61
62
63
64
65
66
67
68
69
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lisp/openmcl/openmcl-0.14.2_p1.ebuild,v 1.5 2010/12/17 20:18:50 ulm Exp $

inherit eutils common-lisp-common-2

EXTRA_PV=o
MY_PV=${PV/_p/.p}

DESCRIPTION="OpenMCL is a Common Lisp implementation, derived from Digitool's MCL  product"
HOMEPAGE="http://openmcl.clozure.com/
	http://packages.debian.org/unstable/devel/openmcl"
SRC_URI="mirror://debian/pool/main/o/${PN}/${PN}_${MY_PV}.${EXTRA_PV}.tar.gz"
LICENSE="LLGPL-2.1"
SLOT="0"
KEYWORDS="~ppc"
IUSE=""

DEPEND="=dev-lisp/common-lisp-controller-4*
	>=dev-lisp/cl-asdf-1.84
	dev-lisp/openmcl-build-tools"

S=${WORKDIR}/${PN}-${MY_PV}

# The following relies heavily on what I read in debian/rules...

src_unpack() {
	unpack ${A}
	pushd ${S}
	sed -e "s,%ver%,${MY_PV}.${EXTRA_PV}," \
		< debian/run-bootstrap.lisp.template \
		> debian/run-bootstrap.lisp
	cp debian/Makefile .
	cp -RP /usr/lib/openmcl/{PPCCL-orig,headers} .
	epatch "${FILESDIR}/prototype_print_lisp_object.diff"
	popd
}

src_compile() {
	OPENMCL=/usr/bin/openmcl make || die
}

src_install() {
	dodir /etc
	dodir /usr/bin
	dodir /usr/lib/common-lisp/bin
	dodir /usr/lib/openmcl
	dodir /usr/lib/openmcl/lib
	dodir /usr/lib/openmcl/library
	make install DESTDIR=${D} || die
	insinto /usr/lib/openmcl
	doins debian/install-clc.lisp
	exeinto /usr/lib/common-lisp/bin/
	doexe debian/openmcl.sh
	dohtml doc/HTML/*.html
	doman debian/openmcl.1
	do-debian-credits
}

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
}