From 290b20d40b42f17c1dcf5ee1249acb69df5d586d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20V=C3=A4th?= Date: Wed, 26 Jul 2017 13:28:41 +0200 Subject: Reflect changes in documentation of meson_optional.eclass --- eclass/meson_optional.eclass | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'eclass/meson_optional.eclass') diff --git a/eclass/meson_optional.eclass b/eclass/meson_optional.eclass index 157b52e0..53972b53 100644 --- a/eclass/meson_optional.eclass +++ b/eclass/meson_optional.eclass @@ -1,22 +1,24 @@ # Copyright 2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# @ECLASS: meson.eclass +# @ECLASS: meson_optional.eclass # @MAINTAINER: -# William Hubbs -# Mike Gilbert +# Martin Väth # @BLURB: common ebuild functions for meson-based packages # @DESCRIPTION: # This eclass contains the default phase functions for packages which # use the meson build system. +# The only difference to meson.eclass is that it supports also the +# MESON_AUTO_DEPEND variable which the gentoo maintainers refuse to include: +# https://bugs.gentoo.org/show_bug.cgi?id=626054 # # @EXAMPLE: -# Typical ebuild using meson.eclass: +# Typical ebuild using meson_optional.eclass: # # @CODE # EAPI=6 # -# inherit meson +# inherit meson_optional # # ... # @@ -51,6 +53,12 @@ _MESON_ECLASS=1 MESON_DEPEND=">=dev-util/meson-0.40.0 >=dev-util/ninja-1.7.2" + +# @ECLASS-VARIABLE: MESON_AUTO_DEPEND +# @DESCRIPTION: +# Set to 'no' to disable automatically adding to DEPEND. This lets +# ebuilds former conditional depends by using ${MESON_DEPEND} in +# their own DEPEND string. [ "${MESON_AUTO_DEPEND:=yes}" != yes ] || DEPEND=${MESON_DEPEND} # @ECLASS-VARIABLE: BUILD_DIR @@ -190,9 +198,11 @@ meson_src_install() { einstalldocs } -meson_optional_src_configure() { meson_src_configure; } -meson_optional_src_compile() { meson_src_compile; } -meson_optional_src_test() { meson_src_test; } -meson_optional_src_install() { meson_src_install; } +# This is not nice but necessary if we want to keep the names of meson.eclass: +# Without this, EXPORT_FUNCTIONS for these functions would not work... +meson_optional_src_configure() { meson_src_configure "$@"; } +meson_optional_src_compile() { meson_src_compile "$@"; } +meson_optional_src_test() { meson_src_test "$@"; } +meson_optional_src_install() { meson_src_install "$@"; } fi -- cgit v1.2.3