summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-04-28 04:04:36 +0000
committerMike Frysinger <vapier@gentoo.org>2005-04-28 04:04:36 +0000
commit79789489998001e52d8134165211ca008ba1dd89 (patch)
treecd3c6e263a3a252408742bb8955e49a5b26ba749 /dev-util/yacc
parentold (diff)
downloadgentoo-2-79789489998001e52d8134165211ca008ba1dd89.tar.gz
gentoo-2-79789489998001e52d8134165211ca008ba1dd89.tar.bz2
gentoo-2-79789489998001e52d8134165211ca008ba1dd89.zip
add a workaround so yacc + bison dont collide with /usr/bin/yacc #90089
(Portage version: 2.0.51.20-r4)
Diffstat (limited to 'dev-util/yacc')
-rw-r--r--dev-util/yacc/yacc-1.9.1-r2.ebuild29
1 files changed, 22 insertions, 7 deletions
diff --git a/dev-util/yacc/yacc-1.9.1-r2.ebuild b/dev-util/yacc/yacc-1.9.1-r2.ebuild
index d403f271e585..bef85cd6c855 100644
--- a/dev-util/yacc/yacc-1.9.1-r2.ebuild
+++ b/dev-util/yacc/yacc-1.9.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 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-r2.ebuild,v 1.5 2005/01/13 23:32:46 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/yacc/yacc-1.9.1-r2.ebuild,v 1.6 2005/04/28 04:04:36 vapier Exp $
inherit eutils toolchain-funcs
@@ -13,23 +13,21 @@ SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86"
IUSE=""
-RDEPEND="virtual/libc"
-DEPEND="${RDEPEND}
- >=sys-apps/sed-4"
+DEPEND=""
src_unpack() {
unpack ${A}
- cd ${S}
+ cd "${S}"
# Use our CFLAGS
sed -i -e 's: -O : $(CFLAGS) :' Makefile || die 'sed failed'
# mkstemp patch from byacc ebuild
- epatch ${FILESDIR}/mkstemp.patch
+ epatch "${FILESDIR}"/mkstemp.patch
# The following patch fixes yacc to run correctly on ia64 (and
# other 64-bit arches). See bug 46233
- epatch ${FILESDIR}/yacc-1.9.1-ia64.patch
+ epatch "${FILESDIR}"/yacc-1.9.1-ia64.patch
}
src_compile() {
@@ -42,3 +40,20 @@ src_install() {
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/bison ]] ; then
+ ln -s bison "${ROOT}"/usr/bin/yacc
+ fi
+}