| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.108 2004/10/01 19:23:58 ka0ttic Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.109 2004/10/02 01:42:32 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Martin Schlemmer <azarah@gentoo.org> |
5 | # Author: Martin Schlemmer <azarah@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # This eclass is for general purpose functions that most ebuilds |
7 | # This eclass is for general purpose functions that most ebuilds |
| 8 | # have to implement themselves. |
8 | # have to implement themselves. |
| … | |
… | |
| 112 | # to point to the latest version of the library present. |
112 | # to point to the latest version of the library present. |
| 113 | # |
113 | # |
| 114 | # <azarah@gentoo.org> (26 Oct 2002) |
114 | # <azarah@gentoo.org> (26 Oct 2002) |
| 115 | # |
115 | # |
| 116 | gen_usr_ldscript() { |
116 | gen_usr_ldscript() { |
|
|
117 | local libdir="$(get_libdir)" |
| 117 | # Just make sure it exists |
118 | # Just make sure it exists |
| 118 | dodir /usr/$(get_libdir) |
119 | dodir /usr/${libdir} |
| 119 | |
120 | |
| 120 | cat > "${D}/usr/$(get_libdir)/$1" << END_LDSCRIPT |
121 | cat > "${D}/usr/${libdir}/${1}" << END_LDSCRIPT |
| 121 | /* GNU ld script |
122 | /* GNU ld script |
| 122 | Because Gentoo have critical dynamic libraries |
123 | Because Gentoo have critical dynamic libraries |
| 123 | in /lib, and the static versions in /usr/lib, we |
124 | in /lib, and the static versions in /usr/lib, we |
| 124 | need to have a "fake" dynamic lib in /usr/lib, |
125 | need to have a "fake" dynamic lib in /usr/lib, |
| 125 | otherwise we run into linking problems. |
126 | otherwise we run into linking problems. |
| 126 | See bug #4411 on http://bugs.gentoo.org/ for |
127 | See bug #4411 on http://bugs.gentoo.org/ for |
| 127 | more info. */ |
128 | more info. */ |
| 128 | GROUP ( /$(get_libdir)/$1 ) |
129 | GROUP ( /${libdir}/${1} ) |
| 129 | END_LDSCRIPT |
130 | END_LDSCRIPT |
|
|
131 | fperms a+x "/usr/${libdir}/${1}" |
| 130 | } |
132 | } |
| 131 | |
133 | |
| 132 | # Simple function to draw a line consisting of '=' the same length as $* |
134 | # Simple function to draw a line consisting of '=' the same length as $* |
| 133 | # |
135 | # |
| 134 | # <azarah@gentoo.org> (11 Nov 2002) |
136 | # <azarah@gentoo.org> (11 Nov 2002) |