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

Contents of /eclass/common-lisp-common-3.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sat Jun 2 19:16:31 2012 UTC (2 years, 6 months ago) by zmedico
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +3 -3 lines
inherit multilib for get_libdir

1 zmedico 1.4 # Copyright 1999-2012 Gentoo Foundation
2 mkennedy 1.1 # Distributed under the terms of the GNU General Public License v2
3 zmedico 1.4 # $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common-3.eclass,v 1.3 2011/12/27 17:55:12 fauli Exp $
4 mkennedy 1.1 #
5     # Author Matthew Kennedy <mkennedy@gentoo.org>
6     #
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
10     # other.
11    
12 zmedico 1.4 inherit eutils multilib
13 mkennedy 1.1
14     CLSOURCEROOT=/usr/share/common-lisp/source/
15     CLSYSTEMROOT=/usr/share/common-lisp/systems/
16    
17     # Many of our Common Lisp ebuilds are either inspired by, or actually
18     # use packages and files from the Debian project's archives.
19    
20     do-debian-credits() {
21     docinto debian
22     for i in copyright README.Debian changelog; do
23 hkbst 1.2 test -f $i && dodoc "${S}"/debian/${i}
24 mkennedy 1.1 done
25     docinto .
26     }
27    
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.
31    
32     # The following `impl-*-timestamp-hack' functions SHOULD NOT be used
33     # outside of this eclass.
34    
35     # Bug http://bugs.gentoo.org/show_bug.cgi?id=16162 should remove the
36     # need for this hack.
37    
38     impl-save-timestamp-hack() {
39     local impl=$1
40     dodir /usr/share/${impl}
41 hkbst 1.2 tar cpjf "${D}"/usr/share/${impl}/portage-timestamp-compensate -C "${D}"/usr/$(get_libdir)/${impl} .
42 mkennedy 1.1 }
43    
44     impl-restore-timestamp-hack() {
45     local impl=$1
46     tar xjpfo /usr/share/${impl}/portage-timestamp-compensate -C /usr/$(get_libdir)/${impl}
47     }
48    
49     impl-remove-timestamp-hack() {
50     local impl=$1
51     rm -rf /usr/$(get_libdir)/${impl} &>/dev/null || true
52     }
53    
54     standard-impl-postinst() {
55     local impl=$1
56     case ${impl} in
57     cmucl|sbcl)
58     impl-restore-timestamp-hack ${impl}
59     ;;
60     *)
61     ;;
62     esac
63     }
64    
65     standard-impl-postrm() {
66     local impl=$1 impl_binary=$2
67     if [ ! -x ${impl_binary} ]; then
68     case ${impl} in
69     cmucl|sbcl)
70     impl-remove-timestamp-hack ${impl}
71     ;;
72     *)
73     ;;
74     esac
75     rm -rf /var/cache/common-lisp-controller/*/${impl}
76     fi
77     }
78    
79     # Local Variables: ***
80     # mode: shell-script ***
81     # tab-width: 4 ***
82     # End: ***

  ViewVC Help
Powered by ViewVC 1.1.20