Page MenuHomeFreeBSD

D19239.id59576.diff
No OneTemporary

D19239.id59576.diff

Index: en_US.ISO8859-1/books/porters-handbook/porting-dads/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/porting-dads/chapter.xml
+++ en_US.ISO8859-1/books/porters-handbook/porting-dads/chapter.xml
@@ -520,6 +520,19 @@
<sect1 xml:id="dads-arch">
<title>Architectural Considerations</title>
+ <para>Some ports are affected by features particular to one
+ or more of &os;'s supported architectures (as defined by
+ <literal>TARGETS</literal> in
+ <link xlink:href="https://svnweb.freebsd.org/base/head/Makefile">base/head/Makefile</link>).
+ This value is presented to ports <literal>Makefile</literal>s
+ as <literal>ARCH</literal>.</para>
+
+ <note>
+ <para>To see the complete list, run <command>make targets</command>.
+ The values to test <literal>ARCH</literal> against are the values
+ on the right-hand side of the <literal>/</literal>.</para>
+ </note>
+
<sect2 xml:id="dads-arch-neutral">
<title>Marking a Port as Architecture Neutral</title>
@@ -529,10 +542,26 @@
</sect2>
<sect2 xml:id="dads-arch-ignore">
- <title>Marking a Port as Ignored Only On Certain Architectures</title>
+ <title>Marking a Port as Broken/Ignored On An Architecture</title>
+ <para>To mark a port as <literal>BROKEN</literal> or
+ <literal>IGNORE</literal> based on architecture:</para>
+
<itemizedlist>
<listitem>
+ <programlisting>IGNORE_i386= does not run on i386</programlisting>
+
+ <programlisting>BROKEN_powerpc64= not ported to powerpc64 yet</programlisting>
+ </listitem>
+ </itemizedlist>
+
+ </sect2>
+
+ <sect2 xml:id="dads-arch-x_for">
+ <title>Marking a Port as Ignored On Multiple Architectures</title>
+
+ <itemizedlist>
+ <listitem>
<para>To mark a port as <varname>IGNORE</varname>d
only on certain architectures, there are two other
convenience variables that will automatically set
@@ -540,10 +569,14 @@
<varname>ONLY_FOR_ARCHS</varname> and
<varname>NOT_FOR_ARCHS</varname>. Examples:</para>
- <programlisting>ONLY_FOR_ARCHS= i386 amd64</programlisting>
+ <programlisting>ONLY_FOR_ARCHS= amd64 i386</programlisting>
- <programlisting>NOT_FOR_ARCHS= ia64 sparc64</programlisting>
+ <programlisting>NOT_FOR_ARCHS= powerpc64 sparc64</programlisting>
+ <note>
+ <para>Please sort the entries in alpha order.</para>
+ </note>
+
<para>A custom <varname>IGNORE</varname> message can be
set using <varname>ONLY_FOR_ARCHS_REASON</varname> and
<varname>NOT_FOR_ARCHS_REASON</varname>. Per
@@ -556,7 +589,43 @@
</sect2>
+ <sect2 xml:id="dads-wordsize">
+ <title>Wordsize Considerations</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Some ports behave differently based on wordsize; in current
+ practice, this is usually 64-bit vs. 32-bit.</para>
+
+ <note>
+ <para>Tip: it is easier to use the shorthand below rather
+ than testing for each individual value of
+ <literal>ARCH</literal> in a string such as:<programlisting>
+.if ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == mips || ${ARCH} == powerpc || ${ARCH} == powerpcspe
+</programlisting>
+ </para>
+ </note>
+
+ <para>Here is the recommended usage:</para>
+
+ <programlisting># modify MAKE_ENV on 64-bit archs
+.if ${ARCH:*M64*}
+MAKE_ENV+= ...
+.endif</programlisting>
+
+ <programlisting># modify CONFIGURE_ARGS on 32-bit archs
+.if ! ${ARCH:*M64*}
+CONFIGURE_ARGS+= ...
+.endif</programlisting>
+
+ </listitem>
+ </itemizedlist>
+
+ </sect2>
+
<sect2 xml:id="dads-arch-i386">
+ <title>i386-Specific Considerations</title>
+
<itemizedlist>
<listitem>
<para>If a port fetches i386 binaries and installs them,

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 6, 7:37 AM (17 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28447258
Default Alt Text
D19239.id59576.diff (3 KB)

Event Timeline