Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 1 | SUMMARY = "sdbus-c++" |
| 2 | DESCRIPTION = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API in modern C++" |
| 3 | |
| 4 | SECTION = "libs" |
| 5 | |
| 6 | LICENSE = "LGPL-2.1-only" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742" |
| 8 | |
| 9 | inherit cmake pkgconfig systemd ptest |
| 10 | |
| 11 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \ |
| 12 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}" |
Patrick Williams | da29531 | 2023-12-05 16:48:56 -0600 | [diff] [blame] | 13 | PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap,basu" |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 14 | PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd" |
Patrick Williams | da29531 | 2023-12-05 16:48:56 -0600 | [diff] [blame] | 15 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${PTEST_PATH},-DBUILD_TESTS=OFF,googletest gmock" |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 16 | |
| 17 | DEPENDS += "expat" |
| 18 | |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame^] | 19 | SRCREV = "30d9f1d46258c2be4ce29b7f7f168ecdf6d4f328" |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 20 | |
| 21 | SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master" |
| 22 | SRC_URI += "file://run-ptest" |
| 23 | |
| 24 | EXTRA_OECMAKE = "-DBUILD_CODE_GEN=OFF \ |
| 25 | -DBUILD_DOC=ON \ |
| 26 | -DBUILD_DOXYGEN_DOC=OFF" |
| 27 | |
| 28 | S = "${WORKDIR}/git" |
| 29 | |
| 30 | # Link libatomic on architectures without 64bit atomics fixes |
| 31 | # libsdbus-c++.so.1.1.0: undefined reference to `__atomic_load_8' |
| 32 | LDFLAGS:append:mips = " -Wl,--no-as-needed -latomic -Wl,--as-needed" |
| 33 | LDFLAGS:append:powerpc = " -Wl,--no-as-needed -latomic -Wl,--as-needed" |
| 34 | LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed" |
| 35 | |
| 36 | do_install:append() { |
| 37 | if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then |
| 38 | rm -rf ${D}${sysconfdir}/dbus-1 |
| 39 | fi |
| 40 | } |
| 41 | |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 42 | do_install_ptest() { |
Patrick Williams | da29531 | 2023-12-05 16:48:56 -0600 | [diff] [blame] | 43 | DESTDIR='${D}' cmake_runcmake_build --target tests/install |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | FILES:${PN}-ptest =+ "${sysconfdir}/dbus-1/system.d/" |
| 47 | FILES:${PN}-dev += "${bindir}/sdbus-c++-xml2cpp" |
| 48 | |
Patrick Williams | da29531 | 2023-12-05 16:48:56 -0600 | [diff] [blame] | 49 | RDEPENDS:${PN}-ptest += "dbus" |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 50 | # It adds -isystem which is spurious, no idea where it gets it from |
| 51 | CCACHE_DISABLE = "1" |