Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108323128
D14597.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D14597.diff
View Options
Index: head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/flavors/chapter.xml
@@ -262,6 +262,73 @@
<sect1 xml:id="flavors-auto">
<title>Flavors Auto-Activation</title>
+ <sect2 xml:id="flavors-auto-php">
+ <title><literal>USES=php</literal> and Flavors</title>
+
+ <para>When using <link linkend="uses-php">USES=php</link> with
+ one of these arguments, <literal>phpize</literal>,
+ <literal>ext</literal>, <literal>zend</literal>, or
+ <literal>pecl</literal>, the port will automatically have
+ <varname>FLAVORS</varname> filled in with the
+ <application>PHP</application> versions it supports.</para>
+
+ <note>
+ <para>All the examples assume the currently supported PHP
+ versions are 5.6, 7.0, 7.1, and 7.2.</para>
+ </note>
+
+ <example xml:id="flavors-auto-php-ex1">
+ <title>Simple <literal>USES=php</literal> Extension</title>
+
+ <para>This will generate package for all the supported
+ versions:</para>
+
+ <programlisting>PORTNAME= some-ext
+PORTVERSION= 0.0.1
+PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
+
+USES= php:ext</programlisting>
+
+ <para>This will generate package for all the supported
+ versions but 7.2:</para>
+
+ <programlisting>PORTNAME= some-ext
+PORTVERSION= 0.0.1
+PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
+
+USES= php:ext
+IGNORE_WITH_PHP= 72</programlisting>
+ </example>
+
+ <sect3 xml:id="flavors-auto-php-app">
+ <title>PHP Flavors with PHP Applications</title>
+
+ <para>PHP applications can also be flavorized.</para>
+
+ <para>This allows generating packages for all PHP versions, so
+ that users can use them with whatever version they need on
+ their servers.</para>
+
+ <important>
+ <para>PHP applications that are flavorized
+ <emphasis>must</emphasis> append
+ <varname>PHP_PKGNAMESUFFIX</varname> to their package
+ names.</para>
+ </important>
+
+ <example xml:id="flavors-auto-php-app-ex1">
+ <title>Flavorizing a PHP Application</title>
+
+ <para>Adding Flavors support to a PHP application is
+ straightforward:</para>
+
+ <programlisting>PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
+
+USES= php:flavors</programlisting>
+ </example>
+ </sect3>
+ </sect2>
+
<sect2 xml:id="flavors-auto-python">
<title><literal>USES=python</literal> and Flavors</title>
@@ -306,7 +373,7 @@
<programlisting>USES= python:-3.5
USE_PYTHON= distutils</programlisting>
- <para>Will get this flavor: <literal>py27</literal>.</para>
+ <para>Will get this flavor: <literal>py27</literal>.</para>
<programlisting>USES= python:-3.5
USE_PYTHON= distutils allflavors</programlisting>
Index: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
@@ -3631,6 +3631,28 @@
.include <bsd.port.mk></programlisting>
</example>
+ <tip>
+ <para><application>PEAR</application> modules will
+ automatically be flavorized using <link
+ linkend="flavors-auto-php"><application>PHP</application>
+ flavors</link>.</para>
+ </tip>
+
+ <note>
+ <para>If a non default <varname>PEAR_CHANNEL</varname> is
+ used, the build and run-time dependencies will automatically
+ be added.</para>
+ </note>
+
+ <important>
+ <para>PEAR modules do not need to defined
+ <varname>PKGNAMESUFFIX</varname> it is automatically filled
+ in using <varname>PEAR_PKGNAMEPREFIX</varname>. If a port
+ needs to add to <varname>PKGNAMEPREFIX</varname>, it must
+ also use <varname>PEAR_PKGNAMEPREFIX</varname> to
+ differentiate between different flavors.</para>
+ </important>
+
<sect3 xml:id="php-horde">
<title><application>Horde</application> Modules</title>
@@ -3677,6 +3699,14 @@
.include <bsd.port.mk></programlisting>
</example>
+
+ <tip>
+ <para>As <application>Horde</application> modules are also
+ <application>PEAR</application> modules they will also
+ automatically be flavorized using <link
+ linkend="flavors-auto-php"><application>PHP</application>
+ flavors</link>.</para>
+ </tip>
</sect3>
</sect2>
</sect1>
Index: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
@@ -2014,13 +2014,15 @@
<sect1 xml:id="uses-pear">
<title><literal>pear</literal></title>
- <para>Possible arguments: (none)</para>
+ <para>Possible arguments: <literal>env</literal></para>
<para>Adds a dependency on <package
role="port">devel/pear</package>. It will setup default
behavior for software using the <application>PHP</application>
- Extension and Application Repository. See <xref
- linkend="php-pear"/> for more information.</para>
+ Extension and Application Repository. Using the
+ <literal>env</literal> arguments only sets up the
+ <application>PEAR</application> environment variables. See
+ <xref linkend="php-pear"/> for more information.</para>
</sect1>
<sect1 xml:id="uses-perl5">
@@ -2082,7 +2084,8 @@
<literal>build</literal>, <literal>cli</literal>,
<literal>cgi</literal>, <literal>mod</literal>,
<literal>web</literal>, <literal>embed</literal>,
- <literal>pecl</literal></para>
+ <literal>pecl</literal>, <literal>flavors</literal>,
+ <literal>noflavors</literal></para>
<para>Provide support for <application>PHP</application>. Add a
runtime dependency on the default PHP version, <package
@@ -2093,7 +2096,7 @@
<term><literal>phpize</literal></term>
<listitem>
<para>Use to build a <application>PHP</application>
- extension.</para>
+ extension. Enables flavors.</para>
</listitem>
</varlistentry>
@@ -2101,7 +2104,8 @@
<term><literal>ext</literal></term>
<listitem>
<para>Use to build, install and register a
- <application>PHP</application> extension.</para>
+ <application>PHP</application> extension. Enables
+ flavors.</para>
</listitem>
</varlistentry>
@@ -2109,7 +2113,7 @@
<term><literal>zend</literal></term>
<listitem>
<para>Use to build, install and register a Zend
- extension.</para>
+ extension. Enables flavors.</para>
</listitem>
</varlistentry>
@@ -2167,9 +2171,30 @@
<listitem>
<para>Provide defaults for fetching
<application>PHP</application> extensions from the PECL
- repository.</para>
+ repository. Enables flavors.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><literal>flavors</literal></term>
+ <listitem>
+ <para>Enable automatic <link
+ linkend="flavors-auto-php"><application>PHP</application>
+ flavors</link> generation. Flavors will be generated
+ for all PHP versions, except the ones present in
+ <link linkend="uses-php-ignore"><varname>IGNORE_WITH_PHP</varname></link>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>noflavors</literal></term>
+ <listitem>
+ <para>Disable automatic <application>PHP</application>
+ flavors generation. <emphasis>Must only</emphasis> be
+ used with extensions provided by
+ <application>PHP</application> itself.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>Variables are used to specify which
@@ -2188,25 +2213,14 @@
</listitem>
</varlistentry>
- <varlistentry>
- <term><varname>DEFAULT_PHP_VER</varname></term>
- <listitem>
- <para>Selects which major version of
- <application>PHP</application> will be installed as a
- dependency when no <application>PHP</application> is
- installed yet. Default is <literal>56</literal>.
- Possible values: <literal>55</literal>,
- <literal>56</literal>, and <literal>70</literal>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
+ <varlistentry xml:id="uses-php-ignore">
<term><varname>IGNORE_WITH_PHP</varname></term>
<listitem>
<para>The port does not work with
- <application>PHP</application> of the given version.
- Possible values: <literal>55</literal>,
- <literal>56</literal>, and <literal>7</literal>.</para>
+ <application>PHP</application> of the given version. For
+ possible values look at the content of
+ <varname>_ALL_PHP_VERSIONS</varname> in
+ <filename>Mk/Uses/php.mk</filename>.</para>
</listitem>
</varlistentry>
</variablelist>
@@ -2261,6 +2275,51 @@
</listitem>
</varlistentry>
</variablelist>
+
+ <para>These variables are available to use in
+ <varname>PKGNAMEPREFIX</varname> or
+ <varname>PKGNAMESUFFIX</varname>:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><varname>PHP_PKGNAMEPREFIX</varname></term>
+ <listitem>
+ <para>Contains
+ <literal>php<replaceable>XY</replaceable>-</literal> where
+ <replaceable>XY</replaceable> is the current flavor's PHP
+ version. Use with PHP extensions and modules.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><varname>PHP_PKGNAMESUFFIX</varname></term>
+ <listitem>
+ <para>Contains
+ <literal>-php<replaceable>XY</replaceable></literal> where
+ <replaceable>XY</replaceable> is the current flavor's PHP
+ version. Use with PHP applications.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><varname>PECL_PKGNAMEPREFIX</varname></term>
+ <listitem>
+ <para>Contains
+ <literal>php<replaceable>XY</replaceable>-pecl-</literal>
+ where <replaceable>XY</replaceable> is the current
+ flavor's PHP version. Use with
+ <application>PECL</application> modules.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <important>
+ <para>With flavors, all PHP extensions, PECL extensions, PEAR
+ modules <emphasis>must have</emphasis> a different package
+ name, so they must all use one of these three variables in
+ their <varname>PKGNAMEPREFIX</varname> or
+ <varname>PKGNAMESUFFIX</varname>.</para>
+ </important>
</sect1>
<sect1 xml:id="uses-pkgconfig">
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 8:58 PM (20 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16103276
Default Alt Text
D14597.diff (10 KB)
Attached To
Mode
D14597: Document PHP Flavors.
Attached
Detach File
Event Timeline
Log In to Comment