1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # Author Matthew Kennedy <mkennedy@gentoo.org>
7 # Sundry code common to many Common Lisp related ebuilds.
11 inherit eutils multilib
13 CLSOURCEROOT=/usr/share/common-lisp/source/
14 CLSYSTEMROOT=/usr/share/common-lisp/systems/
16 # Many of our Common Lisp ebuilds are either inspired by, or actually
17 # use packages and files from the Debian project's archives.
21 for i in copyright README.Debian changelog; do
22 test -f $i && dodoc "${S}"/debian/${i}
27 # BIG FAT HACK: Since the Portage emerge step kills file timestamp
28 # information, we need to compensate by ensuring all FASL files are
29 # more recent than their source files.
31 # The following `impl-*-timestamp-hack' functions SHOULD NOT be used
32 # outside of this eclass.
34 impl-save-timestamp-hack() {
36 dodir /usr/share/${impl}
37 tar cpjf "${D}"/usr/share/${impl}/portage-timestamp-compensate -C "${D}"/usr/$(get_libdir)/${impl} .
40 impl-restore-timestamp-hack() {
42 tar xjpfo /usr/share/${impl}/portage-timestamp-compensate -C /usr/$(get_libdir)/${impl}
45 impl-remove-timestamp-hack() {
47 rm -rf /usr/$(get_libdir)/${impl} &>/dev/null || true
50 standard-impl-postinst() {
52 unregister-common-lisp-implementation cmucl
55 impl-restore-timestamp-hack ${impl}
60 register-common-lisp-implementation ${impl}
63 standard-impl-postrm() {
64 local impl=$1 impl_binary=$2
65 if [ ! -x ${impl_binary} ]; then
68 impl-remove-timestamp-hack ${impl}
73 rm -rf /var/cache/common-lisp-controller/*/${impl}
77 # Local Variables: ***
78 # mode: shell-script ***