The ebuild builds just fine after some minor adjustements to the ebuild itself, the php-ext-source-r2 eclass, some upstream patch and local shared memory adjustements. ;) Te It seems to be that shared mutexes aren't supported on FreeBSD/OS X. The ebuild will build fine but will crash the PHP process as soon as a php page is requested. To fix this, the upstream patch ([1]) from [2] needs to be added. Moreover, even with that patch, apc crashes the PHP process at startup because it can't allocate its shared memory segments at the default size of 32Mb ([3]). This is due to an OS X limitation: The default shared memory settings are way to conservative. Thus the user would need to tweak those to be able to use apc by setting saner values in /etc/sysctl.conf, e.g the 512MB settings config from [4]. This (needed change") could be communicated to the user via an elog message or a news item. But I think that it may be easier to add the "mmap" USE-flag to the ~x86/~x64-macos profile (${EPREFIX}/usr/portage/profiles/prefix/darwin/macos/10.6/package.use) to circumvent that problem. And because of the not working mutexes, the default lock should be changed from "lock_pthreadmutex" to "lock_pthreadrw" as well (as everything performs better than the - fixed by the patch - file fallback [5]). ;) [1] http://news.php.net/php.pecl.cvs/15669 [2] https://bugs.php.net/bug.php?id=59750 [3] http://php.net/manual/en/apc.configuration.php [4] http://techjournal.318.com/mac-os-x-server/shared-memory-settings-explain/ [5] http://www.scribd.com/doc/88689/ApcFacebook
Created attachment 290649 [details] eprefixified pecl-apc-3.1.9-r2.ebuild
Created attachment 290651 [details, diff] ebuild diff
Created attachment 290653 [details, diff] prefix patch for fixing apc_lock.h not choosing the right fallback This patch [1] comes from upstream [2]. [1] http://news.php.net/php.pecl.cvs/15669 [2] https://bugs.php.net/bug.php?id=59750
Created attachment 290655 [details] eprefixified php-ext-source-v2.eclass This eclass was already submitted with #358987
Created attachment 290657 [details, diff] php-ext-source-r2.eclass diff
was removed