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

Contents of /dev-lang/tcc/tcc-0.9.26-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Apr 2 23:46:23 2014 UTC (5 years, 10 months ago) by ottxor
Branch: MAIN
CVS Tags: HEAD
added prefix support (bug #499440)

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key C2000586)

1 # Copyright 1999-2014 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.26-r1.ebuild,v 1.1 2013/10/13 06:56:00 patrick Exp $
4
5 EAPI="5"
6
7 inherit eutils toolchain-funcs
8
9 DESCRIPTION="A very small C compiler for ix86/amd64"
10 HOMEPAGE="http://bellard.org/tcc/"
11 SRC_URI="http://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
12
13 LICENSE="LGPL-2.1"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86 ~amd64-linux"
16
17 DEPEND="dev-lang/perl" # doc generation
18 # Both tendra and tinycc install /usr/bin/tcc
19 RDEPEND="!dev-lang/tendra"
20 IUSE="test"
21
22 src_prepare() {
23 # Don't strip
24 sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
25
26 # Fix examples
27 sed -i -e '1{
28 i#! /usr/bin/tcc -run
29 /^#!/d
30 }' examples/ex*.c || die
31 sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
32
33 # fix texi2html invocation
34 sed -i -e 's/-number//' Makefile || die
35 sed -i -e 's/--sections//' Makefile || die
36 }
37
38 src_configure() {
39 use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
40 # better fixes welcome, it feels wrong to hack the env like this
41 # not autotools, so call configure directly
42 ./configure --cc="$(tc-getCC)" \
43 --prefix="${EPREFIX}/usr" \
44 --libdir="${EPREFIX}/usr/$(get_libdir)" \
45 --docdir="${EPREFIX}/usr/share/doc/${PF}"
46 }
47
48 src_compile() {
49 emake AR="$(tc-getAR)"
50 }
51
52 src_install() {
53 emake DESTDIR="${D}" install
54
55 dodoc Changelog README TODO VERSION
56 #dohtml tcc-doc.html
57 exeinto /usr/share/doc/${PF}/examples
58 doexe examples/ex*.c
59 }
60
61 src_test() {
62 # this is using tcc bits that don't know as-needed etc.
63 TCCFLAGS="" emake test
64 }

  ViewVC Help
Powered by ViewVC 1.1.20