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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (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.9: +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.ebuild,v 1.9 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 berkdb 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 berkdb? ( =sys-libs/db-4* )
24 pcre? ( dev-libs/libpcre )"
25
26 src_unpack() {
27 unpack ${A}
28 epatch ${FILESDIR}/${PV}/fastcgi-Makefile.in-gentoo.patch
29 epatch ${FILESDIR}/${PV}/berkely-db-configure-gentoo.patch.gz
30 }
31
32 src_compile() {
33 # Handle the case where the user has some other -falign-functions
34 # option set. Bug 34630.
35 if ! is-flag '-falign-functions=4' \
36 && expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)' >/dev/null; then
37 CFLAGS=${CFLAGS/\
38 $(expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)')/\
39 -falign-functions=4}
40 fi
41
42 # Fails to compile without -falign-functions=4 when -march=pentium4
43 # (or -march=pentium3, sometimes??) is defined. Bugs 33425 and 34630.
44 if (is-flag '-march=pentium4' || is-flag '-march=pentium3') \
45 && ! is-flag '-falign-functions=4'; then
46 append-flags '-falign-functions=4'
47 fi
48
49 # Athlon XP users report problems with -O3 optimization. In this
50 # block, we remove any optimization flag. Depending on bug 34497. we
51 # may be able to reduce optimization to -O2.
52 if is-flag '-march=athlon-xp'; then
53 filter-flags '-O*'
54 fi
55
56 einfo "Using CFLAGS: ${CFLAGS}"
57 export CC="$(gcc-getCC) ${CFLAGS}"
58 unset CFLAGS CXXFLAGS
59 local myconf="--with-dynamic-ffi
60 --with-unicode
61 --with-module=regexp
62 --with-module=syscalls
63 --with-module=wildcard
64 --with-module=bindings/glibc"
65 use readline || myconf="${myconf} --with-noreadline"
66 use nls || myconf="${myconf} --with-nogettext"
67 use X && myconf="${myconf} --with-module=clx/new-clx"
68 if use postgres; then
69 myconf="${myconf} --with-module=postgresql"
70 CC="${CC} -I $(pg_config --includedir)"
71 fi
72 use fastcgi && myconf="${myconf} --with-module=fastcgi"
73 use berkdb && myconf="${myconf} --with-module=berkeley-db"
74 use pcre && myconf="${myconf} --with-module=pcre"
75 ./configure --prefix=/usr ${myconf} build || die "./configure failed"
76 cd build
77 ./makemake ${myconf} >Makefile
78 make config.lisp
79 sed -i 's,"vi","nano",g' config.lisp
80 sed -i 's,http://www.lisp.org/HyperSpec/,http://www.lispworks.com/reference/HyperSpec/,g' config.lisp
81 make || die
82 }
83
84 src_install() {
85 cd build && make DESTDIR=${D} prefix=/usr install-bin || die
86 doman clisp.1
87 dodoc SUMMARY README* NEWS MAGIC.add GNU-GPL COPYRIGHT \
88 ANNOUNCE clisp.dvi clisp.html
89
90 rm -f ${D}/usr/lib/clisp/base/*
91 (cd ${D}/usr/lib/clisp/base && ln -s ../full/* .)
92 chmod a+x ${D}/usr/lib/clisp/clisp-link
93
94 # install common-lisp-controller profile
95 exeinto /usr/lib/common-lisp/bin
96 doexe ${FILESDIR}/clisp.sh
97 insinto /usr/lib/clisp
98 doins ${FILESDIR}/install-clc.lisp
99
100 keepdir /usr/lib/common-lisp/clisp
101 }
102
103 pkg_preinst() {
104 local clisp_dir=/usr/lib/clisp
105 local old_mem=$clisp_dir/full/lispinit.mem
106 local new_mem=$clisp_dir/full/lispinit-new.mem
107 local clean_mem=$clisp_dir/full/lispinit-clean.mem
108 local lisp_run=$clisp_dir/full/lisp.run
109
110 rm -f $old_mem $new_mem $clean_mem $lisp_run
111 }
112
113 pkg_postinst() {
114 standard-impl-postinst clisp
115 while read line; do einfo "${line}"; done <<EOF
116
117 PLEASE NOTE: FASL files (.fas) created by previous versions of CLISP
118 are not compatible with this version of CLISP (${PV}). You will need
119 to re-create your FASLs via. recompilation. FASLs in
120 /usr/lib/common-lisp/clisp for Common Lisp Controller-installed Lisp
121 packages have aready been recompiled for you.
122
123 EOF
124 }
125
126 pkg_postrm() {
127 standard-impl-postrm clisp /usr/bin/clisp
128 }

  ViewVC Help
Powered by ViewVC 1.1.20