libmemcached-1.0.18.ebuild converts use flags to configure parameters like this: econf \ $(use_enable debug debug) \ ... which converts to ./configure --enable-debug/--disable-debug ... libmemcached compiles with debug in both cases. The only way to disable debug is not to pass --enable/--disable parameter, because it is disabled by deafult. File ./configure (line 16066): if test "${enable_debug:+set}" = set; then : enableval=$enable_debug; ax_enable_debug=yes ...
That's a well-known problem with AC_ARG_ENABLE. It's nothing the ebuild is to blame for (but could work around).
(In reply to Jeroen Roovers from comment #1) > That's a well-known problem with AC_ARG_ENABLE. It's nothing the ebuild is > to blame for (but could work around). The big problem is, that when I compile libmemcached and include it to my project, I get TONS of debug logs in my php-fpm.log, which are turned on (as I investigated) at compile time and can't be turned on/off otherwise. These logs make php-fpm unreadable and waste much space on disk. So, I believe, in this case it is a serious bug. I think it's the same with the other use flags, so libmemcached everytime compiles with all options enabled without letting a user to know about it.
>make php-fpm unreadable make php-fpm.log
Created attachment 389794 [details, diff] libmemcached-1.0.18-fix_debug_flag.patch This patch will make configure obey the debug flag. Since I don't feel like navigating upstream's repo (why don't they use github??), someone else can push my patch upstream.
fixed in 1.0.18-r1 and reported upstream