summaryrefslogtreecommitdiff
path: root/dev-lang/tcc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-20 11:17:21 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-20 11:17:21 +0000
commit48bdeb0db9c7ffed22c6eb859ee40b55ba598b86 (patch)
treef88035a58c20099cf45a576fb53b0330a4754f14 /dev-lang/tcc
parent0fb71e0215ed52863e462cccef73c01aff44d43d (diff)
gentoo resync : 20.12.2017
Diffstat (limited to 'dev-lang/tcc')
-rw-r--r--dev-lang/tcc/Manifest8
-rw-r--r--dev-lang/tcc/files/clang.patch34
-rw-r--r--dev-lang/tcc/files/linker.patch34
-rw-r--r--dev-lang/tcc/tcc-0.9.27.ebuild65
-rw-r--r--dev-lang/tcc/tcc-9999.ebuild22
5 files changed, 120 insertions, 43 deletions
diff --git a/dev-lang/tcc/Manifest b/dev-lang/tcc/Manifest
index b049cb91b99e..67cb72d10be6 100644
--- a/dev-lang/tcc/Manifest
+++ b/dev-lang/tcc/Manifest
@@ -1,8 +1,10 @@
-AUX clang.patch 667 BLAKE2B b84f58dd0c460e36c90c6ff3f6cc342034daede23bae157152c7c44ac845c0cd30c6773966227a0d0cb6b08bb70770323c04209c880b2150414687e973717207 SHA512 aadbd3676b5333ae3b8a04c75117633ca8b08c5fa0f695b9f7ff7d3019ff06211c986d0a0986c7dc329621cc1a57e23d50924fd49cf1367490d962fcef4b4efe
-AUX linker.patch 441 BLAKE2B 6b60d1fd80301abdd707a8310e0c93d12e91bb9d680b72db13c48de8bbe31a8923406c008c9c2ad68216ee2688c8651df85056127fefc5fa31f48521442fcc97 SHA512 e19817d5f500bd95060efff3c984218800cbcabe01a88fb048b459cce8d67c435ff1d2130d7eedac55f5726bc0cc13dabe41c2535c2bc3c5fc0a21dc7128a965
+AUX clang.patch 441 BLAKE2B 6b60d1fd80301abdd707a8310e0c93d12e91bb9d680b72db13c48de8bbe31a8923406c008c9c2ad68216ee2688c8651df85056127fefc5fa31f48521442fcc97 SHA512 e19817d5f500bd95060efff3c984218800cbcabe01a88fb048b459cce8d67c435ff1d2130d7eedac55f5726bc0cc13dabe41c2535c2bc3c5fc0a21dc7128a965
+AUX linker.patch 667 BLAKE2B b84f58dd0c460e36c90c6ff3f6cc342034daede23bae157152c7c44ac845c0cd30c6773966227a0d0cb6b08bb70770323c04209c880b2150414687e973717207 SHA512 aadbd3676b5333ae3b8a04c75117633ca8b08c5fa0f695b9f7ff7d3019ff06211c986d0a0986c7dc329621cc1a57e23d50924fd49cf1367490d962fcef4b4efe
DIST tcc-0.9.26.tar.bz2 525906 BLAKE2B 588e387d563ddede9842ac9012df36520fb1596bd3047fda2684ab44e49f8c1a35c1560c2fee724933cfcad5d618d84df853b72e1fee144b551cb67f7af1558a SHA512 abdbe208498cf4865a2036b5426616f5888b9b0e8d5d2fda6d1dd4afab3386167f12eca87d8a5c4c9b7dc88620d983ddce3e874b7dfa9c21eceea29ffa635d53
+DIST tcc-0.9.27.tar.bz2 634999 BLAKE2B 9a76dac9f54fa0b64a72e874cfec9a4bd9b938d244d064b2e76bd31acfb9e48fdbdb8895132634be1dee4302293405bf75606a6804c8178afa8fd30daa53b73a SHA512 835184292d97c07f0ff7b36ec550e855e649b04e23c7e2a1c706d223409eb60708dc1ae969f28eba45e56c8b96ae56936b93caf9d8a13ac5adf119014d5367a7
EBUILD tcc-0.9.26-r1.ebuild 1566 BLAKE2B 61bcc852c44d4f1881fe6c51dd9e58908c0d0c9e9cdb52a1fd804b9f90f321d947227fb2389828bad474ce8c3fdc970fda6b610cf5165201e1246bb5c853b224 SHA512 40d4489879464f4d380eb9433212dda09faf1e4c297f99a204715993253387a0a8d6f5d11911ccbc47542c914b4a0a4d9c971568bed627a21fdff85580216bc0
EBUILD tcc-0.9.26-r2.ebuild 1536 BLAKE2B c03d415d26ce6817e8903fb64a97b195c0901e0496a5edb57e6f7be70c6d6ca4e3ce9ba6cb63666801dcb38eea78c62004a206f148412503bb6b89f7af229480 SHA512 cdeffde7870d16177250e6f9901242e4242d037ec53e4a6a675f8e8bd68ea1af3989903b2daf793b58d024da407c5383b314ae0adba7a55387011767e0377f63
EBUILD tcc-0.9.26-r3.ebuild 1700 BLAKE2B 4cd7ad6fd04f6cec1b8a55d939167e56414ef50537cf63c8b88855188528016bf4aa19053a3f9489998720aef920f128695edf7e921e82812fdba60223a752a4 SHA512 58215a00f35d25b98b456229b284e0f6e3e910c490da28b005ca715f5542d6f9f59da720333e86b52e0e611502bbe1c911c9b7ec737b1853e3ca34d29f11fd68
-EBUILD tcc-9999.ebuild 1494 BLAKE2B 25a07dbf893c60570e9e983f2085ef6fec4d18710a85298f5a2dfdf2de90b74ce3411228f3e22273645813bd6bb844f858cde2f13435b8f210a6b84b5a94629f SHA512 e8c8affcc1413860e0fb751de76603395326c489762ba1bdf3ece0a696e1121c4ea5ffcc72e49596f89fa249ba7cfdf45864573b5834b929198e694e7f234cd6
+EBUILD tcc-0.9.27.ebuild 1543 BLAKE2B 5c8320fb621188dbabc8e8d1fb11171e5a7333c963629066eb35ba5b9b3b56dff3ddea515cfa265244585ae982dd8679433a6f280a811afac46a5f0c3567a755 SHA512 94f24d5a9de41189366fcdd1323f7bb81df6cf81326f5cfe814c38a4b1e6c0bc519fc850afb7ecf9e5314d46e0b9a1bd1588cfbcd3c146c370038230743ff273
+EBUILD tcc-9999.ebuild 1689 BLAKE2B 414115e0eaa82a0cf6edde8d7d78dff29325737a0c0d992bfe538639c89173173bd114311301078d3fcab444812ff8cc60440515d578a7154e0fd8b3359b79f7 SHA512 0cff84ba9dd811953b62297df5b8c0767bcec678c211b21bc1a6d4c24d7ae595e759cc79fd7771fde1fd1a93a00ad7d6329aaad5c0287ab2d99f2cf8d8be3b6a
MISC metadata.xml 316 BLAKE2B b344343dfa24e8c1d5743fbb628c6abec535a89722195816d8b58d8c1291c320fa98fda44151736c8f362f0186608977321f914fc3f09f88eb9efa17ec064ce1 SHA512 87e93f1667a8b911d4f8e79d05ab06aca7933d347387157e9a1d5d79260f976e6e9df2c172656acf5e961afbbeae640868ba28ade4c6e73ed09e020f9bd14978
diff --git a/dev-lang/tcc/files/clang.patch b/dev-lang/tcc/files/clang.patch
index 8304470e3682..01cc72335fd8 100644
--- a/dev-lang/tcc/files/clang.patch
+++ b/dev-lang/tcc/files/clang.patch
@@ -1,18 +1,18 @@
-# Fixes the default linker options for portage
-# Upstream commit ba286136bf8e48c71ffd6c2fd9ce97e64a6eeeb1
-
-diff --git a/libtcc.c b/libtcc.c
-index 127806f..dc78643 100644
---- a/libtcc.c
-+++ b/libtcc.c
-@@ -1560,6 +1560,10 @@ static int tcc_set_linker(TCCState *s, const char *option)
- } else
- goto err;
+# Fix compiling tcc with clang. Upstream commit 73ac39c317a20accaf3b25ba833deee0c2e2849f
+# Gentoo bug #502452
+diff --git a/lib/libtcc1.c b/lib/libtcc1.c
+index cf9babf..b46fb5d 100644
+--- a/lib/libtcc1.c
++++ b/lib/libtcc1.c
+@@ -647,6 +647,11 @@ struct __va_list_struct {
+ char *reg_save_area;
+ };
-+ } else if (link_option(option, "as-needed", &p)) {
-+ ignoring = 1;
-+ } else if (link_option(option, "O", &p)) {
-+ ignoring = 1;
- } else if (link_option(option, "rpath=", &p)) {
- s->rpath = copy_linker_arg(p);
- } else if (link_option(option, "section-alignment=", &p)) {
++#undef __va_start
++#undef __va_arg
++#undef __va_copy
++#undef __va_end
++
+ void *__va_start(void *fp)
+ {
+ struct __va_list_struct *ap =
diff --git a/dev-lang/tcc/files/linker.patch b/dev-lang/tcc/files/linker.patch
index 01cc72335fd8..8304470e3682 100644
--- a/dev-lang/tcc/files/linker.patch
+++ b/dev-lang/tcc/files/linker.patch
@@ -1,18 +1,18 @@
-# Fix compiling tcc with clang. Upstream commit 73ac39c317a20accaf3b25ba833deee0c2e2849f
-# Gentoo bug #502452
-diff --git a/lib/libtcc1.c b/lib/libtcc1.c
-index cf9babf..b46fb5d 100644
---- a/lib/libtcc1.c
-+++ b/lib/libtcc1.c
-@@ -647,6 +647,11 @@ struct __va_list_struct {
- char *reg_save_area;
- };
+# Fixes the default linker options for portage
+# Upstream commit ba286136bf8e48c71ffd6c2fd9ce97e64a6eeeb1
+
+diff --git a/libtcc.c b/libtcc.c
+index 127806f..dc78643 100644
+--- a/libtcc.c
++++ b/libtcc.c
+@@ -1560,6 +1560,10 @@ static int tcc_set_linker(TCCState *s, const char *option)
+ } else
+ goto err;
-+#undef __va_start
-+#undef __va_arg
-+#undef __va_copy
-+#undef __va_end
-+
- void *__va_start(void *fp)
- {
- struct __va_list_struct *ap =
++ } else if (link_option(option, "as-needed", &p)) {
++ ignoring = 1;
++ } else if (link_option(option, "O", &p)) {
++ ignoring = 1;
+ } else if (link_option(option, "rpath=", &p)) {
+ s->rpath = copy_linker_arg(p);
+ } else if (link_option(option, "section-alignment=", &p)) {
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
+}
diff --git a/dev-lang/tcc/tcc-9999.ebuild b/dev-lang/tcc/tcc-9999.ebuild
index 728ed94dbec7..d55542ed7b7e 100644
--- a/dev-lang/tcc/tcc-9999.ebuild
+++ b/dev-lang/tcc/tcc-9999.ebuild
@@ -1,17 +1,25 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
-
-inherit eutils toolchain-funcs git-r3
+EAPI="6"
DESCRIPTION="A very small C compiler for ix86/amd64"
HOMEPAGE="http://bellard.org/tcc/"
-EGIT_REPO_URI="http://repo.or.cz/r/tinycc.git"
+
+if [[ $PV == *9999* ]]; then
+ EGIT_REPO_URI="http://repo.or.cz/r/tinycc.git"
+ KEYWORDS=""
+ SRC_URI=""
+ scm_eclass=git-r3
+else
+ KEYWORDS="~amd64 ~x86 ~amd64-linux"
+ SRC_URI="http://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
+fi
+
+inherit toolchain-funcs ${scm_eclass}
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS=""
DEPEND="dev-lang/perl" # doc generation
# Both tendra and tinycc install /usr/bin/tcc
@@ -32,6 +40,8 @@ src_prepare() {
# fix texi2html invocation
sed -i -e 's/-number//' Makefile || die
sed -i -e 's/--sections//' Makefile || die
+
+ eapply_user
}
src_configure() {