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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Jan 2 07:33:19 2005 UTC (14 years, 10 months ago) by mkennedy
Branch: MAIN
Changes since 1.7: +2 -2 lines
*** empty log message ***

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.31-r1.ebuild,v 1.7 2004/07/14 15:53:14 agriffis Exp $
4
5 inherit flag-o-matic 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 ldap nls 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 ldap? ( net-nds/openldap )
22 readline? ( sys-libs/readline )
23 nls? ( sys-devel/gettext )"
24
25 src_unpack() {
26 unpack ${A}
27 epatch ${FILESDIR}/${PV}/bindings-glibc-linux.lisp-gentoo.patch
28 epatch ${FILESDIR}/${PV}/bindings-wildcard-fnmatch.c-gentoo.patch
29 epatch ${FILESDIR}/${PV}/fastcgi-Makefile.in-gentoo.patch
30 }
31
32 src_compile() {
33 # Handle the case where the user has some other -falign-functions
34 # option set. Bug 34630.
35
36 if ! is-flag '-falign-functions=4' \
37 && expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)' >/dev/null; then
38 CFLAGS=${CFLAGS/\
39 $(expr "$CFLAGS" : '.*\(-falign-functions=[[:digit:]]\+\)')/\
40 -falign-functions=4}
41 fi
42
43 # Fails to compile without -falign-functions=4 when -march=pentium4
44 # (or -march=pentium3, sometimes??) is defined. Bugs 33425 and 34630.
45 if (is-flag '-march=pentium4' || is-flag '-march=pentium3') \
46 && ! is-flag '-falign-functions=4'; then
47 append-flags '-falign-functions=4'
48 fi
49
50 # Athlon XP users report problems with -O3 optimization. In this
51 # block, we remove any optimization flag. Depending on bug 34497. we
52 # may be able to reduce optimization to -O2.
53 is-flag -march=athlon-xp && filter-flags -O?
54
55 einfo "Using CFLAGS: ${CFLAGS}"
56 export CC="$(gcc-getCC) ${CFLAGS}"
57 unset CFLAGS CXXFLAGS
58 local myconf="--with-dynamic-ffi
59 --with-unicode
60 --with-module=regexp
61 --with-module=syscalls
62 --with-module=wildcard
63 --with-module=bindings/glibc"
64 use readline || myconf="${myconf} --with-noreadline"
65 use nls || myconf="${myconf} --with-nogettext"
66 use X && myconf="${myconf} --with-module=clx/new-clx"
67 use postgres && myconf="${myconf} --with-module=postgresql"
68 use fastcgi && myconf="${myconf} --with-module=fastcgi"
69 # the following modules are not supported
70 # use ldap && myconf="${myconf} --with-module=dirkey"
71 # use threads && myconf="${myconf} --with-threads=POSIX_THREADS"
72 ./configure --prefix=/usr ${myconf} build || die "./configure failed"
73 cd build
74 ./makemake ${myconf} >Makefile
75 make config.lisp
76 sed 's,"vi","nano",g' <config.lisp >config.gentoo && mv config.gentoo config.lisp || die
77 make || die
78 }
79
80 src_install() {
81 cd build && make DESTDIR=${D} prefix=/usr install-bin || die
82
83 doman clisp.1
84 dodoc SUMMARY README* NEWS MAGIC.add GNU-GPL COPYRIGHT \
85 ANNOUNCE clisp.dvi clisp.html
86
87 rm -f ${D}/usr/lib/clisp/base/*
88 (cd ${D}/usr/lib/clisp/base && ln -s ../full/* .)
89 chmod a+x ${D}/usr/lib/clisp/clisp-link
90
91 # install common-lisp-controller profile
92 exeinto /usr/lib/common-lisp/bin
93 doexe ${FILESDIR}/clisp.sh
94 insinto /usr/lib/clisp
95 doins ${FILESDIR}/install-clc.lisp
96
97 keepdir /usr/lib/common-lisp/clisp
98 }
99
100 pkg_preinst() {
101 local clisp_dir=/usr/lib/clisp
102 local old_mem=$clisp_dir/full/lispinit.mem
103 local new_mem=$clisp_dir/full/lispinit-new.mem
104 local clean_mem=$clisp_dir/full/lispinit-clean.mem
105 local lisp_run=$clisp_dir/full/lisp.run
106
107 rm -f $old_mem $new_mem $clean_mem $lisp_run
108 }
109
110 pkg_postinst() {
111 chown cl-builder:cl-builder /usr/lib/common-lisp/clisp
112 rm -rf ${ROOT}/usr/lib/common-lisp/clisp/* || true
113 /usr/bin/clc-autobuild-impl clisp yes
114 /usr/sbin/register-common-lisp-implementation clisp
115 }
116
117 pkg_prerm() {
118 rm -rf ${ROOT}/usr/lib/common-lisp/clisp/* || true
119 }

  ViewVC Help
Powered by ViewVC 1.1.20