summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin English <wizardedit@gentoo.org>2017-12-18 14:57:58 -0600
committerAustin English <wizardedit@gentoo.org>2017-12-18 15:06:08 -0600
commitb4154fabf40ed0574cbb52b5d771f03ee57902fa (patch)
tree2a556426e3a5a1a8fdaf27c1f0e7e193447a1796 /dev-lang/tcc
parentdev-lang/tcc: update 9999 ebuild to EAPI 6 (diff)
downloadgentoo-b4154fabf40ed0574cbb52b5d771f03ee57902fa.tar.gz
gentoo-b4154fabf40ed0574cbb52b5d771f03ee57902fa.tar.bz2
gentoo-b4154fabf40ed0574cbb52b5d771f03ee57902fa.zip
dev-lang/tcc: version bump, 0.9.27
Diffstat (limited to 'dev-lang/tcc')
-rw-r--r--dev-lang/tcc/Manifest1
-rw-r--r--dev-lang/tcc/tcc-0.9.27.ebuild65
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-lang/tcc/Manifest b/dev-lang/tcc/Manifest
index 35efe36bd08f..eaccaa273efb 100644
--- a/dev-lang/tcc/Manifest
+++ b/dev-lang/tcc/Manifest
@@ -1 +1,2 @@
DIST tcc-0.9.26.tar.bz2 525906 BLAKE2B 588e387d563ddede9842ac9012df36520fb1596bd3047fda2684ab44e49f8c1a35c1560c2fee724933cfcad5d618d84df853b72e1fee144b551cb67f7af1558a SHA512 abdbe208498cf4865a2036b5426616f5888b9b0e8d5d2fda6d1dd4afab3386167f12eca87d8a5c4c9b7dc88620d983ddce3e874b7dfa9c21eceea29ffa635d53
+DIST tcc-0.9.27.tar.bz2 634999 BLAKE2B 9a76dac9f54fa0b64a72e874cfec9a4bd9b938d244d064b2e76bd31acfb9e48fdbdb8895132634be1dee4302293405bf75606a6804c8178afa8fd30daa53b73a SHA512 835184292d97c07f0ff7b36ec550e855e649b04e23c7e2a1c706d223409eb60708dc1ae969f28eba45e56c8b96ae56936b93caf9d8a13ac5adf119014d5367a7
diff --git a/dev-lang/tcc/tcc-0.9.27.ebuild b/dev-lang/tcc/tcc-0.9.27.ebuild
new file mode 100644
index 000000000000..9900cc9ea3a2
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.27.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+SRC_URI="http://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+
+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
+
+ eapply_user
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ # not autotools, so call configure directly
+ ./configure --cc="$(tc-getCC)" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" 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
+}