. "$BST_LIB" # utfcpp (UTF8-CPP) is a header-only C++ library -- the cmake build produces an # INTERFACE target, so nothing is compiled into the main package and the shipped # payload is the -dev headers under /usr/include/utf8cpp plus the find_package() # cmake files under /usr/share/utf8cpp/cmake. There is no on-target C++ compiler # to exercise the templates, so the on-target check is that every file the recipe # installs is present and carries its real utfcpp content (the header guard and a # defining API symbol), not an empty placeholder or a wrong file. # The umbrella header and every utf8/*.h the recipe installs are present. check "utfcpp/utf8.h-present" test -f /usr/include/utf8cpp/utf8.h for h in checked core cpp11 cpp17 cpp20 unchecked; do check "utfcpp/$h-present" test -f "/usr/include/utf8cpp/utf8/$h.h" done # The find_package() files the recipe adds to -dev explicitly # (FILES:${PN}-dev += "${datadir}/utf8cpp/cmake") are present. for c in utf8cppConfig utf8cppConfigVersion utf8cppTargets; do check "utfcpp/$c-present" test -f "/usr/share/utf8cpp/cmake/$c.cmake" done # The umbrella header is the real one: its guard, and the two sub-headers it # pulls in (the whole public API reaches a consumer through these includes). check_out utfcpp/utf8-guard "UTF8_FOR_CPP_2675DCD0" cat /usr/include/utf8cpp/utf8.h check_out utfcpp/utf8-checked "utf8/checked.h" cat /usr/include/utf8cpp/utf8.h check_out utfcpp/utf8-unchecked "utf8/unchecked.h" cat /usr/include/utf8cpp/utf8.h # A defining symbol from each header proves these are the library, not stubs: # core.h declares the code-point type, checked.h the exception it throws on bad # input, unchecked.h its namespace, and cpp11.h the std::u16string conversion. check_out utfcpp/core-type "utfchar32_t" cat /usr/include/utf8cpp/utf8/core.h check_out utfcpp/checked-throw "class invalid_utf8" cat /usr/include/utf8cpp/utf8/checked.h check_out utfcpp/unchecked-ns "namespace unchecked" cat /usr/include/utf8cpp/utf8/unchecked.h check_out utfcpp/cpp11-utf8to16 "utf8to16" cat /usr/include/utf8cpp/utf8/cpp11.h # The cmake package exports the namespaced INTERFACE target a consumer links, and # ships a real version. The version is matched as 4.0.x, not the recipe's exact # PV: upstream's v4.0.5 tag still declares VERSION 4.0.4 in its CMakeLists, so # the generated ConfigVersion.cmake reports 4.0.4 under utfcpp_4.0.5.bb. check_out utfcpp/cmake-target "utf8cpp::utf8cpp" cat /usr/share/utf8cpp/cmake/utf8cppConfig.cmake check_out utfcpp/cmake-version 'PACKAGE_VERSION "4.0.' cat /usr/share/utf8cpp/cmake/utf8cppConfigVersion.cmake