[OE-core] [oe-core][PATCH 6/7] xtrans: fix file conflict when multilib enabled
Zhang Xiao
xiao.zhang at windriver.com
Mon Mar 12 09:13:02 UTC 2018
Script file xtrans.pc conflicts between 32 and 64 bit packages.
Use update-alternatives to add base_libdir as suffix to avoid it.
Signed-off-by: Zhang Xiao <xiao.zhang at windriver.com>
---
meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb b/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
index d5b7f1a2c6..ef64f1fcfc 100644
--- a/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
+++ b/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
@@ -16,7 +16,20 @@ PE = "1"
RDEPENDS_${PN}-dev = ""
-inherit gettext
+inherit gettext update-alternatives
+
+MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
+
+FILES_${PN}-dev += "${datadir}/pkgconfig/xtrans.pc-${MULTILIB_SUFFIX}"
+ALTERNATIVE_${PN}-dev = "xtrans.pc"
+ALTERNATIVE_LINK_NAME[xtrans.pc] = "${datadir}/pkgconfig/xtrans.pc"
+ALTERNATIVE_TARGET[xtrans.pc] = "${datadir}/pkgconfig/xtrans.pc-${MULTILIB_SUFFIX}"
+
+PACKAGE_PREPROCESS_FUNCS += "xtrans_alternative_rename"
+
+xtrans_alternative_rename() {
+ mv ${PKGD}${datadir}/pkgconfig/xtrans.pc ${PKGD}${datadir}/pkgconfig/xtrans.pc-${MULTILIB_SUFFIX}
+}
BBCLASSEXTEND = "native nativesdk"
--
2.11.0
More information about the Openembedded-core
mailing list