blob: 471bad69e135fd1e98fcea24fc5bac815852a4d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Author: Martin Schlemmer <azarah@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.1 2002/10/26 09:16:03 azarah Exp $
# This eclass is for general purpose functions that most ebuilds
# have to implement themselfs.
#
# NB: If you add anything, please comment it!
ECLASS=eutils
INHERITED="$INHERITED $ECLASS"
newdepend sys-devel/patch
DESCRIPTION="Based on the ${ECLASS} eclass"
# This function generate linker scripts in /usr/lib for dynamic
# libs in /lib. This is to fix linking problems when you have
# the .so in /lib, and the .a in /usr/lib. What happens is that
# in some cases when linking dynamic, the .a in /usr/lib is used
# instead of the .so in /lib due to gcc/libtool tweaking ld's
# library search path. This cause many builds to fail.
# See bug #4411 for more info.
#
# To use, simply call:
#
# gen_usr_ldscript libfoo.so
#
# Note that you should in general use the unversioned name of
# the library, as ldconfig should usually update it correctly
# to point to the latest version of the library present.
#
# <azarah@gentoo.org> (26 Oct 2002)
#
gen_usr_ldscript() {
# Just make sure it exists
dodir /usr/lib
cat > ${D}/usr/lib/$1 <<"END_LDSCRIPT"
/* GNU ld script
Because Gentoo have critical dynamic libraries
in /lib, and the static versions in /usr/lib, we
need to have a "fake" dynamic lib in /usr/lib,
otherwise we run into linking problems.
See bug #4411 on http://bugs.gentoo.org/ for
more info. */
GROUP ( /lib/libxxx )
END_LDSCRIPT
dosed "s:libxxx:$1:" /usr/lib/$1
}
|