commit: 3dc3be9929eaa97576882ab23ac02d9f51368f2d Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Wed Apr 15 18:25:07 2020 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sat May 9 11:06:19 2020 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3dc3be99
general-concepts/dependencies: Tips for checking dependencies. This is taken from the Gentoo Developer Handbook, chapter "Ebuild HOWTO" (proj/en/devrel/handbook/hb-guide-ebuild.xml), section "Package Dependencies", subsection "Important Notes", which in turn had been copied from chapter "Common ebuild Mistakes" (proj/en/devrel/handbook/hb-guide-common-mistakes.xml), section "Common Ebuild Writing Mistakes", subsection "DEPEND is incomplete". Permission to reuse the CC-BY-SA-1.0 work under CC BY-SA version 2.0 or any later version of that license obtained from author plasmaroo per e-mail on 2015-04-16, Message-ID <CAGV+WHCJ61hvw7kh+Wz=uO2esihwc1dXsCWJJWeFAA7UOyyayw <AT> mail.gmail.com>. Closes: https://bugs.gentoo.org/465764 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> general-concepts/dependencies/text.xml | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 52d053e..319137f 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -573,6 +573,57 @@ DEPEND=" </subsection> </section> +<section> +<title>Tips for Checking Dependencies</title> +<body> + +<p> +It is important to ensure that all the dependencies are complete for your +package: +</p> + +<dl> + <dt>Look at installed binaries/libraries</dt> + <dd> + Use a tool like <c>scanelf -n</c> (from app-misc/pax-utils) or + <c>objdump -p</c> (from sys-devel/binutils) to list <c>DT_NEEDED</c> + entries + </dd> + <dt>Look in <c>configure.ac</c></dt> + <dd> + Look for checks for packages in here. Things to look out for are pkg-config + checks or <c>AM_*</c> functions that check for a specific version. + </dd> + <dt>Look at included <c>.spec</c> files</dt> + <dd> + A good indication of dependencies is to look at the included <c>.spec</c> + files for relevant deps. However, do not trust them to be the definitive + complete list of dependencies. + </dd> + <dt>Look at the application/library website</dt> + <dd> + Check the application website for possible dependencies that they suggest + are needed + </dd> + <dt>Read the <c>README</c> and <c>INSTALL</c> for the package</dt> + <dd> + They usually also contain useful information about building and installing + packages + </dd> + <dt> + Remember non-binary dependencies such as pkg-config, doc generation + programs, etc. + </dt> + <dd> + Usually the build process requires some dependencies such as intltool, + libtool, pkg-config, doxygen, scrollkeeper, gtk-doc, etc. Make sure those + are clearly stated. + </dd> +</dl> + +</body> +</section> + <section> <title>Implicit System Dependency</title> <body>