/[gentoo-x86]/dev-lisp/clisp/clisp-2.33-r2.ebuild
Gentoo

Contents of /dev-lisp/clisp/clisp-2.33-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Apr 15 19:33:01 2005 UTC (14 years, 6 months ago) by mkennedy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
(Portage version: 2.0.51.19)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lisp/clisp/clisp-2.33-r2.ebuild,v 1.4 2005/01/02 07:33:19 mkennedy Exp $
4
5 inherit flag-o-matic common-lisp-common eutils gcc
6
7 DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp"
8 HOMEPAGE="http://clisp.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/clisp/${P}.tar.bz2"
10
11 LICENSE="GPL-2"
12 SLOT="2"
13 KEYWORDS="~x86"
14 IUSE="X fastcgi nls pcre postgres readline"
15
16 DEPEND="dev-libs/libsigsegv
17 dev-lisp/common-lisp-controller
18 fastcgi? ( dev-libs/fcgi )
19 postgres? ( dev-db/postgresql )
20 X? ( virtual/x11 )
21 readline? ( sys-libs/readline )
22 nls? ( sys-devel/gettext )
23 pcre? ( dev-libs/libpcre )"
24
25 src_unpack() {
26 unpack ${A}
27 epatch ${FILESDIR}/${PV}/fastcgi-Makefile.in-gentoo.patch
28 }
29
30 src_compile() {
31 # Handle the case where the user has some other -falign-functions
32 # option set. Bug 34630.
33 if ! is-flag '-falign-functions=4' \
34 && expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)' >/dev/null; then
35 CFLAGS=${CFLAGS/\
36 $(expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)')/\
37 -falign-functions=4}
38 fi
39
40 # Fails to compile without -falign-functions=4 when -march=pentium4
41 # (or -march=pentium3, sometimes??) is defined. Bugs 33425 and 34630.
42 if (is-flag '-march=pentium4' || is-flag '-march=pentium3') \
43 && ! is-flag '-falign-functions=4'; then
44 append-flags '-falign-functions=4'
45 fi
46
47 # Athlon XP users report problems with -O3 optimization. In this
48 # block, we remove any optimization flag. Depending on bug 34497. we
49 # may be able to reduce optimization to -O2.
50 if is-flag '-march=athlon-xp'; then
51 filter-flags '-O*'
52 fi
53
54 # The previous stanza might not be necessary. Bug 39830.
55 if is-flag '-march=athlon-xp'; then
56 replace-flags '-march=athlon-xp' '-mcpu=athlon-xp'
57 fi
58
59 # einfo "Using CFLAGS: ${CFLAGS}"
60 # export CC="$(gcc-getCC) ${CFLAGS}"
61
62 # Let CLISP use its own set of optimizations
63 unset CFLAGS CXXFLAGS
64 local myconf="--with-dynamic-ffi
65 --with-unicode
66 --with-module=regexp
67 --with-module=syscalls
68 --with-module=wildcard
69 --with-module=bindings/glibc"
70 use readline || myconf="${myconf} --with-noreadline"
71 use nls || myconf="${myconf} --with-nogettext"
72 use X && myconf="${myconf} --with-module=clx/new-clx"
73 if use postgres; then
74 myconf="${myconf} --with-module=postgresql"
75 CC="${CC} -I $(pg_config --includedir)"
76 fi
77 use fastcgi && myconf="${myconf} --with-module=fastcgi"
78 use pcre && myconf="${myconf} --with-module=pcre"
79 ./configure --prefix=/usr ${myconf} build || die "./configure failed"
80 cd build
81 ./makemake ${myconf} >Makefile
82 emake -j1 config.lisp
83 sed -i 's,"vi","nano",g' config.lisp
84 sed -i 's,http://www.lisp.org/HyperSpec/,http://www.lispworks.com/reference/HyperSpec/,g' config.lisp
85 emake -j1 || die
86 }
87
88 src_install() {
89 cd build && make DESTDIR=${D} prefix=/usr install-bin || die
90 doman clisp.1
91 dodoc SUMMARY README* NEWS MAGIC.add GNU-GPL COPYRIGHT \
92 ANNOUNCE clisp.dvi clisp.html
93
94 rm -f ${D}/usr/lib/clisp/base/*
95 (cd ${D}/usr/lib/clisp/base && ln -s ../full/* .)
96 chmod a+x ${D}/usr/lib/clisp/clisp-link
97
98 # install common-lisp-controller profile
99 exeinto /usr/lib/common-lisp/bin
100 doexe ${FILESDIR}/clisp.sh
101 insinto /usr/lib/clisp
102 doins ${FILESDIR}/install-clc.lisp
103
104 keepdir /usr/lib/common-lisp/clisp
105 }
106
107 pkg_preinst() {
108 local clisp_dir=/usr/lib/clisp
109 local old_mem=$clisp_dir/full/lispinit.mem
110 local new_mem=$clisp_dir/full/lispinit-new.mem
111 local clean_mem=$clisp_dir/full/lispinit-clean.mem
112 local lisp_run=$clisp_dir/full/lisp.run
113 rm -f $old_mem $new_mem $clean_mem $lisp_run
114 }
115
116 pkg_postinst() {
117 standard-impl-postinst clisp
118 while read line; do einfo "${line}"; done <<EOF
119
120 PLEASE NOTE: FASL files (.fas) created by previous versions of CLISP
121 are not compatible with this version of CLISP (${PV}). You will need
122 to re-create your FASLs via. recompilation. FASLs in
123 /usr/lib/common-lisp/clisp for Common Lisp Controller-installed Lisp
124 packages have aready been recompiled for you.
125
126 EOF
127 }
128
129 pkg_postrm() {
130 standard-impl-postrm clisp /usr/bin/clisp
131 }

  ViewVC Help
Powered by ViewVC 1.1.20