/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.134 Revision 1.135
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.134 2004/12/30 21:48:23 seemant Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.135 2004/12/31 11:28:18 eradicator 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.
54# Jeremy Huddleston <eradicator@gentoo.org> (23 Dec 2004): 54# Jeremy Huddleston <eradicator@gentoo.org> (23 Dec 2004):
55# Added support for ${ABI} and ${DEFAULT_ABI}. If they're both not set, 55# Added support for ${ABI} and ${DEFAULT_ABI}. If they're both not set,
56# fall back on old behavior. Any profile that has these set should also 56# fall back on old behavior. Any profile that has these set should also
57# depend on a newer version of portage (not yet released) which uses these 57# depend on a newer version of portage (not yet released) which uses these
58# over CONF_LIBDIR in econf, dolib, etc... 58# over CONF_LIBDIR in econf, dolib, etc...
59#
60# For now, this is restricted to the sparc64-multilib ${PROFILE_ARCH} as it
61# is still in testing.
62get_libdir() { 59get_libdir() {
63 LIBDIR_TEST=$(type econf) 60 LIBDIR_TEST=$(type econf)
64 if [ ! -z "${CONF_LIBDIR_OVERRIDE}" ] ; then 61 if [ ! -z "${CONF_LIBDIR_OVERRIDE}" ] ; then
65 # if there is an override, we want to use that... always. 62 # if there is an override, we want to use that... always.
66 CONF_LIBDIR="${CONF_LIBDIR_OVERRIDE}" 63 CONF_LIBDIR="${CONF_LIBDIR_OVERRIDE}"
71 # # and if there isnt an override, and we're using a version of 68 # # and if there isnt an override, and we're using a version of
72 # # portage without CONF_LIBDIR support, force the use of lib. dolib 69 # # portage without CONF_LIBDIR support, force the use of lib. dolib
73 # # and friends from portage 2.0.50 wont be too happy otherwise. 70 # # and friends from portage 2.0.50 wont be too happy otherwise.
74 # CONF_LIBDIR="lib" 71 # CONF_LIBDIR="lib"
75 #fi 72 #fi
76 elif [ "${PROFILE_ARCH}" = "sparc64-multilib" ]; then # Using eradicator's LIBDIR_<abi> approach... 73 elif [ -n "$(get_abi_LIBDIR)" ]; then # Using eradicator's LIBDIR_<abi> approach...
77 CONF_LIBDIR="$(get_abi_LIBDIR)" 74 CONF_LIBDIR="$(get_abi_LIBDIR)"
78 elif [ "${LIBDIR_TEST/CONF_LIBDIR}" == "${LIBDIR_TEST}" ]; then # we don't have CONF_LIBDIR support 75 elif [ "${LIBDIR_TEST/CONF_LIBDIR}" == "${LIBDIR_TEST}" ]; then # we don't have CONF_LIBDIR support
79 # will be <portage-2.0.51_pre20 76 # will be <portage-2.0.51_pre20
80 CONF_LIBDIR="lib" 77 CONF_LIBDIR="lib"
81 fi 78 fi
83 echo ${CONF_LIBDIR:=lib} 80 echo ${CONF_LIBDIR:=lib}
84 unset LIBDIR_TEST 81 unset LIBDIR_TEST
85} 82}
86 83
87get_multilibdir() { 84get_multilibdir() {
88 [ "${PROFILE_ARCH}" = "sparc64-multilib" ] && die "get_multilibdir called, but it shouldn't be needed on sparc64-multilib" 85 [ -n "$(get_abi_LIBDIR)" ] && die "get_multilibdir called, but it shouldn't be needed with the new multilib approach. Please file a bug at http://bugs.gentoo.org and assign it to eradicator@gentoo.org"
89 echo ${CONF_MULTILIBDIR:=lib32} 86 echo ${CONF_MULTILIBDIR:=lib32}
90} 87}
91 88
92# Sometimes you need to override the value returned by get_libdir. A good 89# Sometimes you need to override the value returned by get_libdir. A good
93# example of this is xorg-x11, where lib32 isnt a supported configuration, 90# example of this is xorg-x11, where lib32 isnt a supported configuration,
99# 96#
100# get_libdir_override lib64 97# get_libdir_override lib64
101# 98#
102# Travis Tilley <lv@gentoo.org> (31 Aug 2004) 99# Travis Tilley <lv@gentoo.org> (31 Aug 2004)
103get_libdir_override() { 100get_libdir_override() {
104 [ "${PROFILE_ARCH}" = "sparc64-multilib" ] && die "get_libdir_override called, but it shouldn't be needed on sparc64-multilib..." 101 [ -n "$(get_abi_LIBDIR)" ] && die "get_libdir_override called, but it shouldn't be needed with the new multilib approach. Please file a bug at http://bugs.gentoo.org and assign it to eradicator@gentoo.org"
105 CONF_LIBDIR="$1" 102 CONF_LIBDIR="$1"
106 CONF_LIBDIR_OVERRIDE="$1" 103 CONF_LIBDIR_OVERRIDE="$1"
107} 104}
108 105
109# This function generate linker scripts in /usr/lib for dynamic 106# This function generate linker scripts in /usr/lib for dynamic
1657} 1654}
1658 1655
1659# get_abi_var <VAR> [<ABI>] 1656# get_abi_var <VAR> [<ABI>]
1660# returns the value of ${<VAR>_<ABI>} which should be set in make.defaults 1657# returns the value of ${<VAR>_<ABI>} which should be set in make.defaults
1661# 1658#
1662# This code is for testing purposes only with the sparc64-multilib ${PROFILE_ARCH}
1663# and getting a more multilib-aware portage layout. It may end up being used, but for now
1664# it is subject to removal if a better way is worked out.
1665#
1666# ex: 1659# ex:
1667# CFLAGS=$(get_abi_var CFLAGS sparc32) # CFLAGS=-m32 1660# CFLAGS=$(get_abi_var CFLAGS sparc32) # CFLAGS=-m32
1668# 1661#
1669# Note that the prefered method is to set CC="$(tc-getCC) $(get_abi_CFLAGS)" 1662# Note that the prefered method is to set CC="$(tc-getCC) $(get_abi_CFLAGS)"
1670# This will hopefully be added to portage soon... 1663# This will hopefully be added to portage soon...

Legend:
Removed from v.1.134  
changed lines
  Added in v.1.135

  ViewVC Help
Powered by ViewVC 1.1.20