Page MenuHomeFreeBSD

D2941.id6542.diff
No OneTemporary

D2941.id6542.diff

Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
+++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
@@ -4523,6 +4523,16 @@
<programlisting>WRKSRC= ${WRKDIR}/${PORTNAME}</programlisting>
</sect2>
+ <sect2 xml:id="makefile-wrksrc_subdir">
+ <title><varname>WRKSRC_SUBDIR</varname></title>
+
+ <para>If the parts needed for the port are in a subdirectory of
+ the extracted source, set <varname>WRKSRC_SUBDIR</varname> to
+ that directory.</para>
+
+ <programlisting>WRKSRC_SUBDIR= src</programlisting>
+ </sect2>
+
<sect2 xml:id="makefile-no_wrksubdir">
<title><varname>NO_WRKSUBDIR</varname></title>
@@ -4531,6 +4541,14 @@
indicate that.</para>
<programlisting>NO_WRKSUBDIR= yes</programlisting>
+
+ <note>
+ <para>Because <varname>WRKDIR</varname> is the only directory
+ that is supposed to be writable during the build and is used
+ to store many files recording the status of the build, it is
+ always better to force extraction into a subdirectory
+ anyway.</para>
+ </note>
</sect2>
</sect1>
Index: en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
+++ en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
@@ -31,21 +31,16 @@
in &os;, <varname>DESTDIR</varname> has a different meaning
(see <xref linkend="porting-prefix"/>).</para>
- <para>When a port still requires system-wide privileges in order
- to run the <buildtarget>stage</buildtarget> and
- <buildtarget>package</buildtarget> targets, this line must be
- added to the
- <filename>Makefile</filename>:</para>
-
- <programlisting>NEED_ROOT= yes</programlisting>
-
<note>
- <para>The vast majority of ports do not <emphasis>really
- need</emphasis> to be root. It can mostly be avoided by
- using <link
- linkend="uses-uidfix"><literal>USES=uidfix</literal></link>,
- and from time to time by slightly patching the port's
- <filename>Makefiles</filename>.</para>
+ <para>No port <emphasis>really needs</emphasis> to be root. It
+ can mostly be avoided by using <link
+ linkend="uses-uidfix"><literal>USES=uidfix</literal></link>.
+ If the port still runs commands like &man.chown.8;,
+ &man.chgrp.1;, or forces owner or group with &man.install.1;
+ then use <link
+ linkend="uses-fakeroot"><literal>USES=fakeroot</literal></link>
+ to fake those calls. From time to time slightly patching the
+ port's <filename>Makefiles</filename> will be needed.</para>
</note>
<para>Meta ports, or ports that do not install files themselves
@@ -57,6 +52,13 @@
<programlisting>NO_MTREE= yes</programlisting>
+ <tip>
+ <para>Metaports should use <link
+ linkend="uses-metaport"><literal>USES=metaport</literal></link>,
+ it sets up defaults for ports that do not fetch, build or
+ install anything.</para>
+ </tip>
+
<para>Staging is enabled by prepending
<varname>STAGEDIR</varname> to paths used in the
<buildtarget>pre-install</buildtarget>,

File Metadata

Mime Type
text/plain
Expires
Mon, May 25, 6:04 PM (3 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33513109
Default Alt Text
D2941.id6542.diff (3 KB)

Event Timeline