xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-test/googletest/googletest_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunDESCRIPTION = "Google's framework for writing C++ tests"
2*4882a593SmuzhiyunHOMEPAGE = "https://github.com/google/googletest"
3*4882a593SmuzhiyunSECTION = "libs"
4*4882a593SmuzhiyunLICENSE = "BSD-3-Clause"
5*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a"
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunPV = "1.11.0+git${SRCPV}"
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunPROVIDES += "gmock gtest"
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunS = "${WORKDIR}/git"
12*4882a593SmuzhiyunSRCREV = "9e712372214d75bb30ec2847a44bf124d48096f3"
13*4882a593SmuzhiyunSRC_URI = "git://github.com/google/googletest.git;branch=main;protocol=https"
14*4882a593Smuzhiyun
15*4882a593Smuzhiyuninherit cmake
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunALLOW_EMPTY:${PN} = "1"
18*4882a593SmuzhiyunALLOW_EMPTY:${PN}-dbg = "1"
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunRDEPENDS:${PN}-dev += "${PN}-staticdev"
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
23*4882a593Smuzhiyun
24*4882a593Smuzhiyundo_configure:prepend() {
25*4882a593Smuzhiyun    # explicitly use python3
26*4882a593Smuzhiyun    # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this
27*4882a593Smuzhiyun    # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447
28*4882a593Smuzhiyun    # there isn't python in HOSTTOOLS so "env python" fails
29*4882a593Smuzhiyun    sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/test/*py ${S}/googletest/test/*py
30*4882a593Smuzhiyun}
31