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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Oct 13 06:56:00 2013 UTC (6 years, 3 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Backport fixes from -9999 to release, remove old

(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/tcc-9999.ebuild,v 1.4 2013/10/13 01:33:16 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"
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 --bindir=/usr/bin \
44 --libdir=/usr/$(get_libdir) \
45 --tccdir=tcc \
46 --includedir=/usr/include \
47 --docdir=/usr/share/doc/${PF} \
48 --mandir=/usr/share/man
49 }
50
51 src_compile() {
52 emake AR="$(tc-getAR)"
53 }
54
55 src_install() {
56 emake DESTDIR="${D}" install
57
58 dodoc Changelog README TODO VERSION
59 #dohtml tcc-doc.html
60 exeinto /usr/share/doc/${PF}/examples
61 doexe examples/ex*.c
62 }
63
64 src_test() {
65 # this is using tcc bits that don't know as-needed etc.
66 TCCFLAGS="" emake test
67 }

  ViewVC Help
Powered by ViewVC 1.1.20