/[gentoo-x86]/dev-lisp/cmucl/cmucl-20b_p001.ebuild
Gentoo

Contents of /dev-lisp/cmucl/cmucl-20b_p001.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Oct 24 19:07:00 2012 UTC (2 years, 2 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Update dependency after package move from x11-libs/openmotif to x11-libs/motif.

(Portage version: 2.1.11.30/cvs/Linux x86_64, signed Manifest commit with key E7BE08CA7DC6EA25)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lisp/cmucl/cmucl-20b_p001.ebuild,v 1.3 2012/06/07 17:33:19 zmedico Exp $
4
5 EAPI=3
6 inherit eutils multilib toolchain-funcs
7
8 MY_PV=${PV:0:3}
9
10 DESCRIPTION="CMU Common Lisp is an implementation of ANSI Common Lisp"
11 HOMEPAGE="http://www.cons.org/cmucl/"
12 SRC_URI="http://common-lisp.net/project/cmucl/downloads/release/${MY_PV}/cmucl-src-${MY_PV}.tar.bz2
13 http://common-lisp.net/project/cmucl/downloads/release/${MY_PV}/cmucl-${MY_PV}-x86-linux.tar.bz2"
14
15 LICENSE="public-domain"
16 SLOT="0"
17 KEYWORDS="~x86"
18 IUSE="X source sse2"
19
20 RDEPEND="x11-libs/motif"
21 DEPEND="${RDEPEND}
22 sys-devel/bc"
23 PDEPEND="dev-lisp/gentoo-init"
24
25 S="${WORKDIR}"
26
27 # glo_usev flagname [<if_yes> [<if_no>]]
28 # If $(use FLAGNAME) return true, echo IF_YES to standard output,
29 # otherwise echo IF_NO. IF_YES defaults to FLAGNAME if not specified
30 glo_usev() {
31 if [[ $# < 1 || $# > 3 ]]; then
32 echo "Usage: ${0} flag [if_yes [if_no]]"
33 die "${0}: wrong number of arguments: $#"
34 fi
35 local if_yes="${2:-${1}}" if_no="${3}"
36 if use ${1} ; then
37 printf "%s" "${if_yes}"
38 return 0
39 else
40 printf "%s" "${if_no}"
41 return 1
42 fi
43 }
44
45 src_prepare() {
46 epatch "${FILESDIR}"/${MY_PV}-patch001.patch
47 epatch "${FILESDIR}"/fix-man-and-doc-installation.patch
48 epatch "${FILESDIR}"/${MY_PV}-execstack-fixes.patch
49 epatch "${FILESDIR}"/${MY_PV}-customize-lisp-implementation-version.patch
50 epatch "${FILESDIR}"/${MY_PV}-nositeinit-build.patch
51 }
52
53 src_compile() {
54 local cmufpu=$(glo_usev sse2 sse2 x87)
55 local cmuopts="$(glo_usev !X -u) -f ${cmufpu}"
56 local buildimage="bin/lisp -core lib/cmucl/lib/lisp-${cmufpu}.core -noinit -nositeinit -batch"
57 env CC="$(tc-getCC)" src/tools/build.sh -v "-gentoo-${PR}" -C "" -o "${buildimage}" ${cmuopts} || die "Cannot build the compiler"
58 }
59
60 src_install() {
61 env MANDIR=share/man/man1 DOCDIR=share/doc/${PF} \
62 src/tools/make-dist.sh -S -g -G root -O root build-4 ${MY_PV} x86 linux \
63 || die "Cannot build installation archive"
64 # Necessary otherwise tar will fail
65 dodir /usr
66 pushd "${D}"/usr
67 tar xzpf "${WORKDIR}"/cmucl-${MY_PV}-x86-linux.tar.gz \
68 || die "Cannot install main system"
69 if use X ; then
70 tar xzpf "${WORKDIR}"/cmucl-${MY_PV}-x86-linux.extra.tar.gz \
71 || die "Cannot install extra files"
72 fi
73 if use source; then
74 # Necessary otherwise tar will fail
75 dodir /usr/share/common-lisp/source/${PN}
76 cd "${D}"/usr/share/common-lisp/source/${PN}
77 tar --strip-components 1 -xzpf "${WORKDIR}"/cmucl-src-${MY_PV}.tar.gz \
78 || die "Cannot install sources"
79 fi
80 popd
81
82 # Install site config file
83 sed "s,@PF@,${PF},g ; s,@VERSION@,$(date +%F),g" \
84 < "${FILESDIR}"/site-init.lisp.in \
85 > "${D}"/usr/$(get_libdir)/cmucl/site-init.lisp \
86 || die "Cannot fix site-init.lisp"
87 insinto /etc
88 doins "${FILESDIR}"/cmuclrc || die "Failed to install cmuclrc"
89 }

  ViewVC Help
Powered by ViewVC 1.1.20