[geos-devel] Extraction of PHP extension into PECL-style package

J Smith dark.panda+lists at gmail.com
Mon Jan 25 15:24:00 PST 2016


Quick update on the PHP extraction folks...

I've pushed a first pass to
https://github.com/libgeos/php-geos/tree/phpize . This branch contains
the following:

- build files that work with the phpize command.

- PECL/PEAR-style packaging files.

- geos.c has been updated to use #ifdefs to work with GEOS features as
detected by configure. This allows a single PHP extension to handle
versions of GEOS from 3.3 right up to the current svn trunk. The tests
have likewise been modified to skip any features not found in the
current library version, although they haven't been re-written to
accommodate missing features used directly in testing, like
setRoundingPrecision and setTrim and the like. Those features could
perhaps be emulated for the sake of testing, but as it is, they are
currently not working. Note that 3.2 isn't working yet, as it relies
on some more recent features like GEOSBufferParams which would need to
be emulated or otherwise avoided altogether to compile. When I have
time I'll look into this. For ffi-geos, I basically emulated the
options hash interface if GEOSBufferParams didn't exist in the library
being used, so that could likely be done here.

- I noticed in the TODO file an entry for "Use the re-entrant C-API
interface" so I've switched over to that using PHP's thread safe
runtime manager. I haven't had an opportunity to test this out yet in
a multithreaded environment, just on the CLI, but the code runs and
the tests all pass for that particular target.

That's all for now. Cheers.


More information about the geos-devel mailing list