The ebuild for fox-1.2.6-r2 ignores the CXXFLAGS from make.conf: For example, my CFLAGS and CXXFLAGS are:
CFLAGS="-mcpu=ultrasparc -O2 -mtune=ultrasparc -pipe"
but the build for fox compiles like this:
c++ -DPACKAGE=\"fox\" -DVERSION=\"1.2.6\" -DHAVE_DLFCN_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SELECT_H=1 -DWORDS_BIGENDIAN=1 -DHAVE_PNG_H=1 -DHAVE_TIFF_H=1 -DHAVE_ZLIB_H=1 -DHAVE_BZLIB_H=1 -DHAVE_VSSCANF=1 -DHAVE_LIBDL=1 -I. -I. -I../include -I../include -I/usr/include/freetype2 -I/usr/include -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include -DHAVE_XFT_H=1 -DHAVE_XSHM_H=1 -D_GNU_SOURCE -DHAVE_JPEG_H=1 -DHAVE_PNG_H=1 -DHAVE_TIFF_H=1 -DHAVE_ZLIB_H=1 -DHAVE_BZ2LIB_H=1 -DHAVE_XCURSOR_H=1 -Wall -W -Wmissing-prototypes -Woverloaded-virtual -Wformat -DHAVE_GL_H=1 -DSUN_OGL_NO_VERTEX_MACROS -DHPOGL_SUPPRESS_FAST_API -DHAVE_GLU_H=1 -c FXColorWheel.cpp -o FXColorWheel.o >/dev/null 2>&1
So, for example, I am saying compile for an ultrasparc at -O2, but fox is actually compiling at -O0 for
'-mcpu=v7' (e.g., a sparc station 2).
On sparc, at least, this results in huge libraries with dreadful performance.
Certainly, the resulting fox widget set is not close to production quality (on a sparc system).
Please see: http://bugs.gentoo.org/show_bug.cgi?id=59506
for a discussion.
Created attachment 54685 [details, diff]
Add a patchfile and modify ebuild to use it: Use our CXXFLAGS instead of fox's.
This patch (1) creates a patch file for configure.in to force it to use our
CXXFLAGS instead of
fox's idea of what CXXFLAGS should be;
(2) modifies fox-1.2.6-r2.ebuild to apply the patch and to do necessary
(3) Add -DNDEBUG to CXXFLAGS unless USE=debug.
USE: In /usr/portage/x11-libs/fox: patch -p0 -z- -b < fox-1.2.6.patch
It's not pretty, but it works on sparc, at least, and resulting version of fox
appears to work fine.
There must be better solutions, but this timy change shows what the problem is
and one way to fix it.
(Without the libtoolize line, the build fails with a version mismatch.)
Notice also that just adding '--enable-release' to the configure flags will not
work, because the CXXFLAGS fox chooses
in that case are architecture-specific (and not sparc-appropriate).)
I note in passing that Yaakov S's improvements at Bug 88924 take care of this. So from my point of view, it is no linger an issue.
Yakoov's ebuilds have been committed and masked.