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

Contents of /dev-lisp/clisp/clisp-2.32-r1.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, 7 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.32-r1.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 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 berkdb? ( =sys-libs/db-4* )"
25
26 src_unpack() {
27 unpack ${A}
28 epatch ${FILESDIR}/${PV}/fastcgi-Makefile.in-gentoo.patch
29 epatch ${FILESDIR}/${PV}/format.lisp-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 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" # needs work
74 # use ldap && myconf="${myconf} --with-module=dirkey" # openldap is broken
75 # use threads && myconf="${myconf} --with-threads=POSIX_THREADS" # broken
76 ./configure --prefix=/usr ${myconf} build || die "./configure failed"
77 cd build
78 ./makemake ${myconf} >Makefile
79 make config.lisp
80 sed -i 's,"vi","nano",g' config.lisp
81 make || die
82 }
83
84 src_install() {
85 cd build && make DESTDIR=${D} prefix=/usr install-bin || die
86
87 doman clisp.1
88 dodoc SUMMARY README* NEWS MAGIC.add GNU-GPL COPYRIGHT \
89 ANNOUNCE clisp.dvi clisp.html
90
91 rm -f ${D}/usr/lib/clisp/base/*
92 (cd ${D}/usr/lib/clisp/base && ln -s ../full/* .)
93 chmod a+x ${D}/usr/lib/clisp/clisp-link
94
95 # install common-lisp-controller profile
96 exeinto /usr/lib/common-lisp/bin
97 doexe ${FILESDIR}/clisp.sh
98 insinto /usr/lib/clisp
99 doins ${FILESDIR}/install-clc.lisp
100
101 keepdir /usr/lib/common-lisp/clisp
102 }
103
104 pkg_preinst() {
105 local clisp_dir=/usr/lib/clisp
106 local old_mem=$clisp_dir/full/lispinit.mem
107 local new_mem=$clisp_dir/full/lispinit-new.mem
108 local clean_mem=$clisp_dir/full/lispinit-clean.mem
109 local lisp_run=$clisp_dir/full/lisp.run
110
111 rm -f $old_mem $new_mem $clean_mem $lisp_run
112 }
113
114 pkg_postinst() {
115 standard-impl-postinst clisp
116 }
117
118 pkg_postrm() {
119 standard-impl-postrm clisp /usr/bin/clisp
120 }

  ViewVC Help
Powered by ViewVC 1.1.20