diff options
-rw-r--r-- | dev-util/yacc/ChangeLog | 9 | ||||
-rw-r--r-- | dev-util/yacc/yacc-1.9.1-r5.ebuild | 63 |
2 files changed, 70 insertions, 2 deletions
diff --git a/dev-util/yacc/ChangeLog b/dev-util/yacc/ChangeLog index 5dabdf155a93..a85a07cc26e0 100644 --- a/dev-util/yacc/ChangeLog +++ b/dev-util/yacc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-util/yacc -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/yacc/ChangeLog,v 1.25 2008/10/27 20:04:57 ranger Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/yacc/ChangeLog,v 1.26 2010/08/28 12:32:36 truedfx Exp $ + +*yacc-1.9.1-r5 (28 Aug 2010) + + 28 Aug 2010; Harald van Dijk <truedfx@gentoo.org> +yacc-1.9.1-r5.ebuild: + Use LDFLAGS (#334983 by flameeyes), plus emake/RDEPEND cleanup 27 Oct 2008; Brent Baude <ranger@gentoo.org> yacc-1.9.1-r4.ebuild: Marking yacc-1.9.1-r4 ppc64 for bug 232005 diff --git a/dev-util/yacc/yacc-1.9.1-r5.ebuild b/dev-util/yacc/yacc-1.9.1-r5.ebuild new file mode 100644 index 000000000000..7039a5a7b4f0 --- /dev/null +++ b/dev-util/yacc/yacc-1.9.1-r5.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/yacc/yacc-1.9.1-r5.ebuild,v 1.1 2010/08/28 12:32:37 truedfx Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="Yacc: Yet Another Compiler-Compiler" +HOMEPAGE="http://dinosaur.compilertools.net/#yacc" +SRC_URI="ftp://metalab.unc.edu/pub/Linux/devel/compiler-tools/${P}.tar.Z" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Use our CFLAGS and LDFLAGS + sed -i -e 's: -O : $(CFLAGS) $(LDFLAGS) :' Makefile || die 'sed failed' + + # mkstemp patch from byacc ebuild + epatch "${FILESDIR}"/mkstemp.patch + + # The following patch fixes yacc to run correctly on ia64 (and + # other 64-bit arches). See bug 46233 + epatch "${FILESDIR}"/${P}-ia64.patch + + # avoid stack access error, bug 232005 + epatch "${FILESDIR}"/${P}-CVE-2008-3196.patch +} + +src_compile() { + emake clean || die + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die +} + +src_install() { + dobin yacc || die + doman yacc.1 + dodoc 00README* ACKNOWLEDGEMENTS NEW_FEATURES NO_WARRANTY NOTES README* +} + +pkg_preinst() { + # bison installs a /usr/bin/yacc symlink ... + # we need to remove it to avoid triggering + # collision-protect errors #90089 + if [[ -L ${ROOT}/usr/bin/yacc ]] ; then + rm -f "${ROOT}"/usr/bin/yacc + fi +} + +pkg_postrm() { + # and if we uninstall yacc but keep bison, + # lets restore the /usr/bin/yacc symlink + if [[ ! -e ${ROOT}/usr/bin/yacc ]] && [[ -e ${ROOT}/usr/bin/yacc.bison ]] ; then + ln -s yacc.bison "${ROOT}"/usr/bin/yacc + fi +} |