/[gentoo-x86]/dev-lang/tcc/tcc-0.9.25.ebuild
Gentoo

Contents of /dev-lang/tcc/tcc-0.9.25.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Aug 16 20:05:34 2010 UTC (4 years, 3 months ago) by truedfx
Branch: MAIN
Changes since 1.2: +4 -6 lines
Respect CFLAGS, LDFLAGS (#332599)
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/tcc-0.9.25.ebuild,v 1.2 2010/07/08 16:29:57 hwoarang Exp $
4
5 inherit eutils toolchain-funcs
6
7 IUSE=""
8 DESCRIPTION="A very small C compiler for ix86/amd64"
9 HOMEPAGE="http://bellard.org/tcc/"
10 SRC_URI="http://download.savannah.nongnu.org/releases/tinycc/${P}.tar.bz2"
11
12 LICENSE="LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15
16 DEPEND=""
17 # Both tendra and tinycc install /usr/bin/tcc
18 RDEPEND="!dev-lang/tendra"
19
20 # Testsuite is broken, relies on gcc to compile
21 # invalid C code that it no longer accepts
22 RESTRICT="test"
23
24 src_unpack() {
25 unpack ${A}
26 cd "${S}"
27 epatch "${FILESDIR}"/${PN}-0.9.25-flags.patch
28
29 # Don't strip
30 sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile
31
32 # Fix examples
33 sed -i -e '1{
34 i#! /usr/bin/tcc -run
35 /^#!/d
36 }' examples/ex*.c
37 sed -i -e '1s/$/ -lX11/' examples/ex4.c
38 }
39
40 src_compile() {
41 local myopts
42 use x86 && myopts="--cpu=x86"
43 use amd64 && myopts="--cpu=x86-64"
44 econf ${myopts} --cc="$(tc-getCC)"
45 emake || die "make failed"
46 }
47
48 src_install() {
49 emake \
50 bindir="${D}"/usr/bin \
51 libdir="${D}"/usr/lib \
52 tccdir="${D}"/usr/lib/tcc \
53 includedir="${D}"/usr/include \
54 docdir="${D}"/usr/share/doc/${PF} \
55 mandir="${D}"/usr/share/man install || die "make install failed"
56 dodoc Changelog README TODO VERSION
57 dohtml tcc-doc.html
58 exeinto /usr/share/doc/${PF}/examples
59 doexe examples/ex*.c
60 }

  ViewVC Help
Powered by ViewVC 1.1.20