blob: 320755b844ecec0dc0cf6387f6acaa10c625851c [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "SIP is a C++/Python Wrapper Generator"
Andrew Geisslerc87764f2020-06-27 00:16:32 -05002HOMEPAGE = "https://riverbankcomputing.com/software/sip/"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08003SECTION = "devel"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://LICENSE-GPL2;md5=e91355d8a6f8bd8f7c699d62863c7303"
6
Brad Bishopc342db32019-05-15 21:57:59 -04007SRC_URI = "https://www.riverbankcomputing.com/static/Downloads/sip/${PV}/sip-${PV}.tar.gz \
Brad Bishop87b3cb82019-11-15 16:35:37 -05008"
Andrew Geisslerc87764f2020-06-27 00:16:32 -05009SRC_URI[md5sum] = "70adc0c9734e2d9dcd241d3f931dfc74"
10SRC_URI[sha256sum] = "22ca9bcec5388114e40d4aafd7ccd0c4fe072297b628d0c5cdfa2f010c0bc7e7"
11
12inherit python3-dir python3native
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013
14S = "${WORKDIR}/sip-${PV}"
15
Andrew Geisslerc87764f2020-06-27 00:16:32 -050016DEPENDS = "python3"
17
18PACKAGES += "python3-sip3"
19
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020BBCLASSEXTEND = "native"
21
22do_configure_prepend_class-target() {
23 echo "py_platform = linux" > sip.cfg
Brad Bishopc342db32019-05-15 21:57:59 -040024 echo "py_inc_dir = %(sysroot)/${includedir}/python%(py_major).%(py_minor)${PYTHON_ABI}" >> sip.cfg
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025 echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg
26 echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg
Brad Bishopc342db32019-05-15 21:57:59 -040027 echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028 echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
29 ${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}"
30}
Andrew Geisslerc87764f2020-06-27 00:16:32 -050031
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032do_configure_prepend_class-native() {
33 echo "py_platform = linux" > sip.cfg
Brad Bishopc342db32019-05-15 21:57:59 -040034 echo "py_inc_dir = ${includedir}/python%(py_major).%(py_minor)${PYTHON_ABI}" >> sip.cfg
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080035 echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg
36 echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg
Brad Bishopc342db32019-05-15 21:57:59 -040037 echo "sip_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> sip.cfg
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038 echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
39 ${PYTHON} configure.py --configuration sip.cfg --sip-module PyQt5.sip --sysroot=${STAGING_DIR_NATIVE}
40}
Andrew Geisslerc87764f2020-06-27 00:16:32 -050041
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042do_install() {
43 oe_runmake install
44}
Andrew Geisslerc87764f2020-06-27 00:16:32 -050045
46FILES_python3-sip3 = "${libdir}/${PYTHON_DIR}/site-packages/"
47FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug"