[ 
https://issues.apache.org/jira/browse/THRIFT-854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899120#action_12899120
 ] 

Anthony Molinaro commented on THRIFT-854:
-----------------------------------------

phpize simply generates the autoconf items necessary for properly compiling 
php, the artifacts generated are those that bootstrap normally generates.  In 
fact if you look at the patch you'll see I invoke this in configure.ac via 
AC_CONFIG_SUBDIRS.  I'm not exactly sure how you would go about putting this 
into make, I guess you could call phpize, but it will then require people have 
autoconf/automake, etc.  Where with this solution only the packager requires 
autoconf/automake and phpize.  I guess alternatively I could tear apart phpize 
(its just a bash script which invokes autoconf and autoheader), and try to 
figure out how to reproduce its macros and integrate them into the main 
configure.ac, but that seem fraught with peril.

I've tested this on MacOSX Snow Leopard (which has phpize installed in the base 
os) and CentOS 5 (which has phpize in php-devel) and both do the right thing.

The only problem is while I build debs and rpms I don't actually touch a .spec 
or .deb file (I use an autotools wrapper called framewerk which takes care of 
those details, but it assumes autotools packages, thus the patches).  Also, I 
do think this is more useful to the end user as they can simply download, 
configure, make and install and have the extension even when they aren't 
working with rpms (for instance I can use this patch on my Mac to get the php 
extension).

It's definitely possible to create a spec file and put these things in contrib, 
but I'm unlikely to get to it soon, so not unwilling, but not likely to get to 
it soon.

> Provide configure option and make rules to build/install php extension
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-854
>                 URL: https://issues.apache.org/jira/browse/THRIFT-854
>             Project: Thrift
>          Issue Type: Improvement
>    Affects Versions: 0.5
>            Reporter: Anthony Molinaro
>         Attachments: php-ext.patch, thrift_protocol.ini
>
>
> I like to build and install the php extension at the same time I build the 
> php and other thrift artifacts.  The attached path adds the necessary logic 
> to build and install the extension to work on redhat/centos/fedora machines.
> configure has a new option --with-php_extension=yes which will enable the 
> compilation/installation of the extension, along with an environment variable 
> PHP_CONFIG_PREFIX which controls where the .ini file for enabling the 
> extension is installed.  The one requirement for this to work is the person 
> creating builds must have phpize installed (this prepares the autoconf 
> artifacts to be appropriately added to the distribution).  On 
> Centos/Redhat/Fedora this is in the php-devel package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to