diff --git a/en/gnome/docs/porting.sgml b/en/gnome/docs/porting.sgml index af01e1c1a4..419401d033 100644 --- a/en/gnome/docs/porting.sgml +++ b/en/gnome/docs/porting.sgml @@ -70,6 +70,32 @@ WANT_GNOME= yes usually used for backend APIs.
+If your port can optionally use GNOME, you must set + WANT_GNOME= yes in your Makefile, then check to see if + HAVE_GNOME is set. Since this is a conditional + evaluation, you need to stick it between bsd.port.pre.mk + and bsd.port.post.mk. For example:
+ ++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> ++ +
What happens here is WANT_GNOME tells the ports system + to check for the existence of gnome-config. If it + exists, HAVE_GNOME is set. If not, HAVE_GNOME + remains unset.
+When building GNOME ports, remember that many applications require shared directories in ${PREFIX}/share/gnome. Ports should be constructed in a way such that files placed in these