New section: Using Apache and PHP
- Document variables for use in Apache related ports - Document variables for use in PHP extensions, pecl and PHP using ports - Document how to write PEAR module ports and give an example Makefile Approved by: remko
This commit is contained in:
parent
576aa07fea
commit
cb75af1fd0
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=25148
1 changed files with 183 additions and 0 deletions
|
@ -4872,6 +4872,189 @@ USE_XLIB= yes</programlisting>
|
|||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="using-php">
|
||||
<title>Using Apache and PHP</title>
|
||||
|
||||
<sect2 id="using-apache">
|
||||
<title>Apache</title>
|
||||
|
||||
<table frame="none">
|
||||
<title>Variables for ports that use Apache</title>
|
||||
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>USE_APACHE</entry>
|
||||
|
||||
<entry>The port requires Apache.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>WITH_APACHE2</entry>
|
||||
|
||||
<entry>The port requires Apache 2.0. Without this variable,
|
||||
the port will depend on Apache 1.3.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>APXS</entry>
|
||||
|
||||
<entry>Full path to the <command>apxs</command> binary
|
||||
(read-only variable).</entry>
|
||||
</row>
|
||||
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="php-variables">
|
||||
<title>PHP</title>
|
||||
|
||||
<table frame="none">
|
||||
<title>Variables for ports that use PHP</title>
|
||||
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><makevar>USE_PHP</makevar></entry>
|
||||
|
||||
<entry>The port requires PHP. The value <literal>yes</literal>
|
||||
adds a dependency on PHP. The list of required PHP extensions
|
||||
can be specified instead. Example: <literal>pcre xml
|
||||
gettext</literal></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>DEFAULT_PHP_VER</makevar></entry>
|
||||
|
||||
<entry>Selects which major version of PHP will be installed as
|
||||
a dependency when no PHP is installed yet. Default is
|
||||
<literal>4</literal>. Possible values: <literal>4</literal>,
|
||||
<literal>5</literal></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>BROKEN_WITH_PHP</makevar></entry>
|
||||
|
||||
<entry>The port does not work with PHP of the given version.
|
||||
Possible values: <literal>4</literal>,
|
||||
<literal>5</literal></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>USE_PHPIZE</makevar></entry>
|
||||
|
||||
<entry>The port will be built as a PHP extension.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>USE_PHPEXT</makevar></entry>
|
||||
|
||||
<entry>The port will be treated as a PHP extension, including
|
||||
installation and registration in the extension registry.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>USE_PHP_BUILD</makevar></entry>
|
||||
|
||||
<entry>Set PHP as a build dependency.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>WANT_PHP_CLI</makevar></entry>
|
||||
|
||||
<entry>Want the CLI (command line) version of PHP.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>WANT_PHP_CGI</makevar></entry>
|
||||
|
||||
<entry>Want the CGI version of PHP.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>WANT_PHP_MOD</makevar></entry>
|
||||
|
||||
<entry>Want the Apache module version of PHP.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>WANT_PHP_SCR</makevar></entry>
|
||||
|
||||
<entry>Want the CLI or the CGI version of PHP.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>WANT_PHP_WEB</makevar></entry>
|
||||
|
||||
<entry>Want the Apache module or the CGI version of PHP.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><makevar>WANT_PHP_PEAR</makevar></entry>
|
||||
|
||||
<entry>Want the PEAR framework.</entry>
|
||||
</row>
|
||||
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>PEAR modules</title>
|
||||
|
||||
<para>Porting PEAR modules is a very simple process.</para>
|
||||
|
||||
<para>Use the variables <makevar>FILES</makevar>,
|
||||
<makevar>TESTS</makevar>, <makevar>DATA</makevar>,
|
||||
<makevar>SQLS</makevar>, <makevar>SCRIPTFILES</makevar>,
|
||||
<makevar>DOCS</makevar> and <makevar>EXAMPLES</makevar> to list the
|
||||
files you want to install. All listed files will be automatically
|
||||
installed into the appropriate locations and added to
|
||||
<filename>pkg-plist</filename>.</para>
|
||||
|
||||
<para>Include
|
||||
<filename>${PORTSDIR}/devel/pear-PEAR/Makefile.common</filename>
|
||||
on the last line of the <filename>Makefile</filename>.</para>
|
||||
|
||||
<example id="pear-makefile">
|
||||
<title>Example Makefile for PEAR class</title>
|
||||
<programlisting>PORTNAME= Date
|
||||
PORTVERSION= 1.4.3
|
||||
CATEGORIES= devel www pear
|
||||
|
||||
MAINTAINER= example@domain.com
|
||||
COMMENT= PEAR Date and Time Zone Classes
|
||||
|
||||
BUILD_DEPENDS= ${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR
|
||||
RUN_DEPENDS= ${BUILD_DEPENDS}
|
||||
|
||||
FILES= Date.php Date/Calc.php Date/Human.php Date/Span.php \
|
||||
Date/TimeZone.php
|
||||
TESTS= test_calc.php test_date_methods_span.php testunit.php \
|
||||
testunit_date.php testunit_date_span.php wknotest.txt \
|
||||
bug674.php bug727_1.php bug727_2.php bug727_3.php \
|
||||
bug727_4.php bug967.php weeksinmonth_4_monday.txt \
|
||||
weeksinmonth_4_sunday.txt weeksinmonth_rdm_monday.txt \
|
||||
weeksinmonth_rdm_sunday.txt
|
||||
DOCS= TODO
|
||||
_DOCSDIR= .
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.include "${PORTSDIR}/devel/pear-PEAR/Makefile.common"
|
||||
.include <bsd.port.post.mk></programlisting>
|
||||
|
||||
</example>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="using-python">
|
||||
<title>Using Python</title>
|
||||
|
||||
|
|
Loading…
Reference in a new issue