Update for USES=kmod, most notably:
- simplify the part on staging kernel module ports - rewrite the parts on checking for kernel sources Approved by: remko (mentor)
This commit is contained in:
parent
3ac0041626
commit
22adc2b62c
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=43145
1 changed files with 11 additions and 30 deletions
|
@ -2225,7 +2225,10 @@ PORTEPOCH= 1</programlisting>
|
|||
<listitem>
|
||||
<para>Ports which install loadable kernel modules should
|
||||
have the virtual category <filename>kld</filename> in
|
||||
their <varname>CATEGORIES</varname> line.</para>
|
||||
their <varname>CATEGORIES</varname> line. This is one
|
||||
of the things handled automatically by adding
|
||||
<literal>kmod</literal> to the <varname>USES</varname>
|
||||
line.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -5322,27 +5325,8 @@ PORTVERSION= 1.0</programlisting>
|
|||
|
||||
<para>Ports that install kernel modules must prepend the
|
||||
<varname>STAGEDIR</varname> variable to
|
||||
their default destination, <filename>/boot/modules</filename>. Then the
|
||||
<buildtarget>pre-install</buildtarget> target can be used to handle
|
||||
the creation of this directory:</para>
|
||||
|
||||
<programlisting>pre-install:
|
||||
${MKDIR} ${STAGEDIR}/boot/modules</programlisting>
|
||||
|
||||
<para>&man.kldxref.8; should not be run when installing to
|
||||
the temporary staging directory. To prevent this, define
|
||||
the<varname>NO_XREF</varname> variable and add it
|
||||
to <varname>MAKE_ENV</varname> in the port's
|
||||
<filename>Makefile</filename>:</para>
|
||||
|
||||
<programlisting>MAKE_ENV+= KMODDIR=/boot/modules NO_XREF=yes</programlisting>
|
||||
<para>The hints files for the kernel loader should
|
||||
be regenerated only when the package is installed or
|
||||
deinstalled. Do this by invoking &man.kldxref.8; from
|
||||
<filename>pkg-plist</filename>:</para>
|
||||
|
||||
<programlisting>@unexec kldxref /boot/modules
|
||||
@exec kldxref /boot/modules</programlisting>
|
||||
their destination, by default
|
||||
<filename>/boot/modules</filename>.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-shlibs">
|
||||
|
@ -10046,9 +10030,11 @@ GROUPS= pulse pulse-access pulse-rt</programlisting>
|
|||
correct way to determine if the user has them
|
||||
installed:</para>
|
||||
|
||||
<programlisting>.if !exists(${SRC_BASE}/sys/Makefile)
|
||||
IGNORE= requires kernel sources to be installed
|
||||
.endif</programlisting>
|
||||
<programlisting>USES= kmod</programlisting>
|
||||
|
||||
<para>Apart from this check, the <literal>kmod</literal> feature
|
||||
takes care of most items that these ports need to take into
|
||||
account.</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
|
@ -11988,11 +11974,6 @@ exec %%LOCALBASE%%/bin/java -jar %%DATADIR%%/foo.jar "$@"</programlisting>
|
|||
&os;</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>requires &os; kernel sources to build, but the
|
||||
user does not have them installed</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>has a distfile which may not be automatically
|
||||
fetched due to licensing restrictions</para>
|
||||
|
|
Loading…
Reference in a new issue