1 |
At Mon, 11 Jan 2010 19:18:47 -0800 walt <w41ter@×××××.com> wrote: |
2 |
|
3 |
> On 01/11/2010 04:09 PM, Allan Gottlieb wrote: |
4 |
>> My usual update world rebuilt gcc and then tried to reinstall pcmcia-cs. |
5 |
>> The later failed and googling showed that I should use instead |
6 |
>> pcmciautils. |
7 |
>> |
8 |
>> Merging pcmciautils required merging dev-util/yacc. |
9 |
>> I don't know why it wouldn't accept bison. |
10 |
>> dev-util/yacc failed to build due to a file collision with |
11 |
>> /usr/bin/yacc, an unowned file. |
12 |
>> |
13 |
>> /usr/bin/yacc is unowned by any package; it is a symlink, to |
14 |
>> /usr/bin/yacc.bison. The bison ebuild moves any existing /usr/bin/yacc |
15 |
>> to /usr/bin/yacc.bison and installs the symlink... |
16 |
> |
17 |
> Me too: |
18 |
> |
19 |
> $ls -l /usr/bin/yac* |
20 |
> lrwxrwxrwx 1 root root 10 2005-09-30 18:09 /usr/bin/yacc -> yacc.bison |
21 |
> -rwxr-xr-x 1 root root 39 2009-05-10 05:46 /usr/bin/yacc.bison |
22 |
> |
23 |
> That symlink is from 2005, and no package claims it. I, personally, |
24 |
> would not hesitate to nuke that five-year-old unclaimed symlink. |
25 |
> |
26 |
> Hm. My bison-2.3 does *not* claim credit for that yacc symlink. |
27 |
> I think it's an orphan and should be deleted. |
28 |
|
29 |
I don't know about "credit" but bison-2.3 does seem to create the link |
30 |
in pkg_postinst(). |
31 |
|
32 |
allan |
33 |
|
34 |
# Copyright 1999-2007 Gentoo Foundation |
35 |
# Distributed under the terms of the GNU General Public License v2 |
36 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/bison/bison-2.3.ebuild,v 1.10 2007/12/27 19:29:06 vapier Exp $ |
37 |
|
38 |
inherit toolchain-funcs flag-o-matic |
39 |
|
40 |
DESCRIPTION="A yacc-compatible parser generator" |
41 |
HOMEPAGE="http://www.gnu.org/software/bison/bison.html" |
42 |
SRC_URI="mirror://gnu/bison/${P}.tar.bz2" |
43 |
|
44 |
LICENSE="GPL-2" |
45 |
SLOT="0" |
46 |
KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" |
47 |
IUSE="nls static" |
48 |
|
49 |
DEPEND="nls? ( sys-devel/gettext )" |
50 |
|
51 |
RDEPEND="sys-devel/m4" |
52 |
|
53 |
src_compile() { |
54 |
use static && append-ldflags -static |
55 |
econf $(use_enable nls) || die |
56 |
emake || die |
57 |
} |
58 |
|
59 |
src_install() { |
60 |
emake DESTDIR="${D}" install || die |
61 |
|
62 |
# This one is installed by dev-util/yacc |
63 |
mv "${D}"/usr/bin/yacc{,.bison} || die |
64 |
|
65 |
# We do not need this. |
66 |
rm -r "${D}"/usr/lib* || die |
67 |
|
68 |
dodoc AUTHORS NEWS ChangeLog README OChangeLog THANKS TODO |
69 |
} |
70 |
|
71 |
pkg_postinst() { |
72 |
if [[ ! -e ${ROOT}/usr/bin/yacc ]] ; then |
73 |
ln -s yacc.bison "${ROOT}"/usr/bin/yacc |
74 |
fi |
75 |
} |