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

Contents of /dev-lisp/clisp/clisp-2.32.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.32.ebuild,v 1.7 2005/01/02 07:33:19 mkennedy 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 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 use postgres && myconf="${myconf} --with-module=postgresql"
69 use fastcgi && myconf="${myconf} --with-module=fastcgi"
70 # use berkdb && myconf="${myconf} --with-module=berkeley-db" # needs work
71 # use ldap && myconf="${myconf} --with-module=dirkey" # openldap is broken
72 # use threads && myconf="${myconf} --with-threads=POSIX_THREADS" # broken
73 ./configure --prefix=/usr ${myconf} build || die "./configure failed"
74 cd build
75 ./makemake ${myconf} >Makefile
76 make config.lisp
77 sed -i 's,"vi","nano",g' config.lisp
78 make || die
79 }
80
81 src_install() {
82 cd build && make DESTDIR=${D} prefix=/usr install-bin || die
83
84 doman clisp.1
85 dodoc SUMMARY README* NEWS MAGIC.add GNU-GPL COPYRIGHT \
86 ANNOUNCE clisp.dvi clisp.html
87
88 rm -f ${D}/usr/lib/clisp/base/*
89 (cd ${D}/usr/lib/clisp/base && ln -s ../full/* .)
90 chmod a+x ${D}/usr/lib/clisp/clisp-link
91
92 # install common-lisp-controller profile
93 exeinto /usr/lib/common-lisp/bin
94 doexe ${FILESDIR}/clisp.sh
95 insinto /usr/lib/clisp
96 doins ${FILESDIR}/install-clc.lisp
97
98 keepdir /usr/lib/common-lisp/clisp
99 }
100
101 pkg_preinst() {
102 local clisp_dir=/usr/lib/clisp
103 local old_mem=$clisp_dir/full/lispinit.mem
104 local new_mem=$clisp_dir/full/lispinit-new.mem
105 local clean_mem=$clisp_dir/full/lispinit-clean.mem
106 local lisp_run=$clisp_dir/full/lisp.run
107
108 rm -f $old_mem $new_mem $clean_mem $lisp_run
109 }
110
111 pkg_postinst() {
112 chown cl-builder:cl-builder /usr/lib/common-lisp/clisp
113 rm -rf /usr/lib/common-lisp/clisp/* || true
114 /usr/bin/clc-autobuild-impl clisp yes
115 /usr/sbin/register-common-lisp-implementation clisp
116 }
117
118 pkg_prerm() {
119 rm -rf /usr/lib/common-lisp/clisp/* || true
120 }

  ViewVC Help
Powered by ViewVC 1.1.20