summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Armak <danarmak@gentoo.org>2002-07-26 15:34:50 +0000
committerDan Armak <danarmak@gentoo.org>2002-07-26 15:34:50 +0000
commit00126e9486cb032d074ffa33ac652a048ee97d48 (patch)
tree0df2d3151f2b70b46a6073411bd357f3bfeb038e /eclass/kde-functions.eclass
parentre-modified ebuild so localstatedir=/var/state/openldap to match with the ... (diff)
downloadhistorical-00126e9486cb032d074ffa33ac652a048ee97d48.tar.gz
historical-00126e9486cb032d074ffa33ac652a048ee97d48.tar.bz2
historical-00126e9486cb032d074ffa33ac652a048ee97d48.zip
new function: kde_remove_flag <subdir> <flag> - removes from Makefile in / from all lines containing the word CFLAGS or CXXFLAGS. used by kdebase and koffice to remove the problematic -fomit-frame-pointer from some directories' makefiles.
Diffstat (limited to 'eclass/kde-functions.eclass')
-rw-r--r--eclass/kde-functions.eclass21
1 files changed, 20 insertions, 1 deletions
diff --git a/eclass/kde-functions.eclass b/eclass/kde-functions.eclass
index 615f25a6b5aa..377a799693a1 100644
--- a/eclass/kde-functions.eclass
+++ b/eclass/kde-functions.eclass
@@ -1,7 +1,7 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Dan Armak <danarmak@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.18 2002/07/17 20:25:16 danarmak Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.19 2002/07/26 15:34:50 danarmak Exp $
# This contains everything except things that modify ebuild variables and functions (e.g. $P, src_compile() etc.)
ECLASS=kde-functions
INHERITED="$INHERITED $ECLASS"
@@ -322,3 +322,22 @@ kde_sandbox_patch() {
}
+
+# remove an optimization flag from a specific subdirectory's makefiles.
+# currently kdebase and koffice use it to compile certain subdirs without
+# -fomit-frame-pointer which breaks some things.
+# Parameters:
+# $1: subdirectory
+# $2: flag to remove
+kde_remove_flag() {
+
+ cd ${S}/${1} || die
+ [ -n "$2" ] || die
+
+ cp Makefile Makefile.orig
+ sed -e "/CFLAGS/ s/${2}//g
+/CXXFLAGS/ s/${2}//g" Makefile.orig > Makefile
+
+ cd $OLDPWD
+
+}