/[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.4 - (hide annotations) (download)
Sun Apr 25 20:37:25 2004 UTC (15 years, 6 months ago) by vapier
Branch: MAIN
Changes since 1.3: +32 -37 lines
add inherit eutils

1 mkennedy 1.2 # Copyright 1999-2004 Gentoo Technologies, Inc.
2 mkennedy 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.4 # $Header: /home/cvsroot/gentoo-x86/dev-lisp/clisp/clisp-2.31-r1.ebuild,v 1.3 2004/03/30 20:58:13 spyderous Exp $
4 mkennedy 1.1
5 vapier 1.4 inherit flag-o-matic eutils
6 mkennedy 1.1
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 vapier 1.4
11     LICENSE="GPL-2"
12     SLOT="2"
13     KEYWORDS="x86"
14     IUSE="X threads fastcgi postgres ldap nls"
15    
16 mkennedy 1.1 DEPEND="dev-libs/libsigsegv
17     dev-lisp/common-lisp-controller
18     fastcgi? ( dev-libs/fcgi )
19     postgres? ( dev-db/postgresql )
20 spyderous 1.3 X? ( virtual/x11 )
21 mkennedy 1.1 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 vapier 1.4 # 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 mkennedy 1.2 einfo "Using CFLAGS: ${CFLAGS}"
56 mkennedy 1.1 export CC="${CC} ${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 vapier 1.4 rm -rf ${ROOT}/usr/lib/common-lisp/clisp/* || true
113 mkennedy 1.1 /usr/bin/clc-autobuild-impl clisp yes
114     /usr/sbin/register-common-lisp-implementation clisp
115     }
116    
117     pkg_prerm() {
118 vapier 1.4 rm -rf ${ROOT}/usr/lib/common-lisp/clisp/* || true
119 mkennedy 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20