Bug 221817 - >=gnome-extra/sensors-applet-2.2.1 needs to filter LDFLAG --as-needed when USE=nvidia is used
Bug#: 221817 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: gnome@gentoo.org Reported By: liquitsnake@gmx.net
Component: Applications
URL:  https://sourceforge.net/tracker2/?func=detail&aid=2672290&group_id=128538&atid=711980
Summary: >=gnome-extra/sensors-applet-2.2.1 needs to filter LDFLAG --as-needed when USE=nvidia is used
Keywords:  NeedPatch
Status Whiteboard: 
Opened: 2008-05-12 11:48 0000
Description:   Opened: 2008-05-12 11:48 0000
Using the LDFLAG --as-needed breaks compatibility with nvidia cards for this
sensor reading program (its configure script to be more precise). This is only
relevant when USE=nvidia is used.

Using this LDFLAG results in:
checking for XNVCTRLQueryExtension in -lXNVCtrl... no
although it's there. Without you get:
checking for XNVCTRLQueryExtension in -lXNVCtrl... yes

Simply filtering the LDFLAG will do the job. I don't possess enough knowledge
to determine if bug 207543 is related in any kind of way.

------- Comment #1 From Daniel Gryniewicz 2008-05-17 03:11:22 0000 -------
Fixed, thanks.

------- Comment #2 From Rémi Cardona 2008-05-17 18:10:02 0000 -------
Closing, then :)

------- Comment #3 From Diego E. 'Flameeyes' Pettenò 2008-11-16 16:36:05 0000 -------
No this is NOT FIXED since it's just worked around in the tree.

------- Comment #4 From Gilles Dartiguelongue 2009-01-31 12:04:40 0000 -------
Created an attachment (id=180397) [details]
sensors-applet-2.2.1-nvidia-check.patch

could you try this patch ?

------- Comment #5 From Gilles Dartiguelongue 2009-01-31 12:05:50 0000 -------
Created an attachment (id=180399) [details]
sensors-applet-2.2.1.ebuild.patch

here is the ebuild patch. Since nvidia is proprietary crap, I don't want to
impose eautoreconf on all users.

------- Comment #6 From Gilles Dartiguelongue 2009-02-22 18:12:23 0000 -------
hey there, I really need this patch tested before I start to revert the fix in
tree blindly and you complaining things broke again.

------- Comment #7 From haarp 2009-02-23 11:55:37 0000 -------
Oh, I'm sorry. I completely forgot about this bug :(

Yes, I've tested the patches. The ebuild fails though. It tries to apply the
patch before the sources are unpacked.

------- Comment #8 From Gilles Dartiguelongue 2009-02-23 12:18:10 0000 -------
d'oh, my bad, could you put those lines in a src_unpack (and make sure to
remove the append-ldflags line) ?

------- Comment #9 From haarp 2009-02-23 12:33:32 0000 -------
I'm sorry I couldn't figure this out, but in src_unpack emerge says "Unpacking
Sources" and then proceeds to try to patch. So we still have no sources to base
the patch on :(

And what do you mean by remove append-ldflags? The ebuild-patch already did
this :)

------- Comment #10 From Gilles Dartiguelongue 2009-02-28 11:21:44 0000 -------
Created an attachment (id=183465) [details]
sensors-applet-2.2.1.ebuild.patch

here is the updated ebuild patch, sorry for delay.

------- Comment #11 From Gilles Dartiguelongue 2009-02-28 11:23:00 0000 -------
oops, you want to stick EAPI="2" before the inherit line too.

------- Comment #12 From haarp 2009-02-28 13:18:56 0000 -------
Created an attachment (id=183469) [details]
compilation output

Ah, it was src_prepare. Should've tried that aswell :[

Well, okay. Both hunks in the patch fail for some reason, although I don't see
why. So I patched by hand. 
Compilation fails tho (see attachment)

------- Comment #13 From Gilles Dartiguelongue 2009-02-28 13:37:33 0000 -------
then that would be bug #207543.

Thanks for testing, I'll include that to the tree as soon as possible (with a
fix for the other bug if possible).

------- Comment #14 From Gilles Dartiguelongue 2009-03-08 11:33:06 0000 -------
2.2.2 in tree with this fix. Thanks for testing. Please reopen if it's still an
issue for you.