Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 143811 Details for
Bug 210521
Patch for multilib.eclass to make it ready for eclass-manpages
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
multilib.eclass.patch
multilib.eclass.patch (text/plain), 12.94 KB, created by
mren
on 2008-02-17 21:27:03 UTC
(
hide
)
Description:
multilib.eclass.patch
Filename:
MIME Type:
Creator:
mren
Created:
2008-02-17 21:27:03 UTC
Size:
12.94 KB
patch
obsolete
>--- multilib.eclass.orig 2008-02-17 15:58:12.000000000 +0100 >+++ multilib.eclass 2008-02-17 22:06:02.000000000 +0100 >@@ -1,98 +1,18 @@ >-# Copyright 1999-2007 Gentoo Foundation >+# Copyright 1999-2008 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.63 2007/07/01 23:14:58 peper Exp $ >-# >-# Maintainer: amd64@gentoo.org / toolchain@gentoo.org >-# >-# This eclass is for all functions pertaining to handling multilib. >-# configurations. >- >-___ECLASS_RECUR_MULTILIB="yes" >-[[ -z ${___ECLASS_RECUR_TOOLCHAIN_FUNCS} ]] && inherit toolchain-funcs >- >-# has_multilib_profile: >-# Return true if the current profile is a multilib profile and lists more than >-# one abi in ${MULTILIB_ABIS}. When has_multilib_profile returns true, that >-# profile should enable the 'multilib' use flag. This is so you can DEPEND on >-# a package only for multilib or not multilib. >+# $Header: $ > >-# is_final_abi: >-# Return true if ${ABI} is the final abi to be installed (and thus we are >-# on our last run through a src_* function. >+# @ECLASS: multilib.eclass >+# @MAINTAINER: >+# amd64@gentoo.org >+# toolchain@gentoo.org >+# @BLURB: This eclass is for all functions pertaining to handling multilib. configurations. >+# @DESCRIPTION: >+# This eclass is for all functions pertaining to handling multilib. configurations. > >-# number_abis: >-# echo the number of ABIs we will be installing for > >-# get_install_abis: >-# Return a list of the ABIs we want to install for with >-# the last one in the list being the default. >- >-# get_all_abis: >-# Return a list of the ABIs supported by this profile. >-# the last one in the list being the default. >- >-# get_all_libdirs: >-# Returns a list of all the libdirs used by this profile. This includes >-# those that might not be touched by the current ebuild and always includes >-# "lib". >- >-# get_libdir: >-# Returns the libdir for the selected ABI. This is backwards compatible >-# and simply calls get_abi_LIBDIR() on newer profiles. You should use this >-# to determine where to install shared objects (ex: /usr/$(get_libdir)) >- >-# get_abi_var <VAR> [<ABI>]: >-# returns the value of ${<VAR>_<ABI>} which should be set in make.defaults >-# >-# get_abi_CFLAGS: >-# get_abi_CDEFINE: >-# get_abi_LIBDIR: >-# Aliases for 'get_abi_var CFLAGS', etc. >- >-# get_ml_incdir [<include dir> [<ABI>]] >-# include dir defaults to /usr/include >-# ABI defaults to ${ABI} or ${DEFAULT_ABI} >-# >-# If a multilib include dir is associated with the passed include dir, then >-# we return it, otherwise, we just echo back the include dir. This is >-# neccessary when a built script greps header files rather than testing them >-# via #include (like perl) to figure out features. >- >-# prep_ml_includes: >-# Some includes (include/asm, glibc, etc) are ABI dependent. In this case, >-# We can install them in different locations for each ABI and create a common >-# header which includes the right one based on CDEFINE_${ABI}. If your >-# package installs ABI-specific headers, just add 'prep_ml_includes' to the >-# end of your src_install(). It takes a list of directories that include >-# files are installed in (default is /usr/include if none are passed). >-# >-# Example: >-# src_install() { >-# ... >-# prep_ml_includes /usr/qt/3/include >-# } >- >-# create_ml_includes <include dir> <symbol 1>:<dir 1> [<symbol 2>:<dir 2> ...] >-# If you need more control than prep_ml_includes can offer (like linux-headers >-# for the asm-* dirs, then use create_ml_includes. The firs argument is the >-# common dir. The remaining args are of the form <symbol>:<dir> where >-# <symbol> is what is put in the #ifdef for choosing that dir. >-# >-# Ideas for this code came from debian's sparc-linux headers package. >-# >-# Example: >-# create_ml_includes /usr/include/asm __sparc__:/usr/include/asm-sparc __sparc64__:/usr/include/asm-sparc64 >-# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64 >- >-# get_libname [version] >-# returns libname with proper suffix {.so,.dylib} and optionally supplied version >-# for ELF/MACH-O shared objects >-# >-# Example: >-# get_libname libfoo ${PV} >-# Returns: libfoo.so.${PV} (ELF) || libfoo.${PV}.dylib (MACH) >- >-### END DOCUMENTATION ### >+___ECLASS_RECUR_MULTILIB="yes" >+[[ -z ${___ECLASS_RECUR_TOOLCHAIN_FUNCS} ]] && inherit toolchain-funcs > > # Defaults: > export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"} >@@ -105,19 +25,28 @@ > export CDEFINE_default="__unix__" > export KERNEL_ABI=${KERNEL_ABI:-${DEFAULT_ABI}} > >-# has_multilib_profile() >+# @FUNCTION: has_multilib_profile >+# @DESCRIPTION: >+# Return true if the current profile is a multilib profile and lists more than >+# one abi in ${MULTILIB_ABIS}. When has_multilib_profile returns true, that >+# profile should enable the 'multilib' use flag. This is so you can DEPEND on >+# a package only for multilib or not multilib. > has_multilib_profile() { > [ -n "${MULTILIB_ABIS}" -a "${MULTILIB_ABIS}" != "${MULTILIB_ABIS/ /}" ] > } > >+# FUNCTION: get_libdir >+# @MAINTAINER: >+# Travis Tilley <lv@gentoo.org> (24 Aug 2004) >+# Jeremy Huddleston <eradicator@gentoo.org> (23 Dec 2004): >+# @RETURN: Returns the libdir for the selected ABI. >+# @DESCRIPTION: > # This function simply returns the desired lib directory. With portage > # 2.0.51, we now have support for installing libraries to lib32/lib64 > # to accomidate the needs of multilib systems. It's no longer a good idea > # to assume all libraries will end up in lib. Replace any (sane) instances > # where lib is named directly with $(get_libdir) if possible. > # >-# Travis Tilley <lv@gentoo.org> (24 Aug 2004) >-# > # Jeremy Huddleston <eradicator@gentoo.org> (23 Dec 2004): > # Added support for ${ABI} and ${DEFAULT_ABI}. If they're both not set, > # fall back on old behavior. Any profile that has these set should also >@@ -133,6 +62,8 @@ > fi > } > >+# @FUNCTION: get_multilibdir >+# @RETURN: Returns the multilibdir > get_multilibdir() { > if has_multilib_profile; then > eerror "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" >@@ -141,6 +72,10 @@ > echo ${CONF_MULTILIBDIR:=lib32} > } > >+# @FUNCTION: get_libdir_override >+# @MAINTAINER: >+# Travis Tilley <lv@gentoo.org> (31 Aug 2004) >+# @DESCRIPTION: > # Sometimes you need to override the value returned by get_libdir. A good > # example of this is xorg-x11, where lib32 isnt a supported configuration, > # and where lib64 -must- be used on amd64 (for applications that need lib >@@ -150,8 +85,6 @@ > # return: > # > # get_libdir_override lib64 >-# >-# Travis Tilley <lv@gentoo.org> (31 Aug 2004) > get_libdir_override() { > if has_multilib_profile; then > eerror "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" >@@ -162,10 +95,14 @@ > LIBDIR_default="$1" > } > >-# get_abi_var <VAR> [<ABI>] >-# returns the value of ${<VAR>_<ABI>} which should be set in make.defaults >-# >+# @FUNCTION: get_abi_var >+# @USAGE: < VAR > [ ABI ] >+# @RETURN: returns the value of ${<VAR>_<ABI>} which should be set in make.defaults >+# @MAINTAINER: >+# Jeremy Huddleston <eradicator@gentoo.org> >+# @DESCRIPTION: > # ex: >+# > # CFLAGS=$(get_abi_var CFLAGS sparc32) # CFLAGS=-m32 > # > # Note that the prefered method is to set CC="$(tc-getCC) $(get_abi_CFLAGS)" >@@ -174,8 +111,6 @@ > # If <ABI> is not specified, ${ABI} is used. > # If <ABI> is not specified and ${ABI} is not defined, ${DEFAULT_ABI} is used. > # If <ABI> is not specified and ${ABI} and ${DEFAULT_ABI} are not defined, we return an empty string. >-# >-# Jeremy Huddleston <eradicator@gentoo.org> > get_abi_var() { > local flag=$1 > local abi >@@ -193,15 +128,56 @@ > echo ${!var} > } > >+# @FUNCTION: get_abi_CFLAGS >+# @USAGE: [ ABI ] >+# @DESCRIPTION: >+# Alias for 'get_abi_var CFLAGS' > get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; } >+ >+# @FUNCTION: get_abi_ASFLAGS >+# @USAGE: [ ABI ] >+# @DESCRIPTION: >+# Alias for 'get_abi_var ASFLAGS' > get_abi_ASFLAGS() { get_abi_var ASFLAGS "$@"; } >+ >+# @FUNCTION: get_abi_LDFLAGS >+# @USAGE: [ ABI ] >+# @DESCRIPTION: >+# Alias for 'get_abi_var LDFLAGS' > get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; } >+ >+# @FUNCTION: get_abi_CHOST >+# @USAGE: [ ABI ] >+# @DESCRIPTION: >+# Alias for 'get_abi_var CHOST' > get_abi_CHOST() { get_abi_var CHOST "$@"; } >+ >+# @FUNCTION: get_abi_CTARGET >+# @USAGE: [ ABI ] >+# @DESCRIPTION: >+# Alias for 'get_abi_var CTARGET' > get_abi_CTARGET() { get_abi_var CTARGET "$@"; } >+ >+# @FUNCTION: get_abi_FAKE_TARGETS >+# @USAGE: [ ABI ] >+# @DESCRIPTION: >+# Alias for 'get_abi_var FAKE_TARGETS' > get_abi_FAKE_TARGETS() { get_abi_var FAKE_TARGETS "$@"; } >+ >+# @FUNCTION: get_abi_CDEFINE >+# @USAGE: [ ABI ] >+# @DESCRIPTION: >+# Alias for 'get_abi_var CDEFINE' > get_abi_CDEFINE() { get_abi_var CDEFINE "$@"; } >+ >+# @FUNCTION: get_abi_LIBDIR >+# @USAGE: [ ABI ] >+# @DESCRIPTION: >+# Alias for 'get_abi_var LIBDIR' > get_abi_LIBDIR() { get_abi_var LIBDIR "$@"; } > >+# @FUNCTION: get_install_abis >+# @DESCRIPTION: > # Return a list of the ABIs we want to install for with > # the last one in the list being the default. > get_install_abis() { >@@ -241,6 +217,8 @@ > return 0 > } > >+# @FUNCTION: get_all_abis >+# @DESCRIPTION: > # Return a list of the ABIs supported by this profile. > # the last one in the list being the default. > get_all_abis() { >@@ -262,9 +240,11 @@ > return 0 > } > >-# get_all_libdirs() >+# @FUNCTION: get_all_libdirs >+# @DESCRIPTION: > # Returns a list of all the libdirs used by this profile. This includes >-# those that might not be touched by the current ebuild. >+# those that might not be touched by the current ebuild and always includes >+# "lib". > get_all_libdirs() { > local libdirs="lib" > local abi >@@ -277,6 +257,8 @@ > echo "${libdirs}" > } > >+# @FUNCTION: is_final_abi >+# @DESCRIPTION: > # Return true if ${ABI} is the last ABI on our list (or if we're not > # using the new multilib configuration. This can be used to determine > # if we're in the last (or only) run through src_{unpack,compile,install} >@@ -287,14 +269,23 @@ > [[ ${LAST_ABI} == ${ABI} ]] > } > >+# @FUNCTION: number_abis >+# @DESCRIPTION: > # echo the number of ABIs we will be installing for > number_abis() { > get_install_abis | wc -w > } > >-# get_ml_incdir [<include dir> [<ABI>]] >+# @FUNCTION: get_ml_incdir >+# @USAGE: [ include_dir ] [ ABI ] >+# @DESCRIPTION: > # include dir defaults to /usr/include > # ABI defaults to ${ABI} or ${DEFAULT_ABI} >+# >+# If a multilib include dir is associated with the passed include dir, then >+# we return it, otherwise, we just echo back the include dir. This is >+# neccessary when a built script greps header files rather than testing them >+# via #include (like perl) to figure out features. > get_ml_incdir() { > local dir=/usr/include > >@@ -321,8 +312,8 @@ > fi > } > >-# prep_ml_includes: >-# >+# @FUNCTION: prep_ml_includes >+# @DESCRIPTION: > # Some includes (include/asm, glibc, etc) are ABI dependent. In this case, > # We can install them in different locations for each ABI and create a common > # header which includes the right one based on CDEFINE_${ABI}. If your >@@ -331,11 +322,10 @@ > # files are installed in (default is /usr/include if none are passed). > # > # Example: >-# src_install() { >-# ... >-# prep_ml_includes /usr/qt/3/include >-# } >- >+# src_install() { >+# ... >+# prep_ml_includes /usr/qt/3/include >+# } > prep_ml_includes() { > if [[ $(number_abis) -gt 1 ]] ; then > local dir >@@ -376,6 +366,9 @@ > fi > } > >+# @FUNCTION: create_ml_includes >+# @USAGE: < include_dir > < symbol_1 >:< dir_1 > [ <symbol_2>:<dir_2> ...] >+# @DESCRIPTION: > # If you need more control than prep_ml_includes can offer (like linux-headers > # for the asm-* dirs, then use create_ml_includes. The firs argument is the > # common dir. The remaining args are of the form <symbol>:<dir> where >@@ -384,8 +377,8 @@ > # Ideas for this code came from debian's sparc-linux headers package. > # > # Example: >-# create_ml_includes /usr/include/asm __sparc__:/usr/include/asm-sparc __sparc64__:/usr/include/asm-sparc64 >-# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64 >+# create_ml_includes /usr/include/asm __sparc__:/usr/include/asm-sparc __sparc64__:/usr/include/asm-sparc64 >+# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64 > # > # Warning: Be careful with the ordering here. The default ABI has to be the > # last, because it is always defined (by GCC) >@@ -531,6 +524,15 @@ > exit 1 > } > >+# @FUNCTION: get_libname >+# @USAGE: [ version ] >+# @DESCRIPTION: >+# Returns libname with proper suffix {.so,.dylib} and optionally supplied version >+# for ELF/MACH-O shared objects >+# >+# Example: >+# get_libname libfoo ${PV} >+# Returns: libfoo.so.${PV} (ELF) || libfoo.${PV}.dylib (MACH) > get_libname() { > local libname > local ver=$1 >@@ -650,6 +652,8 @@ > esac > } > >+# @FUNCTION: multilib_toolchain_setup >+# @DESCRIPTION: > # Hide multilib details here for packages which are forced to be compiled for a > # specific ABI when run on another ABI (like x86-specific packages on amd64) > multilib_toolchain_setup() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210521
: 143811