php5 port
Ryan Schmidt
ryandesign at macports.org
Mon Nov 24 01:13:58 PST 2008
On Nov 23, 2008, at 15:52, Scott Haneda wrote:
> On Nov 21, 2008, at 8:47 PM, Ryan Schmidt wrote:
>
>> What other options do you need? Possibly we can add variants for
>> them. I assume you've already checked the available variants?
>> ("port variants php5")
>
> I posted a list in my first email.
Ok, I'll look back at that; see below.
> Regardless, just so I get the methodology, lets say that I needed
> some obscure php configure option. What is the process for getting
> it in? Do I create a variant, and that essentially just instructs
> the php port to append the new configure lien to the current php
> configure line? This then allows me to make php easily into
> whatever I want?
Variants can do whatever you want, but a simple variant would
typically add a configure option for a new feature and add a
dependency on whatever library provides that feature. For example the
gmp variant adds a dependency on the gmp port and adds the --with-gmp
configure argument. For features that don't require additional
dependencies, we generally add it in to the standard configuration;
no use in making someone wade through tons of variants when we could
just build it in by default. I say this carefully, though, since the
php5 port already has more variants than most others, which means I
may not be doing as good a job as I could in keeping it simple.
> For example, not that I would want to do this, but say I wanted to
> use ports to install php with --disable-short-tags, how do you make
> that happen?
That specific option would not be useful, since you can put
"short_open_tag = Off" in your php.ini.
But you can look at the portfile yourself to see how the existing
variants work. Commands like "port cat php5" and "port edit php5" and
"port file php5" should help.
> I am a small ISP, I have a good deal of friends from other mail
> lists that are as well, and we all more or less have the same needs
> of php, as our clients have dictated what tools they need in php.
> We want a minimum case, that meets those needs. All I am trying to
> do, is get a few more little features in php to make it work in a
> large scale shared hosting environment.
>
> The current php is great, and I have used it for local dev, but I
> have a feeling there are some forums, and bug trackers, and other
> tools, that need some strange thing in php, that the current port
> does not have.
I'll be happy to consider adding things to the port, either as
variants or in the default configuration. As you'll see below, most
of the options you want are already in the portfile. For the few that
aren't, could you provide a code sample that should work but doesn't
(for example, using a function that does not exist without the
particular configure option) and file a ticket for each feature?
Looking at your list of configure options from your first email:
On Nov 21, 2008, at 18:51, Scott Haneda wrote:
> Here is the configure line we are going to try to get working, I
> did a quick comparison, and there are not that many missing, and
> the ports version has a few more as well.
> ( x'ing off the ones that are available now )
>
> ./configure
> --with-apxs
Use the apache or apache2 variant, as desired. Not this is currently
weird: the apache variant uses Apple Apache 1 on Mac OS X Tiger or
earlier, or MacPorts Apache 1 on non-Mac OSes. The apache2 variant
uses MacPorts Apache 2. There is no way to get it to use Apple Apache
2 on Mac OS X Leopard or later.
The plan is to change this so the apache variant uses MacPorts Apache
1 and the apache2 variant continues to use MacPorts Apache 2. New
variants will be added to allow the use of Apple Apache 1 or 2,
called apache_apple and apache2_apple:
http://trac.macports.org/ticket/14001
> x --with-openssl=/sw
> x --enable-trans-sid
> x --with-zlib
> x --with-png-dir=/sw
> x --with-jpeg-dir=/sw
> x --with-freetype-dir=/sw/lib/freetype219
Agreed; already there.
> --with-tiff-dir=/sw
php5 already declares a dependency on the tiff port but I see we do
not use the --with-tiff-dir argument. But that argument is also not
listed in ./configure --help. What php/tiff functionality are you
trying to use? A specific php function that's not available?
> x --enable-exif
> x --with-gd=/sw
Already there.
> --enable-gd-imgstrttf
> x --enable-gd-native-ttf
>
Looks like --enable-gd-imgstrttf was renamed to --enable-gd-native-
ttf some time in 2001:
http://bugs.php.net/bug.php?id=9506
> x --enable-mbstring=all
We use --enable-mbstring; the manual says this is enough to get all
supported encodings, as of php 4.3.4:
http://www.php.net/manual/en/mbstring.installation.php
> --enable-mbregex
./configure --help and the above manual page both show the option --
disable-mbregex, leading me to believe it should be enabled by
default. Or do you have a code sample showing it not working?
> x --with-mysql=/usr
> --with-mysqli=/usr/bin/mysql_config
MySQL is available in several versions. Choose the mysql3, mysql4 or
mysql5 variants. Or if you want to try the new mysqlnd driver which
will be in php 5.3, use the php5-devel port and the mysqlnd variant.
The mysql5 variant includes mysqli support; the others do not. I
believe the plan is for mysqlnd to support mysqli soon too.
> x --with-iconv=/sw
Yes, we have this.
> --with-pdflib=/sw
I agree we don't have this right now.
> x --enable-ftp
> x --with-curl=/sw
Yes, we have these.
> --enable-sockets
Use the sockets variant. Note that this feature will disappear from
the php core as of 5.3.0 and will be a pecl extension instead.
> x --enable-calendar
Yes, we have this.
> --enable-tokenizer
This is the default since php 4.3.0:
http://www.php.net/manual/en/tokenizer.installation.php
> x --enable-bcmath
Yes, we have this.
> --with-gmp=/sw
Use the gmp variant.
> x --with-mcrypt=/sw
> x --with-gettext=/sw
Yes, we have these.
> --enable-xslt
> --with-xslt-sablot=/usr/local
We declare a dependency on libxslt but we do not add a configure
option for it. I don't see either of these options listed in ./
configure --help. But I do see them mentioned here:
http://www.php.net/manual/en/xslt.installation.php
I thought php5 had sexy new xml functions which made using Sablotron
unnecessary.
The php4 port does use Sablotron, but there is a configuration
problem that has not yet been resolved:
http://trac.macports.org/ticket/14795
If indeed it is possible and useful to add Sablotron support to php5,
it's possible it might suffer from the same problem, so we would need
a solution to that.
> x --with-xml
> --with-expat-dir=/sw
> x --enable-wddx
> x --with-xmlrpc
Yes, we have these four.
> --with-dom=/sw
> --with-dom-xslt=/sw
I don't see that in ./configure --help. I see --disable-dom, which
implies dom support is enabled by default, and that's confirmed by
the manual:
http://www.php.net/manual/en/dom.installation.php
> --with-ldap=/usr
This is already in the portfile, when installed on Mac OS X.
> --with-imap-ssl=/sw
> --with-imap=/sw/share/c-client
That's the ssl variant.
> x --with-mhash=/sw
> x --enable-soap
Yes, we have these.
Some of the above-listed options that are in the portfile in fact
need to be removed since they're no longer recognized. I'm waiting on
this until I can confirm what happened specifically to each feature:
http://trac.macports.org/ticket/14859
More information about the macports-users
mailing list