public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Serkan Kaba (serkan)" <serkan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo commit in xml/htdocs/proj/en/qa: automagic.xml
Date: Fri, 07 Nov 2008 21:58:25 +0000	[thread overview]
Message-ID: <E1KyZLV-0000y0-V4@stork.gentoo.org> (raw)

serkan      08/11/07 21:58:25

  Modified:             automagic.xml
  Log:
   * Add CMake section.
   * Fix for US English.

Revision  Changes    Path
1.4                  xml/htdocs/proj/en/qa/automagic.xml

file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/qa/automagic.xml?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/qa/automagic.xml?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/qa/automagic.xml?r1=1.3&r2=1.4

Index: automagic.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/qa/automagic.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- automagic.xml	25 Jan 2008 18:12:26 -0000	1.3
+++ automagic.xml	7 Nov 2008 21:58:25 -0000	1.4
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE guide SYSTEM "http://www.gentoo.org/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/qa/automagic.xml,v 1.3 2008/01/25 18:12:26 flameeyes Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/qa/automagic.xml,v 1.4 2008/11/07 21:58:25 serkan Exp $ -->
 
 <guide link="/proj/en/qa/automagic.xml" lang="en">
 <title>Automagic dependencies, what they are and how to fix them</title>
@@ -8,6 +8,9 @@
 <author title="Author">
   <mail link="flameeyes@gentoo.org">Diego Pettenò</mail>
 </author>
+<author title="Author">
+  <mail link="serkan@gentoo.org">Serkan Kaba</mail>
+</author>
 
 <abstract>
 This guide aim to describe the problem of "automagic dependencies", describing
@@ -18,8 +21,8 @@
 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
 <license/>
 
-<version>0.1</version>
-<date>2006-01-30</date>
+<version>0.2</version>
+<date>2008-11-07</date>
 
 <chapter> <!-- Introduction -->
 <title>Introduction</title>
@@ -58,7 +61,7 @@
 they are building it, sometimes dependencies get <e>automagic</e>. This means
 that the build system doesn't give the builder a way to decide if he wants
 something enabled, so the dependency added, but they just enable it when they
-find it. This is the wrong behaviour.
+find it. This is the wrong behavior.
 </p>
 
 </body>
@@ -157,7 +160,7 @@
 
 <note>
 For the patches to be accepted by upstream, it's usually suggested not to change
-the default behaviour, when <c>./configure</c> is called without parameters; for
+the default behavior, when <c>./configure</c> is called without parameters; for
 this reason, here will be listed two methods to make non-automagic the
 dependencies, one for enabled-by-default deps and one for disabled-by-default
 deps.
@@ -180,7 +183,7 @@
 </pre>
 
 <p>
-When the parameter is present but it's not honoured, it might be simple as well
+When the parameter is present but it's not honored, it might be simple as well
 as complex to fix the dependency. It might just be a test that's not properly
 written, so it has to be changed in something alike to the tests above, or it
 might be a complete screw-up in calls of <b>AC_ARG_WITH</b> macros. In those
@@ -208,6 +211,37 @@
 </body>
 </section>
 
+<section><!-- CMake -->
+<title>CMake</title>
+
+<body>
+
+<p>
+Automagic dependencies may occur in CMake based build systems where <b>PKG_CHECK_MODULES</b>
+is called without <b>REQUIRED</b> parameter unconditionally.
+Fixing this is quite easy as it only involves introducing an option to
+build system and executing <b>PKG_CHECK_MODULES</b> depending on its value.
+</p>
+<pre caption="Adding ENABLE_FOO option to avoid automagic dependency.">
+<i>OPTION(ENABLE_FOO "Enable foo library" ON)</i>
+...
+<i>IF (ENABLE_FOO)</i>
+  PKG_CHECK_MODULES (FOO foo>=0.1)
+<i>ENDIF (ENABLE_FOO)</i>
+...
+<i>IF (ENABLE_FOO)</i>
+  IF (FOO_FOUND)
+  ...
+  ELSE (FOO_FOUND)
+  ...
+  ENDIF (FOO_FOUND)
+<i>ENDIF (ENABLE_FOO)</i>
+</pre>
+<note>Set the default in OPTION according to original behavior.</note>
+</body>
+
+</section>
+
 <section> <!-- Other build systems -->
 <title>Other build systems</title>
 






             reply	other threads:[~2008-11-07 22:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 21:58 Serkan Kaba (serkan) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-12-09 15:14 [gentoo-commits] gentoo commit in xml/htdocs/proj/en/qa: automagic.xml Lars Wendler (polynomial-c)
2011-06-01 23:23 Diego Petteno (flameeyes)
2008-11-08  8:41 Serkan Kaba (serkan)
2008-11-08  8:27 Joshua Saddler (nightmorph)
2008-01-25 18:12 Diego Petteno (flameeyes)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1KyZLV-0000y0-V4@stork.gentoo.org \
    --to=serkan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox