[MacPorts] #19091: php5: refactor variants into separate ports

MacPorts noreply at macports.org
Tue Mar 31 05:21:55 PDT 2009


#19091: php5: refactor variants into separate ports
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  ryandesign@…           
     Type:  enhancement              |      Status:  new                    
 Priority:  Normal                   |   Milestone:  Port Enhancements      
Component:  ports                    |     Version:  1.7.0                  
 Keywords:                           |        Port:  php5, php5-devel       
-------------------------------------+--------------------------------------
 There are too many variants in the php5 port and I want to eliminate most
 if not all of them by breaking them out into separate ports.

 Variants are inconvenient because if you want to add one you have to
 rebuild the whole port, which for php5 takes some time. Also, ports can't
 depend on variants of other ports (#126). Also, once we start building and
 distributing binaries of ports, each additional available variant
 increases exponentially the number of combinations that would need to be
 built. If we instruct the build server only to build a few common variant
 combinations, then users of other variants would miss out on the benefits
 of using binaries.

 The php5 port has two kinds of variants: SAPI variants and extension
 variants. The SAPIs are cli (always on), fastcgi (+fastcgi variant;
 becomes always on in php 5.3.0), and apache (which should, considering
 #14001 and #17678, be available in flavors for Apple Apache 1 (Mac OS X <
 10.5), MacPorts Apache 1 (apache port), Apple Apache 2 (Mac OS X >= 10.5),
 MacPorts Apache 2 (apache2 port), and MacPorts Apache 2.0 (apache20 port).
 The extension variants enable specific PHP functionality such as access to
 databases, graphics libraries, etc. We should begin by moving the
 extension variants to separate ports, so that once we start breaking the
 SAPIs into their own ports, they won't have to duplicate all the extension
 variants.

 Precedent: FreeBSD has separate ports for separate php5 extensions. Their
 system seems to be based on Makefiles and their php5 extension ports just
 include a master php5 extension Makefile
 ([http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/php5/Makefile.ext
 Makefile.ext]); for MacPorts, this should be a portgroup. And all the
 special-case code for the various extensions in their Makefile.ext would
 be overrides in the individual extension portfiles for us.

 Some more info on compiling php extensions as dynamic libraries instead of
 statically building it into the php binaries is [http://jehiah.cz/archive
 /compiling-shared-php-modules here]. Note the comment from Nico about
 using "`make build-modules`" instead of just "`make`" to make the build go
 more quickly.

 We'll also need to compile php to load extra .ini files from an additional
 directory, like ${prefix}/etc/php.d, where each php extension port can put
 a pre-written .ini file which enables that module. I believe this is the
 "`--with-config-file-scan-dir`" configure option.

-- 
Ticket URL: <http://trac.macports.org/ticket/19091>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list