Add a blurb on how GNOME auto-detection works using the WANT_*/HAVE_*

macros.
This commit is contained in:
Maxim Sobolev 2002-01-22 22:30:57 +00:00
parent d2c014e835
commit 53c612b228
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=11827

View file

@ -70,6 +70,32 @@ WANT_GNOME= yes
usually used for backend APIs.</p></li>
</ul>
<p>If your port can optionally use GNOME, you must set
<tt>WANT_GNOME= yes</tt> in your Makefile, then check to see if
<tt>HAVE_GNOME</tt> is set. Since this is a conditional
evaluation, you need to stick it between <tt>bsd.port.pre.mk</tt>
and <tt>bsd.port.post.mk</tt>. For example:</p>
<pre>
WANT_GNOME= yes
.include &lt;bsd.port.pre.mk&gt;
.if defined(HAVE_GNOME)
USE_GNOME= yes
CONFIGURE_ARGS+= --with-gnome
.else
CONFIGURE_ARGS+= --without-gnome
.endif
.include &lt;bsd.port.post.mk&gt;
</pre>
<p>What happens here is <tt>WANT_GNOME</tt> tells the ports system
to check for the existence of <tt>gnome-config</tt>. If it
exists, <tt>HAVE_GNOME</tt> is set. If not, <tt>HAVE_GNOME</tt>
remains unset.</p>
<p>When building GNOME ports, remember that many applications
require shared directories in <tt>${PREFIX}/share/gnome</tt>. Ports
should be constructed in a way such that files placed in these