commit: 5bc507c1fdaedbd729ed90a33ba400de32697308 Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> AuthorDate: Sun May 18 18:21:06 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed May 21 21:13:57 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bc507c1
dev-util/treecc: fix build with c23 Closes: https://bugs.gentoo.org/880433 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> Part-of: https://github.com/gentoo/gentoo/pull/42147 Closes: https://github.com/gentoo/gentoo/pull/42147 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-util/treecc/files/treecc-0.3.10-proto.patch | 14 +++++++ dev-util/treecc/treecc-0.3.10-r3.ebuild | 49 +++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/dev-util/treecc/files/treecc-0.3.10-proto.patch b/dev-util/treecc/files/treecc-0.3.10-proto.patch new file mode 100644 index 000000000000..3eb0a8844b7b --- /dev/null +++ b/dev-util/treecc/files/treecc-0.3.10-proto.patch @@ -0,0 +1,14 @@ +https://bugs.gentoo.org/880433 + +--- a/etc/c_skel.c ++++ b/etc/c_skel.c +@@ -112,8 +112,7 @@ YYNODESTATE *state__; + unsigned int size__; + { + #else +-void *yynodealloc(size__) +-unsigned int size__; ++void *yynodealloc(unsigned int size__) + { + YYNODESTATE *state__ = &fixed_state__; + #endif diff --git a/dev-util/treecc/treecc-0.3.10-r3.ebuild b/dev-util/treecc/treecc-0.3.10-r3.ebuild new file mode 100644 index 000000000000..d8aa8525f106 --- /dev/null +++ b/dev-util/treecc/treecc-0.3.10-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Compiler-compiler tool for aspect-oriented programming" +HOMEPAGE="https://www.gnu.org/software/dotgnu/" +SRC_URI="https://download.savannah.gnu.org/releases/dotgnu-pnet/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="doc examples" + +DEPEND="doc? ( app-text/texi2html )" + +PATCHES=( + "${FILESDIR}/${P}-proto.patch" +) + +src_compile() { + emake AR="$(tc-getAR)" + + if use doc; then + [[ -f "${S}"/doc/treecc.texi ]] || die "treecc.texi was not generated" + cd "${S}"/doc || die + texi2html -split_chapter "${S}"/doc/treecc.texi \ + || die "texi2html failed" + cd "${S}" || die + fi +} + +src_install() { + default + + if use examples; then + docinto examples + dodoc examples/README + dodoc examples/{expr_c.tc,gram_c.y,scan_c.l} + fi + + if use doc; then + dodoc doc/*.{txt,html} + docinto html + dodoc -r doc/treecc/*.html + fi +}