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. Some
8 # implementation use the Portage time stamp hack to ensure their
9 # installed files have the right modification time relative to each
12 inherit eutils multilib
14 CLSOURCEROOT=/usr/share/common-lisp/source/
15 CLSYSTEMROOT=/usr/share/common-lisp/systems/
17 # Many of our Common Lisp ebuilds are either inspired by, or actually
18 # use packages and files from the Debian project's archives.
22 for i in copyright README.Debian changelog; do
23 test -f $i && dodoc "${S}"/debian/${i}
28 # BIG FAT HACK: Since the Portage emerge step kills file timestamp
29 # information, we need to compensate by ensuring all FASL files are
30 # more recent than their source files.
32 # The following `impl-*-timestamp-hack' functions SHOULD NOT be used
33 # outside of this eclass.
35 # Bug https://bugs.gentoo.org/show_bug.cgi?id=16162 should remove the
38 impl-save-timestamp-hack() {
40 dodir /usr/share/${impl}
41 tar cpjf "${D}"/usr/share/${impl}/portage-timestamp-compensate -C "${D}"/usr/$(get_libdir)/${impl} .
44 impl-restore-timestamp-hack() {
46 tar xjpfo /usr/share/${impl}/portage-timestamp-compensate -C /usr/$(get_libdir)/${impl}
49 impl-remove-timestamp-hack() {
51 rm -rf /usr/$(get_libdir)/${impl} &>/dev/null || true
54 standard-impl-postinst() {
58 impl-restore-timestamp-hack ${impl}
65 standard-impl-postrm() {
66 local impl=$1 impl_binary=$2
67 if [ ! -x ${impl_binary} ]; then
70 impl-remove-timestamp-hack ${impl}
75 rm -rf /var/cache/common-lisp-controller/*/${impl}
79 # Local Variables: ***
80 # mode: shell-script ***