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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (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.7: +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-r1.ebuild,v 1.7 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 # The previous stanza might not be necessary. Bug 39830.
57 if is-flag '-march=athlon-xp'; then
58 replace-flags '-march=athlon-xp' '-mcpu=athlon-xp'
59 fi
60
61 einfo "Using CFLAGS: ${CFLAGS}"
62 export CC="$(gcc-getCC) ${CFLAGS}"
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 berkdb && myconf="${myconf} --with-module=berkeley-db"
79 use pcre && myconf="${myconf} --with-module=pcre"
80 ./configure --prefix=/usr ${myconf} build || die "./configure failed"
81 cd build
82 ./makemake ${myconf} >Makefile
83 make config.lisp
84 sed -i 's,"vi","nano",g' config.lisp
85 sed -i 's,http://www.lisp.org/HyperSpec/,http://www.lispworks.com/reference/HyperSpec/,g' config.lisp
86 make || die
87 }
88
89 src_install() {
90 cd build && make DESTDIR=${D} prefix=/usr install-bin || die
91 doman clisp.1
92 dodoc SUMMARY README* NEWS MAGIC.add GNU-GPL COPYRIGHT \
93 ANNOUNCE clisp.dvi clisp.html
94
95 rm -f ${D}/usr/lib/clisp/base/*
96 (cd ${D}/usr/lib/clisp/base && ln -s ../full/* .)
97 chmod a+x ${D}/usr/lib/clisp/clisp-link
98
99 # install common-lisp-controller profile
100 exeinto /usr/lib/common-lisp/bin
101 doexe ${FILESDIR}/clisp.sh
102 insinto /usr/lib/clisp
103 doins ${FILESDIR}/install-clc.lisp
104
105 keepdir /usr/lib/common-lisp/clisp
106 }
107
108 pkg_preinst() {
109 local clisp_dir=/usr/lib/clisp
110 local old_mem=$clisp_dir/full/lispinit.mem
111 local new_mem=$clisp_dir/full/lispinit-new.mem
112 local clean_mem=$clisp_dir/full/lispinit-clean.mem
113 local lisp_run=$clisp_dir/full/lisp.run
114 rm -f $old_mem $new_mem $clean_mem $lisp_run
115 }
116
117 pkg_postinst() {
118 standard-impl-postinst clisp
119 while read line; do einfo "${line}"; done <<EOF
120
121 PLEASE NOTE: FASL files (.fas) created by previous versions of CLISP
122 are not compatible with this version of CLISP (${PV}). You will need
123 to re-create your FASLs via. recompilation. FASLs in
124 /usr/lib/common-lisp/clisp for Common Lisp Controller-installed Lisp
125 packages have aready been recompiled for you.
126
127 EOF
128 }
129
130 pkg_postrm() {
131 standard-impl-postrm clisp /usr/bin/clisp
132 }

  ViewVC Help
Powered by ViewVC 1.1.20