[geos-devel] Extraction of PHP extension into PECL-style package
J Smith
dark.panda+lists at gmail.com
Tue Jan 19 09:58:48 PST 2016
G'day geos-devel.
I'm working on a PHP project that requires the use of the GEOS PHP
extension. The GEOS PHP extension is rather tightly coupled with the
GEOS build system itself, and it makes it a bit cumbersome to use on
systems where there's already a GEOS package available but no separate
package for the PHP extension. This usually means you have to compile
a local version of GEOS and enable the PHP extension, or build a
custom system package, or whatever the case may be.
I've extracted the necessary files from the GEOS source distribution
and created a PECL-style standalone package for the library and was
wondering if it would be cool to publish this via PHP's PECL system.
It would be nice to be able to do a straight install of the GEOS PHP
extension via the normal PHP extension methods, and it might also be
nice to decouple the PHP extension from GEOS proper and allow it to be
modified and released without having to do a full GEOS release. This
could also lead to move rapid development of the PHP extension, as it
might lower the barrier to entry for enterprising PHP developers
knowing that they can install and work with the extension without
setting up an entire GEOS development environment. At the very least,
I could work towards keeping the PECL repository in sync with the
upstream GEOS repo, although some work would have to be done with some
library detection and config.h to ensure that various CAPI functions
are available to provide PHP features, but that's another matter.
I have pushed an initial version of the extension to Github at
https://github.com/dark-panda/php-geos-native for review. If given the
blessing, I can start the process of hopefully getting it included
into PECL, or at least leave it on Github so that it can be installed
via Pickle, which appears to be a Composer-like package manager for
native PHP extensions.
It's been a long time since I've done any PHP development and I'm
really just getting back to it now after a decade-long hiatus.
However, in that time, I've used GEOS extensively, and have written
ffi-geos, geos-extensions, and a handful of other GEOS-based libraries
for Ruby, so this isn't my first kick at the can when it comes to
managing GEOS language interface libraries.
Questions, comments, etc. welcomed.
Cheers
More information about the geos-devel
mailing list