From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MScus-0000AP-Ro for garchives@archives.gentoo.org; Sun, 19 Jul 2009 20:23:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3F38CE01FC; Sun, 19 Jul 2009 20:23:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 21359E01FC for ; Sun, 19 Jul 2009 20:23:26 +0000 (UTC) Received: from [192.168.22.10] (ip68-4-152-120.oc.oc.cox.net [68.4.152.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 9F74A66F68 for ; Sun, 19 Jul 2009 20:23:25 +0000 (UTC) Message-ID: <4A638016.3040602@gentoo.org> Date: Sun, 19 Jul 2009 13:20:38 -0700 From: Zac Medico User-Agent: Thunderbird 2.0.0.22 (X11/20090605) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] "official way" for setting per package CFLAGS and FEATURES? References: <1247940945.2134.2.camel@localhost> In-Reply-To: <1247940945.2134.2.camel@localhost> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: c4ed81b8-1952-4313-bc59-c100c1041a3e X-Archives-Hash: fac717b026ba37b4396b448f1152153e Pacho Ramos wrote: > Hello, I would want to always merge xorg-server, libdrm, and intel > driver (that likes to crash a lot) to be always compiled with debugging > symbols and FEATURES="${FEATURES} splitdebug" > > Searching in google seems that there are some available hacks done by > some forums users, but they seem to be a bit old and, before trying > them, I would want to know if there is an "official" way of doing it. > > Thanks a lot :-) I use pre_pkg_setup hooks defined in /etc/portage/env. For example: cat /etc/portage/env/sys-libs/glibc pre_pkg_setup() { local x for x in installsources splitdebug ; do if ! has $x $FEATURES ; then elog "bashrc is adding $x to FEATURES for $PN" FEATURES="$FEATURES $x" fi done if ! hasq -ggdb $CFLAGS ; then elog "bashrc is adding \"-ggdb\" to CFLAGS for $PN" CFLAGS="$CFLAGS -ggdb" fi } -- Thanks, Zac