summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Callen <jcallen@gentoo.org>2012-03-04 03:55:00 +0000
committerJonathan Callen <jcallen@gentoo.org>2012-03-04 03:55:00 +0000
commit50e12f83979396c765ce79f3f16c8bf3bdcccce0 (patch)
tree867c2dc1488f478695987e4d41b379f787df98dd
parentsync (diff)
downloadprefix-50e12f83979396c765ce79f3f16c8bf3bdcccce0.tar.gz
prefix-50e12f83979396c765ce79f3f16c8bf3bdcccce0.tar.bz2
prefix-50e12f83979396c765ce79f3f16c8bf3bdcccce0.zip
Sync eclasses with gx86
-rw-r--r--eclass/apache-2.eclass4
-rw-r--r--eclass/autotools.eclass45
-rw-r--r--eclass/common-lisp-common-3.eclass4
-rw-r--r--eclass/common-lisp-common.eclass4
-rw-r--r--eclass/db-use.eclass4
-rw-r--r--eclass/db.eclass4
-rw-r--r--eclass/embassy.eclass14
-rw-r--r--eclass/eutils.eclass507
-rw-r--r--eclass/flag-o-matic.eclass261
-rw-r--r--eclass/games.eclass4
-rw-r--r--eclass/gnustep-base.eclass21
-rw-r--r--eclass/gst-plugins-bad.eclass4
-rw-r--r--eclass/gst-plugins-base.eclass4
-rw-r--r--eclass/java-ant-2.eclass18
-rw-r--r--eclass/java-utils-2.eclass6
-rw-r--r--eclass/kernel-2.eclass6
-rw-r--r--eclass/pam.eclass10
-rw-r--r--eclass/php-common-r1.eclass4
-rw-r--r--eclass/subversion.eclass46
-rw-r--r--eclass/toolchain.eclass44
-rw-r--r--eclass/webapp.eclass4
-rw-r--r--eclass/wxwidgets.eclass4
-rw-r--r--eclass/x-modular.eclass4
23 files changed, 297 insertions, 729 deletions
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index 351872697b..4e2fb0f1c6 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.25 2011/07/08 11:35:01 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-2.eclass,v 1.26 2011/12/27 17:55:12 fauli Exp $
EAPI="2"
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index e0e084f277..9356498064 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.118 2012/01/06 21:06:17 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.122 2012/02/20 02:54:21 robbat2 Exp $
# @ECLASS: autotools.eclass
# @MAINTAINER:
@@ -60,8 +60,8 @@ if [[ -n ${WANT_AUTOCONF} ]] ; then
case ${WANT_AUTOCONF} in
none) _autoconf_atom="" ;; # some packages don't require autoconf at all
2.1) _autoconf_atom="=sys-devel/autoconf-${WANT_AUTOCONF}*" ;;
- # if you change the “latest” version here, change also autotools_run_tool
- latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.61" ;;
+ # if you change the "latest" version here, change also autotools_env_setup
+ latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.68" ;;
*) die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" ;;
esac
export WANT_AUTOCONF
@@ -98,6 +98,27 @@ unset _automake_atom _autoconf_atom
# Additional options to pass to automake during
# eautoreconf call.
+# @ECLASS-VARIABLE: AT_NOEACLOCAL
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Don't run eaclocal command if set to 'yes',
+# useful when eaclocal needs to be ran with
+# particular options
+
+# @ECLASS-VARIABLE: AT_NOEAUTOCONF
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Don't run eautoconf command if set to 'yes',
+# useful when eautoconf needs to be ran with
+# particular options
+
+# @ECLASS-VARIABLE: AT_NOEAUTOMAKE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Don't run eautomake command if set to 'yes',
+# useful when eautomake needs to be ran with
+# particular options
+
# @ECLASS-VARIABLE: AT_NOELIBTOOLIZE
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -142,18 +163,20 @@ eautoreconf() {
auxdir=$(autotools_get_auxdir)
- einfo "Running eautoreconf in '${PWD}' ..."
- [[ -n ${auxdir} ]] && mkdir -p ${auxdir}
- eaclocal
+ if [[ ${AT_NOEACLOCAL} != "yes" ]]; then
+ einfo "Running eautoreconf in '${PWD}' ..."
+ [[ -n ${auxdir} ]] && mkdir -p ${auxdir}
+ eaclocal
+ fi
[[ ${CHOST} == *-darwin* ]] && g=g
if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
_elibtoolize --copy --force --install
else
_elibtoolize --copy --force
fi
- eautoconf
- eautoheader
- FROM_EAUTORECONF="yes" eautomake ${AM_OPTS}
+ [[ ${AT_NOEAUTOCONF} != "yes" ]] && eautoconf
+ [[ ${AT_NOEAUTOHEADER} != "yes" ]] && eautoheader
+ [[ ${AT_NOEAUTOMAKE} != "yes" ]] && FROM_EAUTORECONF="yes" eautomake ${AM_OPTS}
[[ ${AT_NOELIBTOOLIZE} == "yes" ]] && return 0
@@ -318,7 +341,7 @@ config_rpath_update() {
# Internal function to run an autotools' tool
autotools_env_setup() {
- # We do the “latest” → version switch here because it solves
+ # We do the "latest" → version switch here because it solves
# possible order problems, see bug #270010 as an example.
# During bootstrap in prefix there might be no automake merged yet
# due to --nodeps, but still available somewhere in PATH.
diff --git a/eclass/common-lisp-common-3.eclass b/eclass/common-lisp-common-3.eclass
index 92f7bf72d1..010c188899 100644
--- a/eclass/common-lisp-common-3.eclass
+++ b/eclass/common-lisp-common-3.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common-3.eclass,v 1.2 2009/09/18 15:35:50 hkbst Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common-3.eclass,v 1.3 2011/12/27 17:55:12 fauli Exp $
#
# Author Matthew Kennedy <mkennedy@gentoo.org>
#
diff --git a/eclass/common-lisp-common.eclass b/eclass/common-lisp-common.eclass
index d953cc2487..af78ed9886 100644
--- a/eclass/common-lisp-common.eclass
+++ b/eclass/common-lisp-common.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common.eclass,v 1.13 2009/09/18 15:35:50 hkbst Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/common-lisp-common.eclass,v 1.14 2011/12/27 17:55:12 fauli Exp $
#
# Author Matthew Kennedy <mkennedy@gentoo.org>
#
diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass
index 8e7b3e9572..590e48c77e 100644
--- a/eclass/db-use.eclass
+++ b/eclass/db-use.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.9 2010/05/12 11:19:29 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.10 2011/12/27 17:55:12 fauli Exp $
# This is a common location for functions that aid the use of sys-libs/db
#
# Bugs: pauldv@gentoo.org
diff --git a/eclass/db.eclass b/eclass/db.eclass
index 16689ab0f2..9e5bd40460 100644
--- a/eclass/db.eclass
+++ b/eclass/db.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.43 2011/08/29 01:28:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.44 2011/12/27 17:55:12 fauli Exp $
# This is a common location for functions used in the sys-libs/db ebuilds
#
# Bugs: pauldv@gentoo.org
diff --git a/eclass/embassy.eclass b/eclass/embassy.eclass
index 2f36587fed..01688f70a7 100644
--- a/eclass/embassy.eclass
+++ b/eclass/embassy.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/embassy.eclass,v 1.17 2008/11/03 22:17:50 ribosome Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/embassy.eclass,v 1.18 2011/12/27 17:55:12 fauli Exp $
# Author Olivier Fisette <ribosome@gentoo.org>
@@ -74,11 +74,11 @@ embassy_src_compile() {
"--mandir=${PREFIX}/share/man" \
${EXTRA_CONF} || die
emake || die "Before reporting this error as a bug, please make sure you compiled
- EMBOSS and the EMBASSY packages with the same \"USE\" flags. Failure to
- do so may prevent the compilation of some EMBASSY packages, or cause
- runtime problems with some EMBASSY programs. For example, if you
- compile EMBOSS with \"png\" support and then try to build DOMAINATRIX
- without \"png\" support, compilation will fail when linking the binaries."
+ EMBOSS and the EMBASSY packages with the same \"USE\" flags. Failure to
+ do so may prevent the compilation of some EMBASSY packages, or cause
+ runtime problems with some EMBASSY programs. For example, if you
+ compile EMBOSS with \"png\" support and then try to build DOMAINATRIX
+ without \"png\" support, compilation will fail when linking the binaries."
}
embassy_src_install() {
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 4ba58cc479..5c9db8dece 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.376 2011/12/17 06:13:50 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.386 2012/03/01 22:10:50 naota Exp $
# @ECLASS: eutils.eclass
# @MAINTAINER:
@@ -18,7 +18,7 @@
if [[ ${___ECLASS_ONCE_EUTILS} != "recur -_+^+_- spank" ]] ; then
___ECLASS_ONCE_EUTILS="recur -_+^+_- spank"
-inherit multilib portability user
+inherit multilib user
DESCRIPTION="Based on the ${ECLASS} eclass"
@@ -214,6 +214,7 @@ eumask_push() {
# @DESCRIPTION:
# Restore the previous umask state.
eumask_pop() {
+ [[ $# -eq 0 ]] || die "${FUNCNAME}: we take no options"
local s
estack_pop eumask s || die "${FUNCNAME}: unbalanced push"
umask ${s} || die "${FUNCNAME}: sanity: could not restore umask: ${s}"
@@ -441,15 +442,18 @@ epatch() {
fi
# Dynamically detect the correct -p# ... i'm lazy, so shoot me :/
+ local patch_cmd
while [[ ${count} -lt 5 ]] ; do
+ patch_cmd="${BASH_ALIASES[patch]:-patch} -p${count} ${EPATCH_OPTS}"
+
# Generate some useful debug info ...
(
_epatch_draw_line "***** ${patchname} *****"
echo
- echo "PATCH COMMAND: patch -p${count} ${EPATCH_OPTS} < '${PATCH_TARGET}'"
+ echo "PATCH COMMAND: ${patch_cmd} < '${PATCH_TARGET}'"
echo
_epatch_draw_line "***** ${patchname} *****"
- patch -p${count} ${EPATCH_OPTS} --dry-run -f < "${PATCH_TARGET}" 2>&1
+ ${patch_cmd} --dry-run -f < "${PATCH_TARGET}" 2>&1
ret=$?
echo
echo "patch program exited with status ${ret}"
@@ -463,7 +467,7 @@ epatch() {
echo "ACTUALLY APPLYING ${patchname} ..."
echo
_epatch_draw_line "***** ${patchname} *****"
- patch -p${count} ${EPATCH_OPTS} < "${PATCH_TARGET}" 2>&1
+ ${patch_cmd} < "${PATCH_TARGET}" 2>&1
ret=$?
echo
echo "patch program exited with status ${ret}"
@@ -500,8 +504,16 @@ epatch() {
die "Failed Patch: ${patchname}!"
fi
- # if everything worked, delete the patch log
+ # if everything worked, delete the full debug patch log
rm -f "${STDERR_TARGET}"
+
+ # then log away the exact stuff for people to review later
+ cat <<-EOF >> "${T}/epatch.log"
+ PATCH: ${x}
+ CMD: ${patch_cmd}
+ PWD: ${PWD}
+
+ EOF
eend 0
done
@@ -539,12 +551,12 @@ epatch_user() {
[[ $# -ne 0 ]] && die "epatch_user takes no options"
# Allow multiple calls to this function; ignore all but the first
- local applied="${T}/epatch_user.applied"
+ local applied="${T}/epatch_user.log"
[[ -e ${applied} ]] && return 2
# don't clobber any EPATCH vars that the parent might want
local EPATCH_SOURCE check base=${PORTAGE_CONFIGROOT%/}/etc/portage/patches
- for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do
+ for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}; do
EPATCH_SOURCE=${base}/${CTARGET}/${check}
[[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${CHOST}/${check}
[[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${check}
@@ -609,20 +621,23 @@ edos2unix() {
sed -i 's/\r$//' -- "$@" || die
}
-# Make a desktop file !
-# Great for making those icons in kde/gnome startmenu !
-# Amaze your friends ! Get the women ! Join today !
-#
-# make_desktop_entry(<command>, [name], [icon], [type], [fields])
+# @FUNCTION: make_desktop_entry
+# @USAGE: make_desktop_entry(<command>, [name], [icon], [type], [fields])
+# @DESCRIPTION:
+# Make a .desktop file.
#
-# binary: what command does the app run with ?
-# name: the name that will show up in the menu
-# icon: give your little like a pretty little icon ...
-# this can be relative (to /usr/share/pixmaps) or
-# a full path to an icon
-# type: what kind of application is this ? for categories:
-# http://standards.freedesktop.org/menu-spec/latest/apa.html
+# @CODE
+# binary: what command does the app run with ?
+# name: the name that will show up in the menu
+# icon: give your little like a pretty little icon ...
+# this can be relative (to /usr/share/pixmaps) or
+# a full path to an icon
+# type: what kind of application is this?
+# for categories:
+# http://standards.freedesktop.org/menu-spec/latest/apa.html
+# if unset, function tries to guess from package's category
# fields: extra fields to append to the desktop file; a printf string
+# @CODE
make_desktop_entry() {
[[ -z $1 ]] && die "make_desktop_entry: You must specify the executable"
@@ -638,22 +653,22 @@ make_desktop_entry() {
case ${catmaj} in
app)
case ${catmin} in
- accessibility) type=Accessibility;;
+ accessibility) type="Utility;Accessibility";;
admin) type=System;;
antivirus) type=System;;
- arch) type=Archiving;;
- backup) type=Archiving;;
- cdr) type=DiscBurning;;
- dicts) type=Dictionary;;
+ arch) type="Utility;Archiving";;
+ backup) type="Utility;Archiving";;
+ cdr) type="AudioVideo;DiscBurning";;
+ dicts) type="Office;Dictionary";;
doc) type=Documentation;;
- editors) type=TextEditor;;
- emacs) type=TextEditor;;
- emulation) type=Emulator;;
- laptop) type=HardwareSettings;;
+ editors) type="Utility;TextEditor";;
+ emacs) type="Development;TextEditor";;
+ emulation) type="System;Emulator";;
+ laptop) type="Settings;HardwareSettings";;
office) type=Office;;
- pda) type=PDA;;
- vim) type=TextEditor;;
- xemacs) type=TextEditor;;
+ pda) type="Office;PDA";;
+ vim) type="Development;TextEditor";;
+ xemacs) type="Development;TextEditor";;
esac
;;
@@ -941,432 +956,6 @@ newicon() {
)
}
-# for internal use only (unpack_pdv and unpack_makeself)
-find_unpackable_file() {
- local src=$1
- if [[ -z ${src} ]] ; then
- src=${DISTDIR}/${A}
- else
- if [[ -e ${DISTDIR}/${src} ]] ; then
- src=${DISTDIR}/${src}
- elif [[ -e ${PWD}/${src} ]] ; then
- src=${PWD}/${src}
- elif [[ -e ${src} ]] ; then
- src=${src}
- fi
- fi
- [[ ! -e ${src} ]] && return 1
- echo "${src}"
-}
-
-# @FUNCTION: unpack_pdv
-# @USAGE: <file to unpack> <size of off_t>
-# @DESCRIPTION:
-# Unpack those pesky pdv generated files ...
-# They're self-unpacking programs with the binary package stuffed in
-# the middle of the archive. Valve seems to use it a lot ... too bad
-# it seems to like to segfault a lot :(. So lets take it apart ourselves.
-#
-# You have to specify the off_t size ... I have no idea how to extract that
-# information out of the binary executable myself. Basically you pass in
-# the size of the off_t type (in bytes) on the machine that built the pdv
-# archive.
-#
-# One way to determine this is by running the following commands:
-#
-# @CODE
-# strings <pdv archive> | grep lseek
-# strace -elseek <pdv archive>
-# @CODE
-#
-# Basically look for the first lseek command (we do the strings/grep because
-# sometimes the function call is _llseek or something) and steal the 2nd
-# parameter. Here is an example:
-#
-# @CODE
-# vapier@vapier 0 pdv_unpack # strings hldsupdatetool.bin | grep lseek
-# lseek
-# vapier@vapier 0 pdv_unpack # strace -elseek ./hldsupdatetool.bin
-# lseek(3, -4, SEEK_END) = 2981250
-# @CODE
-#
-# Thus we would pass in the value of '4' as the second parameter.
-unpack_pdv() {
- local src=$(find_unpackable_file "$1")
- local sizeoff_t=$2
-
- [[ -z ${src} ]] && die "Could not locate source for '$1'"
- [[ -z ${sizeoff_t} ]] && die "No idea what off_t size was used for this pdv :("
-
- local shrtsrc=$(basename "${src}")
- echo ">>> Unpacking ${shrtsrc} to ${PWD}"
- local metaskip=$(tail -c ${sizeoff_t} "${src}" | hexdump -e \"%i\")
- local tailskip=$(tail -c $((${sizeoff_t}*2)) "${src}" | head -c ${sizeoff_t} | hexdump -e \"%i\")
-
- # grab metadata for debug reasons
- local metafile=$(emktemp)
- tail -c +$((${metaskip}+1)) "${src}" > "${metafile}"
-
- # rip out the final file name from the metadata
- local datafile=$(tail -c +$((${metaskip}+1)) "${src}" | strings | head -n 1)
- datafile=$(basename "${datafile}")
-
- # now lets uncompress/untar the file if need be
- local tmpfile=$(emktemp)
- tail -c +$((${tailskip}+1)) ${src} 2>/dev/null | head -c 512 > ${tmpfile}
-
- local iscompressed=$(file -b "${tmpfile}")
- if [[ ${iscompressed:0:8} == "compress" ]] ; then
- iscompressed=1
- mv ${tmpfile}{,.Z}
- gunzip ${tmpfile}
- else
- iscompressed=0
- fi
- local istar=$(file -b "${tmpfile}")
- if [[ ${istar:0:9} == "POSIX tar" ]] ; then
- istar=1
- else
- istar=0
- fi
-
- #for some reason gzip dies with this ... dd cant provide buffer fast enough ?
- #dd if=${src} ibs=${metaskip} count=1 \
- # | dd ibs=${tailskip} skip=1 \
- # | gzip -dc \
- # > ${datafile}
- if [ ${iscompressed} -eq 1 ] ; then
- if [ ${istar} -eq 1 ] ; then
- tail -c +$((${tailskip}+1)) ${src} 2>/dev/null \
- | head -c $((${metaskip}-${tailskip})) \
- | tar -xzf -
- else
- tail -c +$((${tailskip}+1)) ${src} 2>/dev/null \
- | head -c $((${metaskip}-${tailskip})) \
- | gzip -dc \
- > ${datafile}
- fi
- else
- if [ ${istar} -eq 1 ] ; then
- tail -c +$((${tailskip}+1)) ${src} 2>/dev/null \
- | head -c $((${metaskip}-${tailskip})) \
- | tar --no-same-owner -xf -
- else
- tail -c +$((${tailskip}+1)) ${src} 2>/dev/null \
- | head -c $((${metaskip}-${tailskip})) \
- > ${datafile}
- fi
- fi
- true
- #[ -s "${datafile}" ] || die "failure unpacking pdv ('${metaskip}' '${tailskip}' '${datafile}')"
- #assert "failure unpacking pdv ('${metaskip}' '${tailskip}' '${datafile}')"
-}
-
-# @FUNCTION: unpack_makeself
-# @USAGE: [file to unpack] [offset] [tail|dd]
-# @DESCRIPTION:
-# Unpack those pesky makeself generated files ...
-# They're shell scripts with the binary package tagged onto
-# the end of the archive. Loki utilized the format as does
-# many other game companies.
-#
-# If the file is not specified, then ${A} is used. If the
-# offset is not specified then we will attempt to extract
-# the proper offset from the script itself.
-unpack_makeself() {
- local src_input=${1:-${A}}
- local src=$(find_unpackable_file "${src_input}")
- local skip=$2
- local exe=$3
-
- [[ -z ${src} ]] && die "Could not locate source for '${src_input}'"
-
- local shrtsrc=$(basename "${src}")
- echo ">>> Unpacking ${shrtsrc} to ${PWD}"
- if [[ -z ${skip} ]] ; then
- local ver=$(grep -m1 -a '#.*Makeself' "${src}" | awk '{print $NF}')
- local skip=0
- exe=tail
- case ${ver} in
- 1.5.*|1.6.0-nv) # tested 1.5.{3,4,5} ... guessing 1.5.x series is same
- skip=$(grep -a ^skip= "${src}" | cut -d= -f2)
- ;;
- 2.0|2.0.1)
- skip=$(grep -a ^$'\t'tail "${src}" | awk '{print $2}' | cut -b2-)
- ;;
- 2.1.1)
- skip=$(grep -a ^offset= "${src}" | awk '{print $2}' | cut -b2-)
- (( skip++ ))
- ;;
- 2.1.2)
- skip=$(grep -a ^offset= "${src}" | awk '{print $3}' | head -n 1)
- (( skip++ ))
- ;;
- 2.1.3)
- skip=`grep -a ^offset= "${src}" | awk '{print $3}'`
- (( skip++ ))
- ;;
- 2.1.4|2.1.5)
- skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1)
- skip=$(head -n ${skip} "${src}" | wc -c)
- exe="dd"
- ;;
- *)
- eerror "I'm sorry, but I was unable to support the Makeself file."
- eerror "The version I detected was '${ver}'."
- eerror "Please file a bug about the file ${shrtsrc} at"
- eerror "http://bugs.gentoo.org/ so that support can be added."
- die "makeself version '${ver}' not supported"
- ;;
- esac
- debug-print "Detected Makeself version ${ver} ... using ${skip} as offset"
- fi
- case ${exe} in
- tail) exe="tail -n +${skip} '${src}'";;
- dd) exe="dd ibs=${skip} skip=1 if='${src}'";;
- *) die "makeself cant handle exe '${exe}'"
- esac
-
- # lets grab the first few bytes of the file to figure out what kind of archive it is
- local filetype tmpfile=$(emktemp)
- eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}"
- filetype=$(file -b "${tmpfile}") || die
- case ${filetype} in
- *tar\ archive*)
- eval ${exe} | tar --no-same-owner -xf -
- ;;
- bzip2*)
- eval ${exe} | bzip2 -dc | tar --no-same-owner -xf -
- ;;
- gzip*)
- eval ${exe} | tar --no-same-owner -xzf -
- ;;
- compress*)
- eval ${exe} | gunzip | tar --no-same-owner -xf -
- ;;
- *)
- eerror "Unknown filetype \"${filetype}\" ?"
- false
- ;;
- esac
- assert "failure unpacking (${filetype}) makeself ${shrtsrc} ('${ver}' +${skip})"
-}
-
-# @FUNCTION: cdrom_get_cds
-# @USAGE: <file on cd1> [file on cd2] [file on cd3] [...]
-# @DESCRIPTION:
-# Aquire cd(s) for those lovely cd-based emerges. Yes, this violates
-# the whole 'non-interactive' policy, but damnit I want CD support !
-#
-# With these cdrom functions we handle all the user interaction and
-# standardize everything. All you have to do is call cdrom_get_cds()
-# and when the function returns, you can assume that the cd has been
-# found at CDROM_ROOT.
-#
-# The function will attempt to locate a cd based upon a file that is on
-# the cd. The more files you give this function, the more cds
-# the cdrom functions will handle.
-#
-# Normally the cdrom functions will refer to the cds as 'cd #1', 'cd #2',
-# etc... If you want to give the cds better names, then just export
-# the appropriate CDROM_NAME variable before calling cdrom_get_cds().
-# Use CDROM_NAME for one cd, or CDROM_NAME_# for multiple cds. You can
-# also use the CDROM_NAME_SET bash array.
-#
-# For those multi cd ebuilds, see the cdrom_load_next_cd() function.
-cdrom_get_cds() {
- # first we figure out how many cds we're dealing with by
- # the # of files they gave us
- local cdcnt=0
- local f=
- for f in "$@" ; do
- ((++cdcnt))
- export CDROM_CHECK_${cdcnt}="$f"
- done
- export CDROM_TOTAL_CDS=${cdcnt}
- export CDROM_CURRENT_CD=1
-
- # now we see if the user gave use CD_ROOT ...
- # if they did, let's just believe them that it's correct
- if [[ -n ${CD_ROOT}${CD_ROOT_1} ]] ; then
- local var=
- cdcnt=0
- while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
- ((++cdcnt))
- var="CD_ROOT_${cdcnt}"
- [[ -z ${!var} ]] && var="CD_ROOT"
- if [[ -z ${!var} ]] ; then
- eerror "You must either use just the CD_ROOT"
- eerror "or specify ALL the CD_ROOT_X variables."
- eerror "In this case, you will need ${CDROM_TOTAL_CDS} CD_ROOT_X variables."
- die "could not locate CD_ROOT_${cdcnt}"
- fi
- done
- export CDROM_ROOT=${CD_ROOT_1:-${CD_ROOT}}
- einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}"
- export CDROM_SET=-1
- for f in ${CDROM_CHECK_1//:/ } ; do
- ((++CDROM_SET))
- [[ -e ${CDROM_ROOT}/${f} ]] && break
- done
- export CDROM_MATCH=${f}
- return
- fi
-
- # User didn't help us out so lets make sure they know they can
- # simplify the whole process ...
- if [[ ${CDROM_TOTAL_CDS} -eq 1 ]] ; then
- einfo "This ebuild will need the ${CDROM_NAME:-cdrom for ${PN}}"
- echo
- einfo "If you do not have the CD, but have the data files"
- einfo "mounted somewhere on your filesystem, just export"
- einfo "the variable CD_ROOT so that it points to the"
- einfo "directory containing the files."
- echo
- einfo "For example:"
- einfo "export CD_ROOT=/mnt/cdrom"
- echo
- else
- if [[ -n ${CDROM_NAME_SET} ]] ; then
- # Translate the CDROM_NAME_SET array into CDROM_NAME_#
- cdcnt=0
- while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
- ((++cdcnt))
- export CDROM_NAME_${cdcnt}="${CDROM_NAME_SET[$((${cdcnt}-1))]}"
- done
- fi
-
- einfo "This package will need access to ${CDROM_TOTAL_CDS} cds."
- cdcnt=0
- while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
- ((++cdcnt))
- var="CDROM_NAME_${cdcnt}"
- [[ ! -z ${!var} ]] && einfo " CD ${cdcnt}: ${!var}"
- done
- echo
- einfo "If you do not have the CDs, but have the data files"
- einfo "mounted somewhere on your filesystem, just export"
- einfo "the following variables so they point to the right place:"
- einfon ""
- cdcnt=0
- while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
- ((++cdcnt))
- echo -n " CD_ROOT_${cdcnt}"
- done
- echo
- einfo "Or, if you have all the files in the same place, or"
- einfo "you only have one cdrom, you can export CD_ROOT"
- einfo "and that place will be used as the same data source"
- einfo "for all the CDs."
- echo
- einfo "For example:"
- einfo "export CD_ROOT_1=/mnt/cdrom"
- echo
- fi
-
- export CDROM_SET=""
- export CDROM_CURRENT_CD=0
- cdrom_load_next_cd
-}
-
-# @FUNCTION: cdrom_load_next_cd
-# @DESCRIPTION:
-# Some packages are so big they come on multiple CDs. When you're done reading
-# files off a CD and want access to the next one, just call this function.
-# Again, all the messy details of user interaction are taken care of for you.
-# Once this returns, just read the variable CDROM_ROOT for the location of the
-# mounted CD. Note that you can only go forward in the CD list, so make sure
-# you only call this function when you're done using the current CD.
-cdrom_load_next_cd() {
- local var
- ((++CDROM_CURRENT_CD))
-
- unset CDROM_ROOT
- var=CD_ROOT_${CDROM_CURRENT_CD}
- [[ -z ${!var} ]] && var="CD_ROOT"
- if [[ -z ${!var} ]] ; then
- var="CDROM_CHECK_${CDROM_CURRENT_CD}"
- _cdrom_locate_file_on_cd ${!var}
- else
- export CDROM_ROOT=${!var}
- fi
-
- einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}"
-}
-
-# this is used internally by the cdrom_get_cds() and cdrom_load_next_cd()
-# functions. this should *never* be called from an ebuild.
-# all it does is try to locate a give file on a cd ... if the cd isn't
-# found, then a message asking for the user to insert the cdrom will be
-# displayed and we'll hang out here until:
-# (1) the file is found on a mounted cdrom
-# (2) the user hits CTRL+C
-_cdrom_locate_file_on_cd() {
- local mline=""
- local showedmsg=0 showjolietmsg=0
-
- while [[ -z ${CDROM_ROOT} ]] ; do
- local i=0
- local -a cdset=(${*//:/ })
- if [[ -n ${CDROM_SET} ]] ; then
- cdset=(${cdset[${CDROM_SET}]})
- fi
-
- while [[ -n ${cdset[${i}]} ]] ; do
- local dir=$(dirname ${cdset[${i}]})
- local file=$(basename ${cdset[${i}]})
-
- local point= node= fs= foo=
- while read point node fs foo ; do
- [[ " cd9660 iso9660 udf " != *" ${fs} "* ]] && \
- ! [[ ${fs} == "subfs" && ",${opts}," == *",fs=cdfss,"* ]] \
- && continue
- point=${point//\040/ }
- [[ ! -d ${point}/${dir} ]] && continue
- [[ -z $(find "${point}/${dir}" -maxdepth 1 -iname "${file}") ]] && continue
- export CDROM_ROOT=${point}
- export CDROM_SET=${i}
- export CDROM_MATCH=${cdset[${i}]}
- return
- done <<< "$(get_mounts)"
-
- ((++i))
- done
-
- echo
- if [[ ${showedmsg} -eq 0 ]] ; then
- if [[ ${CDROM_TOTAL_CDS} -eq 1 ]] ; then
- if [[ -z ${CDROM_NAME} ]] ; then
- einfo "Please insert+mount the cdrom for ${PN} now !"
- else
- einfo "Please insert+mount the ${CDROM_NAME} cdrom now !"
- fi
- else
- if [[ -z ${CDROM_NAME_1} ]] ; then
- einfo "Please insert+mount cd #${CDROM_CURRENT_CD} for ${PN} now !"
- else
- local var="CDROM_NAME_${CDROM_CURRENT_CD}"
- einfo "Please insert+mount the ${!var} cdrom now !"
- fi
- fi
- showedmsg=1
- fi
- einfo "Press return to scan for the cd again"
- einfo "or hit CTRL+C to abort the emerge."
- echo
- if [[ ${showjolietmsg} -eq 0 ]] ; then
- showjolietmsg=1
- else
- ewarn "If you are having trouble with the detection"
- ewarn "of your CD, it is possible that you do not have"
- ewarn "Joliet support enabled in your kernel. Please"
- ewarn "check that CONFIG_JOLIET is enabled in your kernel."
- ebeep 5
- fi
- read || die "something is screwed with your system"
- done
-}
-
# @FUNCTION: strip-linguas
# @USAGE: [<allow LINGUAS>|<-i|-u> <directories of .po files>]
# @DESCRIPTION:
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index ececd2aa3b..64aba991fb 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.161 2011/12/15 05:23:15 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.169 2012/02/26 12:09:44 blueness Exp $
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
@@ -15,58 +15,44 @@ ___ECLASS_ONCE_FLAG_O_MATIC="recur -_+^+_- spank"
inherit eutils toolchain-funcs multilib
-################ DEPRECATED functions ################
-# The following are still present to avoid breaking existing
-# code more than necessary; however they are deprecated. Please
-# use gcc-specs-* from toolchain-funcs.eclass instead, if you
-# need to know which hardened techs are active in the compiler.
-# See bug #100974
-#
-# has_hardened
-# has_pie
-# has_pic
-# has_ssp_all
-# has_ssp
-
+# Return all the flag variables that our high level funcs operate on.
+all-flag-vars() {
+ echo {C,CPP,CXX,CCAS,F,FC,LD}FLAGS
+}
# {C,CXX,F,FC}FLAGS that we allow in strip-flags
# Note: shell globs and character lists are allowed
setup-allowed-flags() {
- if [[ -z ${ALLOWED_FLAGS} ]] ; then
- export ALLOWED_FLAGS="-pipe"
- export ALLOWED_FLAGS="${ALLOWED_FLAGS} -O -O0 -O1 -O2 -mcpu -march -mtune"
- export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fstack-protector -fstack-protector-all"
- export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fbounds-checking -fno-strict-overflow"
- export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-PIE -fno-pie -fno-unit-at-a-time"
- export ALLOWED_FLAGS="${ALLOWED_FLAGS} -g -g[0-9] -ggdb -ggdb[0-9] -gstabs -gstabs+"
- export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-ident -fpermissive"
- export ALLOWED_FLAGS="${ALLOWED_FLAGS} -W* -w"
- fi
+ ALLOWED_FLAGS="-pipe"
+ ALLOWED_FLAGS+=" -O -O1 -O2 -Os -mcpu -march -mtune"
+ ALLOWED_FLAGS+=" -fstack-protector -fstack-protector-all"
+ ALLOWED_FLAGS+=" -fbounds-checking -fno-strict-overflow"
+ ALLOWED_FLAGS+=" -fno-PIE -fno-pie -fno-unit-at-a-time"
+ ALLOWED_FLAGS+=" -g -g[0-9] -ggdb -ggdb[0-9] -gstabs -gstabs+"
+ ALLOWED_FLAGS+=" -fno-ident -fpermissive"
+ ALLOWED_FLAGS+=" -W* -w"
+
# allow a bunch of flags that negate features / control ABI
- ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all \
- -fno-strict-aliasing -fno-bounds-checking -fstrict-overflow -fno-omit-frame-pointer"
- ALLOWED_FLAGS="${ALLOWED_FLAGS} -mregparm -mno-app-regs -mapp-regs \
- -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 \
- -mno-sse4.2 -mno-avx -mno-aes -mno-pclmul -mno-sse4a -mno-3dnow \
- -mno-popcnt -mno-abm \
- -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -mplt \
+ ALLOWED_FLAGS+=" -fno-stack-protector -fno-stack-protector-all \
+ -fno-strict-aliasing -fno-bounds-checking -fstrict-overflow \
+ -fno-omit-frame-pointer"
+ ALLOWED_FLAGS+=" -mregparm -mno-app-regs -mapp-regs -mno-mmx -mno-sse \
+ -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 \
+ -mno-avx -mno-aes -mno-pclmul -mno-sse4a -mno-3dnow -mno-popcnt \
+ -mno-abm -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -mplt \
-msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu \
-mieee -mieee-with-inexact -mschedule -mfloat-gprs -mspe -mno-spe \
- -mtls-direct-seg-refs -mno-tls-direct-seg-refs \
- -mflat -mno-flat -mno-faster-structs -mfaster-structs \
- -m32 -m64 -mx32 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
- -mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
- -msecure-plt -m*-toc -D* -U*"
+ -mtls-direct-seg-refs -mno-tls-direct-seg-refs -mflat -mno-flat \
+ -mno-faster-structs -mfaster-structs -m32 -m64 -mx32 -mabi \
+ -mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 -mcmodel \
+ -mstack-bias -mno-stack-bias -msecure-plt -m*-toc -D* -U*"
# 4.5
- ALLOWED_FLAGS="${ALLOWED_FLAGS} -mno-fma4 -mno-movbe -mno-xop -mno-lwp"
+ ALLOWED_FLAGS+=" -mno-fma4 -mno-movbe -mno-xop -mno-lwp"
# 4.6
- ALLOWED_FLAGS="${ALLOWED_FLAGS} -mno-fsgsbase -mno-rdrnd -mno-f16c \
- -mno-bmi -mno-tbm"
+ ALLOWED_FLAGS+=" -mno-fsgsbase -mno-rdrnd -mno-f16c -mno-bmi -mno-tbm"
- # {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
- # NOTE: currently -Os have issues with gcc3 and K6* arch's
- export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks"
+ export ALLOWED_FLAGS
return 0
}
@@ -99,33 +85,29 @@ _filter-hardened() {
# Strings removed are matched as globs, so for example
# '-O*' would remove -O1, -O2 etc.
_filter-var() {
- local f x VAR VAL
- declare -a new
-
- VAR=$1
+ local f x var=$1 new=()
shift
- eval VAL=\${${VAR}}
- for f in ${VAL}; do
- for x in "$@"; do
+
+ for f in ${!var} ; do
+ for x in "$@" ; do
# Note this should work with globs like -O*
[[ ${f} == ${x} ]] && continue 2
done
- eval new\[\${\#new\[@]}]=\${f}
+ new+=( "${f}" )
done
- eval export ${VAR}=\${new\[*]}
+ eval export ${var}=\""${new[*]}"\"
}
# @FUNCTION: filter-flags
# @USAGE: <flags>
# @DESCRIPTION:
-# Remove particular <flags> from {C,CPP,CXX,F,FC}FLAGS. Accepts shell globs.
+# Remove particular <flags> from {C,CPP,CXX,CCAS,F,FC,LD}FLAGS. Accepts shell globs.
filter-flags() {
_filter-hardened "$@"
- _filter-var CFLAGS "$@"
- _filter-var CPPFLAGS "$@"
- _filter-var CXXFLAGS "$@"
- _filter-var FFLAGS "$@"
- _filter-var FCFLAGS "$@"
+ local v
+ for v in $(all-flag-vars) ; do
+ _filter-var ${v} "$@"
+ done
return 0
}
@@ -211,24 +193,21 @@ append-flags() {
# @DESCRIPTION:
# Replace the <old> flag with <new>. Accepts shell globs for <old>.
replace-flags() {
- [[ $# != 2 ]] \
- && echo && eerror "Usage: replace-flags <old flag> <new flag>" \
- && die "replace-flags takes 2 arguments, not $#"
-
- local f fset
- declare -a new_CFLAGS new_CXXFLAGS new_FFLAGS new_FCFLAGS
+ [[ $# != 2 ]] && die "Usage: replace-flags <old flag> <new flag>"
- for fset in CFLAGS CXXFLAGS FFLAGS FCFLAGS; do
+ local f var new
+ for var in $(all-flag-vars) ; do
# Looping over the flags instead of using a global
# substitution ensures that we're working with flag atoms.
# Otherwise globs like -O* have the potential to wipe out the
# list of flags.
- for f in ${!fset}; do
+ new=()
+ for f in ${!var} ; do
# Note this should work with globs like -O*
[[ ${f} == ${1} ]] && f=${2}
- eval new_${fset}\[\${\#new_${fset}\[@]}]=\${f}
+ new+=( "${f}" )
done
- eval export ${fset}=\${new_${fset}\[*]}
+ eval export ${var}=\""${new[*]}"\"
done
return 0
@@ -266,7 +245,12 @@ _is_flagq() {
# Returns shell true if <flag> is in {C,CXX,F,FC}FLAGS, else returns shell false. Accepts shell globs.
is-flagq() {
[[ -n $2 ]] && die "Usage: is-flag <flag>"
- _is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1 || _is_flagq FFLAGS $1 || _is_flagq FCFLAGS $1
+
+ local var
+ for var in $(all-flag-vars) ; do
+ _is_flagq ${var} "$1" && return 0
+ done
+ return 1
}
# @FUNCTION: is-flag
@@ -332,99 +316,43 @@ filter-mfpmath() {
# @DESCRIPTION:
# Strip C[XX]FLAGS of everything except known good/safe flags.
strip-flags() {
- local x y flag NEW_CFLAGS NEW_CXXFLAGS NEW_FFLAGS NEW_FCFLAGS
+ local x y var
setup-allowed-flags
- local NEW_CFLAGS=""
- local NEW_CXXFLAGS=""
- local NEW_FFLAGS=""
- local NEW_FCFLAGS=""
-
- # Allow unstable C[XX]FLAGS if we are using unstable profile ...
-
- #
- #
- # In Gentoo Prefix, this is useless. Not a problem, but on aix6 it causes
- # bash to hang and I can't figure it out. So it is disabled for now.
- # --darkside@g.o (14 Jan 2009)
-
- if use !prefix; then
- if has "~$(tc-arch)" ${ACCEPT_KEYWORDS} ; then
- ALLOWED_FLAGS="${ALLOWED_FLAGS} ${UNSTABLE_FLAGS}"
- fi
- fi
-
set -f # disable pathname expansion
- for x in ${CFLAGS}; do
- for y in ${ALLOWED_FLAGS}; do
- flag=${x%%=*}
- if [ "${flag%%${y}}" = "" ] ; then
- NEW_CFLAGS="${NEW_CFLAGS} ${x}"
- break
- fi
+ for var in $(all-flag-vars) ; do
+ local new=()
+
+ for x in ${!var} ; do
+ local flag=${x%%=*}
+ for y in ${ALLOWED_FLAGS} ; do
+ if [[ -z ${flag%%${y}} ]] ; then
+ new+=( "${x}" )
+ break
+ fi
+ done
done
- done
- for x in ${CXXFLAGS}; do
- for y in ${ALLOWED_FLAGS}; do
- flag=${x%%=*}
- if [ "${flag%%${y}}" = "" ] ; then
- NEW_CXXFLAGS="${NEW_CXXFLAGS} ${x}"
- break
- fi
- done
- done
-
- for x in ${FFLAGS}; do
- for y in ${ALLOWED_FLAGS}; do
- flag=${x%%=*}
- if [ "${flag%%${y}}" = "" ] ; then
- NEW_FFLAGS="${NEW_FFLAGS} ${x}"
- break
- fi
- done
- done
+ # In case we filtered out all optimization flags fallback to -O2
+ if _is_flagq ${var} "-O*" && ! _is_flagq new "-O*" ; then
+ new+=( -O2 )
+ fi
- for x in ${FCFLAGS}; do
- for y in ${ALLOWED_FLAGS}; do
- flag=${x%%=*}
- if [ "${flag%%${y}}" = "" ] ; then
- NEW_FCFLAGS="${NEW_FCFLAGS} ${x}"
- break
- fi
- done
+ eval export ${var}=\""${new[*]}"\"
done
- # In case we filtered out all optimization flags fallback to -O2
- if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then
- NEW_CFLAGS="${NEW_CFLAGS} -O2"
- fi
- if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then
- NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2"
- fi
- if [ "${FFLAGS/-O}" != "${FFLAGS}" -a "${NEW_FFLAGS/-O}" = "${NEW_FFLAGS}" ]; then
- NEW_FFLAGS="${NEW_FFLAGS} -O2"
- fi
- if [ "${FCFLAGS/-O}" != "${FCFLAGS}" -a "${NEW_FCFLAGS/-O}" = "${NEW_FCFLAGS}" ]; then
- NEW_FCFLAGS="${NEW_FCFLAGS} -O2"
- fi
-
set +f # re-enable pathname expansion
- export CFLAGS="${NEW_CFLAGS}"
- export CXXFLAGS="${NEW_CXXFLAGS}"
- export FFLAGS="${NEW_FFLAGS}"
- export FCFLAGS="${NEW_FCFLAGS}"
return 0
}
test-flag-PROG() {
local comp=$1
- local flags="$2"
+ local flag=$2
- [[ -z ${comp} || -z ${flags} ]] && return 1
+ [[ -z ${comp} || -z ${flag} ]] && return 1
# use -c so we can test the assembler as well
# don't use -o /dev/null: /usr/ccs/bin/as: File exists (Sun LD)
@@ -432,7 +360,7 @@ test-flag-PROG() {
local src=${T}/tf-${comp}-${SECONDS}.c
echo "main() {}" > "${src}"
local PROG=$(tc-get${comp})
- ${PROG} ${flags} -c -o "${src}.o" "${src}" \
+ ${PROG} "${flag}" -c -o "${src}.o" "${src}" \
> /dev/null 2>&1
local ret=$?
rm -f "${src}"{,.o}
@@ -542,36 +470,32 @@ strip-unsupported-flags() {
# @DESCRIPTION:
# Find and echo the value for a particular flag. Accepts shell globs.
get-flag() {
- local f findflag="$1"
+ local f var findflag="$1"
# this code looks a little flaky but seems to work for
# everything we want ...
# for example, if CFLAGS="-march=i686":
# `get-flag -march` == "-march=i686"
# `get-flag march` == "i686"
- for f in ${CFLAGS} ${CXXFLAGS} ${FFLAGS} ${FCFLAGS} ; do
- if [ "${f/${findflag}}" != "${f}" ] ; then
- printf "%s\n" "${f/-${findflag}=}"
- return 0
- fi
+ for var in $(all-flag-vars) ; do
+ for f in ${!var} ; do
+ if [ "${f/${findflag}}" != "${f}" ] ; then
+ printf "%s\n" "${f/-${findflag}=}"
+ return 0
+ fi
+ done
done
return 1
}
-# DEAD FUNCS. Remove by Dec 2011.
-test_flag() { die "$0: deprecated, please use test-flags()!" ; }
-has_hardened() { die "$0: deprecated, please use gcc-specs-{relro,now}()!" ; }
-has_pic() { die "$0: deprecated, please use gcc-specs-pie()!" ; }
-has_pie() { die "$0: deprecated, please use gcc-specs-pie()!" ; }
-has_ssp_all() { die "$0: deprecated, please use gcc-specs-ssp()!" ; }
-has_ssp() { die "$0: deprecated, please use gcc-specs-ssp()!" ; }
-
# @FUNCTION: has_m64
# @DESCRIPTION:
# This doesn't test if the flag is accepted, it tests if the flag actually
# WORKS. Non-multilib gcc will take both -m32 and -m64. If the flag works
# return code is 0, else the return code is 1.
has_m64() {
+ eqawarn "${FUNCNAME}: don't use this anymore"
+
# this doesnt test if the flag is accepted, it tests if the flag
# actually -WORKS-. non-multilib gcc will take both -m32 and -m64!
# please dont replace this function with test_flag in some future
@@ -587,27 +511,8 @@ has_m64() {
return 1
}
-# @FUNCTION: has_m32
-# @DESCRIPTION:
-# This doesn't test if the flag is accepted, it tests if the flag actually
-# WORKS. Non-mulilib gcc will take both -m32 and -64. If the flag works return
-# code is 0, else return code is 1.
has_m32() {
- # this doesnt test if the flag is accepted, it tests if the flag
- # actually -WORKS-. non-multilib gcc will take both -m32 and -m64!
- # please dont replace this function with test_flag in some future
- # clean-up!
-
- [ "$(tc-arch)" = "amd64" ] && has_multilib_profile && return 0
-
- local temp=$(emktemp)
- echo "int main() { return(0); }" > "${temp}".c
- MY_CC=$(tc-getCC)
- ${MY_CC/ .*/} -m32 -o "$(emktemp)" "${temp}".c > /dev/null 2>&1
- local ret=$?
- rm -f "${temp}".c
- [[ ${ret} != 1 ]] && return 0
- return 1
+ die "${FUNCNAME}: don't use this anymore"
}
# @FUNCTION: replace-sparc64-flags
diff --git a/eclass/games.eclass b/eclass/games.eclass
index 8636e47985..501c15095a 100644
--- a/eclass/games.eclass
+++ b/eclass/games.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.146 2011/12/14 16:38:47 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.147 2011/12/27 17:55:12 fauli Exp $
# devlist: {vapier,wolf31o2,mr_bones_}@gentoo.org -> games@gentoo.org
#
diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass
index 480b80efff..7848c7ac15 100644
--- a/eclass/gnustep-base.eclass
+++ b/eclass/gnustep-base.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-base.eclass,v 1.21 2011/11/18 14:23:03 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-base.eclass,v 1.24 2012/02/20 10:14:44 voyageur Exp $
# @ECLASS: gnustep-base.eclass
# @MAINTAINER:
@@ -121,11 +121,11 @@ egnustep_env() {
source "${GS_MAKEFILES}"/GNUstep.sh
# Create compilation GNUstep.conf if it does not exist yet
- if [[ ! -f ${T}/GNUstep.conf ]]; then
- cp "${EPREFIX}"/etc/GNUstep/GNUstep.conf "${T}" \
+ if [[ ! -f ${WORKDIR}/GNUstep.conf ]]; then
+ cp "${EPREFIX}"/etc/GNUstep/GNUstep.conf "${WORKDIR}" \
|| die "GNUstep.conf copy failed"
- sed -e "s#\(GNUSTEP_USER_.*DIR.*=\)#\1${T}/#" \
- -i "${T}"/GNUstep.conf || die "GNUstep.conf sed failed"
+ sed -e "s#\(GNUSTEP_USER_.*DIR.*=\)#\1${WORKDIR}/#" \
+ -i "${WORKDIR}"/GNUstep.conf || die "GNUstep.conf sed failed"
fi
@@ -145,7 +145,7 @@ egnustep_env() {
ADDITIONAL_NATIVE_LIB_DIRS="${GNUSTEP_SYSTEM_LIBRARIES}" \
DESTDIR="${D}" \
HOME="${T}" \
- GNUSTEP_CONFIG_FILE="${T}"/GNUstep.conf \
+ GNUSTEP_CONFIG_FILE="${WORKDIR}"/GNUstep.conf \
GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
GNUSTEP_ABSOLUTE_INSTALL_PATHS=yes \
TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \
@@ -158,6 +158,13 @@ egnustep_env() {
&& GS_ENV=( "${GS_ENV[@]}" "debug=yes" ) \
|| GS_ENV=( "${GS_ENV[@]}" "debug=no" )
+ if grep -q libobjc.so.4 "${GS_MAKEFILES}"/config.make;
+ then
+ # Set clang for packages that do not respect gnustep-make
+ # settings (gnustep-base's configure for example)
+ export CC=clang CXX=clang CPP="clang -E" LD="clang"
+ fi
+
return 0
fi
die "gnustep-make not installed!"
diff --git a/eclass/gst-plugins-bad.eclass b/eclass/gst-plugins-bad.eclass
index b87555d903..64e9255e64 100644
--- a/eclass/gst-plugins-bad.eclass
+++ b/eclass/gst-plugins-bad.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.40 2011/07/29 07:01:40 leio Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-bad.eclass,v 1.41 2011/12/27 17:55:12 fauli Exp $
#
# Original Author: Saleem Abdulrasool <compnerd@gentoo.org>
diff --git a/eclass/gst-plugins-base.eclass b/eclass/gst-plugins-base.eclass
index 06b2edd784..157bb636fa 100644
--- a/eclass/gst-plugins-base.eclass
+++ b/eclass/gst-plugins-base.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-base.eclass,v 1.19 2011/08/25 18:19:00 nirbheek Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins-base.eclass,v 1.20 2011/12/27 17:55:12 fauli Exp $
# Author : foser <foser@gentoo.org>
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass
index b0a805b3e9..937d0648be 100644
--- a/eclass/java-ant-2.eclass
+++ b/eclass/java-ant-2.eclass
@@ -1,7 +1,7 @@
# eclass for ant based Java packages
#
# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
-# Copyright (c) 2004-2005, Gentoo Foundation
+# Copyright (c) 2004-2011, Gentoo Foundation
# Changes:
# May 2007:
# Made bsfix make one pass for all things and add some glocal targets for
@@ -14,7 +14,7 @@
#
# Licensed under the GNU General Public License, v2
#
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.52 2011/10/21 11:05:01 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.53 2011/12/27 17:55:12 fauli Exp $
inherit java-utils-2
@@ -55,10 +55,10 @@ fi
# and ant dependencies constructed above. Python is there for
# java-ant_remove-taskdefs
JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND}
- ${ANT_TASKS_DEPEND}
- ${JAVA_PKG_PORTAGE_DEP}
- >=dev-java/javatoolkit-0.3.0-r2
- >=dev-lang/python-2.4"
+ ${ANT_TASKS_DEPEND}
+ ${JAVA_PKG_PORTAGE_DEP}
+ >=dev-java/javatoolkit-0.3.0-r2
+ >=dev-lang/python-2.4"
# this eclass must be inherited after java-pkg-2 or java-pkg-opt-2
# if it's java-pkg-opt-2, ant dependencies are pulled based on USE flag
@@ -450,9 +450,9 @@ import sys
from xml.dom.minidom import parse
dom = parse("${file}")
for elem in dom.getElementsByTagName('taskdef'):
- if (len("${task_name}") == 0 or elem.getAttribute("name") == "${task_name}"):
- elem.parentNode.removeChild(elem)
- elem.unlink()
+ if (len("${task_name}") == 0 or elem.getAttribute("name") == "${task_name}"):
+ elem.parentNode.removeChild(elem)
+ elem.unlink()
f = open("${file}", "w")
dom.writexml(f)
f.close()
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index d68b09c304..1a48afccda 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -2,11 +2,11 @@
#
# Copyright (c) 2004-2005, Thomas Matthijs <axxo@gentoo.org>
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
-# Copyright (c) 2004-2005, Gentoo Foundation
+# Copyright (c) 2004-2011, Gentoo Foundation
#
# Licensed under the GNU General Public License, v2
#
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.148 2011/12/13 14:42:39 sera Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.149 2011/12/27 17:55:12 fauli Exp $
# -----------------------------------------------------------------------------
# @eclass-begin
@@ -2748,7 +2748,7 @@ java-pkg_ensure-dep() {
local target_pkg="${2}"
local dev_error=""
- # remove the version specification, which may include globbing (* and [123])
+ # remove the version specification, which may include globbing (* and [123])
local stripped_pkg=$(echo "${target_pkg}" | sed \
's/-\([0-9*]*\(\[[0-9]*\]\)*\)*\(\.\([0-9*]*\(\[[0-9]*\]\)*\)*\)*$//')
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 41bdded478..cea3936b79 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.273 2011/12/12 22:01:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.274 2011/12/28 13:38:05 psomas Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
@@ -227,8 +227,8 @@ detect_version() {
fi
[[ -n "${K_LONGTERM}" ]] &&
- KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm"
- #KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ #KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm"
+ KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
fi
debug-print "KERNEL_BASE_URI is ${KERNEL_BASE_URI}"
diff --git a/eclass/pam.eclass b/eclass/pam.eclass
index d1e6c74459..11d45a1d55 100644
--- a/eclass/pam.eclass
+++ b/eclass/pam.eclass
@@ -1,7 +1,7 @@
-# Copyright 2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Diego Pettenò <flameeyes@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.21 2011/12/17 04:20:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.22 2011/12/27 17:55:12 fauli Exp $
#
# This eclass contains functions to install pamd configuration files and
# pam modules.
@@ -122,7 +122,8 @@ dopammod() {
return 0;
fi
- exeinto $(getpam_mod_dir#${EPREFIX})
+ local dir=$(getpam_mod_dir)
+ exeinto ${dir#${EPREFIX}}
doexe "$@" || die "failed to install $@"
}
@@ -137,7 +138,8 @@ newpammod() {
return 0;
fi
- exeinto $(getpam_mod_dir#${EPREFIX})
+ local dir=$(getpam_mod_dir)
+ exeinto ${dir#${EPREFIX}}
newexe "$1" "$2" || die "failed to install $1 as $2"
}
diff --git a/eclass/php-common-r1.eclass b/eclass/php-common-r1.eclass
index 8612f1d400..a8648905e7 100644
--- a/eclass/php-common-r1.eclass
+++ b/eclass/php-common-r1.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-common-r1.eclass,v 1.17 2010/01/22 13:23:44 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-common-r1.eclass,v 1.18 2011/12/27 17:55:12 fauli Exp $
# Based on robbat2's work on the php4 sapi eclass
# Based on stuart's work on the php5 sapi eclass
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 96fc4c4225..41fada66e9 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.71 2011/12/14 23:40:18 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.75 2012/02/21 18:03:49 jlec Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -156,6 +156,16 @@ ESVN_DISABLE_DEPENDENCIES="${ESVN_DISABLE_DEPENDENCIES:-}"
# tree by users.
ESVN_OFFLINE="${ESVN_OFFLINE:-${ESCM_OFFLINE}}"
+# @ECLASS-VARIABLE: ESVN_UMASK
+# @DESCRIPTION:
+# Set this variable to a custom umask. This is intended to be set by users.
+# By setting this to something like 002, it can make life easier for people
+# who do development as non-root (but are in the portage group), and then
+# switch over to building with FEATURES=userpriv. Or vice-versa. Shouldn't
+# be a security issue here as anyone who has portage group write access
+# already can screw the system over in more creative ways.
+ESVN_UMASK="${ESVN_UMASK:-${EVCS_UMASK}}"
+
# @ECLASS-VARIABLE: ESVN_UP_FREQ
# @DESCRIPTION:
# Set the minimum number of hours between svn up'ing in any given svn module. This is particularly
@@ -216,6 +226,10 @@ subversion_fetch() {
addread "/etc/subversion"
addwrite "${ESVN_STORE_DIR}"
+ if [[ -n "${ESVN_UMASK}" ]]; then
+ eumask_push "${ESVN_UMASK}"
+ fi
+
if [[ ! -d ${ESVN_STORE_DIR} ]]; then
debug-print "${FUNCNAME}: initial checkout. creating subversion directory"
mkdir -m 775 -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}."
@@ -284,7 +298,25 @@ subversion_fetch() {
fi
if [[ -z ${esvn_up_freq} ]]; then
- if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
+ if [[ ${ESVN_WC_UUID} != $(subversion__svn_info "${repo_uri}" "Repository UUID") ]]; then
+ # UUID mismatch. Delete working copy and check out it again.
+ einfo "subversion recheck out start -->"
+ einfo " old UUID: ${ESVN_WC_UUID}"
+ einfo " new UUID: $(subversion__svn_info "${repo_uri}" "Repository UUID")"
+ einfo " repository: ${repo_uri}${revision:+@}${revision}"
+
+ rm -fr "${ESVN_PROJECT}" || die
+
+ debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
+
+ mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
+ cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
+ if [[ -n "${ESVN_USER}" ]]; then
+ ${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+ else
+ ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+ fi
+ elif [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
einfo "subversion switch start -->"
einfo " old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}"
einfo " new repository: ${repo_uri}${revision:+@}${revision}"
@@ -314,6 +346,10 @@ subversion_fetch() {
fi
fi
+ if [[ -n "${ESVN_UMASK}" ]]; then
+ eumask_pop
+ fi
+
einfo " working copy: ${wc_path}"
if ! has "export" ${ESVN_RESTRICT}; then
@@ -438,7 +474,9 @@ subversion__svn_info() {
local target="${1}"
local key="${2}"
- env LC_ALL=C svn info "${target}" | grep -i "^${key}" | cut -d" " -f2-
+ env LC_ALL=C svn info \
+ ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" \
+ "${target}" | grep -i "^${key}" | cut -d" " -f2-
}
## -- subversion__get_repository_uri() --------------------------------------- #
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 73533faa18..e579697e67 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.514 2011/12/16 18:44:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.519 2012/03/02 05:56:29 vapier Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -9,7 +9,7 @@ HOMEPAGE="http://gcc.gnu.org/"
LICENSE="GPL-2 LGPL-2.1"
RESTRICT="strip" # cross-compilers need controlled stripping
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib fixheadtails prefix
+inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib fixheadtails pax-utils prefix
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test pkg_preinst src_install pkg_postinst pkg_prerm pkg_postrm
DESCRIPTION="Based on the ${ECLASS} eclass"
@@ -138,7 +138,7 @@ if in_iuse graphite ; then
RDEPEND+="
graphite? (
>=dev-libs/cloog-ppl-0.15.10
- >=dev-libs/ppl-0.10
+ >=dev-libs/ppl-0.11
)"
fi
@@ -1108,12 +1108,7 @@ gcc_do_configure() {
confgcc+=" $(use_with graphite cloog)"
if use graphite; then
confgcc+=" --disable-ppl-version-check"
- # this will be removed when cloog-ppl-0.15.10 goes stable
- if has_version '>=dev-libs/cloog-ppl-0.15.10'; then
- confgcc+=" --with-cloog-include=${EPREFIX}/usr/include/cloog-ppl"
- else
- confgcc+=" --with-cloog-include=${EPREFIX}/usr/include/cloog"
- fi
+ confgcc+=" --with-cloog-include=${EPREFIX}/usr/include/cloog-ppl"
fi
fi
@@ -1539,10 +1534,6 @@ toolchain_src_install() {
gcc_slot_java
- # Move <cxxabi.h> to compiler-specific directories
- [[ -f ${ED}${STDCXX_INCDIR}/cxxabi.h ]] && \
- mv -f "${ED}"${STDCXX_INCDIR}/cxxabi.h "${ED}"${LIBPATH}/include/
-
# These should be symlinks
dodir /usr/bin
cd "${ED}"${BINPATH}
@@ -1551,7 +1542,7 @@ toolchain_src_install() {
# this should take care of that
[[ -f ${x} ]] && mv ${x} ${CTARGET}-${x}
- if [[ -f ${CTARGET}-${x} ]] && ! is_crosscompile ; then
+ if [[ -f ${CTARGET}-${x} ]] ; then
ln -sf ${CTARGET}-${x} ${x}
# Create version-ed symlinks
@@ -1657,6 +1648,12 @@ toolchain_src_install() {
# Don't scan .gox files for executable stacks - false positives
export QA_EXECSTACK="usr/lib*/go/*/*.gox"
export QA_WX_LOAD="usr/lib*/go/*/*.gox"
+
+ # Disable RANDMMAP so PCH works. #301299
+ if tc_version_is_at_least 4.3 ; then
+ pax-mark -r "${ED}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1"
+ pax-mark -r "${ED}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus"
+ fi
}
gcc_slot_java() {
@@ -1847,11 +1844,18 @@ do_gcc_PIE_patches() {
EPATCH_MULTI_MSG="Applying default pie patches ..." \
epatch "${WORKDIR}"/piepatch/def
fi
- # we want to be able to control the pie patch logic via something other
- # than ALL_CFLAGS...
- sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \
- -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \
- -i "${S}"/gcc/Makefile.in
+
+ # we want to be able to control the pie patch logic via something other
+ # than ALL_CFLAGS...
+ sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \
+ -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \
+ -i "${S}"/gcc/Makefile.in
+ # Need to add HARD_CFLAGS to ALL_CXXFLAGS on >= 4.7
+ if tc_version_is_at_least 4.7.0 ; then
+ sed -e '/^ALL_CXXFLAGS/iHARD_CFLAGS = ' \
+ -e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |' \
+ -i "${S}"/gcc/Makefile.in
+ fi
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, pie-${PIE_VER}"
}
diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass
index 8e2ff4510a..a7fab7a17f 100644
--- a/eclass/webapp.eclass
+++ b/eclass/webapp.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.69 2011/07/27 07:50:39 lxnay Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.70 2011/12/27 17:55:12 fauli Exp $
# @ECLASS: webapp.eclass
# @MAINTAINER:
diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass
index de51b767a5..2fe22adc74 100644
--- a/eclass/wxwidgets.eclass
+++ b/eclass/wxwidgets.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.31 2011/07/17 19:58:39 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.32 2011/12/27 17:55:13 fauli Exp $
# @ECLASS: wxwidgets.eclass
# @MAINTAINER:
diff --git a/eclass/x-modular.eclass b/eclass/x-modular.eclass
index 42adc149f9..42ca9c6838 100644
--- a/eclass/x-modular.eclass
+++ b/eclass/x-modular.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.123 2011/11/22 18:42:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.124 2011/12/27 17:55:13 fauli Exp $
#
# @DEPRECATED
# This eclass has been superseded by xorg-2