Created attachment 266101 [details] mod_xsendfile-0.9.ebuild Emerges and runs just fine on ~x64-macos. The ebuild is mostly untouched except for the pkg_postinst function. I don't know if that's the right place to modify the conf file, so please correct me if I'm wrong. The apache-module.eclass needed some love as well, but only a minor change as you will see in the subsequent diff.
Created attachment 266103 [details, diff] apache-module.eclass diff
there is actually a get_modname function in multilib.eclass that you probably can use to do an unconditional sed
This has been added years ago, so closing.