/[gentoo-x86]/eclass/common-lisp-common.eclass
Gentoo

Diff of /eclass/common-lisp-common.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common.eclass,v 1.3 2004/02/12 15:14:03 mkennedy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common.eclass,v 1.4 2004/02/27 03:38:25 mkennedy Exp $
4# 4#
5# Author Matthew Kennedy <mkennedy@gentoo.org> 5# Author Matthew Kennedy <mkennedy@gentoo.org>
6# 6#
7# Sundy code common to many Common Lisp related ebuilds. 7# Sundy code common to many Common Lisp related ebuilds.
8 8
139 unregister-common-lisp-implementation $impl 139 unregister-common-lisp-implementation $impl
140 register-common-lisp-implementation $impl 140 register-common-lisp-implementation $impl
141 done 141 done
142} 142}
143 143
144# BIG FAT HACK: Since the Portage emerge step kills file timestamp
145# information, we need to compensate by ensuring all FASL files are
146# more recent than their source files.
147
148# The following `impl-*-timestamp-hack' functions SHOULD NOT be used
149# outside of this eclass.
150
151impl-save-timestamp-hack() {
152 local impl=$1
153 dodir /usr/share/${impl}
154 tar cpjf ${D}/usr/share/${impl}/portage-timestamp-compensate -C ${D}/usr/lib/${impl} .
155}
156
157impl-restore-timestamp-hack() {
158 local impl=$1
159 tar xjpfo /usr/share/${impl}/portage-timestamp-compensate -C /usr/lib/${impl}
160}
161
162impl-remove-timestamp-hack() {
163 local impl=$1
164 rm -rf /usr/lib/${impl} &>/dev/null || true
165}
166
167standard-impl-postinst() {
168 local impl=$1
169 rm -rf /usr/lib/common-lisp/${impl}/* &>/dev/null || true
170 chown cl-builder:cl-builder /usr/lib/common-lisp/${impl}
171 impl-restore-timestamp-hack ${impl}
172 chown -R root:root /usr/lib/${impl}
173 /usr/bin/clc-autobuild-impl ${impl} yes
174 register-common-lisp-implementation ${impl}
175}
176
177standard-impl-postrm() {
178 local impl=$1 impl_binary=$2
179 # Since we keep our own time stamps we must manually remove them
180 # here.
181 if [ ! -x ${impl_binary} ]; then
182 impl-remove-timestamp-hack ${impl}
183 rm -rf /usr/lib/common-lisp/${impl}/*
184 fi
185}
144 186
145 187
146# Local Variables: *** 188# Local Variables: ***
147# mode: shell-script *** 189# mode: shell-script ***
148# tab-width: 4 *** 190# tab-width: 4 ***

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20