blob: bea0e74ed07fd56da91f5b069b31475a1a211dad [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
2HOMEPAGE = "http://dbus.freedesktop.org"
3SECTION = "base"
Brad Bishop15ae2502019-06-18 21:44:24 -04004LICENSE = "AFL-2.1 | GPLv2+"
Brad Bishop19323692019-04-05 15:28:33 -04005LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
6 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
7
8DEPENDS = "dbus glib-2.0"
9
Brad Bishop19323692019-04-05 15:28:33 -040010RDEPENDS_${PN}-dev = ""
11
12SRC_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 Bishop15ae2502019-06-18 21:44:24 -040019SRC_URI[md5sum] = "2dbeae80dfc9e3632320c6a53d5e8890"
20SRC_URI[sha256sum] = "54a22d2fa42f2eb2a871f32811c6005b531b9613b1b93a0d269b05e7549fec80"
Brad Bishop19323692019-04-05 15:28:33 -040021
22S="${WORKDIR}/dbus-${PV}"
23FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
24
25inherit autotools pkgconfig gettext ptest upstream-version-is-even
26
27EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
28EXTRA_OECONF_X_class-native = "--without-x"
29
30EXTRA_OECONF = "--enable-tests \
31 --enable-modular-tests \
32 --enable-installed-tests \
33 --enable-checks \
34 --enable-asserts \
Brad Bishop19323692019-04-05 15:28:33 -040035 --enable-largefile \
36 --disable-xml-docs \
37 --disable-doxygen-docs \
38 --disable-libaudit \
39 --with-dbus-test-dir=${PTEST_PATH} \
Brad Bishopc342db32019-05-15 21:57:59 -040040 ${EXTRA_OECONF_X} \
41 --enable-embedded-tests \
42 "
Brad Bishop19323692019-04-05 15:28:33 -040043
44EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
45
46PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
47PACKAGECONFIG_class-native = ""
48PACKAGECONFIG_class-nativesdk = ""
49
50PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
51PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
52PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
Brad Bishopc342db32019-05-15 21:57:59 -040053PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,,"
Brad Bishop19323692019-04-05 15:28:33 -040054
55do_install() {
56 :
57}
58
59do_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 Bishopc342db32019-05-15 21:57:59 -040062 variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service"
Brad Bishop19323692019-04-05 15:28:33 -040063 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 Bishopc342db32019-05-15 21:57:59 -040068 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 Bishop19323692019-04-05 15:28:33 -040073 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 Bishopc342db32019-05-15 21:57:59 -040087RDEPENDS_${PN}-ptest += "bash make dbus"
88RDEPENDS_${PN}-ptest_remove = "${PN}"
Brad Bishop19323692019-04-05 15:28:33 -040089
90PRIVATE_LIBS_${PN}-ptest = "libdbus-1.so.3"