From 7f63e8d903db947f63dee1998ad775f3bed9a03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Date: Tue, 7 Jun 2016 10:43:01 +0200 Subject: [PATCH] pcre: create binconfig-recipe instead of inheriting binconfig class The pcre package creates a pcre-config script used by dependent packages during their configure step. The this shell script is created in machine context, it must be made available to dependent packages during their stage step. Until now, this was done by letting the pcre recipe inherit the binconfig class, which adds a call to binconfig_stage_fixup() during the dependent stage step. However, binconfig_stage_fixup() symlinks into ./stage/cross/bin/, which is not "allowed" in the stage fixup functions. (They should only touch ./stage.unpack/ and not ./stage ). Also, the symlink-during-stage fixup approach might fail as ./stage/cross/bin is not guarenteed to be created when binconfig_stage_fixup() is called. Fix this mess by creating a whole new recipe (pcre-binconfig) which installs the symlink in cross context, and add is a dependency to the libpcre package. --- recipes/pcre/pcre-binconfig.oe | 10 ++++++++++ recipes/pcre/pcre.inc | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 recipes/pcre/pcre-binconfig.oe diff --git a/recipes/pcre/pcre-binconfig.oe b/recipes/pcre/pcre-binconfig.oe new file mode 100644 index 000000000..9e30a7342 --- /dev/null +++ b/recipes/pcre/pcre-binconfig.oe @@ -0,0 +1,10 @@ +DESCRIPTION = "Recipe to provide a symlink to machine:pcre-config in stage/cross/bin/" +LICENSE = "MIT" + +RECIPE_TYPES = "cross" +FILES_${PN} = "${bindir}" + +do_install() { + install -d ${D}${bindir} + ln -s ../../machine${machine_bindir} ${D}${bindir}/pcre-config +} diff --git a/recipes/pcre/pcre.inc b/recipes/pcre/pcre.inc index 8cf5d0850..7ade5de06 100644 --- a/recipes/pcre/pcre.inc +++ b/recipes/pcre/pcre.inc @@ -10,7 +10,7 @@ HOMEPAGE = "http://www.pcre.org/" RECIPE_TYPES = "native machine sdk" -inherit c++ autotools-autoreconf binconfig pkgconfig +inherit c++ autotools-autoreconf pkgconfig require conf/fetch/sourceforge.conf SRC_URI = "${SOURCEFORGE_MIRROR}/project/${PN}/${PN}/${PV}/${P}.tar.gz" @@ -53,4 +53,4 @@ AUTO_PACKAGE_LIBS_PCPREFIX = "lib" AUTO_PACKAGE_LIBS_DEV_DEPENDS = "${PN}-dev_${PV}" DEPENDS_${PN}-libpcreposix = "libpcre libc" DEPENDS_${PN}-libpcrecpp = "libpcre libc libm libgcc libstdc++" -DEPENDS_${PN}-libpcre = "libc" +DEPENDS_${PN}-libpcre = "libc cross:pcre-binconfig"