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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Mon Apr 3 17:29:50 2006 UTC (13 years, 6 months ago) by mkennedy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Missing x11-misc/imake dependencies; Resolves Bug #128288; Removed old ebuilds.
(Portage version: 2.1_pre7-r1)

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.2-r2.ebuild,v 1.8 2005/11/15 14:21:15 gustavoz Exp $
4
5 inherit flag-o-matic common-lisp-common-2 eutils toolchain-funcs
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 ppc ~ppc-macos ~amd64 -sparc"
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 PROVIDE="virtual/commonlisp"
26
27 src_unpack() {
28 unpack ${A}
29 epatch ${FILESDIR}/${PV}/fastcgi-Makefile.in-gentoo.patch || die
30 epatch ${FILESDIR}/${PV}/glibc-linux.lisp-sigpause-gentoo.patch || die
31 epatch ${FILESDIR}/${PV}/compilefix.patch || die
32 }
33
34 src_compile() {
35 # Handle the case where the user has some other -falign-functions
36 # option set. Bug 34630.
37 if ! is-flag '-falign-functions=4' \
38 && expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)' >/dev/null; then
39 CFLAGS=${CFLAGS/\
40 $(expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)')/\
41 -falign-functions=4}
42 fi
43
44 # Fails to compile without -falign-functions=4 when -march=pentium4
45 # (or -march=pentium3, sometimes??) is defined. Bugs 33425 and 34630.
46 if (is-flag '-march=pentium4' || is-flag '-march=pentium3') \
47 && ! is-flag '-falign-functions=4'; then
48 append-flags '-falign-functions=4'
49 fi
50
51 # Athlon XP users report problems with -O3 optimization. In this
52 # block, we remove any optimization flag. Depending on bug 34497. we
53 # may be able to reduce optimization to -O2.
54 if is-flag '-march=athlon-xp'; then
55 filter-flags '-O*'
56 fi
57
58 # The previous stanza might not be necessary. Bug 39830.
59 if is-flag '-march=athlon-xp'; then
60 replace-flags '-march=athlon-xp' '-mcpu=athlon-xp'
61 fi
62
63 # einfo "Using CFLAGS: ${CFLAGS}"
64 # export CC="$(gcc-getCC) ${CFLAGS}"
65
66 CC="$(tc-getCC)" # used further down
67
68 # Let CLISP use its own set of optimizations
69 unset CFLAGS CXXFLAGS
70 local myconf="--with-dynamic-ffi
71 --with-unicode
72 --with-module=regexp
73 --with-module=syscalls
74 --with-module=wildcard"
75 use ppc-macos || myconf="${myconf} --with-module=bindings/glibc"
76 use readline || myconf="${myconf} --with-noreadline"
77 use nls || myconf="${myconf} --with-nogettext"
78 # use X && myconf="${myconf} --with-module=clx/new-clx"
79 use X && myconf="${myconf} --with-module=clx/mit-clx"
80 if use postgres; then
81 myconf="${myconf} --with-module=postgresql"
82 CC="${CC} -I $(pg_config --includedir)"
83 fi
84 use fastcgi && myconf="${myconf} --with-module=fastcgi"
85 use pcre && myconf="${myconf} --with-module=pcre"
86 ./configure --prefix=/usr ${myconf} build || die "./configure failed"
87 cd build
88 ./makemake ${myconf} >Makefile
89 emake -j1 config.lisp
90 sed -i 's,"vi","nano",g' config.lisp
91 sed -i 's,http://www.lisp.org/HyperSpec/,http://www.lispworks.com/reference/HyperSpec/,g' config.lisp
92 emake -j1 || die
93 }
94
95 src_install() {
96 pushd build
97 make DESTDIR=${D} prefix=/usr install-bin || die
98 doman clisp.1
99 dodoc SUMMARY README* NEWS MAGIC.add GNU-GPL COPYRIGHT \
100 ANNOUNCE clisp.dvi clisp.html
101
102 rm -f ${D}/usr/lib/clisp/base/*
103 (cd ${D}/usr/lib/clisp/base && ln -s ../full/* .)
104 chmod a+x ${D}/usr/lib/clisp/clisp-link
105 popd
106
107 # install common-lisp-controller profile
108 exeinto /usr/lib/common-lisp/bin
109 doexe ${FILESDIR}/${PV}/clisp.sh
110 insinto /usr/lib/clisp
111 doins ${FILESDIR}/${PV}/install-clc.lisp
112 dodoc ${FILESDIR}/${PV}/README.Gentoo
113
114 keepdir /usr/lib/common-lisp/clisp
115 }
116
117 pkg_preinst() {
118 local clisp_dir=/usr/lib/clisp
119 local old_mem=$clisp_dir/full/lispinit.mem
120 local new_mem=$clisp_dir/full/lispinit-new.mem
121 local clean_mem=$clisp_dir/full/lispinit-clean.mem
122 local lisp_run=$clisp_dir/full/lisp.run
123 rm -f $old_mem $new_mem $clean_mem $lisp_run
124 }
125
126 pkg_postinst() {
127 standard-impl-postinst clisp
128 }
129
130 pkg_postrm() {
131 standard-impl-postrm clisp /usr/bin/clisp
132 }
133
134 pkg_postrm() {
135 if [ ! -x /usr/bin/clisp ]; then
136 rm -rf /usr/lib/clisp/ || die
137 fi
138 }

  ViewVC Help
Powered by ViewVC 1.1.20