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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20