Gentoo Archives: gentoo-dev

From: Paul <set@×××××.com>
To: Evan Read <eread@×××××××××.org>
Cc: gentoo-dev@g.o
Subject: [gentoo-dev] Re: Feedback on new ebuilds
Date: Sun, 06 Oct 2002 21:13:40
Message-Id: 20021007021320.GB4764@squish.home.loc
In Reply to: Re: [gentoo-dev] Feedback on new ebuilds by Evan Read
1 Evan Read <eread@×××××××××.org>, on Mon Oct 07, 2002 [08:06:52 AM] said:
2 > On Sun, 2002-10-06 at 15:57, Mike Frysinger wrote:
3 > > > Bogofilter is ok except upstream (the venerable ESR) hasn't used a
4 > > > configure script so the make process doesn't use custom CFLAGS unless
5 > > > they are overridden. I can manually override them, but can anyone
6 > > > suggest how I can get the settings from make.conf into the ebuild?
7 > > one common way is to do a `sed` on it ...
8 > > cp Makefile Makefile.orig
9 > > sed -e "s:TEXT TO FIND:TEXT TO REPLACE WITH:" Makefile.orig > Makefile
10 > > make
11 >
12 > I would need to grep the make.conf for the appropriate line, wouldn't I?
13 > I haven't figured that CFLAGS is an environment variable anyware.
14 >
15 > I can match the right line with grep, but I haven't figured out how to
16 > store the match in another var I could then use thus:
17 >
18 > # cat /etc/make.conf | grep ^CFLAGS=
19 > result of grep or something stored in $1 <- Perl Like ;)
20 > # make $1 <- which will override the CFLAGS in the makefile
21 >
22 > Suggestions? I thought this to be the easiest way. I could redirect
23 > grep to a file, but would rather keep it in memory.
24 >
25
26 Hi;
27
28 If you have a problem with making an ebuild, most times,
29 it has been encountered and solved in an existing ebuild. One
30 way to find them is with rgrep, or something like:
31
32 find /usr/portage -name "*.ebuild" -exec grep -i REGEXP {} /dev/null \;
33
34 Where, in your case 'CFLAGS' might be a good REGEXP
35 string. I believe make.conf is basicly a collection of env
36 variables, which are available to an ebuild. eg. ${CFLAGS} and
37 ${CXXFLAGS} are set for you.
38 Other peoples ebuilds often make interesting reading.
39 Good luck!
40
41 Paul
42 set@×××××.com

Replies

Subject Author
Re: [gentoo-dev] Re: Feedback on new ebuilds Evan Read <eread@×××××××××.org>