summaryrefslogtreecommitdiff
blob: 1e53e263597ac86af81206db15b3b21aa2a6b0a4 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lisp/cmucl-source/cmucl-source-18e.ebuild,v 1.4 2004/06/24 23:58:01 agriffis Exp $

inherit common-lisp

# we are a port of the Debian Project's port
DEB_PV=7

DESCRIPTION="These are the CMUCL sources, provided so that the debugger can show useful source information at appropriate times.  This version includes common-lisp-controller compatible replacements for defsystem, graystream, clx and hemlock."
HOMEPAGE="http://packages.debian.org/unstable/devel/cmucl-source.html"
SRC_URI="http://ftp.debian.org/debian/pool/main/c/cmucl/cmucl_${PV}.orig.tar.gz
	http://ftp.debian.org/debian/pool/main/c/cmucl/cmucl_${PV}-${DEB_PV}.diff.gz"
LICENSE="public-domain"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND="dev-lisp/common-lisp-controller
	dev-lisp/cl-asdf
	virtual/commonlisp"

S=${WORKDIR}/cmucl-${PV}.orig

src_unpack() {
	unpack ${A}
	patch -p0 <cmucl_${PV}-${DEB_PV}.diff || die
	find ${S} -type d -name CVS -print0 |xargs -0 rm -rf
}

src_install() {
	# non-asd/system code
	dodir /usr/share/common-lisp/source/cmucl
	(cd src ; find . -name \*.lisp -and -type f | tar --create --file=- --files-from=- ) |\
		tar --extract --file=- -C ${D}/usr/share/common-lisp/source/cmucl
	dodir /usr/share/common-lisp/systems
	# gray-stream
	insinto /usr/share/common-lisp/source/cmucl-graystream
	doins src/pcl/gray-streams* ${FILESDIR}/${PV}/cmucl-graystream.asd
	dosym /usr/share/common-lisp/source/cmucl-graystream/cmucl-graystream.asd \
		/usr/share/common-lisp/systems/
	# CLX
	insinto /usr/share/common-lisp/source/cmucl-clx
	cp -r src/clx/*.lisp ${FILESDIR}/${PV}/cmucl-clx.asd \
		src/code/clx-ext.lisp \
		src/hemlock/charmacs.lisp \
		src/hemlock/key-event.lisp \
		src/hemlock/keysym-defs.lisp \
		${D}/usr/share/common-lisp/source/cmucl-clx
	insinto /usr/share/common-lisp/source/cmucl-clx/debug
	doins src/clx/debug/*.lisp
	insinto /usr/share/common-lisp/source/cmucl-clx/demo
	doins src/clx/demo/*.lisp
	insinto /usr/share/common-lisp/source/cmucl-clx/test
	doins src/clx/test/*.lisp
	find ${D}/usr/share/common-lisp/source/cmucl-clx -type f -print0 | xargs -0 chmod 644
	find ${D}/usr/share/common-lisp/source/cmucl-clx -type d -print0 | xargs -0 chmod 755
	dosym /usr/share/common-lisp/source/cmucl-clx/cmucl-clx.asd \
		/usr/share/common-lisp/systems/
	# hemlock
	insinto /usr/share/common-lisp/source/cmucl-hemlock
	doins src/hemlock/*.lisp \
		src/hemlock/XKeysymDB \
		src/hemlock/compilation.order \
		src/hemlock/hemlock.log \
		src/hemlock/hemlock.upd \
		src/hemlock/hemlock11.cursor \
		src/hemlock/hemlock11.mask \
		src/hemlock/mh-scan \
		src/hemlock/notes.txt \
		src/hemlock/perq-hemlock.log \
		src/hemlock/spell-dictionary.text \
		src/hemlock/things-to-do.txt \
		${FILESDIR}/${PV}/cmucl-hemlock*.asd
	dosym /usr/share/common-lisp/source/cmucl-hemlock/cmucl-hemlock.asd \
		/usr/share/common-lisp/systems/
	dosym /usr/share/common-lisp/source/cmucl-hemlock/cmucl-hemlock-base.asd \
		/usr/share/common-lisp/systems/
	dosym /usr/share/common-lisp/source/cmucl-hemlock/cmucl-hemlock-dict.asd \
		/usr/share/common-lisp/systems/
	# documentation
	insinto /usr/share/doc/${PF}/clx
	gzip own-work/clx/*.ps
	doins own-work/clx/*.{ps.gz,el} own-work/clx/README* # own-work/clx/Makefile
	insinto /usr/share/doc/${PF}/clx/clxman
	doins own-work/clx/clxman/*
	chown -R root:root ${D}/usr/share/common-lisp/source/
}

pkg_postinst() {
	/usr/sbin/register-common-lisp-source cmucl-graystream
	/usr/sbin/register-common-lisp-source cmucl-clx
	/usr/sbin/register-common-lisp-source cmucl-hemlock
}

pkg_prerm() {
	/usr/sbin/unregister-common-lisp-source cmucl-graystream
	/usr/sbin/unregister-common-lisp-source cmucl-clx
	/usr/sbin/register-common-lisp-source cmucl-hemlock
}