summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2013-10-12 05:34:29 +0000
committerPatrick Lauer <patrick@gentoo.org>2013-10-12 05:34:29 +0000
commit8fd6e68ff275198e659d116c0cfb28b4aca59b73 (patch)
tree6bddf8a31f255e0c387bdd310c48eac2462dfecd /dev-lang
parentupstream fix for build failure against gcc-4.7 (diff)
downloadgentoo-2-8fd6e68ff275198e659d116c0cfb28b4aca59b73.tar.gz
gentoo-2-8fd6e68ff275198e659d116c0cfb28b4aca59b73.tar.bz2
gentoo-2-8fd6e68ff275198e659d116c0cfb28b4aca59b73.zip
First attempt at a -9999 ebuild
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/tcc/ChangeLog7
-rw-r--r--dev-lang/tcc/tcc-9999.ebuild70
2 files changed, 76 insertions, 1 deletions
diff --git a/dev-lang/tcc/ChangeLog b/dev-lang/tcc/ChangeLog
index 5bfef5bad178..c89551c1eb9e 100644
--- a/dev-lang/tcc/ChangeLog
+++ b/dev-lang/tcc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-lang/tcc
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/ChangeLog,v 1.35 2013/07/18 03:44:24 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/ChangeLog,v 1.36 2013/10/12 05:34:29 patrick Exp $
+
+*tcc-9999 (12 Oct 2013)
+
+ 12 Oct 2013; Patrick Lauer <patrick@gentoo.org> +tcc-9999.ebuild:
+ First attempt at a -9999 ebuild
18 Jul 2013; Patrick Lauer <patrick@gentoo.org> tcc-0.9.26.ebuild:
Re-enabling test suite that now actually works
diff --git a/dev-lang/tcc/tcc-9999.ebuild b/dev-lang/tcc/tcc-9999.ebuild
new file mode 100644
index 000000000000..e0ba1e9d1244
--- /dev/null
+++ b/dev-lang/tcc/tcc-9999.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/tcc-9999.ebuild,v 1.1 2013/10/12 05:34:29 patrick Exp $
+
+EAPI="5"
+
+inherit eutils toolchain-funcs git-r3
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+EGIT_REPO_URI="http://repo.or.cz/r/tinycc.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-lang/perl" # doc generation
+# Both tendra and tinycc install /usr/bin/tcc
+RDEPEND="!dev-lang/tendra"
+IUSE="test"
+
+src_prepare() {
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c || die
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
+
+ # fix texi2html invocation
+ sed -i -e 's/-number//' Makefile || die
+ sed -i -e 's/--sections//' Makefile || die
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=gcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ local myopts
+ use x86 && myopts="--cpu=x86"
+ use amd64 && myopts="--cpu=x86-64"
+ ./configure ${myopts} --cc="$(tc-getCC)" # not autotools
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ bindir="${D}"/usr/bin \
+ libdir="${D}"/usr/lib \
+ tccdir="${D}"/usr/lib/tcc \
+ includedir="${D}"/usr/include \
+ docdir="${D}"/usr/share/doc/${PF} \
+ mandir="${D}"/usr/share/man install
+
+ dodoc Changelog README TODO VERSION
+ dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}
+
+src_test() {
+ # this is using tcc bits that don't know as-needed etc.
+ TCCFLAGS="" emake test
+}