aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorS. Lockwood-Childs <sjl@vctlabs.com>2021-01-27 09:07:12 -1000
committerArmin Kuster <akuster808@gmail.com>2021-01-28 17:02:32 -0800
commitba3c1dcf19ee018963471015b2e8b30ef9830d35 (patch)
tree2054b6a9740a5fb1642f2a4788bdd22cf33e8a9f
parent46ea93dc423140e63257e69ff3da5aea0b72f8be (diff)
downloadmeta-openembedded-contrib-ba3c1dcf19ee018963471015b2e8b30ef9830d35.tar.gz
meta-openembedded-contrib-ba3c1dcf19ee018963471015b2e8b30ef9830d35.tar.bz2
meta-openembedded-contrib-ba3c1dcf19ee018963471015b2e8b30ef9830d35.zip
sip3: simplify recipe
The custom configure block can be shared between target and native if you just configure the sysroot option accordingly and use STAGING_INCDIR to locate the python headers to build against. Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 5fe362171c7f3426fced0c7889facec397c9cc5e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/sip/sip3_4.19.23.bb17
1 files changed, 5 insertions, 12 deletions
diff --git a/meta-oe/recipes-devtools/sip/sip3_4.19.23.bb b/meta-oe/recipes-devtools/sip/sip3_4.19.23.bb
index 320755b844..ae8df5055a 100644
--- a/meta-oe/recipes-devtools/sip/sip3_4.19.23.bb
+++ b/meta-oe/recipes-devtools/sip/sip3_4.19.23.bb
@@ -19,24 +19,17 @@ PACKAGES += "python3-sip3"
BBCLASSEXTEND = "native"
-do_configure_prepend_class-target() {
- echo "py_platform = linux" > sip.cfg
- echo "py_inc_dir = %(sysroot)/${includedir}/python%(py_major).%(py_minor)${PYTHON_ABI}" >> sip.cfg
- echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg
- echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg
- echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg
- echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
- ${PYTHON} configure.py --configuration sip.cfg --sip-module PyQt5.sip --sysroot ${STAGING_DIR_HOST} CC="${CC}" CXX="${CXX}" LINK="${CXX}" STRIP="" LINK_SHLIB="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LFLAGS="${LDFLAGS}"
-}
+CONFIGURE_SYSROOT = "${STAGING_DIR_HOST}"
+CONFIGURE_SYSROOT_class-native = "${STAGING_DIR_NATIVE}"
-do_configure_prepend_class-native() {
+do_configure_prepend() {
echo "py_platform = linux" > sip.cfg
- echo "py_inc_dir = ${includedir}/python%(py_major).%(py_minor)${PYTHON_ABI}" >> sip.cfg
+ echo "py_inc_dir = ${STAGING_INCDIR}/python%(py_major).%(py_minor)${PYTHON_ABI}" >> sip.cfg
echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg
echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg
echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg
echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
- ${PYTHON} configure.py --configuration sip.cfg --sip-module PyQt5.sip --sysroot=${STAGING_DIR_NATIVE}
+ ${PYTHON} configure.py --configuration sip.cfg --sip-module PyQt5.sip --sysroot ${CONFIGURE_SYSROOT} CC="${CC}" CXX="${CXX}" LINK="${CXX}" STRIP="" LINK_SHLIB="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LFLAGS="${LDFLAGS}"
}
do_install() {