From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9117E138350 for ; Thu, 5 Mar 2020 19:41:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C2A09E0963; Thu, 5 Mar 2020 19:41:05 +0000 (UTC) Received: from avasout06.plus.net (avasout06.plus.net [212.159.14.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AB183E0909 for ; Thu, 5 Mar 2020 19:41:04 +0000 (UTC) Received: from mailserver ([84.92.36.196]) by smtp with ESMTP id 9wMcjLkMOCZ5E9wMdjIAnR; Thu, 05 Mar 2020 19:41:02 +0000 X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=L/qGv9b8 c=1 sm=1 tr=0 a=9joFju3sQCjqEQe1SErgvA==:117 a=9joFju3sQCjqEQe1SErgvA==:17 a=x7bEGLp0ZPQA:10 a=YbTMELGUhT8A:10 a=wRwduxACAAAA:8 a=7mOBRU54AAAA:8 a=pGLkceISAAAA:8 a=ovR1p-AflXHWGJjpOZsA:9 a=hrl9Vt0ydXkA:10 a=R3RGHOyXi1sA:10 a=joCMaU3sIWX2Sob9oW2y:22 a=wa9RWnbW_A1YIeRBVszw:22 From: Chris Mayo To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH 1/2] waf-utils.eclass: Support --docdir and --htmldir Date: Thu, 5 Mar 2020 19:40:55 +0000 Message-Id: <20200305194056.288660-1-aklhfex@gmail.com> X-Mailer: git-send-email 2.24.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfGdOLdXEYYvzzBSYwB97gpYxaHgeLVklzNQeuuZISKaoGQCOdQ4gBHRg16YJU6MLGkhhzvn7A/PIEz7fscoQ0AMffmkHF87DV//lAh1HPdXxfXM/Rx7H qXvQ63fFGZOzuyf5nyi+FxyRIQCu97k2b7chpl1CtaJn8zl5eDOnJ/0y X-Archives-Salt: 74a6bf3b-1296-42f8-9181-8d1a00319e7c X-Archives-Hash: 661f3a012869ef7352fa8bc9efb36ba8 waf can optionally set the standard GNU directories [1]. Based on the code for econf in Portage's phase-helpers.sh. [1] https://waf.io/apidocs/tools/gnu_dirs.html Closes: https://bugs.gentoo.org/711612 Signed-off-by: Chris Mayo --- Fixes QA problem with media-video/mpv-0.32.0-r1 reported in the linked bug. eclass/waf-utils.eclass | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index 2cb26bc8dfd..a944195b162 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -69,7 +69,7 @@ waf-utils_src_configure() { [[ ${fail} ]] && die "Invalid use of waf-utils.eclass" - local libdir=() + local conf_args=() # @ECLASS-VARIABLE: WAF_BINARY # @DESCRIPTION: @@ -81,7 +81,15 @@ waf-utils_src_configure() { # @DESCRIPTION: # Variable specifying that you don't want to set the libdir for waf script. # Some scripts does not allow setting it at all and die if they find it. - [[ -z ${NO_WAF_LIBDIR} ]] && libdir=(--libdir="${EPREFIX}/usr/$(get_libdir)") + [[ -z ${NO_WAF_LIBDIR} ]] && conf_args+=(--libdir="${EPREFIX}/usr/$(get_libdir)") + + local waf_help=$("${WAF_BINARY}" --help 2>/dev/null) + if [[ ${waf_help} == *--docdir* ]]; then + conf_args+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} ) + fi + if [[ ${waf_help} == *--htmldir* ]]; then + conf_args+=( --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html ) + fi tc-export AR CC CPP CXX RANLIB @@ -91,7 +99,7 @@ waf-utils_src_configure() { PKGCONFIG="$(tc-getPKG_CONFIG)" "${WAF_BINARY}" "--prefix=${EPREFIX}/usr" - "${libdir[@]}" + "${conf_args[@]}" "${@}" configure ) -- 2.24.1