summaryrefslogtreecommitdiff
path: root/dev-lang/tcc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-lang/tcc
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-lang/tcc')
-rw-r--r--dev-lang/tcc/Manifest10
-rw-r--r--dev-lang/tcc/files/clang.patch18
-rw-r--r--dev-lang/tcc/files/linker.patch18
-rw-r--r--dev-lang/tcc/metadata.xml11
-rw-r--r--dev-lang/tcc/tcc-0.9.26-r1.ebuild66
-rw-r--r--dev-lang/tcc/tcc-0.9.26-r2.ebuild63
-rw-r--r--dev-lang/tcc/tcc-0.9.26-r3.ebuild71
-rw-r--r--dev-lang/tcc/tcc-9999.ebuild63
8 files changed, 320 insertions, 0 deletions
diff --git a/dev-lang/tcc/Manifest b/dev-lang/tcc/Manifest
new file mode 100644
index 000000000000..ff76efeefddf
--- /dev/null
+++ b/dev-lang/tcc/Manifest
@@ -0,0 +1,10 @@
+AUX clang.patch 667 SHA256 a982c29004a20dfd338425c74991659a4d866c706b8aacb7c5910c2eeaf33931 SHA512 aadbd3676b5333ae3b8a04c75117633ca8b08c5fa0f695b9f7ff7d3019ff06211c986d0a0986c7dc329621cc1a57e23d50924fd49cf1367490d962fcef4b4efe WHIRLPOOL 2cd35afc28d156b76e08b7a868bcd13b38bad40e3e34721e5d1b7cd8a6378a366d5f5b0a8617a3abeb4eeb5f49f543203c446d4d049830a57a62189c89264aca
+AUX linker.patch 441 SHA256 fdb05ecf72ec5bff8832e3be2c36e0519c426ee8800cca8e5c647bd499a58a95 SHA512 e19817d5f500bd95060efff3c984218800cbcabe01a88fb048b459cce8d67c435ff1d2130d7eedac55f5726bc0cc13dabe41c2535c2bc3c5fc0a21dc7128a965 WHIRLPOOL ca7e10d78a8714d9ec7134f0794371a14e8d14d0fcb78db6699019615570a6ade5af96dc852a188bbf86a6e3a16f9552c01dd74d5bf4569792b404d61b68fcb3
+DIST tcc-0.9.26.tar.bz2 525906 SHA256 521e701ae436c302545c3f973a9c9b7e2694769c71d9be10f70a2460705b6d71 SHA512 abdbe208498cf4865a2036b5426616f5888b9b0e8d5d2fda6d1dd4afab3386167f12eca87d8a5c4c9b7dc88620d983ddce3e874b7dfa9c21eceea29ffa635d53 WHIRLPOOL 62fc30f8a72f8f78ba4b7e3d8d11f5e5a920615dff0ff799a64fdb9611017a4d1537c10228f94250ac202dedcd05d0aa90a8565dc5956d5639b70a7e4fe1009c
+EBUILD tcc-0.9.26-r1.ebuild 1566 SHA256 e313d0b5207580c9424991223cf641cc9cf8b744941e7997b47a4e6ae667f9f3 SHA512 40d4489879464f4d380eb9433212dda09faf1e4c297f99a204715993253387a0a8d6f5d11911ccbc47542c914b4a0a4d9c971568bed627a21fdff85580216bc0 WHIRLPOOL 68bbb4b7fc7b1de3170f02399143d7821f7ac49e5a5fd873a5c23de4ba5910a40e88792ca9b4d47789e483ed2ce9eb5f9f1ee09a5c17cceaa7c62ad8f99d248f
+EBUILD tcc-0.9.26-r2.ebuild 1536 SHA256 7508a849278678ab8165c70c383f7e1313fb69fd7543d3d18b022545f3cb90cd SHA512 cdeffde7870d16177250e6f9901242e4242d037ec53e4a6a675f8e8bd68ea1af3989903b2daf793b58d024da407c5383b314ae0adba7a55387011767e0377f63 WHIRLPOOL cc822d32463ee04b13b3a3d82f9f61d143e815af9e22f89212acc24fa3f77c9c076167b6d0a13f9c005667cb0989bbb63b10b3f656bc640b72a7a2ee7a025ddc
+EBUILD tcc-0.9.26-r3.ebuild 1700 SHA256 90d82c547f91046fb099301b750cde92d5c048989cb8b539ae0f7371e2c72986 SHA512 58215a00f35d25b98b456229b284e0f6e3e910c490da28b005ca715f5542d6f9f59da720333e86b52e0e611502bbe1c911c9b7ec737b1853e3ca34d29f11fd68 WHIRLPOOL 8daa6536684a9f07a6ab9cc9e602404064068c310e90171649738adc4051767aa1401e17dcdae6600515dd76d7ce554f67333138302a71a0fc4afca4b8cda16b
+EBUILD tcc-9999.ebuild 1494 SHA256 3bc1480612bc69f17f0d495bae893123897ae04230a9e984a799a5736fc37cf3 SHA512 e8c8affcc1413860e0fb751de76603395326c489762ba1bdf3ece0a696e1121c4ea5ffcc72e49596f89fa249ba7cfdf45864573b5834b929198e694e7f234cd6 WHIRLPOOL 823d01946210782dd6a669d510f182edc70644bb5dbd7d4601feea74fbe855f7228c46f933a83c98538209210091af05e576739a3d309f96a5320eeacbbe9b8c
+MISC ChangeLog 3114 SHA256 b257217a28264aa58dbbd3a0b4e90379d0733d8fabd09b64fb382f04b8a9fdfb SHA512 6a3e0fb328663904178f7c6a139be4a9ce0b6588f5a64d3a9ce8396afd6a5e8f5798b84c88959ec158675e4aa34431c2a3abd2d5b59b51f330f15b5f395aa0b7 WHIRLPOOL 02f8ac8afbbe80c18f291682b3186756e68599f168e7ab0e005c08a863ca0f43bf688181dc82052c9b807c284f39cb76e1af1847f2d98bd14a51f873eee88ee5
+MISC ChangeLog-2015 6701 SHA256 2152a93f0f273cc1061e329a7e25550cab250137c8be14ee0ccc8539c4c8c4f6 SHA512 072bf4e9775e476560fe678678e4d224e3603674c84aba88bbac3a3425f818d5d931aca2397242beab979d25b4daf9e549d9b1b1213c66aeaad9c4148f46e0d9 WHIRLPOOL 4060aaf6c1d1ba4bda3c7136de7abfb77d66b503c521777ce115e96256945e1ad07afae5b5d470993f7ba081a2d57ce7c53c0859a08ddd7632246c449b918494
+MISC metadata.xml 316 SHA256 b9e4eabdaafc40d84d25a3bacbf93fd49f2b22ab5d1b78fee0a10bec6b31180d SHA512 87e93f1667a8b911d4f8e79d05ab06aca7933d347387157e9a1d5d79260f976e6e9df2c172656acf5e961afbbeae640868ba28ade4c6e73ed09e020f9bd14978 WHIRLPOOL 372dfbbd1ddee6f9e7002ab1ce2e234e7e05dc8f259994bacb6f1416302f7caa356092ae61fa83704eac1923fb2e36dad22dddb5a8a2c0c1d61f8341954bc852
diff --git a/dev-lang/tcc/files/clang.patch b/dev-lang/tcc/files/clang.patch
new file mode 100644
index 000000000000..8304470e3682
--- /dev/null
+++ b/dev-lang/tcc/files/clang.patch
@@ -0,0 +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;
+
++ } 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/files/linker.patch b/dev-lang/tcc/files/linker.patch
new file mode 100644
index 000000000000..01cc72335fd8
--- /dev/null
+++ b/dev-lang/tcc/files/linker.patch
@@ -0,0 +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;
+ };
+
++#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/metadata.xml b/dev-lang/tcc/metadata.xml
new file mode 100644
index 000000000000..56d7c4404e32
--- /dev/null
+++ b/dev-lang/tcc/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>wizardedit@gentoo.org</email>
+ <name>Austin English</name>
+ </maintainer>
+ <longdescription>
+ Tiny C compiler
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/tcc/tcc-0.9.26-r1.ebuild b/dev-lang/tcc/tcc-0.9.26-r1.ebuild
new file mode 100644
index 000000000000..4fbc6b2a7c0a
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils 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"
+
+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=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)" \
+ --bindir=/usr/bin \
+ --libdir=/usr/$(get_libdir) \
+ --tccdir=tcc \
+ --includedir=/usr/include \
+ --docdir=/usr/share/doc/${PF} \
+ --mandir=/usr/share/man
+}
+
+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-0.9.26-r2.ebuild b/dev-lang/tcc/tcc-0.9.26-r2.ebuild
new file mode 100644
index 000000000000..808555d46618
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils 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
+}
+
+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-0.9.26-r3.ebuild b/dev-lang/tcc/tcc-0.9.26-r3.ebuild
new file mode 100644
index 000000000000..cd260028a260
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 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
+
+ # Fix compiling tcc with clang
+ eapply "${FILESDIR}"/clang.patch
+
+ # Allows using tcc as the system compiler for Gentoo
+ eapply "${FILESDIR}"/linker.patch
+
+ 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
new file mode 100644
index 000000000000..728ed94dbec7
--- /dev/null
+++ b/dev-lang/tcc/tcc-9999.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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=""
+
+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=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
+}