Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "D-Bus test package (for D-bus functionality testing only)" |
| 2 | HOMEPAGE = "http://dbus.freedesktop.org" |
| 3 | SECTION = "base" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 4 | LICENSE = "AFL-2.1 | GPLv2+" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ |
| 6 | file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" |
| 7 | |
| 8 | DEPENDS = "dbus glib-2.0" |
| 9 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 10 | RDEPENDS_${PN}-dev = "" |
| 11 | |
| 12 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ |
| 13 | file://tmpdir.patch \ |
| 14 | file://run-ptest \ |
| 15 | file://python-config.patch \ |
| 16 | file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ |
| 17 | " |
| 18 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 19 | SRC_URI[md5sum] = "2dbeae80dfc9e3632320c6a53d5e8890" |
| 20 | SRC_URI[sha256sum] = "54a22d2fa42f2eb2a871f32811c6005b531b9613b1b93a0d269b05e7549fec80" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | |
| 22 | S="${WORKDIR}/dbus-${PV}" |
| 23 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:" |
| 24 | |
| 25 | inherit autotools pkgconfig gettext ptest upstream-version-is-even |
| 26 | |
| 27 | EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" |
| 28 | EXTRA_OECONF_X_class-native = "--without-x" |
| 29 | |
| 30 | EXTRA_OECONF = "--enable-tests \ |
| 31 | --enable-modular-tests \ |
| 32 | --enable-installed-tests \ |
| 33 | --enable-checks \ |
| 34 | --enable-asserts \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | --enable-largefile \ |
| 36 | --disable-xml-docs \ |
| 37 | --disable-doxygen-docs \ |
| 38 | --disable-libaudit \ |
| 39 | --with-dbus-test-dir=${PTEST_PATH} \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 40 | ${EXTRA_OECONF_X} \ |
| 41 | --enable-embedded-tests \ |
| 42 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 43 | |
| 44 | EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl" |
| 45 | |
| 46 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}" |
| 47 | PACKAGECONFIG_class-native = "" |
| 48 | PACKAGECONFIG_class-nativesdk = "" |
| 49 | |
| 50 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd" |
| 51 | PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" |
| 52 | PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 53 | PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,," |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 54 | |
| 55 | do_install() { |
| 56 | : |
| 57 | } |
| 58 | |
| 59 | do_install_ptest() { |
| 60 | install -d ${D}${PTEST_PATH}/test |
| 61 | l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 62 | variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 63 | for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done |
| 64 | |
| 65 | l="bus bus-system bus-launch-helper" |
| 66 | for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done |
| 67 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 68 | install -d ${D}${PTEST_PATH}/bus |
| 69 | install ${B}/bus/.libs/dbus-daemon-launch-helper-test ${D}${PTEST_PATH}/bus |
| 70 | |
| 71 | install ${B}/test/test-segfault ${D}${PTEST_PATH}/test |
| 72 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 73 | cp -r ${B}/test/data ${D}${PTEST_PATH}/test |
| 74 | install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test |
| 75 | |
| 76 | install -d ${D}${PTEST_PATH}/test/.libs |
| 77 | cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs |
| 78 | |
| 79 | # Remove build host references... |
| 80 | find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \ |
| 81 | sed -i \ |
| 82 | -e 's:${B}:${PTEST_PATH}:g' \ |
| 83 | {} + |
| 84 | sed -i -e 's;@PTEST_PATH@;${PTEST_PATH};g' ${D}${PTEST_PATH}/run-ptest |
| 85 | } |
| 86 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 87 | RDEPENDS_${PN}-ptest += "bash make dbus" |
| 88 | RDEPENDS_${PN}-ptest_remove = "${PN}" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 89 | |
| 90 | PRIVATE_LIBS_${PN}-ptest = "libdbus-1.so.3" |