Add a blurb on how GNOME auto-detection works using the WANT_*/HAVE_*
macros.
This commit is contained in:
parent
d2c014e835
commit
53c612b228
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=11827
1 changed files with 26 additions and 0 deletions
|
@ -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 <bsd.port.pre.mk>
|
||||
|
||||
.if defined(HAVE_GNOME)
|
||||
USE_GNOME= yes
|
||||
CONFIGURE_ARGS+= --with-gnome
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-gnome
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
</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
|
||||
|
|
Loading…
Reference in a new issue