blob: 192fe265f16b244c7c11be07e5c6effc184c5f41 [file] [log] [blame]
Andrew Geisslereef63862021-01-29 15:58:13 -06001DESCRIPTION = "A regular expression library"
2HOMEPAGE = "https://github.com/google/re2/"
3LICENSE = "BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=3b5c31eb512bdf3cb11ffd5713963760"
5
Patrick Williams03514f12024-04-05 07:04:11 -05006# tag 2024-03-01
7SRCREV = "2d866a3d0753f4f4fce93cccc6c59c4b052d7db4"
Andrew Geisslereef63862021-01-29 15:58:13 -06008
Patrick Williamsac13d5f2023-11-24 18:59:46 -06009SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https \
10 ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \
11 "
Andrew Geisslereef63862021-01-29 15:58:13 -060012
13S = "${WORKDIR}/git"
14
Patrick Williams03514f12024-04-05 07:04:11 -050015DEPENDS = "abseil-cpp ${@bb.utils.contains('PTEST_ENABLED', '1', 'gtest googlebenchmark', '', d)}"
16
Patrick Williamsac13d5f2023-11-24 18:59:46 -060017inherit cmake ptest
18RDEPENDS:${PN}-ptest += "cmake sed"
Patrick Williams03514f12024-04-05 07:04:11 -050019RDEPENDS:${PN} += "abseil-cpp-dev"
20
21INSANE_SKIP:${PN} += "dev-deps"
Andrew Geisslereef63862021-01-29 15:58:13 -060022
23EXTRA_OECMAKE += " \
24 -DBUILD_SHARED_LIBS=ON \
Patrick Williams03514f12024-04-05 07:04:11 -050025 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DRE2_BUILD_TESTING=ON', '-DRE2_BUILD_TESTING=OFF', d)} \
Andrew Geisslereef63862021-01-29 15:58:13 -060026"
27
Patrick Williamsac13d5f2023-11-24 18:59:46 -060028do_install_ptest () {
29 cp -r ${B}/*_test ${D}${PTEST_PATH}
30 cp -r ${B}/CTestTestfile.cmake ${D}${PTEST_PATH}
31 sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
32 sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
Patrick Williams03514f12024-04-05 07:04:11 -050033 # ERROR: re2-2024.03.01-r0 do_package_qa: QA Issue: /usr/lib64/re2/ptest/string_generator_test contained in package re2-ptest requires libtesting.so()(64bit), but no providers found in RDEPENDS:re2-ptest? [file-rdeps]
34 cp -r ${B}/libtesting.so ${D}${PTEST_PATH}
Patrick Williamsac13d5f2023-11-24 18:59:46 -060035}
36
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050037# ignore .so in /usr/lib64
Patrick Williams213cb262021-08-07 19:21:33 -050038FILES:${PN} = "${libdir}"
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050039INSANE_SKIP:${PN} += "dev-so"
40
41# Don't include so files in dev package
Patrick Williams213cb262021-08-07 19:21:33 -050042FILES:${PN}-dev = "${includedir} ${libdir}/cmake"
Andrew Geisslereef63862021-01-29 15:58:13 -060043
44BBCLASSEXTEND = "native nativesdk"