Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379031 - =media-video/mplayer2-2.0[custom-cflags] does not respect CFLAGS
Summary: =media-video/mplayer2-2.0[custom-cflags] does not respect CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 365951
  Show dependency tree
 
Reported: 2011-08-13 11:04 UTC by Agostino Sarubbo
Modified: 2012-02-03 19:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2011-08-13 11:04:54 UTC
As per $summary, mplayer2[custom-cflags] does not respect CFLAGS. 
Small example from build.log:


x86_64-pc-linux-gnu-gcc -MD -MP -Wundef -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -std=gnu99  -O2 -march=x86-64 -mtune=generic -pipe -g3  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I.  -D_REENTRANT -I/usr/include/directfb -I/usr/include/     -D_REENTRANT   -I/usr/include -I/usr/include/freetype2 -I/usr/include/freetype2      -I/usr/include/bs2b     -I/usr/include -I/usr/include/libdvdread -c -o libao2/ao_mpegpes.o libao2/ao_mpegpes.c

Also -pipe -g3 should be dropped


amd64box ~ # emerge --info | grep CFLAGS
CFLAGS="-march=native -O2 -g0"
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-01-27 16:00:01 UTC
haha, this is funny.

custom-cflags is in IUSE but not actually used in the ebuild...

The mplayer-2.0 build log says this, even with -custom-cflags:
MPlayer compilation will use the CPPFLAGS/CFLAGS/LDFLAGS/YASMFLAGS set by you,
but:

Therefore, I suspect that custom-cflags USE flag does nothing and has done nothing in ALL mplayer2 ebuilds.

Options:
1) remove the USE flag
2) Fix mplayer2 ebuilds so that they do "CFLAGS= ./configure .." if the user doens't have +custom-cflags
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-01-27 16:12:26 UTC
Possible fix:

Index: mplayer2-2.0_p20111126.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-2.0_p20111126.ebuild,v
retrieving revision 1.3
diff -u -r1.3 mplayer2-2.0_p20111126.ebuild
--- mplayer2-2.0_p20111126.ebuild       2 Dec 2011 08:10:36 -0000       1.3
+++ mplayer2-2.0_p20111126.ebuild       27 Jan 2012 16:12:00 -0000
@@ -512,6 +512,11 @@
                "
        fi
 
+       # custom-cflags code:
+       if ! use custom-cflags; then
+               export CFLAGS= CPPFLAGS= LDFLAGS= YASMFLAGS=
+       fi
+
        ./configure \
                --cc=$(tc-getCC) \
                --host-cc=$(tc-getBUILD_CC) \
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-02-03 19:37:05 UTC
+  03 Feb 2012; Jeremy Olexa <darkside@gentoo.org>
+  mplayer2-2.0_p20111126.ebuild, mplayer2-9999.ebuild:
+  Remove 'custom-cflags' flag since it does nothing. bug 379031

Since there was no feedback from anyone, I asked Samuli for his best opinion and we agreed to this.