gtk-doc: require perl-native only if api-documentation feature is enabled

This should reduce build times.

(From OE-Core rev: 74d9c5eb858bfe1dd16826b74be3af71bb1956d9)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin 2016-09-08 14:49:24 +03:00 committed by Richard Purdie
parent 04e3dc6d3b
commit f08aeff228
2 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,40 @@
From e733241fb580f032efbbe684ec35d4c9d27f1595 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 8 Sep 2016 13:38:39 +0300
Subject: [PATCH] Do not error out if perl is not found or its version is too
old.
This allows use to avoid depending on perl-native if we're not going
to use it (when api-docs are disabled).
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2a61d6e..29415bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ dnl Check for Perl.
dnl
AC_PATH_PROG([PERL], [perl])
if test -z "$PERL"; then
- AC_MSG_ERROR([perl not found])
+ AC_MSG_WARN([perl not found])
fi
AC_MSG_CHECKING([if Perl version >= 5.18.0])
@@ -44,7 +44,7 @@ if "$PERL" -e "require v5.18.0"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
- AC_MSG_ERROR([perl >= 5.18.0 is required for gtk-doc])
+ AC_MSG_WARN([perl >= 5.18.0 is required for gtk-doc])
fi
dnl
--
2.9.3

View File

@ -5,7 +5,7 @@ HOMEPAGE = "http://www.gtk.org/gtk-doc/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
inherit gnomebase perlnative
inherit gnomebase
# Configure the scripts correctly (and build their dependencies) only if they are actually
# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
@ -15,10 +15,14 @@ PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation",
# into its scripts. This means that target gtk-doc package is broken;
# hopefully no one minds because its scripts are not used for anything during build
# and shouldn't be used on targets.
PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native"
PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native perl-native"
# We cannot use host perl, because it may be too old for gtk-doc
EXTRANATIVEPATH += "perl-native"
SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
file://0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch \
"
SRC_URI_append_class-native = " file://pkg-config-native.patch"