FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 01-06-2012, 09:06 PM
Michał Górny
 
Default Pass --docdir to configure, and install docs from it.

As EAPI 2 support is intended, this requires configuring the build
system to install docs into a temporary location and moving files from
it. Due to the lack of 'dodoc -r', directories inside docdir are
supported only with EAPI 4.

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=350423
---
eclass/autotools-utils.eclass | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
index e5ce908..96b3372 100644
--- a/eclass/autotools-utils.eclass
+++ b/eclass/autotools-utils.eclass
@@ -377,7 +377,9 @@ autotools-utils_src_configure() {
|| die 'autotools-utils.eclass: myeconfargs has to be an array.'

# Common args
- local econfargs=()
+ local econfargs=(
+ --docdir=/temporary-docdir
+ )

# Handle static-libs found in IUSE, disable them by default
if in_iuse static-libs; then
@@ -442,6 +444,23 @@ autotools-utils_src_install() {
dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed"
fi

+ # Move docs installed by autotools.
+ if [[ -d ${D}/temporary-docdir ]]; then
+ if [[ ${EAPI} = 4 ]]; then
+ dodoc -r "${D}"/temporary-docdir/* || die "docdir dodoc failed"
+ else
+ local f
+ for f in "${D}"/temporary-docdir/*; do
+ [[ -d ${f} ]]
+ && die "directories in docdir require at least EAPI 4"
+ done
+
+ dodoc "${D}"/temporary-docdir/* || die "docdir dodoc failed"
+ fi
+
+ rm -r "${D}"/temporary-docdir
+ fi
+
# Remove libtool files and unnecessary static libs
remove_libtool_files
}
--
1.7.8.2
 
Old 01-08-2012, 09:09 AM
Michał Górny
 
Default Pass --docdir to configure, and install docs from it.

As EAPI 2 support is intended, this requires configuring the build
system to install docs into a temporary location and moving files from
it. Due to the lack of 'dodoc -r', directories inside docdir are
supported only with EAPI 4.

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=350423
---
eclass/autotools-utils.eclass | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass
index 9a13a3a..fcdf219 100644
--- a/eclass/autotools-utils.eclass
+++ b/eclass/autotools-utils.eclass
@@ -392,8 +392,12 @@ autotools-utils_src_configure() {
[[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]]
|| die 'autotools-utils.eclass: myeconfargs has to be an array.'

+ [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
+
# Common args
- local econfargs=()
+ local econfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ )

# Handle static-libs found in IUSE, disable them by default
if in_iuse static-libs; then
@@ -441,6 +445,24 @@ autotools-utils_src_install() {
emake DESTDIR="${D}" "$@" install || die "emake install failed"
popd > /dev/null

+ # Move docs installed by autotools (in EAPI < 4).
+ if [[ -d ${D}${EPREFIX}/usr/share/doc/${PF} ]]; then
+ if [[ ${EAPI} == [23] ]]; then
+ mkdir "${T}"/temp-docdir
+ mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/
+ || die "moving docs to tempdir failed"
+
+ local f
+ for f in "${T}"/temp-docdir/*; do
+ [[ -d ${f} ]]
+ && die "directories in docdir require at least EAPI 4"
+ done
+
+ dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed"
+ rm -r "${T}"/temp-docdir || die
+ fi
+ fi
+
# XXX: support installing them from builddir as well?
if [[ ${DOCS} ]]; then
dodoc "${DOCS[@]}" || die "dodoc failed"
--
1.7.8.3
 

Thread Tools




All times are GMT. The time now is 06:31 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org