Bug 79655 - Patch for mail-client/mailx-8.1.2.20040524 to use CFLAGS
Bug#: 79655 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: net-mail@gentoo.org Reported By: sbriesen@gentoo.org
Component: Ebuilds
URL: 
Summary: Patch for mail-client/mailx-8.1.2.20040524 to use CFLAGS
Keywords:  
Status Whiteboard: 
Opened: 2005-01-26 17:15 0000
Description:   Opened: 2005-01-26 17:15 0000
litte patch to enforce using CFLAGS from /etc/make.conf and not just -O2.


Reproducible: Always
Steps to Reproduce:

------- Comment #1 From Stefan Briesenick 2005-01-26 17:16:31 0000 -------
Created an attachment (id=49622) [details]
mailx-8.1.2.20040524.ebuild.diff

------- Comment #2 From Fernando J. Pereda (RETIRED) 2005-01-27 00:02:01 0000 -------
Instead of using sed (thus adding it as a dependancy) I've patched the
Makefile. To add EXTRAFLAGS that will override prior defined flags.

Cheers,
Ferdy

------- Comment #3 From Stefan Briesenick 2005-01-27 12:35:56 0000 -------
'sed' is part of the coreutils. So your computer won't run w/o it. ;-)

using 'sed' is sexy for very small patches, because normally you don't have a version dependency. With your patch-file, you have to re-create a patch every time a new version arrives.

But nonetheless, important is that CFLAGS is used now!

------- Comment #4 From Stefan Briesenick 2005-01-27 12:40:42 0000 -------
You should also remove the "-O2", because now you have 

gcc -D_BSD_SOURCE -DDEBIAN -g -Wall -IEXT <your CFLAGS> -O2 [..]

So just put the $(EXTRAFLAGS) to the place where the -O2 is and you're doing the same as my 'sed'-patch.

------- Comment #5 From Stefan Briesenick 2005-01-27 12:45:10 0000 -------
Created an attachment (id=49685) [details]
mailx-2004-cflags.diff

corrected CFLAGS-patch. Just replace the old one.

------- Comment #6 From Fernando J. Pereda (RETIRED) 2005-01-27 13:44:39 0000 -------
Fixed in CVS, I haven't bumped the ebuild anyway. I don't think It worths it.

BTW, sorry for changing to the patch and then reverting back to sed...

Cheers,
Ferdy

------- Comment #7 From Stefan Briesenick 2005-01-28 12:57:13 0000 -------
well, it's me again ;)

you did this:

  sed -i -e "s: -O2: ${CFLAGS}:g" Makefile
[..]
  make EXTRAFLAGS="${CFLAGS}"


well, either you remove the "EXTRAFLAGS" stuff, or -BETTER- do this:

  sed -i -e "s: -O2: \$(EXTRAFLAGS):g" Makefile
[..]
  make EXTRAFLAGS="${CFLAGS}"


I don't reopen the bug again. But it would be nice, if you would (silently) fix this. No revision bump needed.

------- Comment #8 From Fernando J. Pereda (RETIRED) 2005-01-28 13:14:36 0000 -------
You're damn right. Sorry again I don't know what I was thinking on... commited
to CVS.

Cheers,
Ferdy