summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/x-modular.eclass31
1 files changed, 29 insertions, 2 deletions
diff --git a/eclass/x-modular.eclass b/eclass/x-modular.eclass
index 340837db6c38..f639fc0968c3 100644
--- a/eclass/x-modular.eclass
+++ b/eclass/x-modular.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.40 2006/01/19 04:38:27 joshuabaergen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.41 2006/02/01 02:04:54 spyderous Exp $
#
# Author: Donnie Berkholz <spyderous@gentoo.org>
#
@@ -27,7 +27,7 @@
EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm
-inherit eutils libtool toolchain-funcs
+inherit eutils libtool toolchain-funcs flag-o-matic
# Directory prefix to use for everything
XDIR="/usr"
@@ -111,6 +111,23 @@ if [[ "${PN/#xf86-video}" != "${PN}" ]] || [[ "${PN/#xf86-input}" != "${PN}" ]];
http://dev.gentoo.org/~joshuabaergen/distfiles/x11-driver-patches-${XDPVER}.tar.bz2"
fi
+# Debugging -- ignore packages that can't be built with debugging
+if [[ -z "${FONT}" ]] \
+ || [[ "${PN/app-doc}" != "${PN}" ]] \
+ || [[ "${PN/x11-proto}" != "${PN}" ]] \
+ || [[ "${PN/util-macros}" != "${PN}" ]] \
+ || [[ "${PN/xbitmaps}" != "${PN}" ]] \
+ || [[ "${PN/xkbdata}" != "${PN}" ]] \
+ || [[ "${PN/xorg-cf-files}" != "${PN}" ]] \
+ || [[ "${PN/xcursor}" != "${PN}" ]] \
+ ; then
+ DEBUGGABLE="yes"
+ IUSE="${IUSE} debug"
+ if use debug; then
+ RESTRICT="${RESTRICT} nostrip"
+ fi
+fi
+
DEPEND="${DEPEND}
>=dev-util/pkgconfig-0.18"
@@ -224,8 +241,18 @@ x-modular_font_configure() {
fi
}
+x-modular_debug_setup() {
+ if [[ -n "${DEBUGGABLE}" ]]; then
+ if use debug; then
+ strip-flags
+ append-flags -ggdb
+ fi
+ fi
+}
+
x-modular_src_configure() {
x-modular_font_configure
+ x-modular_debug_setup
# If prefix isn't set here, .pc files cause problems
if [[ -x ./configure ]]; then