Package sys-libs/timezone-data provides /usr/sbin/zdump, which shows when daylight saving time starts and ends in different timezones. On Gentoo, zdump ignores the installed zoneinfo files because the upstream build system makes it difficult to reset TZDIR properly, so zdump uses the upstream default for the zoneinfo directory, rather than the value used in Gentoo. Proposed fix at the end. Analysis follows. If TZDIR is unset during compilation, then tzfile.h will set a default: #define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ This default is wrong for Gentoo, and should be overridden by a preprocessor argument of -DTZDIR="$(TZDIR)", which would use the value from the Makefile. Gentoo patches the Makefile to have the correct value, but this patch is ineffective. Upstream passes -DTZDIR="$(TZDIR)" through overriding CC: cc= cc CC= $(cc) -DTZDIR=\"$(TZDIR)\" Gentoo includes a patch to change this: -cc= cc -CC= $(cc) -DTZDIR=\"$(TZDIR)\" +CC+= -DTZDIR=\"$(TZDIR)\" +ifeq ($(NLS),1) +CC+= -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\" +endif Unfortunately, Gentoo also sets CC="$(tc-getCC)" on the make command line. According to the GNU make documentation, and confirmed by reading the build logs, if a variable is set on the command line, *all* attempts to modify it in the Makefile (other than those which use the override keyword) are ignored. Thus, the Gentoo patch could omit the CC+= lines and the effect would be the same. I propose changing the ebuild to define cc="$(tc-getCC)" instead of CC="$(tc-getCC)", then changing the patch to leave the definition of CC and only add the NLS-related lines, resulting in: CC= $(cc) -DTZDIR=\"$(TZDIR)\" ifeq ($(NLS),1) CC+= -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\" endif
*** This bug has been marked as a duplicate of bug 526790 ***